@dooboostore/simple-web-component 1.0.49 → 1.0.50

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 (145) hide show
  1. package/README.md +72 -0
  2. package/dist/cjs/decorators/addEventListener.js +1994 -9
  3. package/dist/cjs/decorators/addEventListener.js.map +2 -2
  4. package/dist/cjs/decorators/applyAttribute.js +10 -4
  5. package/dist/cjs/decorators/applyAttribute.js.map +2 -2
  6. package/dist/cjs/decorators/applyClass.js +10 -4
  7. package/dist/cjs/decorators/applyClass.js.map +2 -2
  8. package/dist/cjs/decorators/applyNode.js +10 -4
  9. package/dist/cjs/decorators/applyNode.js.map +2 -2
  10. package/dist/cjs/decorators/applyProperty.js +14 -8
  11. package/dist/cjs/decorators/applyProperty.js.map +2 -2
  12. package/dist/cjs/decorators/applySlot.js +6 -5
  13. package/dist/cjs/decorators/applySlot.js.map +2 -2
  14. package/dist/cjs/decorators/applyStyle.js +10 -4
  15. package/dist/cjs/decorators/applyStyle.js.map +2 -2
  16. package/dist/cjs/decorators/changedAttribute.js +22 -13
  17. package/dist/cjs/decorators/changedAttribute.js.map +2 -2
  18. package/dist/cjs/decorators/elementDefine.js +18 -3
  19. package/dist/cjs/decorators/elementDefine.js.map +2 -2
  20. package/dist/cjs/decorators/eventMedia.js +84 -0
  21. package/dist/cjs/decorators/eventMedia.js.map +7 -0
  22. package/dist/cjs/decorators/index.js +3 -0
  23. package/dist/cjs/decorators/index.js.map +2 -2
  24. package/dist/cjs/decorators/intersectionObserver.js +46 -55
  25. package/dist/cjs/decorators/intersectionObserver.js.map +2 -2
  26. package/dist/cjs/decorators/mutationObserver.js +46 -55
  27. package/dist/cjs/decorators/mutationObserver.js.map +2 -2
  28. package/dist/cjs/decorators/parameter.js +73 -0
  29. package/dist/cjs/decorators/parameter.js.map +7 -0
  30. package/dist/cjs/decorators/requestAnimationFrame.js +124 -0
  31. package/dist/cjs/decorators/requestAnimationFrame.js.map +7 -0
  32. package/dist/cjs/decorators/resizeObserver.js +46 -55
  33. package/dist/cjs/decorators/resizeObserver.js.map +2 -2
  34. package/dist/cjs/decorators/setInterval.js +46 -14
  35. package/dist/cjs/decorators/setInterval.js.map +2 -2
  36. package/dist/cjs/decorators/setTimeout.js +49 -14
  37. package/dist/cjs/decorators/setTimeout.js.map +2 -2
  38. package/dist/cjs/elements/SwcAppMixin.js +19 -3
  39. package/dist/cjs/elements/SwcAppMixin.js.map +2 -2
  40. package/dist/cjs/types/window.d.js.map +1 -1
  41. package/dist/esm/decorators/addEventListener.js +1994 -9
  42. package/dist/esm/decorators/addEventListener.js.map +2 -2
  43. package/dist/esm/decorators/applyAttribute.js +10 -4
  44. package/dist/esm/decorators/applyAttribute.js.map +2 -2
  45. package/dist/esm/decorators/applyClass.js +10 -4
  46. package/dist/esm/decorators/applyClass.js.map +2 -2
  47. package/dist/esm/decorators/applyNode.js +10 -4
  48. package/dist/esm/decorators/applyNode.js.map +2 -2
  49. package/dist/esm/decorators/applyProperty.js +14 -8
  50. package/dist/esm/decorators/applyProperty.js.map +2 -2
  51. package/dist/esm/decorators/applySlot.js +6 -5
  52. package/dist/esm/decorators/applySlot.js.map +2 -2
  53. package/dist/esm/decorators/applyStyle.js +10 -4
  54. package/dist/esm/decorators/applyStyle.js.map +2 -2
  55. package/dist/esm/decorators/changedAttribute.js +22 -13
  56. package/dist/esm/decorators/changedAttribute.js.map +2 -2
  57. package/dist/esm/decorators/elementDefine.js +18 -3
  58. package/dist/esm/decorators/elementDefine.js.map +2 -2
  59. package/dist/esm/decorators/eventMedia.js +66 -0
  60. package/dist/esm/decorators/eventMedia.js.map +7 -0
  61. package/dist/esm/decorators/index.js +3 -0
  62. package/dist/esm/decorators/index.js.map +2 -2
  63. package/dist/esm/decorators/intersectionObserver.js +46 -55
  64. package/dist/esm/decorators/intersectionObserver.js.map +2 -2
  65. package/dist/esm/decorators/mutationObserver.js +46 -55
  66. package/dist/esm/decorators/mutationObserver.js.map +2 -2
  67. package/dist/esm/decorators/parameter.js +54 -0
  68. package/dist/esm/decorators/parameter.js.map +7 -0
  69. package/dist/esm/decorators/requestAnimationFrame.js +105 -0
  70. package/dist/esm/decorators/requestAnimationFrame.js.map +7 -0
  71. package/dist/esm/decorators/resizeObserver.js +46 -55
  72. package/dist/esm/decorators/resizeObserver.js.map +2 -2
  73. package/dist/esm/decorators/setInterval.js +46 -15
  74. package/dist/esm/decorators/setInterval.js.map +2 -2
  75. package/dist/esm/decorators/setTimeout.js +49 -15
  76. package/dist/esm/decorators/setTimeout.js.map +2 -2
  77. package/dist/esm/elements/SwcAppMixin.js +20 -4
  78. package/dist/esm/elements/SwcAppMixin.js.map +2 -2
  79. package/dist/esm-bundle/dooboostore-simple-web-component.esm.js +2813 -571
  80. package/dist/esm-bundle/dooboostore-simple-web-component.esm.js.map +4 -4
  81. package/dist/types/decorators/addEventListener.d.ts +962 -0
  82. package/dist/types/decorators/addEventListener.d.ts.map +1 -1
  83. package/dist/types/decorators/applyAttribute.d.ts +2 -0
  84. package/dist/types/decorators/applyAttribute.d.ts.map +1 -1
  85. package/dist/types/decorators/applyClass.d.ts +2 -0
  86. package/dist/types/decorators/applyClass.d.ts.map +1 -1
  87. package/dist/types/decorators/applyNode.d.ts +2 -0
  88. package/dist/types/decorators/applyNode.d.ts.map +1 -1
  89. package/dist/types/decorators/applyProperty.d.ts +4 -0
  90. package/dist/types/decorators/applyProperty.d.ts.map +1 -1
  91. package/dist/types/decorators/applySlot.d.ts.map +1 -1
  92. package/dist/types/decorators/applyStyle.d.ts +2 -0
  93. package/dist/types/decorators/applyStyle.d.ts.map +1 -1
  94. package/dist/types/decorators/changedAttribute.d.ts +1 -3
  95. package/dist/types/decorators/changedAttribute.d.ts.map +1 -1
  96. package/dist/types/decorators/elementDefine.d.ts.map +1 -1
  97. package/dist/types/decorators/eventMedia.d.ts +25 -0
  98. package/dist/types/decorators/eventMedia.d.ts.map +1 -0
  99. package/dist/types/decorators/index.d.ts +3 -0
  100. package/dist/types/decorators/index.d.ts.map +1 -1
  101. package/dist/types/decorators/intersectionObserver.d.ts +9 -0
  102. package/dist/types/decorators/intersectionObserver.d.ts.map +1 -1
  103. package/dist/types/decorators/mutationObserver.d.ts +10 -1
  104. package/dist/types/decorators/mutationObserver.d.ts.map +1 -1
  105. package/dist/types/decorators/parameter.d.ts +35 -0
  106. package/dist/types/decorators/parameter.d.ts.map +1 -0
  107. package/dist/types/decorators/requestAnimationFrame.d.ts +47 -0
  108. package/dist/types/decorators/requestAnimationFrame.d.ts.map +1 -0
  109. package/dist/types/decorators/resizeObserver.d.ts +9 -0
  110. package/dist/types/decorators/resizeObserver.d.ts.map +1 -1
  111. package/dist/types/decorators/setInterval.d.ts +17 -5
  112. package/dist/types/decorators/setInterval.d.ts.map +1 -1
  113. package/dist/types/decorators/setTimeout.d.ts +17 -5
  114. package/dist/types/decorators/setTimeout.d.ts.map +1 -1
  115. package/dist/types/elements/SwcAppMixin.d.ts.map +1 -1
  116. package/dist/umd-bundle/dooboostore-simple-web-component.umd.js +2813 -571
  117. package/dist/umd-bundle/dooboostore-simple-web-component.umd.js.map +4 -4
  118. package/package.json +3 -3
  119. package/src/decorators/addEventListener.ts +1060 -8
  120. package/src/decorators/applyAttribute.ts +14 -4
  121. package/src/decorators/applyClass.ts +14 -4
  122. package/src/decorators/applyNode.ts +14 -4
  123. package/src/decorators/applyProperty.ts +28 -8
  124. package/src/decorators/applySlot.ts +6 -5
  125. package/src/decorators/applyStyle.ts +14 -4
  126. package/src/decorators/changedAttribute.ts +30 -15
  127. package/src/decorators/elementDefine.ts +32 -5
  128. package/src/decorators/eventMedia.ts +78 -0
  129. package/src/decorators/index.ts +3 -0
  130. package/src/decorators/intersectionObserver.ts +77 -61
  131. package/src/decorators/mutationObserver.ts +78 -61
  132. package/src/decorators/parameter.ts +81 -0
  133. package/src/decorators/requestAnimationFrame.ts +158 -0
  134. package/src/decorators/resizeObserver.ts +76 -60
  135. package/src/decorators/setInterval.ts +71 -15
  136. package/src/decorators/setTimeout.ts +74 -15
  137. package/src/elements/SwcAppMixin.ts +20 -5
  138. package/src/types/window.d.ts +2 -18
  139. package/dist/cjs/examples/RxJSOperatorsExample.js +0 -285
  140. package/dist/cjs/examples/RxJSOperatorsExample.js.map +0 -7
  141. package/dist/esm/examples/RxJSOperatorsExample.js +0 -266
  142. package/dist/esm/examples/RxJSOperatorsExample.js.map +0 -7
  143. package/dist/types/examples/RxJSOperatorsExample.d.ts +0 -94
  144. package/dist/types/examples/RxJSOperatorsExample.d.ts.map +0 -1
  145. package/src/examples/RxJSOperatorsExample.ts +0 -279
