@ibyar/elements 0.6.0 → 0.8.2-dev.20221008

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/README.md +5 -2
  2. package/accessibility/a11y.d.ts +1 -0
  3. package/accessibility/a11y.js +39 -0
  4. package/accessibility/a11y.js.map +1 -0
  5. package/accessibility/drag-and-drop.d.ts +11 -0
  6. package/accessibility/drag-and-drop.js +9 -0
  7. package/accessibility/drag-and-drop.js.map +1 -0
  8. package/accessibility/index.d.ts +5 -0
  9. package/accessibility/index.js +6 -0
  10. package/accessibility/index.js.map +1 -0
  11. package/accessibility/region.d.ts +17 -0
  12. package/accessibility/region.js +13 -0
  13. package/accessibility/region.js.map +1 -0
  14. package/accessibility/relationship.d.ts +77 -0
  15. package/accessibility/relationship.js +42 -0
  16. package/accessibility/relationship.js.map +1 -0
  17. package/accessibility/widget.d.ts +77 -0
  18. package/accessibility/widget.js +53 -0
  19. package/accessibility/widget.js.map +1 -0
  20. package/ast/dom.d.ts +36 -0
  21. package/ast/dom.js +36 -0
  22. package/ast/dom.js.map +1 -1
  23. package/attributes/attributes.js +0 -1
  24. package/attributes/attributes.js.map +1 -1
  25. package/attributes/common.d.ts +11 -0
  26. package/attributes/common.js +16 -0
  27. package/attributes/common.js.map +1 -0
  28. package/attributes/form.d.ts +34 -3
  29. package/attributes/form.js +88 -7
  30. package/attributes/form.js.map +1 -1
  31. package/attributes/shadow.js +1 -1
  32. package/attributes/shadow.js.map +1 -1
  33. package/attributes/tags.d.ts +0 -11
  34. package/attributes/tags.js +1 -15
  35. package/attributes/tags.js.map +1 -1
  36. package/index.d.ts +2 -1
  37. package/index.js +2 -1
  38. package/index.js.map +1 -1
  39. package/node/html-parser.d.ts +11 -6
  40. package/node/html-parser.js +213 -134
  41. package/node/html-parser.js.map +1 -1
  42. package/node.d.ts +4 -0
  43. package/node.js +5 -0
  44. package/node.js.map +1 -0
  45. package/package.json +7 -5
