@dooboostore/simple-web-component 1.0.0 → 1.0.1

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 (86) hide show
  1. package/README.md +67 -70
  2. package/dist/cjs/decorators/addEventListener.js +42 -0
  3. package/dist/cjs/decorators/addEventListener.js.map +7 -0
  4. package/dist/cjs/decorators/attributeChanged.js +24 -4
  5. package/dist/cjs/decorators/attributeChanged.js.map +2 -2
  6. package/dist/cjs/decorators/{element.js → elementDefind.js} +91 -13
  7. package/dist/cjs/decorators/elementDefind.js.map +7 -0
  8. package/dist/cjs/decorators/query.js +53 -0
  9. package/dist/cjs/decorators/query.js.map +7 -0
  10. package/dist/cjs/decorators/queryAll.js +53 -0
  11. package/dist/cjs/decorators/queryAll.js.map +7 -0
  12. package/dist/cjs/elements/SwcChoose.js +117 -0
  13. package/dist/cjs/elements/SwcChoose.js.map +7 -0
  14. package/dist/cjs/elements/SwcForOf.js +196 -0
  15. package/dist/cjs/elements/SwcForOf.js.map +7 -0
  16. package/dist/cjs/elements/SwcIf.js +135 -0
  17. package/dist/cjs/elements/SwcIf.js.map +7 -0
  18. package/dist/cjs/elements/SwcOther.js +56 -0
  19. package/dist/cjs/elements/SwcOther.js.map +7 -0
  20. package/dist/cjs/elements/SwcWhen.js +56 -0
  21. package/dist/cjs/elements/SwcWhen.js.map +7 -0
  22. package/dist/cjs/index.js +9 -1
  23. package/dist/cjs/index.js.map +2 -2
  24. package/dist/esm/decorators/addEventListener.js +23 -0
  25. package/dist/esm/decorators/addEventListener.js.map +7 -0
  26. package/dist/esm/decorators/attributeChanged.js +24 -4
  27. package/dist/esm/decorators/attributeChanged.js.map +2 -2
  28. package/dist/esm/decorators/{element.js → elementDefind.js} +89 -11
  29. package/dist/esm/decorators/elementDefind.js.map +7 -0
  30. package/dist/esm/decorators/query.js +34 -0
  31. package/dist/esm/decorators/query.js.map +7 -0
  32. package/dist/esm/decorators/queryAll.js +34 -0
  33. package/dist/esm/decorators/queryAll.js.map +7 -0
  34. package/dist/esm/elements/SwcChoose.js +98 -0
  35. package/dist/esm/elements/SwcChoose.js.map +7 -0
  36. package/dist/esm/elements/SwcForOf.js +177 -0
  37. package/dist/esm/elements/SwcForOf.js.map +7 -0
  38. package/dist/esm/elements/SwcIf.js +116 -0
  39. package/dist/esm/elements/SwcIf.js.map +7 -0
  40. package/dist/esm/elements/SwcOther.js +37 -0
  41. package/dist/esm/elements/SwcOther.js.map +7 -0
  42. package/dist/esm/elements/SwcWhen.js +37 -0
  43. package/dist/esm/elements/SwcWhen.js.map +7 -0
  44. package/dist/esm/index.js +9 -1
  45. package/dist/esm/index.js.map +2 -2
  46. package/dist/esm-bundle/dooboostore-simple-web-component.esm.js +649 -14
  47. package/dist/esm-bundle/dooboostore-simple-web-component.esm.js.map +4 -4
  48. package/dist/types/decorators/addEventListener.d.ts +16 -0
  49. package/dist/types/decorators/addEventListener.d.ts.map +1 -0
  50. package/dist/types/decorators/attributeChanged.d.ts +3 -1
  51. package/dist/types/decorators/attributeChanged.d.ts.map +1 -1
  52. package/dist/types/decorators/{element.d.ts → elementDefind.d.ts} +2 -2
  53. package/dist/types/decorators/elementDefind.d.ts.map +1 -0
  54. package/dist/types/decorators/query.d.ts +13 -0
  55. package/dist/types/decorators/query.d.ts.map +1 -0
  56. package/dist/types/decorators/queryAll.d.ts +13 -0
  57. package/dist/types/decorators/queryAll.d.ts.map +1 -0
  58. package/dist/types/elements/SwcChoose.d.ts +12 -0
  59. package/dist/types/elements/SwcChoose.d.ts.map +1 -0
  60. package/dist/types/elements/SwcForOf.d.ts +16 -0
  61. package/dist/types/elements/SwcForOf.d.ts.map +1 -0
  62. package/dist/types/elements/SwcIf.d.ts +14 -0
  63. package/dist/types/elements/SwcIf.d.ts.map +1 -0
  64. package/dist/types/elements/SwcOther.d.ts +5 -0
  65. package/dist/types/elements/SwcOther.d.ts.map +1 -0
  66. package/dist/types/elements/SwcWhen.d.ts +5 -0
  67. package/dist/types/elements/SwcWhen.d.ts.map +1 -0
  68. package/dist/types/index.d.ts +9 -1
  69. package/dist/types/index.d.ts.map +1 -1
  70. package/dist/umd-bundle/dooboostore-simple-web-component.umd.js +649 -14
  71. package/dist/umd-bundle/dooboostore-simple-web-component.umd.js.map +4 -4
  72. package/package.json +1 -1
  73. package/src/decorators/addEventListener.ts +35 -0
  74. package/src/decorators/attributeChanged.ts +29 -6
  75. package/src/decorators/{element.ts → elementDefind.ts} +121 -11
  76. package/src/decorators/query.ts +46 -0
  77. package/src/decorators/queryAll.ts +46 -0
  78. package/src/elements/SwcChoose.ts +83 -0
  79. package/src/elements/SwcForOf.ts +170 -0
  80. package/src/elements/SwcIf.ts +111 -0
  81. package/src/elements/SwcOther.ts +14 -0
  82. package/src/elements/SwcWhen.ts +14 -0
  83. package/src/index.ts +10 -2
  84. package/dist/cjs/decorators/element.js.map +0 -7
  85. package/dist/esm/decorators/element.js.map +0 -7
  86. package/dist/types/decorators/element.d.ts.map +0 -1
