diff --git a/.eslintignore b/.eslintignore index 9e04ca117..2f38a3d3b 100644 --- a/.eslintignore +++ b/.eslintignore @@ -4,4 +4,3 @@ dist/ __fixtures__ - diff --git a/.eslintrc b/.eslintrc index acb58d7b4..9517a6ef7 100644 --- a/.eslintrc +++ b/.eslintrc @@ -9,6 +9,9 @@ "prefer-const": "off", "require-yield": "off" }, + "env": { + "es6": true + }, "overrides": [ { "files": ["*.js", "*.cjs", "*.mjs"], diff --git a/package.json b/package.json index 62974279c..7ca24a1c9 100644 --- a/package.json +++ b/package.json @@ -5,6 +5,7 @@ "repository": "https://github.com/typed-ember/glint", "scripts": { "build": "tsc --build", + "build:vscode": "pnpm --filter '@glint/core' --filter '@glint/tsserver-plugin' build && pnpm --filter 'glint-vscode' build", "build:watch": "tsc --build --watch", "format": "prettier --write .", "link:build": "node ./bin/link-build.mjs", @@ -32,7 +33,12 @@ "glob": "^10.2.4", "prettier": "^3.3.2", "release-plan": "^0.16.0", - "typescript": ">=5.6.0" + "typescript": ">=5.6.0", + "aria-attributes": "^2.0.1", + "html-element-attributes": "^3.3.0", + "html-event-attributes": "^2.2.0", + "svg-element-attributes": "^2.1.0", + "svg-event-attributes": "^2.0.2" }, "packageManager": "pnpm@10.6.2", "volta": { diff --git a/packages/core/src/transform/template/template-to-typescript.ts b/packages/core/src/transform/template/template-to-typescript.ts index 2060f8623..a8356c2c4 100644 --- a/packages/core/src/transform/template/template-to-typescript.ts +++ b/packages/core/src/transform/template/template-to-typescript.ts @@ -60,6 +60,7 @@ export function templateToTypescript( return mapTemplateContents(originalTemplate, { embeddingSyntax }, (ast, mapper) => { let { rangeForNode } = mapper; let scope = new ScopeStack([]); + let inHtmlContext: 'svg' | 'math' | 'default' = 'default'; emitTemplateBoilerplate(() => { for (let statement of ast?.body ?? []) { @@ -184,6 +185,12 @@ export function templateToTypescript( } else if (kind === 'nocheck') { // Push to the directives array on the record mapper.directive(node, 'nocheck'); + } else if (kind === 'in-svg') { + inHtmlContext = 'svg'; + } else if (kind === 'in-mathml') { + inHtmlContext = 'math'; + } else if (kind === 'out-svg' || kind === 'out-mathml') { + inHtmlContext = 'default'; } else { // Push an error on the record mapper.error(`Unknown directive @glint-${kind}`, location); @@ -878,15 +885,29 @@ export function templateToTypescript( mapper.forNode(node, () => { const directivesWeakMap = assignDirectivesToElementOpenTagPieces(node); + if (node.tag === 'svg') { + inHtmlContext = 'svg'; + } + + if (node.tag === 'math') { + inHtmlContext = 'math'; + } + mapper.text('{'); mapper.newline(); mapper.indent(); - mapper.text('const __glintY__ = __glintDSL__.emitElement('); + if (inHtmlContext === 'default') { + mapper.text('const __glintY__ = __glintDSL__.emitElement("'); + } else if (inHtmlContext === 'svg') { + mapper.text('const __glintY__ = __glintDSL__.emitSVGElement("'); + } else if (inHtmlContext === 'math') { + mapper.text('const __glintY__ = __glintDSL__.emitMathMlElement("'); + } mapper.forNode(node.path, () => { - mapper.text(JSON.stringify(node.tag)); + mapper.text(node.tag); }); - mapper.text(');'); + mapper.text('");'); mapper.newline(); emitAttributesAndModifiers(node, directivesWeakMap); @@ -899,6 +920,10 @@ export function templateToTypescript( emitTopLevelStatement(child); } + if (node.tag === 'svg' || node.tag === 'math') { + inHtmlContext = 'default'; + } + mapper.dedent(); mapper.text('}'); mapper.newline(); @@ -909,19 +934,9 @@ export function templateToTypescript( node: AST.ElementNode, directivesWeakMap: WeakMap, ): void { - let nonArgAttributes = node.attributes.filter((attr) => !attr.name.startsWith('@')); - if (!nonArgAttributes.length && !node.modifiers.length) { - // Avoid unused-symbol diagnostics - // TODO: With Volar you can simply disable `verification` on the CodeInformation - // to prevent diagnostics from mapping back upwards. Perhaps we should use that - // instead of preserving these empty statements/expressions. - mapper.text('__glintY__;'); - mapper.newline(); - } else { - emitSplattributes(node); - emitPlainAttributes(node, directivesWeakMap); - emitModifiers(node, directivesWeakMap); - } + emitSplattributes(node); + emitPlainAttributes(node, directivesWeakMap); + emitModifiers(node, directivesWeakMap); } function emitPlainAttributes( @@ -933,8 +948,10 @@ export function templateToTypescript( ); mapper.text('__glintDSL__.applyAttributes(__glintY__.element, {'); - - mapper.forNodeWithSpan(node, node.openTag, () => { + const attrsSpan = node.openTag + .withStart(node.path.loc.getEnd()) + .withEnd(node.openTag.getEnd().move(-1)); + mapper.forNodeWithSpan(node, attrsSpan, () => { mapper.newline(); mapper.indent(); @@ -961,17 +978,12 @@ export function templateToTypescript( mapper.terminateDirectiveAreaOfEffect('emitPlainAttributes'); } - - // in case there are no attributes, this would allow completions to trigger - if (attributes.length === 0) { - mapper.text(' '); - mapper.newline(); - } - - mapper.dedent(); - mapper.text('});'); mapper.newline(); }); + mapper.newline(); + mapper.dedent(); + mapper.text('});'); + mapper.newline(); } function emitSplattributes(node: AST.ElementNode): void { diff --git a/packages/template/-private/dsl/elements.d.ts b/packages/template/-private/dsl/elements.d.ts new file mode 100644 index 000000000..4710e9216 --- /dev/null +++ b/packages/template/-private/dsl/elements.d.ts @@ -0,0 +1,4272 @@ +//generated by scrips/build-elements.mjs + +import { AttrValue } from '../index'; +export declare namespace HtmlElementAttributes { + interface GenericAttributes { + ['accesskey']: AttrValue; + ['autocapitalize']: AttrValue; + ['autofocus']: AttrValue; + ['class']: AttrValue; + ['contenteditable']: AttrValue; + ['dir']: AttrValue; + ['draggable']: AttrValue; + ['enterkeyhint']: AttrValue; + ['hidden']: AttrValue; + ['id']: AttrValue; + ['inert']: AttrValue; + ['inputmode']: AttrValue; + ['is']: AttrValue; + ['itemid']: AttrValue; + ['itemprop']: AttrValue; + ['itemref']: AttrValue; + ['itemscope']: AttrValue; + ['itemtype']: AttrValue; + ['lang']: AttrValue; + ['nonce']: AttrValue; + ['popover']: AttrValue; + ['slot']: AttrValue; + ['spellcheck']: AttrValue; + ['style']: AttrValue; + ['tabindex']: AttrValue; + ['title']: AttrValue; + ['translate']: AttrValue; + ['writingsuggestions']: AttrValue; + ['aria-activedescendant']: AttrValue; + ['aria-atomic']: AttrValue; + ['aria-autocomplete']: AttrValue; + ['aria-busy']: AttrValue; + ['aria-checked']: AttrValue; + ['aria-colcount']: AttrValue; + ['aria-colindex']: AttrValue; + ['aria-colspan']: AttrValue; + ['aria-controls']: AttrValue; + ['aria-current']: AttrValue; + ['aria-describedby']: AttrValue; + ['aria-details']: AttrValue; + ['aria-disabled']: AttrValue; + ['aria-dropeffect']: AttrValue; + ['aria-errormessage']: AttrValue; + ['aria-expanded']: AttrValue; + ['aria-flowto']: AttrValue; + ['aria-grabbed']: AttrValue; + ['aria-haspopup']: AttrValue; + ['aria-hidden']: AttrValue; + ['aria-invalid']: AttrValue; + ['aria-keyshortcuts']: AttrValue; + ['aria-label']: AttrValue; + ['aria-labelledby']: AttrValue; + ['aria-level']: AttrValue; + ['aria-live']: AttrValue; + ['aria-modal']: AttrValue; + ['aria-multiline']: AttrValue; + ['aria-multiselectable']: AttrValue; + ['aria-orientation']: AttrValue; + ['aria-owns']: AttrValue; + ['aria-placeholder']: AttrValue; + ['aria-posinset']: AttrValue; + ['aria-pressed']: AttrValue; + ['aria-readonly']: AttrValue; + ['aria-relevant']: AttrValue; + ['aria-required']: AttrValue; + ['aria-roledescription']: AttrValue; + ['aria-rowcount']: AttrValue; + ['aria-rowindex']: AttrValue; + ['aria-rowspan']: AttrValue; + ['aria-selected']: AttrValue; + ['aria-setsize']: AttrValue; + ['aria-sort']: AttrValue; + ['aria-valuemax']: AttrValue; + ['aria-valuemin']: AttrValue; + ['aria-valuenow']: AttrValue; + ['aria-valuetext']: AttrValue; + ['role']: AttrValue; + ['onabort']: AttrValue; + ['onafterprint']: AttrValue; + ['onauxclick']: AttrValue; + ['onbeforematch']: AttrValue; + ['onbeforeprint']: AttrValue; + ['onbeforetoggle']: AttrValue; + ['onbeforeunload']: AttrValue; + ['onblur']: AttrValue; + ['oncancel']: AttrValue; + ['oncanplay']: AttrValue; + ['oncanplaythrough']: AttrValue; + ['onchange']: AttrValue; + ['onclick']: AttrValue; + ['onclose']: AttrValue; + ['oncontextlost']: AttrValue; + ['oncontextmenu']: AttrValue; + ['oncontextrestored']: AttrValue; + ['oncopy']: AttrValue; + ['oncuechange']: AttrValue; + ['oncut']: AttrValue; + ['ondblclick']: AttrValue; + ['ondrag']: AttrValue; + ['ondragend']: AttrValue; + ['ondragenter']: AttrValue; + ['ondragleave']: AttrValue; + ['ondragover']: AttrValue; + ['ondragstart']: AttrValue; + ['ondrop']: AttrValue; + ['ondurationchange']: AttrValue; + ['onemptied']: AttrValue; + ['onended']: AttrValue; + ['onerror']: AttrValue; + ['onfocus']: AttrValue; + ['onformdata']: AttrValue; + ['onhashchange']: AttrValue; + ['oninput']: AttrValue; + ['oninvalid']: AttrValue; + ['onkeydown']: AttrValue; + ['onkeypress']: AttrValue; + ['onkeyup']: AttrValue; + ['onlanguagechange']: AttrValue; + ['onload']: AttrValue; + ['onloadeddata']: AttrValue; + ['onloadedmetadata']: AttrValue; + ['onloadstart']: AttrValue; + ['onmessage']: AttrValue; + ['onmessageerror']: AttrValue; + ['onmousedown']: AttrValue; + ['onmouseenter']: AttrValue; + ['onmouseleave']: AttrValue; + ['onmousemove']: AttrValue; + ['onmouseout']: AttrValue; + ['onmouseover']: AttrValue; + ['onmouseup']: AttrValue; + ['onoffline']: AttrValue; + ['ononline']: AttrValue; + ['onpagehide']: AttrValue; + ['onpageshow']: AttrValue; + ['onpaste']: AttrValue; + ['onpause']: AttrValue; + ['onplay']: AttrValue; + ['onplaying']: AttrValue; + ['onpopstate']: AttrValue; + ['onprogress']: AttrValue; + ['onratechange']: AttrValue; + ['onrejectionhandled']: AttrValue; + ['onreset']: AttrValue; + ['onresize']: AttrValue; + ['onscroll']: AttrValue; + ['onscrollend']: AttrValue; + ['onsecuritypolicyviolation']: AttrValue; + ['onseeked']: AttrValue; + ['onseeking']: AttrValue; + ['onselect']: AttrValue; + ['onslotchange']: AttrValue; + ['onstalled']: AttrValue; + ['onstorage']: AttrValue; + ['onsubmit']: AttrValue; + ['onsuspend']: AttrValue; + ['ontimeupdate']: AttrValue; + ['ontoggle']: AttrValue; + ['onunhandledrejection']: AttrValue; + ['onunload']: AttrValue; + ['onvolumechange']: AttrValue; + ['onwaiting']: AttrValue; + ['onwheel']: AttrValue; + } + interface HTMLAnchorElementAttributes extends GenericAttributes { + ['charset']: AttrValue; + ['coords']: AttrValue; + ['download']: AttrValue; + ['href']: AttrValue; + ['hreflang']: AttrValue; + ['name']: AttrValue; + ['ping']: AttrValue; + ['referrerpolicy']: AttrValue; + ['rel']: AttrValue; + ['rev']: AttrValue; + ['shape']: AttrValue; + ['target']: AttrValue; + ['type']: AttrValue; + } + interface HTMLAreaElementAttributes extends GenericAttributes { + ['alt']: AttrValue; + ['coords']: AttrValue; + ['download']: AttrValue; + ['href']: AttrValue; + ['hreflang']: AttrValue; + ['nohref']: AttrValue; + ['ping']: AttrValue; + ['referrerpolicy']: AttrValue; + ['rel']: AttrValue; + ['shape']: AttrValue; + ['target']: AttrValue; + ['type']: AttrValue; + } + interface HTMLAudioElementAttributes extends GenericAttributes { + ['autoplay']: AttrValue; + ['controls']: AttrValue; + ['crossorigin']: AttrValue; + ['loop']: AttrValue; + ['muted']: AttrValue; + ['preload']: AttrValue; + ['src']: AttrValue; + } + interface HTMLBaseElementAttributes extends GenericAttributes { + ['href']: AttrValue; + ['target']: AttrValue; + } + interface HTMLQuoteElementAttributes extends GenericAttributes { + ['cite']: AttrValue; + } + interface HTMLBodyElementAttributes extends GenericAttributes { + ['alink']: AttrValue; + ['background']: AttrValue; + ['bgcolor']: AttrValue; + ['link']: AttrValue; + ['text']: AttrValue; + ['vlink']: AttrValue; + } + interface HTMLBRElementAttributes extends GenericAttributes { + ['clear']: AttrValue; + } + interface HTMLButtonElementAttributes extends GenericAttributes { + ['disabled']: AttrValue; + ['form']: AttrValue; + ['formaction']: AttrValue; + ['formenctype']: AttrValue; + ['formmethod']: AttrValue; + ['formnovalidate']: AttrValue; + ['formtarget']: AttrValue; + ['name']: AttrValue; + ['popovertarget']: AttrValue; + ['popovertargetaction']: AttrValue; + ['type']: AttrValue; + ['value']: AttrValue; + } + interface HTMLCanvasElementAttributes extends GenericAttributes { + ['height']: AttrValue; + ['width']: AttrValue; + } + interface HTMLTableCaptionElementAttributes extends GenericAttributes { + ['align']: AttrValue; + } + interface HTMLTableColElementAttributes extends GenericAttributes { + ['align']: AttrValue; + ['char']: AttrValue; + ['charoff']: AttrValue; + ['span']: AttrValue; + ['valign']: AttrValue; + ['width']: AttrValue; + } + interface HTMLDataElementAttributes extends GenericAttributes { + ['value']: AttrValue; + } + interface HTMLModElementAttributes extends GenericAttributes { + ['cite']: AttrValue; + ['datetime']: AttrValue; + } + interface HTMLDetailsElementAttributes extends GenericAttributes { + ['name']: AttrValue; + ['open']: AttrValue; + } + interface HTMLDialogElementAttributes extends GenericAttributes { + ['open']: AttrValue; + } + interface HTMLDivElementAttributes extends GenericAttributes { + ['align']: AttrValue; + } + interface HTMLDListElementAttributes extends GenericAttributes { + ['compact']: AttrValue; + } + interface HTMLEmbedElementAttributes extends GenericAttributes { + ['height']: AttrValue; + ['src']: AttrValue; + ['type']: AttrValue; + ['width']: AttrValue; + } + interface HTMLFieldSetElementAttributes extends GenericAttributes { + ['disabled']: AttrValue; + ['form']: AttrValue; + ['name']: AttrValue; + } + interface HTMLFormElementAttributes extends GenericAttributes { + ['accept']: AttrValue; + ['accept-charset']: AttrValue; + ['action']: AttrValue; + ['autocomplete']: AttrValue; + ['enctype']: AttrValue; + ['method']: AttrValue; + ['name']: AttrValue; + ['novalidate']: AttrValue; + ['target']: AttrValue; + } + interface HTMLHeadingElementAttributes extends GenericAttributes { + ['align']: AttrValue; + } + interface HTMLHeadElementAttributes extends GenericAttributes { + ['profile']: AttrValue; + } + interface HTMLHRElementAttributes extends GenericAttributes { + ['align']: AttrValue; + ['noshade']: AttrValue; + ['size']: AttrValue; + ['width']: AttrValue; + } + interface HTMLHtmlElementAttributes extends GenericAttributes { + ['manifest']: AttrValue; + ['version']: AttrValue; + } + interface HTMLIFrameElementAttributes extends GenericAttributes { + ['align']: AttrValue; + ['allow']: AttrValue; + ['allowfullscreen']: AttrValue; + ['allowpaymentrequest']: AttrValue; + ['allowusermedia']: AttrValue; + ['frameborder']: AttrValue; + ['height']: AttrValue; + ['loading']: AttrValue; + ['longdesc']: AttrValue; + ['marginheight']: AttrValue; + ['marginwidth']: AttrValue; + ['name']: AttrValue; + ['referrerpolicy']: AttrValue; + ['sandbox']: AttrValue; + ['scrolling']: AttrValue; + ['src']: AttrValue; + ['srcdoc']: AttrValue; + ['width']: AttrValue; + } + interface HTMLImageElementAttributes extends GenericAttributes { + ['align']: AttrValue; + ['alt']: AttrValue; + ['border']: AttrValue; + ['crossorigin']: AttrValue; + ['decoding']: AttrValue; + ['fetchpriority']: AttrValue; + ['height']: AttrValue; + ['hspace']: AttrValue; + ['ismap']: AttrValue; + ['loading']: AttrValue; + ['longdesc']: AttrValue; + ['name']: AttrValue; + ['referrerpolicy']: AttrValue; + ['sizes']: AttrValue; + ['src']: AttrValue; + ['srcset']: AttrValue; + ['usemap']: AttrValue; + ['vspace']: AttrValue; + ['width']: AttrValue; + } + interface HTMLInputElementAttributes extends GenericAttributes { + ['accept']: AttrValue; + ['align']: AttrValue; + ['alt']: AttrValue; + ['autocomplete']: AttrValue; + ['checked']: AttrValue; + ['dirname']: AttrValue; + ['disabled']: AttrValue; + ['form']: AttrValue; + ['formaction']: AttrValue; + ['formenctype']: AttrValue; + ['formmethod']: AttrValue; + ['formnovalidate']: AttrValue; + ['formtarget']: AttrValue; + ['height']: AttrValue; + ['ismap']: AttrValue; + ['list']: AttrValue; + ['max']: AttrValue; + ['maxlength']: AttrValue; + ['min']: AttrValue; + ['minlength']: AttrValue; + ['multiple']: AttrValue; + ['name']: AttrValue; + ['pattern']: AttrValue; + ['placeholder']: AttrValue; + ['popovertarget']: AttrValue; + ['popovertargetaction']: AttrValue; + ['readonly']: AttrValue; + ['required']: AttrValue; + ['size']: AttrValue; + ['src']: AttrValue; + ['step']: AttrValue; + ['type']: AttrValue; + ['usemap']: AttrValue; + ['value']: AttrValue; + ['width']: AttrValue; + } + interface HTMLLabelElementAttributes extends GenericAttributes { + ['for']: AttrValue; + ['form']: AttrValue; + } + interface HTMLLegendElementAttributes extends GenericAttributes { + ['align']: AttrValue; + } + interface HTMLLIElementAttributes extends GenericAttributes { + ['type']: AttrValue; + ['value']: AttrValue; + } + interface HTMLLinkElementAttributes extends GenericAttributes { + ['as']: AttrValue; + ['blocking']: AttrValue; + ['charset']: AttrValue; + ['color']: AttrValue; + ['crossorigin']: AttrValue; + ['disabled']: AttrValue; + ['fetchpriority']: AttrValue; + ['href']: AttrValue; + ['hreflang']: AttrValue; + ['imagesizes']: AttrValue; + ['imagesrcset']: AttrValue; + ['integrity']: AttrValue; + ['media']: AttrValue; + ['referrerpolicy']: AttrValue; + ['rel']: AttrValue; + ['rev']: AttrValue; + ['sizes']: AttrValue; + ['target']: AttrValue; + ['type']: AttrValue; + } + interface HTMLMapElementAttributes extends GenericAttributes { + ['name']: AttrValue; + } + interface HTMLMenuElementAttributes extends GenericAttributes { + ['compact']: AttrValue; + } + interface HTMLMetaElementAttributes extends GenericAttributes { + ['charset']: AttrValue; + ['content']: AttrValue; + ['http-equiv']: AttrValue; + ['media']: AttrValue; + ['name']: AttrValue; + ['scheme']: AttrValue; + } + interface HTMLMeterElementAttributes extends GenericAttributes { + ['high']: AttrValue; + ['low']: AttrValue; + ['max']: AttrValue; + ['min']: AttrValue; + ['optimum']: AttrValue; + ['value']: AttrValue; + } + interface HTMLObjectElementAttributes extends GenericAttributes { + ['align']: AttrValue; + ['archive']: AttrValue; + ['border']: AttrValue; + ['classid']: AttrValue; + ['codebase']: AttrValue; + ['codetype']: AttrValue; + ['data']: AttrValue; + ['declare']: AttrValue; + ['form']: AttrValue; + ['height']: AttrValue; + ['hspace']: AttrValue; + ['name']: AttrValue; + ['standby']: AttrValue; + ['type']: AttrValue; + ['typemustmatch']: AttrValue; + ['usemap']: AttrValue; + ['vspace']: AttrValue; + ['width']: AttrValue; + } + interface HTMLOListElementAttributes extends GenericAttributes { + ['compact']: AttrValue; + ['reversed']: AttrValue; + ['start']: AttrValue; + ['type']: AttrValue; + } + interface HTMLOptGroupElementAttributes extends GenericAttributes { + ['disabled']: AttrValue; + ['label']: AttrValue; + } + interface HTMLOptionElementAttributes extends GenericAttributes { + ['disabled']: AttrValue; + ['label']: AttrValue; + ['selected']: AttrValue; + ['value']: AttrValue; + } + interface HTMLOutputElementAttributes extends GenericAttributes { + ['for']: AttrValue; + ['form']: AttrValue; + ['name']: AttrValue; + } + interface HTMLParagraphElementAttributes extends GenericAttributes { + ['align']: AttrValue; + } + interface HTMLPreElementAttributes extends GenericAttributes { + ['width']: AttrValue; + } + interface HTMLProgressElementAttributes extends GenericAttributes { + ['max']: AttrValue; + ['value']: AttrValue; + } + interface HTMLScriptElementAttributes extends GenericAttributes { + ['async']: AttrValue; + ['blocking']: AttrValue; + ['charset']: AttrValue; + ['crossorigin']: AttrValue; + ['defer']: AttrValue; + ['fetchpriority']: AttrValue; + ['integrity']: AttrValue; + ['language']: AttrValue; + ['nomodule']: AttrValue; + ['referrerpolicy']: AttrValue; + ['src']: AttrValue; + ['type']: AttrValue; + } + interface HTMLSelectElementAttributes extends GenericAttributes { + ['autocomplete']: AttrValue; + ['disabled']: AttrValue; + ['form']: AttrValue; + ['multiple']: AttrValue; + ['name']: AttrValue; + ['required']: AttrValue; + ['size']: AttrValue; + } + interface HTMLSlotElementAttributes extends GenericAttributes { + ['name']: AttrValue; + } + interface HTMLSourceElementAttributes extends GenericAttributes { + ['height']: AttrValue; + ['media']: AttrValue; + ['sizes']: AttrValue; + ['src']: AttrValue; + ['srcset']: AttrValue; + ['type']: AttrValue; + ['width']: AttrValue; + } + interface HTMLStyleElementAttributes extends GenericAttributes { + ['blocking']: AttrValue; + ['media']: AttrValue; + ['type']: AttrValue; + } + interface HTMLTableElementAttributes extends GenericAttributes { + ['align']: AttrValue; + ['bgcolor']: AttrValue; + ['border']: AttrValue; + ['cellpadding']: AttrValue; + ['cellspacing']: AttrValue; + ['frame']: AttrValue; + ['rules']: AttrValue; + ['summary']: AttrValue; + ['width']: AttrValue; + } + interface HTMLTableSectionElementAttributes extends GenericAttributes { + ['align']: AttrValue; + ['char']: AttrValue; + ['charoff']: AttrValue; + ['valign']: AttrValue; + } + interface HTMLTableCellElementAttributes extends GenericAttributes { + ['abbr']: AttrValue; + ['align']: AttrValue; + ['axis']: AttrValue; + ['bgcolor']: AttrValue; + ['char']: AttrValue; + ['charoff']: AttrValue; + ['colspan']: AttrValue; + ['headers']: AttrValue; + ['height']: AttrValue; + ['nowrap']: AttrValue; + ['rowspan']: AttrValue; + ['scope']: AttrValue; + ['valign']: AttrValue; + ['width']: AttrValue; + } + interface HTMLTemplateElementAttributes extends GenericAttributes { + ['shadowrootclonable']: AttrValue; + ['shadowrootdelegatesfocus']: AttrValue; + ['shadowrootmode']: AttrValue; + } + interface HTMLTextAreaElementAttributes extends GenericAttributes { + ['autocomplete']: AttrValue; + ['cols']: AttrValue; + ['dirname']: AttrValue; + ['disabled']: AttrValue; + ['form']: AttrValue; + ['maxlength']: AttrValue; + ['minlength']: AttrValue; + ['name']: AttrValue; + ['placeholder']: AttrValue; + ['readonly']: AttrValue; + ['required']: AttrValue; + ['rows']: AttrValue; + ['wrap']: AttrValue; + } + interface HTMLTimeElementAttributes extends GenericAttributes { + ['datetime']: AttrValue; + } + interface HTMLTableRowElementAttributes extends GenericAttributes { + ['align']: AttrValue; + ['bgcolor']: AttrValue; + ['char']: AttrValue; + ['charoff']: AttrValue; + ['valign']: AttrValue; + } + interface HTMLTrackElementAttributes extends GenericAttributes { + ['default']: AttrValue; + ['kind']: AttrValue; + ['label']: AttrValue; + ['src']: AttrValue; + ['srclang']: AttrValue; + } + interface HTMLUListElementAttributes extends GenericAttributes { + ['compact']: AttrValue; + ['type']: AttrValue; + } + interface HTMLVideoElementAttributes extends GenericAttributes { + ['autoplay']: AttrValue; + ['controls']: AttrValue; + ['crossorigin']: AttrValue; + ['height']: AttrValue; + ['loop']: AttrValue; + ['muted']: AttrValue; + ['playsinline']: AttrValue; + ['poster']: AttrValue; + ['preload']: AttrValue; + ['src']: AttrValue; + ['width']: AttrValue; + } + interface HtmlElements { + ['Generic']: GenericAttributes; + ['HTMLAnchorElement']: HTMLAnchorElementAttributes; + ['HTMLAreaElement']: HTMLAreaElementAttributes; + ['HTMLAudioElement']: HTMLAudioElementAttributes; + ['HTMLBaseElement']: HTMLBaseElementAttributes; + ['HTMLQuoteElement']: HTMLQuoteElementAttributes; + ['HTMLBodyElement']: HTMLBodyElementAttributes; + ['HTMLBRElement']: HTMLBRElementAttributes; + ['HTMLButtonElement']: HTMLButtonElementAttributes; + ['HTMLCanvasElement']: HTMLCanvasElementAttributes; + ['HTMLTableCaptionElement']: HTMLTableCaptionElementAttributes; + ['HTMLTableColElement']: HTMLTableColElementAttributes; + ['HTMLDataElement']: HTMLDataElementAttributes; + ['HTMLModElement']: HTMLModElementAttributes; + ['HTMLDetailsElement']: HTMLDetailsElementAttributes; + ['HTMLDialogElement']: HTMLDialogElementAttributes; + ['HTMLDivElement']: HTMLDivElementAttributes; + ['HTMLDListElement']: HTMLDListElementAttributes; + ['HTMLEmbedElement']: HTMLEmbedElementAttributes; + ['HTMLFieldSetElement']: HTMLFieldSetElementAttributes; + ['HTMLFormElement']: HTMLFormElementAttributes; + ['HTMLHeadingElement']: HTMLHeadingElementAttributes; + ['HTMLHeadElement']: HTMLHeadElementAttributes; + ['HTMLHRElement']: HTMLHRElementAttributes; + ['HTMLHtmlElement']: HTMLHtmlElementAttributes; + ['HTMLIFrameElement']: HTMLIFrameElementAttributes; + ['HTMLImageElement']: HTMLImageElementAttributes; + ['HTMLInputElement']: HTMLInputElementAttributes; + ['HTMLLabelElement']: HTMLLabelElementAttributes; + ['HTMLLegendElement']: HTMLLegendElementAttributes; + ['HTMLLIElement']: HTMLLIElementAttributes; + ['HTMLLinkElement']: HTMLLinkElementAttributes; + ['HTMLMapElement']: HTMLMapElementAttributes; + ['HTMLMenuElement']: HTMLMenuElementAttributes; + ['HTMLMetaElement']: HTMLMetaElementAttributes; + ['HTMLMeterElement']: HTMLMeterElementAttributes; + ['HTMLObjectElement']: HTMLObjectElementAttributes; + ['HTMLOListElement']: HTMLOListElementAttributes; + ['HTMLOptGroupElement']: HTMLOptGroupElementAttributes; + ['HTMLOptionElement']: HTMLOptionElementAttributes; + ['HTMLOutputElement']: HTMLOutputElementAttributes; + ['HTMLParagraphElement']: HTMLParagraphElementAttributes; + ['HTMLPreElement']: HTMLPreElementAttributes; + ['HTMLProgressElement']: HTMLProgressElementAttributes; + ['HTMLScriptElement']: HTMLScriptElementAttributes; + ['HTMLSelectElement']: HTMLSelectElementAttributes; + ['HTMLSlotElement']: HTMLSlotElementAttributes; + ['HTMLSourceElement']: HTMLSourceElementAttributes; + ['HTMLStyleElement']: HTMLStyleElementAttributes; + ['HTMLTableElement']: HTMLTableElementAttributes; + ['HTMLTableSectionElement']: HTMLTableSectionElementAttributes; + ['HTMLTableCellElement']: HTMLTableCellElementAttributes; + ['HTMLTemplateElement']: HTMLTemplateElementAttributes; + ['HTMLTextAreaElement']: HTMLTextAreaElementAttributes; + ['HTMLTimeElement']: HTMLTimeElementAttributes; + ['HTMLTableRowElement']: HTMLTableRowElementAttributes; + ['HTMLTrackElement']: HTMLTrackElementAttributes; + ['HTMLUListElement']: HTMLUListElementAttributes; + ['HTMLVideoElement']: HTMLVideoElementAttributes; + } +} + +export declare namespace SvgElementAttributes { + interface SVGAElementAttributes extends GenericAttributes { + ['alignment-baseline']: AttrValue; + ['baseline-shift']: AttrValue; + ['clip']: AttrValue; + ['clip-path']: AttrValue; + ['clip-rule']: AttrValue; + ['color']: AttrValue; + ['color-interpolation']: AttrValue; + ['color-interpolation-filters']: AttrValue; + ['color-profile']: AttrValue; + ['color-rendering']: AttrValue; + ['cursor']: AttrValue; + ['direction']: AttrValue; + ['display']: AttrValue; + ['dominant-baseline']: AttrValue; + ['download']: AttrValue; + ['enable-background']: AttrValue; + ['externalResourcesRequired']: AttrValue; + ['fill']: AttrValue; + ['fill-opacity']: AttrValue; + ['fill-rule']: AttrValue; + ['filter']: AttrValue; + ['flood-color']: AttrValue; + ['flood-opacity']: AttrValue; + ['focusHighlight']: AttrValue; + ['focusable']: AttrValue; + ['font-family']: AttrValue; + ['font-size']: AttrValue; + ['font-size-adjust']: AttrValue; + ['font-stretch']: AttrValue; + ['font-style']: AttrValue; + ['font-variant']: AttrValue; + ['font-weight']: AttrValue; + ['glyph-orientation-horizontal']: AttrValue; + ['glyph-orientation-vertical']: AttrValue; + ['href']: AttrValue; + ['hreflang']: AttrValue; + ['image-rendering']: AttrValue; + ['kerning']: AttrValue; + ['letter-spacing']: AttrValue; + ['lighting-color']: AttrValue; + ['marker-end']: AttrValue; + ['marker-mid']: AttrValue; + ['marker-start']: AttrValue; + ['mask']: AttrValue; + ['nav-down']: AttrValue; + ['nav-down-left']: AttrValue; + ['nav-down-right']: AttrValue; + ['nav-left']: AttrValue; + ['nav-next']: AttrValue; + ['nav-prev']: AttrValue; + ['nav-right']: AttrValue; + ['nav-up']: AttrValue; + ['nav-up-left']: AttrValue; + ['nav-up-right']: AttrValue; + ['opacity']: AttrValue; + ['overflow']: AttrValue; + ['ping']: AttrValue; + ['pointer-events']: AttrValue; + ['referrerpolicy']: AttrValue; + ['requiredExtensions']: AttrValue; + ['requiredFeatures']: AttrValue; + ['requiredFonts']: AttrValue; + ['requiredFormats']: AttrValue; + ['shape-rendering']: AttrValue; + ['stop-color']: AttrValue; + ['stop-opacity']: AttrValue; + ['stroke']: AttrValue; + ['stroke-dasharray']: AttrValue; + ['stroke-dashoffset']: AttrValue; + ['stroke-linecap']: AttrValue; + ['stroke-linejoin']: AttrValue; + ['stroke-miterlimit']: AttrValue; + ['stroke-opacity']: AttrValue; + ['stroke-width']: AttrValue; + ['systemLanguage']: AttrValue; + ['target']: AttrValue; + ['text-anchor']: AttrValue; + ['text-decoration']: AttrValue; + ['text-rendering']: AttrValue; + ['transform']: AttrValue; + ['type']: AttrValue; + ['unicode-bidi']: AttrValue; + ['visibility']: AttrValue; + ['word-spacing']: AttrValue; + ['writing-mode']: AttrValue; + } + interface SVGAnimateElementAttributes extends GenericAttributes { + ['accumulate']: AttrValue; + ['additive']: AttrValue; + ['alignment-baseline']: AttrValue; + ['attributeName']: AttrValue; + ['attributeType']: AttrValue; + ['baseline-shift']: AttrValue; + ['begin']: AttrValue; + ['by']: AttrValue; + ['calcMode']: AttrValue; + ['clip']: AttrValue; + ['clip-path']: AttrValue; + ['clip-rule']: AttrValue; + ['color']: AttrValue; + ['color-interpolation']: AttrValue; + ['color-interpolation-filters']: AttrValue; + ['color-profile']: AttrValue; + ['color-rendering']: AttrValue; + ['cursor']: AttrValue; + ['direction']: AttrValue; + ['display']: AttrValue; + ['dominant-baseline']: AttrValue; + ['dur']: AttrValue; + ['enable-background']: AttrValue; + ['end']: AttrValue; + ['externalResourcesRequired']: AttrValue; + ['fill']: AttrValue; + ['fill-opacity']: AttrValue; + ['fill-rule']: AttrValue; + ['filter']: AttrValue; + ['flood-color']: AttrValue; + ['flood-opacity']: AttrValue; + ['font-family']: AttrValue; + ['font-size']: AttrValue; + ['font-size-adjust']: AttrValue; + ['font-stretch']: AttrValue; + ['font-style']: AttrValue; + ['font-variant']: AttrValue; + ['font-weight']: AttrValue; + ['from']: AttrValue; + ['glyph-orientation-horizontal']: AttrValue; + ['glyph-orientation-vertical']: AttrValue; + ['href']: AttrValue; + ['image-rendering']: AttrValue; + ['kerning']: AttrValue; + ['keySplines']: AttrValue; + ['keyTimes']: AttrValue; + ['letter-spacing']: AttrValue; + ['lighting-color']: AttrValue; + ['marker-end']: AttrValue; + ['marker-mid']: AttrValue; + ['marker-start']: AttrValue; + ['mask']: AttrValue; + ['max']: AttrValue; + ['min']: AttrValue; + ['opacity']: AttrValue; + ['overflow']: AttrValue; + ['pointer-events']: AttrValue; + ['repeatCount']: AttrValue; + ['repeatDur']: AttrValue; + ['requiredExtensions']: AttrValue; + ['requiredFeatures']: AttrValue; + ['requiredFonts']: AttrValue; + ['requiredFormats']: AttrValue; + ['restart']: AttrValue; + ['shape-rendering']: AttrValue; + ['stop-color']: AttrValue; + ['stop-opacity']: AttrValue; + ['stroke']: AttrValue; + ['stroke-dasharray']: AttrValue; + ['stroke-dashoffset']: AttrValue; + ['stroke-linecap']: AttrValue; + ['stroke-linejoin']: AttrValue; + ['stroke-miterlimit']: AttrValue; + ['stroke-opacity']: AttrValue; + ['stroke-width']: AttrValue; + ['systemLanguage']: AttrValue; + ['text-anchor']: AttrValue; + ['text-decoration']: AttrValue; + ['text-rendering']: AttrValue; + ['to']: AttrValue; + ['unicode-bidi']: AttrValue; + ['values']: AttrValue; + ['visibility']: AttrValue; + ['word-spacing']: AttrValue; + ['writing-mode']: AttrValue; + } + interface SVGAnimateMotionElementAttributes extends GenericAttributes { + ['accumulate']: AttrValue; + ['additive']: AttrValue; + ['begin']: AttrValue; + ['by']: AttrValue; + ['calcMode']: AttrValue; + ['dur']: AttrValue; + ['end']: AttrValue; + ['externalResourcesRequired']: AttrValue; + ['fill']: AttrValue; + ['from']: AttrValue; + ['href']: AttrValue; + ['keyPoints']: AttrValue; + ['keySplines']: AttrValue; + ['keyTimes']: AttrValue; + ['max']: AttrValue; + ['min']: AttrValue; + ['origin']: AttrValue; + ['path']: AttrValue; + ['repeatCount']: AttrValue; + ['repeatDur']: AttrValue; + ['requiredExtensions']: AttrValue; + ['requiredFeatures']: AttrValue; + ['requiredFonts']: AttrValue; + ['requiredFormats']: AttrValue; + ['restart']: AttrValue; + ['rotate']: AttrValue; + ['systemLanguage']: AttrValue; + ['to']: AttrValue; + ['values']: AttrValue; + } + interface SVGAnimateTransformElementAttributes extends GenericAttributes { + ['accumulate']: AttrValue; + ['additive']: AttrValue; + ['attributeName']: AttrValue; + ['attributeType']: AttrValue; + ['begin']: AttrValue; + ['by']: AttrValue; + ['calcMode']: AttrValue; + ['dur']: AttrValue; + ['end']: AttrValue; + ['externalResourcesRequired']: AttrValue; + ['fill']: AttrValue; + ['from']: AttrValue; + ['href']: AttrValue; + ['keySplines']: AttrValue; + ['keyTimes']: AttrValue; + ['max']: AttrValue; + ['min']: AttrValue; + ['repeatCount']: AttrValue; + ['repeatDur']: AttrValue; + ['requiredExtensions']: AttrValue; + ['requiredFeatures']: AttrValue; + ['requiredFonts']: AttrValue; + ['requiredFormats']: AttrValue; + ['restart']: AttrValue; + ['systemLanguage']: AttrValue; + ['to']: AttrValue; + ['type']: AttrValue; + ['values']: AttrValue; + } + interface SVGCircleElementAttributes extends GenericAttributes { + ['alignment-baseline']: AttrValue; + ['baseline-shift']: AttrValue; + ['clip']: AttrValue; + ['clip-path']: AttrValue; + ['clip-rule']: AttrValue; + ['color']: AttrValue; + ['color-interpolation']: AttrValue; + ['color-interpolation-filters']: AttrValue; + ['color-profile']: AttrValue; + ['color-rendering']: AttrValue; + ['cursor']: AttrValue; + ['cx']: AttrValue; + ['cy']: AttrValue; + ['direction']: AttrValue; + ['display']: AttrValue; + ['dominant-baseline']: AttrValue; + ['enable-background']: AttrValue; + ['externalResourcesRequired']: AttrValue; + ['fill']: AttrValue; + ['fill-opacity']: AttrValue; + ['fill-rule']: AttrValue; + ['filter']: AttrValue; + ['flood-color']: AttrValue; + ['flood-opacity']: AttrValue; + ['focusHighlight']: AttrValue; + ['focusable']: AttrValue; + ['font-family']: AttrValue; + ['font-size']: AttrValue; + ['font-size-adjust']: AttrValue; + ['font-stretch']: AttrValue; + ['font-style']: AttrValue; + ['font-variant']: AttrValue; + ['font-weight']: AttrValue; + ['glyph-orientation-horizontal']: AttrValue; + ['glyph-orientation-vertical']: AttrValue; + ['image-rendering']: AttrValue; + ['kerning']: AttrValue; + ['letter-spacing']: AttrValue; + ['lighting-color']: AttrValue; + ['marker-end']: AttrValue; + ['marker-mid']: AttrValue; + ['marker-start']: AttrValue; + ['mask']: AttrValue; + ['nav-down']: AttrValue; + ['nav-down-left']: AttrValue; + ['nav-down-right']: AttrValue; + ['nav-left']: AttrValue; + ['nav-next']: AttrValue; + ['nav-prev']: AttrValue; + ['nav-right']: AttrValue; + ['nav-up']: AttrValue; + ['nav-up-left']: AttrValue; + ['nav-up-right']: AttrValue; + ['opacity']: AttrValue; + ['overflow']: AttrValue; + ['pathLength']: AttrValue; + ['pointer-events']: AttrValue; + ['r']: AttrValue; + ['requiredExtensions']: AttrValue; + ['requiredFeatures']: AttrValue; + ['requiredFonts']: AttrValue; + ['requiredFormats']: AttrValue; + ['shape-rendering']: AttrValue; + ['stop-color']: AttrValue; + ['stop-opacity']: AttrValue; + ['stroke']: AttrValue; + ['stroke-dasharray']: AttrValue; + ['stroke-dashoffset']: AttrValue; + ['stroke-linecap']: AttrValue; + ['stroke-linejoin']: AttrValue; + ['stroke-miterlimit']: AttrValue; + ['stroke-opacity']: AttrValue; + ['stroke-width']: AttrValue; + ['systemLanguage']: AttrValue; + ['text-anchor']: AttrValue; + ['text-decoration']: AttrValue; + ['text-rendering']: AttrValue; + ['transform']: AttrValue; + ['unicode-bidi']: AttrValue; + ['visibility']: AttrValue; + ['word-spacing']: AttrValue; + ['writing-mode']: AttrValue; + } + interface SVGClipPathElementAttributes extends GenericAttributes { + ['alignment-baseline']: AttrValue; + ['baseline-shift']: AttrValue; + ['clip']: AttrValue; + ['clip-path']: AttrValue; + ['clip-rule']: AttrValue; + ['clipPathUnits']: AttrValue; + ['color']: AttrValue; + ['color-interpolation']: AttrValue; + ['color-interpolation-filters']: AttrValue; + ['color-profile']: AttrValue; + ['color-rendering']: AttrValue; + ['cursor']: AttrValue; + ['direction']: AttrValue; + ['display']: AttrValue; + ['dominant-baseline']: AttrValue; + ['enable-background']: AttrValue; + ['externalResourcesRequired']: AttrValue; + ['fill']: AttrValue; + ['fill-opacity']: AttrValue; + ['fill-rule']: AttrValue; + ['filter']: AttrValue; + ['flood-color']: AttrValue; + ['flood-opacity']: AttrValue; + ['font-family']: AttrValue; + ['font-size']: AttrValue; + ['font-size-adjust']: AttrValue; + ['font-stretch']: AttrValue; + ['font-style']: AttrValue; + ['font-variant']: AttrValue; + ['font-weight']: AttrValue; + ['glyph-orientation-horizontal']: AttrValue; + ['glyph-orientation-vertical']: AttrValue; + ['image-rendering']: AttrValue; + ['kerning']: AttrValue; + ['letter-spacing']: AttrValue; + ['lighting-color']: AttrValue; + ['marker-end']: AttrValue; + ['marker-mid']: AttrValue; + ['marker-start']: AttrValue; + ['mask']: AttrValue; + ['opacity']: AttrValue; + ['overflow']: AttrValue; + ['pointer-events']: AttrValue; + ['requiredExtensions']: AttrValue; + ['requiredFeatures']: AttrValue; + ['shape-rendering']: AttrValue; + ['stop-color']: AttrValue; + ['stop-opacity']: AttrValue; + ['stroke']: AttrValue; + ['stroke-dasharray']: AttrValue; + ['stroke-dashoffset']: AttrValue; + ['stroke-linecap']: AttrValue; + ['stroke-linejoin']: AttrValue; + ['stroke-miterlimit']: AttrValue; + ['stroke-opacity']: AttrValue; + ['stroke-width']: AttrValue; + ['systemLanguage']: AttrValue; + ['text-anchor']: AttrValue; + ['text-decoration']: AttrValue; + ['text-rendering']: AttrValue; + ['transform']: AttrValue; + ['unicode-bidi']: AttrValue; + ['visibility']: AttrValue; + ['word-spacing']: AttrValue; + ['writing-mode']: AttrValue; + } + interface SVGDefsElementAttributes extends GenericAttributes { + ['alignment-baseline']: AttrValue; + ['baseline-shift']: AttrValue; + ['clip']: AttrValue; + ['clip-path']: AttrValue; + ['clip-rule']: AttrValue; + ['color']: AttrValue; + ['color-interpolation']: AttrValue; + ['color-interpolation-filters']: AttrValue; + ['color-profile']: AttrValue; + ['color-rendering']: AttrValue; + ['cursor']: AttrValue; + ['direction']: AttrValue; + ['display']: AttrValue; + ['dominant-baseline']: AttrValue; + ['enable-background']: AttrValue; + ['externalResourcesRequired']: AttrValue; + ['fill']: AttrValue; + ['fill-opacity']: AttrValue; + ['fill-rule']: AttrValue; + ['filter']: AttrValue; + ['flood-color']: AttrValue; + ['flood-opacity']: AttrValue; + ['font-family']: AttrValue; + ['font-size']: AttrValue; + ['font-size-adjust']: AttrValue; + ['font-stretch']: AttrValue; + ['font-style']: AttrValue; + ['font-variant']: AttrValue; + ['font-weight']: AttrValue; + ['glyph-orientation-horizontal']: AttrValue; + ['glyph-orientation-vertical']: AttrValue; + ['image-rendering']: AttrValue; + ['kerning']: AttrValue; + ['letter-spacing']: AttrValue; + ['lighting-color']: AttrValue; + ['marker-end']: AttrValue; + ['marker-mid']: AttrValue; + ['marker-start']: AttrValue; + ['mask']: AttrValue; + ['opacity']: AttrValue; + ['overflow']: AttrValue; + ['pointer-events']: AttrValue; + ['requiredExtensions']: AttrValue; + ['requiredFeatures']: AttrValue; + ['shape-rendering']: AttrValue; + ['stop-color']: AttrValue; + ['stop-opacity']: AttrValue; + ['stroke']: AttrValue; + ['stroke-dasharray']: AttrValue; + ['stroke-dashoffset']: AttrValue; + ['stroke-linecap']: AttrValue; + ['stroke-linejoin']: AttrValue; + ['stroke-miterlimit']: AttrValue; + ['stroke-opacity']: AttrValue; + ['stroke-width']: AttrValue; + ['systemLanguage']: AttrValue; + ['text-anchor']: AttrValue; + ['text-decoration']: AttrValue; + ['text-rendering']: AttrValue; + ['transform']: AttrValue; + ['unicode-bidi']: AttrValue; + ['visibility']: AttrValue; + ['word-spacing']: AttrValue; + ['writing-mode']: AttrValue; + } + interface SVGDescElementAttributes extends GenericAttributes { + ['requiredExtensions']: AttrValue; + ['requiredFeatures']: AttrValue; + ['requiredFonts']: AttrValue; + ['requiredFormats']: AttrValue; + ['systemLanguage']: AttrValue; + } + interface SVGEllipseElementAttributes extends GenericAttributes { + ['alignment-baseline']: AttrValue; + ['baseline-shift']: AttrValue; + ['clip']: AttrValue; + ['clip-path']: AttrValue; + ['clip-rule']: AttrValue; + ['color']: AttrValue; + ['color-interpolation']: AttrValue; + ['color-interpolation-filters']: AttrValue; + ['color-profile']: AttrValue; + ['color-rendering']: AttrValue; + ['cursor']: AttrValue; + ['cx']: AttrValue; + ['cy']: AttrValue; + ['direction']: AttrValue; + ['display']: AttrValue; + ['dominant-baseline']: AttrValue; + ['enable-background']: AttrValue; + ['externalResourcesRequired']: AttrValue; + ['fill']: AttrValue; + ['fill-opacity']: AttrValue; + ['fill-rule']: AttrValue; + ['filter']: AttrValue; + ['flood-color']: AttrValue; + ['flood-opacity']: AttrValue; + ['focusHighlight']: AttrValue; + ['focusable']: AttrValue; + ['font-family']: AttrValue; + ['font-size']: AttrValue; + ['font-size-adjust']: AttrValue; + ['font-stretch']: AttrValue; + ['font-style']: AttrValue; + ['font-variant']: AttrValue; + ['font-weight']: AttrValue; + ['glyph-orientation-horizontal']: AttrValue; + ['glyph-orientation-vertical']: AttrValue; + ['image-rendering']: AttrValue; + ['kerning']: AttrValue; + ['letter-spacing']: AttrValue; + ['lighting-color']: AttrValue; + ['marker-end']: AttrValue; + ['marker-mid']: AttrValue; + ['marker-start']: AttrValue; + ['mask']: AttrValue; + ['nav-down']: AttrValue; + ['nav-down-left']: AttrValue; + ['nav-down-right']: AttrValue; + ['nav-left']: AttrValue; + ['nav-next']: AttrValue; + ['nav-prev']: AttrValue; + ['nav-right']: AttrValue; + ['nav-up']: AttrValue; + ['nav-up-left']: AttrValue; + ['nav-up-right']: AttrValue; + ['opacity']: AttrValue; + ['overflow']: AttrValue; + ['pathLength']: AttrValue; + ['pointer-events']: AttrValue; + ['requiredExtensions']: AttrValue; + ['requiredFeatures']: AttrValue; + ['requiredFonts']: AttrValue; + ['requiredFormats']: AttrValue; + ['rx']: AttrValue; + ['ry']: AttrValue; + ['shape-rendering']: AttrValue; + ['stop-color']: AttrValue; + ['stop-opacity']: AttrValue; + ['stroke']: AttrValue; + ['stroke-dasharray']: AttrValue; + ['stroke-dashoffset']: AttrValue; + ['stroke-linecap']: AttrValue; + ['stroke-linejoin']: AttrValue; + ['stroke-miterlimit']: AttrValue; + ['stroke-opacity']: AttrValue; + ['stroke-width']: AttrValue; + ['systemLanguage']: AttrValue; + ['text-anchor']: AttrValue; + ['text-decoration']: AttrValue; + ['text-rendering']: AttrValue; + ['transform']: AttrValue; + ['unicode-bidi']: AttrValue; + ['visibility']: AttrValue; + ['word-spacing']: AttrValue; + ['writing-mode']: AttrValue; + } + interface SVGFEBlendElementAttributes extends GenericAttributes { + ['alignment-baseline']: AttrValue; + ['baseline-shift']: AttrValue; + ['clip']: AttrValue; + ['clip-path']: AttrValue; + ['clip-rule']: AttrValue; + ['color']: AttrValue; + ['color-interpolation']: AttrValue; + ['color-interpolation-filters']: AttrValue; + ['color-profile']: AttrValue; + ['color-rendering']: AttrValue; + ['cursor']: AttrValue; + ['direction']: AttrValue; + ['display']: AttrValue; + ['dominant-baseline']: AttrValue; + ['enable-background']: AttrValue; + ['fill']: AttrValue; + ['fill-opacity']: AttrValue; + ['fill-rule']: AttrValue; + ['filter']: AttrValue; + ['flood-color']: AttrValue; + ['flood-opacity']: AttrValue; + ['font-family']: AttrValue; + ['font-size']: AttrValue; + ['font-size-adjust']: AttrValue; + ['font-stretch']: AttrValue; + ['font-style']: AttrValue; + ['font-variant']: AttrValue; + ['font-weight']: AttrValue; + ['glyph-orientation-horizontal']: AttrValue; + ['glyph-orientation-vertical']: AttrValue; + ['height']: AttrValue; + ['image-rendering']: AttrValue; + ['in']: AttrValue; + ['in2']: AttrValue; + ['kerning']: AttrValue; + ['letter-spacing']: AttrValue; + ['lighting-color']: AttrValue; + ['marker-end']: AttrValue; + ['marker-mid']: AttrValue; + ['marker-start']: AttrValue; + ['mask']: AttrValue; + ['mode']: AttrValue; + ['opacity']: AttrValue; + ['overflow']: AttrValue; + ['pointer-events']: AttrValue; + ['result']: AttrValue; + ['shape-rendering']: AttrValue; + ['stop-color']: AttrValue; + ['stop-opacity']: AttrValue; + ['stroke']: AttrValue; + ['stroke-dasharray']: AttrValue; + ['stroke-dashoffset']: AttrValue; + ['stroke-linecap']: AttrValue; + ['stroke-linejoin']: AttrValue; + ['stroke-miterlimit']: AttrValue; + ['stroke-opacity']: AttrValue; + ['stroke-width']: AttrValue; + ['text-anchor']: AttrValue; + ['text-decoration']: AttrValue; + ['text-rendering']: AttrValue; + ['unicode-bidi']: AttrValue; + ['visibility']: AttrValue; + ['width']: AttrValue; + ['word-spacing']: AttrValue; + ['writing-mode']: AttrValue; + ['x']: AttrValue; + ['y']: AttrValue; + } + interface SVGFEColorMatrixElementAttributes extends GenericAttributes { + ['alignment-baseline']: AttrValue; + ['baseline-shift']: AttrValue; + ['clip']: AttrValue; + ['clip-path']: AttrValue; + ['clip-rule']: AttrValue; + ['color']: AttrValue; + ['color-interpolation']: AttrValue; + ['color-interpolation-filters']: AttrValue; + ['color-profile']: AttrValue; + ['color-rendering']: AttrValue; + ['cursor']: AttrValue; + ['direction']: AttrValue; + ['display']: AttrValue; + ['dominant-baseline']: AttrValue; + ['enable-background']: AttrValue; + ['fill']: AttrValue; + ['fill-opacity']: AttrValue; + ['fill-rule']: AttrValue; + ['filter']: AttrValue; + ['flood-color']: AttrValue; + ['flood-opacity']: AttrValue; + ['font-family']: AttrValue; + ['font-size']: AttrValue; + ['font-size-adjust']: AttrValue; + ['font-stretch']: AttrValue; + ['font-style']: AttrValue; + ['font-variant']: AttrValue; + ['font-weight']: AttrValue; + ['glyph-orientation-horizontal']: AttrValue; + ['glyph-orientation-vertical']: AttrValue; + ['height']: AttrValue; + ['image-rendering']: AttrValue; + ['in']: AttrValue; + ['kerning']: AttrValue; + ['letter-spacing']: AttrValue; + ['lighting-color']: AttrValue; + ['marker-end']: AttrValue; + ['marker-mid']: AttrValue; + ['marker-start']: AttrValue; + ['mask']: AttrValue; + ['opacity']: AttrValue; + ['overflow']: AttrValue; + ['pointer-events']: AttrValue; + ['result']: AttrValue; + ['shape-rendering']: AttrValue; + ['stop-color']: AttrValue; + ['stop-opacity']: AttrValue; + ['stroke']: AttrValue; + ['stroke-dasharray']: AttrValue; + ['stroke-dashoffset']: AttrValue; + ['stroke-linecap']: AttrValue; + ['stroke-linejoin']: AttrValue; + ['stroke-miterlimit']: AttrValue; + ['stroke-opacity']: AttrValue; + ['stroke-width']: AttrValue; + ['text-anchor']: AttrValue; + ['text-decoration']: AttrValue; + ['text-rendering']: AttrValue; + ['type']: AttrValue; + ['unicode-bidi']: AttrValue; + ['values']: AttrValue; + ['visibility']: AttrValue; + ['width']: AttrValue; + ['word-spacing']: AttrValue; + ['writing-mode']: AttrValue; + ['x']: AttrValue; + ['y']: AttrValue; + } + interface SVGFEComponentTransferElementAttributes extends GenericAttributes { + ['alignment-baseline']: AttrValue; + ['baseline-shift']: AttrValue; + ['clip']: AttrValue; + ['clip-path']: AttrValue; + ['clip-rule']: AttrValue; + ['color']: AttrValue; + ['color-interpolation']: AttrValue; + ['color-interpolation-filters']: AttrValue; + ['color-profile']: AttrValue; + ['color-rendering']: AttrValue; + ['cursor']: AttrValue; + ['direction']: AttrValue; + ['display']: AttrValue; + ['dominant-baseline']: AttrValue; + ['enable-background']: AttrValue; + ['fill']: AttrValue; + ['fill-opacity']: AttrValue; + ['fill-rule']: AttrValue; + ['filter']: AttrValue; + ['flood-color']: AttrValue; + ['flood-opacity']: AttrValue; + ['font-family']: AttrValue; + ['font-size']: AttrValue; + ['font-size-adjust']: AttrValue; + ['font-stretch']: AttrValue; + ['font-style']: AttrValue; + ['font-variant']: AttrValue; + ['font-weight']: AttrValue; + ['glyph-orientation-horizontal']: AttrValue; + ['glyph-orientation-vertical']: AttrValue; + ['height']: AttrValue; + ['image-rendering']: AttrValue; + ['in']: AttrValue; + ['kerning']: AttrValue; + ['letter-spacing']: AttrValue; + ['lighting-color']: AttrValue; + ['marker-end']: AttrValue; + ['marker-mid']: AttrValue; + ['marker-start']: AttrValue; + ['mask']: AttrValue; + ['opacity']: AttrValue; + ['overflow']: AttrValue; + ['pointer-events']: AttrValue; + ['result']: AttrValue; + ['shape-rendering']: AttrValue; + ['stop-color']: AttrValue; + ['stop-opacity']: AttrValue; + ['stroke']: AttrValue; + ['stroke-dasharray']: AttrValue; + ['stroke-dashoffset']: AttrValue; + ['stroke-linecap']: AttrValue; + ['stroke-linejoin']: AttrValue; + ['stroke-miterlimit']: AttrValue; + ['stroke-opacity']: AttrValue; + ['stroke-width']: AttrValue; + ['text-anchor']: AttrValue; + ['text-decoration']: AttrValue; + ['text-rendering']: AttrValue; + ['unicode-bidi']: AttrValue; + ['visibility']: AttrValue; + ['width']: AttrValue; + ['word-spacing']: AttrValue; + ['writing-mode']: AttrValue; + ['x']: AttrValue; + ['y']: AttrValue; + } + interface SVGFECompositeElementAttributes extends GenericAttributes { + ['alignment-baseline']: AttrValue; + ['baseline-shift']: AttrValue; + ['clip']: AttrValue; + ['clip-path']: AttrValue; + ['clip-rule']: AttrValue; + ['color']: AttrValue; + ['color-interpolation']: AttrValue; + ['color-interpolation-filters']: AttrValue; + ['color-profile']: AttrValue; + ['color-rendering']: AttrValue; + ['cursor']: AttrValue; + ['direction']: AttrValue; + ['display']: AttrValue; + ['dominant-baseline']: AttrValue; + ['enable-background']: AttrValue; + ['fill']: AttrValue; + ['fill-opacity']: AttrValue; + ['fill-rule']: AttrValue; + ['filter']: AttrValue; + ['flood-color']: AttrValue; + ['flood-opacity']: AttrValue; + ['font-family']: AttrValue; + ['font-size']: AttrValue; + ['font-size-adjust']: AttrValue; + ['font-stretch']: AttrValue; + ['font-style']: AttrValue; + ['font-variant']: AttrValue; + ['font-weight']: AttrValue; + ['glyph-orientation-horizontal']: AttrValue; + ['glyph-orientation-vertical']: AttrValue; + ['height']: AttrValue; + ['image-rendering']: AttrValue; + ['in']: AttrValue; + ['in2']: AttrValue; + ['k1']: AttrValue; + ['k2']: AttrValue; + ['k3']: AttrValue; + ['k4']: AttrValue; + ['kerning']: AttrValue; + ['letter-spacing']: AttrValue; + ['lighting-color']: AttrValue; + ['marker-end']: AttrValue; + ['marker-mid']: AttrValue; + ['marker-start']: AttrValue; + ['mask']: AttrValue; + ['opacity']: AttrValue; + ['operator']: AttrValue; + ['overflow']: AttrValue; + ['pointer-events']: AttrValue; + ['result']: AttrValue; + ['shape-rendering']: AttrValue; + ['stop-color']: AttrValue; + ['stop-opacity']: AttrValue; + ['stroke']: AttrValue; + ['stroke-dasharray']: AttrValue; + ['stroke-dashoffset']: AttrValue; + ['stroke-linecap']: AttrValue; + ['stroke-linejoin']: AttrValue; + ['stroke-miterlimit']: AttrValue; + ['stroke-opacity']: AttrValue; + ['stroke-width']: AttrValue; + ['text-anchor']: AttrValue; + ['text-decoration']: AttrValue; + ['text-rendering']: AttrValue; + ['unicode-bidi']: AttrValue; + ['visibility']: AttrValue; + ['width']: AttrValue; + ['word-spacing']: AttrValue; + ['writing-mode']: AttrValue; + ['x']: AttrValue; + ['y']: AttrValue; + } + interface SVGFEConvolveMatrixElementAttributes extends GenericAttributes { + ['alignment-baseline']: AttrValue; + ['baseline-shift']: AttrValue; + ['bias']: AttrValue; + ['clip']: AttrValue; + ['clip-path']: AttrValue; + ['clip-rule']: AttrValue; + ['color']: AttrValue; + ['color-interpolation']: AttrValue; + ['color-interpolation-filters']: AttrValue; + ['color-profile']: AttrValue; + ['color-rendering']: AttrValue; + ['cursor']: AttrValue; + ['direction']: AttrValue; + ['display']: AttrValue; + ['divisor']: AttrValue; + ['dominant-baseline']: AttrValue; + ['edgeMode']: AttrValue; + ['enable-background']: AttrValue; + ['fill']: AttrValue; + ['fill-opacity']: AttrValue; + ['fill-rule']: AttrValue; + ['filter']: AttrValue; + ['flood-color']: AttrValue; + ['flood-opacity']: AttrValue; + ['font-family']: AttrValue; + ['font-size']: AttrValue; + ['font-size-adjust']: AttrValue; + ['font-stretch']: AttrValue; + ['font-style']: AttrValue; + ['font-variant']: AttrValue; + ['font-weight']: AttrValue; + ['glyph-orientation-horizontal']: AttrValue; + ['glyph-orientation-vertical']: AttrValue; + ['height']: AttrValue; + ['image-rendering']: AttrValue; + ['in']: AttrValue; + ['kernelMatrix']: AttrValue; + ['kernelUnitLength']: AttrValue; + ['kerning']: AttrValue; + ['letter-spacing']: AttrValue; + ['lighting-color']: AttrValue; + ['marker-end']: AttrValue; + ['marker-mid']: AttrValue; + ['marker-start']: AttrValue; + ['mask']: AttrValue; + ['opacity']: AttrValue; + ['order']: AttrValue; + ['overflow']: AttrValue; + ['pointer-events']: AttrValue; + ['preserveAlpha']: AttrValue; + ['result']: AttrValue; + ['shape-rendering']: AttrValue; + ['stop-color']: AttrValue; + ['stop-opacity']: AttrValue; + ['stroke']: AttrValue; + ['stroke-dasharray']: AttrValue; + ['stroke-dashoffset']: AttrValue; + ['stroke-linecap']: AttrValue; + ['stroke-linejoin']: AttrValue; + ['stroke-miterlimit']: AttrValue; + ['stroke-opacity']: AttrValue; + ['stroke-width']: AttrValue; + ['targetX']: AttrValue; + ['targetY']: AttrValue; + ['text-anchor']: AttrValue; + ['text-decoration']: AttrValue; + ['text-rendering']: AttrValue; + ['unicode-bidi']: AttrValue; + ['visibility']: AttrValue; + ['width']: AttrValue; + ['word-spacing']: AttrValue; + ['writing-mode']: AttrValue; + ['x']: AttrValue; + ['y']: AttrValue; + } + interface SVGFEDiffuseLightingElementAttributes extends GenericAttributes { + ['alignment-baseline']: AttrValue; + ['baseline-shift']: AttrValue; + ['clip']: AttrValue; + ['clip-path']: AttrValue; + ['clip-rule']: AttrValue; + ['color']: AttrValue; + ['color-interpolation']: AttrValue; + ['color-interpolation-filters']: AttrValue; + ['color-profile']: AttrValue; + ['color-rendering']: AttrValue; + ['cursor']: AttrValue; + ['diffuseConstant']: AttrValue; + ['direction']: AttrValue; + ['display']: AttrValue; + ['dominant-baseline']: AttrValue; + ['enable-background']: AttrValue; + ['fill']: AttrValue; + ['fill-opacity']: AttrValue; + ['fill-rule']: AttrValue; + ['filter']: AttrValue; + ['flood-color']: AttrValue; + ['flood-opacity']: AttrValue; + ['font-family']: AttrValue; + ['font-size']: AttrValue; + ['font-size-adjust']: AttrValue; + ['font-stretch']: AttrValue; + ['font-style']: AttrValue; + ['font-variant']: AttrValue; + ['font-weight']: AttrValue; + ['glyph-orientation-horizontal']: AttrValue; + ['glyph-orientation-vertical']: AttrValue; + ['height']: AttrValue; + ['image-rendering']: AttrValue; + ['in']: AttrValue; + ['kernelUnitLength']: AttrValue; + ['kerning']: AttrValue; + ['letter-spacing']: AttrValue; + ['lighting-color']: AttrValue; + ['marker-end']: AttrValue; + ['marker-mid']: AttrValue; + ['marker-start']: AttrValue; + ['mask']: AttrValue; + ['opacity']: AttrValue; + ['overflow']: AttrValue; + ['pointer-events']: AttrValue; + ['result']: AttrValue; + ['shape-rendering']: AttrValue; + ['stop-color']: AttrValue; + ['stop-opacity']: AttrValue; + ['stroke']: AttrValue; + ['stroke-dasharray']: AttrValue; + ['stroke-dashoffset']: AttrValue; + ['stroke-linecap']: AttrValue; + ['stroke-linejoin']: AttrValue; + ['stroke-miterlimit']: AttrValue; + ['stroke-opacity']: AttrValue; + ['stroke-width']: AttrValue; + ['surfaceScale']: AttrValue; + ['text-anchor']: AttrValue; + ['text-decoration']: AttrValue; + ['text-rendering']: AttrValue; + ['unicode-bidi']: AttrValue; + ['visibility']: AttrValue; + ['width']: AttrValue; + ['word-spacing']: AttrValue; + ['writing-mode']: AttrValue; + ['x']: AttrValue; + ['y']: AttrValue; + } + interface SVGFEDisplacementMapElementAttributes extends GenericAttributes { + ['alignment-baseline']: AttrValue; + ['baseline-shift']: AttrValue; + ['clip']: AttrValue; + ['clip-path']: AttrValue; + ['clip-rule']: AttrValue; + ['color']: AttrValue; + ['color-interpolation']: AttrValue; + ['color-interpolation-filters']: AttrValue; + ['color-profile']: AttrValue; + ['color-rendering']: AttrValue; + ['cursor']: AttrValue; + ['direction']: AttrValue; + ['display']: AttrValue; + ['dominant-baseline']: AttrValue; + ['enable-background']: AttrValue; + ['fill']: AttrValue; + ['fill-opacity']: AttrValue; + ['fill-rule']: AttrValue; + ['filter']: AttrValue; + ['flood-color']: AttrValue; + ['flood-opacity']: AttrValue; + ['font-family']: AttrValue; + ['font-size']: AttrValue; + ['font-size-adjust']: AttrValue; + ['font-stretch']: AttrValue; + ['font-style']: AttrValue; + ['font-variant']: AttrValue; + ['font-weight']: AttrValue; + ['glyph-orientation-horizontal']: AttrValue; + ['glyph-orientation-vertical']: AttrValue; + ['height']: AttrValue; + ['image-rendering']: AttrValue; + ['in']: AttrValue; + ['in2']: AttrValue; + ['kerning']: AttrValue; + ['letter-spacing']: AttrValue; + ['lighting-color']: AttrValue; + ['marker-end']: AttrValue; + ['marker-mid']: AttrValue; + ['marker-start']: AttrValue; + ['mask']: AttrValue; + ['opacity']: AttrValue; + ['overflow']: AttrValue; + ['pointer-events']: AttrValue; + ['result']: AttrValue; + ['scale']: AttrValue; + ['shape-rendering']: AttrValue; + ['stop-color']: AttrValue; + ['stop-opacity']: AttrValue; + ['stroke']: AttrValue; + ['stroke-dasharray']: AttrValue; + ['stroke-dashoffset']: AttrValue; + ['stroke-linecap']: AttrValue; + ['stroke-linejoin']: AttrValue; + ['stroke-miterlimit']: AttrValue; + ['stroke-opacity']: AttrValue; + ['stroke-width']: AttrValue; + ['text-anchor']: AttrValue; + ['text-decoration']: AttrValue; + ['text-rendering']: AttrValue; + ['unicode-bidi']: AttrValue; + ['visibility']: AttrValue; + ['width']: AttrValue; + ['word-spacing']: AttrValue; + ['writing-mode']: AttrValue; + ['x']: AttrValue; + ['xChannelSelector']: AttrValue; + ['y']: AttrValue; + ['yChannelSelector']: AttrValue; + } + interface SVGFEDistantLightElementAttributes extends GenericAttributes { + ['azimuth']: AttrValue; + ['elevation']: AttrValue; + } + interface SVGFEDropShadowElementAttributes extends GenericAttributes { + ['dx']: AttrValue; + ['dy']: AttrValue; + ['height']: AttrValue; + ['in']: AttrValue; + ['result']: AttrValue; + ['stdDeviation']: AttrValue; + ['width']: AttrValue; + ['x']: AttrValue; + ['y']: AttrValue; + } + interface SVGFEFloodElementAttributes extends GenericAttributes { + ['alignment-baseline']: AttrValue; + ['baseline-shift']: AttrValue; + ['clip']: AttrValue; + ['clip-path']: AttrValue; + ['clip-rule']: AttrValue; + ['color']: AttrValue; + ['color-interpolation']: AttrValue; + ['color-interpolation-filters']: AttrValue; + ['color-profile']: AttrValue; + ['color-rendering']: AttrValue; + ['cursor']: AttrValue; + ['direction']: AttrValue; + ['display']: AttrValue; + ['dominant-baseline']: AttrValue; + ['enable-background']: AttrValue; + ['fill']: AttrValue; + ['fill-opacity']: AttrValue; + ['fill-rule']: AttrValue; + ['filter']: AttrValue; + ['flood-color']: AttrValue; + ['flood-opacity']: AttrValue; + ['font-family']: AttrValue; + ['font-size']: AttrValue; + ['font-size-adjust']: AttrValue; + ['font-stretch']: AttrValue; + ['font-style']: AttrValue; + ['font-variant']: AttrValue; + ['font-weight']: AttrValue; + ['glyph-orientation-horizontal']: AttrValue; + ['glyph-orientation-vertical']: AttrValue; + ['height']: AttrValue; + ['image-rendering']: AttrValue; + ['kerning']: AttrValue; + ['letter-spacing']: AttrValue; + ['lighting-color']: AttrValue; + ['marker-end']: AttrValue; + ['marker-mid']: AttrValue; + ['marker-start']: AttrValue; + ['mask']: AttrValue; + ['opacity']: AttrValue; + ['overflow']: AttrValue; + ['pointer-events']: AttrValue; + ['result']: AttrValue; + ['shape-rendering']: AttrValue; + ['stop-color']: AttrValue; + ['stop-opacity']: AttrValue; + ['stroke']: AttrValue; + ['stroke-dasharray']: AttrValue; + ['stroke-dashoffset']: AttrValue; + ['stroke-linecap']: AttrValue; + ['stroke-linejoin']: AttrValue; + ['stroke-miterlimit']: AttrValue; + ['stroke-opacity']: AttrValue; + ['stroke-width']: AttrValue; + ['text-anchor']: AttrValue; + ['text-decoration']: AttrValue; + ['text-rendering']: AttrValue; + ['unicode-bidi']: AttrValue; + ['visibility']: AttrValue; + ['width']: AttrValue; + ['word-spacing']: AttrValue; + ['writing-mode']: AttrValue; + ['x']: AttrValue; + ['y']: AttrValue; + } + interface SVGFEFuncAElementAttributes extends GenericAttributes { + ['amplitude']: AttrValue; + ['exponent']: AttrValue; + ['intercept']: AttrValue; + ['offset']: AttrValue; + ['slope']: AttrValue; + ['tableValues']: AttrValue; + ['type']: AttrValue; + } + interface SVGFEFuncBElementAttributes extends GenericAttributes { + ['amplitude']: AttrValue; + ['exponent']: AttrValue; + ['intercept']: AttrValue; + ['offset']: AttrValue; + ['slope']: AttrValue; + ['tableValues']: AttrValue; + ['type']: AttrValue; + } + interface SVGFEFuncGElementAttributes extends GenericAttributes { + ['amplitude']: AttrValue; + ['exponent']: AttrValue; + ['intercept']: AttrValue; + ['offset']: AttrValue; + ['slope']: AttrValue; + ['tableValues']: AttrValue; + ['type']: AttrValue; + } + interface SVGFEFuncRElementAttributes extends GenericAttributes { + ['amplitude']: AttrValue; + ['exponent']: AttrValue; + ['intercept']: AttrValue; + ['offset']: AttrValue; + ['slope']: AttrValue; + ['tableValues']: AttrValue; + ['type']: AttrValue; + } + interface SVGFEGaussianBlurElementAttributes extends GenericAttributes { + ['alignment-baseline']: AttrValue; + ['baseline-shift']: AttrValue; + ['clip']: AttrValue; + ['clip-path']: AttrValue; + ['clip-rule']: AttrValue; + ['color']: AttrValue; + ['color-interpolation']: AttrValue; + ['color-interpolation-filters']: AttrValue; + ['color-profile']: AttrValue; + ['color-rendering']: AttrValue; + ['cursor']: AttrValue; + ['direction']: AttrValue; + ['display']: AttrValue; + ['dominant-baseline']: AttrValue; + ['edgeMode']: AttrValue; + ['enable-background']: AttrValue; + ['fill']: AttrValue; + ['fill-opacity']: AttrValue; + ['fill-rule']: AttrValue; + ['filter']: AttrValue; + ['flood-color']: AttrValue; + ['flood-opacity']: AttrValue; + ['font-family']: AttrValue; + ['font-size']: AttrValue; + ['font-size-adjust']: AttrValue; + ['font-stretch']: AttrValue; + ['font-style']: AttrValue; + ['font-variant']: AttrValue; + ['font-weight']: AttrValue; + ['glyph-orientation-horizontal']: AttrValue; + ['glyph-orientation-vertical']: AttrValue; + ['height']: AttrValue; + ['image-rendering']: AttrValue; + ['in']: AttrValue; + ['kerning']: AttrValue; + ['letter-spacing']: AttrValue; + ['lighting-color']: AttrValue; + ['marker-end']: AttrValue; + ['marker-mid']: AttrValue; + ['marker-start']: AttrValue; + ['mask']: AttrValue; + ['opacity']: AttrValue; + ['overflow']: AttrValue; + ['pointer-events']: AttrValue; + ['result']: AttrValue; + ['shape-rendering']: AttrValue; + ['stdDeviation']: AttrValue; + ['stop-color']: AttrValue; + ['stop-opacity']: AttrValue; + ['stroke']: AttrValue; + ['stroke-dasharray']: AttrValue; + ['stroke-dashoffset']: AttrValue; + ['stroke-linecap']: AttrValue; + ['stroke-linejoin']: AttrValue; + ['stroke-miterlimit']: AttrValue; + ['stroke-opacity']: AttrValue; + ['stroke-width']: AttrValue; + ['text-anchor']: AttrValue; + ['text-decoration']: AttrValue; + ['text-rendering']: AttrValue; + ['unicode-bidi']: AttrValue; + ['visibility']: AttrValue; + ['width']: AttrValue; + ['word-spacing']: AttrValue; + ['writing-mode']: AttrValue; + ['x']: AttrValue; + ['y']: AttrValue; + } + interface SVGFEImageElementAttributes extends GenericAttributes { + ['alignment-baseline']: AttrValue; + ['baseline-shift']: AttrValue; + ['clip']: AttrValue; + ['clip-path']: AttrValue; + ['clip-rule']: AttrValue; + ['color']: AttrValue; + ['color-interpolation']: AttrValue; + ['color-interpolation-filters']: AttrValue; + ['color-profile']: AttrValue; + ['color-rendering']: AttrValue; + ['crossorigin']: AttrValue; + ['cursor']: AttrValue; + ['direction']: AttrValue; + ['display']: AttrValue; + ['dominant-baseline']: AttrValue; + ['enable-background']: AttrValue; + ['externalResourcesRequired']: AttrValue; + ['fill']: AttrValue; + ['fill-opacity']: AttrValue; + ['fill-rule']: AttrValue; + ['filter']: AttrValue; + ['flood-color']: AttrValue; + ['flood-opacity']: AttrValue; + ['font-family']: AttrValue; + ['font-size']: AttrValue; + ['font-size-adjust']: AttrValue; + ['font-stretch']: AttrValue; + ['font-style']: AttrValue; + ['font-variant']: AttrValue; + ['font-weight']: AttrValue; + ['glyph-orientation-horizontal']: AttrValue; + ['glyph-orientation-vertical']: AttrValue; + ['height']: AttrValue; + ['href']: AttrValue; + ['image-rendering']: AttrValue; + ['kerning']: AttrValue; + ['letter-spacing']: AttrValue; + ['lighting-color']: AttrValue; + ['marker-end']: AttrValue; + ['marker-mid']: AttrValue; + ['marker-start']: AttrValue; + ['mask']: AttrValue; + ['opacity']: AttrValue; + ['overflow']: AttrValue; + ['pointer-events']: AttrValue; + ['preserveAspectRatio']: AttrValue; + ['result']: AttrValue; + ['shape-rendering']: AttrValue; + ['stop-color']: AttrValue; + ['stop-opacity']: AttrValue; + ['stroke']: AttrValue; + ['stroke-dasharray']: AttrValue; + ['stroke-dashoffset']: AttrValue; + ['stroke-linecap']: AttrValue; + ['stroke-linejoin']: AttrValue; + ['stroke-miterlimit']: AttrValue; + ['stroke-opacity']: AttrValue; + ['stroke-width']: AttrValue; + ['text-anchor']: AttrValue; + ['text-decoration']: AttrValue; + ['text-rendering']: AttrValue; + ['unicode-bidi']: AttrValue; + ['visibility']: AttrValue; + ['width']: AttrValue; + ['word-spacing']: AttrValue; + ['writing-mode']: AttrValue; + ['x']: AttrValue; + ['y']: AttrValue; + } + interface SVGFEMergeElementAttributes extends GenericAttributes { + ['alignment-baseline']: AttrValue; + ['baseline-shift']: AttrValue; + ['clip']: AttrValue; + ['clip-path']: AttrValue; + ['clip-rule']: AttrValue; + ['color']: AttrValue; + ['color-interpolation']: AttrValue; + ['color-interpolation-filters']: AttrValue; + ['color-profile']: AttrValue; + ['color-rendering']: AttrValue; + ['cursor']: AttrValue; + ['direction']: AttrValue; + ['display']: AttrValue; + ['dominant-baseline']: AttrValue; + ['enable-background']: AttrValue; + ['fill']: AttrValue; + ['fill-opacity']: AttrValue; + ['fill-rule']: AttrValue; + ['filter']: AttrValue; + ['flood-color']: AttrValue; + ['flood-opacity']: AttrValue; + ['font-family']: AttrValue; + ['font-size']: AttrValue; + ['font-size-adjust']: AttrValue; + ['font-stretch']: AttrValue; + ['font-style']: AttrValue; + ['font-variant']: AttrValue; + ['font-weight']: AttrValue; + ['glyph-orientation-horizontal']: AttrValue; + ['glyph-orientation-vertical']: AttrValue; + ['height']: AttrValue; + ['image-rendering']: AttrValue; + ['kerning']: AttrValue; + ['letter-spacing']: AttrValue; + ['lighting-color']: AttrValue; + ['marker-end']: AttrValue; + ['marker-mid']: AttrValue; + ['marker-start']: AttrValue; + ['mask']: AttrValue; + ['opacity']: AttrValue; + ['overflow']: AttrValue; + ['pointer-events']: AttrValue; + ['result']: AttrValue; + ['shape-rendering']: AttrValue; + ['stop-color']: AttrValue; + ['stop-opacity']: AttrValue; + ['stroke']: AttrValue; + ['stroke-dasharray']: AttrValue; + ['stroke-dashoffset']: AttrValue; + ['stroke-linecap']: AttrValue; + ['stroke-linejoin']: AttrValue; + ['stroke-miterlimit']: AttrValue; + ['stroke-opacity']: AttrValue; + ['stroke-width']: AttrValue; + ['text-anchor']: AttrValue; + ['text-decoration']: AttrValue; + ['text-rendering']: AttrValue; + ['unicode-bidi']: AttrValue; + ['visibility']: AttrValue; + ['width']: AttrValue; + ['word-spacing']: AttrValue; + ['writing-mode']: AttrValue; + ['x']: AttrValue; + ['y']: AttrValue; + } + interface SVGFEMergeNodeElementAttributes extends GenericAttributes { + ['in']: AttrValue; + } + interface SVGFEMorphologyElementAttributes extends GenericAttributes { + ['alignment-baseline']: AttrValue; + ['baseline-shift']: AttrValue; + ['clip']: AttrValue; + ['clip-path']: AttrValue; + ['clip-rule']: AttrValue; + ['color']: AttrValue; + ['color-interpolation']: AttrValue; + ['color-interpolation-filters']: AttrValue; + ['color-profile']: AttrValue; + ['color-rendering']: AttrValue; + ['cursor']: AttrValue; + ['direction']: AttrValue; + ['display']: AttrValue; + ['dominant-baseline']: AttrValue; + ['enable-background']: AttrValue; + ['fill']: AttrValue; + ['fill-opacity']: AttrValue; + ['fill-rule']: AttrValue; + ['filter']: AttrValue; + ['flood-color']: AttrValue; + ['flood-opacity']: AttrValue; + ['font-family']: AttrValue; + ['font-size']: AttrValue; + ['font-size-adjust']: AttrValue; + ['font-stretch']: AttrValue; + ['font-style']: AttrValue; + ['font-variant']: AttrValue; + ['font-weight']: AttrValue; + ['glyph-orientation-horizontal']: AttrValue; + ['glyph-orientation-vertical']: AttrValue; + ['height']: AttrValue; + ['image-rendering']: AttrValue; + ['in']: AttrValue; + ['kerning']: AttrValue; + ['letter-spacing']: AttrValue; + ['lighting-color']: AttrValue; + ['marker-end']: AttrValue; + ['marker-mid']: AttrValue; + ['marker-start']: AttrValue; + ['mask']: AttrValue; + ['opacity']: AttrValue; + ['operator']: AttrValue; + ['overflow']: AttrValue; + ['pointer-events']: AttrValue; + ['radius']: AttrValue; + ['result']: AttrValue; + ['shape-rendering']: AttrValue; + ['stop-color']: AttrValue; + ['stop-opacity']: AttrValue; + ['stroke']: AttrValue; + ['stroke-dasharray']: AttrValue; + ['stroke-dashoffset']: AttrValue; + ['stroke-linecap']: AttrValue; + ['stroke-linejoin']: AttrValue; + ['stroke-miterlimit']: AttrValue; + ['stroke-opacity']: AttrValue; + ['stroke-width']: AttrValue; + ['text-anchor']: AttrValue; + ['text-decoration']: AttrValue; + ['text-rendering']: AttrValue; + ['unicode-bidi']: AttrValue; + ['visibility']: AttrValue; + ['width']: AttrValue; + ['word-spacing']: AttrValue; + ['writing-mode']: AttrValue; + ['x']: AttrValue; + ['y']: AttrValue; + } + interface SVGFEOffsetElementAttributes extends GenericAttributes { + ['alignment-baseline']: AttrValue; + ['baseline-shift']: AttrValue; + ['clip']: AttrValue; + ['clip-path']: AttrValue; + ['clip-rule']: AttrValue; + ['color']: AttrValue; + ['color-interpolation']: AttrValue; + ['color-interpolation-filters']: AttrValue; + ['color-profile']: AttrValue; + ['color-rendering']: AttrValue; + ['cursor']: AttrValue; + ['direction']: AttrValue; + ['display']: AttrValue; + ['dominant-baseline']: AttrValue; + ['dx']: AttrValue; + ['dy']: AttrValue; + ['enable-background']: AttrValue; + ['fill']: AttrValue; + ['fill-opacity']: AttrValue; + ['fill-rule']: AttrValue; + ['filter']: AttrValue; + ['flood-color']: AttrValue; + ['flood-opacity']: AttrValue; + ['font-family']: AttrValue; + ['font-size']: AttrValue; + ['font-size-adjust']: AttrValue; + ['font-stretch']: AttrValue; + ['font-style']: AttrValue; + ['font-variant']: AttrValue; + ['font-weight']: AttrValue; + ['glyph-orientation-horizontal']: AttrValue; + ['glyph-orientation-vertical']: AttrValue; + ['height']: AttrValue; + ['image-rendering']: AttrValue; + ['in']: AttrValue; + ['kerning']: AttrValue; + ['letter-spacing']: AttrValue; + ['lighting-color']: AttrValue; + ['marker-end']: AttrValue; + ['marker-mid']: AttrValue; + ['marker-start']: AttrValue; + ['mask']: AttrValue; + ['opacity']: AttrValue; + ['overflow']: AttrValue; + ['pointer-events']: AttrValue; + ['result']: AttrValue; + ['shape-rendering']: AttrValue; + ['stop-color']: AttrValue; + ['stop-opacity']: AttrValue; + ['stroke']: AttrValue; + ['stroke-dasharray']: AttrValue; + ['stroke-dashoffset']: AttrValue; + ['stroke-linecap']: AttrValue; + ['stroke-linejoin']: AttrValue; + ['stroke-miterlimit']: AttrValue; + ['stroke-opacity']: AttrValue; + ['stroke-width']: AttrValue; + ['text-anchor']: AttrValue; + ['text-decoration']: AttrValue; + ['text-rendering']: AttrValue; + ['unicode-bidi']: AttrValue; + ['visibility']: AttrValue; + ['width']: AttrValue; + ['word-spacing']: AttrValue; + ['writing-mode']: AttrValue; + ['x']: AttrValue; + ['y']: AttrValue; + } + interface SVGFEPointLightElementAttributes extends GenericAttributes { + ['x']: AttrValue; + ['y']: AttrValue; + ['z']: AttrValue; + } + interface SVGFESpecularLightingElementAttributes extends GenericAttributes { + ['alignment-baseline']: AttrValue; + ['baseline-shift']: AttrValue; + ['clip']: AttrValue; + ['clip-path']: AttrValue; + ['clip-rule']: AttrValue; + ['color']: AttrValue; + ['color-interpolation']: AttrValue; + ['color-interpolation-filters']: AttrValue; + ['color-profile']: AttrValue; + ['color-rendering']: AttrValue; + ['cursor']: AttrValue; + ['direction']: AttrValue; + ['display']: AttrValue; + ['dominant-baseline']: AttrValue; + ['enable-background']: AttrValue; + ['fill']: AttrValue; + ['fill-opacity']: AttrValue; + ['fill-rule']: AttrValue; + ['filter']: AttrValue; + ['flood-color']: AttrValue; + ['flood-opacity']: AttrValue; + ['font-family']: AttrValue; + ['font-size']: AttrValue; + ['font-size-adjust']: AttrValue; + ['font-stretch']: AttrValue; + ['font-style']: AttrValue; + ['font-variant']: AttrValue; + ['font-weight']: AttrValue; + ['glyph-orientation-horizontal']: AttrValue; + ['glyph-orientation-vertical']: AttrValue; + ['height']: AttrValue; + ['image-rendering']: AttrValue; + ['in']: AttrValue; + ['kernelUnitLength']: AttrValue; + ['kerning']: AttrValue; + ['letter-spacing']: AttrValue; + ['lighting-color']: AttrValue; + ['marker-end']: AttrValue; + ['marker-mid']: AttrValue; + ['marker-start']: AttrValue; + ['mask']: AttrValue; + ['opacity']: AttrValue; + ['overflow']: AttrValue; + ['pointer-events']: AttrValue; + ['result']: AttrValue; + ['shape-rendering']: AttrValue; + ['specularConstant']: AttrValue; + ['specularExponent']: AttrValue; + ['stop-color']: AttrValue; + ['stop-opacity']: AttrValue; + ['stroke']: AttrValue; + ['stroke-dasharray']: AttrValue; + ['stroke-dashoffset']: AttrValue; + ['stroke-linecap']: AttrValue; + ['stroke-linejoin']: AttrValue; + ['stroke-miterlimit']: AttrValue; + ['stroke-opacity']: AttrValue; + ['stroke-width']: AttrValue; + ['surfaceScale']: AttrValue; + ['text-anchor']: AttrValue; + ['text-decoration']: AttrValue; + ['text-rendering']: AttrValue; + ['unicode-bidi']: AttrValue; + ['visibility']: AttrValue; + ['width']: AttrValue; + ['word-spacing']: AttrValue; + ['writing-mode']: AttrValue; + ['x']: AttrValue; + ['y']: AttrValue; + } + interface SVGFESpotLightElementAttributes extends GenericAttributes { + ['limitingConeAngle']: AttrValue; + ['pointsAtX']: AttrValue; + ['pointsAtY']: AttrValue; + ['pointsAtZ']: AttrValue; + ['specularExponent']: AttrValue; + ['x']: AttrValue; + ['y']: AttrValue; + ['z']: AttrValue; + } + interface SVGFETileElementAttributes extends GenericAttributes { + ['alignment-baseline']: AttrValue; + ['baseline-shift']: AttrValue; + ['clip']: AttrValue; + ['clip-path']: AttrValue; + ['clip-rule']: AttrValue; + ['color']: AttrValue; + ['color-interpolation']: AttrValue; + ['color-interpolation-filters']: AttrValue; + ['color-profile']: AttrValue; + ['color-rendering']: AttrValue; + ['cursor']: AttrValue; + ['direction']: AttrValue; + ['display']: AttrValue; + ['dominant-baseline']: AttrValue; + ['enable-background']: AttrValue; + ['fill']: AttrValue; + ['fill-opacity']: AttrValue; + ['fill-rule']: AttrValue; + ['filter']: AttrValue; + ['flood-color']: AttrValue; + ['flood-opacity']: AttrValue; + ['font-family']: AttrValue; + ['font-size']: AttrValue; + ['font-size-adjust']: AttrValue; + ['font-stretch']: AttrValue; + ['font-style']: AttrValue; + ['font-variant']: AttrValue; + ['font-weight']: AttrValue; + ['glyph-orientation-horizontal']: AttrValue; + ['glyph-orientation-vertical']: AttrValue; + ['height']: AttrValue; + ['image-rendering']: AttrValue; + ['in']: AttrValue; + ['kerning']: AttrValue; + ['letter-spacing']: AttrValue; + ['lighting-color']: AttrValue; + ['marker-end']: AttrValue; + ['marker-mid']: AttrValue; + ['marker-start']: AttrValue; + ['mask']: AttrValue; + ['opacity']: AttrValue; + ['overflow']: AttrValue; + ['pointer-events']: AttrValue; + ['result']: AttrValue; + ['shape-rendering']: AttrValue; + ['stop-color']: AttrValue; + ['stop-opacity']: AttrValue; + ['stroke']: AttrValue; + ['stroke-dasharray']: AttrValue; + ['stroke-dashoffset']: AttrValue; + ['stroke-linecap']: AttrValue; + ['stroke-linejoin']: AttrValue; + ['stroke-miterlimit']: AttrValue; + ['stroke-opacity']: AttrValue; + ['stroke-width']: AttrValue; + ['text-anchor']: AttrValue; + ['text-decoration']: AttrValue; + ['text-rendering']: AttrValue; + ['unicode-bidi']: AttrValue; + ['visibility']: AttrValue; + ['width']: AttrValue; + ['word-spacing']: AttrValue; + ['writing-mode']: AttrValue; + ['x']: AttrValue; + ['y']: AttrValue; + } + interface SVGFETurbulenceElementAttributes extends GenericAttributes { + ['alignment-baseline']: AttrValue; + ['baseFrequency']: AttrValue; + ['baseline-shift']: AttrValue; + ['clip']: AttrValue; + ['clip-path']: AttrValue; + ['clip-rule']: AttrValue; + ['color']: AttrValue; + ['color-interpolation']: AttrValue; + ['color-interpolation-filters']: AttrValue; + ['color-profile']: AttrValue; + ['color-rendering']: AttrValue; + ['cursor']: AttrValue; + ['direction']: AttrValue; + ['display']: AttrValue; + ['dominant-baseline']: AttrValue; + ['enable-background']: AttrValue; + ['fill']: AttrValue; + ['fill-opacity']: AttrValue; + ['fill-rule']: AttrValue; + ['filter']: AttrValue; + ['flood-color']: AttrValue; + ['flood-opacity']: AttrValue; + ['font-family']: AttrValue; + ['font-size']: AttrValue; + ['font-size-adjust']: AttrValue; + ['font-stretch']: AttrValue; + ['font-style']: AttrValue; + ['font-variant']: AttrValue; + ['font-weight']: AttrValue; + ['glyph-orientation-horizontal']: AttrValue; + ['glyph-orientation-vertical']: AttrValue; + ['height']: AttrValue; + ['image-rendering']: AttrValue; + ['kerning']: AttrValue; + ['letter-spacing']: AttrValue; + ['lighting-color']: AttrValue; + ['marker-end']: AttrValue; + ['marker-mid']: AttrValue; + ['marker-start']: AttrValue; + ['mask']: AttrValue; + ['numOctaves']: AttrValue; + ['opacity']: AttrValue; + ['overflow']: AttrValue; + ['pointer-events']: AttrValue; + ['result']: AttrValue; + ['seed']: AttrValue; + ['shape-rendering']: AttrValue; + ['stitchTiles']: AttrValue; + ['stop-color']: AttrValue; + ['stop-opacity']: AttrValue; + ['stroke']: AttrValue; + ['stroke-dasharray']: AttrValue; + ['stroke-dashoffset']: AttrValue; + ['stroke-linecap']: AttrValue; + ['stroke-linejoin']: AttrValue; + ['stroke-miterlimit']: AttrValue; + ['stroke-opacity']: AttrValue; + ['stroke-width']: AttrValue; + ['text-anchor']: AttrValue; + ['text-decoration']: AttrValue; + ['text-rendering']: AttrValue; + ['type']: AttrValue; + ['unicode-bidi']: AttrValue; + ['visibility']: AttrValue; + ['width']: AttrValue; + ['word-spacing']: AttrValue; + ['writing-mode']: AttrValue; + ['x']: AttrValue; + ['y']: AttrValue; + } + interface SVGFilterElementAttributes extends GenericAttributes { + ['alignment-baseline']: AttrValue; + ['baseline-shift']: AttrValue; + ['clip']: AttrValue; + ['clip-path']: AttrValue; + ['clip-rule']: AttrValue; + ['color']: AttrValue; + ['color-interpolation']: AttrValue; + ['color-interpolation-filters']: AttrValue; + ['color-profile']: AttrValue; + ['color-rendering']: AttrValue; + ['cursor']: AttrValue; + ['direction']: AttrValue; + ['display']: AttrValue; + ['dominant-baseline']: AttrValue; + ['enable-background']: AttrValue; + ['externalResourcesRequired']: AttrValue; + ['fill']: AttrValue; + ['fill-opacity']: AttrValue; + ['fill-rule']: AttrValue; + ['filter']: AttrValue; + ['filterRes']: AttrValue; + ['filterUnits']: AttrValue; + ['flood-color']: AttrValue; + ['flood-opacity']: AttrValue; + ['font-family']: AttrValue; + ['font-size']: AttrValue; + ['font-size-adjust']: AttrValue; + ['font-stretch']: AttrValue; + ['font-style']: AttrValue; + ['font-variant']: AttrValue; + ['font-weight']: AttrValue; + ['glyph-orientation-horizontal']: AttrValue; + ['glyph-orientation-vertical']: AttrValue; + ['height']: AttrValue; + ['image-rendering']: AttrValue; + ['kerning']: AttrValue; + ['letter-spacing']: AttrValue; + ['lighting-color']: AttrValue; + ['marker-end']: AttrValue; + ['marker-mid']: AttrValue; + ['marker-start']: AttrValue; + ['mask']: AttrValue; + ['opacity']: AttrValue; + ['overflow']: AttrValue; + ['pointer-events']: AttrValue; + ['primitiveUnits']: AttrValue; + ['shape-rendering']: AttrValue; + ['stop-color']: AttrValue; + ['stop-opacity']: AttrValue; + ['stroke']: AttrValue; + ['stroke-dasharray']: AttrValue; + ['stroke-dashoffset']: AttrValue; + ['stroke-linecap']: AttrValue; + ['stroke-linejoin']: AttrValue; + ['stroke-miterlimit']: AttrValue; + ['stroke-opacity']: AttrValue; + ['stroke-width']: AttrValue; + ['text-anchor']: AttrValue; + ['text-decoration']: AttrValue; + ['text-rendering']: AttrValue; + ['unicode-bidi']: AttrValue; + ['visibility']: AttrValue; + ['width']: AttrValue; + ['word-spacing']: AttrValue; + ['writing-mode']: AttrValue; + ['x']: AttrValue; + ['y']: AttrValue; + } + interface SVGForeignObjectElementAttributes extends GenericAttributes { + ['alignment-baseline']: AttrValue; + ['baseline-shift']: AttrValue; + ['clip']: AttrValue; + ['clip-path']: AttrValue; + ['clip-rule']: AttrValue; + ['color']: AttrValue; + ['color-interpolation']: AttrValue; + ['color-interpolation-filters']: AttrValue; + ['color-profile']: AttrValue; + ['color-rendering']: AttrValue; + ['cursor']: AttrValue; + ['direction']: AttrValue; + ['display']: AttrValue; + ['dominant-baseline']: AttrValue; + ['enable-background']: AttrValue; + ['externalResourcesRequired']: AttrValue; + ['fill']: AttrValue; + ['fill-opacity']: AttrValue; + ['fill-rule']: AttrValue; + ['filter']: AttrValue; + ['flood-color']: AttrValue; + ['flood-opacity']: AttrValue; + ['focusHighlight']: AttrValue; + ['focusable']: AttrValue; + ['font-family']: AttrValue; + ['font-size']: AttrValue; + ['font-size-adjust']: AttrValue; + ['font-stretch']: AttrValue; + ['font-style']: AttrValue; + ['font-variant']: AttrValue; + ['font-weight']: AttrValue; + ['glyph-orientation-horizontal']: AttrValue; + ['glyph-orientation-vertical']: AttrValue; + ['height']: AttrValue; + ['image-rendering']: AttrValue; + ['kerning']: AttrValue; + ['letter-spacing']: AttrValue; + ['lighting-color']: AttrValue; + ['marker-end']: AttrValue; + ['marker-mid']: AttrValue; + ['marker-start']: AttrValue; + ['mask']: AttrValue; + ['nav-down']: AttrValue; + ['nav-down-left']: AttrValue; + ['nav-down-right']: AttrValue; + ['nav-left']: AttrValue; + ['nav-next']: AttrValue; + ['nav-prev']: AttrValue; + ['nav-right']: AttrValue; + ['nav-up']: AttrValue; + ['nav-up-left']: AttrValue; + ['nav-up-right']: AttrValue; + ['opacity']: AttrValue; + ['overflow']: AttrValue; + ['pointer-events']: AttrValue; + ['requiredExtensions']: AttrValue; + ['requiredFeatures']: AttrValue; + ['requiredFonts']: AttrValue; + ['requiredFormats']: AttrValue; + ['shape-rendering']: AttrValue; + ['stop-color']: AttrValue; + ['stop-opacity']: AttrValue; + ['stroke']: AttrValue; + ['stroke-dasharray']: AttrValue; + ['stroke-dashoffset']: AttrValue; + ['stroke-linecap']: AttrValue; + ['stroke-linejoin']: AttrValue; + ['stroke-miterlimit']: AttrValue; + ['stroke-opacity']: AttrValue; + ['stroke-width']: AttrValue; + ['systemLanguage']: AttrValue; + ['text-anchor']: AttrValue; + ['text-decoration']: AttrValue; + ['text-rendering']: AttrValue; + ['transform']: AttrValue; + ['unicode-bidi']: AttrValue; + ['visibility']: AttrValue; + ['width']: AttrValue; + ['word-spacing']: AttrValue; + ['writing-mode']: AttrValue; + ['x']: AttrValue; + ['y']: AttrValue; + } + interface SVGGElementAttributes extends GenericAttributes { + ['alignment-baseline']: AttrValue; + ['baseline-shift']: AttrValue; + ['clip']: AttrValue; + ['clip-path']: AttrValue; + ['clip-rule']: AttrValue; + ['color']: AttrValue; + ['color-interpolation']: AttrValue; + ['color-interpolation-filters']: AttrValue; + ['color-profile']: AttrValue; + ['color-rendering']: AttrValue; + ['cursor']: AttrValue; + ['direction']: AttrValue; + ['display']: AttrValue; + ['dominant-baseline']: AttrValue; + ['enable-background']: AttrValue; + ['externalResourcesRequired']: AttrValue; + ['fill']: AttrValue; + ['fill-opacity']: AttrValue; + ['fill-rule']: AttrValue; + ['filter']: AttrValue; + ['flood-color']: AttrValue; + ['flood-opacity']: AttrValue; + ['focusHighlight']: AttrValue; + ['focusable']: AttrValue; + ['font-family']: AttrValue; + ['font-size']: AttrValue; + ['font-size-adjust']: AttrValue; + ['font-stretch']: AttrValue; + ['font-style']: AttrValue; + ['font-variant']: AttrValue; + ['font-weight']: AttrValue; + ['glyph-orientation-horizontal']: AttrValue; + ['glyph-orientation-vertical']: AttrValue; + ['image-rendering']: AttrValue; + ['kerning']: AttrValue; + ['letter-spacing']: AttrValue; + ['lighting-color']: AttrValue; + ['marker-end']: AttrValue; + ['marker-mid']: AttrValue; + ['marker-start']: AttrValue; + ['mask']: AttrValue; + ['nav-down']: AttrValue; + ['nav-down-left']: AttrValue; + ['nav-down-right']: AttrValue; + ['nav-left']: AttrValue; + ['nav-next']: AttrValue; + ['nav-prev']: AttrValue; + ['nav-right']: AttrValue; + ['nav-up']: AttrValue; + ['nav-up-left']: AttrValue; + ['nav-up-right']: AttrValue; + ['opacity']: AttrValue; + ['overflow']: AttrValue; + ['pointer-events']: AttrValue; + ['requiredExtensions']: AttrValue; + ['requiredFeatures']: AttrValue; + ['requiredFonts']: AttrValue; + ['requiredFormats']: AttrValue; + ['shape-rendering']: AttrValue; + ['stop-color']: AttrValue; + ['stop-opacity']: AttrValue; + ['stroke']: AttrValue; + ['stroke-dasharray']: AttrValue; + ['stroke-dashoffset']: AttrValue; + ['stroke-linecap']: AttrValue; + ['stroke-linejoin']: AttrValue; + ['stroke-miterlimit']: AttrValue; + ['stroke-opacity']: AttrValue; + ['stroke-width']: AttrValue; + ['systemLanguage']: AttrValue; + ['text-anchor']: AttrValue; + ['text-decoration']: AttrValue; + ['text-rendering']: AttrValue; + ['transform']: AttrValue; + ['unicode-bidi']: AttrValue; + ['visibility']: AttrValue; + ['word-spacing']: AttrValue; + ['writing-mode']: AttrValue; + } + interface SVGImageElementAttributes extends GenericAttributes { + ['alignment-baseline']: AttrValue; + ['baseline-shift']: AttrValue; + ['clip']: AttrValue; + ['clip-path']: AttrValue; + ['clip-rule']: AttrValue; + ['color']: AttrValue; + ['color-interpolation']: AttrValue; + ['color-interpolation-filters']: AttrValue; + ['color-profile']: AttrValue; + ['color-rendering']: AttrValue; + ['crossorigin']: AttrValue; + ['cursor']: AttrValue; + ['direction']: AttrValue; + ['display']: AttrValue; + ['dominant-baseline']: AttrValue; + ['enable-background']: AttrValue; + ['externalResourcesRequired']: AttrValue; + ['fill']: AttrValue; + ['fill-opacity']: AttrValue; + ['fill-rule']: AttrValue; + ['filter']: AttrValue; + ['flood-color']: AttrValue; + ['flood-opacity']: AttrValue; + ['focusHighlight']: AttrValue; + ['focusable']: AttrValue; + ['font-family']: AttrValue; + ['font-size']: AttrValue; + ['font-size-adjust']: AttrValue; + ['font-stretch']: AttrValue; + ['font-style']: AttrValue; + ['font-variant']: AttrValue; + ['font-weight']: AttrValue; + ['glyph-orientation-horizontal']: AttrValue; + ['glyph-orientation-vertical']: AttrValue; + ['height']: AttrValue; + ['href']: AttrValue; + ['image-rendering']: AttrValue; + ['kerning']: AttrValue; + ['letter-spacing']: AttrValue; + ['lighting-color']: AttrValue; + ['marker-end']: AttrValue; + ['marker-mid']: AttrValue; + ['marker-start']: AttrValue; + ['mask']: AttrValue; + ['nav-down']: AttrValue; + ['nav-down-left']: AttrValue; + ['nav-down-right']: AttrValue; + ['nav-left']: AttrValue; + ['nav-next']: AttrValue; + ['nav-prev']: AttrValue; + ['nav-right']: AttrValue; + ['nav-up']: AttrValue; + ['nav-up-left']: AttrValue; + ['nav-up-right']: AttrValue; + ['opacity']: AttrValue; + ['overflow']: AttrValue; + ['pointer-events']: AttrValue; + ['preserveAspectRatio']: AttrValue; + ['requiredExtensions']: AttrValue; + ['requiredFeatures']: AttrValue; + ['requiredFonts']: AttrValue; + ['requiredFormats']: AttrValue; + ['shape-rendering']: AttrValue; + ['stop-color']: AttrValue; + ['stop-opacity']: AttrValue; + ['stroke']: AttrValue; + ['stroke-dasharray']: AttrValue; + ['stroke-dashoffset']: AttrValue; + ['stroke-linecap']: AttrValue; + ['stroke-linejoin']: AttrValue; + ['stroke-miterlimit']: AttrValue; + ['stroke-opacity']: AttrValue; + ['stroke-width']: AttrValue; + ['systemLanguage']: AttrValue; + ['text-anchor']: AttrValue; + ['text-decoration']: AttrValue; + ['text-rendering']: AttrValue; + ['transform']: AttrValue; + ['type']: AttrValue; + ['unicode-bidi']: AttrValue; + ['visibility']: AttrValue; + ['width']: AttrValue; + ['word-spacing']: AttrValue; + ['writing-mode']: AttrValue; + ['x']: AttrValue; + ['y']: AttrValue; + } + interface SVGLineElementAttributes extends GenericAttributes { + ['alignment-baseline']: AttrValue; + ['baseline-shift']: AttrValue; + ['clip']: AttrValue; + ['clip-path']: AttrValue; + ['clip-rule']: AttrValue; + ['color']: AttrValue; + ['color-interpolation']: AttrValue; + ['color-interpolation-filters']: AttrValue; + ['color-profile']: AttrValue; + ['color-rendering']: AttrValue; + ['cursor']: AttrValue; + ['direction']: AttrValue; + ['display']: AttrValue; + ['dominant-baseline']: AttrValue; + ['enable-background']: AttrValue; + ['externalResourcesRequired']: AttrValue; + ['fill']: AttrValue; + ['fill-opacity']: AttrValue; + ['fill-rule']: AttrValue; + ['filter']: AttrValue; + ['flood-color']: AttrValue; + ['flood-opacity']: AttrValue; + ['focusHighlight']: AttrValue; + ['focusable']: AttrValue; + ['font-family']: AttrValue; + ['font-size']: AttrValue; + ['font-size-adjust']: AttrValue; + ['font-stretch']: AttrValue; + ['font-style']: AttrValue; + ['font-variant']: AttrValue; + ['font-weight']: AttrValue; + ['glyph-orientation-horizontal']: AttrValue; + ['glyph-orientation-vertical']: AttrValue; + ['image-rendering']: AttrValue; + ['kerning']: AttrValue; + ['letter-spacing']: AttrValue; + ['lighting-color']: AttrValue; + ['marker-end']: AttrValue; + ['marker-mid']: AttrValue; + ['marker-start']: AttrValue; + ['mask']: AttrValue; + ['nav-down']: AttrValue; + ['nav-down-left']: AttrValue; + ['nav-down-right']: AttrValue; + ['nav-left']: AttrValue; + ['nav-next']: AttrValue; + ['nav-prev']: AttrValue; + ['nav-right']: AttrValue; + ['nav-up']: AttrValue; + ['nav-up-left']: AttrValue; + ['nav-up-right']: AttrValue; + ['opacity']: AttrValue; + ['overflow']: AttrValue; + ['pathLength']: AttrValue; + ['pointer-events']: AttrValue; + ['requiredExtensions']: AttrValue; + ['requiredFeatures']: AttrValue; + ['requiredFonts']: AttrValue; + ['requiredFormats']: AttrValue; + ['shape-rendering']: AttrValue; + ['stop-color']: AttrValue; + ['stop-opacity']: AttrValue; + ['stroke']: AttrValue; + ['stroke-dasharray']: AttrValue; + ['stroke-dashoffset']: AttrValue; + ['stroke-linecap']: AttrValue; + ['stroke-linejoin']: AttrValue; + ['stroke-miterlimit']: AttrValue; + ['stroke-opacity']: AttrValue; + ['stroke-width']: AttrValue; + ['systemLanguage']: AttrValue; + ['text-anchor']: AttrValue; + ['text-decoration']: AttrValue; + ['text-rendering']: AttrValue; + ['transform']: AttrValue; + ['unicode-bidi']: AttrValue; + ['visibility']: AttrValue; + ['word-spacing']: AttrValue; + ['writing-mode']: AttrValue; + ['x1']: AttrValue; + ['x2']: AttrValue; + ['y1']: AttrValue; + ['y2']: AttrValue; + } + interface SVGLinearGradientElementAttributes extends GenericAttributes { + ['alignment-baseline']: AttrValue; + ['baseline-shift']: AttrValue; + ['clip']: AttrValue; + ['clip-path']: AttrValue; + ['clip-rule']: AttrValue; + ['color']: AttrValue; + ['color-interpolation']: AttrValue; + ['color-interpolation-filters']: AttrValue; + ['color-profile']: AttrValue; + ['color-rendering']: AttrValue; + ['cursor']: AttrValue; + ['direction']: AttrValue; + ['display']: AttrValue; + ['dominant-baseline']: AttrValue; + ['enable-background']: AttrValue; + ['externalResourcesRequired']: AttrValue; + ['fill']: AttrValue; + ['fill-opacity']: AttrValue; + ['fill-rule']: AttrValue; + ['filter']: AttrValue; + ['flood-color']: AttrValue; + ['flood-opacity']: AttrValue; + ['font-family']: AttrValue; + ['font-size']: AttrValue; + ['font-size-adjust']: AttrValue; + ['font-stretch']: AttrValue; + ['font-style']: AttrValue; + ['font-variant']: AttrValue; + ['font-weight']: AttrValue; + ['glyph-orientation-horizontal']: AttrValue; + ['glyph-orientation-vertical']: AttrValue; + ['gradientTransform']: AttrValue; + ['gradientUnits']: AttrValue; + ['href']: AttrValue; + ['image-rendering']: AttrValue; + ['kerning']: AttrValue; + ['letter-spacing']: AttrValue; + ['lighting-color']: AttrValue; + ['marker-end']: AttrValue; + ['marker-mid']: AttrValue; + ['marker-start']: AttrValue; + ['mask']: AttrValue; + ['opacity']: AttrValue; + ['overflow']: AttrValue; + ['pointer-events']: AttrValue; + ['shape-rendering']: AttrValue; + ['spreadMethod']: AttrValue; + ['stop-color']: AttrValue; + ['stop-opacity']: AttrValue; + ['stroke']: AttrValue; + ['stroke-dasharray']: AttrValue; + ['stroke-dashoffset']: AttrValue; + ['stroke-linecap']: AttrValue; + ['stroke-linejoin']: AttrValue; + ['stroke-miterlimit']: AttrValue; + ['stroke-opacity']: AttrValue; + ['stroke-width']: AttrValue; + ['text-anchor']: AttrValue; + ['text-decoration']: AttrValue; + ['text-rendering']: AttrValue; + ['unicode-bidi']: AttrValue; + ['visibility']: AttrValue; + ['word-spacing']: AttrValue; + ['writing-mode']: AttrValue; + ['x1']: AttrValue; + ['x2']: AttrValue; + ['y1']: AttrValue; + ['y2']: AttrValue; + } + interface SVGMarkerElementAttributes extends GenericAttributes { + ['alignment-baseline']: AttrValue; + ['baseline-shift']: AttrValue; + ['clip']: AttrValue; + ['clip-path']: AttrValue; + ['clip-rule']: AttrValue; + ['color']: AttrValue; + ['color-interpolation']: AttrValue; + ['color-interpolation-filters']: AttrValue; + ['color-profile']: AttrValue; + ['color-rendering']: AttrValue; + ['cursor']: AttrValue; + ['direction']: AttrValue; + ['display']: AttrValue; + ['dominant-baseline']: AttrValue; + ['enable-background']: AttrValue; + ['externalResourcesRequired']: AttrValue; + ['fill']: AttrValue; + ['fill-opacity']: AttrValue; + ['fill-rule']: AttrValue; + ['filter']: AttrValue; + ['flood-color']: AttrValue; + ['flood-opacity']: AttrValue; + ['font-family']: AttrValue; + ['font-size']: AttrValue; + ['font-size-adjust']: AttrValue; + ['font-stretch']: AttrValue; + ['font-style']: AttrValue; + ['font-variant']: AttrValue; + ['font-weight']: AttrValue; + ['glyph-orientation-horizontal']: AttrValue; + ['glyph-orientation-vertical']: AttrValue; + ['image-rendering']: AttrValue; + ['kerning']: AttrValue; + ['letter-spacing']: AttrValue; + ['lighting-color']: AttrValue; + ['marker-end']: AttrValue; + ['marker-mid']: AttrValue; + ['marker-start']: AttrValue; + ['markerHeight']: AttrValue; + ['markerUnits']: AttrValue; + ['markerWidth']: AttrValue; + ['mask']: AttrValue; + ['opacity']: AttrValue; + ['orient']: AttrValue; + ['overflow']: AttrValue; + ['pointer-events']: AttrValue; + ['preserveAspectRatio']: AttrValue; + ['refX']: AttrValue; + ['refY']: AttrValue; + ['shape-rendering']: AttrValue; + ['stop-color']: AttrValue; + ['stop-opacity']: AttrValue; + ['stroke']: AttrValue; + ['stroke-dasharray']: AttrValue; + ['stroke-dashoffset']: AttrValue; + ['stroke-linecap']: AttrValue; + ['stroke-linejoin']: AttrValue; + ['stroke-miterlimit']: AttrValue; + ['stroke-opacity']: AttrValue; + ['stroke-width']: AttrValue; + ['text-anchor']: AttrValue; + ['text-decoration']: AttrValue; + ['text-rendering']: AttrValue; + ['unicode-bidi']: AttrValue; + ['viewBox']: AttrValue; + ['visibility']: AttrValue; + ['word-spacing']: AttrValue; + ['writing-mode']: AttrValue; + } + interface SVGMaskElementAttributes extends GenericAttributes { + ['alignment-baseline']: AttrValue; + ['baseline-shift']: AttrValue; + ['clip']: AttrValue; + ['clip-path']: AttrValue; + ['clip-rule']: AttrValue; + ['color']: AttrValue; + ['color-interpolation']: AttrValue; + ['color-interpolation-filters']: AttrValue; + ['color-profile']: AttrValue; + ['color-rendering']: AttrValue; + ['cursor']: AttrValue; + ['direction']: AttrValue; + ['display']: AttrValue; + ['dominant-baseline']: AttrValue; + ['enable-background']: AttrValue; + ['externalResourcesRequired']: AttrValue; + ['fill']: AttrValue; + ['fill-opacity']: AttrValue; + ['fill-rule']: AttrValue; + ['filter']: AttrValue; + ['flood-color']: AttrValue; + ['flood-opacity']: AttrValue; + ['font-family']: AttrValue; + ['font-size']: AttrValue; + ['font-size-adjust']: AttrValue; + ['font-stretch']: AttrValue; + ['font-style']: AttrValue; + ['font-variant']: AttrValue; + ['font-weight']: AttrValue; + ['glyph-orientation-horizontal']: AttrValue; + ['glyph-orientation-vertical']: AttrValue; + ['height']: AttrValue; + ['image-rendering']: AttrValue; + ['kerning']: AttrValue; + ['letter-spacing']: AttrValue; + ['lighting-color']: AttrValue; + ['marker-end']: AttrValue; + ['marker-mid']: AttrValue; + ['marker-start']: AttrValue; + ['mask']: AttrValue; + ['maskContentUnits']: AttrValue; + ['maskUnits']: AttrValue; + ['opacity']: AttrValue; + ['overflow']: AttrValue; + ['pointer-events']: AttrValue; + ['requiredExtensions']: AttrValue; + ['requiredFeatures']: AttrValue; + ['shape-rendering']: AttrValue; + ['stop-color']: AttrValue; + ['stop-opacity']: AttrValue; + ['stroke']: AttrValue; + ['stroke-dasharray']: AttrValue; + ['stroke-dashoffset']: AttrValue; + ['stroke-linecap']: AttrValue; + ['stroke-linejoin']: AttrValue; + ['stroke-miterlimit']: AttrValue; + ['stroke-opacity']: AttrValue; + ['stroke-width']: AttrValue; + ['systemLanguage']: AttrValue; + ['text-anchor']: AttrValue; + ['text-decoration']: AttrValue; + ['text-rendering']: AttrValue; + ['unicode-bidi']: AttrValue; + ['visibility']: AttrValue; + ['width']: AttrValue; + ['word-spacing']: AttrValue; + ['writing-mode']: AttrValue; + ['x']: AttrValue; + ['y']: AttrValue; + } + interface SVGMetadataElementAttributes extends GenericAttributes { + ['requiredExtensions']: AttrValue; + ['requiredFeatures']: AttrValue; + ['requiredFonts']: AttrValue; + ['requiredFormats']: AttrValue; + ['systemLanguage']: AttrValue; + } + interface SVGMPathElementAttributes extends GenericAttributes { + ['externalResourcesRequired']: AttrValue; + ['href']: AttrValue; + } + interface SVGPathElementAttributes extends GenericAttributes { + ['alignment-baseline']: AttrValue; + ['baseline-shift']: AttrValue; + ['clip']: AttrValue; + ['clip-path']: AttrValue; + ['clip-rule']: AttrValue; + ['color']: AttrValue; + ['color-interpolation']: AttrValue; + ['color-interpolation-filters']: AttrValue; + ['color-profile']: AttrValue; + ['color-rendering']: AttrValue; + ['cursor']: AttrValue; + ['d']: AttrValue; + ['direction']: AttrValue; + ['display']: AttrValue; + ['dominant-baseline']: AttrValue; + ['enable-background']: AttrValue; + ['externalResourcesRequired']: AttrValue; + ['fill']: AttrValue; + ['fill-opacity']: AttrValue; + ['fill-rule']: AttrValue; + ['filter']: AttrValue; + ['flood-color']: AttrValue; + ['flood-opacity']: AttrValue; + ['focusHighlight']: AttrValue; + ['focusable']: AttrValue; + ['font-family']: AttrValue; + ['font-size']: AttrValue; + ['font-size-adjust']: AttrValue; + ['font-stretch']: AttrValue; + ['font-style']: AttrValue; + ['font-variant']: AttrValue; + ['font-weight']: AttrValue; + ['glyph-orientation-horizontal']: AttrValue; + ['glyph-orientation-vertical']: AttrValue; + ['image-rendering']: AttrValue; + ['kerning']: AttrValue; + ['letter-spacing']: AttrValue; + ['lighting-color']: AttrValue; + ['marker-end']: AttrValue; + ['marker-mid']: AttrValue; + ['marker-start']: AttrValue; + ['mask']: AttrValue; + ['nav-down']: AttrValue; + ['nav-down-left']: AttrValue; + ['nav-down-right']: AttrValue; + ['nav-left']: AttrValue; + ['nav-next']: AttrValue; + ['nav-prev']: AttrValue; + ['nav-right']: AttrValue; + ['nav-up']: AttrValue; + ['nav-up-left']: AttrValue; + ['nav-up-right']: AttrValue; + ['opacity']: AttrValue; + ['overflow']: AttrValue; + ['pathLength']: AttrValue; + ['pointer-events']: AttrValue; + ['requiredExtensions']: AttrValue; + ['requiredFeatures']: AttrValue; + ['requiredFonts']: AttrValue; + ['requiredFormats']: AttrValue; + ['shape-rendering']: AttrValue; + ['stop-color']: AttrValue; + ['stop-opacity']: AttrValue; + ['stroke']: AttrValue; + ['stroke-dasharray']: AttrValue; + ['stroke-dashoffset']: AttrValue; + ['stroke-linecap']: AttrValue; + ['stroke-linejoin']: AttrValue; + ['stroke-miterlimit']: AttrValue; + ['stroke-opacity']: AttrValue; + ['stroke-width']: AttrValue; + ['systemLanguage']: AttrValue; + ['text-anchor']: AttrValue; + ['text-decoration']: AttrValue; + ['text-rendering']: AttrValue; + ['transform']: AttrValue; + ['unicode-bidi']: AttrValue; + ['visibility']: AttrValue; + ['word-spacing']: AttrValue; + ['writing-mode']: AttrValue; + } + interface SVGPatternElementAttributes extends GenericAttributes { + ['alignment-baseline']: AttrValue; + ['baseline-shift']: AttrValue; + ['clip']: AttrValue; + ['clip-path']: AttrValue; + ['clip-rule']: AttrValue; + ['color']: AttrValue; + ['color-interpolation']: AttrValue; + ['color-interpolation-filters']: AttrValue; + ['color-profile']: AttrValue; + ['color-rendering']: AttrValue; + ['cursor']: AttrValue; + ['direction']: AttrValue; + ['display']: AttrValue; + ['dominant-baseline']: AttrValue; + ['enable-background']: AttrValue; + ['externalResourcesRequired']: AttrValue; + ['fill']: AttrValue; + ['fill-opacity']: AttrValue; + ['fill-rule']: AttrValue; + ['filter']: AttrValue; + ['flood-color']: AttrValue; + ['flood-opacity']: AttrValue; + ['font-family']: AttrValue; + ['font-size']: AttrValue; + ['font-size-adjust']: AttrValue; + ['font-stretch']: AttrValue; + ['font-style']: AttrValue; + ['font-variant']: AttrValue; + ['font-weight']: AttrValue; + ['glyph-orientation-horizontal']: AttrValue; + ['glyph-orientation-vertical']: AttrValue; + ['height']: AttrValue; + ['href']: AttrValue; + ['image-rendering']: AttrValue; + ['kerning']: AttrValue; + ['letter-spacing']: AttrValue; + ['lighting-color']: AttrValue; + ['marker-end']: AttrValue; + ['marker-mid']: AttrValue; + ['marker-start']: AttrValue; + ['mask']: AttrValue; + ['opacity']: AttrValue; + ['overflow']: AttrValue; + ['patternContentUnits']: AttrValue; + ['patternTransform']: AttrValue; + ['patternUnits']: AttrValue; + ['pointer-events']: AttrValue; + ['preserveAspectRatio']: AttrValue; + ['requiredExtensions']: AttrValue; + ['requiredFeatures']: AttrValue; + ['shape-rendering']: AttrValue; + ['stop-color']: AttrValue; + ['stop-opacity']: AttrValue; + ['stroke']: AttrValue; + ['stroke-dasharray']: AttrValue; + ['stroke-dashoffset']: AttrValue; + ['stroke-linecap']: AttrValue; + ['stroke-linejoin']: AttrValue; + ['stroke-miterlimit']: AttrValue; + ['stroke-opacity']: AttrValue; + ['stroke-width']: AttrValue; + ['systemLanguage']: AttrValue; + ['text-anchor']: AttrValue; + ['text-decoration']: AttrValue; + ['text-rendering']: AttrValue; + ['unicode-bidi']: AttrValue; + ['viewBox']: AttrValue; + ['visibility']: AttrValue; + ['width']: AttrValue; + ['word-spacing']: AttrValue; + ['writing-mode']: AttrValue; + ['x']: AttrValue; + ['y']: AttrValue; + } + interface SVGPolygonElementAttributes extends GenericAttributes { + ['alignment-baseline']: AttrValue; + ['baseline-shift']: AttrValue; + ['clip']: AttrValue; + ['clip-path']: AttrValue; + ['clip-rule']: AttrValue; + ['color']: AttrValue; + ['color-interpolation']: AttrValue; + ['color-interpolation-filters']: AttrValue; + ['color-profile']: AttrValue; + ['color-rendering']: AttrValue; + ['cursor']: AttrValue; + ['direction']: AttrValue; + ['display']: AttrValue; + ['dominant-baseline']: AttrValue; + ['enable-background']: AttrValue; + ['externalResourcesRequired']: AttrValue; + ['fill']: AttrValue; + ['fill-opacity']: AttrValue; + ['fill-rule']: AttrValue; + ['filter']: AttrValue; + ['flood-color']: AttrValue; + ['flood-opacity']: AttrValue; + ['focusHighlight']: AttrValue; + ['focusable']: AttrValue; + ['font-family']: AttrValue; + ['font-size']: AttrValue; + ['font-size-adjust']: AttrValue; + ['font-stretch']: AttrValue; + ['font-style']: AttrValue; + ['font-variant']: AttrValue; + ['font-weight']: AttrValue; + ['glyph-orientation-horizontal']: AttrValue; + ['glyph-orientation-vertical']: AttrValue; + ['image-rendering']: AttrValue; + ['kerning']: AttrValue; + ['letter-spacing']: AttrValue; + ['lighting-color']: AttrValue; + ['marker-end']: AttrValue; + ['marker-mid']: AttrValue; + ['marker-start']: AttrValue; + ['mask']: AttrValue; + ['nav-down']: AttrValue; + ['nav-down-left']: AttrValue; + ['nav-down-right']: AttrValue; + ['nav-left']: AttrValue; + ['nav-next']: AttrValue; + ['nav-prev']: AttrValue; + ['nav-right']: AttrValue; + ['nav-up']: AttrValue; + ['nav-up-left']: AttrValue; + ['nav-up-right']: AttrValue; + ['opacity']: AttrValue; + ['overflow']: AttrValue; + ['pathLength']: AttrValue; + ['pointer-events']: AttrValue; + ['points']: AttrValue; + ['requiredExtensions']: AttrValue; + ['requiredFeatures']: AttrValue; + ['requiredFonts']: AttrValue; + ['requiredFormats']: AttrValue; + ['shape-rendering']: AttrValue; + ['stop-color']: AttrValue; + ['stop-opacity']: AttrValue; + ['stroke']: AttrValue; + ['stroke-dasharray']: AttrValue; + ['stroke-dashoffset']: AttrValue; + ['stroke-linecap']: AttrValue; + ['stroke-linejoin']: AttrValue; + ['stroke-miterlimit']: AttrValue; + ['stroke-opacity']: AttrValue; + ['stroke-width']: AttrValue; + ['systemLanguage']: AttrValue; + ['text-anchor']: AttrValue; + ['text-decoration']: AttrValue; + ['text-rendering']: AttrValue; + ['transform']: AttrValue; + ['unicode-bidi']: AttrValue; + ['visibility']: AttrValue; + ['word-spacing']: AttrValue; + ['writing-mode']: AttrValue; + } + interface SVGPolylineElementAttributes extends GenericAttributes { + ['alignment-baseline']: AttrValue; + ['baseline-shift']: AttrValue; + ['clip']: AttrValue; + ['clip-path']: AttrValue; + ['clip-rule']: AttrValue; + ['color']: AttrValue; + ['color-interpolation']: AttrValue; + ['color-interpolation-filters']: AttrValue; + ['color-profile']: AttrValue; + ['color-rendering']: AttrValue; + ['cursor']: AttrValue; + ['direction']: AttrValue; + ['display']: AttrValue; + ['dominant-baseline']: AttrValue; + ['enable-background']: AttrValue; + ['externalResourcesRequired']: AttrValue; + ['fill']: AttrValue; + ['fill-opacity']: AttrValue; + ['fill-rule']: AttrValue; + ['filter']: AttrValue; + ['flood-color']: AttrValue; + ['flood-opacity']: AttrValue; + ['focusHighlight']: AttrValue; + ['focusable']: AttrValue; + ['font-family']: AttrValue; + ['font-size']: AttrValue; + ['font-size-adjust']: AttrValue; + ['font-stretch']: AttrValue; + ['font-style']: AttrValue; + ['font-variant']: AttrValue; + ['font-weight']: AttrValue; + ['glyph-orientation-horizontal']: AttrValue; + ['glyph-orientation-vertical']: AttrValue; + ['image-rendering']: AttrValue; + ['kerning']: AttrValue; + ['letter-spacing']: AttrValue; + ['lighting-color']: AttrValue; + ['marker-end']: AttrValue; + ['marker-mid']: AttrValue; + ['marker-start']: AttrValue; + ['mask']: AttrValue; + ['nav-down']: AttrValue; + ['nav-down-left']: AttrValue; + ['nav-down-right']: AttrValue; + ['nav-left']: AttrValue; + ['nav-next']: AttrValue; + ['nav-prev']: AttrValue; + ['nav-right']: AttrValue; + ['nav-up']: AttrValue; + ['nav-up-left']: AttrValue; + ['nav-up-right']: AttrValue; + ['opacity']: AttrValue; + ['overflow']: AttrValue; + ['pathLength']: AttrValue; + ['pointer-events']: AttrValue; + ['points']: AttrValue; + ['requiredExtensions']: AttrValue; + ['requiredFeatures']: AttrValue; + ['requiredFonts']: AttrValue; + ['requiredFormats']: AttrValue; + ['shape-rendering']: AttrValue; + ['stop-color']: AttrValue; + ['stop-opacity']: AttrValue; + ['stroke']: AttrValue; + ['stroke-dasharray']: AttrValue; + ['stroke-dashoffset']: AttrValue; + ['stroke-linecap']: AttrValue; + ['stroke-linejoin']: AttrValue; + ['stroke-miterlimit']: AttrValue; + ['stroke-opacity']: AttrValue; + ['stroke-width']: AttrValue; + ['systemLanguage']: AttrValue; + ['text-anchor']: AttrValue; + ['text-decoration']: AttrValue; + ['text-rendering']: AttrValue; + ['transform']: AttrValue; + ['unicode-bidi']: AttrValue; + ['visibility']: AttrValue; + ['word-spacing']: AttrValue; + ['writing-mode']: AttrValue; + } + interface SVGRadialGradientElementAttributes extends GenericAttributes { + ['alignment-baseline']: AttrValue; + ['baseline-shift']: AttrValue; + ['clip']: AttrValue; + ['clip-path']: AttrValue; + ['clip-rule']: AttrValue; + ['color']: AttrValue; + ['color-interpolation']: AttrValue; + ['color-interpolation-filters']: AttrValue; + ['color-profile']: AttrValue; + ['color-rendering']: AttrValue; + ['cursor']: AttrValue; + ['cx']: AttrValue; + ['cy']: AttrValue; + ['direction']: AttrValue; + ['display']: AttrValue; + ['dominant-baseline']: AttrValue; + ['enable-background']: AttrValue; + ['externalResourcesRequired']: AttrValue; + ['fill']: AttrValue; + ['fill-opacity']: AttrValue; + ['fill-rule']: AttrValue; + ['filter']: AttrValue; + ['flood-color']: AttrValue; + ['flood-opacity']: AttrValue; + ['font-family']: AttrValue; + ['font-size']: AttrValue; + ['font-size-adjust']: AttrValue; + ['font-stretch']: AttrValue; + ['font-style']: AttrValue; + ['font-variant']: AttrValue; + ['font-weight']: AttrValue; + ['fr']: AttrValue; + ['fx']: AttrValue; + ['fy']: AttrValue; + ['glyph-orientation-horizontal']: AttrValue; + ['glyph-orientation-vertical']: AttrValue; + ['gradientTransform']: AttrValue; + ['gradientUnits']: AttrValue; + ['href']: AttrValue; + ['image-rendering']: AttrValue; + ['kerning']: AttrValue; + ['letter-spacing']: AttrValue; + ['lighting-color']: AttrValue; + ['marker-end']: AttrValue; + ['marker-mid']: AttrValue; + ['marker-start']: AttrValue; + ['mask']: AttrValue; + ['opacity']: AttrValue; + ['overflow']: AttrValue; + ['pointer-events']: AttrValue; + ['r']: AttrValue; + ['shape-rendering']: AttrValue; + ['spreadMethod']: AttrValue; + ['stop-color']: AttrValue; + ['stop-opacity']: AttrValue; + ['stroke']: AttrValue; + ['stroke-dasharray']: AttrValue; + ['stroke-dashoffset']: AttrValue; + ['stroke-linecap']: AttrValue; + ['stroke-linejoin']: AttrValue; + ['stroke-miterlimit']: AttrValue; + ['stroke-opacity']: AttrValue; + ['stroke-width']: AttrValue; + ['text-anchor']: AttrValue; + ['text-decoration']: AttrValue; + ['text-rendering']: AttrValue; + ['unicode-bidi']: AttrValue; + ['visibility']: AttrValue; + ['word-spacing']: AttrValue; + ['writing-mode']: AttrValue; + } + interface SVGRectElementAttributes extends GenericAttributes { + ['alignment-baseline']: AttrValue; + ['baseline-shift']: AttrValue; + ['clip']: AttrValue; + ['clip-path']: AttrValue; + ['clip-rule']: AttrValue; + ['color']: AttrValue; + ['color-interpolation']: AttrValue; + ['color-interpolation-filters']: AttrValue; + ['color-profile']: AttrValue; + ['color-rendering']: AttrValue; + ['cursor']: AttrValue; + ['direction']: AttrValue; + ['display']: AttrValue; + ['dominant-baseline']: AttrValue; + ['enable-background']: AttrValue; + ['externalResourcesRequired']: AttrValue; + ['fill']: AttrValue; + ['fill-opacity']: AttrValue; + ['fill-rule']: AttrValue; + ['filter']: AttrValue; + ['flood-color']: AttrValue; + ['flood-opacity']: AttrValue; + ['focusHighlight']: AttrValue; + ['focusable']: AttrValue; + ['font-family']: AttrValue; + ['font-size']: AttrValue; + ['font-size-adjust']: AttrValue; + ['font-stretch']: AttrValue; + ['font-style']: AttrValue; + ['font-variant']: AttrValue; + ['font-weight']: AttrValue; + ['glyph-orientation-horizontal']: AttrValue; + ['glyph-orientation-vertical']: AttrValue; + ['height']: AttrValue; + ['image-rendering']: AttrValue; + ['kerning']: AttrValue; + ['letter-spacing']: AttrValue; + ['lighting-color']: AttrValue; + ['marker-end']: AttrValue; + ['marker-mid']: AttrValue; + ['marker-start']: AttrValue; + ['mask']: AttrValue; + ['nav-down']: AttrValue; + ['nav-down-left']: AttrValue; + ['nav-down-right']: AttrValue; + ['nav-left']: AttrValue; + ['nav-next']: AttrValue; + ['nav-prev']: AttrValue; + ['nav-right']: AttrValue; + ['nav-up']: AttrValue; + ['nav-up-left']: AttrValue; + ['nav-up-right']: AttrValue; + ['opacity']: AttrValue; + ['overflow']: AttrValue; + ['pathLength']: AttrValue; + ['pointer-events']: AttrValue; + ['requiredExtensions']: AttrValue; + ['requiredFeatures']: AttrValue; + ['requiredFonts']: AttrValue; + ['requiredFormats']: AttrValue; + ['rx']: AttrValue; + ['ry']: AttrValue; + ['shape-rendering']: AttrValue; + ['stop-color']: AttrValue; + ['stop-opacity']: AttrValue; + ['stroke']: AttrValue; + ['stroke-dasharray']: AttrValue; + ['stroke-dashoffset']: AttrValue; + ['stroke-linecap']: AttrValue; + ['stroke-linejoin']: AttrValue; + ['stroke-miterlimit']: AttrValue; + ['stroke-opacity']: AttrValue; + ['stroke-width']: AttrValue; + ['systemLanguage']: AttrValue; + ['text-anchor']: AttrValue; + ['text-decoration']: AttrValue; + ['text-rendering']: AttrValue; + ['transform']: AttrValue; + ['unicode-bidi']: AttrValue; + ['visibility']: AttrValue; + ['width']: AttrValue; + ['word-spacing']: AttrValue; + ['writing-mode']: AttrValue; + ['x']: AttrValue; + ['y']: AttrValue; + } + interface SVGScriptElementAttributes extends GenericAttributes { + ['crossorigin']: AttrValue; + ['externalResourcesRequired']: AttrValue; + ['href']: AttrValue; + ['type']: AttrValue; + } + interface SVGSetElementAttributes extends GenericAttributes { + ['attributeName']: AttrValue; + ['attributeType']: AttrValue; + ['begin']: AttrValue; + ['dur']: AttrValue; + ['end']: AttrValue; + ['externalResourcesRequired']: AttrValue; + ['fill']: AttrValue; + ['href']: AttrValue; + ['max']: AttrValue; + ['min']: AttrValue; + ['repeatCount']: AttrValue; + ['repeatDur']: AttrValue; + ['requiredExtensions']: AttrValue; + ['requiredFeatures']: AttrValue; + ['requiredFonts']: AttrValue; + ['requiredFormats']: AttrValue; + ['restart']: AttrValue; + ['systemLanguage']: AttrValue; + ['to']: AttrValue; + } + interface SVGStopElementAttributes extends GenericAttributes { + ['alignment-baseline']: AttrValue; + ['baseline-shift']: AttrValue; + ['clip']: AttrValue; + ['clip-path']: AttrValue; + ['clip-rule']: AttrValue; + ['color']: AttrValue; + ['color-interpolation']: AttrValue; + ['color-interpolation-filters']: AttrValue; + ['color-profile']: AttrValue; + ['color-rendering']: AttrValue; + ['cursor']: AttrValue; + ['direction']: AttrValue; + ['display']: AttrValue; + ['dominant-baseline']: AttrValue; + ['enable-background']: AttrValue; + ['fill']: AttrValue; + ['fill-opacity']: AttrValue; + ['fill-rule']: AttrValue; + ['filter']: AttrValue; + ['flood-color']: AttrValue; + ['flood-opacity']: AttrValue; + ['font-family']: AttrValue; + ['font-size']: AttrValue; + ['font-size-adjust']: AttrValue; + ['font-stretch']: AttrValue; + ['font-style']: AttrValue; + ['font-variant']: AttrValue; + ['font-weight']: AttrValue; + ['glyph-orientation-horizontal']: AttrValue; + ['glyph-orientation-vertical']: AttrValue; + ['image-rendering']: AttrValue; + ['kerning']: AttrValue; + ['letter-spacing']: AttrValue; + ['lighting-color']: AttrValue; + ['marker-end']: AttrValue; + ['marker-mid']: AttrValue; + ['marker-start']: AttrValue; + ['mask']: AttrValue; + ['offset']: AttrValue; + ['opacity']: AttrValue; + ['overflow']: AttrValue; + ['pointer-events']: AttrValue; + ['shape-rendering']: AttrValue; + ['stop-color']: AttrValue; + ['stop-opacity']: AttrValue; + ['stroke']: AttrValue; + ['stroke-dasharray']: AttrValue; + ['stroke-dashoffset']: AttrValue; + ['stroke-linecap']: AttrValue; + ['stroke-linejoin']: AttrValue; + ['stroke-miterlimit']: AttrValue; + ['stroke-opacity']: AttrValue; + ['stroke-width']: AttrValue; + ['text-anchor']: AttrValue; + ['text-decoration']: AttrValue; + ['text-rendering']: AttrValue; + ['unicode-bidi']: AttrValue; + ['visibility']: AttrValue; + ['word-spacing']: AttrValue; + ['writing-mode']: AttrValue; + } + interface SVGStyleElementAttributes extends GenericAttributes { + ['media']: AttrValue; + ['title']: AttrValue; + ['type']: AttrValue; + } + interface SVGSVGElementAttributes extends GenericAttributes { + ['alignment-baseline']: AttrValue; + ['baseProfile']: AttrValue; + ['baseline-shift']: AttrValue; + ['clip']: AttrValue; + ['clip-path']: AttrValue; + ['clip-rule']: AttrValue; + ['color']: AttrValue; + ['color-interpolation']: AttrValue; + ['color-interpolation-filters']: AttrValue; + ['color-profile']: AttrValue; + ['color-rendering']: AttrValue; + ['contentScriptType']: AttrValue; + ['contentStyleType']: AttrValue; + ['cursor']: AttrValue; + ['direction']: AttrValue; + ['display']: AttrValue; + ['dominant-baseline']: AttrValue; + ['enable-background']: AttrValue; + ['externalResourcesRequired']: AttrValue; + ['fill']: AttrValue; + ['fill-opacity']: AttrValue; + ['fill-rule']: AttrValue; + ['filter']: AttrValue; + ['flood-color']: AttrValue; + ['flood-opacity']: AttrValue; + ['focusHighlight']: AttrValue; + ['focusable']: AttrValue; + ['font-family']: AttrValue; + ['font-size']: AttrValue; + ['font-size-adjust']: AttrValue; + ['font-stretch']: AttrValue; + ['font-style']: AttrValue; + ['font-variant']: AttrValue; + ['font-weight']: AttrValue; + ['glyph-orientation-horizontal']: AttrValue; + ['glyph-orientation-vertical']: AttrValue; + ['height']: AttrValue; + ['image-rendering']: AttrValue; + ['kerning']: AttrValue; + ['letter-spacing']: AttrValue; + ['lighting-color']: AttrValue; + ['marker-end']: AttrValue; + ['marker-mid']: AttrValue; + ['marker-start']: AttrValue; + ['mask']: AttrValue; + ['nav-down']: AttrValue; + ['nav-down-left']: AttrValue; + ['nav-down-right']: AttrValue; + ['nav-left']: AttrValue; + ['nav-next']: AttrValue; + ['nav-prev']: AttrValue; + ['nav-right']: AttrValue; + ['nav-up']: AttrValue; + ['nav-up-left']: AttrValue; + ['nav-up-right']: AttrValue; + ['opacity']: AttrValue; + ['overflow']: AttrValue; + ['playbackOrder']: AttrValue; + ['playbackorder']: AttrValue; + ['pointer-events']: AttrValue; + ['preserveAspectRatio']: AttrValue; + ['requiredExtensions']: AttrValue; + ['requiredFeatures']: AttrValue; + ['shape-rendering']: AttrValue; + ['snapshotTime']: AttrValue; + ['stop-color']: AttrValue; + ['stop-opacity']: AttrValue; + ['stroke']: AttrValue; + ['stroke-dasharray']: AttrValue; + ['stroke-dashoffset']: AttrValue; + ['stroke-linecap']: AttrValue; + ['stroke-linejoin']: AttrValue; + ['stroke-miterlimit']: AttrValue; + ['stroke-opacity']: AttrValue; + ['stroke-width']: AttrValue; + ['syncBehaviorDefault']: AttrValue; + ['syncToleranceDefault']: AttrValue; + ['systemLanguage']: AttrValue; + ['text-anchor']: AttrValue; + ['text-decoration']: AttrValue; + ['text-rendering']: AttrValue; + ['timelineBegin']: AttrValue; + ['timelinebegin']: AttrValue; + ['transform']: AttrValue; + ['unicode-bidi']: AttrValue; + ['version']: AttrValue; + ['viewBox']: AttrValue; + ['visibility']: AttrValue; + ['width']: AttrValue; + ['word-spacing']: AttrValue; + ['writing-mode']: AttrValue; + ['x']: AttrValue; + ['y']: AttrValue; + ['zoomAndPan']: AttrValue; + } + interface SVGSwitchElementAttributes extends GenericAttributes { + ['alignment-baseline']: AttrValue; + ['baseline-shift']: AttrValue; + ['clip']: AttrValue; + ['clip-path']: AttrValue; + ['clip-rule']: AttrValue; + ['color']: AttrValue; + ['color-interpolation']: AttrValue; + ['color-interpolation-filters']: AttrValue; + ['color-profile']: AttrValue; + ['color-rendering']: AttrValue; + ['cursor']: AttrValue; + ['direction']: AttrValue; + ['display']: AttrValue; + ['dominant-baseline']: AttrValue; + ['enable-background']: AttrValue; + ['externalResourcesRequired']: AttrValue; + ['fill']: AttrValue; + ['fill-opacity']: AttrValue; + ['fill-rule']: AttrValue; + ['filter']: AttrValue; + ['flood-color']: AttrValue; + ['flood-opacity']: AttrValue; + ['focusHighlight']: AttrValue; + ['focusable']: AttrValue; + ['font-family']: AttrValue; + ['font-size']: AttrValue; + ['font-size-adjust']: AttrValue; + ['font-stretch']: AttrValue; + ['font-style']: AttrValue; + ['font-variant']: AttrValue; + ['font-weight']: AttrValue; + ['glyph-orientation-horizontal']: AttrValue; + ['glyph-orientation-vertical']: AttrValue; + ['image-rendering']: AttrValue; + ['kerning']: AttrValue; + ['letter-spacing']: AttrValue; + ['lighting-color']: AttrValue; + ['marker-end']: AttrValue; + ['marker-mid']: AttrValue; + ['marker-start']: AttrValue; + ['mask']: AttrValue; + ['nav-down']: AttrValue; + ['nav-down-left']: AttrValue; + ['nav-down-right']: AttrValue; + ['nav-left']: AttrValue; + ['nav-next']: AttrValue; + ['nav-prev']: AttrValue; + ['nav-right']: AttrValue; + ['nav-up']: AttrValue; + ['nav-up-left']: AttrValue; + ['nav-up-right']: AttrValue; + ['opacity']: AttrValue; + ['overflow']: AttrValue; + ['pointer-events']: AttrValue; + ['requiredExtensions']: AttrValue; + ['requiredFeatures']: AttrValue; + ['requiredFonts']: AttrValue; + ['requiredFormats']: AttrValue; + ['shape-rendering']: AttrValue; + ['stop-color']: AttrValue; + ['stop-opacity']: AttrValue; + ['stroke']: AttrValue; + ['stroke-dasharray']: AttrValue; + ['stroke-dashoffset']: AttrValue; + ['stroke-linecap']: AttrValue; + ['stroke-linejoin']: AttrValue; + ['stroke-miterlimit']: AttrValue; + ['stroke-opacity']: AttrValue; + ['stroke-width']: AttrValue; + ['systemLanguage']: AttrValue; + ['text-anchor']: AttrValue; + ['text-decoration']: AttrValue; + ['text-rendering']: AttrValue; + ['transform']: AttrValue; + ['unicode-bidi']: AttrValue; + ['visibility']: AttrValue; + ['word-spacing']: AttrValue; + ['writing-mode']: AttrValue; + } + interface SVGSymbolElementAttributes extends GenericAttributes { + ['alignment-baseline']: AttrValue; + ['baseline-shift']: AttrValue; + ['clip']: AttrValue; + ['clip-path']: AttrValue; + ['clip-rule']: AttrValue; + ['color']: AttrValue; + ['color-interpolation']: AttrValue; + ['color-interpolation-filters']: AttrValue; + ['color-profile']: AttrValue; + ['color-rendering']: AttrValue; + ['cursor']: AttrValue; + ['direction']: AttrValue; + ['display']: AttrValue; + ['dominant-baseline']: AttrValue; + ['enable-background']: AttrValue; + ['externalResourcesRequired']: AttrValue; + ['fill']: AttrValue; + ['fill-opacity']: AttrValue; + ['fill-rule']: AttrValue; + ['filter']: AttrValue; + ['flood-color']: AttrValue; + ['flood-opacity']: AttrValue; + ['font-family']: AttrValue; + ['font-size']: AttrValue; + ['font-size-adjust']: AttrValue; + ['font-stretch']: AttrValue; + ['font-style']: AttrValue; + ['font-variant']: AttrValue; + ['font-weight']: AttrValue; + ['glyph-orientation-horizontal']: AttrValue; + ['glyph-orientation-vertical']: AttrValue; + ['height']: AttrValue; + ['image-rendering']: AttrValue; + ['kerning']: AttrValue; + ['letter-spacing']: AttrValue; + ['lighting-color']: AttrValue; + ['marker-end']: AttrValue; + ['marker-mid']: AttrValue; + ['marker-start']: AttrValue; + ['mask']: AttrValue; + ['opacity']: AttrValue; + ['overflow']: AttrValue; + ['pointer-events']: AttrValue; + ['preserveAspectRatio']: AttrValue; + ['refX']: AttrValue; + ['refY']: AttrValue; + ['shape-rendering']: AttrValue; + ['stop-color']: AttrValue; + ['stop-opacity']: AttrValue; + ['stroke']: AttrValue; + ['stroke-dasharray']: AttrValue; + ['stroke-dashoffset']: AttrValue; + ['stroke-linecap']: AttrValue; + ['stroke-linejoin']: AttrValue; + ['stroke-miterlimit']: AttrValue; + ['stroke-opacity']: AttrValue; + ['stroke-width']: AttrValue; + ['text-anchor']: AttrValue; + ['text-decoration']: AttrValue; + ['text-rendering']: AttrValue; + ['unicode-bidi']: AttrValue; + ['viewBox']: AttrValue; + ['visibility']: AttrValue; + ['width']: AttrValue; + ['word-spacing']: AttrValue; + ['writing-mode']: AttrValue; + ['x']: AttrValue; + ['y']: AttrValue; + } + interface SVGTextElementAttributes extends GenericAttributes { + ['alignment-baseline']: AttrValue; + ['baseline-shift']: AttrValue; + ['clip']: AttrValue; + ['clip-path']: AttrValue; + ['clip-rule']: AttrValue; + ['color']: AttrValue; + ['color-interpolation']: AttrValue; + ['color-interpolation-filters']: AttrValue; + ['color-profile']: AttrValue; + ['color-rendering']: AttrValue; + ['cursor']: AttrValue; + ['direction']: AttrValue; + ['display']: AttrValue; + ['dominant-baseline']: AttrValue; + ['dx']: AttrValue; + ['dy']: AttrValue; + ['editable']: AttrValue; + ['enable-background']: AttrValue; + ['externalResourcesRequired']: AttrValue; + ['fill']: AttrValue; + ['fill-opacity']: AttrValue; + ['fill-rule']: AttrValue; + ['filter']: AttrValue; + ['flood-color']: AttrValue; + ['flood-opacity']: AttrValue; + ['focusHighlight']: AttrValue; + ['focusable']: AttrValue; + ['font-family']: AttrValue; + ['font-size']: AttrValue; + ['font-size-adjust']: AttrValue; + ['font-stretch']: AttrValue; + ['font-style']: AttrValue; + ['font-variant']: AttrValue; + ['font-weight']: AttrValue; + ['glyph-orientation-horizontal']: AttrValue; + ['glyph-orientation-vertical']: AttrValue; + ['image-rendering']: AttrValue; + ['kerning']: AttrValue; + ['lengthAdjust']: AttrValue; + ['letter-spacing']: AttrValue; + ['lighting-color']: AttrValue; + ['marker-end']: AttrValue; + ['marker-mid']: AttrValue; + ['marker-start']: AttrValue; + ['mask']: AttrValue; + ['nav-down']: AttrValue; + ['nav-down-left']: AttrValue; + ['nav-down-right']: AttrValue; + ['nav-left']: AttrValue; + ['nav-next']: AttrValue; + ['nav-prev']: AttrValue; + ['nav-right']: AttrValue; + ['nav-up']: AttrValue; + ['nav-up-left']: AttrValue; + ['nav-up-right']: AttrValue; + ['opacity']: AttrValue; + ['overflow']: AttrValue; + ['pointer-events']: AttrValue; + ['requiredExtensions']: AttrValue; + ['requiredFeatures']: AttrValue; + ['requiredFonts']: AttrValue; + ['requiredFormats']: AttrValue; + ['rotate']: AttrValue; + ['shape-rendering']: AttrValue; + ['stop-color']: AttrValue; + ['stop-opacity']: AttrValue; + ['stroke']: AttrValue; + ['stroke-dasharray']: AttrValue; + ['stroke-dashoffset']: AttrValue; + ['stroke-linecap']: AttrValue; + ['stroke-linejoin']: AttrValue; + ['stroke-miterlimit']: AttrValue; + ['stroke-opacity']: AttrValue; + ['stroke-width']: AttrValue; + ['systemLanguage']: AttrValue; + ['text-anchor']: AttrValue; + ['text-decoration']: AttrValue; + ['text-rendering']: AttrValue; + ['textLength']: AttrValue; + ['transform']: AttrValue; + ['unicode-bidi']: AttrValue; + ['visibility']: AttrValue; + ['word-spacing']: AttrValue; + ['writing-mode']: AttrValue; + ['x']: AttrValue; + ['y']: AttrValue; + } + interface SVGTextPathElementAttributes extends GenericAttributes { + ['alignment-baseline']: AttrValue; + ['baseline-shift']: AttrValue; + ['clip']: AttrValue; + ['clip-path']: AttrValue; + ['clip-rule']: AttrValue; + ['color']: AttrValue; + ['color-interpolation']: AttrValue; + ['color-interpolation-filters']: AttrValue; + ['color-profile']: AttrValue; + ['color-rendering']: AttrValue; + ['cursor']: AttrValue; + ['direction']: AttrValue; + ['display']: AttrValue; + ['dominant-baseline']: AttrValue; + ['enable-background']: AttrValue; + ['externalResourcesRequired']: AttrValue; + ['fill']: AttrValue; + ['fill-opacity']: AttrValue; + ['fill-rule']: AttrValue; + ['filter']: AttrValue; + ['flood-color']: AttrValue; + ['flood-opacity']: AttrValue; + ['font-family']: AttrValue; + ['font-size']: AttrValue; + ['font-size-adjust']: AttrValue; + ['font-stretch']: AttrValue; + ['font-style']: AttrValue; + ['font-variant']: AttrValue; + ['font-weight']: AttrValue; + ['glyph-orientation-horizontal']: AttrValue; + ['glyph-orientation-vertical']: AttrValue; + ['href']: AttrValue; + ['image-rendering']: AttrValue; + ['kerning']: AttrValue; + ['lengthAdjust']: AttrValue; + ['letter-spacing']: AttrValue; + ['lighting-color']: AttrValue; + ['marker-end']: AttrValue; + ['marker-mid']: AttrValue; + ['marker-start']: AttrValue; + ['mask']: AttrValue; + ['method']: AttrValue; + ['opacity']: AttrValue; + ['overflow']: AttrValue; + ['path']: AttrValue; + ['pointer-events']: AttrValue; + ['requiredExtensions']: AttrValue; + ['requiredFeatures']: AttrValue; + ['shape-rendering']: AttrValue; + ['side']: AttrValue; + ['spacing']: AttrValue; + ['startOffset']: AttrValue; + ['stop-color']: AttrValue; + ['stop-opacity']: AttrValue; + ['stroke']: AttrValue; + ['stroke-dasharray']: AttrValue; + ['stroke-dashoffset']: AttrValue; + ['stroke-linecap']: AttrValue; + ['stroke-linejoin']: AttrValue; + ['stroke-miterlimit']: AttrValue; + ['stroke-opacity']: AttrValue; + ['stroke-width']: AttrValue; + ['systemLanguage']: AttrValue; + ['text-anchor']: AttrValue; + ['text-decoration']: AttrValue; + ['text-rendering']: AttrValue; + ['textLength']: AttrValue; + ['unicode-bidi']: AttrValue; + ['visibility']: AttrValue; + ['word-spacing']: AttrValue; + ['writing-mode']: AttrValue; + } + interface SVGTitleElementAttributes extends GenericAttributes { + ['requiredExtensions']: AttrValue; + ['requiredFeatures']: AttrValue; + ['requiredFonts']: AttrValue; + ['requiredFormats']: AttrValue; + ['systemLanguage']: AttrValue; + } + interface SVGTSpanElementAttributes extends GenericAttributes { + ['alignment-baseline']: AttrValue; + ['baseline-shift']: AttrValue; + ['clip']: AttrValue; + ['clip-path']: AttrValue; + ['clip-rule']: AttrValue; + ['color']: AttrValue; + ['color-interpolation']: AttrValue; + ['color-interpolation-filters']: AttrValue; + ['color-profile']: AttrValue; + ['color-rendering']: AttrValue; + ['cursor']: AttrValue; + ['direction']: AttrValue; + ['display']: AttrValue; + ['dominant-baseline']: AttrValue; + ['dx']: AttrValue; + ['dy']: AttrValue; + ['enable-background']: AttrValue; + ['externalResourcesRequired']: AttrValue; + ['fill']: AttrValue; + ['fill-opacity']: AttrValue; + ['fill-rule']: AttrValue; + ['filter']: AttrValue; + ['flood-color']: AttrValue; + ['flood-opacity']: AttrValue; + ['focusHighlight']: AttrValue; + ['focusable']: AttrValue; + ['font-family']: AttrValue; + ['font-size']: AttrValue; + ['font-size-adjust']: AttrValue; + ['font-stretch']: AttrValue; + ['font-style']: AttrValue; + ['font-variant']: AttrValue; + ['font-weight']: AttrValue; + ['glyph-orientation-horizontal']: AttrValue; + ['glyph-orientation-vertical']: AttrValue; + ['image-rendering']: AttrValue; + ['kerning']: AttrValue; + ['lengthAdjust']: AttrValue; + ['letter-spacing']: AttrValue; + ['lighting-color']: AttrValue; + ['marker-end']: AttrValue; + ['marker-mid']: AttrValue; + ['marker-start']: AttrValue; + ['mask']: AttrValue; + ['nav-down']: AttrValue; + ['nav-down-left']: AttrValue; + ['nav-down-right']: AttrValue; + ['nav-left']: AttrValue; + ['nav-next']: AttrValue; + ['nav-prev']: AttrValue; + ['nav-right']: AttrValue; + ['nav-up']: AttrValue; + ['nav-up-left']: AttrValue; + ['nav-up-right']: AttrValue; + ['opacity']: AttrValue; + ['overflow']: AttrValue; + ['pointer-events']: AttrValue; + ['requiredExtensions']: AttrValue; + ['requiredFeatures']: AttrValue; + ['requiredFonts']: AttrValue; + ['requiredFormats']: AttrValue; + ['rotate']: AttrValue; + ['shape-rendering']: AttrValue; + ['stop-color']: AttrValue; + ['stop-opacity']: AttrValue; + ['stroke']: AttrValue; + ['stroke-dasharray']: AttrValue; + ['stroke-dashoffset']: AttrValue; + ['stroke-linecap']: AttrValue; + ['stroke-linejoin']: AttrValue; + ['stroke-miterlimit']: AttrValue; + ['stroke-opacity']: AttrValue; + ['stroke-width']: AttrValue; + ['systemLanguage']: AttrValue; + ['text-anchor']: AttrValue; + ['text-decoration']: AttrValue; + ['text-rendering']: AttrValue; + ['textLength']: AttrValue; + ['unicode-bidi']: AttrValue; + ['visibility']: AttrValue; + ['word-spacing']: AttrValue; + ['writing-mode']: AttrValue; + ['x']: AttrValue; + ['y']: AttrValue; + } + interface SVGUseElementAttributes extends GenericAttributes { + ['alignment-baseline']: AttrValue; + ['baseline-shift']: AttrValue; + ['clip']: AttrValue; + ['clip-path']: AttrValue; + ['clip-rule']: AttrValue; + ['color']: AttrValue; + ['color-interpolation']: AttrValue; + ['color-interpolation-filters']: AttrValue; + ['color-profile']: AttrValue; + ['color-rendering']: AttrValue; + ['cursor']: AttrValue; + ['direction']: AttrValue; + ['display']: AttrValue; + ['dominant-baseline']: AttrValue; + ['enable-background']: AttrValue; + ['externalResourcesRequired']: AttrValue; + ['fill']: AttrValue; + ['fill-opacity']: AttrValue; + ['fill-rule']: AttrValue; + ['filter']: AttrValue; + ['flood-color']: AttrValue; + ['flood-opacity']: AttrValue; + ['focusHighlight']: AttrValue; + ['focusable']: AttrValue; + ['font-family']: AttrValue; + ['font-size']: AttrValue; + ['font-size-adjust']: AttrValue; + ['font-stretch']: AttrValue; + ['font-style']: AttrValue; + ['font-variant']: AttrValue; + ['font-weight']: AttrValue; + ['glyph-orientation-horizontal']: AttrValue; + ['glyph-orientation-vertical']: AttrValue; + ['height']: AttrValue; + ['href']: AttrValue; + ['image-rendering']: AttrValue; + ['kerning']: AttrValue; + ['letter-spacing']: AttrValue; + ['lighting-color']: AttrValue; + ['marker-end']: AttrValue; + ['marker-mid']: AttrValue; + ['marker-start']: AttrValue; + ['mask']: AttrValue; + ['nav-down']: AttrValue; + ['nav-down-left']: AttrValue; + ['nav-down-right']: AttrValue; + ['nav-left']: AttrValue; + ['nav-next']: AttrValue; + ['nav-prev']: AttrValue; + ['nav-right']: AttrValue; + ['nav-up']: AttrValue; + ['nav-up-left']: AttrValue; + ['nav-up-right']: AttrValue; + ['opacity']: AttrValue; + ['overflow']: AttrValue; + ['pointer-events']: AttrValue; + ['requiredExtensions']: AttrValue; + ['requiredFeatures']: AttrValue; + ['requiredFonts']: AttrValue; + ['requiredFormats']: AttrValue; + ['shape-rendering']: AttrValue; + ['stop-color']: AttrValue; + ['stop-opacity']: AttrValue; + ['stroke']: AttrValue; + ['stroke-dasharray']: AttrValue; + ['stroke-dashoffset']: AttrValue; + ['stroke-linecap']: AttrValue; + ['stroke-linejoin']: AttrValue; + ['stroke-miterlimit']: AttrValue; + ['stroke-opacity']: AttrValue; + ['stroke-width']: AttrValue; + ['systemLanguage']: AttrValue; + ['text-anchor']: AttrValue; + ['text-decoration']: AttrValue; + ['text-rendering']: AttrValue; + ['transform']: AttrValue; + ['unicode-bidi']: AttrValue; + ['visibility']: AttrValue; + ['width']: AttrValue; + ['word-spacing']: AttrValue; + ['writing-mode']: AttrValue; + ['x']: AttrValue; + ['y']: AttrValue; + } + interface SVGViewElementAttributes extends GenericAttributes { + ['externalResourcesRequired']: AttrValue; + ['preserveAspectRatio']: AttrValue; + ['viewBox']: AttrValue; + ['viewTarget']: AttrValue; + ['zoomAndPan']: AttrValue; + } + interface SvgElements { + ['SVGAElement']: SVGAElementAttributes; + ['SVGAnimateElement']: SVGAnimateElementAttributes; + ['SVGAnimateMotionElement']: SVGAnimateMotionElementAttributes; + ['SVGAnimateTransformElement']: SVGAnimateTransformElementAttributes; + ['SVGCircleElement']: SVGCircleElementAttributes; + ['SVGClipPathElement']: SVGClipPathElementAttributes; + ['SVGDefsElement']: SVGDefsElementAttributes; + ['SVGDescElement']: SVGDescElementAttributes; + ['SVGEllipseElement']: SVGEllipseElementAttributes; + ['SVGFEBlendElement']: SVGFEBlendElementAttributes; + ['SVGFEColorMatrixElement']: SVGFEColorMatrixElementAttributes; + ['SVGFEComponentTransferElement']: SVGFEComponentTransferElementAttributes; + ['SVGFECompositeElement']: SVGFECompositeElementAttributes; + ['SVGFEConvolveMatrixElement']: SVGFEConvolveMatrixElementAttributes; + ['SVGFEDiffuseLightingElement']: SVGFEDiffuseLightingElementAttributes; + ['SVGFEDisplacementMapElement']: SVGFEDisplacementMapElementAttributes; + ['SVGFEDistantLightElement']: SVGFEDistantLightElementAttributes; + ['SVGFEDropShadowElement']: SVGFEDropShadowElementAttributes; + ['SVGFEFloodElement']: SVGFEFloodElementAttributes; + ['SVGFEFuncAElement']: SVGFEFuncAElementAttributes; + ['SVGFEFuncBElement']: SVGFEFuncBElementAttributes; + ['SVGFEFuncGElement']: SVGFEFuncGElementAttributes; + ['SVGFEFuncRElement']: SVGFEFuncRElementAttributes; + ['SVGFEGaussianBlurElement']: SVGFEGaussianBlurElementAttributes; + ['SVGFEImageElement']: SVGFEImageElementAttributes; + ['SVGFEMergeElement']: SVGFEMergeElementAttributes; + ['SVGFEMergeNodeElement']: SVGFEMergeNodeElementAttributes; + ['SVGFEMorphologyElement']: SVGFEMorphologyElementAttributes; + ['SVGFEOffsetElement']: SVGFEOffsetElementAttributes; + ['SVGFEPointLightElement']: SVGFEPointLightElementAttributes; + ['SVGFESpecularLightingElement']: SVGFESpecularLightingElementAttributes; + ['SVGFESpotLightElement']: SVGFESpotLightElementAttributes; + ['SVGFETileElement']: SVGFETileElementAttributes; + ['SVGFETurbulenceElement']: SVGFETurbulenceElementAttributes; + ['SVGFilterElement']: SVGFilterElementAttributes; + ['SVGForeignObjectElement']: SVGForeignObjectElementAttributes; + ['SVGGElement']: SVGGElementAttributes; + ['SVGImageElement']: SVGImageElementAttributes; + ['SVGLineElement']: SVGLineElementAttributes; + ['SVGLinearGradientElement']: SVGLinearGradientElementAttributes; + ['SVGMarkerElement']: SVGMarkerElementAttributes; + ['SVGMaskElement']: SVGMaskElementAttributes; + ['SVGMetadataElement']: SVGMetadataElementAttributes; + ['SVGMPathElement']: SVGMPathElementAttributes; + ['SVGPathElement']: SVGPathElementAttributes; + ['SVGPatternElement']: SVGPatternElementAttributes; + ['SVGPolygonElement']: SVGPolygonElementAttributes; + ['SVGPolylineElement']: SVGPolylineElementAttributes; + ['SVGRadialGradientElement']: SVGRadialGradientElementAttributes; + ['SVGRectElement']: SVGRectElementAttributes; + ['SVGScriptElement']: SVGScriptElementAttributes; + ['SVGSetElement']: SVGSetElementAttributes; + ['SVGStopElement']: SVGStopElementAttributes; + ['SVGStyleElement']: SVGStyleElementAttributes; + ['SVGSVGElement']: SVGSVGElementAttributes; + ['SVGSwitchElement']: SVGSwitchElementAttributes; + ['SVGSymbolElement']: SVGSymbolElementAttributes; + ['SVGTextElement']: SVGTextElementAttributes; + ['SVGTextPathElement']: SVGTextPathElementAttributes; + ['SVGTitleElement']: SVGTitleElementAttributes; + ['SVGTSpanElement']: SVGTSpanElementAttributes; + ['SVGUseElement']: SVGUseElementAttributes; + ['SVGViewElement']: SVGViewElementAttributes; + } +} diff --git a/packages/template/-private/dsl/emit.d.ts b/packages/template/-private/dsl/emit.d.ts index a6920e511..6438adee0 100644 --- a/packages/template/-private/dsl/emit.d.ts +++ b/packages/template/-private/dsl/emit.d.ts @@ -9,7 +9,12 @@ import { TemplateContext, NamedArgs, } from '../integration'; -import { ElementForTagName } from './types'; +import { + AttributesForElement, + ElementForTagName, + MathMlElementForTagName, + SVGElementForTagName, +} from './types'; /** * Used during emit to denote an object literal that corresponds @@ -44,9 +49,23 @@ export declare function emitContent(value: ContentValue): void; * applyModifier(__glintY__.element, resolve(on)({}, 'click', this.clicked)); * }); */ -export declare function emitElement( +export declare function emitElement( + name: Name, +): { + element: Name extends 'math' + ? MathMlElementForTagName<'math'> + : Name extends 'svg' + ? SVGElementForTagName<'svg'> + : ElementForTagName; +}; + +export declare function emitSVGElement( + name: Name, +): { element: SVGElementForTagName }; + +export declare function emitMathMlElement( name: Name, -): { element: ElementForTagName }; +): { element: MathMlElementForTagName }; /* * Emits the given value as an entity that expects to receive blocks @@ -135,7 +154,10 @@ export declare function applySplattributes< *
* */ -export declare function applyAttributes(element: Element, attrs: Record): void; +export declare function applyAttributes( + element: T, + attrs: Partial>, +): void; /* * Applies a modifier to an element or component. diff --git a/packages/template/-private/dsl/lib.dom.augmentation.d.ts b/packages/template/-private/dsl/lib.dom.augmentation.d.ts new file mode 100644 index 000000000..8893bbec2 --- /dev/null +++ b/packages/template/-private/dsl/lib.dom.augmentation.d.ts @@ -0,0 +1,508 @@ +//generated by scrips/build-augmentations.mjs +export const GlintSymbol: unique symbol = Symbol(); + +declare global { + interface HTMLAnchorElement { + [GlintSymbol]: 'HTMLAnchorElement'; + } + + interface HTMLElement { + [GlintSymbol]: 'HTMLElement'; + } + + interface HTMLAreaElement { + [GlintSymbol]: 'HTMLAreaElement'; + } + + interface HTMLAudioElement { + [GlintSymbol]: 'HTMLAudioElement'; + } + + interface HTMLBaseElement { + [GlintSymbol]: 'HTMLBaseElement'; + } + + interface HTMLQuoteElement { + [GlintSymbol]: 'HTMLQuoteElement'; + } + + interface HTMLBodyElement { + [GlintSymbol]: 'HTMLBodyElement'; + } + + interface HTMLBRElement { + [GlintSymbol]: 'HTMLBRElement'; + } + + interface HTMLButtonElement { + [GlintSymbol]: 'HTMLButtonElement'; + } + + interface HTMLCanvasElement { + [GlintSymbol]: 'HTMLCanvasElement'; + } + + interface HTMLTableCaptionElement { + [GlintSymbol]: 'HTMLTableCaptionElement'; + } + + interface HTMLTableColElement { + [GlintSymbol]: 'HTMLTableColElement'; + } + + interface HTMLDataElement { + [GlintSymbol]: 'HTMLDataElement'; + } + + interface HTMLDataListElement { + [GlintSymbol]: 'HTMLDataListElement'; + } + + interface HTMLModElement { + [GlintSymbol]: 'HTMLModElement'; + } + + interface HTMLDetailsElement { + [GlintSymbol]: 'HTMLDetailsElement'; + } + + interface HTMLDialogElement { + [GlintSymbol]: 'HTMLDialogElement'; + } + + interface HTMLDivElement { + [GlintSymbol]: 'HTMLDivElement'; + } + + interface HTMLDListElement { + [GlintSymbol]: 'HTMLDListElement'; + } + + interface HTMLEmbedElement { + [GlintSymbol]: 'HTMLEmbedElement'; + } + + interface HTMLFieldSetElement { + [GlintSymbol]: 'HTMLFieldSetElement'; + } + + interface HTMLFormElement { + [GlintSymbol]: 'HTMLFormElement'; + } + + interface HTMLHeadingElement { + [GlintSymbol]: 'HTMLHeadingElement'; + } + + interface HTMLHeadElement { + [GlintSymbol]: 'HTMLHeadElement'; + } + + interface HTMLHRElement { + [GlintSymbol]: 'HTMLHRElement'; + } + + interface HTMLHtmlElement { + [GlintSymbol]: 'HTMLHtmlElement'; + } + + interface HTMLIFrameElement { + [GlintSymbol]: 'HTMLIFrameElement'; + } + + interface HTMLImageElement { + [GlintSymbol]: 'HTMLImageElement'; + } + + interface HTMLInputElement { + [GlintSymbol]: 'HTMLInputElement'; + } + + interface HTMLLabelElement { + [GlintSymbol]: 'HTMLLabelElement'; + } + + interface HTMLLegendElement { + [GlintSymbol]: 'HTMLLegendElement'; + } + + interface HTMLLIElement { + [GlintSymbol]: 'HTMLLIElement'; + } + + interface HTMLLinkElement { + [GlintSymbol]: 'HTMLLinkElement'; + } + + interface HTMLMapElement { + [GlintSymbol]: 'HTMLMapElement'; + } + + interface HTMLMenuElement { + [GlintSymbol]: 'HTMLMenuElement'; + } + + interface HTMLMetaElement { + [GlintSymbol]: 'HTMLMetaElement'; + } + + interface HTMLMeterElement { + [GlintSymbol]: 'HTMLMeterElement'; + } + + interface HTMLObjectElement { + [GlintSymbol]: 'HTMLObjectElement'; + } + + interface HTMLOListElement { + [GlintSymbol]: 'HTMLOListElement'; + } + + interface HTMLOptGroupElement { + [GlintSymbol]: 'HTMLOptGroupElement'; + } + + interface HTMLOptionElement { + [GlintSymbol]: 'HTMLOptionElement'; + } + + interface HTMLOutputElement { + [GlintSymbol]: 'HTMLOutputElement'; + } + + interface HTMLParagraphElement { + [GlintSymbol]: 'HTMLParagraphElement'; + } + + interface HTMLPictureElement { + [GlintSymbol]: 'HTMLPictureElement'; + } + + interface HTMLPreElement { + [GlintSymbol]: 'HTMLPreElement'; + } + + interface HTMLProgressElement { + [GlintSymbol]: 'HTMLProgressElement'; + } + + interface HTMLScriptElement { + [GlintSymbol]: 'HTMLScriptElement'; + } + + interface HTMLSelectElement { + [GlintSymbol]: 'HTMLSelectElement'; + } + + interface HTMLSlotElement { + [GlintSymbol]: 'HTMLSlotElement'; + } + + interface HTMLSourceElement { + [GlintSymbol]: 'HTMLSourceElement'; + } + + interface HTMLSpanElement { + [GlintSymbol]: 'HTMLSpanElement'; + } + + interface HTMLStyleElement { + [GlintSymbol]: 'HTMLStyleElement'; + } + + interface HTMLTableElement { + [GlintSymbol]: 'HTMLTableElement'; + } + + interface HTMLTableSectionElement { + [GlintSymbol]: 'HTMLTableSectionElement'; + } + + interface HTMLTableCellElement { + [GlintSymbol]: 'HTMLTableCellElement'; + } + + interface HTMLTemplateElement { + [GlintSymbol]: 'HTMLTemplateElement'; + } + + interface HTMLTextAreaElement { + [GlintSymbol]: 'HTMLTextAreaElement'; + } + + interface HTMLTimeElement { + [GlintSymbol]: 'HTMLTimeElement'; + } + + interface HTMLTitleElement { + [GlintSymbol]: 'HTMLTitleElement'; + } + + interface HTMLTableRowElement { + [GlintSymbol]: 'HTMLTableRowElement'; + } + + interface HTMLTrackElement { + [GlintSymbol]: 'HTMLTrackElement'; + } + + interface HTMLUListElement { + [GlintSymbol]: 'HTMLUListElement'; + } + + interface HTMLVideoElement { + [GlintSymbol]: 'HTMLVideoElement'; + } + + interface SVGAElement { + [GlintSymbol]: 'SVGAElement'; + } + + interface SVGAnimateElement { + [GlintSymbol]: 'SVGAnimateElement'; + } + + interface SVGAnimateMotionElement { + [GlintSymbol]: 'SVGAnimateMotionElement'; + } + + interface SVGAnimateTransformElement { + [GlintSymbol]: 'SVGAnimateTransformElement'; + } + + interface SVGCircleElement { + [GlintSymbol]: 'SVGCircleElement'; + } + + interface SVGClipPathElement { + [GlintSymbol]: 'SVGClipPathElement'; + } + + interface SVGDefsElement { + [GlintSymbol]: 'SVGDefsElement'; + } + + interface SVGDescElement { + [GlintSymbol]: 'SVGDescElement'; + } + + interface SVGEllipseElement { + [GlintSymbol]: 'SVGEllipseElement'; + } + + interface SVGFEBlendElement { + [GlintSymbol]: 'SVGFEBlendElement'; + } + + interface SVGFEColorMatrixElement { + [GlintSymbol]: 'SVGFEColorMatrixElement'; + } + + interface SVGFEComponentTransferElement { + [GlintSymbol]: 'SVGFEComponentTransferElement'; + } + + interface SVGFECompositeElement { + [GlintSymbol]: 'SVGFECompositeElement'; + } + + interface SVGFEConvolveMatrixElement { + [GlintSymbol]: 'SVGFEConvolveMatrixElement'; + } + + interface SVGFEDiffuseLightingElement { + [GlintSymbol]: 'SVGFEDiffuseLightingElement'; + } + + interface SVGFEDisplacementMapElement { + [GlintSymbol]: 'SVGFEDisplacementMapElement'; + } + + interface SVGFEDistantLightElement { + [GlintSymbol]: 'SVGFEDistantLightElement'; + } + + interface SVGFEDropShadowElement { + [GlintSymbol]: 'SVGFEDropShadowElement'; + } + + interface SVGFEFloodElement { + [GlintSymbol]: 'SVGFEFloodElement'; + } + + interface SVGFEFuncAElement { + [GlintSymbol]: 'SVGFEFuncAElement'; + } + + interface SVGFEFuncBElement { + [GlintSymbol]: 'SVGFEFuncBElement'; + } + + interface SVGFEFuncGElement { + [GlintSymbol]: 'SVGFEFuncGElement'; + } + + interface SVGFEFuncRElement { + [GlintSymbol]: 'SVGFEFuncRElement'; + } + + interface SVGFEGaussianBlurElement { + [GlintSymbol]: 'SVGFEGaussianBlurElement'; + } + + interface SVGFEImageElement { + [GlintSymbol]: 'SVGFEImageElement'; + } + + interface SVGFEMergeElement { + [GlintSymbol]: 'SVGFEMergeElement'; + } + + interface SVGFEMergeNodeElement { + [GlintSymbol]: 'SVGFEMergeNodeElement'; + } + + interface SVGFEMorphologyElement { + [GlintSymbol]: 'SVGFEMorphologyElement'; + } + + interface SVGFEOffsetElement { + [GlintSymbol]: 'SVGFEOffsetElement'; + } + + interface SVGFEPointLightElement { + [GlintSymbol]: 'SVGFEPointLightElement'; + } + + interface SVGFESpecularLightingElement { + [GlintSymbol]: 'SVGFESpecularLightingElement'; + } + + interface SVGFESpotLightElement { + [GlintSymbol]: 'SVGFESpotLightElement'; + } + + interface SVGFETileElement { + [GlintSymbol]: 'SVGFETileElement'; + } + + interface SVGFETurbulenceElement { + [GlintSymbol]: 'SVGFETurbulenceElement'; + } + + interface SVGFilterElement { + [GlintSymbol]: 'SVGFilterElement'; + } + + interface SVGForeignObjectElement { + [GlintSymbol]: 'SVGForeignObjectElement'; + } + + interface SVGGElement { + [GlintSymbol]: 'SVGGElement'; + } + + interface SVGImageElement { + [GlintSymbol]: 'SVGImageElement'; + } + + interface SVGLineElement { + [GlintSymbol]: 'SVGLineElement'; + } + + interface SVGLinearGradientElement { + [GlintSymbol]: 'SVGLinearGradientElement'; + } + + interface SVGMarkerElement { + [GlintSymbol]: 'SVGMarkerElement'; + } + + interface SVGMaskElement { + [GlintSymbol]: 'SVGMaskElement'; + } + + interface SVGMetadataElement { + [GlintSymbol]: 'SVGMetadataElement'; + } + + interface SVGMPathElement { + [GlintSymbol]: 'SVGMPathElement'; + } + + interface SVGPathElement { + [GlintSymbol]: 'SVGPathElement'; + } + + interface SVGPatternElement { + [GlintSymbol]: 'SVGPatternElement'; + } + + interface SVGPolygonElement { + [GlintSymbol]: 'SVGPolygonElement'; + } + + interface SVGPolylineElement { + [GlintSymbol]: 'SVGPolylineElement'; + } + + interface SVGRadialGradientElement { + [GlintSymbol]: 'SVGRadialGradientElement'; + } + + interface SVGRectElement { + [GlintSymbol]: 'SVGRectElement'; + } + + interface SVGScriptElement { + [GlintSymbol]: 'SVGScriptElement'; + } + + interface SVGSetElement { + [GlintSymbol]: 'SVGSetElement'; + } + + interface SVGStopElement { + [GlintSymbol]: 'SVGStopElement'; + } + + interface SVGStyleElement { + [GlintSymbol]: 'SVGStyleElement'; + } + + interface SVGSVGElement { + [GlintSymbol]: 'SVGSVGElement'; + } + + interface SVGSwitchElement { + [GlintSymbol]: 'SVGSwitchElement'; + } + + interface SVGSymbolElement { + [GlintSymbol]: 'SVGSymbolElement'; + } + + interface SVGTextElement { + [GlintSymbol]: 'SVGTextElement'; + } + + interface SVGTextPathElement { + [GlintSymbol]: 'SVGTextPathElement'; + } + + interface SVGTitleElement { + [GlintSymbol]: 'SVGTitleElement'; + } + + interface SVGTSpanElement { + [GlintSymbol]: 'SVGTSpanElement'; + } + + interface SVGUseElement { + [GlintSymbol]: 'SVGUseElement'; + } + + interface SVGViewElement { + [GlintSymbol]: 'SVGViewElement'; + } +} diff --git a/packages/template/-private/dsl/types.d.ts b/packages/template/-private/dsl/types.d.ts index 866df7dfb..1d359b0ed 100644 --- a/packages/template/-private/dsl/types.d.ts +++ b/packages/template/-private/dsl/types.d.ts @@ -1,3 +1,7 @@ +import { HtmlElementAttributes, SvgElementAttributes } from './elements'; +import { AttrValue } from '../index'; +import { GlintSymbol } from './lib.dom.augmentation'; + /** * A utility for constructing the type of an environment's `resolveOrReturn` from * the type of its `resolve` function. @@ -9,9 +13,25 @@ export type ResolveOrReturn = T & ((item: U) => () => U); * NOTE: This will return a union for elements that exist both in HTML and SVG. Technically, this will be too permissive. */ export type ElementForTagName = Name extends keyof HTMLElementTagNameMap - ? Name extends keyof SVGElementTagNameMap - ? HTMLElementTagNameMap[Name] & SVGElementTagNameMap[Name] - : HTMLElementTagNameMap[Name] - : Name extends keyof SVGElementTagNameMap - ? SVGElementTagNameMap[Name] - : Element; + ? HTMLElementTagNameMap[Name] + : Element; + +export type SVGElementForTagName = Name extends keyof SVGElementTagNameMap + ? SVGElementTagNameMap[Name] + : Element; + +export type MathMlElementForTagName = + Name extends keyof MathMLElementTagNameMap ? MathMLElementTagNameMap[Name] : Element; + +type WithDataAttributes = T & Record<`data-${string}`, AttrValue>; + +export type AttributesForElement< + Elem extends Element, + K = Elem[typeof GlintSymbol], +> = K extends keyof HtmlElementAttributes.HtmlElements + ? WithDataAttributes + : K extends keyof SvgElementAttributes.SvgElements + ? WithDataAttributes + : K extends keyof SvgElementAttributes.SvgElements + ? WithDataAttributes + : Record; diff --git a/packages/template/__tests__/attributes.test.ts b/packages/template/__tests__/attributes.test.ts index 97f5ac92d..40948b0f9 100644 --- a/packages/template/__tests__/attributes.test.ts +++ b/packages/template/__tests__/attributes.test.ts @@ -7,6 +7,8 @@ import { applyAttributes, emitElement, emitComponent, + emitSVGElement, + emitMathMlElement, } from '../-private/dsl'; import TestComponent from './test-component'; import { htmlSafe } from '@ember/template'; @@ -37,6 +39,14 @@ class MyComponent extends TestComponent<{ Element: HTMLImageElement }> { applyModifier(resolve(imageModifier)(ctx.element)); applySplattributes(__glintRef__.element, ctx.element); + applyAttributes(__glintRef__.element, { + src: '', + dir: '', + 'data-test-id': '', + 'data-random': 2, + // @ts-expect-error: this should error + other: '', + }); } }); } @@ -61,7 +71,7 @@ class MyComponent extends TestComponent<{ Element: HTMLImageElement }> { { const component = emitComponent(resolve(MyComponent)()); applySplattributes(new HTMLImageElement(), component.element); - applyAttributes(component.element, { foo: 'bar' }); + applyAttributes(component.element, { src: 'bar' }); } /** @@ -84,6 +94,16 @@ class MyComponent extends TestComponent<{ Element: HTMLImageElement }> { applySplattributes(new SVGSVGElement(), ctx.element); } +/** + * ```handlebars + * + * ``` + */ +{ + const ctx = emitElement('math'); + applySplattributes(new MathMLElement(), ctx.element); +} + /** * ```handlebars * @@ -91,7 +111,7 @@ class MyComponent extends TestComponent<{ Element: HTMLImageElement }> { */ { const ctx = emitElement('a'); - expectTypeOf(ctx).toEqualTypeOf<{ element: HTMLAnchorElement & SVGAElement }>(); + expectTypeOf(ctx).toEqualTypeOf<{ element: HTMLAnchorElement }>(); applyModifier(resolve(anchorModifier)(ctx.element)); } @@ -185,15 +205,15 @@ class MyComponent extends TestComponent<{ Element: HTMLImageElement }> { { applyAttributes(document.createElement('div'), { - string: 'ok', - safeString: htmlSafe('ok'), - number: 123, - bool: false, - null: null, - undefined: undefined, + dir: 'ok', + name: htmlSafe('ok'), + src: 123, + border: false, + 'aria-activedescendant': null, + 'aria-atomic': undefined, // @ts-expect-error: setting a `void` return as an attr makes no sense - nothing: undefined as void, + 'aria-autocomplete': undefined as void, // @ts-expect-error: DOM nodes aren't valid values - div: document.createElement('div'), + allowusermedia: document.createElement('div'), }); } diff --git a/packages/template/package.json b/packages/template/package.json index 643310374..088e41f33 100644 --- a/packages/template/package.json +++ b/packages/template/package.json @@ -29,7 +29,12 @@ "expect-type": "^0.15.0", "sums-up": "^2.1.0", "ember-source": "^6.2.0", - "typescript": ">=5.6.0" + "typescript": ">=5.6.0", + "aria-attributes": "^2.0.1", + "html-element-attributes": "^3.3.0", + "html-event-attributes": "^2.2.0", + "svg-element-attributes": "^2.1.0", + "svg-event-attributes": "^2.0.2" }, "publishConfig": { "access": "public" diff --git a/packages/tsserver-plugin/src/typescript-server-plugin.ts b/packages/tsserver-plugin/src/typescript-server-plugin.ts index 1af32dd01..c7c6c539f 100644 --- a/packages/tsserver-plugin/src/typescript-server-plugin.ts +++ b/packages/tsserver-plugin/src/typescript-server-plugin.ts @@ -1,3 +1,5 @@ +import { TransformedModule } from '@glint/core/lib/transform'; + const { createJiti } = require('jiti'); const jiti = createJiti(__filename); @@ -91,7 +93,8 @@ function proxyLanguageServiceForGlint( const proxyCache = new Map(); const getProxyMethod = (target: ts.LanguageService, p: string | symbol): Function | undefined => { switch (p) { - // case 'getCompletionsAtPosition': return getCompletionsAtPosition(glintOptions, target[p]); + case 'getCompletionsAtPosition': + return getCompletionsAtPosition(ts, language, languageService, asScriptId, target[p]); // case 'getCompletionEntryDetails': return getCompletionEntryDetails(language, asScriptId, target[p]); // case 'getCodeFixesAtPosition': return getCodeFixesAtPosition(target[p]); // case 'getDefinitionAndBoundSpan': return getDefinitionAndBoundSpan(ts, language, languageService, glintOptions, asScriptId, target[p]); @@ -123,6 +126,45 @@ function proxyLanguageServiceForGlint( }); } +function getCompletionsAtPosition( + ts: typeof import('typescript'), + language: any, // Language, + languageService: ts.LanguageService, + asScriptId: (fileName: string) => T, + getCompletionsAtPosition: ts.LanguageService['getCompletionsAtPosition'], +): ts.LanguageService['getCompletionsAtPosition'] { + return (fileName, position, options, formattingSettings) => { + try { + const sourceScript = language.scripts.get(asScriptId(fileName)); + const root = sourceScript?.generated?.root; + const transformedModule: TransformedModule = root?.transformedModule; + const completions = getCompletionsAtPosition(fileName, position, options, formattingSettings); + const transformedRange = transformedModule?.getTransformedRange( + 'disregard.gts', + position, + position, + ); + if (completions && transformedRange) { + // for attribute names on elements, we do not want the wrapping `"`. + if (transformedRange.mapping?.parent?.sourceNode.type === 'ElementNode') { + completions.entries = completions.entries.map((e) => ({ + ...e, + name: e.name.replace(/^"/, '').replace(/"$/, ''), + sortText: e.sortText.replace(/\\"/g, ''), + })); + } + } + + console.log(completions); + return completions!; + } catch (e) { + console.log('error', (e as any)?.message); + console.log(e); + throw e; + } + }; +} + function getSemanticDiagnostics( ts: typeof import('typescript'), language: any, // Language, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e59a2c990..d36bbb28e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -21,6 +21,9 @@ importers: '@typescript-eslint/parser': specifier: ^5.42.1 version: 5.62.0(eslint@8.57.1)(typescript@5.8.2) + aria-attributes: + specifier: ^2.0.1 + version: 2.0.1 chalk: specifier: ^5.4.1 version: 5.4.1 @@ -36,6 +39,12 @@ importers: glob: specifier: ^10.2.4 version: 10.4.5 + html-element-attributes: + specifier: ^3.3.0 + version: 3.4.0 + html-event-attributes: + specifier: ^2.2.0 + version: 2.2.0 mkdirp: specifier: ^3.0.1 version: 3.0.1 @@ -48,6 +57,12 @@ importers: rimraf: specifier: ^6.0.1 version: 6.0.1 + svg-element-attributes: + specifier: ^2.1.0 + version: 2.1.0 + svg-event-attributes: + specifier: ^2.0.2 + version: 2.0.2 typescript: specifier: '>=5.6.0' version: 5.8.2 @@ -206,15 +221,30 @@ importers: '@glimmer/component': specifier: ^1.1.2 version: 1.1.2 + aria-attributes: + specifier: ^2.0.1 + version: 2.0.1 ember-source: specifier: ^6.2.0 version: 6.2.0(@glimmer/component@1.1.2) expect-type: specifier: ^0.15.0 version: 0.15.0 + html-element-attributes: + specifier: ^3.3.0 + version: 3.4.0 + html-event-attributes: + specifier: ^2.2.0 + version: 2.2.0 sums-up: specifier: ^2.1.0 version: 2.2.0 + svg-element-attributes: + specifier: ^2.1.0 + version: 2.1.0 + svg-event-attributes: + specifier: ^2.0.2 + version: 2.0.2 typescript: specifier: '>=5.6.0' version: 5.8.2 @@ -2793,6 +2823,9 @@ packages: argparse@2.0.1: resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} + aria-attributes@2.0.1: + resolution: {integrity: sha512-cxeGg3YamjVap7OLwsl75FfowoKhRlUiXtbL5nKFqvDJ+B51ktWhCdMtMTyYMa+qIzHE5mznODCYDn64asnraQ==} + aria-query@5.3.2: resolution: {integrity: sha512-COROpnaoap1E2F000S62r6A60uHZnmlvomhfyT2DlTcrY1OrBKn2UhH7qn5wTC9zMvD0AY7csdPSNwKP+7WiQw==} engines: {node: '>= 0.4'} @@ -5100,6 +5133,12 @@ packages: resolution: {integrity: sha512-sYKnA7eGln5ov8T8gnYlkSOxFJvywzEx9BueN6xo/GKO8PGiI6uK6xx+DIGe45T3bdVjLAQDQW1aicT8z8JwQg==} engines: {node: ^18.17.0 || >=20.5.0} + html-element-attributes@3.4.0: + resolution: {integrity: sha512-u76G07278nacmHiSKs1yxbB2se0aiuQH8uJidyDMc6har3HRpFAR/sDKrZR426p03vu7QuvPAcaLMhp4kWcRbg==} + + html-event-attributes@2.2.0: + resolution: {integrity: sha512-RMkzFsa/KQQ/j5nXMwjQY3p50IzElwlJAXfckcI8Ea4Od8JiHDkJQ6nJe/D8jzLCn8VE7OW8jSPtnOZETZLtEg==} + htmlparser2@9.1.0: resolution: {integrity: sha512-5zfg6mHUoaer/97TxnGpxmbR7zJtPwIYFMZ/H5ucTlPZhKvtum05yiPK3Mgai3a0DyVxv7qYqoweaEd2nrYQzQ==} @@ -7555,6 +7594,12 @@ packages: resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} engines: {node: '>= 0.4'} + svg-element-attributes@2.1.0: + resolution: {integrity: sha512-Tq0WY3uGw/rltlSlAsro/WWqbg5oNiaRwzq13I9H1m/dYjMjesuxKV76dGSlpacjslGyAis8VIwqPXaUUXw26w==} + + svg-event-attributes@2.0.2: + resolution: {integrity: sha512-q8c6knvA5SccFLurAhSANIgMnYEN+KO7lxV92nr8ORB1pYSe1XSQ9NT57J9kyUJ71krR3th8R3+ufYdo5w7ffA==} + symlink-or-copy@1.3.1: resolution: {integrity: sha512-0K91MEXFpBUaywiwSSkmKjnGcasG/rVBXFLJz5DrgGabpYD6N+3yZrfD6uUIfpuTu65DZLHi7N8CizHc07BPZA==} @@ -10772,6 +10817,8 @@ snapshots: argparse@2.0.1: {} + aria-attributes@2.0.1: {} + aria-query@5.3.2: {} arr-diff@4.0.0: {} @@ -14416,6 +14463,10 @@ snapshots: dependencies: lru-cache: 10.4.3 + html-element-attributes@3.4.0: {} + + html-event-attributes@2.2.0: {} + htmlparser2@9.1.0: dependencies: domelementtype: 2.3.0 @@ -17079,6 +17130,10 @@ snapshots: supports-preserve-symlinks-flag@1.0.0: {} + svg-element-attributes@2.1.0: {} + + svg-event-attributes@2.0.2: {} + symlink-or-copy@1.3.1: {} sync-disk-cache@1.3.4: diff --git a/scripts/build-augmentations.mjs b/scripts/build-augmentations.mjs new file mode 100644 index 000000000..6a08ba6bd --- /dev/null +++ b/scripts/build-augmentations.mjs @@ -0,0 +1,55 @@ +import { parse } from '@babel/parser'; +import { traverse } from '@babel/core'; +import { readFileSync, writeFileSync } from 'fs'; +import { resolve } from 'path'; +import { createRequire } from 'module'; +import { fileURLToPath } from 'url'; + +const require = createRequire(import.meta.url); +const ts = require.resolve('typescript'); +const libDomFile = resolve(ts, '..', 'lib.dom.d.ts'); +const source = readFileSync(libDomFile).toString(); +const ast = parse(source, { + plugins: [['typescript', { dts: true }]], +}); + +const elements = new Set(); +traverse(ast, { + TSInterfaceDeclaration: function (path) { + if (path.node.id.name === 'HTMLElementTagNameMap') { + const items = path.node.body.body; + for (const item of items) { + elements.add(item.typeAnnotation.typeAnnotation.typeName.name); + } + } + if (path.node.id.name === 'SVGElementTagNameMap') { + const items = path.node.body.body; + for (const item of items) { + elements.add(item.typeAnnotation.typeAnnotation.typeName.name); + } + } + }, +}); + +let augmentations = []; +for (const element of elements) { + augmentations.push(` + interface ${element} { + [GlintSymbol]: '${element}'; + }`); +} + +const prefix = `//generated by scrips/build-augmentations.mjs +// this serves to provide a UNIQUE mapping for HtmlElementType -> Html Element Name -> Html Element Attributes +// typesript file lib.dom.d.ts already has e.g. HTMLElementTagNameMap, +// but it does not provide unique types for each element +`; +const filePath = resolve( + fileURLToPath(import.meta.url), + '../../packages/template/-private/dsl/lib.dom.augmentation.d.ts', +); +let content = prefix; +content += 'export const GlintSymbol: unique symbol = Symbol();\n\n'; +content += 'declare global {\n'; +content += augmentations.join('\n\n') + '\n}'; +writeFileSync(filePath, content); diff --git a/scripts/build-elements.mjs b/scripts/build-elements.mjs new file mode 100644 index 000000000..13ad6af2e --- /dev/null +++ b/scripts/build-elements.mjs @@ -0,0 +1,130 @@ +import { htmlElementAttributes } from 'html-element-attributes'; +import { svgElementAttributes } from 'svg-element-attributes'; +import { ariaAttributes } from 'aria-attributes'; +import { htmlEventAttributes } from 'html-event-attributes'; +import { svgEventAttributes } from 'svg-event-attributes'; +import { parse } from '@babel/parser'; +import { traverse } from '@babel/core'; +import { readFileSync, writeFileSync } from 'fs'; +import { resolve } from 'path'; +import { createRequire } from 'module'; +import { fileURLToPath } from 'url'; + +const require = createRequire(import.meta.url); +const ts = require.resolve('typescript'); +const libDomFile = resolve(ts, '..', 'lib.dom.d.ts'); +const source = readFileSync(libDomFile).toString(); +const ast = parse(source, { + plugins: [['typescript', { dts: true }]], +}); + +const htmlElementsMap = new Map(); +const svgElementsMap = new Map(); +const mathmlElementsMap = new Map(); +traverse(ast, { + TSInterfaceDeclaration: function (path) { + if (path.node.id.name === 'HTMLElementTagNameMap') { + const items = path.node.body.body; + for (const item of items) { + htmlElementsMap.set(item.key.value, item.typeAnnotation.typeAnnotation.typeName.name); + } + } + if (path.node.id.name === 'SVGElementTagNameMap') { + const items = path.node.body.body; + for (const item of items) { + svgElementsMap.set(item.key.value, item.typeAnnotation.typeAnnotation.typeName.name); + } + } + if (path.node.id.name === 'MathMLElementTagNameMap') { + const items = path.node.body.body; + for (const item of items) { + mathmlElementsMap.set(item.key.value, item.typeAnnotation.typeAnnotation.typeName.name); + } + } + }, +}); + +function createHtmlElementsAttributesMap() { + let htmlElementsContent = ` +import { AttrValue } from '../index'; +export declare namespace HtmlElementAttributes { +`; + const processed = new Set(); + + let mergedHtmlElements = 'interface HtmlElements {\n'; + Object.entries(htmlElementAttributes).forEach(([name, keys]) => { + if (name === '*') { + name = 'GenericAttributes'; + htmlElementsMap.set(name, 'Generic'); + } + const type = htmlElementsMap.get(name); + if (!type || processed.has(type)) return; + processed.add(type); + const interfaceName = type + 'Attributes'; + const extend = name === 'GenericAttributes' ? '' : 'extends GenericAttributes'; + htmlElementsContent += `interface ${interfaceName} ${extend} {\n`; + keys.forEach((k) => { + htmlElementsContent += ` ['${k}']: AttrValue;\n`; + }); + if (name === 'GenericAttributes') { + ariaAttributes.forEach((k) => { + htmlElementsContent += ` ['${k}']: AttrValue;\n`; + }); + htmlEventAttributes.forEach((k) => { + htmlElementsContent += ` ['${k}']: AttrValue;\n`; + }); + } + htmlElementsContent += '}\n'; + mergedHtmlElements += ` ['${type}']: ${interfaceName};\n`; + }); + + mergedHtmlElements += `}\n`; + + htmlElementsContent += mergedHtmlElements + '}\n'; + return htmlElementsContent; +} + +function createSvgElementAttributesMap() { + let svgElementsContent = ` +export declare namespace SvgElementAttributes { +`; + const processed = new Set(); + let mergedSvgElements = 'interface SvgElements {\n'; + Object.entries(svgElementAttributes).forEach(([name, keys]) => { + if (name === '*') { + name = 'GenericAttributes'; + } + const type = svgElementsMap.get(name); + if (!type || processed.has(type)) { + return; + } + processed.add(type); + const interfaceName = type + 'Attributes'; + const extend = name === 'GenericAttributes' ? '' : 'extends GenericAttributes'; + svgElementsContent += `interface ${interfaceName} ${extend} {\n`; + keys.forEach((k) => { + svgElementsContent += ` ['${k}']: AttrValue;\n`; + }); + if (name === 'GenericAttributes') { + svgEventAttributes.forEach((k) => { + svgElementsContent += ` ['${k}']: AttrValue;\n`; + }); + } + mergedSvgElements += ` ['${type}']: ${interfaceName};\n`; + svgElementsContent += `}\n`; + }); + + mergedSvgElements += `}\n`; + svgElementsContent += mergedSvgElements + '}\n'; + return svgElementsContent; +} + +const prefix = `//generated by scrips/build-elements.mjs +// this server to provide the html attributes for each element +`; +const filePath = resolve( + fileURLToPath(import.meta.url), + '../../packages/template/-private/dsl/elements.d.ts', +); +const content = prefix + createHtmlElementsAttributesMap() + createSvgElementAttributesMap(); +writeFileSync(filePath, content); diff --git a/test-packages/package-test-core/__tests__/language-server/diagnostic-augmentation.test.ts b/test-packages/package-test-core/__tests__/language-server/diagnostic-augmentation.test.ts index 3e1fa915e..a9771aec1 100644 --- a/test-packages/package-test-core/__tests__/language-server/diagnostic-augmentation.test.ts +++ b/test-packages/package-test-core/__tests__/language-server/diagnostic-augmentation.test.ts @@ -156,6 +156,24 @@ describe('Language Server: Diagnostic Augmentation', () => { "line": 10, "offset": 17, }, + "relatedInformation": [ + { + "category": "message", + "code": 6500, + "message": "The expected type comes from property 'onclick' which is declared here on type 'Partial>'", + "span": { + "end": { + "line": 95, + "offset": 16, + }, + "file": "\${testWorkspacePath}.pnpm/@glint+template@file+packages+template/node_modules/@glint/template/-private/dsl/elements.d.ts", + "start": { + "line": 95, + "offset": 5, + }, + }, + }, + ], "start": { "line": 10, "offset": 10, @@ -211,6 +229,24 @@ describe('Language Server: Diagnostic Augmentation', () => { "line": 15, "offset": 17, }, + "relatedInformation": [ + { + "category": "message", + "code": 6500, + "message": "The expected type comes from property 'onclick' which is declared here on type 'Partial>'", + "span": { + "end": { + "line": 95, + "offset": 16, + }, + "file": "\${testWorkspacePath}.pnpm/@glint+template@file+packages+template/node_modules/@glint/template/-private/dsl/elements.d.ts", + "start": { + "line": 95, + "offset": 5, + }, + }, + }, + ], "start": { "line": 15, "offset": 10, diff --git a/test-packages/package-test-core/__tests__/transform/rewrite.test.ts b/test-packages/package-test-core/__tests__/transform/rewrite.test.ts index d7246ae7a..903b706e0 100644 --- a/test-packages/package-test-core/__tests__/transform/rewrite.test.ts +++ b/test-packages/package-test-core/__tests__/transform/rewrite.test.ts @@ -957,7 +957,10 @@ describe('Transform: rewriteModule', () => { { const __glintY__ = __glintDSL__.emitComponent(__glintDSL__.resolve(SmolComp)({ name: "Ember", ...__glintDSL__.NamedArgsMarker })); - __glintY__; + __glintDSL__.applyAttributes(__glintY__.element, { + + + }); } __glintRef__; __glintDSL__; }) satisfies TOC<{ Args: {}, Blocks: {}, Element: null }> diff --git a/test-packages/package-test-core/__tests__/transform/template-to-typescript.test.ts b/test-packages/package-test-core/__tests__/transform/template-to-typescript.test.ts index 416e3b2d5..2b26a2b77 100644 --- a/test-packages/package-test-core/__tests__/transform/template-to-typescript.test.ts +++ b/test-packages/package-test-core/__tests__/transform/template-to-typescript.test.ts @@ -641,6 +641,8 @@ describe('Transform: rewriteTemplate', () => { const __glintY__ = __glintDSL__.emitComponent(__glintDSL__.resolve(Foo)()); __glintDSL__.applyAttributes(__glintY__.element, { "data-bar": __glintDSL__.resolve(helper)({ param: true , ...__glintDSL__.NamedArgsMarker }), + + }); }" `); @@ -653,7 +655,10 @@ describe('Transform: rewriteTemplate', () => { "{ const __glintY__ = __glintDSL__.emitComponent(__glintDSL__.resolve(Foo)({ bar: __glintDSL__.resolve(helper)({ param: true , ...__glintDSL__.NamedArgsMarker }), ...__glintDSL__.NamedArgsMarker })); - __glintY__; + __glintDSL__.applyAttributes(__glintY__.element, { + + + }); }" `); }); @@ -676,6 +681,8 @@ describe('Transform: rewriteTemplate', () => { const __glintY__ = __glintDSL__.emitElement("div"); __glintDSL__.applyAttributes(__glintY__.element, { "data-attr": __glintDSL__.resolveOrReturn(__glintRef__.args.input)(), + + }); }" `); @@ -689,6 +696,8 @@ describe('Transform: rewriteTemplate', () => { const __glintY__ = __glintDSL__.emitElement("div"); __glintDSL__.applyAttributes(__glintY__.element, { "data-attr": \`\${__glintDSL__.resolveOrReturn(__glintRef__.args.input)()}\`, + + }); }" `); @@ -702,7 +711,10 @@ describe('Transform: rewriteTemplate', () => { "{ const __glintY__ = __glintDSL__.emitComponent(__glintDSL__.resolve(Greet)({ message: __glintRef__.args.arg, ...__glintDSL__.NamedArgsMarker })); - __glintY__; + __glintDSL__.applyAttributes(__glintY__.element, { + + + }); }" `); }); @@ -714,7 +726,10 @@ describe('Transform: rewriteTemplate', () => { "{ const __glintY__ = __glintDSL__.emitComponent(__glintDSL__.resolve(Greet)({ message: __glintDSL__.resolveOrReturn(__glintDSL__.Globals["foo"])(), ...__glintDSL__.NamedArgsMarker })); - __glintY__; + __glintDSL__.applyAttributes(__glintY__.element, { + + + }); }" `); }); @@ -726,7 +741,10 @@ describe('Transform: rewriteTemplate', () => { "{ const __glintY__ = __glintDSL__.emitComponent(__glintDSL__.resolve(Greet)({ message: foo, ...__glintDSL__.NamedArgsMarker })); - __glintY__; + __glintDSL__.applyAttributes(__glintY__.element, { + + + }); }" `); }); @@ -742,7 +760,10 @@ describe('Transform: rewriteTemplate', () => { { const __glintY__ = __glintDSL__.emitComponent(__glintDSL__.resolve(Greet)({ message: bar, ...__glintDSL__.NamedArgsMarker })); - __glintY__; + __glintDSL__.applyAttributes(__glintY__.element, { + + + }); } } __glintDSL__.Globals["let"]; @@ -822,7 +843,8 @@ describe('Transform: rewriteTemplate', () => { "{ const __glintY__ = __glintDSL__.emitElement("div"); __glintDSL__.applyAttributes(__glintY__.element, { - + + }); __glintDSL__.applyModifier(__glintDSL__.resolve(modifier)(__glintY__.element, { foo: "bar" , ...__glintDSL__.NamedArgsMarker })); }" @@ -836,7 +858,8 @@ describe('Transform: rewriteTemplate', () => { "{ const __glintY__ = __glintDSL__.emitComponent(__glintDSL__.resolve(MyComponent)()); __glintDSL__.applyAttributes(__glintY__.element, { - + + }); __glintDSL__.applyModifier(__glintDSL__.resolve(modifier)(__glintY__.element, { foo: "bar" , ...__glintDSL__.NamedArgsMarker })); }" @@ -853,6 +876,8 @@ describe('Transform: rewriteTemplate', () => { const __glintY__ = __glintDSL__.emitElement("div"); __glintDSL__.applyAttributes(__glintY__.element, { "data-attr": __glintDSL__.resolve(concat)(__glintDSL__.resolve(foo)(1), __glintDSL__.resolve(foo)(true)), + + }); }" `); @@ -940,7 +965,10 @@ describe('Transform: rewriteTemplate', () => { expect(templateBody(template)).toMatchInlineSnapshot(` "{ const __glintY__ = __glintDSL__.emitElement("div"); - __glintY__; + __glintDSL__.applyAttributes(__glintY__.element, { + + + }); __glintDSL__.emitContent(__glintDSL__.resolveOrReturn(__glintRef__.args.foo)()); }" `); @@ -954,6 +982,8 @@ describe('Transform: rewriteTemplate', () => { const __glintY__ = __glintDSL__.emitElement("div"); __glintDSL__.applyAttributes(__glintY__.element, { "data-foo": __glintDSL__.resolveOrReturn(__glintRef__.args.foo)(), + + }); }" `); @@ -967,6 +997,8 @@ describe('Transform: rewriteTemplate', () => { const __glintY__ = __glintDSL__.emitElement("div"); __glintDSL__.applyAttributes(__glintY__.element, { "data-foo": \`\${__glintDSL__.resolveOrReturn(__glintRef__.args.foo)()}\${__glintDSL__.resolveOrReturn(__glintRef__.args.bar)()}\`, + + }); }" `); @@ -980,7 +1012,8 @@ describe('Transform: rewriteTemplate', () => { const __glintY__ = __glintDSL__.emitElement("div"); __glintDSL__.applySplattributes(__glintRef__.element, __glintY__.element); __glintDSL__.applyAttributes(__glintY__.element, { - + + }); }" `); @@ -995,7 +1028,10 @@ describe('Transform: rewriteTemplate', () => { "{ const __glintY__ = __glintDSL__.emitComponent(__glintDSL__.resolve(__glintDSL__.Globals["Foo"])({ bar: "hello", ...__glintDSL__.NamedArgsMarker })); - __glintY__; + __glintDSL__.applyAttributes(__glintY__.element, { + + + }); }" `); }); @@ -1010,7 +1046,10 @@ describe('Transform: rewriteTemplate', () => { expect(templateBody(template)).toMatchInlineSnapshot(` "{ const __glintY__ = __glintDSL__.emitComponent(__glintDSL__.resolve(__glintDSL__.Globals["Foo"])()); - __glintY__; + __glintDSL__.applyAttributes(__glintY__.element, { + + + }); { const [bar] = __glintY__.blockParams["default"]; __glintDSL__.emitContent(__glintDSL__.resolveOrReturn(bar)()); @@ -1027,7 +1066,8 @@ describe('Transform: rewriteTemplate', () => { const __glintY__ = __glintDSL__.emitComponent(__glintDSL__.resolve(Foo)()); __glintDSL__.applySplattributes(__glintRef__.element, __glintY__.element); __glintDSL__.applyAttributes(__glintY__.element, { - + + }); }" `); @@ -1043,7 +1083,10 @@ describe('Transform: rewriteTemplate', () => { const [div] = __glintY__.blockParams["default"]; { const __glintY__ = __glintDSL__.emitComponent(__glintDSL__.resolve(div)()); - __glintY__; + __glintDSL__.applyAttributes(__glintY__.element, { + + + }); { const [] = __glintY__.blockParams["default"]; } @@ -1061,7 +1104,10 @@ describe('Transform: rewriteTemplate', () => { "{ const __glintY__ = __glintDSL__.emitComponent(__glintDSL__.resolve(foo?.bar)({ arg: "hello", ...__glintDSL__.NamedArgsMarker })); - __glintY__; + __glintDSL__.applyAttributes(__glintY__.element, { + + + }); }" `); }); @@ -1073,7 +1119,10 @@ describe('Transform: rewriteTemplate', () => { "{ const __glintY__ = __glintDSL__.emitComponent(__glintDSL__.resolve(__glintRef__.args.foo)({ arg: "hello", ...__glintDSL__.NamedArgsMarker })); - __glintY__; + __glintDSL__.applyAttributes(__glintY__.element, { + + + }); }" `); }); @@ -1085,7 +1134,10 @@ describe('Transform: rewriteTemplate', () => { "{ const __glintY__ = __glintDSL__.emitComponent(__glintDSL__.resolve(__glintRef__.this.foo)({ arg: "hello", ...__glintDSL__.NamedArgsMarker })); - __glintY__; + __glintDSL__.applyAttributes(__glintY__.element, { + + + }); }" `); }); @@ -1106,7 +1158,10 @@ describe('Transform: rewriteTemplate', () => { expect(templateBody(template)).toMatchInlineSnapshot(` "{ const __glintY__ = __glintDSL__.emitComponent(__glintDSL__.resolve(__glintDSL__.Globals["Foo"])()); - __glintY__; + __glintDSL__.applyAttributes(__glintY__.element, { + + + }); { const [h] = __glintY__.blockParams["head"]; __glintDSL__.emitContent(__glintDSL__.resolveOrReturn(h)()); @@ -1115,7 +1170,10 @@ describe('Transform: rewriteTemplate', () => { const [b] = __glintY__.blockParams["body"]; { const __glintY__ = __glintDSL__.emitComponent(__glintDSL__.resolve(b?.contents)()); - __glintY__; + __glintDSL__.applyAttributes(__glintY__.element, { + + + }); { const [] = __glintY__.blockParams["default"]; } @@ -1132,7 +1190,10 @@ describe('Transform: rewriteTemplate', () => { "{ const __glintY__ = __glintDSL__.emitComponent(__glintDSL__.resolve(Foo)({ arg: \`\${__glintDSL__.resolveOrReturn(baz)()}\`, ...__glintDSL__.NamedArgsMarker })); - __glintY__; + __glintDSL__.applyAttributes(__glintY__.element, { + + + }); }" `); }); @@ -1147,13 +1208,18 @@ describe('Transform: rewriteTemplate', () => { expect(templateBody(template)).toMatchInlineSnapshot(` "{ const __glintY__ = __glintDSL__.emitComponent(__glintDSL__.resolve(__glintDSL__.Globals["Foo"])()); - __glintY__; + __glintDSL__.applyAttributes(__glintY__.element, { + + + }); { const [NS] = __glintY__.blockParams["default"]; { const __glintY__ = __glintDSL__.emitComponent(__glintDSL__.resolve(NS?.Nested?.Custom)()); __glintDSL__.applyAttributes(__glintY__.element, { class: "foo", + + }); } } @@ -1171,7 +1237,10 @@ describe('Transform: rewriteTemplate', () => { expect(templateBody(template)).toMatchInlineSnapshot(` "{ const __glintY__ = __glintDSL__.emitComponent(__glintDSL__.resolve(__glintDSL__.Globals["Foo"])()); - __glintY__; + __glintDSL__.applyAttributes(__glintY__.element, { + + + }); { const [__switch] = __glintY__.blockParams["default"]; __glintDSL__.emitContent(__glintDSL__.resolveOrReturn(__switch)()); diff --git a/test-packages/ts-plugin-test-app/src/glimmer.gts b/test-packages/ts-plugin-test-app/src/glimmer.gts index 402161add..942a439b5 100644 --- a/test-packages/ts-plugin-test-app/src/glimmer.gts +++ b/test-packages/ts-plugin-test-app/src/glimmer.gts @@ -9,5 +9,3 @@ let b =