@@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IAAI,UAAU,EAAE;QAC7B,IAAI,GAAG,CAAC,QAAQ,KAAK,QAAQ,EAAE;YAC9B,OAAO,GAAG,CAAC,IAAI,CAAC;SAChB;KACD;IACD,OAAO,SAAS,CAAC;AAClB,CAAC;AAED,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;AAC7I,MAAM,UAAU,cAAc,CAAC,OAAe;IAC7C,OAAO,aAAa,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;AACxC,CAAC;AAED,MAAM,CAAC,MAAM,YAAY,GAAG,aAAa,CAAC;AAC1C,MAAM,CAAC,MAAM,aAAa,GAAG,cAAc,CAAC","sourcesContent":["\nexport type TagClassRef = typeof HTMLElement;\n\nexport interface Tag {\n\treadonly name?: string;\n\treadonly classRef: TagClassRef;\n}\n\nexport function getClassRef(htmlElementName: string): TagClassRef {\n\tif (Reflect.has(window, htmlElementName)) {\n\t\treturn Reflect.get(window, htmlElementName) as TagClassRef;\n\t} else if (isMedia(htmlElementName)) {\n\t\treturn getClassRef('HTMLMediaElement');\n\t} else {\n\t\treturn HTMLElement;\n\t}\n}\n\nfunction isMedia(name: string) {\n\tname = name.toLowerCase();\n\treturn name.includes('video') || name.includes('audio');\n}\n\nexport const DefaultTag: Tag = Object.freeze({ classRef: HTMLElement });\n\n/**\n * see https://html.spec.whatwg.org/multipage/indices.html#element-interfaces\n */\nexport const NativeTags: Tag[] = [\n\t{ name: 'a', classRef: HTMLAnchorElement },\n\t{ name: 'abbr', classRef: HTMLElement },\n\t{ name: 'address', classRef: HTMLElement },\n\t{ name: 'area', classRef: HTMLAreaElement },\n\t{ name: 'article', classRef: HTMLElement },\n\t{ name: 'aside', classRef: HTMLElement },\n\t{ name: 'audio', classRef: HTMLAudioElement },\n\t{ name: 'b', classRef: HTMLElement },\n\t{ name: 'base', classRef: HTMLBaseElement },\n\t{ name: 'bdi', classRef: HTMLElement },\n\t{ name: 'bdo', classRef: HTMLElement },\n\t{ name: 'blockquote', classRef: HTMLQuoteElement },\n\t{ name: 'body', classRef: HTMLBodyElement },\n\t{ name: 'br', classRef: HTMLBRElement },\n\t{ name: 'button', classRef: HTMLButtonElement },\n\t{ name: 'canvas', classRef: HTMLCanvasElement },\n\t{ name: 'caption', classRef: HTMLTableCaptionElement },\n\t{ name: 'cite', classRef: HTMLElement },\n\t{ name: 'code', classRef: HTMLElement },\n\t{ name: 'col', classRef: HTMLTableColElement },\n\t{ name: 'colgroup', classRef: HTMLTableColElement },\n\t{ name: 'data', classRef: HTMLDataElement },\n\t{ name: 'datalist', classRef: HTMLDataListElement },\n\t{ name: 'dd', classRef: HTMLElement },\n\t{ name: 'del', classRef: HTMLModElement },\n\t{ name: 'details', classRef: HTMLDetailsElement },\n\t{ name: 'dfn', classRef: HTMLElement },\n\t// { name: 'dialog', classRef: window.HTMLDialogElement || HTMLElement },\n\t{ name: 'div', classRef: HTMLDivElement },\n\t{ name: 'dl', classRef: HTMLDListElement },\n\t{ name: 'dt', classRef: HTMLElement },\n\t{ name: 'em', classRef: HTMLElement },\n\t{ name: 'embed', classRef: HTMLEmbedElement },\n\t{ name: 'fieldset', classRef: HTMLFieldSetElement },\n\t{ name: 'figcaption', classRef: HTMLElement },\n\t{ name: 'figure', classRef: HTMLElement },\n\t{ name: 'footer', classRef: HTMLElement },\n\t{ name: 'form', classRef: HTMLFormElement },\n\t{ name: 'h1', classRef: HTMLHeadingElement },\n\t{ name: 'h2', classRef: HTMLHeadingElement },\n\t{ name: 'h3', classRef: HTMLHeadingElement },\n\t{ name: 'h4', classRef: HTMLHeadingElement },\n\t{ name: 'h5', classRef: HTMLHeadingElement },\n\t{ name: 'h6', classRef: HTMLHeadingElement },\n\t{ name: 'head', classRef: HTMLHeadElement },\n\t{ name: 'header', classRef: HTMLElement },\n\t{ name: 'hgroup', classRef: HTMLElement },\n\t{ name: 'hr', classRef: HTMLHRElement },\n\t{ name: 'html', classRef: HTMLHtmlElement },\n\t{ name: 'i', classRef: HTMLElement },\n\t{ name: 'iframe', classRef: HTMLIFrameElement },\n\t{ name: 'img', classRef: HTMLImageElement },\n\t{ name: 'input', classRef: HTMLInputElement },\n\t{ name: 'ins', classRef: HTMLModElement },\n\t{ name: 'kbd', classRef: HTMLElement },\n\t{ name: 'label', classRef: HTMLLabelElement },\n\t{ name: 'legend', classRef: HTMLLegendElement },\n\t{ name: 'li', classRef: HTMLLIElement },\n\t{ name: 'link', classRef: HTMLLinkElement },\n\t{ name: 'main', classRef: HTMLElement },\n\t{ name: 'map', classRef: HTMLMapElement },\n\t{ name: 'mark', classRef: HTMLElement },\n\t{ name: 'menu', classRef: HTMLMenuElement },\n\t{ name: 'meta', classRef: HTMLMetaElement },\n\t{ name: 'meter', classRef: HTMLMeterElement },\n\t{ name: 'nav', classRef: HTMLElement },\n\t{ name: 'noscript', classRef: HTMLElement },\n\t{ name: 'object', classRef: HTMLObjectElement },\n\t{ name: 'ol', classRef: HTMLOListElement },\n\t{ name: 'optgroup', classRef: HTMLOptGroupElement },\n\t{ name: 'option', classRef: HTMLOptionElement },\n\t{ name: 'output', classRef: HTMLOutputElement },\n\t{ name: 'p', classRef: HTMLParagraphElement },\n\t{ name: 'param', classRef: HTMLParamElement },\n\t{ name: 'picture', classRef: HTMLPictureElement },\n\t{ name: 'pre', classRef: HTMLPreElement },\n\t{ name: 'progress', classRef: HTMLProgressElement },\n\t{ name: 'q', classRef: HTMLQuoteElement },\n\t{ name: 'rp', classRef: HTMLElement },\n\t{ name: 'rt', classRef: HTMLElement },\n\t{ name: 'ruby', classRef: HTMLElement },\n\t{ name: 's', classRef: HTMLElement },\n\t{ name: 'samp', classRef: HTMLElement },\n\t{ name: 'script', classRef: HTMLScriptElement },\n\t{ name: 'section', classRef: HTMLElement },\n\t{ name: 'select', classRef: HTMLSelectElement },\n\t{ name: 'slot', classRef: HTMLSlotElement },\n\t{ name: 'small', classRef: HTMLElement },\n\t{ name: 'source', classRef: HTMLSourceElement },\n\t{ name: 'span', classRef: HTMLSpanElement },\n\t{ name: 'strong', classRef: HTMLElement },\n\t{ name: 'style', classRef: HTMLStyleElement },\n\t{ name: 'sub', classRef: HTMLElement },\n\t{ name: 'summary', classRef: HTMLElement },\n\t{ name: 'sup', classRef: HTMLElement },\n\t{ name: 'table', classRef: HTMLTableElement },\n\t{ name: 'tbody', classRef: HTMLTableSectionElement },\n\t{ name: 'td', classRef: HTMLTableCellElement },\n\t{ name: 'template', classRef: HTMLTemplateElement },\n\t{ name: 'textarea', classRef: HTMLTextAreaElement },\n\t{ name: 'tfoot', classRef: HTMLTableSectionElement },\n\t{ name: 'th', classRef: HTMLTableCellElement },\n\t{ name: 'thead', classRef: HTMLTableSectionElement },\n\t{ name: 'time', classRef: HTMLTimeElement },\n\t{ name: 'title', classRef: HTMLTitleElement },\n\t{ name: 'tr', classRef: HTMLTableRowElement },\n\t{ name: 'track', classRef: HTMLTrackElement },\n\t{ name: 'u', classRef: HTMLElement },\n\t{ name: 'ul', classRef: HTMLUListElement },\n\t{ name: 'var', classRef: HTMLElement },\n\t{ name: 'video', classRef: HTMLVideoElement },\n\t{ name: 'wbr', classRef: HTMLElement },\n];\n\nconst HTMLElementTagNameMap = {\n\ta: HTMLAnchorElement,\n\tabbr: HTMLElement,\n\taddress: HTMLElement,\n\tarea: HTMLAreaElement,\n\tarticle: HTMLElement,\n\taside: HTMLElement,\n\taudio: HTMLAudioElement,\n\tb: HTMLElement,\n\tbase: HTMLBaseElement,\n\tbdi: HTMLElement,\n\tbdo: HTMLElement,\n\tblockquote: HTMLQuoteElement,\n\tbody: HTMLBodyElement,\n\tbr: HTMLBRElement,\n\tbutton: HTMLButtonElement,\n\tcanvas: HTMLCanvasElement,\n\tcaption: HTMLTableCaptionElement,\n\tcite: HTMLElement,\n\tcode: HTMLElement,\n\tcol: HTMLTableColElement,\n\tcolgroup: HTMLTableColElement,\n\tdata: HTMLDataElement,\n\tdatalist: HTMLDataListElement,\n\tdd: HTMLElement,\n\tdel: HTMLModElement,\n\tdetails: HTMLDetailsElement,\n\tdfn: HTMLElement,\n\tdiv: HTMLDivElement,\n\tdl: HTMLDListElement,\n\tdt: HTMLElement,\n\tem: HTMLElement,\n\tembed: HTMLEmbedElement,\n\tfieldset: HTMLFieldSetElement,\n\tfigcaption: HTMLElement,\n\tfigure: HTMLElement,\n\tfooter: HTMLElement,\n\tform: HTMLFormElement,\n\th1: HTMLHeadingElement,\n\th2: HTMLHeadingElement,\n\th3: HTMLHeadingElement,\n\th4: HTMLHeadingElement,\n\th5: HTMLHeadingElement,\n\th6: HTMLHeadingElement,\n\thead: HTMLHeadElement,\n\theader: HTMLElement,\n\thgroup: HTMLElement,\n\thr: HTMLHRElement,\n\thtml: HTMLHtmlElement,\n\ti: HTMLElement,\n\tiframe: HTMLIFrameElement,\n\timg: HTMLImageElement,\n\tinput: HTMLInputElement,\n\tins: HTMLModElement,\n\tkbd: HTMLElement,\n\tlabel: HTMLLabelElement,\n\tlegend: HTMLLegendElement,\n\tli: HTMLLIElement,\n\tlink: HTMLLinkElement,\n\tmain: HTMLElement,\n\tmap: HTMLMapElement,\n\tmark: HTMLElement,\n\tmenu: HTMLMenuElement,\n\tmeta: HTMLMetaElement,\n\tmeter: HTMLMeterElement,\n\tnav: HTMLElement,\n\tnoscript: HTMLElement,\n\tobject: HTMLObjectElement,\n\tol: HTMLOListElement,\n\toptgroup: HTMLOptGroupElement,\n\toption: HTMLOptionElement,\n\toutput: HTMLOutputElement,\n\tp: HTMLParagraphElement,\n\tparam: HTMLParamElement,\n\tpicture: HTMLPictureElement,\n\tpre: HTMLPreElement,\n\tprogress: HTMLProgressElement,\n\tq: HTMLQuoteElement,\n\trp: HTMLElement,\n\trt: HTMLElement,\n\truby: HTMLElement,\n\ts: HTMLElement,\n\tsamp: HTMLElement,\n\tscript: HTMLScriptElement,\n\tsection: HTMLElement,\n\tselect: HTMLSelectElement,\n\tslot: HTMLSlotElement,\n\tsmall: HTMLElement,\n\tsource: HTMLSourceElement,\n\tspan: HTMLSpanElement,\n\tstrong: HTMLElement,\n\tstyle: HTMLStyleElement,\n\tsub: HTMLElement,\n\tsummary: HTMLElement,\n\tsup: HTMLElement,\n\ttable: HTMLTableElement,\n\ttbody: HTMLTableSectionElement,\n\ttd: HTMLTableCellElement,\n\ttemplate: HTMLTemplateElement,\n\ttextarea: HTMLTextAreaElement,\n\ttfoot: HTMLTableSectionElement,\n\tth: HTMLTableCellElement,\n\tthead: HTMLTableSectionElement,\n\ttime: HTMLTimeElement,\n\ttitle: HTMLTitleElement,\n\ttr: HTMLTableRowElement,\n\ttrack: HTMLTrackElement,\n\tu: HTMLElement,\n\tul: HTMLUListElement,\n\tvar: HTMLElement,\n\tvideo: HTMLVideoElement,\n\twbr: HTMLElement,\n}\n\nconst SVGElementTagNameMap = {\n\ta: SVGAElement,\n\tanimate: SVGAnimateElement,\n\tanimateMotion: SVGAnimateMotionElement,\n\tanimateTransform: SVGAnimateTransformElement,\n\tcircle: SVGCircleElement,\n\tclipPath: SVGClipPathElement,\n\tdefs: SVGDefsElement,\n\tdesc: SVGDescElement,\n\tellipse: SVGEllipseElement,\n\tfeBlend: SVGFEBlendElement,\n\tfeColorMatrix: SVGFEColorMatrixElement,\n\tfeComponentTransfer: SVGFEComponentTransferElement,\n\tfeComposite: SVGFECompositeElement,\n\tfeConvolveMatrix: SVGFEConvolveMatrixElement,\n\tfeDiffuseLighting: SVGFEDiffuseLightingElement,\n\tfeDisplacementMap: SVGFEDisplacementMapElement,\n\tfeDistantLight: SVGFEDistantLightElement,\n\tfeDropShadow: SVGFEDropShadowElement,\n\tfeFlood: SVGFEFloodElement,\n\tfeFuncA: SVGFEFuncAElement,\n\tfeFuncB: SVGFEFuncBElement,\n\tfeFuncG: SVGFEFuncGElement,\n\tfeFuncR: SVGFEFuncRElement,\n\tfeGaussianBlur: SVGFEGaussianBlurElement,\n\tfeImage: SVGFEImageElement,\n\tfeMerge: SVGFEMergeElement,\n\tfeMergeNode: SVGFEMergeNodeElement,\n\tfeMorphology: SVGFEMorphologyElement,\n\tfeOffset: SVGFEOffsetElement,\n\tfePointLight: SVGFEPointLightElement,\n\tfeSpecularLighting: SVGFESpecularLightingElement,\n\tfeSpotLight: SVGFESpotLightElement,\n\tfeTile: SVGFETileElement,\n\tfeTurbulence: SVGFETurbulenceElement,\n\tfilter: SVGFilterElement,\n\tforeignObject: SVGForeignObjectElement,\n\tg: SVGGElement,\n\timage: SVGImageElement,\n\tline: SVGLineElement,\n\tlinearGradient: SVGLinearGradientElement,\n\tmarker: SVGMarkerElement,\n\tmask: SVGMaskElement,\n\tmetadata: SVGMetadataElement,\n\tmpath: SVGMPathElement,\n\tpath: SVGPathElement,\n\tpattern: SVGPatternElement,\n\tpolygon: SVGPolygonElement,\n\tpolyline: SVGPolylineElement,\n\tradialGradient: SVGRadialGradientElement,\n\trect: SVGRectElement,\n\tscript: SVGScriptElement,\n\tset: SVGSetElement,\n\tstop: SVGStopElement,\n\tstyle: SVGStyleElement,\n\tsvg: SVGSVGElement,\n\tswitch: SVGSwitchElement,\n\tsymbol: SVGSymbolElement,\n\ttext: SVGTextElement,\n\ttextPath: SVGTextPathElement,\n\ttitle: SVGTitleElement,\n\ttspan: SVGTSpanElement,\n\tuse: SVGUseElement,\n\tview: SVGViewElement,\n}\n\nexport function findByTagName(tagName: string | undefined): Tag {\n\tif (!tagName || tagName === '' || tagName === 'none' || tagName === 'child') {\n\t\treturn DefaultTag;\n\t}\n\tif (isValidCustomElementName(tagName)) {\n\t\tconst classRef = customElements.get(tagName);\n\t\tif (classRef) {\n\t\t\treturn { classRef };\n\t\t}\n\t\tthrow new Error('Custom Element is not defined yet');\n\t}\n\tfor (const tag of NativeTags) {\n\t\tif (tag.name === tagName) {\n\t\t\treturn tag;\n\t\t}\n\t}\n\treturn DefaultTag;\n}\n\nexport function isTagNameNative(tagName: string): boolean {\n\treturn (tagName in HTMLElementTagNameMap) || (tagName in SVGElementTagNameMap);\n}\n\n/**\n * see https://html.spec.whatwg.org/multipage/custom-elements.html#valid-custom-element-name\n * see https://github.com/mathiasbynens/mothereff.in/blob/master/custom-element-name/vendor/is-potential-custom-element-name.js\n * @param tagName\n */\nexport const CustomElementRegex = /^[a-z](?:[\\-\\.0-9_a-z\\xB7\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u037D\\u037F-\\u1FFF\\u200C\\u200D\\u203F\\u2040\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]|[\\uD800-\\uDB7F][\\uDC00-\\uDFFF])*-(?:[\\-\\.0-9_a-z\\xB7\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u037D\\u037F-\\u1FFF\\u200C\\u200D\\u203F\\u2040\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]|[\\uD800-\\uDB7F][\\uDC00-\\uDFFF])*$/;\n\nexport function isValidCustomElementName(tagName: string): boolean {\n\treturn CustomElementRegex.test(tagName);\n}\n\nexport function isHTMLUnknownElementTagName(tagName: string): boolean {\n\tfor (const tag of NativeTags) {\n\t\tif (tag.name === tagName) {\n\t\t\treturn false;\n\t\t}\n\t}\n\tif (isValidCustomElementName(tagName)) {\n\t\treturn false;\n\t}\n\treturn true;\n}\n\nexport function getTagName(classRef: TagClassRef): string | undefined {\n\tfor (const tag of NativeTags) {\n\t\tif (tag.classRef === classRef) {\n\t\t\treturn tag.name;\n\t\t}\n\t}\n\treturn undefined;\n}\n\nexport const EmptyElements = ['area', 'base', 'br', 'col', 'embed', 'hr', 'img', 'input', 'link', 'meta', 'param', 'source', 'track', 'wbr'];\nexport function isEmptyElement(tagName: string) {\n\treturn EmptyElements.includes(tagName);\n}\n\nexport const VoidElements = EmptyElements;\nexport const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B;KACD;IACD,OAAO,SAAS,CAAC;AAClB,CAAC","sourcesContent":["import { isValidCustomElementName } from './common.js';\n\nexport type TagClassRef = typeof HTMLElement;\n\nexport interface Tag {\n\treadonly name?: string;\n\treadonly classRef: TagClassRef;\n}\n\nexport function getClassRef(htmlElementName: string): TagClassRef {\n\tif (Reflect.has(window, htmlElementName)) {\n\t\treturn Reflect.get(window, htmlElementName) as TagClassRef;\n\t} else if (isMedia(htmlElementName)) {\n\t\treturn getClassRef('HTMLMediaElement');\n\t} else {\n\t\treturn HTMLElement;\n\t}\n}\n\nfunction isMedia(name: string) {\n\tname = name.toLowerCase();\n\treturn name.includes('video') || name.includes('audio');\n}\n\nexport const DefaultTag: Tag = Object.freeze({ classRef: HTMLElement });\n\n/**\n * see https://html.spec.whatwg.org/multipage/indices.html#element-interfaces\n */\nexport const NativeTags: Tag[] = [\n\t{ name: 'a', classRef: HTMLAnchorElement },\n\t{ name: 'abbr', classRef: HTMLElement },\n\t{ name: 'address', classRef: HTMLElement },\n\t{ name: 'area', classRef: HTMLAreaElement },\n\t{ name: 'article', classRef: HTMLElement },\n\t{ name: 'aside', classRef: HTMLElement },\n\t{ name: 'audio', classRef: HTMLAudioElement },\n\t{ name: 'b', classRef: HTMLElement },\n\t{ name: 'base', classRef: HTMLBaseElement },\n\t{ name: 'bdi', classRef: HTMLElement },\n\t{ name: 'bdo', classRef: HTMLElement },\n\t{ name: 'blockquote', classRef: HTMLQuoteElement },\n\t{ name: 'body', classRef: HTMLBodyElement },\n\t{ name: 'br', classRef: HTMLBRElement },\n\t{ name: 'button', classRef: HTMLButtonElement },\n\t{ name: 'canvas', classRef: HTMLCanvasElement },\n\t{ name: 'caption', classRef: HTMLTableCaptionElement },\n\t{ name: 'cite', classRef: HTMLElement },\n\t{ name: 'code', classRef: HTMLElement },\n\t{ name: 'col', classRef: HTMLTableColElement },\n\t{ name: 'colgroup', classRef: HTMLTableColElement },\n\t{ name: 'data', classRef: HTMLDataElement },\n\t{ name: 'datalist', classRef: HTMLDataListElement },\n\t{ name: 'dd', classRef: HTMLElement },\n\t{ name: 'del', classRef: HTMLModElement },\n\t{ name: 'details', classRef: HTMLDetailsElement },\n\t{ name: 'dfn', classRef: HTMLElement },\n\t// { name: 'dialog', classRef: window.HTMLDialogElement || HTMLElement },\n\t{ name: 'div', classRef: HTMLDivElement },\n\t{ name: 'dl', classRef: HTMLDListElement },\n\t{ name: 'dt', classRef: HTMLElement },\n\t{ name: 'em', classRef: HTMLElement },\n\t{ name: 'embed', classRef: HTMLEmbedElement },\n\t{ name: 'fieldset', classRef: HTMLFieldSetElement },\n\t{ name: 'figcaption', classRef: HTMLElement },\n\t{ name: 'figure', classRef: HTMLElement },\n\t{ name: 'footer', classRef: HTMLElement },\n\t{ name: 'form', classRef: HTMLFormElement },\n\t{ name: 'h1', classRef: HTMLHeadingElement },\n\t{ name: 'h2', classRef: HTMLHeadingElement },\n\t{ name: 'h3', classRef: HTMLHeadingElement },\n\t{ name: 'h4', classRef: HTMLHeadingElement },\n\t{ name: 'h5', classRef: HTMLHeadingElement },\n\t{ name: 'h6', classRef: HTMLHeadingElement },\n\t{ name: 'head', classRef: HTMLHeadElement },\n\t{ name: 'header', classRef: HTMLElement },\n\t{ name: 'hgroup', classRef: HTMLElement },\n\t{ name: 'hr', classRef: HTMLHRElement },\n\t{ name: 'html', classRef: HTMLHtmlElement },\n\t{ name: 'i', classRef: HTMLElement },\n\t{ name: 'iframe', classRef: HTMLIFrameElement },\n\t{ name: 'img', classRef: HTMLImageElement },\n\t{ name: 'input', classRef: HTMLInputElement },\n\t{ name: 'ins', classRef: HTMLModElement },\n\t{ name: 'kbd', classRef: HTMLElement },\n\t{ name: 'label', classRef: HTMLLabelElement },\n\t{ name: 'legend', classRef: HTMLLegendElement },\n\t{ name: 'li', classRef: HTMLLIElement },\n\t{ name: 'link', classRef: HTMLLinkElement },\n\t{ name: 'main', classRef: HTMLElement },\n\t{ name: 'map', classRef: HTMLMapElement },\n\t{ name: 'mark', classRef: HTMLElement },\n\t{ name: 'menu', classRef: HTMLMenuElement },\n\t{ name: 'meta', classRef: HTMLMetaElement },\n\t{ name: 'meter', classRef: HTMLMeterElement },\n\t{ name: 'nav', classRef: HTMLElement },\n\t{ name: 'noscript', classRef: HTMLElement },\n\t{ name: 'object', classRef: HTMLObjectElement },\n\t{ name: 'ol', classRef: HTMLOListElement },\n\t{ name: 'optgroup', classRef: HTMLOptGroupElement },\n\t{ name: 'option', classRef: HTMLOptionElement },\n\t{ name: 'output', classRef: HTMLOutputElement },\n\t{ name: 'p', classRef: HTMLParagraphElement },\n\t{ name: 'param', classRef: HTMLParamElement },\n\t{ name: 'picture', classRef: HTMLPictureElement },\n\t{ name: 'pre', classRef: HTMLPreElement },\n\t{ name: 'progress', classRef: HTMLProgressElement },\n\t{ name: 'q', classRef: HTMLQuoteElement },\n\t{ name: 'rp', classRef: HTMLElement },\n\t{ name: 'rt', classRef: HTMLElement },\n\t{ name: 'ruby', classRef: HTMLElement },\n\t{ name: 's', classRef: HTMLElement },\n\t{ name: 'samp', classRef: HTMLElement },\n\t{ name: 'script', classRef: HTMLScriptElement },\n\t{ name: 'section', classRef: HTMLElement },\n\t{ name: 'select', classRef: HTMLSelectElement },\n\t{ name: 'slot', classRef: HTMLSlotElement },\n\t{ name: 'small', classRef: HTMLElement },\n\t{ name: 'source', classRef: HTMLSourceElement },\n\t{ name: 'span', classRef: HTMLSpanElement },\n\t{ name: 'strong', classRef: HTMLElement },\n\t{ name: 'style', classRef: HTMLStyleElement },\n\t{ name: 'sub', classRef: HTMLElement },\n\t{ name: 'summary', classRef: HTMLElement },\n\t{ name: 'sup', classRef: HTMLElement },\n\t{ name: 'table', classRef: HTMLTableElement },\n\t{ name: 'tbody', classRef: HTMLTableSectionElement },\n\t{ name: 'td', classRef: HTMLTableCellElement },\n\t{ name: 'template', classRef: HTMLTemplateElement },\n\t{ name: 'textarea', classRef: HTMLTextAreaElement },\n\t{ name: 'tfoot', classRef: HTMLTableSectionElement },\n\t{ name: 'th', classRef: HTMLTableCellElement },\n\t{ name: 'thead', classRef: HTMLTableSectionElement },\n\t{ name: 'time', classRef: HTMLTimeElement },\n\t{ name: 'title', classRef: HTMLTitleElement },\n\t{ name: 'tr', classRef: HTMLTableRowElement },\n\t{ name: 'track', classRef: HTMLTrackElement },\n\t{ name: 'u', classRef: HTMLElement },\n\t{ name: 'ul', classRef: HTMLUListElement },\n\t{ name: 'var', classRef: HTMLElement },\n\t{ name: 'video', classRef: HTMLVideoElement },\n\t{ name: 'wbr', classRef: HTMLElement },\n];\n\nconst HTMLElementTagNameMap = {\n\ta: HTMLAnchorElement,\n\tabbr: HTMLElement,\n\taddress: HTMLElement,\n\tarea: HTMLAreaElement,\n\tarticle: HTMLElement,\n\taside: HTMLElement,\n\taudio: HTMLAudioElement,\n\tb: HTMLElement,\n\tbase: HTMLBaseElement,\n\tbdi: HTMLElement,\n\tbdo: HTMLElement,\n\tblockquote: HTMLQuoteElement,\n\tbody: HTMLBodyElement,\n\tbr: HTMLBRElement,\n\tbutton: HTMLButtonElement,\n\tcanvas: HTMLCanvasElement,\n\tcaption: HTMLTableCaptionElement,\n\tcite: HTMLElement,\n\tcode: HTMLElement,\n\tcol: HTMLTableColElement,\n\tcolgroup: HTMLTableColElement,\n\tdata: HTMLDataElement,\n\tdatalist: HTMLDataListElement,\n\tdd: HTMLElement,\n\tdel: HTMLModElement,\n\tdetails: HTMLDetailsElement,\n\tdfn: HTMLElement,\n\tdiv: HTMLDivElement,\n\tdl: HTMLDListElement,\n\tdt: HTMLElement,\n\tem: HTMLElement,\n\tembed: HTMLEmbedElement,\n\tfieldset: HTMLFieldSetElement,\n\tfigcaption: HTMLElement,\n\tfigure: HTMLElement,\n\tfooter: HTMLElement,\n\tform: HTMLFormElement,\n\th1: HTMLHeadingElement,\n\th2: HTMLHeadingElement,\n\th3: HTMLHeadingElement,\n\th4: HTMLHeadingElement,\n\th5: HTMLHeadingElement,\n\th6: HTMLHeadingElement,\n\thead: HTMLHeadElement,\n\theader: HTMLElement,\n\thgroup: HTMLElement,\n\thr: HTMLHRElement,\n\thtml: HTMLHtmlElement,\n\ti: HTMLElement,\n\tiframe: HTMLIFrameElement,\n\timg: HTMLImageElement,\n\tinput: HTMLInputElement,\n\tins: HTMLModElement,\n\tkbd: HTMLElement,\n\tlabel: HTMLLabelElement,\n\tlegend: HTMLLegendElement,\n\tli: HTMLLIElement,\n\tlink: HTMLLinkElement,\n\tmain: HTMLElement,\n\tmap: HTMLMapElement,\n\tmark: HTMLElement,\n\tmenu: HTMLMenuElement,\n\tmeta: HTMLMetaElement,\n\tmeter: HTMLMeterElement,\n\tnav: HTMLElement,\n\tnoscript: HTMLElement,\n\tobject: HTMLObjectElement,\n\tol: HTMLOListElement,\n\toptgroup: HTMLOptGroupElement,\n\toption: HTMLOptionElement,\n\toutput: HTMLOutputElement,\n\tp: HTMLParagraphElement,\n\tparam: HTMLParamElement,\n\tpicture: HTMLPictureElement,\n\tpre: HTMLPreElement,\n\tprogress: HTMLProgressElement,\n\tq: HTMLQuoteElement,\n\trp: HTMLElement,\n\trt: HTMLElement,\n\truby: HTMLElement,\n\ts: HTMLElement,\n\tsamp: HTMLElement,\n\tscript: HTMLScriptElement,\n\tsection: HTMLElement,\n\tselect: HTMLSelectElement,\n\tslot: HTMLSlotElement,\n\tsmall: HTMLElement,\n\tsource: HTMLSourceElement,\n\tspan: HTMLSpanElement,\n\tstrong: HTMLElement,\n\tstyle: HTMLStyleElement,\n\tsub: HTMLElement,\n\tsummary: HTMLElement,\n\tsup: HTMLElement,\n\ttable: HTMLTableElement,\n\ttbody: HTMLTableSectionElement,\n\ttd: HTMLTableCellElement,\n\ttemplate: HTMLTemplateElement,\n\ttextarea: HTMLTextAreaElement,\n\ttfoot: HTMLTableSectionElement,\n\tth: HTMLTableCellElement,\n\tthead: HTMLTableSectionElement,\n\ttime: HTMLTimeElement,\n\ttitle: HTMLTitleElement,\n\ttr: HTMLTableRowElement,\n\ttrack: HTMLTrackElement,\n\tu: HTMLElement,\n\tul: HTMLUListElement,\n\tvar: HTMLElement,\n\tvideo: HTMLVideoElement,\n\twbr: HTMLElement,\n}\n\nconst SVGElementTagNameMap = {\n\ta: SVGAElement,\n\tanimate: SVGAnimateElement,\n\tanimateMotion: SVGAnimateMotionElement,\n\tanimateTransform: SVGAnimateTransformElement,\n\tcircle: SVGCircleElement,\n\tclipPath: SVGClipPathElement,\n\tdefs: SVGDefsElement,\n\tdesc: SVGDescElement,\n\tellipse: SVGEllipseElement,\n\tfeBlend: SVGFEBlendElement,\n\tfeColorMatrix: SVGFEColorMatrixElement,\n\tfeComponentTransfer: SVGFEComponentTransferElement,\n\tfeComposite: SVGFECompositeElement,\n\tfeConvolveMatrix: SVGFEConvolveMatrixElement,\n\tfeDiffuseLighting: SVGFEDiffuseLightingElement,\n\tfeDisplacementMap: SVGFEDisplacementMapElement,\n\tfeDistantLight: SVGFEDistantLightElement,\n\tfeDropShadow: SVGFEDropShadowElement,\n\tfeFlood: SVGFEFloodElement,\n\tfeFuncA: SVGFEFuncAElement,\n\tfeFuncB: SVGFEFuncBElement,\n\tfeFuncG: SVGFEFuncGElement,\n\tfeFuncR: SVGFEFuncRElement,\n\tfeGaussianBlur: SVGFEGaussianBlurElement,\n\tfeImage: SVGFEImageElement,\n\tfeMerge: SVGFEMergeElement,\n\tfeMergeNode: SVGFEMergeNodeElement,\n\tfeMorphology: SVGFEMorphologyElement,\n\tfeOffset: SVGFEOffsetElement,\n\tfePointLight: SVGFEPointLightElement,\n\tfeSpecularLighting: SVGFESpecularLightingElement,\n\tfeSpotLight: SVGFESpotLightElement,\n\tfeTile: SVGFETileElement,\n\tfeTurbulence: SVGFETurbulenceElement,\n\tfilter: SVGFilterElement,\n\tforeignObject: SVGForeignObjectElement,\n\tg: SVGGElement,\n\timage: SVGImageElement,\n\tline: SVGLineElement,\n\tlinearGradient: SVGLinearGradientElement,\n\tmarker: SVGMarkerElement,\n\tmask: SVGMaskElement,\n\tmetadata: SVGMetadataElement,\n\tmpath: SVGMPathElement,\n\tpath: SVGPathElement,\n\tpattern: SVGPatternElement,\n\tpolygon: SVGPolygonElement,\n\tpolyline: SVGPolylineElement,\n\tradialGradient: SVGRadialGradientElement,\n\trect: SVGRectElement,\n\tscript: SVGScriptElement,\n\tset: SVGSetElement,\n\tstop: SVGStopElement,\n\tstyle: SVGStyleElement,\n\tsvg: SVGSVGElement,\n\tswitch: SVGSwitchElement,\n\tsymbol: SVGSymbolElement,\n\ttext: SVGTextElement,\n\ttextPath: SVGTextPathElement,\n\ttitle: SVGTitleElement,\n\ttspan: SVGTSpanElement,\n\tuse: SVGUseElement,\n\tview: SVGViewElement,\n}\n\nexport function findByTagName(tagName: string | undefined): Tag {\n\tif (!tagName || tagName === '' || tagName === 'none' || tagName === 'child') {\n\t\treturn DefaultTag;\n\t}\n\tif (isValidCustomElementName(tagName)) {\n\t\tconst classRef = customElements.get(tagName);\n\t\tif (classRef) {\n\t\t\treturn { classRef };\n\t\t}\n\t\tthrow new Error('Custom Element is not defined yet');\n\t}\n\tfor (const tag of NativeTags) {\n\t\tif (tag.name === tagName) {\n\t\t\treturn tag;\n\t\t}\n\t}\n\treturn DefaultTag;\n}\n\nexport function isTagNameNative(tagName: string): boolean {\n\treturn (tagName in HTMLElementTagNameMap) || (tagName in SVGElementTagNameMap);\n}\n\nexport function isHTMLUnknownElementTagName(tagName: string): boolean {\n\tfor (const tag of NativeTags) {\n\t\tif (tag.name === tagName) {\n\t\t\treturn false;\n\t\t}\n\t}\n\tif (isValidCustomElementName(tagName)) {\n\t\treturn false;\n\t}\n\treturn true;\n}\n\nexport function getTagName(classRef: TagClassRef): string | undefined {\n\tfor (const tag of NativeTags) {\n\t\tif (tag.classRef === classRef) {\n\t\t\treturn tag.name;\n\t\t}\n\t}\n\treturn undefined;\n}\n"]}
package/index.d.ts CHANGED
@@ -1,9 +1,10 @@
1
1
  export * from './attributes/tags.js';
2
+ export * from './attributes/common.js';
2
3
  export * from './attributes/attributes.js';
3
4
  export * from './attributes/shadow.js';
4
5
  export * from './attributes/form.js';
5
6
  export * from './ast/dom.js';
6
- export * from './ast/factory.js';
7
7
  export * from './node/html-parser.js';
8
8
  export * from './directives/register-directive.js';
9
9
  export * from './template/template-parser.js';
10
+ export * from './accessibility/index.js';
package/index.js CHANGED
@@ -1,10 +1,11 @@
1
1
  export * from './attributes/tags.js';
2
+ export * from './attributes/common.js';
2
3
  export * from './attributes/attributes.js';
3
4
  export * from './attributes/shadow.js';
4
5
  export * from './attributes/form.js';
5
6
  export * from './ast/dom.js';
6
- export * from './ast/factory.js';
7
7
  export * from './node/html-parser.js';
8
8
  export * from './directives/register-directive.js';
9
9
  export * from './template/template-parser.js';
10
+ export * from './accessibility/index.js';
10
11
  //# sourceMappingURL=index.js.map
package/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/elements/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AAErC,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AAEjC,cAAc,uBAAuB,CAAC;AAEtC,cAAc,oCAAoC,CAAC;AAEnD,cAAc,+BAA+B,CAAC","sourcesContent":["export * from './attributes/tags.js';\nexport * from './attributes/attributes.js';\nexport * from './attributes/shadow.js';\nexport * from './attributes/form.js';\n\nexport * from './ast/dom.js';\nexport * from './ast/factory.js';\n\nexport * from './node/html-parser.js';\n\nexport * from './directives/register-directive.js';\n\nexport * from './template/template-parser.js';\n\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/elements/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AAErC,cAAc,cAAc,CAAC;AAE7B,cAAc,uBAAuB,CAAC;AAEtC,cAAc,oCAAoC,CAAC;AAEnD,cAAc,+BAA+B,CAAC;AAE9C,cAAc,0BAA0B,CAAC","sourcesContent":["export * from './attributes/tags.js';\nexport * from './attributes/common.js';\nexport * from './attributes/attributes.js';\nexport * from './attributes/shadow.js';\nexport * from './attributes/form.js';\n\nexport * from './ast/dom.js';\n\nexport * from './node/html-parser.js';\n\nexport * from './directives/register-directive.js';\n\nexport * from './template/template-parser.js';\n\nexport * from './accessibility/index.js';\n"]}
@@ -1,4 +1,4 @@
1
- import { DomElementNode, DomStructuralDirectiveNode, DomNode, DomChild } from '../ast/dom.js';
1
+ import { DomElementNode, DomStructuralDirectiveNode, DomNode, DomChild, Attribute, BaseNode } from '../ast/dom.js';
2
2
  export declare class EscapeHTMLCharacter {
3
3
  static ESCAPE_MAP: {
4
4
  [key: string]: string;
@@ -9,7 +9,13 @@ export declare class EscapeHTMLCharacter {
9
9
  escaper(match: string): string;
10
10
  unescape(text: string): string;
11
11
  }
12
- export declare class NodeParser {
12
+ export declare class NodeParserHelper {
13
+ protected checkNode(node: DomElementNode): DomElementNode | DomStructuralDirectiveNode;
14
+ protected extractDirectiveAttributesFromNode(directiveName: string, directive: BaseNode, node: DomElementNode): void;
15
+ protected extractDirectiveNames(node: BaseNode): string[];
16
+ protected getAttributeDirectives(attributes: Attribute<string, any>[]): string[];
17
+ }
18
+ export declare class NodeParser extends NodeParserHelper {
13
19
  private index;
14
20
  private stateFn;
15
21
  private tagNameRegExp;
@@ -35,15 +41,14 @@ export declare class NodeParser {
35
41
  private parseInputOutput;
36
42
  private parsePropertyValue;
37
43
  private popElement;
38
- checkNode(node: DomElementNode): DomElementNode | DomStructuralDirectiveNode;
39
- private extractDirectiveAttributesFromNode;
40
- private extractDirectiveNames;
41
- private getAttributeDirectives;
42
44
  }
43
45
  export declare class HTMLParser {
44
46
  nodeParser: NodeParser;
45
47
  parse(html: string): DomChild[];
46
48
  toDomRootNode(html: string): DomNode;
47
49
  stringify(stack?: DomNode[]): string;
50
+ deserializeAttributes(attribute: Attribute<any, any>): void;
51
+ deserializeBaseNode(node: BaseNode): void;
52
+ deserializeNode(node: DomNode): DomNode;
48
53
  }
49
54
  export declare const htmlParser: HTMLParser;
@@ -1,5 +1,5 @@
1
- import { isEmptyElement } from '../attributes/tags.js';
2
- import { DomElementNode, CommentNode, parseTextChild, TextContent, LiveTextContent, DomFragmentNode, DomStructuralDirectiveNode, DomAttributeDirectiveNode } from '../ast/dom.js';
1
+ import { isEmptyElement } from '../attributes/common.js';
2
+ import { DomElementNode, CommentNode, parseTextChild, TextContent, LiveTextContent, DomFragmentNode, DomStructuralDirectiveNode, ElementAttribute, Attribute, DomAttributeDirectiveNode, LiveAttribute } from '../ast/dom.js';
3
3
  import { directiveRegistry } from '../directives/register-directive.js';
4
4
  export class EscapeHTMLCharacter {
5
5
  constructor() {
@@ -25,8 +25,142 @@ EscapeHTMLCharacter.ESCAPE_MAP = {
25
25
  '&#x27;': "'",
26
26
  '&#x60;': '`'
27
27
  };
28
- export class NodeParser {
28
+ export class NodeParserHelper {
29
+ checkNode(node) {
30
+ const attributes = node.attributes;
31
+ if (attributes) {
32
+ let temp;
33
+ temp = attributes.find(attr => attr.name === 'is');
34
+ if (temp) {
35
+ attributes.splice(attributes.indexOf(temp), 1);
36
+ node.is = temp.value;
37
+ }
38
+ temp = attributes.filter(attr => {
39
+ return typeof attr.value === 'string' && (/\{\{(.+)\}\}/g).test(attr.value);
40
+ });
41
+ if (temp?.length) {
42
+ temp.forEach(templateAttrs => {
43
+ attributes.splice(attributes.indexOf(templateAttrs), 1);
44
+ node.addTemplateAttr(templateAttrs.name, templateAttrs.value);
45
+ });
46
+ }
47
+ temp = attributes.filter(attr => attr.name.startsWith('on'));
48
+ if (temp?.length) {
49
+ temp.forEach(templateAttrs => {
50
+ attributes.splice(attributes.indexOf(templateAttrs), 1);
51
+ node.addOutput(templateAttrs.name.substring(2), templateAttrs.value);
52
+ });
53
+ }
54
+ }
55
+ const directiveNames = this.extractDirectiveNames(node);
56
+ let sdName;
57
+ if (directiveNames.length) {
58
+ const directives = [];
59
+ directiveNames.forEach(attributeName => {
60
+ if (attributeName.startsWith('*')) {
61
+ if (sdName) {
62
+ console.error(`Only one Structural Directive is allowed on an element [${sdName}, ${attributeName}]`);
63
+ return;
64
+ }
65
+ sdName = attributeName;
66
+ return;
67
+ }
68
+ const directive = new DomAttributeDirectiveNode(attributeName);
69
+ if (directiveRegistry.get(attributeName).hasAttributes()) {
70
+ this.extractDirectiveAttributesFromNode(attributeName, directive, node);
71
+ }
72
+ directives.push(directive);
73
+ });
74
+ if (directives.length) {
75
+ node.attributeDirectives = directives;
76
+ }
77
+ }
78
+ if (sdName) {
79
+ // <div *for [forOf]="array" let-item [trackBy]="method" let-i="index" > {{item}} </div>
80
+ // <div *for="let item of array; let i = index; trackBy=method;" > {{item}} </div>
81
+ // <template #refName *if="isActive; else disabled" > ... </template>
82
+ // <template #disabled > ... </template>
83
+ const temp = node.attributes.filter(attr => attr.name == sdName)[0];
84
+ node.attributes.splice(node.attributes.indexOf(temp), 1);
85
+ const isTemplate = node.tagName === 'template';
86
+ const directiveNode = isTemplate ? new DomFragmentNode(node.children) : node;
87
+ const directive = (typeof temp?.value === 'boolean')
88
+ ? new DomStructuralDirectiveNode(temp.name, directiveNode)
89
+ : new DomStructuralDirectiveNode(temp.name, directiveNode, String(temp.value));
90
+ const directiveName = temp.name.substring(1);
91
+ if (isTemplate) {
92
+ directive.inputs = node.inputs;
93
+ directive.outputs = node.outputs;
94
+ directive.attributes = node.attributes;
95
+ directive.templateAttrs = node.templateAttrs;
96
+ directive.attributeDirectives = node.attributeDirectives;
97
+ }
98
+ else if (directiveRegistry.hasAttributes(directiveName)) {
99
+ this.extractDirectiveAttributesFromNode(directiveName, directive, node);
100
+ directive.attributeDirectives = node.attributeDirectives;
101
+ }
102
+ if (isTemplate && node.templateRefName) {
103
+ node.children = [directive];
104
+ return node;
105
+ }
106
+ return directive;
107
+ }
108
+ // <for let-user [of]="users"></for>
109
+ if (directiveRegistry.has('*' + node.tagName)) {
110
+ const children = new DomFragmentNode(node.children);
111
+ const directive = new DomStructuralDirectiveNode('*' + node.tagName, children);
112
+ directive.inputs = node.inputs;
113
+ directive.outputs = node.outputs;
114
+ directive.attributes = node.attributes;
115
+ directive.templateAttrs = node.templateAttrs;
116
+ directive.attributeDirectives = node.attributeDirectives;
117
+ return directive;
118
+ }
119
+ return node;
120
+ }
121
+ extractDirectiveAttributesFromNode(directiveName, directive, node) {
122
+ const attributes = directiveRegistry.getAttributes(directiveName);
123
+ if (!attributes) {
124
+ return;
125
+ }
126
+ const filterByAttrName = createFilterByAttrName(attributes);
127
+ directive.attributes = node.attributes?.filter(filterByAttrName);
128
+ directive.inputs = node.inputs?.filter(filterByAttrName);
129
+ directive.outputs = node.outputs?.filter(filterByAttrName);
130
+ directive.twoWayBinding = node.twoWayBinding?.filter(filterByAttrName);
131
+ directive.templateAttrs = node.templateAttrs?.filter(filterByAttrName);
132
+ node.inputs && directive.inputs?.forEach(createArrayCleaner(node.inputs));
133
+ node.outputs && directive.outputs?.forEach(createArrayCleaner(node.outputs));
134
+ node.twoWayBinding && directive.twoWayBinding?.forEach(createArrayCleaner(node.twoWayBinding));
135
+ node.attributes && directive.attributes?.forEach(createArrayCleaner(node.attributes));
136
+ node.templateAttrs && directive.templateAttrs?.forEach(createArrayCleaner(node.templateAttrs));
137
+ }
138
+ extractDirectiveNames(node) {
139
+ const names = [];
140
+ if (node.attributes?.length) {
141
+ names.push(...this.getAttributeDirectives(node.attributes));
142
+ }
143
+ if (node.inputs?.length) {
144
+ names.push(...this.getAttributeDirectives(node.inputs));
145
+ }
146
+ if (node.twoWayBinding?.length) {
147
+ names.push(...this.getAttributeDirectives(node.twoWayBinding));
148
+ }
149
+ if (node.templateAttrs?.length) {
150
+ names.push(...this.getAttributeDirectives(node.templateAttrs));
151
+ }
152
+ if (node.outputs?.length) {
153
+ names.push(...this.getAttributeDirectives(node.outputs));
154
+ }
155
+ return names;
156
+ }
157
+ getAttributeDirectives(attributes) {
158
+ return directiveRegistry.filterDirectives(attributes.map(attr => attr.name));
159
+ }
160
+ }
161
+ export class NodeParser extends NodeParserHelper {
29
162
  constructor() {
163
+ super(...arguments);
30
164
  this.tagNameRegExp = /[\-\.0-9_a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF]/;
31
165
  this.commentOpenCount = 0;
32
166
  this.commentCloseCount = 0;
@@ -105,6 +239,13 @@ export class NodeParser {
105
239
  this.commentCloseCount = 0;
106
240
  return this.parseText;
107
241
  }
242
+ else if (token === '>' && this.commentCloseCount === 0) {
243
+ const temp = this.tempText.toLowerCase();
244
+ if ('doctype html' === temp) {
245
+ this.tempText = '';
246
+ return this.parseText;
247
+ }
248
+ }
108
249
  if (this.commentCloseCount > 0) {
109
250
  for (let i = 0; i < this.commentCloseCount; i++) {
110
251
  this.tempText += '-';
@@ -308,137 +449,6 @@ export class NodeParser {
308
449
  }
309
450
  }
310
451
  }
311
- checkNode(node) {
312
- const attributes = node.attributes;
313
- if (attributes) {
314
- let temp;
315
- temp = attributes.find(attr => attr.name === 'is');
316
- if (temp) {
317
- attributes.splice(attributes.indexOf(temp), 1);
318
- node.is = temp.value;
319
- }
320
- temp = attributes.filter(attr => {
321
- return typeof attr.value === 'string' && (/\{\{(.+)\}\}/g).test(attr.value);
322
- });
323
- if (temp?.length) {
324
- temp.forEach(templateAttrs => {
325
- attributes.splice(attributes.indexOf(templateAttrs), 1);
326
- node.addTemplateAttr(templateAttrs.name, templateAttrs.value);
327
- });
328
- }
329
- temp = attributes.filter(attr => attr.name.startsWith('on'));
330
- if (temp?.length) {
331
- temp.forEach(templateAttrs => {
332
- attributes.splice(attributes.indexOf(templateAttrs), 1);
333
- node.addOutput(templateAttrs.name.substring(2), templateAttrs.value);
334
- });
335
- }
336
- }
337
- const directiveNames = this.extractDirectiveNames(node);
338
- let sdName;
339
- if (directiveNames.length) {
340
- const directives = [];
341
- directiveNames.forEach(attributeName => {
342
- if (attributeName.startsWith('*')) {
343
- if (sdName) {
344
- console.error(`Only one Structural Directive is allowed on an element [${sdName}, ${attributeName}]`);
345
- return;
346
- }
347
- sdName = attributeName;
348
- return;
349
- }
350
- const directive = new DomAttributeDirectiveNode(attributeName);
351
- if (directiveRegistry.get(attributeName).hasAttributes()) {
352
- this.extractDirectiveAttributesFromNode(attributeName, directive, node);
353
- }
354
- directives.push(directive);
355
- });
356
- if (directives.length) {
357
- node.attributeDirectives = directives;
358
- }
359
- }
360
- if (sdName) {
361
- // <div *for [forOf]="array" let-item [trackBy]="method" let-i="index" > {{item}} </div>
362
- // <div *for="let item of array; let i = index; trackBy=method;" > {{item}} </div>
363
- // <template #refName *if="isActive; else disabled" > ... </template>
364
- // <template #disabled > ... </template>
365
- const temp = node.attributes.filter(attr => attr.name == sdName)[0];
366
- node.attributes.splice(node.attributes.indexOf(temp), 1);
367
- const isTemplate = node.tagName === 'template';
368
- const directiveNode = isTemplate ? new DomFragmentNode(node.children) : node;
369
- const directive = (typeof temp?.value === 'boolean')
370
- ? new DomStructuralDirectiveNode(temp.name, directiveNode)
371
- : new DomStructuralDirectiveNode(temp.name, directiveNode, String(temp.value));
372
- const directiveName = temp.name.substring(1);
373
- if (isTemplate) {
374
- directive.inputs = node.inputs;
375
- directive.outputs = node.outputs;
376
- directive.attributes = node.attributes;
377
- directive.templateAttrs = node.templateAttrs;
378
- directive.attributeDirectives = node.attributeDirectives;
379
- }
380
- else if (directiveRegistry.hasAttributes(directiveName)) {
381
- this.extractDirectiveAttributesFromNode(directiveName, directive, node);
382
- directive.attributeDirectives = node.attributeDirectives;
383
- }
384
- if (isTemplate && node.templateRefName) {
385
- node.children = [directive];
386
- return node;
387
- }
388
- return directive;
389
- }
390
- // <for let-user [of]="users"></for>
391
- if (directiveRegistry.has('*' + node.tagName)) {
392
- const children = new DomFragmentNode(node.children);
393
- const directive = new DomStructuralDirectiveNode('*' + node.tagName, children);
394
- directive.inputs = node.inputs;
395
- directive.outputs = node.outputs;
396
- directive.attributes = node.attributes;
397
- directive.templateAttrs = node.templateAttrs;
398
- directive.attributeDirectives = node.attributeDirectives;
399
- return directive;
400
- }
401
- return node;
402
- }
403
- extractDirectiveAttributesFromNode(directiveName, directive, node) {
404
- const attributes = directiveRegistry.getAttributes(directiveName);
405
- if (!attributes) {
406
- return;
407
- }
408
- const filterByAttrName = createFilterByAttrName(attributes);
409
- directive.attributes = node.attributes?.filter(filterByAttrName);
410
- directive.inputs = node.inputs?.filter(filterByAttrName);
411
- directive.outputs = node.outputs?.filter(filterByAttrName);
412
- directive.twoWayBinding = node.twoWayBinding?.filter(filterByAttrName);
413
- directive.templateAttrs = node.templateAttrs?.filter(filterByAttrName);
414
- node.inputs && directive.inputs?.forEach(createArrayCleaner(node.inputs));
415
- node.outputs && directive.outputs?.forEach(createArrayCleaner(node.outputs));
416
- node.twoWayBinding && directive.twoWayBinding?.forEach(createArrayCleaner(node.twoWayBinding));
417
- node.attributes && directive.attributes?.forEach(createArrayCleaner(node.attributes));
418
- node.templateAttrs && directive.templateAttrs?.forEach(createArrayCleaner(node.templateAttrs));
419
- }
420
- extractDirectiveNames(node) {
421
- const names = [];
422
- if (node.attributes?.length) {
423
- names.push(...this.getAttributeDirectives(node.attributes));
424
- }
425
- if (node.inputs?.length) {
426
- names.push(...this.getAttributeDirectives(node.inputs));
427
- }
428
- if (node.twoWayBinding?.length) {
429
- names.push(...this.getAttributeDirectives(node.twoWayBinding));
430
- }
431
- if (node.templateAttrs?.length) {
432
- names.push(...this.getAttributeDirectives(node.templateAttrs));
433
- }
434
- if (node.outputs?.length) {
435
- names.push(...this.getAttributeDirectives(node.outputs));
436
- }
437
- return names;
438
- }
439
- getAttributeDirectives(attributes) {
440
- return directiveRegistry.filterDirectives(attributes.map(attr => attr.name));
441
- }
442
452
  }
443
453
  function createFilterByAttrName(attributes) {
444
454
  return (attr) => attributes.includes(attr.name);
@@ -521,6 +531,75 @@ export class HTMLParser {
521
531
  });
522
532
  return html;
523
533
  }
534
+ deserializeAttributes(attribute) {
535
+ const type = attribute.type;
536
+ switch (type) {
537
+ case 'Attribute':
538
+ inherit(attribute, Attribute);
539
+ break;
540
+ case 'ElementAttribute':
541
+ inherit(attribute, ElementAttribute);
542
+ break;
543
+ case 'LiveAttribute':
544
+ inherit(attribute, LiveAttribute);
545
+ break;
546
+ case 'TextContent':
547
+ inherit(attribute, TextContent);
548
+ break;
549
+ case 'LiveTextContent':
550
+ inherit(attribute, LiveTextContent);
551
+ break;
552
+ default:
553
+ break;
554
+ }
555
+ }
556
+ deserializeBaseNode(node) {
557
+ node.attributes?.forEach(attr => this.deserializeAttributes(attr));
558
+ node.inputs?.forEach(attr => this.deserializeAttributes(attr));
559
+ node.outputs?.forEach(attr => this.deserializeAttributes(attr));
560
+ node.templateAttrs?.forEach(attr => this.deserializeAttributes(attr));
561
+ node.attributeDirectives?.forEach(attr => this.deserializeNode(attr));
562
+ }
563
+ deserializeNode(node) {
564
+ const type = node.type;
565
+ switch (type) {
566
+ case 'TextContent':
567
+ inherit(node, TextContent);
568
+ break;
569
+ case 'LiveTextContent':
570
+ inherit(node, LiveTextContent);
571
+ break;
572
+ case 'CommentNode':
573
+ inherit(node, CommentNode);
574
+ break;
575
+ case 'DomFragmentNode':
576
+ inherit(node, DomFragmentNode);
577
+ node.children?.forEach(child => this.deserializeNode(child));
578
+ break;
579
+ case 'DomElementNode':
580
+ inherit(node, DomElementNode);
581
+ if (node.templateRefName) {
582
+ this.deserializeAttributes(node.templateRefName);
583
+ }
584
+ this.deserializeBaseNode(node);
585
+ node.children?.forEach(child => this.deserializeNode(child));
586
+ break;
587
+ case 'DomStructuralDirectiveNode':
588
+ inherit(node, DomStructuralDirectiveNode);
589
+ this.deserializeNode(node.node);
590
+ break;
591
+ case 'DomAttributeDirectiveNode':
592
+ inherit(node, DomAttributeDirectiveNode);
593
+ this.deserializeBaseNode(node);
594
+ break;
595
+ default:
596
+ break;
597
+ }
598
+ return node;
599
+ }
600
+ }
601
+ function inherit(object, type) {
602
+ object.__proto__ = type.prototype;
524
603
  }
525
604
  export const htmlParser = new HTMLParser();
526
605
  //# sourceMappingURL=html-parser.js.map