@@ -0,0 +1,170 @@
1
+ import { elementDefind, template, style } from '../index';
2
+
3
+ @elementDefind({ tagName: 'swc-for-of', useShadow: true })
4
+ export class SwcForOf extends HTMLElement {
5
+ private _value: any[] = [];
6
+ private _masterTplNodes: Node[] = [];
7
+
8
+ constructor() {
9
+ super();
10
+ }
11
+
12
+ set value(val: any[]) {
13
+ if (!Array.isArray(val)) val = [];
14
+ this._value = this.createProxy(val);
15
+ this.renderAll();
16
+ }
17
+
18
+ get value(): any[] {
19
+ return this._value;
20
+ }
21
+
22
+ private createProxy(arr: any[]) {
23
+ return new Proxy(arr, {
24
+ set: (target, prop, val) => {
25
+ const isIndex = !isNaN(Number(prop));
26
+ target[prop as any] = val;
27
+
28
+ if (isIndex) {
29
+ this.updateSingleRow(Number(prop), val);
30
+ } else if (prop === 'length' && val < target.length) {
31
+ this.renderAll();
32
+ }
33
+ return true;
34
+ },
35
+ deleteProperty: (target, prop) => {
36
+ const res = delete target[prop as any];
37
+ this.renderAll();
38
+ return res;
39
+ }
40
+ });
41
+ }
42
+
43
+ @style
44
+ styles() {
45
+ // display: contents를 통해 swc-for-of 태그 자체를 레이아웃에서 투명하게 만듭니다.
46
+ return `
47
+ :host { display: contents; }
48
+ `;
49
+ }
50
+
51
+ @template
52
+ renderTemplate() {
53
+ // 감싸는 div 없이 tpl-slot만 둡니다.
54
+ return `
55
+ <slot id="tpl-slot" style="display:none;"></slot>
56
+ `;
57
+ }
58
+
59
+ connectedCallback() {
60
+ const tplSlot = this.shadowRoot?.getElementById('tpl-slot') as HTMLSlotElement;
61
+ if (tplSlot) {
62
+ this._masterTplNodes = tplSlot.assignedNodes().map(n => n.cloneNode(true));
63
+ }
64
+ this.renderAll();
65
+ }
66
+
67
+ public updateSingleRow(index: number, newValue: any) {
68
+ const targets = this.querySelectorAll(`[slot="row-${index}"]`);
69
+ if (targets.length > 0) {
70
+ targets.forEach(target => this.applyData(target, newValue, index));
71
+ } else {
72
+ this.renderRow(newValue, index);
73
+ }
74
+ }
75
+
76
+ private applyData(node: Node, data: any, index: number) {
77
+ const getValueByPath = (obj: any, path: string) => {
78
+ if (path === 'value') return obj;
79
+ if (path.startsWith('value.')) {
80
+ return path
81
+ .split('.')
82
+ .slice(1)
83
+ .reduce((acc, part) => acc && acc[part], obj);
84
+ }
85
+ return undefined;
86
+ };
87
+
88
+ const walk = (n: Node) => {
89
+ if (n.nodeType === Node.TEXT_NODE) {
90
+ if (!(n as any)._original) (n as any)._original = n.textContent;
91
+ let text = (n as any)._original;
92
+
93
+ text = text.replace(/{{(.*?)}}/g, (match: string, path: string) => {
94
+ path = path.trim();
95
+ if (path === 'index') return index.toString();
96
+ const val = getValueByPath(data, path);
97
+ return val !== undefined ? val : match;
98
+ });
99
+ if (n.textContent !== text) n.textContent = text;
100
+ } else if (n.nodeType === Node.ELEMENT_NODE) {
101
+ const el = n as Element;
102
+ Array.from(el.attributes).forEach(a => {
103
+ if (!(a as any)._original) (a as any)._original = a.value;
104
+ let val = (a as any)._original;
105
+
106
+ val = val.replace(/{{(.*?)}}/g, (match: string, path: string) => {
107
+ path = path.trim();
108
+ if (path === 'index') return index.toString();
109
+ const v = getValueByPath(data, path);
110
+ return v !== undefined ? v : match;
111
+ });
112
+ if (a.value !== val) a.value = val;
113
+ });
114
+
115
+ // 중요: swc-choose 같은 커스텀 엘리먼트 내부의 자식들도 템플릿 치환이 필요함
116
+ el.childNodes.forEach(walk);
117
+ }
118
+ };
119
+ walk(node);
120
+ }
121
+
122
+ private renderRow(item: any, index: number) {
123
+ if (!this.shadowRoot || this._masterTplNodes.length === 0) return;
124
+
125
+ const slotName = `row-${index}`;
126
+ // Shadow Root에 직접 슬롯 추가
127
+ if (!this.shadowRoot.querySelector(`slot[name="${slotName}"]`)) {
128
+ const slot = document.createElement('slot');
129
+ slot.name = slotName;
130
+ this.shadowRoot.appendChild(slot);
131
+ }
132
+
133
+ this._masterTplNodes.forEach(tplNode => {
134
+ const clone = tplNode.cloneNode(true);
135
+ if (clone.nodeType === Node.ELEMENT_NODE) {
136
+ (clone as HTMLElement).setAttribute('slot', slotName);
137
+ (clone as HTMLElement).style.display = '';
138
+ } else if (clone.nodeType === Node.TEXT_NODE) {
139
+ if (clone.textContent?.trim().length === 0) return;
140
+ const span = document.createElement('span');
141
+ span.setAttribute('slot', slotName);
142
+ span.appendChild(clone);
143
+ this.appendChild(span);
144
+ this.applyData(span, item, index);
145
+ return;
146
+ }
147
+ this.appendChild(clone);
148
+ this.applyData(clone, item, index);
149
+ });
150
+ }
151
+
152
+ private renderAll() {
153
+ if (this._masterTplNodes.length === 0 || !this.shadowRoot) return;
154
+
155
+ // 기존 데이터 노드 삭제
156
+ Array.from(this.children).forEach(c => {
157
+ const slot = c.getAttribute('slot');
158
+ if (slot && slot.startsWith('row-')) {
159
+ c.remove();
160
+ }
161
+ });
162
+
163
+ // Shadow Root의 기존 슬롯들 삭제 (tpl-slot 제외)
164
+ Array.from(this.shadowRoot.querySelectorAll('slot')).forEach(s => {
165
+ if (s.id !== 'tpl-slot') s.remove();
166
+ });
167
+
168
+ this._value.forEach((item, index) => this.renderRow(item, index));
169
+ }
170
+ }
@@ -0,0 +1,111 @@
1
+ import { elementDefind, template, style } from '../index';
2
+
3
+ @elementDefind({ tagName: 'swc-if', useShadow: true })
4
+ export class SwcIf extends HTMLElement {
5
+ private _value: any = false;
6
+ private _masterTplNodes: Node[] = [];
7
+ private _observer: MutationObserver | null = null;
8
+
9
+ constructor() {
10
+ super();
11
+ }
12
+
13
+ set value(val: any) {
14
+ this._value = val;
15
+ this.render();
16
+ }
17
+
18
+ get value(): any {
19
+ return this._value;
20
+ }
21
+
22
+ @style
23
+ styles() {
24
+ return `
25
+ :host { display: contents; }
26
+ `;
27
+ }
28
+
29
+ @template
30
+ renderTemplate() {
31
+ return `
32
+ <slot id="tpl-slot" style="display:none;"></slot>
33
+ `;
34
+ }
35
+
36
+ connectedCallback() {
37
+ const tplSlot = this.shadowRoot?.getElementById('tpl-slot') as HTMLSlotElement;
38
+ if (tplSlot) {
39
+ // 초기 자식들을 템플릿으로 보관
40
+ this._masterTplNodes = tplSlot.assignedNodes().map(n => n.cloneNode(true));
41
+ }
42
+
43
+ this._observer = new MutationObserver(() => this.render());
44
+ this._observer.observe(this, { attributes: true });
45
+
46
+ this.render();
47
+ }
48
+
49
+ disconnectedCallback() {
50
+ this._observer?.disconnect();
51
+ }
52
+
53
+ private render() {
54
+ if (!this.shadowRoot) return;
55
+
56
+ const attrValue = this.getAttribute('value');
57
+ if (attrValue !== null && attrValue.includes('{{')) return; // 치환 전이면 대기
58
+
59
+ // 로직 결정: attribute가 있으면 우선, 없으면 property 사용
60
+ let displayValue = attrValue !== null ? attrValue : this._value;
61
+
62
+ // "false", "null", "undefined" 문자열 처리 및 기본 truthy 체크
63
+ let isTruthy = !!displayValue;
64
+ if (typeof displayValue === 'string') {
65
+ if (displayValue === 'false' || displayValue === '0' || displayValue === '') isTruthy = false;
66
+ else {
67
+ // 식인 경우 평가 시도 (예: "10 > 5")
68
+ try {
69
+ isTruthy = !!new Function(`return ${displayValue}`)();
70
+ } catch (e) {
71
+ // 단순 문자열이면 true로 간주
72
+ isTruthy = true;
73
+ }
74
+ }
75
+ }
76
+
77
+ // 1. 기존에 렌더링된 노드들 삭제
78
+ Array.from(this.children).forEach(c => {
79
+ if (c.getAttribute('slot') === 'if-content') {
80
+ c.remove();
81
+ }
82
+ });
83
+
84
+ // 2. Shadow DOM의 컨텐츠 슬롯 삭제
85
+ const existingSlot = this.shadowRoot.querySelector('slot[name="if-content"]');
86
+ if (existingSlot) existingSlot.remove();
87
+
88
+ // 3. 조건이 참일 때만 노드들을 복제해서 삽입
89
+ if (isTruthy && this._masterTplNodes.length > 0) {
90
+ const contentSlot = document.createElement('slot');
91
+ contentSlot.name = 'if-content';
92
+ this.shadowRoot.appendChild(contentSlot);
93
+
94
+ this._masterTplNodes.forEach(tplNode => {
95
+ const clone = tplNode.cloneNode(true);
96
+ if (clone.nodeType === Node.ELEMENT_NODE) {
97
+ (clone as HTMLElement).setAttribute('slot', 'if-content');
98
+ (clone as HTMLElement).style.display = '';
99
+ } else if (clone.nodeType === Node.TEXT_NODE) {
100
+ if (clone.textContent?.trim().length === 0) return;
101
+ const span = document.createElement('span');
102
+ span.setAttribute('slot', 'if-content');
103
+ span.appendChild(clone);
104
+ this.appendChild(span);
105
+ return;
106
+ }
107
+ this.appendChild(clone);
108
+ });
109
+ }
110
+ }
111
+ }
@@ -0,0 +1,14 @@
1
+ import { elementDefind, template, style } from '../index';
2
+
3
+ @elementDefind({ tagName: 'swc-other', useShadow: true })
4
+ export class SwcOther extends HTMLElement {
5
+ @style
6
+ styles() {
7
+ return `:host { display: contents; }`;
8
+ }
9
+
10
+ @template
11
+ render() {
12
+ return `<slot></slot>`;
13
+ }
14
+ }
@@ -0,0 +1,14 @@
1
+ import { elementDefind, template, style } from '../index';
2
+
3
+ @elementDefind({ tagName: 'swc-when', useShadow: true })
4
+ export class SwcWhen extends HTMLElement {
5
+ @style
6
+ styles() {
7
+ return `:host { display: contents; }`;
8
+ }
9
+
10
+ @template
11
+ render() {
12
+ return `<slot></slot>`;
13
+ }
14
+ }
package/src/index.ts CHANGED
@@ -1,4 +1,12 @@
1
- export * from './decorators/element';
1
+ export * from './decorators/elementDefind';
2
2
  export * from './decorators/template';
