@ibyar/elements 0.5.2 → 0.5.62

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.
@@ -1,3 +1,8 @@
1
+ /**
2
+ * form-associated elements
3
+ * A number of the elements are form-associated elements, which means they can have a form owner.
4
+ * @param tagName
5
+ */
1
6
  export function isFormElement(tagName) {
2
7
  switch (tagName) {
3
8
  case 'button':
@@ -17,6 +22,11 @@ export function isFormElement(tagName) {
17
22
  default: return false;
18
23
  }
19
24
  }
25
+ /**
26
+ * submittable elements
27
+ * Denotes elements that can be used for constructing the entry list when a form element is submitted.
28
+ * @param tagName
29
+ */
20
30
  export function isSubmittableElement(tagName) {
21
31
  switch (tagName) {
22
32
  case 'button':
@@ -28,6 +38,10 @@ export function isSubmittableElement(tagName) {
28
38
  default: return false;
29
39
  }
30
40
  }
41
+ /**
42
+ * Resettable elements
43
+ * @param tagName
44
+ */
31
45
  export function isResettableElement(tagName) {
32
46
  switch (tagName) {
33
47
  case 'input':
@@ -38,6 +52,11 @@ export function isResettableElement(tagName) {
38
52
  default: return false;
39
53
  }
40
54
  }
55
+ /**
56
+ * Autocapitalize-inheriting elements
57
+ * Denotes elements that inherit the autocapitalize attribute from their form owner.
58
+ * @param tagName
59
+ */
41
60
  export function isAutocapitalizeInheritingElement(tagName) {
42
61
  switch (tagName) {
43
62
  case 'button':
@@ -50,6 +69,14 @@ export function isAutocapitalizeInheritingElement(tagName) {
50
69
  default: return false;
51
70
  }
52
71
  }
72
+ /**
73
+ * Labelable Elements
74
+ * Some elements, not all of them form-associated, are categorized as labelable elements.
75
+ * These are elements that can be associated with a label element.
76
+ *
77
+ * this function ignore the 'type' attribute of 'input' tage as '<input type="hidden" />' is consdered as not labled element
78
+ * @param tagName the tested tag name
79
+ */
53
80
  export function isFormLabelableElement(tagName) {
54
81
  switch (tagName) {
55
82
  case 'button':
@@ -1 +1 @@
1
- {"version":3,"file":"form.js","sourceRoot":"","sources":["../../../src/elements/att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AACF,CAAC;AAUD,MAAM,UAAU,sBAAsB,CAAC,OAAe;IACrD,QAAQ,OAAO,EAAE;QAChB,KAAK,QAAQ,CAAC;QACd,KAAK,OAAO,CAAC;QACb,KAAK,OAAO,CAAC;QACb,KAAK,QAAQ,CAAC;QACd,KAAK,UAAU,CAAC;QAChB,KAAK,QAAQ,CAAC;QACd,KAAK,UAAU;YACd,OAAO,IAAI,CAAC;QACb,OAAO,CAAC,CAAC,OAAO,KAAK,CAAC;KACtB;AACF,CAAC","sourcesContent":["/**\n * form-associated elements\n * A number of the elements are form-associated elements, which means they can have a form owner.\n * @param tagName \n */\nexport function isFormElement(tagName: string): boolean {\n\tswitch (tagName) {\n\t\tcase 'button':\n\t\tcase 'datalist':\n\t\tcase 'fieldset':\n\t\tcase 'input':\n\t\tcase 'label':\n\t\tcase 'legend':\n\t\tcase 'meter':\n\t\tcase 'optgroup':\n\t\tcase 'option':\n\t\tcase 'output':\n\t\tcase 'progress':\n\t\tcase 'select':\n\t\tcase 'textarea':\n\t\t\treturn true;\n\t\tdefault: return false;\n\t}\n}\n\n/**\n * submittable elements\n * Denotes elements that can be used for constructing the entry list when a form element is submitted.\n * @param tagName \n */\nexport function isSubmittableElement(tagName: string): boolean {\n\tswitch (tagName) {\n\t\tcase 'button':\n\t\tcase 'input':\n\t\tcase 'object':\n\t\tcase 'select':\n\t\tcase 'textarea':\n\t\t\treturn true;\n\t\tdefault: return false;\n\t}\n}\n\n/**\n * Resettable elements\n * @param tagName \n */\nexport function isResettableElement(tagName: string): boolean {\n\tswitch (tagName) {\n\t\tcase 'input':\n\t\tcase 'output':\n\t\tcase 'select':\n\t\tcase 'textarea':\n\t\t\treturn true;\n\t\tdefault: return false;\n\t}\n}\n\n\n/**\n * Autocapitalize-inheriting elements\n * Denotes elements that inherit the autocapitalize attribute from their form owner.\n * @param tagName \n */\nexport function isAutocapitalizeInheritingElement(tagName: string): boolean {\n\tswitch (tagName) {\n\t\tcase 'button':\n\t\tcase 'fieldset':\n\t\tcase 'input':\n\t\tcase 'output':\n\t\tcase 'select':\n\t\tcase 'textarea':\n\t\t\treturn true;\n\t\tdefault: return false;\n\t}\n}\n\n/**\n * Labelable Elements\n * Some elements, not all of them form-associated, are categorized as labelable elements.\n * These are elements that can be associated with a label element.\n * \n * this function ignore the 'type' attribute of 'input' tage as '<input type=\"hidden\" />' is consdered as not labled element \n * @param tagName the tested tag name\n */\nexport function isFormLabelableElement(tagName: string): boolean {\n\tswitch (tagName) {\n\t\tcase 'button':\n\t\tcase 'input':\n\t\tcase 'meter':\n\t\tcase 'output':\n\t\tcase 'progress':\n\t\tcase 'select':\n\t\tcase 'textarea':\n\t\t\treturn true;\n\t\tdefault: return false;\n\t}\n}\n"]}
1
+ {"version":3,"file":"form.js","sourceRoot":"","sources":["../../../src/elements/attributes/form.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAAC,OAAe;IAC5C,QAAQ,OAAO,EAAE;QAChB,KAAK,QAAQ,CAAC;QACd,KAAK,UAAU,CAAC;QAChB,KAAK,UAAU,CAAC;QAChB,KAAK,OAAO,CAAC;QACb,KAAK,OAAO,CAAC;QACb,KAAK,QAAQ,CAAC;QACd,KAAK,OAAO,CAAC;QACb,KAAK,UAAU,CAAC;QAChB,KAAK,QAAQ,CAAC;QACd,KAAK,QAAQ,CAAC;QACd,KAAK,UAAU,CAAC;QAChB,KAAK,QAAQ,CAAC;QACd,KAAK,UAAU;YACd,OAAO,IAAI,CAAC;QACb,OAAO,CAAC,CAAC,OAAO,KAAK,CAAC;KACtB;AACF,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,oBAAoB,CAAC,OAAe;IACnD,QAAQ,OAAO,EAAE;QAChB,KAAK,QAAQ,CAAC;QACd,KAAK,OAAO,CAAC;QACb,KAAK,QAAQ,CAAC;QACd,KAAK,QAAQ,CAAC;QACd,KAAK,UAAU;YACd,OAAO,IAAI,CAAC;QACb,OAAO,CAAC,CAAC,OAAO,KAAK,CAAC;KACtB;AACF,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,mBAAmB,CAAC,OAAe;IAClD,QAAQ,OAAO,EAAE;QAChB,KAAK,OAAO,CAAC;QACb,KAAK,QAAQ,CAAC;QACd,KAAK,QAAQ,CAAC;QACd,KAAK,UAAU;YACd,OAAO,IAAI,CAAC;QACb,OAAO,CAAC,CAAC,OAAO,KAAK,CAAC;KACtB;AACF,CAAC;AAGD;;;;GAIG;AACH,MAAM,UAAU,iCAAiC,CAAC,OAAe;IAChE,QAAQ,OAAO,EAAE;QAChB,KAAK,QAAQ,CAAC;QACd,KAAK,UAAU,CAAC;QAChB,KAAK,OAAO,CAAC;QACb,KAAK,QAAQ,CAAC;QACd,KAAK,QAAQ,CAAC;QACd,KAAK,UAAU;YACd,OAAO,IAAI,CAAC;QACb,OAAO,CAAC,CAAC,OAAO,KAAK,CAAC;KACtB;AACF,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,sBAAsB,CAAC,OAAe;IACrD,QAAQ,OAAO,EAAE;QAChB,KAAK,QAAQ,CAAC;QACd,KAAK,OAAO,CAAC;QACb,KAAK,OAAO,CAAC;QACb,KAAK,QAAQ,CAAC;QACd,KAAK,UAAU,CAAC;QAChB,KAAK,QAAQ,CAAC;QACd,KAAK,UAAU;YACd,OAAO,IAAI,CAAC;QACb,OAAO,CAAC,CAAC,OAAO,KAAK,CAAC;KACtB;AACF,CAAC","sourcesContent":["/**\n * form-associated elements\n * A number of the elements are form-associated elements, which means they can have a form owner.\n * @param tagName \n */\nexport function isFormElement(tagName: string): boolean {\n\tswitch (tagName) {\n\t\tcase 'button':\n\t\tcase 'datalist':\n\t\tcase 'fieldset':\n\t\tcase 'input':\n\t\tcase 'label':\n\t\tcase 'legend':\n\t\tcase 'meter':\n\t\tcase 'optgroup':\n\t\tcase 'option':\n\t\tcase 'output':\n\t\tcase 'progress':\n\t\tcase 'select':\n\t\tcase 'textarea':\n\t\t\treturn true;\n\t\tdefault: return false;\n\t}\n}\n\n/**\n * submittable elements\n * Denotes elements that can be used for constructing the entry list when a form element is submitted.\n * @param tagName \n */\nexport function isSubmittableElement(tagName: string): boolean {\n\tswitch (tagName) {\n\t\tcase 'button':\n\t\tcase 'input':\n\t\tcase 'object':\n\t\tcase 'select':\n\t\tcase 'textarea':\n\t\t\treturn true;\n\t\tdefault: return false;\n\t}\n}\n\n/**\n * Resettable elements\n * @param tagName \n */\nexport function isResettableElement(tagName: string): boolean {\n\tswitch (tagName) {\n\t\tcase 'input':\n\t\tcase 'output':\n\t\tcase 'select':\n\t\tcase 'textarea':\n\t\t\treturn true;\n\t\tdefault: return false;\n\t}\n}\n\n\n/**\n * Autocapitalize-inheriting elements\n * Denotes elements that inherit the autocapitalize attribute from their form owner.\n * @param tagName \n */\nexport function isAutocapitalizeInheritingElement(tagName: string): boolean {\n\tswitch (tagName) {\n\t\tcase 'button':\n\t\tcase 'fieldset':\n\t\tcase 'input':\n\t\tcase 'output':\n\t\tcase 'select':\n\t\tcase 'textarea':\n\t\t\treturn true;\n\t\tdefault: return false;\n\t}\n}\n\n/**\n * Labelable Elements\n * Some elements, not all of them form-associated, are categorized as labelable elements.\n * These are elements that can be associated with a label element.\n * \n * this function ignore the 'type' attribute of 'input' tage as '<input type=\"hidden\" />' is consdered as not labled element \n * @param tagName the tested tag name\n */\nexport function isFormLabelableElement(tagName: string): boolean {\n\tswitch (tagName) {\n\t\tcase 'button':\n\t\tcase 'input':\n\t\tcase 'meter':\n\t\tcase 'output':\n\t\tcase 'progress':\n\t\tcase 'select':\n\t\tcase 'textarea':\n\t\t\treturn true;\n\t\tdefault: return false;\n\t}\n}\n"]}
@@ -1,2 +1,19 @@
1
1
  export declare const ShadowElements: string[];
2
+ /**
3
+ * Note that you can't attach a shadow root to every type of element.
4
+ *
5
+ * There are some that can't have a shadow DOM for security reasons (for example <a>), and more besides.
6
+ *
7
+ * The following is a list of elements you can attach a shadow root to:
8
+ * Any autonomous custom element with a valid name,
9
+ * and [
10
+ * article, aside, blockquote, body, div,footer,
11
+ * h1, h2, h3, h4, h5, h6,
12
+ * header, main, nav, p, section, span
13
+ * ]
14
+ *
15
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/attachShadow#elements_you_can_attach_a_shadow_to
16
+ * @param tagName
17
+ * @returns
18
+ */
2
19
  export declare function canAttachShadow(tagName: string): boolean;
@@ -19,6 +19,23 @@ export const ShadowElements = [
19
19
  'section',
20
20
  'span',
21
21
  ];
22
+ /**
23
+ * Note that you can't attach a shadow root to every type of element.
24
+ *
25
+ * There are some that can't have a shadow DOM for security reasons (for example <a>), and more besides.
26
+ *
27
+ * The following is a list of elements you can attach a shadow root to:
28
+ * Any autonomous custom element with a valid name,
29
+ * and [
30
+ * article, aside, blockquote, body, div,footer,
31
+ * h1, h2, h3, h4, h5, h6,
32
+ * header, main, nav, p, section, span
33
+ * ]
34
+ *
35
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/attachShadow#elements_you_can_attach_a_shadow_to
36
+ * @param tagName
37
+ * @returns
38
+ */
22
39
  export function canAttachShadow(tagName) {
23
40
  if (isValidCustomElementName(tagName)) {
24
41
  return true;
@@ -1 +1 @@
1
- {"version":3,"file":"shadow.js","sourceRoot":"","sources":["../../../src/elements/attributes/shadow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AAErD,MAAM,CAAC,MAAM,cAAc,GAAG;IAC7B,SAAS;IACT,OAAO;IACP,YAAY;IACZ,MAAM;IACN,KAAK;IACL,QAAQ;IACR,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,QAAQ;IACR,MAAM;IACN,KAAK;IACL,GAAG;IACH,SAAS;IACT,MAAM;CACN,CAAC;AAmBF,MAAM,UAAU,eAAe,CAAC,OAAe;IAC9C,IAAI,wBAAwB,CAAC,OAAO,CAAC,EAAE;QACtC,OAAO,IAAI,CAAC;KACZ;IACD,OAAO,cAAc,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;AACzC,CAAC","sourcesContent":["import { isValidCustomElementName } from './tags.js';\n\nexport const ShadowElements = [\n\t'article',\n\t'aside',\n\t'blockquote',\n\t'body',\n\t'div',\n\t'footer',\n\t'h1',\n\t'h2',\n\t'h3',\n\t'h4',\n\t'h5',\n\t'h6',\n\t'header',\n\t'main',\n\t'nav',\n\t'p',\n\t'section',\n\t'span',\n];\n\n/**\n * Note that you can't attach a shadow root to every type of element.\n * \n * There are some that can't have a shadow DOM for security reasons (for example <a>), and more besides.\n * \n * The following is a list of elements you can attach a shadow root to:\n * Any autonomous custom element with a valid name,\n * and [\n * article, aside, blockquote, body, div,footer,\n * h1, h2, h3, h4, h5, h6,\n * header, main, nav, p, section, span\n * ]\n * \n * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/attachShadow#elements_you_can_attach_a_shadow_to\n * @param tagName \n * @returns \n */\nexport function canAttachShadow(tagName: string) {\n\tif (isValidCustomElementName(tagName)) {\n\t\treturn true;\n\t}\n\treturn ShadowElements.includes(tagName);\n}\n\n\n"]}
1
+ {"version":3,"file":"shadow.js","sourceRoot":"","sources":["../../../src/elements/attributes/shadow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AAErD,MAAM,CAAC,MAAM,cAAc,GAAG;IAC7B,SAAS;IACT,OAAO;IACP,YAAY;IACZ,MAAM;IACN,KAAK;IACL,QAAQ;IACR,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,QAAQ;IACR,MAAM;IACN,KAAK;IACL,GAAG;IACH,SAAS;IACT,MAAM;CACN,CAAC;AAEF;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,eAAe,CAAC,OAAe;IAC9C,IAAI,wBAAwB,CAAC,OAAO,CAAC,EAAE;QACtC,OAAO,IAAI,CAAC;KACZ;IACD,OAAO,cAAc,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;AACzC,CAAC","sourcesContent":["import { isValidCustomElementName } from './tags.js';\n\nexport const ShadowElements = [\n\t'article',\n\t'aside',\n\t'blockquote',\n\t'body',\n\t'div',\n\t'footer',\n\t'h1',\n\t'h2',\n\t'h3',\n\t'h4',\n\t'h5',\n\t'h6',\n\t'header',\n\t'main',\n\t'nav',\n\t'p',\n\t'section',\n\t'span',\n];\n\n/**\n * Note that you can't attach a shadow root to every type of element.\n * \n * There are some that can't have a shadow DOM for security reasons (for example <a>), and more besides.\n * \n * The following is a list of elements you can attach a shadow root to:\n * Any autonomous custom element with a valid name,\n * and [\n * article, aside, blockquote, body, div,footer,\n * h1, h2, h3, h4, h5, h6,\n * header, main, nav, p, section, span\n * ]\n * \n * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/attachShadow#elements_you_can_attach_a_shadow_to\n * @param tagName \n * @returns \n */\nexport function canAttachShadow(tagName: string) {\n\tif (isValidCustomElementName(tagName)) {\n\t\treturn true;\n\t}\n\treturn ShadowElements.includes(tagName);\n}\n\n\n"]}
@@ -5,9 +5,17 @@ export interface Tag {
5
5
  }
6
6
  export declare function getClassRef(htmlElementName: string): TagClassRef;
7
7
  export declare const DefaultTag: Tag;
8
+ /**
9
+ * see https://html.spec.whatwg.org/multipage/indices.html#element-interfaces
10
+ */
8
11
  export declare const NativeTags: Tag[];
9
12
  export declare function findByTagName(tagName: string | undefined): Tag;
10
13
  export declare function isTagNameNative(tagName: string): boolean;
14
+ /**
15
+ * see https://html.spec.whatwg.org/multipage/custom-elements.html#valid-custom-element-name
16
+ * see https://github.com/mathiasbynens/mothereff.in/blob/master/custom-element-name/vendor/is-potential-custom-element-name.js
17
+ * @param tagName
18
+ */
11
19
  export declare const CustomElementRegex: RegExp;
12
20
  export declare function isValidCustomElementName(tagName: string): boolean;
13
21
  export declare function isHTMLUnknownElementTagName(tagName: string): boolean;
@@ -14,6 +14,9 @@ function isMedia(name) {
14
14
  return name.includes('video') || name.includes('audio');
15
15
  }
16
16
  export const DefaultTag = Object.freeze({ classRef: HTMLElement });
17
+ /**
18
+ * see https://html.spec.whatwg.org/multipage/indices.html#element-interfaces
19
+ */
17
20
  export const NativeTags = [
18
21
  { name: 'a', classRef: HTMLAnchorElement },
19
22
  { name: 'abbr', classRef: HTMLElement },
@@ -42,6 +45,7 @@ export const NativeTags = [
42
45
  { name: 'del', classRef: HTMLModElement },
43
46
  { name: 'details', classRef: HTMLDetailsElement },
44
47
  { name: 'dfn', classRef: HTMLElement },
48
+ // { name: 'dialog', classRef: window.HTMLDialogElement || HTMLElement },
45
49
  { name: 'div', classRef: HTMLDivElement },
46
50
  { name: 'dl', classRef: HTMLDListElement },
47
51
  { name: 'dt', classRef: HTMLElement },
@@ -326,6 +330,11 @@ export function findByTagName(tagName) {
326
330
  export function isTagNameNative(tagName) {
327
331
  return (tagName in HTMLElementTagNameMap) || (tagName in SVGElementTagNameMap);
328
332
  }
333
+ /**
334
+ * see https://html.spec.whatwg.org/multipage/custom-elements.html#valid-custom-element-name
335
+ * see https://github.com/mathiasbynens/mothereff.in/blob/master/custom-element-name/vendor/is-potential-custom-element-name.js
336
+ * @param tagName
337
+ */
329
338
  export 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])*$/;
330
339
  export function isValidCustomElementName(tagName) {
331
340
  return CustomElementRegex.test(tagName);
@@ -1 +1 @@
1
- {"version":3,"file":"tags.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;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 isVoidElement = isEmptyElement;\n"]}
1
+ {"version":3,"file":"tags.js","sourceRoot":"","sources":["../../../src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K,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 isVoidElement = isEmptyElement;\n"]}
@@ -1,5 +1,11 @@
1
1
  export interface DirectiveNodeOptions {
2
+ /**
3
+ * list of inputs view name
4
+ */
2
5
  inputs?: string[];
6
+ /**
7
+ * list of outputs view name
8
+ */
3
9
  outputs?: string[];
4
10
  }
5
11
  declare class DirectiveNodeInfo {
@@ -17,19 +23,89 @@ declare class DirectiveNodeInfo {
17
23
  hasOutput(outputName: string): boolean;
18
24
  }
19
25
  export declare class DirectiveRegistry {
26
+ /**
27
+ * store options info about directives
28
+ */
20
29
  private directives;
30
+ /**
31
+ * register a directive with a name,
32
+ *
33
+ * the directive could be a structural directive or an attribute directive.
34
+ *
35
+ * if the directive name exists, will not replace the old directive options.
36
+ * @param directiveName
37
+ * @param options contain the attributes of the registered directive name
38
+ * @override
39
+ */
21
40
  register(directiveName: string, options?: DirectiveNodeOptions): void;
41
+ /**
42
+ * replace the current options with a new one.
43
+ *
44
+ * the directive could be a structural directive or an attribute directive.
45
+ *
46
+ * if the directive name not exists, no set options will be done
47
+ * @param directiveName
48
+ * @param options to be replaced
49
+ */
22
50
  replace(directiveName: string, options: DirectiveNodeOptions): void;
51
+ /**
52
+ * check if directive name is registered
53
+ * @param directiveName
54
+ * @returns `boolean`
55
+ */
23
56
  has(attributeName: string): boolean;
57
+ /**
58
+ * get the DirectiveOptions for a directive name
59
+ * @param directiveName
60
+ * @returns `DirectiveOptions` if the name has been registered, otherwise `undefined`
61
+ */
24
62
  get(directiveName: string): DirectiveNodeInfo | undefined;
63
+ /**
64
+ * check if the options registered with a `directiveName` has attributes array
65
+ * @param directiveName
66
+ * @returns `boolean`
67
+ */
25
68
  hasAttributes(directiveName: string): boolean;
26
69
  hasInputs(directiveName: string): boolean;
27
70
  hasOutputs(directiveName: string): boolean;
71
+ /**
72
+ * get the value of the registered inputs and outputs by directive name
73
+ * @param directiveName
74
+ * @returns array of strings if found, otherwise `undefined`
75
+ */
28
76
  getAttributes(directiveName: string): string[] | undefined;
77
+ /**
78
+ * get the value of the registered inputs by directive name
79
+ * @param directiveName
80
+ * @returns array of strings if found, otherwise `undefined`
81
+ */
29
82
  getInputs(directiveName: string): string[] | undefined;
83
+ /**
84
+ * get the value of the registered outputs by directive name
85
+ * @param directiveName
86
+ * @returns array of strings if found, otherwise `undefined`
87
+ */
30
88
  getOutputs(directiveName: string): string[] | undefined;
89
+ /**
90
+ * check if a directive has a attribute
91
+ * @param directiveName
92
+ * @param attributeName
93
+ * @returns
94
+ */
31
95
  hasAttribute(directiveName: string, attributeName: string): boolean;
96
+ /**
97
+ * check if has input
98
+ * @param directiveName
99
+ * @param inputName
100
+ * @returns
101
+ */
32
102
  hasInput(directiveName: string, inputName: string): boolean;
103
+ /**
104
+ * check if has output
105
+ * @param directiveName
106
+ * @param outputName
107
+ * @returns
108
+ */
33
109
  hasOutput(directiveName: string, outputName: string): boolean;
34
110
  filterDirectives(attributes: string[]): string[];
35
111
  }
@@ -42,26 +42,63 @@ class DirectiveNodeInfo {
42
42
  }
43
43
  export class DirectiveRegistry {
44
44
  constructor() {
45
+ /**
46
+ * store options info about directives
47
+ */
45
48
  this.directives = new Map();
46
49
  }
50
+ /**
51
+ * register a directive with a name,
52
+ *
53
+ * the directive could be a structural directive or an attribute directive.
54
+ *
55
+ * if the directive name exists, will not replace the old directive options.
56
+ * @param directiveName
57
+ * @param options contain the attributes of the registered directive name
58
+ * @override
59
+ */
47
60
  register(directiveName, options) {
48
61
  if (!this.directives.has(directiveName)) {
49
62
  const info = new DirectiveNodeInfo(options?.inputs, options?.outputs);
50
63
  this.directives.set(directiveName, info);
51
64
  }
52
65
  }
66
+ /**
67
+ * replace the current options with a new one.
68
+ *
69
+ * the directive could be a structural directive or an attribute directive.
70
+ *
71
+ * if the directive name not exists, no set options will be done
72
+ * @param directiveName
73
+ * @param options to be replaced
74
+ */
53
75
  replace(directiveName, options) {
54
76
  if (this.directives.has(directiveName)) {
55
77
  const info = new DirectiveNodeInfo(options?.inputs, options?.outputs);
56
78
  this.directives.set(directiveName, info);
57
79
  }
58
80
  }
81
+ /**
82
+ * check if directive name is registered
83
+ * @param directiveName
84
+ * @returns `boolean`
85
+ */
59
86
  has(attributeName) {
60
87
  return this.directives.has(attributeName);
61
88
  }
89
+ /**
90
+ * get the DirectiveOptions for a directive name
91
+ * @param directiveName
92
+ * @returns `DirectiveOptions` if the name has been registered, otherwise `undefined`
93
+ */
62
94
  get(directiveName) {
63
95
  return this.directives.get(directiveName);
64
96
  }
97
+ /**
98
+ * check if the options registered with a `directiveName` has attributes array
99
+ * @param directiveName
100
+ * @returns `boolean`
101
+ */
65
102
  hasAttributes(directiveName) {
66
103
  return this.hasInputs(directiveName) || this.hasOutputs(directiveName);
67
104
  }
@@ -71,21 +108,54 @@ export class DirectiveRegistry {
71
108
  hasOutputs(directiveName) {
72
109
  return this.directives.get(directiveName)?.hasOutputs() || false;
73
110
  }
111
+ /**
112
+ * get the value of the registered inputs and outputs by directive name
113
+ * @param directiveName
114
+ * @returns array of strings if found, otherwise `undefined`
115
+ */
74
116
  getAttributes(directiveName) {
75
117
  return this.directives.get(directiveName)?.getAttributes();
76
118
  }
119
+ /**
120
+ * get the value of the registered inputs by directive name
121
+ * @param directiveName
122
+ * @returns array of strings if found, otherwise `undefined`
123
+ */
77
124
  getInputs(directiveName) {
78
125
  return this.directives.get(directiveName)?.getInputs();
79
126
  }
127
+ /**
128
+ * get the value of the registered outputs by directive name
129
+ * @param directiveName
130
+ * @returns array of strings if found, otherwise `undefined`
131
+ */
80
132
  getOutputs(directiveName) {
81
133
  return this.directives.get(directiveName)?.getOutputs();
82
134
  }
135
+ /**
136
+ * check if a directive has a attribute
137
+ * @param directiveName
138
+ * @param attributeName
139
+ * @returns
140
+ */
83
141
  hasAttribute(directiveName, attributeName) {
84
142
  return this.directives.get(directiveName)?.hasAttribute(attributeName) || false;
85
143
  }
144
+ /**
145
+ * check if has input
146
+ * @param directiveName
147
+ * @param inputName
148
+ * @returns
149
+ */
86
150
  hasInput(directiveName, inputName) {
87
151
  return this.directives.get(directiveName)?.hasInput(inputName) || false;
88
152
  }
153
+ /**
154
+ * check if has output
155
+ * @param directiveName
156
+ * @param outputName
157
+ * @returns
158
+ */
89
159
  hasOutput(directiveName, outputName) {
90
160
  return this.directives.get(directiveName)?.hasOutput(outputName) || false;
91
161
  }
@@ -1 +1 @@
1
- {"version":3,"file":"register-directive.js","sourceRoot":"","sources":["../../../src/elements/directives/register-directive.ts"],"names":[],"mappings":"AAeA,MAAM,iBAAiB;IACtB,YAAoB,MAAiB,EAAU,OAAkB;QAA7C,WAAM,GAAN,MAAM,CAAW;QAAU,YAAO,GAAP,OAAO,CAAW;IAAI,CAAC;IAEtE,aAAa;QACZ,OAAO,IAAI,CAAC,SAAS,EAAE,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;IAC9C,CAAC;IAED,SAAS;QACR,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,MAAM,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;IACvC,CAAC;IAED,UAAU;QACT,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;IACxC,CAAC;IAED,aAAa;QACZ,IAAI,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,OAAO,EAAE;YAChC,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;SACxC;aAAM,IAAI,IAAI,CAAC,MAAM,EAAE;YACvB,OAAO,IAAI,CAAC,MAAM,CAAC;SACnB;aAAM,IAAI,IAAI,CAAC,OAAO,EAAE;YACxB,OAAO,IAAI,CAAC,OAAO,CAAC;SACpB;QACD,OAAO,SAAS,CAAC;IAClB,CAAC;IAED,SAAS;QACR,OAAO,IAAI,CAAC,MAAM,CAAC;IACpB,CAAC;IAED,UAAU;QACT,OAAO,IAAI,CAAC,OAAO,CAAC;IACrB,CAAC;IAED,YAAY,CAAC,aAAqB;QACjC,OAAO,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,IAAI,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,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AAI,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;IAClD,CAAC;CAED;AAED,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,iBAAiB,EAAE,CAAC","sourcesContent":["\n\nexport interface DirectiveNodeOptions {\n\n\t/**\n\t * list of inputs view name\n\t */\n\tinputs?: string[];\n\n\t/**\n\t * list of outputs view name\n\t */\n\toutputs?: string[];\n}\n\nclass DirectiveNodeInfo {\n\tconstructor(private inputs?: string[], private outputs?: string[]) { }\n\n\thasAttributes(): boolean {\n\t\treturn this.hasInputs() || this.hasOutputs();\n\t}\n\n\thasInputs(): boolean {\n\t\treturn (this.inputs?.length ?? 0) > 0;\n\t}\n\n\thasOutputs(): boolean {\n\t\treturn (this.outputs?.length ?? 0) > 0;\n\t}\n\n\tgetAttributes(): string[] | undefined {\n\t\tif (this.inputs && this.outputs) {\n\t\t\treturn this.inputs.concat(this.outputs);\n\t\t} else if (this.inputs) {\n\t\t\treturn this.inputs;\n\t\t} else if (this.outputs) {\n\t\t\treturn this.outputs;\n\t\t}\n\t\treturn undefined;\n\t}\n\n\tgetInputs(): string[] | undefined {\n\t\treturn this.inputs;\n\t}\n\n\tgetOutputs(): string[] | undefined {\n\t\treturn this.outputs;\n\t}\n\n\thasAttribute(attributeName: string): boolean {\n\t\treturn this.hasInput(attributeName) || this.hasOutput(attributeName);\n\t}\n\n\thasInput(inputName: string): boolean {\n\t\treturn this.inputs?.includes(inputName) || false;\n\t}\n\n\thasOutput(outputName: string): boolean {\n\t\treturn this.outputs?.includes(outputName) || false;\n\t}\n\n}\n\nexport class DirectiveRegistry {\n\n\t/**\n\t * store options info about directives\n\t */\n\tprivate directives = new Map<string, DirectiveNodeInfo>();\n\n\t/**\n\t * register a directive with a name,\n\t * \n\t * the directive could be a structural directive or an attribute directive.\n\t * \n\t * if the directive name exists, will not replace the old directive options.\n\t * @param directiveName \n\t * @param options contain the attributes of the registered directive name\n\t * @override\n\t */\n\tregister(directiveName: string, options?: DirectiveNodeOptions): void {\n\t\tif (!this.directives.has(directiveName)) {\n\t\t\tconst info = new DirectiveNodeInfo(options?.inputs, options?.outputs);\n\t\t\tthis.directives.set(directiveName, info);\n\t\t}\n\t}\n\n\t/**\n\t * replace the current options with a new one.\n\t * \n\t * the directive could be a structural directive or an attribute directive.\n\t * \n\t * if the directive name not exists, no set options will be done\n\t * @param directiveName \n\t * @param options to be replaced\n\t */\n\treplace(directiveName: string, options: DirectiveNodeOptions): void {\n\t\tif (this.directives.has(directiveName)) {\n\t\t\tconst info = new DirectiveNodeInfo(options?.inputs, options?.outputs);\n\t\t\tthis.directives.set(directiveName, info);\n\t\t}\n\t}\n\n\t/**\n\t * check if directive name is registered\n\t * @param directiveName \n\t * @returns `boolean`\n\t */\n\thas(attributeName: string): boolean {\n\t\treturn this.directives.has(attributeName);\n\t}\n\n\t/**\n\t * get the DirectiveOptions for a directive name\n\t * @param directiveName \n\t * @returns `DirectiveOptions` if the name has been registered, otherwise `undefined`\n\t */\n\tget(directiveName: string): DirectiveNodeInfo | undefined {\n\t\treturn this.directives.get(directiveName);\n\t}\n\n\t/**\n\t * check if the options registered with a `directiveName` has attributes array\n\t * @param directiveName \n\t * @returns `boolean`\n\t */\n\thasAttributes(directiveName: string): boolean {\n\t\treturn this.hasInputs(directiveName) || this.hasOutputs(directiveName);\n\t}\n\n\thasInputs(directiveName: string): boolean {\n\t\treturn this.directives.get(directiveName)?.hasInputs() || false;\n\t}\n\n\thasOutputs(directiveName: string): boolean {\n\t\treturn this.directives.get(directiveName)?.hasOutputs() || false;\n\t}\n\n\t/**\n\t * get the value of the registered inputs and outputs by directive name\n\t * @param directiveName \n\t * @returns array of strings if found, otherwise `undefined`\n\t */\n\tgetAttributes(directiveName: string): string[] | undefined {\n\t\treturn this.directives.get(directiveName)?.getAttributes();\n\t}\n\n\t/**\n\t * get the value of the registered inputs by directive name\n\t * @param directiveName \n\t * @returns array of strings if found, otherwise `undefined`\n\t */\n\tgetInputs(directiveName: string): string[] | undefined {\n\t\treturn this.directives.get(directiveName)?.getInputs();\n\t}\n\n\t/**\n\t * get the value of the registered outputs by directive name\n\t * @param directiveName \n\t * @returns array of strings if found, otherwise `undefined`\n\t */\n\tgetOutputs(directiveName: string): string[] | undefined {\n\t\treturn this.directives.get(directiveName)?.getOutputs();\n\t}\n\n\t/**\n\t * check if a directive has a attribute\n\t * @param directiveName \n\t * @param attributeName \n\t * @returns \n\t */\n\thasAttribute(directiveName: string, attributeName: string): boolean {\n\t\treturn this.directives.get(directiveName)?.hasAttribute(attributeName) || false;\n\t}\n\n\t/**\n\t * check if has input\n\t * @param directiveName \n\t * @param inputName \n\t * @returns \n\t */\n\thasInput(directiveName: string, inputName: string): boolean {\n\t\treturn this.directives.get(directiveName)?.hasInput(inputName) || false;\n\t}\n\n\t/**\n\t * check if has output\n\t * @param directiveName \n\t * @param outputName \n\t * @returns \n\t */\n\thasOutput(directiveName: string, outputName: string): boolean {\n\t\treturn this.directives.get(directiveName)?.hasOutput(outputName) || false;\n\t}\n\n\tfilterDirectives(attributes: string[]): string[] {\n\t\treturn attributes.filter(name => this.has(name));\n\t}\n\n}\n\nexport const directiveRegistry = new DirectiveRegistry();\n"]}
1
+ {"version":3,"file":"register-directive.js","sourceRoot":"","sources":["../../../src/elements/directives/register-directive.ts"],"names":[],"mappings":"AAeA,MAAM,iBAAiB;IACtB,YAAoB,MAAiB,EAAU,OAAkB;QAA7C,WAAM,GAAN,MAAM,CAAW;QAAU,YAAO,GAAP,OAAO,CAAW;IAAI,CAAC;IAEtE,aAAa;QACZ,OAAO,IAAI,CAAC,SAAS,EAAE,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;IAC9C,CAAC;IAED,SAAS;QACR,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,MAAM,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;IACvC,CAAC;IAED,UAAU;QACT,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,IAAI,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U,CAAC,GAAG,CAAC,aAAa,CAAC,EAAE,SAAS,EAAE,CAAC;IACxD,CAAC;IAED;;;;OAIG;IACH,UAAU,CAAC,aAAqB;QAC/B,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,aAAa,CAAC,EAAE,UAAU,EAAE,CAAC;IACzD,CAAC;IAED;;;;;OAKG;IACH,YAAY,CAAC,aAAqB,EAAE,aAAqB;QACxD,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,aAAa,CAAC,EAAE,YAAY,CAAC,aAAa,CAAC,IAAI,KAAK,CAAC;IACjF,CAAC;IAED;;;;;OAKG;IACH,QAAQ,CAAC,aAAqB,EAAE,SAAiB;QAChD,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,aAAa,CAAC,EAAE,QAAQ,CAAC,SAAS,CAAC,IAAI,KAAK,CAAC;IACzE,CAAC;IAED;;;;;OAKG;IACH,SAAS,CAAC,aAAqB,EAAE,UAAkB;QAClD,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,aAAa,CAAC,EAAE,SAAS,CAAC,UAAU,CAAC,IAAI,KAAK,CAAC;IAC3E,CAAC;IAED,gBAAgB,CAAC,UAAoB;QACpC,OAAO,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;IAClD,CAAC;CAED;AAED,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,iBAAiB,EAAE,CAAC","sourcesContent":["\n\nexport interface DirectiveNodeOptions {\n\n\t/**\n\t * list of inputs view name\n\t */\n\tinputs?: string[];\n\n\t/**\n\t * list of outputs view name\n\t */\n\toutputs?: string[];\n}\n\nclass DirectiveNodeInfo {\n\tconstructor(private inputs?: string[], private outputs?: string[]) { }\n\n\thasAttributes(): boolean {\n\t\treturn this.hasInputs() || this.hasOutputs();\n\t}\n\n\thasInputs(): boolean {\n\t\treturn (this.inputs?.length ?? 0) > 0;\n\t}\n\n\thasOutputs(): boolean {\n\t\treturn (this.outputs?.length ?? 0) > 0;\n\t}\n\n\tgetAttributes(): string[] | undefined {\n\t\tif (this.inputs && this.outputs) {\n\t\t\treturn this.inputs.concat(this.outputs);\n\t\t} else if (this.inputs) {\n\t\t\treturn this.inputs;\n\t\t} else if (this.outputs) {\n\t\t\treturn this.outputs;\n\t\t}\n\t\treturn undefined;\n\t}\n\n\tgetInputs(): string[] | undefined {\n\t\treturn this.inputs;\n\t}\n\n\tgetOutputs(): string[] | undefined {\n\t\treturn this.outputs;\n\t}\n\n\thasAttribute(attributeName: string): boolean {\n\t\treturn this.hasInput(attributeName) || this.hasOutput(attributeName);\n\t}\n\n\thasInput(inputName: string): boolean {\n\t\treturn this.inputs?.includes(inputName) || false;\n\t}\n\n\thasOutput(outputName: string): boolean {\n\t\treturn this.outputs?.includes(outputName) || false;\n\t}\n\n}\n\nexport class DirectiveRegistry {\n\n\t/**\n\t * store options info about directives\n\t */\n\tprivate directives = new Map<string, DirectiveNodeInfo>();\n\n\t/**\n\t * register a directive with a name,\n\t * \n\t * the directive could be a structural directive or an attribute directive.\n\t * \n\t * if the directive name exists, will not replace the old directive options.\n\t * @param directiveName \n\t * @param options contain the attributes of the registered directive name\n\t * @override\n\t */\n\tregister(directiveName: string, options?: DirectiveNodeOptions): void {\n\t\tif (!this.directives.has(directiveName)) {\n\t\t\tconst info = new DirectiveNodeInfo(options?.inputs, options?.outputs);\n\t\t\tthis.directives.set(directiveName, info);\n\t\t}\n\t}\n\n\t/**\n\t * replace the current options with a new one.\n\t * \n\t * the directive could be a structural directive or an attribute directive.\n\t * \n\t * if the directive name not exists, no set options will be done\n\t * @param directiveName \n\t * @param options to be replaced\n\t */\n\treplace(directiveName: string, options: DirectiveNodeOptions): void {\n\t\tif (this.directives.has(directiveName)) {\n\t\t\tconst info = new DirectiveNodeInfo(options?.inputs, options?.outputs);\n\t\t\tthis.directives.set(directiveName, info);\n\t\t}\n\t}\n\n\t/**\n\t * check if directive name is registered\n\t * @param directiveName \n\t * @returns `boolean`\n\t */\n\thas(attributeName: string): boolean {\n\t\treturn this.directives.has(attributeName);\n\t}\n\n\t/**\n\t * get the DirectiveOptions for a directive name\n\t * @param directiveName \n\t * @returns `DirectiveOptions` if the name has been registered, otherwise `undefined`\n\t */\n\tget(directiveName: string): DirectiveNodeInfo | undefined {\n\t\treturn this.directives.get(directiveName);\n\t}\n\n\t/**\n\t * check if the options registered with a `directiveName` has attributes array\n\t * @param directiveName \n\t * @returns `boolean`\n\t */\n\thasAttributes(directiveName: string): boolean {\n\t\treturn this.hasInputs(directiveName) || this.hasOutputs(directiveName);\n\t}\n\n\thasInputs(directiveName: string): boolean {\n\t\treturn this.directives.get(directiveName)?.hasInputs() || false;\n\t}\n\n\thasOutputs(directiveName: string): boolean {\n\t\treturn this.directives.get(directiveName)?.hasOutputs() || false;\n\t}\n\n\t/**\n\t * get the value of the registered inputs and outputs by directive name\n\t * @param directiveName \n\t * @returns array of strings if found, otherwise `undefined`\n\t */\n\tgetAttributes(directiveName: string): string[] | undefined {\n\t\treturn this.directives.get(directiveName)?.getAttributes();\n\t}\n\n\t/**\n\t * get the value of the registered inputs by directive name\n\t * @param directiveName \n\t * @returns array of strings if found, otherwise `undefined`\n\t */\n\tgetInputs(directiveName: string): string[] | undefined {\n\t\treturn this.directives.get(directiveName)?.getInputs();\n\t}\n\n\t/**\n\t * get the value of the registered outputs by directive name\n\t * @param directiveName \n\t * @returns array of strings if found, otherwise `undefined`\n\t */\n\tgetOutputs(directiveName: string): string[] | undefined {\n\t\treturn this.directives.get(directiveName)?.getOutputs();\n\t}\n\n\t/**\n\t * check if a directive has a attribute\n\t * @param directiveName \n\t * @param attributeName \n\t * @returns \n\t */\n\thasAttribute(directiveName: string, attributeName: string): boolean {\n\t\treturn this.directives.get(directiveName)?.hasAttribute(attributeName) || false;\n\t}\n\n\t/**\n\t * check if has input\n\t * @param directiveName \n\t * @param inputName \n\t * @returns \n\t */\n\thasInput(directiveName: string, inputName: string): boolean {\n\t\treturn this.directives.get(directiveName)?.hasInput(inputName) || false;\n\t}\n\n\t/**\n\t * check if has output\n\t * @param directiveName \n\t * @param outputName \n\t * @returns \n\t */\n\thasOutput(directiveName: string, outputName: string): boolean {\n\t\treturn this.directives.get(directiveName)?.hasOutput(outputName) || false;\n\t}\n\n\tfilterDirectives(attributes: string[]): string[] {\n\t\treturn attributes.filter(name => this.has(name));\n\t}\n\n}\n\nexport const directiveRegistry = new DirectiveRegistry();\n"]}
@@ -45,7 +45,7 @@ export class NodeParser {
45
45
  }
46
46
  if (this.stackTrace.length > 0) {
47
47
  console.error(this.stackTrace);
48
- throw new Error(`error parsing html, had ${this.stackTrace.length} element, with no closing tag`);
48
+ throw new Error(`error parsing html, had ${this.stackTrace.length} element, [${this.stackTrace.map(dom => dom.tagName).join(', ')}], with no closing tag`);
49
49
  }
50
50
  let stack = this.childStack;
51
51
  this.reset();
@@ -118,7 +118,7 @@ export class NodeParser {
118
118
  if (token === '>') {
119
119
  if (!isEmptyElement(this.currentNode.tagName)
120
120
  && this.currentNode.tagName.trim().toLowerCase() !== this.tempText.trim().toLowerCase()) {
121
- throw 'Wrong closed tag at char ' + this.index;
121
+ throw new Error(`Wrong closed tag at char ${this.index}, tag name: ${this.currentNode.tagName}`);
122
122
  }
123
123
  this.popElement();
124
124
  this.tempText = '';
@@ -146,6 +146,7 @@ export class NodeParser {
146
146
  this.propType = 'attr';
147
147
  return this.parsePropertyName;
148
148
  }
149
+ throw new SyntaxError('Error while parsing open tag');
149
150
  }
150
151
  parsePropertyName(token) {
151
152
  if (token === '>') {
@@ -357,6 +358,10 @@ export class NodeParser {
357
358
  }
358
359
  }
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>
360
365
  const temp = node.attributes.filter(attr => attr.name == sdName)[0];
361
366
  node.attributes.splice(node.attributes.indexOf(temp), 1);
362
367
  const isTemplate = node.tagName === 'template';
@@ -382,6 +387,7 @@ export class NodeParser {
382
387
  }
383
388
  return directive;
384
389
  }
390
+ // <for let-user [of]="users"></for>
385
391
  if (directiveRegistry.has('*' + node.tagName)) {
386
392
  const children = new DomFragmentNode(node.children);
387
393
  const directive = new DomStructuralDirectiveNode('*' + node.tagName, children);