@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
package/README.md CHANGED
@@ -1,14 +1,14 @@
1
1
  # @dooboostore/simple-web-component
2
2
 
3
- `@dooboostore/simple-web-component` is a lightweight, decorator-driven library for building Web Components. It allows you to define standard Custom Elements using classes and decorators without complex configurations, providing powerful features like Shadow DOM management, attribute observation, and seamless template/style injection.
3
+ `@dooboostore/simple-web-component` is a lightweight, decorator-driven library for building high-performance Web Components. It leverages native browser features like **Shadow DOM**, **Slots**, and **MutationObserver** to provide a declarative development experience without the overhead of a Virtual DOM.
4
4
 
5
5
  ## Key Features
6
6
 
7
- - **Decorator-based**: Declarative development using `@element`, `@template`, `@style`, and `@attributeChanged`.
8
- - **Standards Compliant**: Built on top of native browser Web Components (Custom Elements) technology.
9
- - **Automatic Registration**: The `@element` decorator automatically registers your component with the browser using the provided `tagName`.
10
- - **Built-in Element Extension**: Easily inherit and extend standard HTML tags like `ul`, `button`, or `a` using the `extends` option.
11
- - **Automatic Attribute Observation**: Use the `@attributeChanged` decorator to automatically register attributes for observation and handle changes via callbacks.
7
+ - **Decorator-driven**: Use `@elementDefind`, `@template`, `@style`, `@query`, and more to define components.
8
+ - **Surgical Updates**: High-performance rendering using the "Slot-per-Row" pattern.
9
+ - **Auto-Sync**: Decorators automatically re-bind when the DOM changes (via MutationObserver).
10
+ - **Native-First**: No Virtual DOM, just pure Custom Elements.
11
+ - **Built-in Logic Components**: Includes `swc-for-of`, `swc-if`, and `swc-choose`.
12
12
 
13
13
  ## Installation
14
14
 
@@ -16,87 +16,84 @@
16
16
  pnpm add @dooboostore/simple-web-component
17
17
  ```
18
18
 
19
- ## Usage
19
+ ## API Reference
20
+
21
+ ### Core Decorators
22
+
23
+ | Decorator | Target | Description |
24
+ | :--- | :--- | :--- |
25
+ | `@elementDefind(config)` | Class | Registers the component. Supports `tagName`, `useShadow`, `extends`. |
26
+ | `@template` | Method | Defines the HTML template. |
27
+ | `@style` | Method | Defines the CSS styles. |
28
+ | `@attributeChanged(names)`| Method | Handles attribute changes. Supports single string, array, or wildcard (`*`). |
29
+ | `@query(selector, options)`| Prop/Method | Queries a single element. Supports `{ useShadow: boolean }`. |
30
+ | `@queryAll(selector, options)`| Prop/Method | Queries multiple elements. |
31
+ | `@addEventListener(opts)`| Method | Declaratively binds events. Automatically re-binds on DOM changes. |
32
+
33
+ ### Built-in Components
34
+
35
+ #### `swc-for-of` (Looping)
36
+ A high-performance list renderer that uses slots to update only changed items.
37
+ ```html
38
+ <ul>
39
+ <swc-for-of id="my-list">
40
+ <li>{{index}}: {{value.name}}</li>
41
+ </swc-for-of>
42
+ </ul>
43
+ <script>
44
+ const el = document.getElementById('my-list');
45
+ el.value = [{name: 'Kim'}, {name: 'Lee'}];
46
+ el.value.push({name: 'Park'}); // Automatically updates UI
47
+ </script>
48
+ ```
49
+
50
+ #### `swc-if` (Conditional)
51
+ Conditionally renders content based on a truthy value or expression.
52
+ ```html
53
+ <swc-if value="{{value.age >= 19}}">
54
+ <div>Adult Content</div>
55
+ </swc-if>
56
+ ```
20
57
 
21
- ### 1. Basic Autonomous Custom Element
58
+ #### `swc-choose` (Branching)
59
+ Provides a switch-case style branching logic.
60
+ ```html
61
+ <swc-choose value="{{value.status}}">
62
+ <swc-when test="active">Online</swc-when>
63
+ <swc-when test="pending">Away</swc-when>
64
+ <swc-other>Offline</swc-other>
65
+ </swc-choose>
66
+ ```
22
67
 
23
- This is the most common way to create an encapsulated component using Shadow DOM.
68
+ ## Example Usage
24
69
 
25
70
  ```typescript
26
- import { element, template, style, attributeChanged } from '@dooboostore/simple-web-component';
71
+ import { elementDefind, template, style, query, addEventListener } from '@dooboostore/simple-web-component';
27
72
 