3
3
  export * from './decorators/style';
4
- export * from './decorators/attributeChanged';
4
+ export * from './decorators/attributeChanged';
5
+ export * from './decorators/query';
6
+ export * from './decorators/queryAll';
7
+ export * from './decorators/addEventListener';
8
+ export * from './elements/SwcForOf';
9
+ export * from './elements/SwcIf';
10
+ export * from './elements/SwcChoose';
11
+ export * from './elements/SwcWhen';
12
+ export * from './elements/SwcOther';
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/decorators/element.ts"],
4
- "sourcesContent": ["import { ReflectUtils } from '@dooboostore/core/reflect/ReflectUtils';\nimport { getAttributeChangedMap } from './attributeChanged';\nimport { getTemplateMethod } from './template';\nimport { getStyleMethod } from './style';\n\nexport interface ElementConfig {\n tagName: string;\n useShadow?: boolean;\n extends?: string;\n observedAttributes?: string[];\n customElementRegistry?: CustomElementRegistry;\n}\n\nexport const ELEMENT_CONFIG_KEY = Symbol('simple-web-component:element-config');\n\nconst BUILT_IN_TAG_MAP = new Map<any, string>();\n\nconst registerTag = (className: string, tagName: string) => {\n if (typeof globalThis !== 'undefined' && (globalThis as any)[className]) {\n BUILT_IN_TAG_MAP.set((globalThis as any)[className], tagName);\n }\n};\n\n// Register comprehensive list of supported tags for automatic extends inference\n[\n ['HTMLAnchorElement', 'a'],\n ['HTMLAreaElement', 'area'],\n ['HTMLAudioElement', 'audio'],\n ['HTMLBaseElement', 'base'],\n ['HTMLButtonElement', 'button'],\n ['HTMLCanvasElement', 'canvas'],\n ['HTMLDataElement', 'data'],\n ['HTMLDataListElement', 'datalist'],\n ['HTMLDetailsElement', 'details'],\n ['HTMLDialogElement', 'dialog'],\n ['HTMLDivElement', 'div'],\n ['HTMLDListElement', 'dl'],\n ['HTMLEmbedElement', 'embed'],\n ['HTMLFieldSetElement', 'fieldset'],\n ['HTMLFormElement', 'form'],\n ['HTMLHRElement', 'hr'],\n ['HTMLIFrameElement', 'iframe'],\n ['HTMLImageElement', 'img'],\n ['HTMLInputElement', 'input'],\n ['HTMLLabelElement', 'label'],\n ['HTMLLegendElement', 'legend'],\n ['HTMLLIElement', 'li'],\n ['HTMLLinkElement', 'link'],\n ['HTMLMapElement', 'map'],\n ['HTMLMetaElement', 'meta'],\n ['HTMLMeterElement', 'meter'],\n ['HTMLModElement', 'del'],\n ['HTMLObjectElement', 'object'],\n ['HTMLOListElement', 'ol'],\n ['HTMLOptGroupElement', 'optgroup'],\n ['HTMLOptionElement', 'option'],\n ['HTMLOutputElement', 'output'],\n ['HTMLParagraphElement', 'p'],\n ['HTMLParamElement', 'param'],\n ['HTMLPictureElement', 'picture'],\n ['HTMLPreElement', 'pre'],\n ['HTMLProgressElement', 'progress'],\n ['HTMLQuoteElement', 'blockquote'],\n ['HTMLScriptElement', 'script'],\n ['HTMLSelectElement', 'select'],\n ['HTMLSlotElement', 'slot'],\n ['HTMLSourceElement', 'source'],\n ['HTMLSpanElement', 'span'],\n ['HTMLStyleElement', 'style'],\n ['HTMLTableElement', 'table'],\n ['HTMLTableSectionElement', 'tbody'],\n ['HTMLTableCellElement', 'td'],\n ['HTMLTemplateElement', 'template'],\n ['HTMLTextAreaElement', 'textarea'],\n ['HTMLTimeElement', 'time'],\n ['HTMLTitleElement', 'title'],\n ['HTMLTableRowElement', 'tr'],\n ['HTMLTrackElement', 'track'],\n ['HTMLUListElement', 'ul'],\n ['HTMLVideoElement', 'video'],\n ['HTMLHeadingElement', 'h1']\n].forEach(([cls, tag]) => registerTag(cls, tag));\n\nexport const element =\n (inConfig: ElementConfig | string): ClassDecorator =>\n (constructor: any) => {\n const config: ElementConfig = typeof inConfig === 'string' ? { tagName: inConfig } : inConfig;\n\n // 1. Automatically derive extendsTagName from prototype chain if not provided\n let extendsTagName = config.extends;\n if (!extendsTagName) {\n let proto = Object.getPrototypeOf(constructor);\n while (proto && proto !== HTMLElement && proto !== Function.prototype) {\n extendsTagName = BUILT_IN_TAG_MAP.get(proto);\n if (extendsTagName) break;\n proto = Object.getPrototypeOf(proto);\n }\n }\n\n // 2. Automatically collect observed attributes from @attributeChanged decorators\n const attributeChangedMap = getAttributeChangedMap(constructor);\n const observedFromDecorators = attributeChangedMap ? Array.from(attributeChangedMap.keys()) : [];\n const mergedObservedAttributes = [...new Set([...(config.observedAttributes ?? []), ...observedFromDecorators])];\n\n // 3. Create a new anonymous class that extends the original constructor\n const NewClass = class extends (constructor as any) {\n static get observedAttributes() {\n return mergedObservedAttributes;\n }\n\n constructor(...args: any[]) {\n super(...args);\n if (config.useShadow === true && !this.shadowRoot) {\n this.attachShadow({ mode: 'open' });\n }\n }\n\n disconnectedCallback() {\n if (super.disconnectedCallback) {\n super.disconnectedCallback();\n }\n }\n\n connectedMoveCallback() {\n if (super.connectedMoveCallback) {\n super.connectedMoveCallback();\n }\n }\n\n adoptedCallback() {\n if (super.adoptedCallback) {\n super.adoptedCallback();\n }\n }\n\n async connectedCallback() {\n if (super.connectedCallback) {\n await super.connectedCallback();\n }\n\n const templateMethod = getTemplateMethod(this);\n const styleMethod = getStyleMethod(this);\n\n const template = templateMethod ? await (this as any)[templateMethod]() : undefined;\n const style = styleMethod ? await (this as any)[styleMethod]() : undefined;\n\n // If not using shadow DOM and no decorators are present, do nothing\n if (!this.shadowRoot && template === undefined && style === undefined) {\n return;\n }\n\n let content = '';\n if (style !== undefined && style.trim().length > 0) {\n content += `<style>${style}</style>`;\n }\n\n if (template !== undefined) {\n content += template;\n } else if (!this.shadowRoot) {\n content += this.innerHTML;\n }\n\n if (this.shadowRoot) {\n this.shadowRoot.innerHTML = content;\n } else {\n this.innerHTML = content;\n }\n }\n\n // 4. Handle attribute changes and route to decorated methods\n attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null) {\n // Call the original callback if it exists\n if (super.attributeChangedCallback) {\n super.attributeChangedCallback(name, oldValue, newValue);\n }\n\n // Call the method associated with @attributeChanged\n const methodKey = attributeChangedMap?.get(name);\n if (methodKey && typeof (this as any)[methodKey] === 'function') {\n (this as any)[methodKey](newValue, oldValue);\n }\n }\n };\n\n // 5. Register Custom Element using specified or default registry\n const registry = config.customElementRegistry || (typeof customElements !== 'undefined' ? customElements : undefined);\n if (registry && !registry.get(config.tagName)) {\n const options = extendsTagName ? { extends: extendsTagName } : undefined;\n registry.define(config.tagName, NewClass as any, options);\n }\n\n // 6. Save metadata\n ReflectUtils.defineMetadata(ELEMENT_CONFIG_KEY, config, NewClass);\n\n return NewClass as any;\n };\n\nexport const getElementConfig = (target: any): ElementConfig | undefined => {\n const constructor = target instanceof Function ? target : target.constructor;\n return ReflectUtils.getMetadata(ELEMENT_CONFIG_KEY, constructor);\n};\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;AAAA;;;;;;;0BAA6B;AAC7B,8BAAuC;AACvC,sBAAkC;AAClC,mBAA+B;AAUxB,MAAM,qBAAqB,OAAO,qCAAqC;AAE9E,MAAM,mBAAmB,oBAAI,IAAG;AAEhC,MAAM,cAAc,CAAC,WAAmB,YAAmB;AACzD,MAAI,OAAO,eAAe,eAAgB,WAAmB,SAAS,GAAG;AACvE,qBAAiB,IAAK,WAAmB,SAAS,GAAG,OAAO;EAC9D;AACF;AAGA;EACE,CAAC,qBAAqB,GAAG;EACzB,CAAC,mBAAmB,MAAM;EAC1B,CAAC,oBAAoB,OAAO;EAC5B,CAAC,mBAAmB,MAAM;EAC1B,CAAC,qBAAqB,QAAQ;EAC9B,CAAC,qBAAqB,QAAQ;EAC9B,CAAC,mBAAmB,MAAM;EAC1B,CAAC,uBAAuB,UAAU;EAClC,CAAC,sBAAsB,SAAS;EAChC,CAAC,qBAAqB,QAAQ;EAC9B,CAAC,kBAAkB,KAAK;EACxB,CAAC,oBAAoB,IAAI;EACzB,CAAC,oBAAoB,OAAO;EAC5B,CAAC,uBAAuB,U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,KAAa,WAAW,EAAC,IAAK;AAGjE,UAAI,CAAC,KAAK,cAAc,aAAa,UAAa,UAAU,QAAW;AACrE;MACF;AAEA,UAAI,UAAU;AACd,UAAI,UAAU,UAAa,MAAM,KAAI,EAAG,SAAS,GAAG;AAClD,mBAAW,UAAU,KAAK;MAC5B;AAEA,UAAI,aAAa,QAAW;AAC1B,mBAAW;MACb,WAAW,CAAC,KAAK,YAAY;AAC3B,mBAAW,KAAK;MAClB;AAEA,UAAI,KAAK,YAAY;AACnB,aAAK,WAAW,YAAY;MAC9B,OAAO;AACL,aAAK,YAAY;MACnB;IACF;;IAGA,yBAAyB,MAAc,UAAyB,UAAuB;AAErF,UAAI,MAAM,0BAA0B;AAClC,cAAM,yBAAyB,MAAM,UAAU,QAAQ;MACzD;AAGA,YAAM,YAAY,qBAAqB,IAAI,IAAI;AAC/C,UAAI,aAAa,OAAQ,KAAa,SAAS,MAAM,YAAY;AAC9D,aAAa,SAAS,EAAE,UAAU,QAAQ;MAC7C;IACF;;AAIF,QAAM,WAAW,OAAO,0BAA0B,OAAO,mBAAmB,cAAc,iBAAiB;AAC3G,MAAI,YAAY,CAAC,SAAS,IAAI,OAAO,OAAO,GAAG;AAC7C,UAAM,UAAU,iBAAiB,EAAE,SAAS,eAAc,IAAK;AAC/D,aAAS,OAAO,OAAO,SAAS,UAAiB,OAAO;EAC1D;AAGA,mCAAa,eAAe,oBAAoB,QAAQ,QAAQ;AAEhE,SAAO;AACT;AAEK,MAAM,mBAAmB,CAAC,WAA0C;AACzE,QAAM,cAAc,kBAAkB,WAAW,SAAS,OAAO;AACjE,SAAO,iCAAa,YAAY,oBAAoB,WAAW;AACjE;",
6
- "names": []
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/decorators/element.ts"],
4
- "sourcesContent": ["import { ReflectUtils } from '@dooboostore/core/reflect/ReflectUtils';\nimport { getAttributeChangedMap } from './attributeChanged';\nimport { getTemplateMethod } from './template';\nimport { getStyleMethod } from './style';\n\nexport interface ElementConfig {\n tagName: string;\n useShadow?: boolean;\n extends?: string;\n observedAttributes?: string[];\n customElementRegistry?: CustomElementRegistry;\n}\n\nexport const ELEMENT_CONFIG_KEY = Symbol('simple-web-component:element-config');\n\nconst BUILT_IN_TAG_MAP = new Map<any, string>();\n\nconst registerTag = (className: string, tagName: string) => {\n if (typeof globalThis !== 'undefined' && (globalThis as any)[className]) {\n BUILT_IN_TAG_MAP.set((globalThis as any)[className], tagName);\n }\n};\n\n// Register comprehensive list of supported tags for automatic extends inference\n[\n ['HTMLAnchorElement', 'a'],\n ['HTMLAreaElement', 'area'],\n ['HTMLAudioElement', 'audio'],\n ['HTMLBaseElement', 'base'],\n ['HTMLButtonElement', 'button'],\n ['HTMLCanvasElement', 'canvas'],\n ['HTMLDataElement', 'data'],\n ['HTMLDataListElement', 'datalist'],\n ['HTMLDetailsElement', 'details'],\n ['HTMLDialogElement', 'dialog'],\n ['HTMLDivElement', 'div'],\n ['HTMLDListElement', 'dl'],\n ['HTMLEmbedElement', 'embed'],\n ['HTMLFieldSetElement', 'fieldset'],\n ['HTMLFormElement', 'form'],\n ['HTMLHRElement', 'hr'],\n ['HTMLIFrameElement', 'iframe'],\n ['HTMLImageElement', 'img'],\n ['HTMLInputElement', 'input'],\n ['HTMLLabelElement', 'label'],\n ['HTMLLegendElement', 'legend'],\n ['HTMLLIElement', 'li'],\n ['HTMLLinkElement', 'link'],\n ['HTMLMapElement', 'map'],\n ['HTMLMetaElement', 'meta'],\n ['HTMLMeterElement', 'meter'],\n ['HTMLModElement', 'del'],\n ['HTMLObjectElement', 'object'],\n ['HTMLOListElement', 'ol'],\n ['HTMLOptGroupElement', 'optgroup'],\n ['HTMLOptionElement', 'option'],\n ['HTMLOutputElement', 'output'],\n ['HTMLParagraphElement', 'p'],\n ['HTMLParamElement', 'param'],\n ['HTMLPictureElement', 'picture'],\n ['HTMLPreElement', 'pre'],\n ['HTMLProgressElement', 'progress'],\n ['HTMLQuoteElement', 'blockquote'],\n ['HTMLScriptElement', 'script'],\n ['HTMLSelectElement', 'select'],\n ['HTMLSlotElement', 'slot'],\n ['HTMLSourceElement', 'source'],\n ['HTMLSpanElement', 'span'],\n ['HTMLStyleElement', 'style'],\n ['HTMLTableElement', 'table'],\n ['HTMLTableSectionElement', 'tbody'],\n ['HTMLTableCellElement', 'td'],\n ['HTMLTemplateElement', 'template'],\n ['HTMLTextAreaElement', 'textarea'],\n ['HTMLTimeElement', 'time'],\n ['HTMLTitleElement', 'title'],\n ['HTMLTableRowElement', 'tr'],\n ['HTMLTrackElement', 'track'],\n ['HTMLUListElement', 'ul'],\n ['HTMLVideoElement', 'video'],\n ['HTMLHeadingElement', 'h1']\n].forEach(([cls, tag]) => registerTag(cls, tag));\n\nexport const element =\n (inConfig: ElementConfig | string): ClassDecorator =>\n (constructor: any) => {\n const config: ElementConfig = typeof inConfig === 'string' ? { tagName: inConfig } : inConfig;\n\n // 1. Automatically derive extendsTagName from prototype chain if not provided\n let extendsTagName = config.extends;\n if (!extendsTagName) {\n let proto = Object.getPrototypeOf(constructor);\n while (proto && proto !== HTMLElement && proto !== Function.prototype) {\n extendsTagName = BUILT_IN_TAG_MAP.get(proto);\n if (extendsTagName) break;\n proto = Object.getPrototypeOf(proto);\n }\n }\n\n // 2. Automatically collect observed attributes from @attributeChanged decorators\n const attributeChangedMap = getAttributeChangedMap(constructor);\n const observedFromDecorators = attributeChangedMap ? Array.from(attributeChangedMap.keys()) : [];\n const mergedObservedAttributes = [...new Set([...(config.observedAttributes ?? []), ...observedFromDecorators])];\n\n // 3. Create a new anonymous class that extends the original constructor\n const NewClass = class extends (constructor as any) {\n static get observedAttributes() {\n return mergedObservedAttributes;\n }\n\n constructor(...args: any[]) {\n super(...args);\n if (config.useShadow === true && !this.shadowRoot) {\n this.attachShadow({ mode: 'open' });\n }\n }\n\n disconnectedCallback() {\n if (super.disconnectedCallback) {\n super.disconnectedCallback();\n }\n }\n\n connectedMoveCallback() {\n if (super.connectedMoveCallback) {\n super.connectedMoveCallback();\n }\n }\n\n adoptedCallback() {\n if (super.adoptedCallback) {\n super.adoptedCallback();\n }\n }\n\n async connectedCallback() {\n if (super.connectedCallback) {\n await super.connectedCallback();\n }\n\n const templateMethod = getTemplateMethod(this);\n const styleMethod = getStyleMethod(this);\n\n const template = templateMethod ? await (this as any)[templateMethod]() : undefined;\n const style = styleMethod ? await (this as any)[styleMethod]() : undefined;\n\n // If not using shadow DOM and no decorators are present, do nothing\n if (!this.shadowRoot && template === undefined && style === undefined) {\n return;\n }\n\n let content = '';\n if (style !== undefined && style.trim().length > 0) {\n content += `<style>${style}</style>`;\n }\n\n if (template !== undefined) {\n content += template;\n } else if (!this.shadowRoot) {\n content += this.innerHTML;\n }\n\n if (this.shadowRoot) {\n this.shadowRoot.innerHTML = content;\n } else {\n this.innerHTML = content;\n }\n }\n\n // 4. Handle attribute changes and route to decorated methods\n attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null) {\n // Call the original callback if it exists\n if (super.attributeChangedCallback) {\n super.attributeChangedCallback(name, oldValue, newValue);\n }\n\n // Call the method associated with @attributeChanged\n const methodKey = attributeChangedMap?.get(name);\n if (methodKey && typeof (this as any)[methodKey] === 'function') {\n (this as any)[methodKey](newValue, oldValue);\n }\n }\n };\n\n // 5. Register Custom Element using specified or default registry\n const registry = config.customElementRegistry || (typeof customElements !== 'undefined' ? customElements : undefined);\n if (registry && !registry.get(config.tagName)) {\n const options = extendsTagName ? { extends: extendsTagName } : undefined;\n registry.define(config.tagName, NewClass as any, options);\n }\n\n // 6. Save metadata\n ReflectUtils.defineMetadata(ELEMENT_CONFIG_KEY, config, NewClass);\n\n return NewClass as any;\n };\n\nexport const getElementConfig = (target: any): ElementConfig | undefined => {\n const constructor = target instanceof Function ? target : target.constructor;\n return ReflectUtils.getMetadata(ELEMENT_CONFIG_KEY, constructor);\n};\n"],
5
- "mappings": "AAAA,SAAS,oBAAoB;AAC7B,SAAS,8BAA8B;AACvC,SAAS,yBAA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