@dooboostore/simple-web-component 1.0.23 → 1.0.25

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 (149) hide show
  1. package/README.md +64 -3212
  2. package/dist/cjs/decorators/addEventListener.js +1 -1
  3. package/dist/cjs/decorators/addEventListener.js.map +2 -2
  4. package/dist/cjs/decorators/applyAttribute.js +148 -0
  5. package/dist/cjs/decorators/applyAttribute.js.map +7 -0
  6. package/dist/cjs/decorators/applyClass.js +164 -0
  7. package/dist/cjs/decorators/applyClass.js.map +7 -0
  8. package/dist/cjs/decorators/applyNode.js +97 -109
  9. package/dist/cjs/decorators/applyNode.js.map +2 -2
  10. package/dist/cjs/decorators/applyStyle.js +135 -0
  11. package/dist/cjs/decorators/applyStyle.js.map +7 -0
  12. package/dist/cjs/decorators/attribute.js +24 -11
  13. package/dist/cjs/decorators/attribute.js.map +2 -2
  14. package/dist/cjs/decorators/changedAttributeHost.js +1 -1
  15. package/dist/cjs/decorators/changedAttributeHost.js.map +2 -2
  16. package/dist/cjs/decorators/elementDefine.js +14 -23
  17. package/dist/cjs/decorators/elementDefine.js.map +2 -2
  18. package/dist/cjs/decorators/emitCustomEvent.js +5 -2
  19. package/dist/cjs/decorators/emitCustomEvent.js.map +2 -2
  20. package/dist/cjs/decorators/index.js +3 -3
  21. package/dist/cjs/decorators/index.js.map +2 -2
  22. package/dist/cjs/decorators/lifecycles.js +9 -9
  23. package/dist/cjs/decorators/lifecycles.js.map +2 -2
  24. package/dist/cjs/decorators/query.js +78 -3
  25. package/dist/cjs/decorators/query.js.map +2 -2
  26. package/dist/cjs/decorators/queryAll.js +78 -3
  27. package/dist/cjs/decorators/queryAll.js.map +2 -2
  28. package/dist/cjs/elements/SwcAppEngine.js +19 -4
  29. package/dist/cjs/elements/SwcAppEngine.js.map +2 -2
  30. package/dist/cjs/elements/SwcAppMixin.js +2 -0
  31. package/dist/cjs/elements/SwcAppMixin.js.map +2 -2
  32. package/dist/cjs/index.js +4 -4
  33. package/dist/cjs/index.js.map +2 -2
  34. package/dist/cjs/utils/Utils.js +141 -2
  35. package/dist/cjs/utils/Utils.js.map +2 -2
  36. package/dist/esm/decorators/addEventListener.js +1 -1
  37. package/dist/esm/decorators/addEventListener.js.map +2 -2
  38. package/dist/esm/decorators/applyAttribute.js +129 -0
  39. package/dist/esm/decorators/applyAttribute.js.map +7 -0
  40. package/dist/esm/decorators/applyClass.js +145 -0
  41. package/dist/esm/decorators/applyClass.js.map +7 -0
  42. package/dist/esm/decorators/applyNode.js +97 -109
  43. package/dist/esm/decorators/applyNode.js.map +2 -2
  44. package/dist/esm/decorators/applyStyle.js +116 -0
  45. package/dist/esm/decorators/applyStyle.js.map +7 -0
  46. package/dist/esm/decorators/attribute.js +24 -11
  47. package/dist/esm/decorators/attribute.js.map +2 -2
  48. package/dist/esm/decorators/changedAttributeHost.js +1 -1
  49. package/dist/esm/decorators/changedAttributeHost.js.map +2 -2
  50. package/dist/esm/decorators/elementDefine.js +14 -23
  51. package/dist/esm/decorators/elementDefine.js.map +2 -2
  52. package/dist/esm/decorators/emitCustomEvent.js +5 -2
  53. package/dist/esm/decorators/emitCustomEvent.js.map +2 -2
  54. package/dist/esm/decorators/index.js +3 -3
  55. package/dist/esm/decorators/index.js.map +1 -1
  56. package/dist/esm/decorators/lifecycles.js +9 -9
  57. package/dist/esm/decorators/lifecycles.js.map +2 -2
  58. package/dist/esm/decorators/query.js +78 -3
  59. package/dist/esm/decorators/query.js.map +2 -2
  60. package/dist/esm/decorators/queryAll.js +78 -3
  61. package/dist/esm/decorators/queryAll.js.map +2 -2
  62. package/dist/esm/elements/SwcAppEngine.js +19 -4
  63. package/dist/esm/elements/SwcAppEngine.js.map +2 -2
  64. package/dist/esm/elements/SwcAppMixin.js +2 -0
  65. package/dist/esm/elements/SwcAppMixin.js.map +2 -2
  66. package/dist/esm/index.js +4 -4
  67. package/dist/esm/index.js.map +2 -2
  68. package/dist/esm/utils/Utils.js +141 -2
  69. package/dist/esm/utils/Utils.js.map +2 -2
  70. package/dist/esm-bundle/dooboostore-simple-web-component.esm.js +3191 -506
  71. package/dist/esm-bundle/dooboostore-simple-web-component.esm.js.map +4 -4
  72. package/dist/types/decorators/addEventListener.d.ts.map +1 -1
  73. package/dist/types/decorators/applyAttribute.d.ts +22 -0
  74. package/dist/types/decorators/applyAttribute.d.ts.map +1 -0
  75. package/dist/types/decorators/applyClass.d.ts +65 -0
  76. package/dist/types/decorators/applyClass.d.ts.map +1 -0
  77. package/dist/types/decorators/applyNode.d.ts +18 -104
  78. package/dist/types/decorators/applyNode.d.ts.map +1 -1
  79. package/dist/types/decorators/applyStyle.d.ts +21 -0
  80. package/dist/types/decorators/applyStyle.d.ts.map +1 -0
  81. package/dist/types/decorators/attribute.d.ts +12 -14
  82. package/dist/types/decorators/attribute.d.ts.map +1 -1
  83. package/dist/types/decorators/changedAttributeHost.d.ts.map +1 -1
  84. package/dist/types/decorators/elementDefine.d.ts.map +1 -1
  85. package/dist/types/decorators/emitCustomEvent.d.ts +1 -1
  86. package/dist/types/decorators/emitCustomEvent.d.ts.map +1 -1
  87. package/dist/types/decorators/index.d.ts +3 -3
  88. package/dist/types/decorators/index.d.ts.map +1 -1
  89. package/dist/types/decorators/lifecycles.d.ts.map +1 -1
  90. package/dist/types/decorators/query.d.ts +68 -4
  91. package/dist/types/decorators/query.d.ts.map +1 -1
  92. package/dist/types/decorators/queryAll.d.ts +70 -1
  93. package/dist/types/decorators/queryAll.d.ts.map +1 -1
  94. package/dist/types/elements/SwcAppEngine.d.ts +7 -0
  95. package/dist/types/elements/SwcAppEngine.d.ts.map +1 -1
  96. package/dist/types/elements/SwcAppMixin.d.ts +1 -1
  97. package/dist/types/elements/SwcAppMixin.d.ts.map +1 -1
  98. package/dist/types/index.d.ts +1 -2
  99. package/dist/types/index.d.ts.map +1 -1
  100. package/dist/types/utils/Utils.d.ts +49 -0
  101. package/dist/types/utils/Utils.d.ts.map +1 -1
  102. package/dist/umd-bundle/dooboostore-simple-web-component.umd.js +3191 -506
  103. package/dist/umd-bundle/dooboostore-simple-web-component.umd.js.map +4 -4
  104. package/package.json +3 -3
  105. package/src/decorators/addEventListener.ts +1 -1
  106. package/src/decorators/applyAttribute.ts +147 -0
  107. package/src/decorators/applyClass.ts +158 -0
  108. package/src/decorators/applyNode.ts +126 -225
  109. package/src/decorators/applyStyle.ts +128 -0
  110. package/src/decorators/attribute.ts +42 -43
  111. package/src/decorators/changedAttributeHost.ts +2 -2
  112. package/src/decorators/elementDefine.ts +18 -39
  113. package/src/decorators/emitCustomEvent.ts +6 -3
  114. package/src/decorators/index.ts +3 -3
  115. package/src/decorators/lifecycles.ts +9 -11
  116. package/src/decorators/query.ts +148 -6
  117. package/src/decorators/queryAll.ts +149 -3
  118. package/src/elements/SwcAppEngine.ts +32 -4
  119. package/src/elements/SwcAppMixin.ts +2 -0
  120. package/src/index.ts +6 -6
  121. package/src/utils/Utils.ts +146 -1
  122. package/dist/cjs/decorators/classList.js +0 -134
  123. package/dist/cjs/decorators/classList.js.map +0 -7
  124. package/dist/cjs/decorators/setAttribute.js +0 -111
  125. package/dist/cjs/decorators/setAttribute.js.map +0 -7
  126. package/dist/cjs/decorators/style.js +0 -114
  127. package/dist/cjs/decorators/style.js.map +0 -7
  128. package/dist/cjs/utils/TemplateUtils.js +0 -109
  129. package/dist/cjs/utils/TemplateUtils.js.map +0 -7
  130. package/dist/esm/decorators/classList.js +0 -115
  131. package/dist/esm/decorators/classList.js.map +0 -7
  132. package/dist/esm/decorators/setAttribute.js +0 -92
  133. package/dist/esm/decorators/setAttribute.js.map +0 -7
  134. package/dist/esm/decorators/style.js +0 -95
  135. package/dist/esm/decorators/style.js.map +0 -7
  136. package/dist/esm/utils/TemplateUtils.js +0 -90
  137. package/dist/esm/utils/TemplateUtils.js.map +0 -7
  138. package/dist/types/decorators/classList.d.ts +0 -61
  139. package/dist/types/decorators/classList.d.ts.map +0 -1
  140. package/dist/types/decorators/setAttribute.d.ts +0 -23
  141. package/dist/types/decorators/setAttribute.d.ts.map +0 -1
  142. package/dist/types/decorators/style.d.ts +0 -49
  143. package/dist/types/decorators/style.d.ts.map +0 -1
  144. package/dist/types/utils/TemplateUtils.d.ts +0 -59
  145. package/dist/types/utils/TemplateUtils.d.ts.map +0 -1
  146. package/src/decorators/classList.ts +0 -172
  147. package/src/decorators/setAttribute.ts +0 -113
  148. package/src/decorators/style.ts +0 -140
  149. package/src/utils/TemplateUtils.ts +0 -92