28
- @element({
29
- tagName: 'my-profile',
30
- useShadow: true, // Defaults to false (Light DOM)
31
- observedAttributes: ['status'] // Manual registration is also possible
73
+ @elementDefind({
74
+ tagName: 'my-component',
75
+ useShadow: true
32
76
  })
33
- class MyProfile extends HTMLElement {
34
-
77
+ class MyComponent extends HTMLElement {
78
+ @query('.title') titleEl: HTMLElement;
79
+
35
80
  @style
36
- styles() {
37
- return `
38
- .card { border: 1px solid #ccc; padding: 10px; }
39
- .name { font-weight: bold; color: blue; }
40
- `;
81
+ css() {
82
+ return `:host { display: block; } .title { color: blue; }`;
41
83
  }
42
84
 
43
85
  @template
44
86
  render() {
45
- return `
46
- <div class="card">
47
- <div class="name">Hello, Visitor!</div>
48
- <div id="status">Status: Pending</div>
49
- </div>
50
- `;
87
+ return `<h1 class="title">Hello World</h1><button id="btn">Click</button>`;
51
88
  }
52
89
 
53
- // Called automatically when the 'status' attribute changes
54
- @attributeChanged('status')
55
- onStatusChange(newVal: string, oldVal: string) {
56
- console.log(`Status changed: ${oldVal} -> ${newVal}`);
57
- this.shadowRoot.getElementById('status').innerText = `Status: ${newVal}`;
90
+ @addEventListener({ selector: '#btn', eventName: 'click' })
91
+ onClick(e: Event) {
92
+ this.titleEl.textContent = 'Button Clicked!';
58
93
  }
59
94
  }
60
95
  ```
61
96
 
62
- ### 2. Extending Built-in Elements (Customized Built-in Element)
63
-
64
- Inherit properties and behaviors from existing HTML tags while adding your custom logic.
65
-
66
- ```typescript
67
- import { element, template } from '@dooboostore/simple-web-component';
68
-
69
- @element({
70
- tagName: 'special-list',
71
- extends: 'ul' // Specifies that this component extends the <ul> tag
72
- })
73
- class SpecialList extends HTMLUListElement {
74
- @template
75
- render() {
76
- return `<li>Initial item of the extended list</li>`;
77
- }
78
- }
79
- ```
80
-
81
- ## API Reference
82
-
83
- ### Decorators
84
-
85
- | Decorator | Target | Description |
86
- | :--- | :--- | :--- |
87
- | `@element(config)` | Class | Configures the tag name, inheritance, Shadow DOM usage, and registers it to the browser. |
88
- | `@template` | Method | Identifies the method that returns the component's HTML structure. |
89
- | `@style` | Method | Identifies the method that returns the component's CSS styles. |
90
- | `@attributeChanged(name)`| Method | Defines an attribute to monitor and the handler to execute when it changes. |
91
-
92
- ### ElementConfig Options
93
-
94
- - `tagName`: (Required) The name for the custom element (e.g., `my-button`).
95
- - `useShadow`: (Optional) Whether to use Shadow DOM (default: `false`).
96
- - `extends`: (Optional) The name of the built-in tag to extend (e.g., `ul`, `button`, `a`).
97
- - `observedAttributes`: (Optional) An array of attributes to monitor manually. (Automatically populated if `@attributeChanged` is used).
98
- - `customElementRegistry`: (Optional) A specific registry to use for registration (defaults to global `customElements`).
99
-
100
97
  ## License
101
98
 
102
99
  MIT
@@ -0,0 +1,42 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var addEventListener_exports = {};
19
+ __export(addEventListener_exports, {
20
+ ADD_EVENT_LISTENER_METADATA_KEY: () => ADD_EVENT_LISTENER_METADATA_KEY,
21
+ addEventListener: () => addEventListener,
22
+ getAddEventListenerMetadata: () => getAddEventListenerMetadata
23
+ });
24
+ module.exports = __toCommonJS(addEventListener_exports);
25
+ var import_ReflectUtils = require("@dooboostore/core/reflect/ReflectUtils");
26
+ const ADD_EVENT_LISTENER_METADATA_KEY = Symbol("simple-web-component:add-event-listener");
27
+ const addEventListener = (options) => {
28
+ return (target, propertyKey, descriptor) => {
29
+ const constructor = target.constructor;
30
+ let listeners = import_ReflectUtils.ReflectUtils.getMetadata(ADD_EVENT_LISTENER_METADATA_KEY, constructor);
31
+ if (!listeners) {
32
+ listeners = [];
33
+ import_ReflectUtils.ReflectUtils.defineMetadata(ADD_EVENT_LISTENER_METADATA_KEY, listeners, constructor);
34
+ }
35
+ listeners.push({ options, propertyKey });
36
+ };
37
+ };
38
+ const getAddEventListenerMetadata = (target) => {
39
+ const constructor = target instanceof Function ? target : target.constructor;
40
+ return import_ReflectUtils.ReflectUtils.getMetadata(ADD_EVENT_LISTENER_METADATA_KEY, constructor);
41
+ };
42
+ //# sourceMappingURL=addEventListener.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/decorators/addEventListener.ts"],
4
+ "sourcesContent": ["import { ReflectUtils } from '@dooboostore/core/reflect/ReflectUtils';\n\nexport interface AddEventListenerOptions extends EventListenerOptions {\n selector?: string;\n eventName: string;\n useShadow?: boolean;\n capture?: boolean;\n once?: boolean;\n passive?: boolean;\n}\n\nexport interface AddEventListenerMetadata {\n options: AddEventListenerOptions;\n propertyKey: string | symbol;\n}\n\nexport const ADD_EVENT_LISTENER_METADATA_KEY = Symbol('simple-web-component:add-event-listener');\n\nexport const addEventListener = (options: AddEventListenerOptions): MethodDecorator => {\n return (target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor) => {\n const constructor = target.constructor;\n\n let listeners = ReflectUtils.getMetadata<AddEventListenerMetadata[]>(ADD_EVENT_LISTENER_METADATA_KEY, constructor);\n if (!listeners) {\n listeners = [];\n ReflectUtils.defineMetadata(ADD_EVENT_LISTENER_METADATA_KEY, listeners, constructor);\n }\n listeners.push({ options, propertyKey });\n };\n};\n\nexport const getAddEventListenerMetadata = (target: any): AddEventListenerMetadata[] | undefined => {\n const constructor = target instanceof Function ? target : target.constructor;\n return ReflectUtils.getMetadata(ADD_EVENT_LISTENER_METADATA_KEY, constructor);\n};\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAA6B;AAgBtB,MAAM,kCAAkC,OAAO,yCAAyC;AAExF,MAAM,mBAAmB,CAAC,YAAsD;AACrF,SAAO,CAAC,QAAgB,aAA8B,eAAmC;AACvF,UAAM,cAAc,OAAO;AAE3B,QAAI,YAAY,iCAAa,YAAwC,iCAAiC,WAAW;AACjH,QAAI,CAAC,WAAW;AACd,kBAAY,CAAC;AACb,uCAAa,eAAe,iCAAiC,WAAW,WAAW;AAAA,IACrF;AACA,cAAU,KAAK,EAAE,SAAS,YAAY,CAAC;AAAA,EACzC;AACF;AAEO,MAAM,8BAA8B,CAAC,WAAwD;AAClG,QAAM,cAAc,kBAAkB,WAAW,SAAS,OAAO;AACjE,SAAO,iCAAa,YAAY,iCAAiC,WAAW;AAC9E;",
6
+ "names": []
7
+ }
@@ -18,23 +18,43 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
18
18
  var attributeChanged_exports = {};
19
19
  __export(attributeChanged_exports, {
20
20
  ATTRIBUTE_CHANGED_METADATA_KEY: () => ATTRIBUTE_CHANGED_METADATA_KEY,
21
+ ATTRIBUTE_CHANGED_WILDCARD: () => ATTRIBUTE_CHANGED_WILDCARD,
21
22
  attributeChanged: () => attributeChanged,
22
23
  getAttributeChangedMap: () => getAttributeChangedMap
23
24
  });
24
25
  module.exports = __toCommonJS(attributeChanged_exports);
25
26
  var import_ReflectUtils = require("@dooboostore/core/reflect/ReflectUtils");
26
27
  const ATTRIBUTE_CHANGED_METADATA_KEY = Symbol("simple-web-component:attribute-changed");
27
- const attributeChanged = (attributeName) => {
28
- return (target, propertyKey, descriptor) => {
28
+ const ATTRIBUTE_CHANGED_WILDCARD = "*";
29
+ function attributeChanged(arg1, arg2, arg3) {
30
+ const decorator = (attributeName, target, propertyKey) => {
29
31
  const constructor = target.constructor;
30
32
  let meta = import_ReflectUtils.ReflectUtils.getMetadata(ATTRIBUTE_CHANGED_METADATA_KEY, constructor);
31
33
  if (!meta) {
32
34
  meta = /* @__PURE__ */ new Map();
33
35
  import_ReflectUtils.ReflectUtils.defineMetadata(ATTRIBUTE_CHANGED_METADATA_KEY, meta, constructor);
34
36
  }
35
- meta.set(attributeName, propertyKey);
37
+ let methods = meta.get(attributeName);
38
+ if (!methods) {
39
+ methods = [];
40
+ meta.set(attributeName, methods);
41
+ }
42
+ if (!methods.includes(propertyKey)) {
43
+ methods.push(propertyKey);
44
+ }
36
45
  };
37
- };
46
+ if (typeof arg1 === "string") {
47
+ return (target, propertyKey) => {
48
+ decorator(arg1, target, propertyKey);
49
+ };
50
+ } else if (Array.isArray(arg1)) {
51
+ return (target, propertyKey) => {
52
+ arg1.forEach((name) => decorator(name, target, propertyKey));
53
+ };
54
+ } else if (arg1 && arg2) {
55
+ decorator(ATTRIBUTE_CHANGED_WILDCARD, arg1, arg2);
56
+ }
57
+ }
38
58
  const getAttributeChangedMap = (target) => {
39
59
  const constructor = target instanceof Function ? target : target.constructor;
40
60
  return import_ReflectUtils.ReflectUtils.getMetadata(ATTRIBUTE_CHANGED_METADATA_KEY, constructor);
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/decorators/attributeChanged.ts"],
4
- "sourcesContent": ["import { ReflectUtils } from '@dooboostore/core/reflect/ReflectUtils';\n\nexport const ATTRIBUTE_CHANGED_METADATA_KEY = Symbol('simple-web-component:attribute-changed');\n\nexport const attributeChanged = (attributeName: string): MethodDecorator => {\n return (target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor) => {\n const constructor = target.constructor;\n let meta = ReflectUtils.getMetadata<Map<string, string | symbol>>(ATTRIBUTE_CHANGED_METADATA_KEY, constructor);\n if (!meta) {\n meta = new Map<string, string | symbol>();\n ReflectUtils.defineMetadata(ATTRIBUTE_CHANGED_METADATA_KEY, meta, constructor);\n }\n meta.set(attributeName, propertyKey);\n };\n};\n\nexport const getAttributeChangedMap = (target: any): Map<string, string | symbol> | undefined => {\n const constructor = target instanceof Function ? target : target.constructor;\n return ReflectUtils.getMetadata(ATTRIBUTE_CHANGED_METADATA_KEY, constructor);\n};\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAA6B;AAEtB,MAAM,iCAAiC,OAAO,wCAAwC;AAEtF,MAAM,mBAAmB,CAAC,kBAA2C;AAC1E,SAAO,CAAC,QAAgB,aAA8B,eAAmC;AACvF,UAAM,cAAc,OAAO;AAC3B,QAAI,OAAO,iCAAa,YAA0C,gCAAgC,WAAW;AAC7G,QAAI,CAAC,MAAM;AACT,aAAO,oBAAI,IAA6B;AACxC,uCAAa,eAAe,gCAAgC,MAAM,WAAW;AAAA,IAC/E;AACA,SAAK,IAAI,eAAe,WAAW;AAAA,EACrC;AACF;AAEO,MAAM,yBAAyB,CAAC,WAA0D;AAC/F,QAAM,cAAc,kBAAkB,WAAW,SAAS,OAAO;AACjE,SAAO,iCAAa,YAAY,gCAAgC,WAAW;AAC7E;",
4
+ "sourcesContent": ["import { ReflectUtils } from '@dooboostore/core/reflect/ReflectUtils';\n\nexport const ATTRIBUTE_CHANGED_METADATA_KEY = Symbol('simple-web-component:attribute-changed');\nexport const ATTRIBUTE_CHANGED_WILDCARD = '*';\n\nexport function attributeChanged(attributeName: string | string[]): MethodDecorator;\nexport function attributeChanged(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): void;\nexport function attributeChanged(arg1: string | string[] | Object, arg2?: string | symbol, arg3?: PropertyDescriptor): MethodDecorator | void {\n const decorator = (attributeName: string, target: Object, propertyKey: string | symbol) => {\n const constructor = target.constructor;\n let meta = ReflectUtils.getMetadata<Map<string, (string | symbol)[]>>(ATTRIBUTE_CHANGED_METADATA_KEY, constructor);\n if (!meta) {\n meta = new Map<string, (string | symbol)[]>();\n ReflectUtils.defineMetadata(ATTRIBUTE_CHANGED_METADATA_KEY, meta, constructor);\n }\n\n let methods = meta.get(attributeName);\n if (!methods) {\n methods = [];\n meta.set(attributeName, methods);\n }\n if (!methods.includes(propertyKey)) {\n methods.push(propertyKey);\n }\n };\n\n if (typeof arg1 === 'string') {\n return (target: Object, propertyKey: string | symbol) => {\n decorator(arg1, target, propertyKey);\n };\n } else if (Array.isArray(arg1)) {\n return (target: Object, propertyKey: string | symbol) => {\n arg1.forEach(name => decorator(name, target, propertyKey));\n };\n } else if (arg1 && arg2) {\n decorator(ATTRIBUTE_CHANGED_WILDCARD, arg1, arg2);\n }\n}\n\nexport const getAttributeChangedMap = (target: any): Map<string, string | symbol> | undefined => {\n const constructor = target instanceof Function ? target : target.constructor;\n return ReflectUtils.getMetadata(ATTRIBUTE_CHANGED_METADATA_KEY, constructor);\n};\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAA6B;AAEtB,MAAM,iCAAiC,OAAO,wCAAwC;AACtF,MAAM,6BAA6B;AAInC,SAAS,iBAAiB,MAAkC,MAAwB,MAAmD;AAC5I,QAAM,YAAY,CAAC,eAAuB,QAAgB,gBAAiC;AACzF,UAAM,cAAc,OAAO;AAC3B,QAAI,OAAO,iCAAa,YAA8C,gCAAgC,WAAW;AACjH,QAAI,CAAC,MAAM;AACT,aAAO,oBAAI,IAAiC;AAC5C,uCAAa,eAAe,gCAAgC,MAAM,WAAW;AAAA,IAC/E;AAEA,QAAI,UAAU,KAAK,IAAI,aAAa;AACpC,QAAI,CAAC,SAAS;AACZ,gBAAU,CAAC;AACX,WAAK,IAAI,eAAe,OAAO;AAAA,IACjC;AACA,QAAI,CAAC,QAAQ,SAAS,WAAW,GAAG;AAClC,cAAQ,KAAK,WAAW;AAAA,IAC1B;AAAA,EACF;AAEA,MAAI,OAAO,SAAS,UAAU;AAC5B,WAAO,CAAC,QAAgB,gBAAiC;AACvD,gBAAU,MAAM,QAAQ,WAAW;AAAA,IACrC;AAAA,EACF,WAAW,MAAM,QAAQ,IAAI,GAAG;AAC9B,WAAO,CAAC,QAAgB,gBAAiC;AACvD,WAAK,QAAQ,UAAQ,UAAU,MAAM,QAAQ,WAAW,CAAC;AAAA,IAC3D;AAAA,EACF,WAAW,QAAQ,MAAM;AACvB,cAAU,4BAA4B,MAAM,IAAI;AAAA,EAClD;AACF;AAEO,MAAM,yBAAyB,CAAC,WAA0D;AAC/F,QAAM,cAAc,kBAAkB,WAAW,SAAS,OAAO;AACjE,SAAO,iCAAa,YAAY,gCAAgC,WAAW;AAC7E;",
6
6
  "names": []
7
7
  }
@@ -15,17 +15,20 @@ var __copyProps = (to, from, except, desc) => {
15
15
  return to;
16
16
  };
17
17
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
- var element_exports = {};
19
- __export(element_exports, {
18
+ var elementDefind_exports = {};
19
+ __export(elementDefind_exports, {
20
20
  ELEMENT_CONFIG_KEY: () => ELEMENT_CONFIG_KEY,
21
- element: () => element,
21
+ elementDefind: () => elementDefind,
22
22
  getElementConfig: () => getElementConfig
23
23
  });
24
- module.exports = __toCommonJS(element_exports);
24
+ module.exports = __toCommonJS(elementDefind_exports);
25
25
  var import_ReflectUtils = require("@dooboostore/core/reflect/ReflectUtils");
26
26
  var import_attributeChanged = require("./attributeChanged");
27
27
  var import_template = require("./template");
28
28
  var import_style = require("./style");
29
+ var import_query = require("./query");
30
+ var import_queryAll = require("./queryAll");
31
+ var import_addEventListener = require("./addEventListener");
29
32
  const ELEMENT_CONFIG_KEY = Symbol("simple-web-component:element-config");
30
33
  const BUILT_IN_TAG_MAP = /* @__PURE__ */ new Map();
31
34
  const registerTag = (className, tagName) => {
@@ -91,7 +94,7 @@ const registerTag = (className, tagName) => {
91
94
  ["HTMLVideoElement", "video"],
92
95
  ["HTMLHeadingElement", "h1"]
93
96
  ].forEach(([cls, tag]) => registerTag(cls, tag));
94
- const element = (inConfig) => (constructor) => {
97
+ const elementDefind = (inConfig) => (constructor) => {
95
98
  const config = typeof inConfig === "string" ? { tagName: inConfig } : inConfig;
96
99
  let extendsTagName = config.extends;
97
100
  if (!extendsTagName) {
@@ -104,7 +107,7 @@ const element = (inConfig) => (constructor) => {
104
107
  }
105
108
  }
106
109
  const attributeChangedMap = (0, import_attributeChanged.getAttributeChangedMap)(constructor);
107
- const observedFromDecorators = attributeChangedMap ? Array.from(attributeChangedMap.keys()) : [];
110
+ const observedFromDecorators = attributeChangedMap ? Array.from(attributeChangedMap.keys()).filter((it) => it !== import_attributeChanged.ATTRIBUTE_CHANGED_WILDCARD) : [];
108
111
  const mergedObservedAttributes = [.../* @__PURE__ */ new Set([...config.observedAttributes ?? [], ...observedFromDecorators])];
109
112
  const NewClass = class extends constructor {
110
113
  static get observedAttributes() {
@@ -112,11 +115,68 @@ const element = (inConfig) => (constructor) => {
112
115
  }
113
116
  constructor(...args) {
114
117
  super(...args);
118
+ this._observer = null;
119
+ this._boundElements = /* @__PURE__ */ new WeakMap();
115
120
  if (config.useShadow === true && !this.shadowRoot) {
116
121
  this.attachShadow({ mode: "open" });
117
122
  }
118
123
  }
124
+ _syncDecorators() {
125
+ const queryMetadata = (0, import_query.getQueryMetadata)(this);
126
+ if (queryMetadata) {
127
+ queryMetadata.filter((it) => it.isMethod).forEach((it) => {
128
+ const root = it.options.useShadow !== false && this.shadowRoot ? this.shadowRoot : this;
129
+ const element = root.querySelector(it.selector);
130
+ if (element) {
131
+ let bound = this._boundElements.get(element);
132
+ if (!bound) {
133
+ bound = /* @__PURE__ */ new Set();
134
+ this._boundElements.set(element, bound);
135
+ }
136
+ if (!bound.has(it.propertyKey)) {
137
+ this[it.propertyKey](element);
138
+ bound.add(it.propertyKey);
139
+ }
140
+ }
141
+ });
142
+ }
143
+ const queryAllMetadata = (0, import_queryAll.getQueryAllMetadata)(this);
144
+ if (queryAllMetadata) {
145
+ queryAllMetadata.filter((it) => it.isMethod).forEach((it) => {
146
+ const root = it.options.useShadow !== false && this.shadowRoot ? this.shadowRoot : this;
147
+ const elements = root.querySelectorAll(it.selector);
148
+ this[it.propertyKey](elements);
149
+ });
150
+ }
151
+ const eventListeners = (0, import_addEventListener.getAddEventListenerMetadata)(this);
152
+ if (eventListeners) {
153
+ eventListeners.forEach((it) => {
154
+ const { selector, eventName, useShadow, ...options } = it.options;
155
+ const root = useShadow !== false && this.shadowRoot ? this.shadowRoot : this;
156
+ const targetElements = selector ? root.querySelectorAll(selector) : [this];
157
+ targetElements.forEach((targetElement) => {
158
+ if (targetElement) {
159
+ let bound = this._boundElements.get(targetElement);
160
+ if (!bound) {
161
+ bound = /* @__PURE__ */ new Set();
162
+ this._boundElements.set(targetElement, bound);
163
+ }
164
+ const eventKey = `event:${String(it.propertyKey)}:${eventName}`;
165
+ if (!bound.has(eventKey)) {
166
+ targetElement.addEventListener(eventName, (event) => {
167
+ this[it.propertyKey](event);
168
+ }, options);
169
+ bound.add(eventKey);
170
+ }
171
+ }
172
+ });
173
+ });
174
+ }
175
+ }
119
176
  disconnectedCallback() {
177
+ if (this._observer) {
178
+ this._observer.disconnect();
179
+ }
120
180
  if (super.disconnectedCallback) {
121
181
  super.disconnectedCallback();
122
182
  }
@@ -132,9 +192,6 @@ const element = (inConfig) => (constructor) => {
132
192
  }
133
193
  }
134
194
  async connectedCallback() {
135
- if (super.connectedCallback) {
136
- await super.connectedCallback();
137
- }
138
195
  const templateMethod = (0, import_template.getTemplateMethod)(this);
139
196
  const styleMethod = (0, import_style.getStyleMethod)(this);
140
197
  const template = templateMethod ? await this[templateMethod]() : void 0;
@@ -156,15 +213,36 @@ const element = (inConfig) => (constructor) => {
156
213
  } else {
157
214
  this.innerHTML = content;
158
215
  }
216
+ this._syncDecorators();
217
+ this._observer = new MutationObserver(() => {
218
+ this._syncDecorators();
219
+ });
220
+ const target = this.shadowRoot || this;
221
+ this._observer.observe(target, { childList: true, subtree: true });
222
+ if (super.connectedCallback) {
223
+ await super.connectedCallback();
224
+ }
159
225
  }
160
226
  // 4. Handle attribute changes and route to decorated methods
161
227
  attributeChangedCallback(name, oldValue, newValue) {
162
228
  if (super.attributeChangedCallback) {
163
229
  super.attributeChangedCallback(name, oldValue, newValue);
164
230
  }
165
- const methodKey = attributeChangedMap?.get(name);
166
- if (methodKey && typeof this[methodKey] === "function") {
167
- this[methodKey](newValue, oldValue);
231
+ const methodKeys = attributeChangedMap?.get(name);
232
+ if (methodKeys && Array.isArray(methodKeys)) {
233
+ methodKeys.forEach((key) => {
234
+ if (typeof this[key] === "function") {
235
+ this[key](newValue, oldValue, name);
236
+ }
237
+ });
238
+ }
239
+ const wildcardMethodKeys = attributeChangedMap?.get(import_attributeChanged.ATTRIBUTE_CHANGED_WILDCARD);
240
+ if (wildcardMethodKeys && Array.isArray(wildcardMethodKeys)) {
241
+ wildcardMethodKeys.forEach((key) => {
242
+ if (typeof this[key] === "function") {
243
+ this[key](newValue, oldValue, name);
244
+ }
245
+ });
168
246
  }
169
247
  }
170
248
  };
@@ -180,4 +258,4 @@ const getElementConfig = (target) => {
180
258
  const constructor = target instanceof Function ? target : target.constructor;
181
259
  return import_ReflectUtils.ReflectUtils.getMetadata(ELEMENT_CONFIG_KEY, constructor);
182
260
  };
183
- //# sourceMappingURL=element.js.map
261
+ //# sourceMappingURL=elementDefind.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/decorators/elementDefind.ts"],
4
+ "sourcesContent": ["import { ReflectUtils } from '@dooboostore/core/reflect/ReflectUtils';\nimport { getAttributeChangedMap, ATTRIBUTE_CHANGED_WILDCARD } from './attributeChanged';\nimport { getTemplateMethod } from './template';\nimport { getStyleMethod } from './style';\nimport { getQueryMetadata } from './query';\nimport { getQueryAllMetadata } from './queryAll';\nimport { getAddEventListenerMetadata } from './addEventListener';\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 elementDefind =\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()).filter(it => it !== ATTRIBUTE_CHANGED_WILDCARD) : [];\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 private _observer: MutationObserver | null = null;\n private _boundElements = new WeakMap<Element, Set<string | symbol>>();\n\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 private _syncDecorators() {\n // 5. Execute @query and @queryAll methods\n const queryMetadata = getQueryMetadata(this);\n if (queryMetadata) {\n queryMetadata\n .filter(it => it.isMethod)\n .forEach(it => {\n const root = it.options.useShadow !== false && this.shadowRoot ? this.shadowRoot : this;\n const element = root.querySelector(it.selector);\n\n // 중복 호출 방지: 해당 selector로 찾은 요소가 이전과 다를 때만 호출하거나,\n // 또는 매번 호출할지 결정해야 함. 여기서는 새로운 요소가 발견되면 호출하는 방식으로 처리.\n if (element) {\n let bound = this._boundElements.get(element);\n if (!bound) {\n bound = new Set();\n this._boundElements.set(element, bound);\n }\n if (!bound.has(it.propertyKey)) {\n (this as any)[it.propertyKey](element);\n bound.add(it.propertyKey);\n }\n }\n });\n }\n\n const queryAllMetadata = getQueryAllMetadata(this);\n if (queryAllMetadata) {\n queryAllMetadata\n .filter(it => it.isMethod)\n .forEach(it => {\n const root = it.options.useShadow !== false && this.shadowRoot ? this.shadowRoot : this;\n const elements = root.querySelectorAll(it.selector);\n\n // queryAll은 목록이 바뀔 수 있으므로 일단 호출하되,\n // 내부 로직은 사용자에게 맡기거나 좀 더 정교한 비교가 필요할 수 있음.\n // 여기서는 단순하게 호출만 다시 함. (사용자가 요청한 '다시 호출' 반영)\n (this as any)[it.propertyKey](elements);\n });\n }\n\n // 6. Register @addEventListener methods\n const eventListeners = getAddEventListenerMetadata(this);\n if (eventListeners) {\n eventListeners.forEach(it => {\n const { selector, eventName, useShadow, ...options } = it.options;\n const root = useShadow !== false && this.shadowRoot ? this.shadowRoot : this;\n const targetElements = selector ? root.querySelectorAll(selector) : [this as any as Element];\n\n targetElements.forEach(targetElement => {\n if (targetElement) {\n let bound = this._boundElements.get(targetElement);\n if (!bound) {\n bound = new Set();\n this._boundElements.set(targetElement, bound);\n }\n\n // 중복 바인딩 방지: (요소, 이벤트, 메서드) 조합 확인\n const eventKey = `event:${String(it.propertyKey)}:${eventName}`;\n if (!bound.has(eventKey)) {\n targetElement.addEventListener(\n eventName,\n event => {\n (this as any)[it.propertyKey](event);\n },\n options\n );\n bound.add(eventKey);\n }\n }\n });\n });\n }\n }\n\n disconnectedCallback() {\n if (this._observer) {\n this._observer.disconnect();\n }\n if (super.disconnectedCallback) {\n super.disconnectedCallback();\n }\n }\n\n connectedMoveCallback() {\n //default logic...\n if (super.connectedMoveCallback) {\n super.connectedMoveCallback();\n }\n }\n\n adoptedCallback() {\n //default logic...\n if (super.adoptedCallback) {\n super.adoptedCallback();\n }\n }\n\n async connectedCallback() {\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 (this as any)._syncDecorators();\n\n // 7. Watch for DOM changes (MutationObserver)\n this._observer = new MutationObserver(() => {\n (this as any)._syncDecorators();\n });\n const target = this.shadowRoot || this;\n this._observer.observe(target, { childList: true, subtree: true });\n\n if (super.connectedCallback) {\n await super.connectedCallback();\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 all methods associated with @attributeChanged\n const methodKeys = attributeChangedMap?.get(name);\n if (methodKeys && Array.isArray(methodKeys)) {\n methodKeys.forEach(key => {\n if (typeof (this as any)[key] === 'function') {\n (this as any)[key](newValue, oldValue, name);\n }\n });\n }\n\n // Call the wildcard methods if they exist\n const wildcardMethodKeys = attributeChangedMap?.get(ATTRIBUTE_CHANGED_WILDCARD);\n if (wildcardMethodKeys && Array.isArray(wildcardMethodKeys)) {\n wildcardMethodKeys.forEach(key => {\n if (typeof (this as any)[key] === 'function') {\n (this as any)[key](newValue, oldValue, name);\n }\n });\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,8BAAmE;AACnE,sBAAkC;AAClC,mBAA+B;AAC/B,mBAAiC;AACjC,sBAAoC;AACpC,8BAA4C;AAUrC,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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+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var query_exports = {};
19
+ __export(query_exports, {
20
+ QUERY_METADATA_KEY: () => QUERY_METADATA_KEY,
21
+ getQueryMetadata: () => getQueryMetadata,
22
+ query: () => query
23
+ });
24
+ module.exports = __toCommonJS(query_exports);
25
+ var import_ReflectUtils = require("@dooboostore/core/reflect/ReflectUtils");
26
+ const QUERY_METADATA_KEY = Symbol("simple-web-component:query");
27
+ const query = (selector, options = { useShadow: true }) => {
28
+ return (target, propertyKey, descriptor) => {
29
+ const isMethod = !!descriptor;
30
+ const constructor = target.constructor;
31
+ let queries = import_ReflectUtils.ReflectUtils.getMetadata(QUERY_METADATA_KEY, constructor);
32
+ if (!queries) {
33
+ queries = [];
34
+ import_ReflectUtils.ReflectUtils.defineMetadata(QUERY_METADATA_KEY, queries, constructor);
35
+ }
36
+ queries.push({ selector, options, propertyKey, isMethod });
37
+ if (!isMethod) {
38
+ Object.defineProperty(target, propertyKey, {
39
+ get() {
40
+ const root = options.useShadow !== false && this.shadowRoot ? this.shadowRoot : this;
41
+ return root.querySelector(selector);
42
+ },
43
+ enumerable: true,
44
+ configurable: true
45
+ });
46
+ }
47
+ };
48
+ };
49
+ const getQueryMetadata = (target) => {
50
+ const constructor = target instanceof Function ? target : target.constructor;
51
+ return import_ReflectUtils.ReflectUtils.getMetadata(QUERY_METADATA_KEY, constructor);
52
+ };
53
+ //# sourceMappingURL=query.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/decorators/query.ts"],
4
+ "sourcesContent": ["import { ReflectUtils } from '@dooboostore/core/reflect/ReflectUtils';\n\nexport interface QueryOptions {\n useShadow?: boolean;\n}\n\nexport interface QueryMetadata {\n selector: string;\n options: QueryOptions;\n propertyKey: string | symbol;\n isMethod: boolean;\n}\n\nexport const QUERY_METADATA_KEY = Symbol('simple-web-component:query');\n\nexport const query = (selector: string, options: QueryOptions = { useShadow: true }): any => {\n return (target: Object, propertyKey: string | symbol, descriptor?: PropertyDescriptor) => {\n const isMethod = !!descriptor;\n const constructor = target.constructor;\n\n // \uBA54\uD0C0\uB370\uC774\uD130 \uC800\uC7A5 (\uB098\uC911\uC5D0 elementDefind\uC5D0\uC11C \uC0AC\uC6A9)\n let queries = ReflectUtils.getMetadata<QueryMetadata[]>(QUERY_METADATA_KEY, constructor);\n if (!queries) {\n queries = [];\n ReflectUtils.defineMetadata(QUERY_METADATA_KEY, queries, constructor);\n }\n queries.push({ selector, options, propertyKey, isMethod });\n\n if (!isMethod) {\n // \uC18D\uC131 \uB370\uCF54\uB808\uC774\uD130\uC778 \uACBD\uC6B0: \uAE30\uC874\uCC98\uB7FC Lazy Getter \uC124\uC815\n Object.defineProperty(target, propertyKey, {\n get(this: HTMLElement) {\n const root = options.useShadow !== false && this.shadowRoot ? this.shadowRoot : this;\n return root.querySelector(selector);\n },\n enumerable: true,\n configurable: true\n });\n }\n };\n};\n\nexport const getQueryMetadata = (target: any): QueryMetadata[] | undefined => {\n const constructor = target instanceof Function ? target : target.constructor;\n return ReflectUtils.getMetadata(QUERY_METADATA_KEY, constructor);\n};\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAA6B;AAatB,MAAM,qBAAqB,OAAO,4BAA4B;AAE9D,MAAM,QAAQ,CAAC,UAAkB,UAAwB,EAAE,WAAW,KAAK,MAAW;AAC3F,SAAO,CAAC,QAAgB,aAA8B,eAAoC;AACxF,UAAM,WAAW,CAAC,CAAC;AACnB,UAAM,cAAc,OAAO;AAG3B,QAAI,UAAU,iCAAa,YAA6B,oBAAoB,WAAW;AACvF,QAAI,CAAC,SAAS;AACZ,gBAAU,CAAC;AACX,uCAAa,eAAe,oBAAoB,SAAS,WAAW;AAAA,IACtE;AACA,YAAQ,KAAK,EAAE,UAAU,SAAS,aAAa,SAAS,CAAC;AAEzD,QAAI,CAAC,UAAU;AAEb,aAAO,eAAe,QAAQ,aAAa;AAAA,QACzC,MAAuB;AACrB,gBAAM,OAAO,QAAQ,cAAc,SAAS,KAAK,aAAa,KAAK,aAAa;AAChF,iBAAO,KAAK,cAAc,QAAQ;AAAA,QACpC;AAAA,QACA,YAAY;AAAA,QACZ,cAAc;AAAA,MAChB,CAAC;AAAA,IACH;AAAA,EACF;AACF;AAEO,MAAM,mBAAmB,CAAC,WAA6C;AAC5E,QAAM,cAAc,kBAAkB,WAAW,SAAS,OAAO;AACjE,SAAO,iCAAa,YAAY,oBAAoB,WAAW;AACjE;",
6
+ "names": []
7
+ }
@@ -0,0 +1,53 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var queryAll_exports = {};
19
+ __export(queryAll_exports, {
20
+ QUERY_ALL_METADATA_KEY: () => QUERY_ALL_METADATA_KEY,
21
+ getQueryAllMetadata: () => getQueryAllMetadata,
22
+ queryAll: () => queryAll
23
+ });
24
+ module.exports = __toCommonJS(queryAll_exports);
25
+ var import_ReflectUtils = require("@dooboostore/core/reflect/ReflectUtils");
26
+ const QUERY_ALL_METADATA_KEY = Symbol("simple-web-component:query-all");
27
+ const queryAll = (selector, options = { useShadow: true }) => {
28
+ return (target, propertyKey, descriptor) => {
29
+ const isMethod = !!descriptor;
30
+ const constructor = target.constructor;
31
+ let queries = import_ReflectUtils.ReflectUtils.getMetadata(QUERY_ALL_METADATA_KEY, constructor);
32
+ if (!queries) {
33
+ queries = [];
34
+ import_ReflectUtils.ReflectUtils.defineMetadata(QUERY_ALL_METADATA_KEY, queries, constructor);
35
+ }
36
+ queries.push({ selector, options, propertyKey, isMethod });
37
+ if (!isMethod) {
38
+ Object.defineProperty(target, propertyKey, {
39
+ get() {
40
+ const root = options.useShadow !== false && this.shadowRoot ? this.shadowRoot : this;
41
+ return root.querySelectorAll(selector);
42
+ },
43
+ enumerable: true,
44
+ configurable: true
45
+ });
46
+ }
47
+ };
48
+ };
49
+ const getQueryAllMetadata = (target) => {
50
+ const constructor = target instanceof Function ? target : target.constructor;
51
+ return import_ReflectUtils.ReflectUtils.getMetadata(QUERY_ALL_METADATA_KEY, constructor);
52
+ };
53
+ //# sourceMappingURL=queryAll.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/decorators/queryAll.ts"],
4
+ "sourcesContent": ["import { ReflectUtils } from '@dooboostore/core/reflect/ReflectUtils';\n\nexport interface QueryAllOptions {\n useShadow?: boolean;\n}\n\nexport interface QueryAllMetadata {\n selector: string;\n options: QueryAllOptions;\n propertyKey: string | symbol;\n isMethod: boolean;\n}\n\nexport const QUERY_ALL_METADATA_KEY = Symbol('simple-web-component:query-all');\n\nexport const queryAll = (selector: string, options: QueryAllOptions = { useShadow: true }): any => {\n return (target: Object, propertyKey: string | symbol, descriptor?: PropertyDescriptor) => {\n const isMethod = !!descriptor;\n const constructor = target.constructor;\n\n // \uBA54\uD0C0\uB370\uC774\uD130 \uC800\uC7A5 (\uB098\uC911\uC5D0 elementDefind\uC5D0\uC11C \uC0AC\uC6A9)\n let queries = ReflectUtils.getMetadata<QueryAllMetadata[]>(QUERY_ALL_METADATA_KEY, constructor);\n if (!queries) {\n queries = [];\n ReflectUtils.defineMetadata(QUERY_ALL_METADATA_KEY, queries, constructor);\n }\n queries.push({ selector, options, propertyKey, isMethod });\n\n if (!isMethod) {\n // \uC18D\uC131 \uB370\uCF54\uB808\uC774\uD130\uC778 \uACBD\uC6B0: \uAE30\uC874\uCC98\uB7FC Lazy Getter \uC124\uC815\n Object.defineProperty(target, propertyKey, {\n get(this: HTMLElement) {\n const root = options.useShadow !== false && this.shadowRoot ? this.shadowRoot : this;\n return root.querySelectorAll(selector);\n },\n enumerable: true,\n configurable: true\n });\n }\n };\n};\n\nexport const getQueryAllMetadata = (target: any): QueryAllMetadata[] | undefined => {\n const constructor = target instanceof Function ? target : target.constructor;\n return ReflectUtils.getMetadata(QUERY_ALL_METADATA_KEY, constructor);\n};\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAA6B;AAatB,MAAM,yBAAyB,OAAO,gCAAgC;AAEtE,MAAM,WAAW,CAAC,UAAkB,UAA2B,EAAE,WAAW,KAAK,MAAW;AACjG,SAAO,CAAC,QAAgB,aAA8B,eAAoC;AACxF,UAAM,WAAW,CAAC,CAAC;AACnB,UAAM,cAAc,OAAO;AAG3B,QAAI,UAAU,iCAAa,YAAgC,wBAAwB,WAAW;AAC9F,QAAI,CAAC,SAAS;AACZ,gBAAU,CAAC;AACX,uCAAa,eAAe,wBAAwB,SAAS,WAAW;AAAA,IAC1E;AACA,YAAQ,KAAK,EAAE,UAAU,SAAS,aAAa,SAAS,CAAC;AAEzD,QAAI,CAAC,UAAU;AAEb,aAAO,eAAe,QAAQ,aAAa;AAAA,QACzC,MAAuB;AACrB,gBAAM,OAAO,QAAQ,cAAc,SAAS,KAAK,aAAa,KAAK,aAAa;AAChF,iBAAO,KAAK,iBAAiB,QAAQ;AAAA,QACvC;AAAA,QACA,YAAY;AAAA,QACZ,cAAc;AAAA,MAChB,CAAC;AAAA,IACH;AAAA,EACF;AACF;AAEO,MAAM,sBAAsB,CAAC,WAAgD;AAClF,QAAM,cAAc,kBAAkB,WAAW,SAAS,OAAO;AACjE,SAAO,iCAAa,YAAY,wBAAwB,WAAW;AACrE;",
6
+ "names": []
7
+ }