@@ -205,11 +205,17 @@ function removeStyle(selectorOrTarget, optionsOrPropertyKey, descriptor) {
205
205
  return createStyleDecorator("remove")("$this", selectorOrTarget);
206
206
  }
207
207
  const style = applyStyle;
208
- function styleThis(action, options) {
209
- return applyStyle("$this", action, options);
208
+ function styleThis(actionOrTarget, optionsOrPropertyKey, descriptor) {
209
+ if ((typeof optionsOrPropertyKey === "string" || typeof optionsOrPropertyKey === "symbol") && descriptor !== void 0) {
210
+ return applyStyle("$this", void 0, {})(actionOrTarget, optionsOrPropertyKey, descriptor);
211
+ }
212
+ return applyStyle("$this", actionOrTarget, optionsOrPropertyKey);
210
213
  }
211
- function styleAppHost(action, options) {
212
- return applyStyle("$appHost", action, options);
214
+ function styleAppHost(actionOrTarget, optionsOrPropertyKey, descriptor) {
215
+ if ((typeof optionsOrPropertyKey === "string" || typeof optionsOrPropertyKey === "symbol") && descriptor !== void 0) {
216
+ return applyStyle("$appHost", void 0, {})(actionOrTarget, optionsOrPropertyKey, descriptor);
217
+ }
218
+ return applyStyle("$appHost", actionOrTarget, optionsOrPropertyKey);
213
219
  }
214
220
  function styleLight(selector, actionOrOptions, options) {
215
221
  const action = typeof actionOrOptions === "string" ? actionOrOptions : void 0;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/decorators/applyStyle.ts"],
4
- "sourcesContent": ["import {ReflectUtils} from '@dooboostore/core';\nimport {ensureInit} from './elementDefine';\nimport {SwcUtils} from '../utils/Utils';\nimport { SpecialSelector, SwcQueryOptions, SwcFnSelector, SwcSelector, HelperHostSet } from '../types';\n\nexport type StyleAction = 'set' | 'update' | 'remove';\n\n// \uACF5\uD1B5 \uC635\uC158 \u2014 root \uC5C6\uC74C\nexport interface StyleBaseOptions {\n filter?: (target: HTMLElement, value: any, meta: {currentThis: any, helper: HelperHostSet}) => boolean;\n valueKey?: symbol | string;\n}\n\n// \uBB38\uC790\uC5F4 \uC140\uB809\uD130 \uC804\uC6A9 \u2014 root \uD5C8\uC6A9\nexport type StyleQueryOptions = StyleBaseOptions & SwcQueryOptions;\n// \uD568\uC218 \uC140\uB809\uD130 \uC804\uC6A9 \u2014 root \uAE08\uC9C0\nexport type StyleNonQueryOptions = StyleBaseOptions;\n// \uB0B4\uBD80 \uC800\uC7A5/\uD574\uC11D\uC6A9\nexport type StyleApplyOptions = StyleQueryOptions;\n\nexport type StyleFnSelector = SwcFnSelector;\nexport type StyleSelector = SwcSelector;\n\n// \uC140\uB809\uD130 \uC885\uB958\uC5D0 \uB530\uB77C \uC635\uC158 \uD0C0\uC785 \uBD84\uAE30\nexport type StyleOptionsOf<S extends StyleSelector> = S extends string ? StyleQueryOptions : StyleNonQueryOptions;\n\nexport interface StyleApplyMetadata {\n propertyKey: string | symbol;\n selector: StyleSelector;\n action: StyleAction;\n options: StyleApplyOptions;\n}\n\nexport const STYLE_METADATA_KEY = Symbol.for('simple-web-component:style');\n\n/**\n * Resolve selector to string or elements\n * Handles function-based selectors and returns elements if applicable\n */\nconst resolveSelector = (selector: StyleSelector, inst: any, win: Window): string | HTMLElement[] => {\n if (typeof selector === 'function') {\n const hostSet = SwcUtils.getHelperAndHostSet(win, inst);\n const result = selector(inst, hostSet);\n \n if (result instanceof win.Element) {\n return [result as HTMLElement];\n }\n if (result instanceof win.NodeList) {\n return Array.from(result) as HTMLElement[];\n }\n if (Array.isArray(result)) {\n return result as HTMLElement[];\n }\n if (result === null) {\n return [];\n }\n if (result instanceof win.Node) {\n return [];\n }\n return result as string;\n }\n return selector as string;\n};\n\n/**\n * Get target elements from selector\n */\nconst getTargetElements = (selector: StyleSelector, inst: any, win: Window, root: string): HTMLElement[] => {\n const resolved = resolveSelector(selector, inst, win);\n \n if (Array.isArray(resolved)) {\n return resolved;\n }\n\n const stringSelector = resolved as string;\n const targetEls: HTMLElement[] = [];\n const host = inst as unknown as HTMLElement;\n const hostSet = SwcUtils.getHelperAndHostSet(win, inst);\n\n const applyRoot = (t: any) => {\n if (!t || !(t instanceof win.HTMLElement)) return;\n targetEls.push(t);\n };\n\n if (stringSelector === '$this' || !stringSelector) applyRoot(host);\n else if (stringSelector === '$host') applyRoot(hostSet.$host);\n else if (stringSelector === '$parentHost') applyRoot(hostSet.$parentHost);\n else if (stringSelector === '$appHost') applyRoot(hostSet.$appHost);\n else if (stringSelector === '$firstHost') applyRoot(hostSet.$firstHost);\n else if (stringSelector === '$lastHost') applyRoot(hostSet.$lastHost);\n else if (stringSelector === '$firstAppHost') applyRoot(hostSet.$firstAppHost);\n else if (stringSelector === '$lastAppHost') applyRoot(hostSet.$lastAppHost);\n else if (stringSelector === '$hosts') hostSet.$hosts.forEach(applyRoot);\n else if (stringSelector === '$appHosts') hostSet.$appHosts.forEach(applyRoot);\n else {\n const targetRoot = root === 'auto' ? (host.shadowRoot || host) : (root === 'shadow' ? host.shadowRoot : host);\n if (targetRoot) {\n const found = targetRoot.querySelectorAll(stringSelector);\n if (found) targetEls.push(...(Array.from(found) as HTMLElement[]));\n }\n }\n\n return targetEls;\n};\n\nfunction createStyleDecorator(action: StyleAction) {\n return (selector: StyleSelector, options: StyleApplyOptions = {}): MethodDecorator => {\n return (target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor) => {\n const constructor = target.constructor;\n let metaList = ReflectUtils.getOwnMetadata(STYLE_METADATA_KEY, constructor) as Map<string | symbol, StyleApplyMetadata>;\n if (!metaList) {\n metaList = new Map<string | symbol, StyleApplyMetadata>();\n ReflectUtils.defineMetadata(STYLE_METADATA_KEY, metaList, constructor);\n }\n metaList.set(propertyKey, { propertyKey, selector, action, options });\n\n const original = descriptor.value;\n descriptor.value = function (...args: any[]) {\n ensureInit(this);\n const res = (original as any).apply(this, args);\n\n /**\n * Extract value for this decorator from method return value\n * \n * If return value is an object with this decorator's key,\n * use that value. Otherwise use the entire return value.\n * \n * Uses valueKey from options if provided, otherwise uses STYLE_METADATA_KEY.\n */\n const extractValue = (v: any) => {\n const keyToUse = options.valueKey ?? STYLE_METADATA_KEY;\n if (v && typeof v === 'object' && keyToUse in v) {\n return v[keyToUse];\n }\n return v;\n };\n\n const handleResult = (resolvedValue: any) => {\n if (resolvedValue !== undefined) {\n const win = (this as any).ownerDocument?.defaultView || window;\n const host = this as unknown as HTMLElement;\n const hostSet = { ...SwcUtils.getHelperAndHostSet(win, host), $this: this };\n const r = options.root || 'auto';\n const targetEls = getTargetElements(selector, this, win, r);\n\n targetEls.forEach(targetEl => {\n if (options.filter && !options.filter(targetEl, resolvedValue, {currentThis: this, helper: hostSet})) {\n return;\n }\n const resolvedRes = typeof resolvedValue === 'function' ? (resolvedValue as any)(targetEl, hostSet) : resolvedValue;\n\n if (action === 'set' || action === 'update') {\n if (action === 'set') targetEl.style.cssText = '';\n \n if (typeof resolvedRes === 'object' && resolvedRes !== null && !Array.isArray(resolvedRes)) {\n Object.entries(resolvedRes as any).forEach(([prop, val]) => {\n const finalVal = typeof val === 'function' ? val(targetEl, hostSet) : val;\n if (finalVal === null || finalVal === undefined) {\n targetEl.style.removeProperty(prop);\n } else {\n targetEl.style[prop as any] = String(finalVal);\n }\n });\n } else if (typeof resolvedRes === 'string') {\n targetEl.style.cssText = resolvedRes;\n }\n } else if (action === 'remove') {\n if (typeof resolvedRes === 'object' && resolvedRes !== null && !Array.isArray(resolvedRes)) {\n Object.entries(resolvedRes as any).forEach(([prop, val]) => {\n const shouldRemove = typeof val === 'function' ? val(targetEl, hostSet) : !!val;\n if (shouldRemove) {\n targetEl.style.removeProperty(prop);\n }\n });\n } else {\n const props = Array.isArray(resolvedRes) ? resolvedRes : [resolvedRes];\n props.forEach(p => targetEl.style.removeProperty(String(p)));\n }\n }\n });\n }\n return resolvedValue;\n };\n\n if (res instanceof Promise) {\n return res.then((v: any) => handleResult(extractValue(v)));\n } else {\n return handleResult(extractValue(res));\n }\n };\n return descriptor;\n };\n };\n}\n\nexport function applyStyle(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;\nexport function applyStyle(selector: string, action?: StyleAction, options?: StyleQueryOptions): MethodDecorator;\nexport function applyStyle(selector: StyleFnSelector, action?: StyleAction, options?: StyleNonQueryOptions): MethodDecorator;\nexport function applyStyle(selectorOrTarget?: any, actionOrPropertyKey?: any, optionsOrDescriptor?: any): any {\n // Bare decorator: @applyStyle\n if (optionsOrDescriptor !== undefined && typeof selectorOrTarget !== 'string' && typeof selectorOrTarget !== 'function' && (typeof actionOrPropertyKey === 'string' || typeof actionOrPropertyKey === 'symbol')) {\n return createStyleDecorator('update')('$this', {})(selectorOrTarget as Object, actionOrPropertyKey, optionsOrDescriptor as PropertyDescriptor);\n }\n // With selector\n if (typeof selectorOrTarget === 'string' || typeof selectorOrTarget === 'function') {\n const action = (typeof actionOrPropertyKey === 'string' ? actionOrPropertyKey : 'update') as StyleAction;\n const options = (typeof actionOrPropertyKey === 'object' ? actionOrPropertyKey : optionsOrDescriptor) as StyleApplyOptions | undefined;\n return createStyleDecorator(action)(selectorOrTarget, options);\n }\n // Without selector (defaults to $this)\n const action = (typeof selectorOrTarget === 'string' ? selectorOrTarget : 'update') as StyleAction;\n const options = (typeof selectorOrTarget === 'object' ? selectorOrTarget : actionOrPropertyKey) as StyleApplyOptions | undefined;\n return createStyleDecorator(action)('$this', options);\n}\n\nexport function setStyle(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;\nexport function setStyle(selector: string, options?: StyleQueryOptions): MethodDecorator;\nexport function setStyle(selector: StyleFnSelector, options?: StyleNonQueryOptions): MethodDecorator;\nexport function setStyle(selectorOrTarget?: any, optionsOrPropertyKey?: any, descriptor?: any): any {\n // Bare decorator: @setStyle\n if (descriptor !== undefined && (typeof optionsOrPropertyKey === 'string' || typeof optionsOrPropertyKey === 'symbol')) {\n return createStyleDecorator('set')('$this', {})(selectorOrTarget as Object, optionsOrPropertyKey, descriptor as PropertyDescriptor);\n }\n // With selector\n if (typeof selectorOrTarget === 'string' || typeof selectorOrTarget === 'function') {\n return createStyleDecorator('set')(selectorOrTarget, optionsOrPropertyKey as StyleApplyOptions);\n }\n // Without selector (defaults to $this)\n return createStyleDecorator('set')('$this', selectorOrTarget as StyleApplyOptions);\n}\n\nexport function updateStyle(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;\nexport function updateStyle(selector: string, options?: StyleQueryOptions): MethodDecorator;\nexport function updateStyle(selector: StyleFnSelector, options?: StyleNonQueryOptions): MethodDecorator;\nexport function updateStyle(selectorOrTarget?: any, optionsOrPropertyKey?: any, descriptor?: any): any {\n // Bare decorator: @updateStyle\n if (descriptor !== undefined && (typeof optionsOrPropertyKey === 'string' || typeof optionsOrPropertyKey === 'symbol')) {\n return createStyleDecorator('update')('$this', {})(selectorOrTarget as Object, optionsOrPropertyKey, descriptor as PropertyDescriptor);\n }\n // With selector\n if (typeof selectorOrTarget === 'string' || typeof selectorOrTarget === 'function') {\n return createStyleDecorator('update')(selectorOrTarget, optionsOrPropertyKey as StyleApplyOptions);\n }\n // Without selector (defaults to $this)\n return createStyleDecorator('update')('$this', selectorOrTarget as StyleApplyOptions);\n}\n\nexport function removeStyle(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;\nexport function removeStyle(selector: string, options?: StyleQueryOptions): MethodDecorator;\nexport function removeStyle(selector: StyleFnSelector, options?: StyleNonQueryOptions): MethodDecorator;\nexport function removeStyle(selectorOrTarget?: any, optionsOrPropertyKey?: any, descriptor?: any): any {\n // Bare decorator: @removeStyle\n if (descriptor !== undefined && (typeof optionsOrPropertyKey === 'string' || typeof optionsOrPropertyKey === 'symbol')) {\n return createStyleDecorator('remove')('$this', {})(selectorOrTarget as Object, optionsOrPropertyKey, descriptor as PropertyDescriptor);\n }\n // With selector\n if (typeof selectorOrTarget === 'string' || typeof selectorOrTarget === 'function') {\n return createStyleDecorator('remove')(selectorOrTarget, optionsOrPropertyKey as StyleApplyOptions);\n }\n // Without selector (defaults to $this)\n return createStyleDecorator('remove')('$this', selectorOrTarget as StyleApplyOptions);\n}\n\n// \u2500\u2500\u2500 Aliases \u2500\u2500\u2500\nexport const style = applyStyle;\n\n// \u2500\u2500\u2500 \uD3B8\uC758 \uD5EC\uD37C (selector/root \uC0DD\uB7B5) \u2500\u2500\u2500\n\nexport function styleThis(action?: StyleAction, options?: StyleQueryOptions): MethodDecorator {\n return applyStyle('$this', action, options);\n}\nexport function styleAppHost(action?: StyleAction, options?: StyleQueryOptions): MethodDecorator {\n return applyStyle('$appHost', action, options);\n}\nexport function styleLight(selector: string, action?: StyleAction, options?: Omit<StyleQueryOptions, 'root'>): MethodDecorator;\nexport function styleLight(selector: string, options?: Omit<StyleQueryOptions, 'root'>): MethodDecorator;\nexport function styleLight(selector: string, actionOrOptions?: StyleAction | Omit<StyleQueryOptions, 'root'>, options?: Omit<StyleQueryOptions, 'root'>): MethodDecorator {\n const action = (typeof actionOrOptions === 'string' ? actionOrOptions : undefined) as StyleAction | undefined;\n const opts = (typeof actionOrOptions === 'object' ? actionOrOptions : options) as Omit<StyleQueryOptions, 'root'> | undefined;\n return applyStyle(selector, action, {...opts ?? {}, root: 'light'});\n}\nexport function styleShadow(selector: string, action?: StyleAction, options?: Omit<StyleQueryOptions, 'root'>): MethodDecorator;\nexport function styleShadow(selector: string, options?: Omit<StyleQueryOptions, 'root'>): MethodDecorator;\nexport function styleShadow(selector: string, actionOrOptions?: StyleAction | Omit<StyleQueryOptions, 'root'>, options?: Omit<StyleQueryOptions, 'root'>): MethodDecorator {\n const action = (typeof actionOrOptions === 'string' ? actionOrOptions : undefined) as StyleAction | undefined;\n const opts = (typeof actionOrOptions === 'object' ? actionOrOptions : options) as Omit<StyleQueryOptions, 'root'> | undefined;\n return applyStyle(selector, action, {...opts ?? {}, root: 'shadow'});\n}\nexport function styleAll(selector: string, action?: StyleAction, options?: Omit<StyleQueryOptions, 'root'>): MethodDecorator;\nexport function styleAll(selector: string, options?: Omit<StyleQueryOptions, 'root'>): MethodDecorator;\nexport function styleAll(selector: string, actionOrOptions?: StyleAction | Omit<StyleQueryOptions, 'root'>, options?: Omit<StyleQueryOptions, 'root'>): MethodDecorator {\n const action = (typeof actionOrOptions === 'string' ? actionOrOptions : undefined) as StyleAction | undefined;\n const opts = (typeof actionOrOptions === 'object' ? actionOrOptions : options) as Omit<StyleQueryOptions, 'root'> | undefined;\n return applyStyle(selector, action, {...opts ?? {}, root: 'all'});\n}\n\nexport const findAllStyleMetadata = (target: any): Map<string | symbol, StyleApplyMetadata> => {\n const result = new Map<string | symbol, StyleApplyMetadata>();\n const maps = ReflectUtils.findAllMetadata<Map<string | symbol, StyleApplyMetadata>>(STYLE_METADATA_KEY, target);\n maps.forEach(map => {\n if (map instanceof Map) {\n map.forEach((v, k) => result.set(k, v));\n }\n });\n return result;\n};\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAA2B;AAC3B,2BAAyB;AACzB,mBAAuB;AA+BhB,MAAM,qBAAqB,OAAO,IAAI,4BAA4B;AAMzE,MAAM,kBAAkB,CAAC,UAAyB,MAAW,QAAwC;AACnG,MAAI,OAAO,aAAa,YAAY;AAClC,UAAM,UAAU,sBAAS,oBAAoB,KAAK,IAAI;AACtD,UAAM,SAAS,SAAS,MAAM,OAAO;AAErC,QAAI,kBAAkB,IAAI,SAAS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WAAW,UAAU,QAAQ,EAAC,GAAG,QAAQ,CAAC,GAAG,MAAM,SAAQ,CAAC;AACrE;AAGO,SAAS,SAAS,UAAkB,iBAAiE,SAA4D;AACtK,QAAM,SAAU,OAAO,oBAAoB,WAAW,kBAAkB;AACxE,QAAM,OAAQ,OAAO,oBAAoB,WAAW,kBAAkB;AACtE,SAAO,WAAW,UAAU,QAAQ,EAAC,GAAG,QAAQ,CAAC,GAAG,MAAM,MAAK,CAAC;AAClE;AAEO,MAAM,uBAAuB,CAAC,WAA0D;AAC7F,QAAM,SAAS,oBAAI,IAAyC;AAC5D,QAAM,OAAO,yBAAa,gBAA0D,oBAAoB,MAAM;AAC9G,OAAK,QAAQ,SAAO;AAClB,QAAI,eAAe,KAAK;AACtB,UAAI,QAAQ,CAAC,GAAG,MAAM,OAAO,IAAI,GAAG,CAAC,CAAC;AAAA,IACxC;AAAA,EACF,CAAC;AACD,SAAO;AACT;",
4
+ "sourcesContent": ["import {ReflectUtils} from '@dooboostore/core';\nimport {ensureInit} from './elementDefine';\nimport {SwcUtils} from '../utils/Utils';\nimport { SpecialSelector, SwcQueryOptions, SwcFnSelector, SwcSelector, HelperHostSet } from '../types';\n\nexport type StyleAction = 'set' | 'update' | 'remove';\n\n// \uACF5\uD1B5 \uC635\uC158 \u2014 root \uC5C6\uC74C\nexport interface StyleBaseOptions {\n filter?: (target: HTMLElement, value: any, meta: {currentThis: any, helper: HelperHostSet}) => boolean;\n valueKey?: symbol | string;\n}\n\n// \uBB38\uC790\uC5F4 \uC140\uB809\uD130 \uC804\uC6A9 \u2014 root \uD5C8\uC6A9\nexport type StyleQueryOptions = StyleBaseOptions & SwcQueryOptions;\n// \uD568\uC218 \uC140\uB809\uD130 \uC804\uC6A9 \u2014 root \uAE08\uC9C0\nexport type StyleNonQueryOptions = StyleBaseOptions;\n// \uB0B4\uBD80 \uC800\uC7A5/\uD574\uC11D\uC6A9\nexport type StyleApplyOptions = StyleQueryOptions;\n\nexport type StyleFnSelector = SwcFnSelector;\nexport type StyleSelector = SwcSelector;\n\n// \uC140\uB809\uD130 \uC885\uB958\uC5D0 \uB530\uB77C \uC635\uC158 \uD0C0\uC785 \uBD84\uAE30\nexport type StyleOptionsOf<S extends StyleSelector> = S extends string ? StyleQueryOptions : StyleNonQueryOptions;\n\nexport interface StyleApplyMetadata {\n propertyKey: string | symbol;\n selector: StyleSelector;\n action: StyleAction;\n options: StyleApplyOptions;\n}\n\nexport const STYLE_METADATA_KEY = Symbol.for('simple-web-component:style');\n\n/**\n * Resolve selector to string or elements\n * Handles function-based selectors and returns elements if applicable\n */\nconst resolveSelector = (selector: StyleSelector, inst: any, win: Window): string | HTMLElement[] => {\n if (typeof selector === 'function') {\n const hostSet = SwcUtils.getHelperAndHostSet(win, inst);\n const result = selector(inst, hostSet);\n \n if (result instanceof win.Element) {\n return [result as HTMLElement];\n }\n if (result instanceof win.NodeList) {\n return Array.from(result) as HTMLElement[];\n }\n if (Array.isArray(result)) {\n return result as HTMLElement[];\n }\n if (result === null) {\n return [];\n }\n if (result instanceof win.Node) {\n return [];\n }\n return result as string;\n }\n return selector as string;\n};\n\n/**\n * Get target elements from selector\n */\nconst getTargetElements = (selector: StyleSelector, inst: any, win: Window, root: string): HTMLElement[] => {\n const resolved = resolveSelector(selector, inst, win);\n \n if (Array.isArray(resolved)) {\n return resolved;\n }\n\n const stringSelector = resolved as string;\n const targetEls: HTMLElement[] = [];\n const host = inst as unknown as HTMLElement;\n const hostSet = SwcUtils.getHelperAndHostSet(win, inst);\n\n const applyRoot = (t: any) => {\n if (!t || !(t instanceof win.HTMLElement)) return;\n targetEls.push(t);\n };\n\n if (stringSelector === '$this' || !stringSelector) applyRoot(host);\n else if (stringSelector === '$host') applyRoot(hostSet.$host);\n else if (stringSelector === '$parentHost') applyRoot(hostSet.$parentHost);\n else if (stringSelector === '$appHost') applyRoot(hostSet.$appHost);\n else if (stringSelector === '$firstHost') applyRoot(hostSet.$firstHost);\n else if (stringSelector === '$lastHost') applyRoot(hostSet.$lastHost);\n else if (stringSelector === '$firstAppHost') applyRoot(hostSet.$firstAppHost);\n else if (stringSelector === '$lastAppHost') applyRoot(hostSet.$lastAppHost);\n else if (stringSelector === '$hosts') hostSet.$hosts.forEach(applyRoot);\n else if (stringSelector === '$appHosts') hostSet.$appHosts.forEach(applyRoot);\n else {\n const targetRoot = root === 'auto' ? (host.shadowRoot || host) : (root === 'shadow' ? host.shadowRoot : host);\n if (targetRoot) {\n const found = targetRoot.querySelectorAll(stringSelector);\n if (found) targetEls.push(...(Array.from(found) as HTMLElement[]));\n }\n }\n\n return targetEls;\n};\n\nfunction createStyleDecorator(action: StyleAction) {\n return (selector: StyleSelector, options: StyleApplyOptions = {}): MethodDecorator => {\n return (target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor) => {\n const constructor = target.constructor;\n let metaList = ReflectUtils.getOwnMetadata(STYLE_METADATA_KEY, constructor) as Map<string | symbol, StyleApplyMetadata>;\n if (!metaList) {\n metaList = new Map<string | symbol, StyleApplyMetadata>();\n ReflectUtils.defineMetadata(STYLE_METADATA_KEY, metaList, constructor);\n }\n metaList.set(propertyKey, { propertyKey, selector, action, options });\n\n const original = descriptor.value;\n descriptor.value = function (...args: any[]) {\n ensureInit(this);\n const res = (original as any).apply(this, args);\n\n /**\n * Extract value for this decorator from method return value\n * \n * If return value is an object with this decorator's key,\n * use that value. Otherwise use the entire return value.\n * \n * Uses valueKey from options if provided, otherwise uses STYLE_METADATA_KEY.\n */\n const extractValue = (v: any) => {\n const keyToUse = options.valueKey ?? STYLE_METADATA_KEY;\n if (v && typeof v === 'object' && keyToUse in v) {\n return v[keyToUse];\n }\n return v;\n };\n\n const handleResult = (resolvedValue: any) => {\n if (resolvedValue !== undefined) {\n const win = (this as any).ownerDocument?.defaultView || window;\n const host = this as unknown as HTMLElement;\n const hostSet = { ...SwcUtils.getHelperAndHostSet(win, host), $this: this };\n const r = options.root || 'auto';\n const targetEls = getTargetElements(selector, this, win, r);\n\n targetEls.forEach(targetEl => {\n if (options.filter && !options.filter(targetEl, resolvedValue, {currentThis: this, helper: hostSet})) {\n return;\n }\n const resolvedRes = typeof resolvedValue === 'function' ? (resolvedValue as any)(targetEl, hostSet) : resolvedValue;\n\n if (action === 'set' || action === 'update') {\n if (action === 'set') targetEl.style.cssText = '';\n \n if (typeof resolvedRes === 'object' && resolvedRes !== null && !Array.isArray(resolvedRes)) {\n Object.entries(resolvedRes as any).forEach(([prop, val]) => {\n const finalVal = typeof val === 'function' ? val(targetEl, hostSet) : val;\n if (finalVal === null || finalVal === undefined) {\n targetEl.style.removeProperty(prop);\n } else {\n targetEl.style[prop as any] = String(finalVal);\n }\n });\n } else if (typeof resolvedRes === 'string') {\n targetEl.style.cssText = resolvedRes;\n }\n } else if (action === 'remove') {\n if (typeof resolvedRes === 'object' && resolvedRes !== null && !Array.isArray(resolvedRes)) {\n Object.entries(resolvedRes as any).forEach(([prop, val]) => {\n const shouldRemove = typeof val === 'function' ? val(targetEl, hostSet) : !!val;\n if (shouldRemove) {\n targetEl.style.removeProperty(prop);\n }\n });\n } else {\n const props = Array.isArray(resolvedRes) ? resolvedRes : [resolvedRes];\n props.forEach(p => targetEl.style.removeProperty(String(p)));\n }\n }\n });\n }\n return resolvedValue;\n };\n\n if (res instanceof Promise) {\n return res.then((v: any) => handleResult(extractValue(v)));\n } else {\n return handleResult(extractValue(res));\n }\n };\n return descriptor;\n };\n };\n}\n\nexport function applyStyle(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;\nexport function applyStyle(selector: string, action?: StyleAction, options?: StyleQueryOptions): MethodDecorator;\nexport function applyStyle(selector: StyleFnSelector, action?: StyleAction, options?: StyleNonQueryOptions): MethodDecorator;\nexport function applyStyle(selectorOrTarget?: any, actionOrPropertyKey?: any, optionsOrDescriptor?: any): any {\n // Bare decorator: @applyStyle\n if (optionsOrDescriptor !== undefined && typeof selectorOrTarget !== 'string' && typeof selectorOrTarget !== 'function' && (typeof actionOrPropertyKey === 'string' || typeof actionOrPropertyKey === 'symbol')) {\n return createStyleDecorator('update')('$this', {})(selectorOrTarget as Object, actionOrPropertyKey, optionsOrDescriptor as PropertyDescriptor);\n }\n // With selector\n if (typeof selectorOrTarget === 'string' || typeof selectorOrTarget === 'function') {\n const action = (typeof actionOrPropertyKey === 'string' ? actionOrPropertyKey : 'update') as StyleAction;\n const options = (typeof actionOrPropertyKey === 'object' ? actionOrPropertyKey : optionsOrDescriptor) as StyleApplyOptions | undefined;\n return createStyleDecorator(action)(selectorOrTarget, options);\n }\n // Without selector (defaults to $this)\n const action = (typeof selectorOrTarget === 'string' ? selectorOrTarget : 'update') as StyleAction;\n const options = (typeof selectorOrTarget === 'object' ? selectorOrTarget : actionOrPropertyKey) as StyleApplyOptions | undefined;\n return createStyleDecorator(action)('$this', options);\n}\n\nexport function setStyle(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;\nexport function setStyle(selector: string, options?: StyleQueryOptions): MethodDecorator;\nexport function setStyle(selector: StyleFnSelector, options?: StyleNonQueryOptions): MethodDecorator;\nexport function setStyle(selectorOrTarget?: any, optionsOrPropertyKey?: any, descriptor?: any): any {\n // Bare decorator: @setStyle\n if (descriptor !== undefined && (typeof optionsOrPropertyKey === 'string' || typeof optionsOrPropertyKey === 'symbol')) {\n return createStyleDecorator('set')('$this', {})(selectorOrTarget as Object, optionsOrPropertyKey, descriptor as PropertyDescriptor);\n }\n // With selector\n if (typeof selectorOrTarget === 'string' || typeof selectorOrTarget === 'function') {\n return createStyleDecorator('set')(selectorOrTarget, optionsOrPropertyKey as StyleApplyOptions);\n }\n // Without selector (defaults to $this)\n return createStyleDecorator('set')('$this', selectorOrTarget as StyleApplyOptions);\n}\n\nexport function updateStyle(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;\nexport function updateStyle(selector: string, options?: StyleQueryOptions): MethodDecorator;\nexport function updateStyle(selector: StyleFnSelector, options?: StyleNonQueryOptions): MethodDecorator;\nexport function updateStyle(selectorOrTarget?: any, optionsOrPropertyKey?: any, descriptor?: any): any {\n // Bare decorator: @updateStyle\n if (descriptor !== undefined && (typeof optionsOrPropertyKey === 'string' || typeof optionsOrPropertyKey === 'symbol')) {\n return createStyleDecorator('update')('$this', {})(selectorOrTarget as Object, optionsOrPropertyKey, descriptor as PropertyDescriptor);\n }\n // With selector\n if (typeof selectorOrTarget === 'string' || typeof selectorOrTarget === 'function') {\n return createStyleDecorator('update')(selectorOrTarget, optionsOrPropertyKey as StyleApplyOptions);\n }\n // Without selector (defaults to $this)\n return createStyleDecorator('update')('$this', selectorOrTarget as StyleApplyOptions);\n}\n\nexport function removeStyle(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;\nexport function removeStyle(selector: string, options?: StyleQueryOptions): MethodDecorator;\nexport function removeStyle(selector: StyleFnSelector, options?: StyleNonQueryOptions): MethodDecorator;\nexport function removeStyle(selectorOrTarget?: any, optionsOrPropertyKey?: any, descriptor?: any): any {\n // Bare decorator: @removeStyle\n if (descriptor !== undefined && (typeof optionsOrPropertyKey === 'string' || typeof optionsOrPropertyKey === 'symbol')) {\n return createStyleDecorator('remove')('$this', {})(selectorOrTarget as Object, optionsOrPropertyKey, descriptor as PropertyDescriptor);\n }\n // With selector\n if (typeof selectorOrTarget === 'string' || typeof selectorOrTarget === 'function') {\n return createStyleDecorator('remove')(selectorOrTarget, optionsOrPropertyKey as StyleApplyOptions);\n }\n // Without selector (defaults to $this)\n return createStyleDecorator('remove')('$this', selectorOrTarget as StyleApplyOptions);\n}\n\n// \u2500\u2500\u2500 Aliases \u2500\u2500\u2500\nexport const style = applyStyle;\n\n// \u2500\u2500\u2500 \uD3B8\uC758 \uD5EC\uD37C (selector/root \uC0DD\uB7B5) \u2500\u2500\u2500\n\nexport function styleThis(action?: StyleAction, options?: StyleQueryOptions): MethodDecorator;\nexport function styleThis(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;\nexport function styleThis(actionOrTarget?: StyleAction | Object, optionsOrPropertyKey?: StyleQueryOptions | string | symbol, descriptor?: PropertyDescriptor): any {\n if ((typeof optionsOrPropertyKey === 'string' || typeof optionsOrPropertyKey === 'symbol') && descriptor !== undefined) {\n return (applyStyle('$this', undefined as any, {}) as any)(actionOrTarget, optionsOrPropertyKey, descriptor);\n }\n return applyStyle('$this', actionOrTarget as any, optionsOrPropertyKey as StyleQueryOptions);\n}\nexport function styleAppHost(action?: StyleAction, options?: StyleQueryOptions): MethodDecorator;\nexport function styleAppHost(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;\nexport function styleAppHost(actionOrTarget?: StyleAction | Object, optionsOrPropertyKey?: StyleQueryOptions | string | symbol, descriptor?: PropertyDescriptor): any {\n if ((typeof optionsOrPropertyKey === 'string' || typeof optionsOrPropertyKey === 'symbol') && descriptor !== undefined) {\n return (applyStyle('$appHost', undefined as any, {}) as any)(actionOrTarget, optionsOrPropertyKey, descriptor);\n }\n return applyStyle('$appHost', actionOrTarget as any, optionsOrPropertyKey as StyleQueryOptions);\n}\nexport function styleLight(selector: string, action?: StyleAction, options?: Omit<StyleQueryOptions, 'root'>): MethodDecorator;\nexport function styleLight(selector: string, options?: Omit<StyleQueryOptions, 'root'>): MethodDecorator;\nexport function styleLight(selector: string, actionOrOptions?: StyleAction | Omit<StyleQueryOptions, 'root'>, options?: Omit<StyleQueryOptions, 'root'>): MethodDecorator {\n const action = (typeof actionOrOptions === 'string' ? actionOrOptions : undefined) as StyleAction | undefined;\n const opts = (typeof actionOrOptions === 'object' ? actionOrOptions : options) as Omit<StyleQueryOptions, 'root'> | undefined;\n return applyStyle(selector, action, {...opts ?? {}, root: 'light'});\n}\nexport function styleShadow(selector: string, action?: StyleAction, options?: Omit<StyleQueryOptions, 'root'>): MethodDecorator;\nexport function styleShadow(selector: string, options?: Omit<StyleQueryOptions, 'root'>): MethodDecorator;\nexport function styleShadow(selector: string, actionOrOptions?: StyleAction | Omit<StyleQueryOptions, 'root'>, options?: Omit<StyleQueryOptions, 'root'>): MethodDecorator {\n const action = (typeof actionOrOptions === 'string' ? actionOrOptions : undefined) as StyleAction | undefined;\n const opts = (typeof actionOrOptions === 'object' ? actionOrOptions : options) as Omit<StyleQueryOptions, 'root'> | undefined;\n return applyStyle(selector, action, {...opts ?? {}, root: 'shadow'});\n}\nexport function styleAll(selector: string, action?: StyleAction, options?: Omit<StyleQueryOptions, 'root'>): MethodDecorator;\nexport function styleAll(selector: string, options?: Omit<StyleQueryOptions, 'root'>): MethodDecorator;\nexport function styleAll(selector: string, actionOrOptions?: StyleAction | Omit<StyleQueryOptions, 'root'>, options?: Omit<StyleQueryOptions, 'root'>): MethodDecorator {\n const action = (typeof actionOrOptions === 'string' ? actionOrOptions : undefined) as StyleAction | undefined;\n const opts = (typeof actionOrOptions === 'object' ? actionOrOptions : options) as Omit<StyleQueryOptions, 'root'> | undefined;\n return applyStyle(selector, action, {...opts ?? {}, root: 'all'});\n}\n\nexport const findAllStyleMetadata = (target: any): Map<string | symbol, StyleApplyMetadata> => {\n const result = new Map<string | symbol, StyleApplyMetadata>();\n const maps = ReflectUtils.findAllMetadata<Map<string | symbol, StyleApplyMetadata>>(STYLE_METADATA_KEY, target);\n maps.forEach(map => {\n if (map instanceof Map) {\n map.forEach((v, k) => result.set(k, v));\n }\n });\n return result;\n};\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAA2B;AAC3B,2BAAyB;AACzB,mBAAuB;AA+BhB,MAAM,qBAAqB,OAAO,IAAI,4BAA4B;AAMzE,MAAM,kBAAkB,CAAC,UAAyB,MAAW,QAAwC;AACnG,MAAI,OAAO,aAAa,YAAY;AAClC,UAAM,UAAU,sBAAS,oBAAoB,KAAK,IAAI;AACtD,UAAM,SAAS,SAAS,MAAM,OA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S,WAAW,UAAkB,iBAAiE,SAA4D;AACxK,QAAM,SAAU,OAAO,oBAAoB,WAAW,kBAAkB;AACxE,QAAM,OAAQ,OAAO,oBAAoB,WAAW,kBAAkB;AACtE,SAAO,WAAW,UAAU,QAAQ,EAAC,GAAG,QAAQ,CAAC,GAAG,MAAM,QAAO,CAAC;AACpE;AAGO,SAAS,YAAY,UAAkB,iBAAiE,SAA4D;AACzK,QAAM,SAAU,OAAO,oBAAoB,WAAW,kBAAkB;AACxE,QAAM,OAAQ,OAAO,oBAAoB,WAAW,kBAAkB;AACtE,SAAO,WAAW,UAAU,QAAQ,EAAC,GAAG,QAAQ,CAAC,GAAG,MAAM,SAAQ,CAAC;AACrE;AAGO,SAAS,SAAS,UAAkB,iBAAiE,SAA4D;AACtK,QAAM,SAAU,OAAO,oBAAoB,WAAW,kBAAkB;AACxE,QAAM,OAAQ,OAAO,oBAAoB,WAAW,kBAAkB;AACtE,SAAO,WAAW,UAAU,QAAQ,EAAC,GAAG,QAAQ,CAAC,GAAG,MAAM,MAAK,CAAC;AAClE;AAEO,MAAM,uBAAuB,CAAC,WAA0D;AAC7F,QAAM,SAAS,oBAAI,IAAyC;AAC5D,QAAM,OAAO,yBAAa,gBAA0D,oBAAoB,MAAM;AAC9G,OAAK,QAAQ,SAAO;AAClB,QAAI,eAAe,KAAK;AACtB,UAAI,QAAQ,CAAC,GAAG,MAAM,OAAO,IAAI,GAAG,CAAC,CAAC;AAAA,IACxC;AAAA,EACF,CAAC;AACD,SAAO;AACT;",
6
6
  "names": ["action", "options"]
7
7
  }
@@ -36,20 +36,29 @@ const convertValue = (val, type) => {
36
36
  if (type === Boolean) return val === "false" || val === "0" ? false : true;
37
37
  return val;
38
38
  };
39
- function changedAttribute(attributeName, options = {}) {
39
+ const applyChangedAttribute = (attributeName, options, target, propertyKey) => {
40
+ const constructor = target.constructor;
41
+ let metaList = import_core.ReflectUtils.getOwnMetadata(ON_ATTRIBUTE_CHANGED_METADATA_KEY, constructor);
42
+ if (!metaList) {
43
+ metaList = [];
44
+ import_core.ReflectUtils.defineMetadata(ON_ATTRIBUTE_CHANGED_METADATA_KEY, metaList, constructor);
45
+ }
46
+ const name = attributeName || String(propertyKey);
47
+ metaList.push({
48
+ attributeName: name,
49
+ propertyKey,
50
+ options
51
+ });
52
+ };
53
+ function changedAttribute(attributeNameOrTarget, optionsOrPropertyKey, descriptor) {
54
+ if ((typeof optionsOrPropertyKey === "string" || typeof optionsOrPropertyKey === "symbol") && descriptor !== void 0) {
55
+ applyChangedAttribute(void 0, {}, attributeNameOrTarget, optionsOrPropertyKey);
56
+ return;
57
+ }
58
+ const attributeName = attributeNameOrTarget;
59
+ const options = optionsOrPropertyKey ?? {};
40
60
  return (target, propertyKey) => {
41
- const constructor = target.constructor;
42
- let metaList = import_core.ReflectUtils.getOwnMetadata(ON_ATTRIBUTE_CHANGED_METADATA_KEY, constructor);
43
- if (!metaList) {
44
- metaList = [];
45
- import_core.ReflectUtils.defineMetadata(ON_ATTRIBUTE_CHANGED_METADATA_KEY, metaList, constructor);
46
- }
47
- const name = attributeName || String(propertyKey);
48
- metaList.push({
49
- attributeName: name,
50
- propertyKey,
51
- options
52
- });
61
+ applyChangedAttribute(attributeName, options, target, propertyKey);
53
62
  };
54
63
  }
55
64
  const getChangedAttributeMetadata = (target) => {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/decorators/changedAttribute.ts"],
4
- "sourcesContent": ["import { ReflectUtils } from '@dooboostore/core';\n\nexport const ON_ATTRIBUTE_CHANGED_METADATA_KEY = Symbol.for('simple-web-component:on-attribute-changed');\n\nexport interface ChangedAttributeThisOptions {\n type?: typeof Number | typeof Boolean | typeof String;\n while?: 'connected';\n}\n\nexport interface ChangedAttributeThisMetadata {\n attributeName: string;\n propertyKey: string | symbol;\n options: ChangedAttributeThisOptions;\n}\n\nconst convertValue = (val: any, type: any): any => {\n if (val === null || val === undefined) return val;\n if (type === Number) return Number(val);\n if (type === Boolean) return val === 'false' || val === '0' ? false : true;\n return val;\n};\n\n/**\n * @changedAttributeThis decorator - fires when any attribute on $this changes\n */\nexport function changedAttribute(attributeName?: string, options: ChangedAttributeThisOptions = {}): MethodDecorator {\n return (target: Object, propertyKey: string | symbol) => {\n const constructor = target.constructor;\n let metaList = ReflectUtils.getOwnMetadata(ON_ATTRIBUTE_CHANGED_METADATA_KEY, constructor) as ChangedAttributeThisMetadata[];\n if (!metaList) {\n metaList = [];\n ReflectUtils.defineMetadata(ON_ATTRIBUTE_CHANGED_METADATA_KEY, metaList, constructor);\n }\n\n const name = attributeName || String(propertyKey);\n metaList.push({\n attributeName: name,\n propertyKey,\n options\n });\n };\n}\n\nexport const getChangedAttributeMetadata = (target: any): ChangedAttributeThisMetadata[] | undefined => {\n const constructor = target instanceof Function ? target : target.constructor;\n return ReflectUtils.getMetadata(ON_ATTRIBUTE_CHANGED_METADATA_KEY, constructor);\n};\n\nexport const findAllAttributeChangedMetadata = (target: any): Map<string, ChangedAttributeThisMetadata[]> => {\n const constructor = target instanceof Function ? target : target.constructor;\n const metaList = ReflectUtils.findAllMetadata<ChangedAttributeThisMetadata[]>(ON_ATTRIBUTE_CHANGED_METADATA_KEY, constructor) || [];\n\n const result = new Map<string, ChangedAttributeThisMetadata[]>();\n metaList.forEach(meta => {\n meta.forEach(item => {\n if (!result.has(item.attributeName)) {\n result.set(item.attributeName, []);\n }\n result.get(item.attributeName)!.push(item);\n });\n });\n return result;\n};\n\nexport const convertAttributeValue = (val: any, type?: typeof Number | typeof Boolean | typeof String): any => {\n return convertValue(val, type);\n};\n\n// \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n// ChangedAttributeLifeCycler\n// \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\nimport { ElementDefineLifeCycler, HelperHostSet } from '../types';\nimport { getAttributeValue } from './applyAttribute';\n\nexport class ChangedAttributeLifeCycler implements ElementDefineLifeCycler {\n private attrChangeMap: Map<string, ChangedAttributeThisMetadata[]> | null = null;\n\n /** \uD074\uB798\uC2A4 \uBA54\uD0C0\uB370\uC774\uD130 \uAE30\uBC18 attrChangeMap \uC744 lazy \uB85C\uB4DC\uD55C\uB2E4 (\uACF5\uC720 \uC2DC\uD074\uB7EC \uCE90\uC2DC). */\n private getAttrChangeMap(inst: any): Map<string, ChangedAttributeThisMetadata[]> {\n if (!this.attrChangeMap) this.attrChangeMap = findAllAttributeChangedMetadata(inst);\n return this.attrChangeMap;\n }\n\n /** observedAttributes \uC5D0 \uD3EC\uD568\uD560 attribute \uC774\uB984 \uBAA9\uB85D */\n getObservedAttributeNames(inst: any): string[] {\n return Array.from(this.getAttrChangeMap(inst).keys());\n }\n\n onConnected(helperHostSet: HelperHostSet): void {\n const inst = helperHostSet.$this;\n\n // while:'connected' \uC635\uC158 \u2014 connected \uC2DC\uC810 \uD604\uC7AC \uAC12\uC73C\uB85C \uCD08\uAE30 \uC2E4\uD589\n for (const [name, metaList] of this.getAttrChangeMap(inst)) {\n for (const meta of metaList) {\n if (meta.options.while === 'connected') {\n const val = getAttributeValue(inst, name, { type: meta.options.type });\n if (val !== null) inst[meta.propertyKey](val, null, name, helperHostSet);\n }\n }\n }\n }\n\n /** attributeChangedCallback \uC5D0\uC11C elementDefine \uC774 \uC9C1\uC811 \uD638\uCD9C */\n onAttributeChanged(helperHostSet: HelperHostSet, name: string, old: string | null, newVal: any): void {\n const inst = helperHostSet.$this;\n const metaList = this.getAttrChangeMap(inst).get(name);\n if (!metaList) return;\n for (const meta of metaList) {\n if (meta.options.while === 'connected' && !inst.__swc_connected) continue;\n inst[meta.propertyKey](convertAttributeValue(newVal, meta.options.type), old, name, helperHostSet);\n }\n }\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAA6B;AAwE7B,4BAAkC;AAtE3B,MAAM,oCAAoC,OAAO,IAAI,2CAA2C;AAavG,MAAM,eAAe,CAAC,KAAU,SAAmB;AACjD,MAAI,QAAQ,QAAQ,QAAQ,OAAW,QAAO;AAC9C,MAAI,SAAS,OAAQ,QAAO,OAAO,GAAG;AACtC,MAAI,SAAS,QAAS,QAAO,QAAQ,WAAW,QAAQ,MAAM,QAAQ;AACtE,SAAO;AACT;AAKO,SAAS,iBAAiB,eAAwB,UAAuC,CAAC,GAAoB;AACnH,SAAO,CAAC,QAAgB,gBAAiC;AACvD,UAAM,cAAc,OAAO;AAC3B,QAAI,WAAW,yBAAa,eAAe,mCAAmC,WAAW;AACzF,QAAI,CAAC,UAAU;AACb,iBAAW,CAAC;AACZ,+BAAa,eAAe,mCAAmC,UAAU,WAAW;AAAA,IACtF;AAEA,UAAM,OAAO,iBAAiB,OAAO,WAAW;AAChD,aAAS,KAAK;AAAA,MACZ,eAAe;AAAA,MACf;AAAA,MACA;AAAA,IACF,CAAC;AAAA,EACH;AACF;AAE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,MAAM,MAAM,aAAa;AAAA,QACzE;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAAA;AAAA,EAGA,mBAAmB,eAA8B,MAAc,KAAoB,QAAmB;AACpG,UAAM,OAAO,cAAc;AAC3B,UAAM,WAAW,KAAK,iBAAiB,IAAI,EAAE,IAAI,IAAI;AACrD,QAAI,CAAC,SAAU;AACf,eAAW,QAAQ,UAAU;AAC3B,UAAI,KAAK,QAAQ,UAAU,eAAe,CAAC,KAAK,gBAAiB;AACjE,WAAK,KAAK,WAAW,EAAE,sBAAsB,QAAQ,KAAK,QAAQ,IAAI,GAAG,KAAK,MAAM,aAAa;AAAA,IACnG;AAAA,EACF;AACF;",
4
+ "sourcesContent": ["import { ReflectUtils } from '@dooboostore/core';\n\nexport const ON_ATTRIBUTE_CHANGED_METADATA_KEY = Symbol.for('simple-web-component:on-attribute-changed');\n\nexport interface ChangedAttributeThisOptions {\n type?: typeof Number | typeof Boolean | typeof String;\n while?: 'connected';\n}\n\nexport interface ChangedAttributeThisMetadata {\n attributeName: string;\n propertyKey: string | symbol;\n options: ChangedAttributeThisOptions;\n}\n\nconst convertValue = (val: any, type: any): any => {\n if (val === null || val === undefined) return val;\n if (type === Number) return Number(val);\n if (type === Boolean) return val === 'false' || val === '0' ? false : true;\n return val;\n};\n\nconst applyChangedAttribute = (attributeName: string | undefined, options: ChangedAttributeThisOptions, target: Object, propertyKey: string | symbol): void => {\n const constructor = target.constructor;\n let metaList = ReflectUtils.getOwnMetadata(ON_ATTRIBUTE_CHANGED_METADATA_KEY, constructor) as ChangedAttributeThisMetadata[];\n if (!metaList) {\n metaList = [];\n ReflectUtils.defineMetadata(ON_ATTRIBUTE_CHANGED_METADATA_KEY, metaList, constructor);\n }\n\n const name = attributeName || String(propertyKey);\n metaList.push({\n attributeName: name,\n propertyKey,\n options\n });\n};\n\nexport function changedAttribute(attributeName?: string, options?: ChangedAttributeThisOptions): MethodDecorator;\nexport function changedAttribute(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): void;\n/**\n * @changedAttributeThis decorator - fires when any attribute on $this changes.\n * \uC635\uC158 \uC5C6\uC774 `@changedAttribute` \uADF8\uB300\uB85C \uBD99\uC5EC\uB3C4 \uB418\uACE0, `@changedAttribute(...)`\uCC98\uB7FC \uC774\uB984/\uC635\uC158\uC744 \uC904 \uC218\uB3C4 \uC788\uB2E4.\n */\nexport function changedAttribute(attributeNameOrTarget?: string | Object, optionsOrPropertyKey?: ChangedAttributeThisOptions | string | symbol, descriptor?: PropertyDescriptor): MethodDecorator | void {\n if ((typeof optionsOrPropertyKey === 'string' || typeof optionsOrPropertyKey === 'symbol') && descriptor !== undefined) {\n // \uC635\uC158 \uC5C6\uC774: @changedAttribute\n applyChangedAttribute(undefined, {}, attributeNameOrTarget as Object, optionsOrPropertyKey);\n return;\n }\n // \uC635\uC158\uACFC \uD568\uAED8: @changedAttribute() / @changedAttribute('name', options?)\n const attributeName = attributeNameOrTarget as string | undefined;\n const options = (optionsOrPropertyKey as ChangedAttributeThisOptions) ?? {};\n return (target: Object, propertyKey: string | symbol) => {\n applyChangedAttribute(attributeName, options, target, propertyKey);\n };\n}\n\nexport const getChangedAttributeMetadata = (target: any): ChangedAttributeThisMetadata[] | undefined => {\n const constructor = target instanceof Function ? target : target.constructor;\n return ReflectUtils.getMetadata(ON_ATTRIBUTE_CHANGED_METADATA_KEY, constructor);\n};\n\nexport const findAllAttributeChangedMetadata = (target: any): Map<string, ChangedAttributeThisMetadata[]> => {\n const constructor = target instanceof Function ? target : target.constructor;\n const metaList = ReflectUtils.findAllMetadata<ChangedAttributeThisMetadata[]>(ON_ATTRIBUTE_CHANGED_METADATA_KEY, constructor) || [];\n\n const result = new Map<string, ChangedAttributeThisMetadata[]>();\n metaList.forEach(meta => {\n meta.forEach(item => {\n if (!result.has(item.attributeName)) {\n result.set(item.attributeName, []);\n }\n result.get(item.attributeName)!.push(item);\n });\n });\n return result;\n};\n\nexport const convertAttributeValue = (val: any, type?: typeof Number | typeof Boolean | typeof String): any => {\n return convertValue(val, type);\n};\n\n// \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n// ChangedAttributeLifeCycler\n// \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\nimport { ElementDefineLifeCycler, HelperHostSet } from '../types';\nimport { getAttributeValue } from './applyAttribute';\n\nexport class ChangedAttributeLifeCycler implements ElementDefineLifeCycler {\n private attrChangeMap: Map<string, ChangedAttributeThisMetadata[]> | null = null;\n\n /** \uD074\uB798\uC2A4 \uBA54\uD0C0\uB370\uC774\uD130 \uAE30\uBC18 attrChangeMap \uC744 lazy \uB85C\uB4DC\uD55C\uB2E4 (\uACF5\uC720 \uC2DC\uD074\uB7EC \uCE90\uC2DC). */\n private getAttrChangeMap(inst: any): Map<string, ChangedAttributeThisMetadata[]> {\n if (!this.attrChangeMap) this.attrChangeMap = findAllAttributeChangedMetadata(inst);\n return this.attrChangeMap;\n }\n\n /** observedAttributes \uC5D0 \uD3EC\uD568\uD560 attribute \uC774\uB984 \uBAA9\uB85D */\n getObservedAttributeNames(inst: any): string[] {\n return Array.from(this.getAttrChangeMap(inst).keys());\n }\n\n onConnected(helperHostSet: HelperHostSet): void {\n const inst = helperHostSet.$this;\n\n // while:'connected' \uC635\uC158 \u2014 connected \uC2DC\uC810 \uD604\uC7AC \uAC12\uC73C\uB85C \uCD08\uAE30 \uC2E4\uD589\n for (const [name, metaList] of this.getAttrChangeMap(inst)) {\n for (const meta of metaList) {\n if (meta.options.while === 'connected') {\n const val = getAttributeValue(inst, name, { type: meta.options.type });\n if (val !== null) inst[meta.propertyKey](val, null, name, helperHostSet);\n }\n }\n }\n }\n\n /** attributeChangedCallback \uC5D0\uC11C elementDefine \uC774 \uC9C1\uC811 \uD638\uCD9C */\n onAttributeChanged(helperHostSet: HelperHostSet, name: string, old: string | null, newVal: any): void {\n const inst = helperHostSet.$this;\n const metaList = this.getAttrChangeMap(inst).get(name);\n if (!metaList) return;\n for (const meta of metaList) {\n if (meta.options.while === 'connected' && !inst.__swc_connected) continue;\n inst[meta.propertyKey](convertAttributeValue(newVal, meta.options.type), old, name, helperHostSet);\n }\n }\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAA6B;AAuF7B,4BAAkC;AArF3B,MAAM,oCAAoC,OAAO,IAAI,2CAA2C;AAavG,MAAM,eAAe,CAAC,KAAU,SAAmB;AACjD,MAAI,QAAQ,QAAQ,QAAQ,OAAW,QAAO;AAC9C,MAAI,SAAS,OAAQ,QAAO,OAAO,GAAG;AACtC,MAAI,SAAS,QAAS,QAAO,QAAQ,WAAW,QAAQ,MAAM,QAAQ;AACtE,SAAO;AACT;AAEA,MAAM,wBAAwB,CAAC,eAAmC,SAAsC,QAAgB,gBAAuC;AAC7J,QAAM,cAAc,OAAO;AAC3B,MAAI,W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wBAAQ,iBAAoE;AAAA;AAAA;AAAA,EAGpE,iBAAiB,MAAwD;AAC/E,QAAI,CAAC,KAAK,cAAe,MAAK,gBAAgB,gCAAgC,IAAI;AAClF,WAAO,KAAK;AAAA,EACd;AAAA;AAAA,EAGA,0BAA0B,MAAqB;AAC7C,WAAO,MAAM,KAAK,KAAK,iBAAiB,IAAI,EAAE,KAAK,CAAC;AAAA,EACtD;AAAA,EAEA,YAAY,eAAoC;AAC9C,UAAM,OAAO,cAAc;AAG3B,eAAW,CAAC,MAAM,QAAQ,KAAK,KAAK,iBAAiB,IAAI,GAAG;AAC1D,iBAAW,QAAQ,UAAU;AAC3B,YAAI,KAAK,QAAQ,UAAU,aAAa;AACtC,gBAAM,UAAM,yCAAkB,MAAM,MAAM,EAAE,MAAM,KAAK,QAAQ,KAAK,CAAC;AACrE,cAAI,QAAQ,KAAM,MAAK,KAAK,WAAW,EAAE,KAAK,MAAM,MAAM,aAAa;AAAA,QACzE;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAAA;AAAA,EAGA,mBAAmB,eAA8B,MAAc,KAAoB,QAAmB;AACpG,UAAM,OAAO,cAAc;AAC3B,UAAM,WAAW,KAAK,iBAAiB,IAAI,EAAE,IAAI,IAAI;AACrD,QAAI,CAAC,SAAU;AACf,eAAW,QAAQ,UAAU;AAC3B,UAAI,KAAK,QAAQ,UAAU,eAAe,CAAC,KAAK,gBAAiB;AACjE,WAAK,KAAK,WAAW,EAAE,sBAAsB,QAAQ,KAAK,QAAQ,IAAI,GAAG,KAAK,MAAM,aAAa;AAAA,IACnG;AAAA,EACF;AACF;",
6
6
  "names": []
7
7
  }
@@ -36,6 +36,7 @@ var import_query = require("./query");
36
36
  var import_Utils = require("../utils/Utils");
37
37
  var import_config = require("../config/config");
38
38
  var import_Inject = require("@dooboostore/simple-boot/decorators/inject/Inject");
39
+ var import_parameter = require("./parameter");
39
40
  var import_types = require("../types");
40
41
  var import_core_web = require("@dooboostore/core-web");
41
42
  var import_SwcAppMixin = require("../elements/SwcAppMixin");
@@ -45,6 +46,8 @@ var import_subscribeSwcAppMessageWhileConnected = require("./subscribeSwcAppMess
45
46
  var import_subscribeSwcAppRouteChangeWhileConnected = require("./subscribeSwcAppRouteChangeWhileConnected");
46
47
  var import_setInterval = require("./setInterval");
47
48
  var import_setTimeout = require("./setTimeout");
49
+ var import_requestAnimationFrame = require("./requestAnimationFrame");
50
+ var import_eventMedia = require("./eventMedia");
48
51
  const ELEMENT_CONFIG_KEY = Symbol.for("simple-web-component:element-config");
49
52
  const getElementConfig = (target) => {
50
53
  const constructor = target instanceof Function ? target : target.constructor;
@@ -161,6 +164,9 @@ const setupPrototype = (proto, win) => {
161
164
  if (typeof this[methodName] !== "function") return;
162
165
  const useHostSet = hostSet ?? import_Utils.SwcUtils.getHelperAndHostSet(win, this);
163
166
  const app = useHostSet?.$appHost?.simpleApplication;
167
+ const helperSetValue = import_Utils.SwcUtils.getHelperSet(win);
168
+ const helperHostSetValue = { ...helperSetValue, ...useHostSet, $this: this };
169
+ const kindValues = { hostSet: useHostSet, helperHostSet: helperHostSetValue, helperSet: helperSetValue };
164
170
  if (app) {
165
171
  const otherStorage = /* @__PURE__ */ new Map();
166
172
  const situations = new import_Inject.SituationTypeContainers([new import_Inject.SituationTypeContainer({ situationType: import_types.InjectSituationType.HOST_SET, data: useHostSet }), new import_Inject.SituationTypeContainer({ situationType: import_types.InjectSituationType.APP_HOST, data: useHostSet.$appHost }), new import_Inject.SituationTypeContainer({ situationType: import_types.InjectSituationType.APP_HOSTS, data: useHostSet.$appHosts }), new import_Inject.SituationTypeContainer({
@@ -171,16 +177,23 @@ const setupPrototype = (proto, win) => {
171
177
  data: useHostSet.$firstAppHost
172
178
  }), new import_Inject.SituationTypeContainer({ situationType: import_types.InjectSituationType.LAST_APP_HOST, data: useHostSet.$lastAppHost })]);
173
179
  otherStorage.set(import_Inject.SituationTypeContainers, situations);
180
+ const firstCheckMaker = ({ target, targetKey }, token, idx) => {
181
+ const saves = (0, import_parameter.getParameterMetadata)(target, targetKey);
182
+ const found = saves.find((s) => s.index === idx);
183
+ return found ? kindValues[found.kind] : void 0;
184
+ };
174
185
  return app.simstanceManager.executeBindParameterSim(
175
186
  {
176
187
  target: this,
177
188
  targetKey: methodName,
178
- inputParameters: extraArgs
189
+ inputParameters: extraArgs,
190
+ firstCheckMaker: [firstCheckMaker]
179
191
  },
180
192
  otherStorage
181
193
  );
182
194
  } else {
183
- return this[methodName](...extraArgs);
195
+ const args = (0, import_parameter.buildSwcParameterArgs)(this, methodName, kindValues, extraArgs);
196
+ return this[methodName](...args);
184
197
  }
185
198
  };
186
199
  proto._bindAttributeEvent = function(el, attrName, script, eventName) {
@@ -273,7 +286,9 @@ const elementDefine = (name, config = {}) => (constructor) => {
273
286
  new import_subscribeSwcAppMessageWhileConnected.MessageSubscribeLifeCycler(),
274
287
  new import_subscribeSwcAppRouteChangeWhileConnected.RouteSubscribeLifeCycler(),
275
288
  new import_setInterval.SetIntervalLifeCycler(),
276
- new import_setTimeout.SetTimeoutLifeCycler()
289
+ new import_setTimeout.SetTimeoutLifeCycler(),
290
+ new import_requestAnimationFrame.RequestAnimationFrameLifeCycler(),
291
+ new import_eventMedia.EventMediaLifeCycler()
277
292
  ];
278
293
  const cyclerObservedAttributes = cyclers.flatMap((c) => c.getObservedAttributeNames?.(constructor) ?? []);
279
294
  const mergedObservedAttributes = [.../* @__PURE__ */ new Set([...metadata.observedAttributes ?? [], ...originalStaticObservedAttributes, ...cyclerObservedAttributes, ...attributeApplyNames, ...hostAttributes, ...swcLifecycleAttributes, ...swcOnEvents])];