@@ -1 +1 @@
1
- {"version":3,"file":"addEventListener.d.ts","sourceRoot":"","sources":["../../../src/decorators/addEventListener.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE5D,MAAM,WAAW,2BAA4B,SAAQ,oBAAoB;IACvE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,wBAAwB;IACvC,WAAW,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,2BAA2B,GAAG,eAAe,GAAG;QAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;CACjF;AAED,eAAO,MAAM,+BAA+B,eAAoD,CAAC;AAEjG,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,2BAA2B,GAAG,eAAe,CAAC;AAChI,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MA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ChI,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,2BAA2B,GAAG,eAAe,GAAG;IAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,eAAe,CAAC;AAkBpK,eAAO,MAAM,2BAA2B,GAAI,QAAQ,GAAG,KAAG,wBAAwB,EAAE,GAAG,SAGtF,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,2BAA2B,GAAG,eAAe,GAAG,eAAe,CAE3H"}
@@ -0,0 +1,22 @@
1
+ import { SwcQueryOptions } from '../types';
2
+ export type AttributeAction = 'set' | 'update' | 'remove';
3
+ export interface AttributeApplyOptions extends SwcQueryOptions {
4
+ name?: string;
5
+ }
6
+ export interface AttributeApplyMetadata {
7
+ propertyKey: string | symbol;
8
+ selector: string;
9
+ action: AttributeAction;
10
+ options: AttributeApplyOptions;
11
+ }
12
+ export declare const ATTRIBUTE_APPLY_METADATA_KEY: unique symbol;
13
+ export declare function applyAttribute(selector: string, action?: AttributeAction, options?: AttributeApplyOptions): MethodDecorator;
14
+ export declare const setAttribute: (selector: string, nameOrOptions?: string | AttributeApplyOptions, options?: AttributeApplyOptions) => MethodDecorator;
15
+ export declare const updateAttribute: (selector: string, nameOrOptions?: string | AttributeApplyOptions, options?: AttributeApplyOptions) => MethodDecorator;
16
+ export declare const removeAttribute: (selector: string, nameOrOptions?: string | AttributeApplyOptions, options?: AttributeApplyOptions) => MethodDecorator;
17
+ export declare function applyAttributeHost(action?: AttributeAction, options?: AttributeApplyOptions): MethodDecorator;
18
+ export declare const setAttributeHost: (nameOrOptions: string | AttributeApplyOptions, options?: AttributeApplyOptions) => MethodDecorator;
19
+ export declare const updateAttributeHost: (nameOrOptions: string | AttributeApplyOptions, options?: AttributeApplyOptions) => MethodDecorator;
20
+ export declare const removeAttributeHost: (nameOrOptions?: string | AttributeApplyOptions, options?: AttributeApplyOptions) => MethodDecorator;
21
+ export declare const findAllAttributeApplyMetadata: (target: any) => Map<string | symbol, AttributeApplyMetadata>;
22
+ //# sourceMappingURL=applyAttribute.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"applyAttribute.d.ts","sourceRoot":"","sources":["../../../src/decorators/applyAttribute.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAiB,MAAM,UAAU,CAAC;AAE1D,MAAM,MAAM,eAAe,GAAG,KAAK,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAE1D,MAAM,WAAW,qBAAsB,SAAQ,eAAe;IAC5D,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,sBAAsB;IACrC,WAAW,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,eAAe,CAAC;IACxB,OAAO,EAAE,qBAAqB,CAAC;CAChC;AAED,eAAO,MAAM,4BAA4B,eAAqD,CAAC;AAuG/F,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,GAAE,eAA0B,EAAE,OAAO,GAAE,qBAA0B,GAAG,eAAe,CAEzI;AAED,eAAO,MAAM,YAAY,GAAI,UAAU,MAAM,EAAE,gBAAgB,MAAM,GAAG,qBAAqB,EAAE,UAAS,qBAA0B,oBAAsE,CAAC;AACzM,eAAO,MAAM,eAAe,GAAI,UAAU,MAAM,EAAE,gBAAgB,MAAM,GAAG,qBAAqB,EAAE,UAAS,qBAA0B,oBAAyE,CAAC;AAC/M,eAAO,MAAM,eAAe,GAAI,UAAU,MAAM,EAAE,gBAAgB,MAAM,GAAG,qBAAqB,EAAE,UAAS,qBAA0B,oBAAyE,CAAC;AAG/M,wBAAgB,kBAAkB,CAAC,MAAM,GAAE,eAA0B,EAAE,OAAO,GAAE,qBAA0B,GAAG,eAAe,CAE3H;AACD,eAAO,MAAM,gBAAgB,GAAI,eAAe,MAAM,GAAG,qBAAqB,EAAE,UAAS,qBAA0B,oBAAqE,CAAC;AACzL,eAAO,MAAM,mBAAmB,GAAI,eAAe,MAAM,GAAG,qBAAqB,EAAE,UAAS,qBAA0B,oBAAwE,CAAC;AAC/L,eAAO,MAAM,mBAAmB,GAAI,gBAAgB,MAAM,GAAG,qBAAqB,EAAE,UAAS,qBAA0B,oBAAwE,CAAC;AAEhM,eAAO,MAAM,6BAA6B,GAAI,QAAQ,GAAG,KAAG,GAAG,CAAC,MAAM,GAAG,MAAM,EAAE,sBAAsB,CAStG,CAAC"}
@@ -0,0 +1,65 @@
1
+ import { SwcQueryOptions, HelperHostSet } from '../types';
2
+ export declare const CLASS_METADATA_KEY: unique symbol;
3
+ export type ClassAction = 'set' | 'update' | 'add' | 'remove' | 'toggle';
4
+ export interface ClassApplyOptions extends SwcQueryOptions {
5
+ }
6
+ export interface ClassApplyMetadata {
7
+ propertyKey: string | symbol;
8
+ selector: string;
9
+ action: ClassAction;
10
+ options: ClassApplyOptions;
11
+ }
12
+ export declare function applyClass(selector: string, action?: ClassAction, options?: ClassApplyOptions): MethodDecorator;
13
+ export declare const setClass: (selector: string, classMapOrOptions?: string | {
14
+ [className: string]: (el: HTMLElement, value: any, helper: HelperHostSet & {
15
+ $this: any;
16
+ }) => boolean;
17
+ } | ClassApplyOptions, options?: ClassApplyOptions) => MethodDecorator;
18
+ export declare const updateClass: (selector: string, classMapOrOptions?: string | {
19
+ [className: string]: (el: HTMLElement, value: any, helper: HelperHostSet & {
20
+ $this: any;
21
+ }) => boolean;
22
+ } | ClassApplyOptions, options?: ClassApplyOptions) => MethodDecorator;
23
+ export declare const addClass: (selector: string, classMapOrOptions?: string | {
24
+ [className: string]: (el: HTMLElement, value: any, helper: HelperHostSet & {
25
+ $this: any;
26
+ }) => boolean;
27
+ } | ClassApplyOptions, options?: ClassApplyOptions) => MethodDecorator;
28
+ export declare const removeClass: (selector: string, classMapOrOptions?: string | {
29
+ [className: string]: (el: HTMLElement, value: any, helper: HelperHostSet & {
30
+ $this: any;
31
+ }) => boolean;
32
+ } | ClassApplyOptions, options?: ClassApplyOptions) => MethodDecorator;
33
+ export declare const toggleClass: (selector: string, classMapOrOptions?: string | {
34
+ [className: string]: (el: HTMLElement, value: any, helper: HelperHostSet & {
35
+ $this: any;
36
+ }) => boolean;
37
+ } | ClassApplyOptions, options?: ClassApplyOptions) => MethodDecorator;
38
+ export declare function applyClassHost(action?: ClassAction, options?: ClassApplyOptions): MethodDecorator;
39
+ export declare const setClassHost: (classMapOrOptions?: string | {
40
+ [className: string]: (el: HTMLElement, value: any, helper: HelperHostSet & {
41
+ $this: any;
42
+ }) => boolean;
43
+ } | ClassApplyOptions, options?: ClassApplyOptions) => MethodDecorator;
44
+ export declare const updateClassHost: (classMapOrOptions?: string | {
45
+ [className: string]: (el: HTMLElement, value: any, helper: HelperHostSet & {
46
+ $this: any;
47
+ }) => boolean;
48
+ } | ClassApplyOptions, options?: ClassApplyOptions) => MethodDecorator;
49
+ export declare const addClassHost: (classMapOrOptions?: string | {
50
+ [className: string]: (el: HTMLElement, value: any, helper: HelperHostSet & {
51
+ $this: any;
52
+ }) => boolean;
53
+ } | ClassApplyOptions, options?: ClassApplyOptions) => MethodDecorator;
54
+ export declare const removeClassHost: (classMapOrOptions?: string | {
55
+ [className: string]: (el: HTMLElement, value: any, helper: HelperHostSet & {
56
+ $this: any;
57
+ }) => boolean;
58
+ } | ClassApplyOptions, options?: ClassApplyOptions) => MethodDecorator;
59
+ export declare const toggleClassHost: (classMapOrOptions?: string | {
60
+ [className: string]: (el: HTMLElement, value: any, helper: HelperHostSet & {
61
+ $this: any;
62
+ }) => boolean;
63
+ } | ClassApplyOptions, options?: ClassApplyOptions) => MethodDecorator;
64
+ export declare const findAllClassMetadata: (target: any) => Map<string | symbol, ClassApplyMetadata>;
65
+ //# sourceMappingURL=applyClass.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"applyClass.d.ts","sourceRoot":"","sources":["../../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odePosition = 'beforeBegin' | 'afterBegin' | 'beforeEnd' | 'afterEnd' | 'replace' | 'replaceChildren' | 'innerHtml' | 'innerText' | 'remove';
3
3
  export interface ApplyNodeOptions {
4
4
  position?: ApplyNodePosition;
5
5
  root?: SwcRootType;
6
+ /**
7
+ * Filter function to determine whether to perform DOM operation.
8
+ * If it returns false, the operation is skipped.
9
+ */
10
+ filter?: (target: HTMLElement | ShadowRoot, newValue: any, helper: HelperHostSet) => boolean;
11
+ /**
12
+ * Optional loading content to display while an async method is executing.
13
+ */
14
+ loading?: (helper: HelperHostSet) => any;
6
15
  }
7
16
  export interface ApplyNodeMetadata {
8
17
  propertyKey: string | symbol;
@@ -12,110 +21,15 @@ export interface ApplyNodeMetadata {
12
21
  export declare const APPLY_NODE_METADATA_KEY: unique symbol;
13
22
  /**
14
23
  * @applyNode decorator to surgically add/replace nodes to a target element.
15
- *
16
- * Usage examples:
17
- * @applyNode('#list') addItem() { return '<li>New Item</li>'; } // append at end
18
- * @applyNode('#header', { position: 'afterBegin' }) prependItem() { return '<h1>Title</h1>'; } // prepend at start
19
- * @applyNode('#item', { position: 'replace' }) replaceItem() { return '<div>Replaced</div>'; } // replace element
20
- * @applyNode('#list', { position: 'replaceChildren' }) updateList() { return [item1, item2]; } // replace all children
21
- * @applyNode('#notification', { position: 'remove' }) dismissNotification() { return shouldDismiss; } // remove if truthy
22
- * @applyNode('.items', { position: 'remove', root: 'shadow' }) clearItems() { return true; } // remove shadow DOM elements
23
- *
24
- * Positions:
25
- * - 'beforeEnd' (default): Append at end of target
26
- * - 'afterBegin': Prepend at start of target
27
- * - 'beforeBegin': Insert before target
28
- * - 'afterEnd': Insert after target
29
- * - 'replace': Replace the entire target element
30
- * - 'replaceChildren': Replace all children of target element
31
- * - 'innerHtml': Set target's innerHTML
32
- * - 'innerText': Set target's innerText
33
- * - 'remove': Remove target element if returned value is truthy
34
- *
35
- * Root Options:
36
- * - 'auto' (default): Search shadow DOM first, then light DOM
37
- * - 'shadow': Search only in shadow DOM
38
- * - 'light': Search only in light DOM
39
- * - 'all': Use both (shadow preferred for query, both for remove)
40
24
  */
41
25
  export declare function applyNode(selector: string, options?: ApplyNodeOptions): MethodDecorator;
42
26
  export declare const findAllApplyNodeMetadata: (target: any) => Map<string | symbol, ApplyNodeMetadata>;
43
- /**
44
- * @applyNodeHost decorator - simplified version of @applyNode for :host selector
45
- * Usage: @applyNodeHost() addItem() { return '<li>New Item</li>'; }
46
- * Usage: @applyNodeHost({ position: 'afterBegin' }) prependItem() { return '<h1>Title</h1>'; }
47
- */
48
- export declare function applyNodeHost(options?: ApplyNodeOptions): MethodDecorator;
49
- /**
50
- * @applyBeforeBeginNode - Insert before target element
51
- */
52
- export declare const applyBeforeBeginNode: (selector: string, options?: ApplyNodeOptions) => MethodDecorator;
53
- /**
54
- * @applyAfterBeginNode - Prepend to target element
55
- */
56
- export declare const applyAfterBeginNode: (selector: string, options?: ApplyNodeOptions) => MethodDecorator;
57
- /**
58
- * @applyBeforeEndNode - Append to target element (default)
59
- */
60
- export declare const applyBeforeEndNode: (selector: string, options?: ApplyNodeOptions) => MethodDecorator;
61
- /**
62
- * @applyAfterEndNode - Insert after target element
63
- */
64
- export declare const applyAfterEndNode: (selector: string, options?: ApplyNodeOptions) => MethodDecorator;
65
- /**
66
- * @applyReplaceNode - Replace entire target element
67
- */
68
- export declare const applyReplaceNode: (selector: string, options?: ApplyNodeOptions) => MethodDecorator;
69
- /**
70
- * @applyReplaceChildrenNode - Replace all children of target element
71
- */
72
- export declare const applyReplaceChildrenNode: (selector: string, options?: ApplyNodeOptions) => MethodDecorator;
73
- /**
74
- * @applyInnerHtmlNode - Set target's innerHTML
75
- */
76
- export declare const applyInnerHtmlNode: (selector: string, options?: ApplyNodeOptions) => MethodDecorator;
77
- /**
78
- * @applyInnerTextNode - Set target's innerText
79
- */
80
- export declare const applyInnerTextNode: (selector: string, options?: ApplyNodeOptions) => MethodDecorator;
81
- /**
82
- * @applyRemoveNode - Remove target element if truthy
83
- */
84
- export declare const applyRemoveNode: (selector: string, options?: ApplyNodeOptions) => MethodDecorator;
85
- /**
86
- * @applyBeforeBeginNodeHost - Insert before :host
87
- */
88
- export declare const applyBeforeBeginNodeHost: (options?: ApplyNodeOptions) => MethodDecorator;
89
- /**
90
- * @applyAfterBeginNodeHost - Prepend to :host
91
- */
92
- export declare const applyAfterBeginNodeHost: (options?: ApplyNodeOptions) => MethodDecorator;
93
- /**
94
- * @applyBeforeEndNodeHost - Append to :host
95
- */
96
- export declare const applyBeforeEndNodeHost: (options?: ApplyNodeOptions) => MethodDecorator;
97
- /**
98
- * @applyAfterEndNodeHost - Insert after :host
99
- */
100
- export declare const applyAfterEndNodeHost: (options?: ApplyNodeOptions) => MethodDecorator;
101
- /**
102
- * @applyReplaceNodeHost - Replace :host
103
- */
104
- export declare const applyReplaceNodeHost: (options?: ApplyNodeOptions) => MethodDecorator;
105
- /**
106
- * @applyReplaceChildrenNodeHost - Replace children of :host
107
- */
108
- export declare const applyReplaceChildrenNodeHost: (options?: ApplyNodeOptions) => MethodDecorator;
109
- /**
110
- * @applyInnerHtmlNodeHost - Set :host innerHTML
111
- */
112
- export declare const applyInnerHtmlNodeHost: (options?: ApplyNodeOptions) => MethodDecorator;
113
- /**
114
- * @applyInnerTextNodeHost - Set :host innerText
115
- */
116
- export declare const applyInnerTextNodeHost: (options?: ApplyNodeOptions) => MethodDecorator;
117
- /**
118
- * @applyRemoveNodeHost - Remove :host if truthy
119
- */
120
- export declare const applyRemoveNodeHost: (options?: ApplyNodeOptions) => MethodDecorator;
27
+ export declare function applyNodeHost(options: ApplyNodeOptions): MethodDecorator;
28
+ export declare function applyNodeHost(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): void;
29
+ export declare function applyReplaceChildrenNodeHost(options: ApplyNodeOptions): MethodDecorator;
30
+ export declare function applyReplaceChildrenNodeHost(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): void;
31
+ export declare function applyInnerHtmlNodeHost(options: ApplyNodeOptions): MethodDecorator;
32
+ export declare function applyInnerHtmlNodeHost(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): void;
33
+ export declare function applyReplaceChildrenNode(selector: string, options?: ApplyNodeOptions): MethodDecorator;
34
+ export declare function applyInnerHtmlNode(selector: string, options?: ApplyNodeOptions): MethodDecorator;
121
35
  //# sourceMappingURL=applyNode.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"applyNode.d.ts","sourceRoot":"","sources":["../../../src/decorators/applyNode.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEvC,MAAM,MAAM,iBAAiB,GAAG,aAAa,GAAG,YAAY,GAAG,WAAW,GAAG,UAAU,GAAG,SAAS,GAAG,iBAAiB,GAAG,WAAW,GAAG,WAAW,GAAG,QAAQ,CAAC;AAE/J,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,EAAE,iBAAiB,CAAC;IAC7B,IAAI,CAAC,EAAE,WAAW,CAAC;CACpB;AAED,MAAM,WAAW,iBAAiB;IAChC,WAAW,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,gBAAgB,CAAC;CAC3B;AAED,eAAO,MAAM,uBAAuB,eAA4C,CAAC;AAUjF;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,GAAE,gBAA4C,GAAG,eAAe,CAsGlH;AAED,eAAO,MAAM,wBAAwB,GAAI,QAAQ,GAAG,KAAG,GAAG,CAAC,MAAM,GAAG,MAAM,EAAE,iBAAiB,CAS5F,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,OAAO,GAAE,gBAA4C,GAAG,eAAe,CAEpG;AAID;;GAEG;AACH,eAAO,MAAM,oBAAoB,GAAI,UAAU,MAAM,EAAE,UAAS,gBAAqB,oBACvB,CAAC;AAE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AgB,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,EAAE,UAAU,EAAE,kBAAkB,GAAG,IAAI,CAAC;AAOlH,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,gBAAgB,GAAG,eAAe,CAAC;AACzF,wBAAgB,4BAA4B,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,EAAE,UAAU,EAAE,kBAAkB,GAAG,IAAI,CAAC;AAOjI,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,gBAAgB,GAAG,eAAe,CAAC;AACnF,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,EAAE,UAAU,EAAE,kBAAkB,GAAG,IAAI,CAAC;AAO3H,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,GAAE,gBAAqB,GAAG,eAAe,CAE1G;AAED,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,GAAE,gBAAqB,GAAG,eAAe,CAEpG"}
@@ -0,0 +1,21 @@
1
+ import { SwcQueryOptions } from '../types';
2
+ export type StyleAction = 'set' | 'update' | 'remove';
3
+ export interface StyleApplyOptions extends SwcQueryOptions {
4
+ }
5
+ export interface StyleApplyMetadata {
6
+ propertyKey: string | symbol;
7
+ selector: string;
8
+ action: StyleAction;
9
+ options: StyleApplyOptions;
10
+ }
11
+ export declare const STYLE_METADATA_KEY: unique symbol;
12
+ export declare function applyStyle(selector: string, action?: StyleAction, options?: StyleApplyOptions): MethodDecorator;
13
+ export declare const setStyle: (selector: string, options?: StyleApplyOptions) => MethodDecorator;
14
+ export declare const updateStyle: (selector: string, options?: StyleApplyOptions) => MethodDecorator;
15
+ export declare const removeStyle: (selector: string, options?: StyleApplyOptions) => MethodDecorator;
16
+ export declare function applyStyleHost(action?: StyleAction, options?: StyleApplyOptions): MethodDecorator;
17
+ export declare const setStyleHost: (options?: StyleApplyOptions) => MethodDecorator;
18
+ export declare const updateStyleHost: (options?: StyleApplyOptions) => MethodDecorator;
19
+ export declare const removeStyleHost: (options?: StyleApplyOptions) => MethodDecorator;
20
+ export declare const findAllStyleMetadata: (target: any) => Map<string | symbol, StyleApplyMetadata>;
21
+ //# sourceMappingURL=applyStyle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"applyStyle.d.ts","sourceRoot":"","sources":["../../../src/decorators/applyStyle.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAiB,MAAM,UAAU,CAAC;AAE1D,MAAM,MAAM,WAAW,GAAG,KAAK,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAEtD,MAAM,WAAW,iBAAkB,SAAQ,eAAe;CAAG;AAE7D,MAAM,WAAW,kBAAkB;IACjC,WAAW,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,WAAW,CAAC;IACpB,OAAO,EAAE,iBAAiB,CAAC;CAC5B;AAED,eAAO,MAAM,kBAAkB,eAA2C,CAAC;AAsF3E,wBAAgB,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,GAAE,WAAsB,EAAE,OAAO,GAAE,iBAAsB,GAAG,eAAe,CAE7H;AAED,eAAO,MAAM,QAAQ,GAAI,UAAU,MAAM,EAAE,UAAS,iBAAsB,oBAAmD,CAAC;AAC9H,eAAO,MAAM,WAAW,GAAI,UAAU,MAAM,EAAE,UAAS,iBAAsB,oBAAsD,CAAC;AACpI,eAAO,MAAM,WAAW,GAAI,UAAU,MAAM,EAAE,UAAS,iBAAsB,oBAAsD,CAAC;AAGpI,wBAAgB,cAAc,CAAC,MAAM,GAAE,WAAsB,EAAE,OAAO,GAAE,iBAAsB,GAAG,eAAe,CAE/G;AACD,eAAO,MAAM,YAAY,GAAI,UAAS,iBAAsB,oBAAkD,CAAC;AAC/G,eAAO,MAAM,eAAe,GAAI,UAAS,iBAAsB,oBAAqD,CAAC;AACrH,eAAO,MAAM,eAAe,GAAI,UAAS,iBAAsB,oBAAqD,CAAC;AAErH,eAAO,MAAM,oBAAoB,GAAI,QAAQ,GAAG,KAAG,GAAG,CAAC,MAAM,GAAG,MAAM,EAAE,kBAAkB,CASzF,CAAC"}
@@ -1,29 +1,27 @@
1
1
  import { SwcQueryOptions } from '../types';
2
- export interface AttributeOptions extends SwcQueryOptions {
2
+ export interface AttributeFieldOptions extends SwcQueryOptions {
3
3
  name?: string;
4
4
  connectedInitialize?: boolean;
5
5
  type?: typeof Number | typeof Boolean | typeof String;
6
6
  }
7
- export interface AttributeMetadata {
7
+ export interface AttributeFieldMetadata {
8
8
  propertyKey: string | symbol;
9
9
  selector: string;
10
- options: AttributeOptions;
10
+ options: AttributeFieldOptions;
11
11
  privateKey: symbol;
12
12
  }
13
- export declare const ATTRIBUTE_METADATA_KEY: unique symbol;
14
- /**
15
- * Helper to resolve target elements based on selector and root options
16
- */
17
- export declare const resolveTargetEls: (inst: any, selector: string, options: AttributeOptions, currentWin: any) => HTMLElement[];
13
+ export declare const ATTRIBUTE_FIELD_METADATA_KEY: unique symbol;
14
+ export declare const resolveTargetEls: (inst: any, selector: string, options: AttributeFieldOptions, currentWin: any) => HTMLElement[];
18
15
  /**
19
16
  * @attribute decorator to sync a field value with an element's attribute.
20
17
  */
21
- export declare function attribute(selector: string, options?: AttributeOptions): PropertyDecorator;
22
- export declare const findAllAttributeMetadata: (target: any) => AttributeMetadata[];
18
+ export declare function attribute(selector: string, options?: AttributeFieldOptions): PropertyDecorator;
23
19
  /**
24
- * @hostAttribute decorator - simplified version of @attribute for :host selector
25
- * Usage: @hostAttribute('data-product-id')
26
- * Usage: @hostAttribute('disabled', { type: Boolean })
20
+ * @attributeHost decorator to sync a field value with the :host element's attribute.
27
21
  */
28
- export declare function attributeHost(attrName: string, options?: AttributeOptions): PropertyDecorator;
22
+ export declare function attributeHost(target: Object, propertyKey: string | symbol): void;
23
+ export declare function attributeHost(options: AttributeFieldOptions): PropertyDecorator;
24
+ export declare function attributeHost(attrName: string): PropertyDecorator;
25
+ export declare function attributeHost(attrName: string, options: AttributeFieldOptions): PropertyDecorator;
26
+ export declare const findAllAttributeMetadata: (target: any) => AttributeFieldMetadata[];
29
27
  //# sourceMappingURL=attribute.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"attribute.d.ts","sourceRoot":"","sources":["../../../src/decorators/attribute.ts"],"names":[],"mappings":"AAGA,OAAO,EAAmB,eAAe,EAAE,MAAM,UAAU,CAAC;AAE5D,MAAM,WAAW,gBAAiB,SAAQ,eAAe;IACvD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,IAAI,CAAC,EAAE,OAAO,MAAM,GAAG,OAAO,OAAO,GAAG,OAAO,MAAM,CAAC;CACvD;AAED,MAAM,WAAW,iBAAiB;IAChC,WAAW,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,gBAAgB,CAAC;IAC1B,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,sBAAsB,eAA2C,CAAC;AAY/E;;GAEG;AACH,eAAO,MAAM,gBAAgB,GAAI,MAAM,GAAG,EAAE,UAAU,MAAM,EAAE,SAAS,gBAAgB,EAAE,YAAY,GAAG,KAAG,WAAW,EAiDrH,CAAC;AAEF;;GAEG;AACH,wBAAgB,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,GAAE,gBAAqB,GAAG,iBAAiB,CA2F7F;AAED,eAAO,MAAM,wBAAwB,GAAI,QAAQ,GAAG,KAAG,iBAAiB,EAEvE,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,GAAE,gBAAqB,GAAG,iBAAiB,CAEjG"}
1
+ {"version":3,"file":"attribute.d.ts","sourceRoot":"","sources":["../../../src/decorators/attribute.ts"],"names":[],"mappings":"AAGA,OAAO,EAAkB,eAAe,EAAC,MAAM,UAAU,CAAC;AAE1D,MAAM,WAAW,qBAAsB,SAAQ,eAAe;IAC5D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,IAAI,CAAC,EAAE,OAAO,MAAM,GAAG,OAAO,OAAO,GAAG,OAAO,MAAM,CAAC;CACvD;AAED,MAAM,WAAW,sBAAsB;IACrC,WAAW,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,qBAAqB,CAAC;IAC/B,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,4BAA4B,eAAqD,CAAC;AAS/F,eAAO,MAAM,gBAAgB,GAAI,MAAM,GAAG,EAAE,UAAU,MAAM,EAAE,SAAS,qBAAqB,EAAE,YAAY,GAAG,KAAG,WAAW,EA+C1H,CAAC;AAEF;;GAEG;AACH,wBAAgB,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,GAAE,qBAA0B,GAAG,iBAAiB,CA+ElG;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;AAClF,wBAAgB,aAAa,CAAC,OAAO,EAAE,qBAAqB,GAAG,iBAAiB,CAAC;AACjF,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,iBAAiB,CAAC;AACnE,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,qBAAqB,GAAG,iBAAiB,CAAC;AAsBnG,eAAO,MAAM,wBAAwB,GAAI,QAAQ,GAAG,KAAG,sBAAsB,EAE5E,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"changedAttributeHost.d.ts","sourceRoot":"","sources":["../../../src/decorators/changedAttributeHost.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,iCAAiC,eAAsD,CAAC;AAErG;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,aAAa,CAAC,EAAE,MAAM,GAAG,eAAe,CAiB5E;AAED,eAAO,MAAM,2BAA2B,GAAI,QAAQ,GAAG,KAAG,GAAG,CAAC,MAAM,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC,GAAG,SAG5F,CAAC;AAEF,eAAO,MAAM,+BAA+B,GAAI,QAAQ,GAAG,KAAG,GAAG,CAAC,MAAM,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAE5F,CAAC"}
1
+ {"version":3,"file":"changedAttributeHost.d.ts","sourceRoot":"","sources":["../../../src/decorators/changedAttributeHost.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,iCAAiC,eAA0D,CAAC;AAEzG;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,aAAa,CAAC,EAAE,MAAM,GAAG,eAAe,CAiB5E;AAED,eAAO,MAAM,2BAA2B,GAAI,QAAQ,GAAG,KAAG,GAAG,CAAC,MAAM,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC,GAAG,SAG5F,CAAC;AAEF,eAAO,MAAM,+BAA+B,GAAI,QAAQ,GAAG,KAAG,GAAG,CAAC,MAAM,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAE5F,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"elementDefine.d.ts","sourceRoot":"","sources":["../../../src/decorators/elementDefine.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,kBAAkB,eAAgD,CAAC;AAEhF,MAAM,WAAW,aAAa;IAC5B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC9B,qBAAqB,CAAC,EAAE,GAAG,CAAC;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,aAAa,EAAE,QAAQ,CAAC;IACpE,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,gBAAgB,GAAI,QAAQ,GAAG,KAAG,eAAe,GAAG,SAGhE,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,MAAM,GAAG,SAiBnC,CAAC;AA6JF,eAAO,MAAM,aAAa,GACvB,MAAM,MAAM,EAAE,SAAQ,OAAO,CAAC,aAAa,CAAM,KAAG,cA8UpD,CAAC"}
1
+ {"version":3,"file":"elementDefine.d.ts","sourceRoot":"","sources":["../../../src/decorators/elementDefine.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,kBAAkB,eAAoD,CAAC;AAEpF,MAAM,WAAW,aAAa;IAC5B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC9B,qBAAqB,CAAC,EAAE,GAAG,CAAC;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,aAAa,EAAE,QAAQ,CAAC;IACpE,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,gBAAgB,GAAI,QAAQ,GAAG,KAAG,eAAe,GAAG,SAGhE,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,MAAM,GAAG,SAiBnC,CAAC;AA2JF,eAAO,MAAM,aAAa,GACvB,MAAM,MAAM,EAAE,SAAQ,OAAO,CAAC,aAAa,CAAM,KAAG,cA2TpD,CAAC"}
@@ -18,7 +18,7 @@ export declare function emitCustomEvent(selector: string, type: string, options?
18
18
  export declare const getEmitCustomEventMetadataList: (target: any) => EmitCustomEventMetadata[] | undefined;
19
19
  /**
20
20
  * @emitCustomEventHost decorator - simplified version of @emitCustomEvent for :host selector
21
- * Usage: @emitCustomEventHost('navigate')
21
+ * Usage: @emitCustomEventHost('navigate') // default attributeName: 'on-emit-navigate'
22
22
  * Usage: @emitCustomEventHost('navigate', { attributeName: 'on-navigate' })
23
23
  *
24
24
  * The attributeName option is used to automatically observe attributes for this event.
@@ -1 +1 @@
1
- {"version":3,"file":"emitCustomEvent.d.ts","sourceRoot":"","sources":["../../../src/decorators/emitCustomEvent.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAI5D,MAAM,WAAW,0BAA0B;IACzC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,uBAAuB;IACtC,WAAW,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,CAAC,0BAA0B,GAAG,eAAe,CAAC,GAAG,CAAC,0BAA0B,GAAG,eAAe,GAAG;QAAE,aAAa,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACvI;AAED,eAAO,MAAM,8BAA8B,eAAmD,CAAC;AAC/F,wBAAgB,eAAe,CAAC,MAAM,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,0BAA0B,GAAG,eAAe,CAAC;AAC9H,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,0BAA0B,GAAG,eAAe,GAAG,eAAe,CAAC;AA6EzI,eAAO,MAAM,8BAA8B,GAAI,QAAQ,GAAG,KAAG,uBAAuB,EAAE,GAAG,SAGxF,CAAC;AAEF;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,0BAA0B,GAAG,eAAe,GAAG;IAAE,aAAa,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,eAAe,CAEtJ"}
1
+ {"version":3,"file":"emitCustomEvent.d.ts","sourceRoot":"","sources":["../../../src/decorators/emitCustomEvent.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAI5D,MAAM,WAAW,0BAA0B;IACzC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,uBAAuB;IACtC,WAAW,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,CAAC,0BAA0B,GAAG,eAAe,CAAC,GAAG,CAAC,0BAA0B,GAAG,eAAe,GAAG;QAAE,aAAa,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACvI;AAED,eAAO,MAAM,8BAA8B,eAAuD,CAAC;AACnG,wBAAgB,eAAe,CAAC,MAAM,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,0BAA0B,GAAG,eAAe,CAAC;AAC9H,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,0BAA0B,GAAG,eAAe,GAAG,eAAe,CAAC;AA6EzI,eAAO,MAAM,8BAA8B,GAAI,QAAQ,GAAG,KAAG,uBAAuB,EAAE,GAAG,SAGxF,CAAC;AAEF;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,GAAE,0BAA0B,GAAG,eAAe,GAAG;IAAE,aAAa,CAAC,EAAE,MAAM,CAAA;CAAO,GAAG,eAAe,CAK1J"}
@@ -2,12 +2,12 @@ export * from './addEventListener';
2
2
  export * from './attribute';
3
3
  export * from './elementDefine';
4
4
  export * from './changedAttributeHost';
5
- export * from './setAttribute';
6
5
  export * from './emitCustomEvent';
7
6
  export * from './applyNode';
8
7
  export * from './lifecycles';
9
8
  export * from './query';
10
9
  export * from './queryAll';
11
- export * from './classList';
12
- export * from './style';
10
+ export * from './applyClass';
11
+ export * from './applyStyle';
12
+ export * from './applyAttribute';
13
13
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/decorators/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/decorators/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"lifecycles.d.ts","sourceRoot":"","sources":["../../../src/decorators/lifecycles.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,2BAA2B,eAAgD,CAAC;AACzF,eAAO,MAAM,gCAAgC,eAAqD,CAAC;AACnG,eAAO,MAAM,+BAA+B,eAAoD,CAA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E/F;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,gBAAgB,GAAG,eAAe,CAAC;AACjF,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,EAAE,UAAU,EAAE,kBAAkB,GAAG,IAAI,CAAC;AAqBzH;;GAEG;AACH,eAAO,MAAM,wBAAwB,GAAI,CAAC,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,EAAE,QAAQ,GAAG,EAAE,aAAa,MAAM,KAAG,CAAC,GAAG,SAGxG,CAAC;AAEF,eAAO,MAAM,+BAA+B,GAAI,QAAQ,GAAG,KAAG,iBAAiB,EAAE,GAAG,SAGnF,CAAC"}
@@ -9,9 +9,73 @@ export declare function query(target: SpecialSelector): PropertyDecorator;
9
9
  export declare function query(selector: string, options?: SwcQueryOptions): PropertyDecorator;
10
10
  export declare const getQueryMetadata: (target: any) => QueryMetadata[] | undefined;
11
11
  /**
12
- * @hostQuery decorator - simplified version of @query for :host selector
13
- * Usage: @hostQuery()
14
- * Usage: @hostQuery({ root: 'shadow' })
12
+ * @queryHost decorator - simplified version of @query for :host selector
13
+ * Usage: @queryHost testzzs: HTMLElement | undefined;
14
+ * Usage: @queryHost() testzzs: HTMLElement | undefined;
15
+ * Usage: @queryHost({ root: 'shadow' }) testzzs: HTMLElement | undefined;
15
16
  */
16
- export declare function queryHost(options?: SwcQueryOptions): PropertyDecorator;
17
+ export declare function queryHost(target: Object, propertyKey: string | symbol): void;
18
+ export declare function queryHost(): PropertyDecorator;
19
+ export declare function queryHost(options: SwcQueryOptions): PropertyDecorator;
20
+ /**
21
+ * @host - Alias for @queryHost decorator
22
+ * Usage: @host element: HTMLElement | undefined;
23
+ * Usage: @host() element: HTMLElement | undefined;
24
+ * Usage: @host({ root: 'shadow' }) element: HTMLElement | undefined;
25
+ */
26
+ export declare const host: typeof queryHost;
27
+ /**
28
+ * @parentHost - Query :parentHost (Direct parent SWC component)
29
+ * Usage: @parentHost parent: HTMLElement | undefined;
30
+ * Usage: @parentHost() parent: HTMLElement | undefined;
31
+ * Usage: @parentHost({ root: 'shadow' }) parent: HTMLElement | undefined;
32
+ */
33
+ export declare function parentHost(target: Object, propertyKey: string | symbol): void;
34
+ export declare function parentHost(): PropertyDecorator;
35
+ export declare function parentHost(options: SwcQueryOptions): PropertyDecorator;
36
+ /**
37
+ * @appHost - Query :appHost (Nearest <swc-app>)
38
+ * Usage: @appHost app: SwcAppInterface | undefined;
39
+ * Usage: @appHost() app: SwcAppInterface | undefined;
40
+ * Usage: @appHost({ root: 'shadow' }) app: SwcAppInterface | undefined;
41
+ */
42
+ export declare function appHost(target: Object, propertyKey: string | symbol): void;
43
+ export declare function appHost(): PropertyDecorator;
44
+ export declare function appHost(options: SwcQueryOptions): PropertyDecorator;
45
+ /**
46
+ * @firstHost - Query :firstHost (First component in hierarchy)
47
+ * Usage: @firstHost first: HTMLElement | undefined;
48
+ * Usage: @firstHost() first: HTMLElement | undefined;
49
+ * Usage: @firstHost({ root: 'shadow' }) first: HTMLElement | undefined;
50
+ */
51
+ export declare function firstHost(target: Object, propertyKey: string | symbol): void;
52
+ export declare function firstHost(): PropertyDecorator;
53
+ export declare function firstHost(options: SwcQueryOptions): PropertyDecorator;
54
+ /**
55
+ * @lastHost - Query :lastHost (Last component in hierarchy)
56
+ * Usage: @lastHost last: HTMLElement | undefined;
57
+ * Usage: @lastHost() last: HTMLElement | undefined;
58
+ * Usage: @lastHost({ root: 'shadow' }) last: HTMLElement | undefined;
59
+ */
60
+ export declare function lastHost(target: Object, propertyKey: string | symbol): void;
61
+ export declare function lastHost(): PropertyDecorator;
62
+ export declare function lastHost(options: SwcQueryOptions): PropertyDecorator;
63
+ /**
64
+ * @firstAppHost - Query :firstAppHost (First <swc-app> in hierarchy)
65
+ * Usage: @firstAppHost app: SwcAppInterface | undefined;
66
+ * Usage: @firstAppHost() app: SwcAppInterface | undefined;
67
+ * Usage: @firstAppHost({ root: 'shadow' }) app: SwcAppInterface | undefined;
68
+ */
69
+ export declare function firstAppHost(target: Object, propertyKey: string | symbol): void;
70
+ export declare function firstAppHost(): PropertyDecorator;
71
+ export declare function firstAppHost(options: SwcQueryOptions): PropertyDecorator;
72
+ /**
73
+ * @lastAppHost - Query :lastAppHost (Last <swc-app> in hierarchy)
74
+ * Usage: @lastAppHost app: SwcAppInterface | undefined;
75
+ * Usage: @lastAppHost() app: SwcAppInterface | undefined;
76
+ * Usage: @lastAppHost({ root: 'shadow' }) app: SwcAppInterface | undefined;
77
+ */
78
+ export declare function lastAppHost(target: Object, propertyKey: string | symbol): void;
79
+ export declare function lastAppHost(): PropertyDecorator;
80
+ export declare function lastAppHost(options: SwcQueryOptions): PropertyDecorator;
17
81
  //# sourceMappingURL=query.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../../src/decorators/query.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE5D,MAAM,WAAW,aAAa;IAC5B,WAAW,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,eAAe,CAAC;CAC1B;AAED,eAAO,MAAM,kBAAkB,eAAuC,CAAC;AAEvE,wBAAgB,KAAK,CAAC,MAAM,EAAE,eAAe,GAAG,iBAAiB,CAAC;AAClE,wBAAgB,KAAK,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,eAAe,GAAG,iBAAiB,CAAC;AA0FtF,eAAO,MAAM,gBAAgB,GAAI,QAAQ,GAAG,KAAG,aAAa,EAAE,GAAG,SAGhE,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,OAAO,CAAC,EAAE,eAAe,GAAG,iBAAiB,CAEtE"}
1
+ {"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../../src/decorators/query.ts"],"names":[],"mappings":"AAGA,OAA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S,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;AAC9E,wBAAgB,SAAS,IAAI,iBAAiB,CAAC;AAC/C,wBAAgB,SAAS,CAAC,OAAO,EAAE,eAAe,GAAG,iBAAiB,CAAC;AAYvE;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;AAC7E,wBAAgB,QAAQ,IAAI,iBAAiB,CAAC;AAC9C,wBAAgB,QAAQ,CAAC,OAAO,EAAE,eAAe,GAAG,iBAAiB,CAAC;AAYtE;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;AACjF,wBAAgB,YAAY,IAAI,iBAAiB,CAAC;AAClD,wBAAgB,YAAY,CAAC,OAAO,EAAE,eAAe,GAAG,iBAAiB,CAAC;AAY1E;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;AAChF,wBAAgB,WAAW,IAAI,iBAAiB,CAAC;AACjD,wBAAgB,WAAW,CAAC,OAAO,EAAE,eAAe,GAAG,iBAAiB,CAAC"}
@@ -13,5 +13,74 @@ export declare const getQueryAllMetadata: (target: any) => QueryAllMetadata[] |
13
13
  * Usage: @hostQueryAll()
14
14
  * Usage: @hostQueryAll({ root: 'shadow' })
15
15
  */
16
- export declare function queryAllHost(options?: SwcQueryOptions): PropertyDecorator;
16
+ /**
17
+ * @queryAllHost decorator - simplified version of @queryAll for :host selector
18
+ * Usage: @queryAllHost items: HTMLElement[];
19
+ * Usage: @queryAllHost() items: HTMLElement[];
20
+ * Usage: @queryAllHost({ root: 'shadow' }) items: HTMLElement[];
21
+ */
22
+ export declare function queryAllHost(target: Object, propertyKey: string | symbol): void;
23
+ export declare function queryAllHost(): PropertyDecorator;
24
+ export declare function queryAllHost(options: SwcQueryOptions): PropertyDecorator;
25
+ /**
26
+ * @allHost - Alias for @queryAllHost decorator
27
+ * Usage: @allHost items: HTMLElement[];
28
+ * Usage: @allHost() items: HTMLElement[];
29
+ * Usage: @allHost({ root: 'shadow' }) items: HTMLElement[];
30
+ */
31
+ export declare const allHost: typeof queryAllHost;
32
+ /**
33
+ * @allParentHost - Query all :parentHost (All parent SWC components)
34
+ * Usage: @allParentHost parents: HTMLElement[];
35
+ * Usage: @allParentHost() parents: HTMLElement[];
36
+ * Usage: @allParentHost({ root: 'shadow' }) parents: HTMLElement[];
37
+ */
38
+ export declare function allParentHost(target: Object, propertyKey: string | symbol): void;
39
+ export declare function allParentHost(): PropertyDecorator;
40
+ export declare function allParentHost(options: SwcQueryOptions): PropertyDecorator;
41
+ /**
42
+ * @allAppHost - Query all :appHost (All <swc-app> instances)
43
+ * Usage: @allAppHost apps: SwcAppInterface[];
44
+ * Usage: @allAppHost() apps: SwcAppInterface[];
45
+ * Usage: @allAppHost({ root: 'shadow' }) apps: SwcAppInterface[];
46
+ */
47
+ export declare function allAppHost(target: Object, propertyKey: string | symbol): void;
48
+ export declare function allAppHost(): PropertyDecorator;
49
+ export declare function allAppHost(options: SwcQueryOptions): PropertyDecorator;
50
+ /**
51
+ * @allFirstHost - Query all :firstHost (All first components in hierarchy)
52
+ * Usage: @allFirstHost firsts: HTMLElement[];
53
+ * Usage: @allFirstHost() firsts: HTMLElement[];
54
+ * Usage: @allFirstHost({ root: 'shadow' }) firsts: HTMLElement[];
55
+ */
56
+ export declare function allFirstHost(target: Object, propertyKey: string | symbol): void;
57
+ export declare function allFirstHost(): PropertyDecorator;
58
+ export declare function allFirstHost(options: SwcQueryOptions): PropertyDecorator;
59
+ /**
60
+ * @allLastHost - Query all :lastHost (All last components in hierarchy)
61
+ * Usage: @allLastHost lasts: HTMLElement[];
62
+ * Usage: @allLastHost() lasts: HTMLElement[];
63
+ * Usage: @allLastHost({ root: 'shadow' }) lasts: HTMLElement[];
64
+ */
65
+ export declare function allLastHost(target: Object, propertyKey: string | symbol): void;
66
+ export declare function allLastHost(): PropertyDecorator;
67
+ export declare function allLastHost(options: SwcQueryOptions): PropertyDecorator;
68
+ /**
69
+ * @allFirstAppHost - Query all :firstAppHost (All first <swc-app> in hierarchy)
70
+ * Usage: @allFirstAppHost apps: SwcAppInterface[];
71
+ * Usage: @allFirstAppHost() apps: SwcAppInterface[];
72
+ * Usage: @allFirstAppHost({ root: 'shadow' }) apps: SwcAppInterface[];
73
+ */
74
+ export declare function allFirstAppHost(target: Object, propertyKey: string | symbol): void;
75
+ export declare function allFirstAppHost(): PropertyDecorator;
76
+ export declare function allFirstAppHost(options: SwcQueryOptions): PropertyDecorator;
77
+ /**
78
+ * @allLastAppHost - Query all :lastAppHost (All last <swc-app> in hierarchy)
79
+ * Usage: @allLastAppHost apps: SwcAppInterface[];
80
+ * Usage: @allLastAppHost() apps: SwcAppInterface[];
81
+ * Usage: @allLastAppHost({ root: 'shadow' }) apps: SwcAppInterface[];
82
+ */
83
+ export declare function allLastAppHost(target: Object, propertyKey: string | symbol): void;
84
+ export declare function allLastAppHost(): PropertyDecorator;
85
+ export declare function allLastAppHost(options: SwcQueryOptions): PropertyDecorator;
17
86
  //# sourceMappingURL=queryAll.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"queryAll.d.ts","sourceRoot":"","sources":["../../../src/decorators/queryAll.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE5D,MAAM,WAAW,gBAAgB;IAC/B,WAAW,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,eAAe,CAAC;CAC1B;AAED,eAAO,MAAM,sBAAsB,eAA2C,CAAC;AAE/E,wBAAgB,QAAQ,CAAC,MAAM,EAAE,eAAe,GAAG,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BAAiB,CAAC"}
@@ -1,12 +1,17 @@
1
1
  import { SimpleApplication } from '@dooboostore/simple-boot/SimpleApplication';
2
2
  import { Router } from '@dooboostore/core-web';
3
3
  import { ConstructorType, OptionalType } from '@dooboostore/core';
4
+ import { SwcAppInterface } from '../types';
4
5
  export type SwcConfigType = {
5
6
  rootRouter: ConstructorType<any> | symbol;
6
7
  routeType: 'path' | 'hash' | 'element';
7
8
  connectMode?: 'direct' | 'swap';
9
+ container?: symbol;
8
10
  path?: string;
9
11
  window: Window;
12
+ onStarted?: (app: SwcAppInterface) => void;
13
+ onConnected?: (app: SwcAppInterface) => void;
14
+ onDisconnected?: (app: SwcAppInterface) => void;
10
15
  };
11
16
  export type SwcAttributeConfigType = OptionalType<SwcConfigType, 'routeType' | 'window'>;
12
17
  export declare class SwcAppEngine {
@@ -15,7 +20,9 @@ export declare class SwcAppEngine {
15
20
  router?: Router;
16
21
  private routerSubscription?;
17
22
  private _isInitialized;
23
+ private _config?;
18
24
  constructor(host: HTMLElement);
25
+ get config(): SwcConfigType;
19
26
  connect(config?: SwcAttributeConfigType): Promise<void>;
20
27
  disconnect(): void;
21
28
  }
@@ -1 +1 @@
1
- {"version":3,"file":"SwcAppEngine.d.ts","sourceRoot":"","sources":["../../../src/elements/SwcAppEngine.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4CAA4C,CAAC;AAK/E,OAAO,EAAE,MAAM,EAAmB,MAAM,uBAAuB,CAAC;AAEhE,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAIlE,MAAM,MAAM,aAAa,GAAG;IAC1B,UAAU,EAAE,eAAe,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC;IAC1C,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IACvC,WAAW,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC;IAChC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,EAAE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