@dooboostore/simple-web-component 1.0.54 → 1.0.55

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 (121) hide show
  1. package/README.md +308 -56
  2. package/dist/cjs/decorators/addEventListener.js +37 -14
  3. package/dist/cjs/decorators/addEventListener.js.map +2 -2
  4. package/dist/cjs/decorators/applyAttribute.js +6 -3
  5. package/dist/cjs/decorators/applyAttribute.js.map +2 -2
  6. package/dist/cjs/decorators/applyClass.js +18 -2
  7. package/dist/cjs/decorators/applyClass.js.map +2 -2
  8. package/dist/cjs/decorators/applyNode.js +10 -3
  9. package/dist/cjs/decorators/applyNode.js.map +2 -2
  10. package/dist/cjs/decorators/changedAttribute.js +2 -5
  11. package/dist/cjs/decorators/changedAttribute.js.map +2 -2
  12. package/dist/cjs/decorators/elementDefine.js +13 -2
  13. package/dist/cjs/decorators/elementDefine.js.map +2 -2
  14. package/dist/cjs/decorators/eventMedia.js +2 -5
  15. package/dist/cjs/decorators/eventMedia.js.map +2 -2
  16. package/dist/cjs/decorators/fetch.js +216 -82
  17. package/dist/cjs/decorators/fetch.js.map +3 -3
  18. package/dist/cjs/decorators/index.js +1 -0
  19. package/dist/cjs/decorators/index.js.map +2 -2
  20. package/dist/cjs/decorators/intersectionObserver.js +3 -6
  21. package/dist/cjs/decorators/intersectionObserver.js.map +2 -2
  22. package/dist/cjs/decorators/mutationObserver.js +3 -6
  23. package/dist/cjs/decorators/mutationObserver.js.map +2 -2
  24. package/dist/cjs/decorators/parameter.js +197 -33
  25. package/dist/cjs/decorators/parameter.js.map +3 -3
  26. package/dist/cjs/decorators/persistState.js +474 -0
  27. package/dist/cjs/decorators/persistState.js.map +7 -0
  28. package/dist/cjs/decorators/resizeObserver.js +3 -6
  29. package/dist/cjs/decorators/resizeObserver.js.map +2 -2
  30. package/dist/cjs/decorators/setInterval.js +2 -5
  31. package/dist/cjs/decorators/setInterval.js.map +2 -2
  32. package/dist/cjs/decorators/setTimeout.js +2 -5
  33. package/dist/cjs/decorators/setTimeout.js.map +2 -2
  34. package/dist/cjs/decorators/subscribeSwcAppMessage.js.map +1 -1
  35. package/dist/cjs/elements/SwcAppMixin.js +50 -2
  36. package/dist/cjs/elements/SwcAppMixin.js.map +2 -2
  37. package/dist/esm/decorators/addEventListener.js +38 -15
  38. package/dist/esm/decorators/addEventListener.js.map +2 -2
  39. package/dist/esm/decorators/applyAttribute.js +6 -3
  40. package/dist/esm/decorators/applyAttribute.js.map +2 -2
  41. package/dist/esm/decorators/applyClass.js +18 -2
  42. package/dist/esm/decorators/applyClass.js.map +2 -2
  43. package/dist/esm/decorators/applyNode.js +10 -3
  44. package/dist/esm/decorators/applyNode.js.map +2 -2
  45. package/dist/esm/decorators/changedAttribute.js +3 -6
  46. package/dist/esm/decorators/changedAttribute.js.map +2 -2
  47. package/dist/esm/decorators/elementDefine.js +15 -4
  48. package/dist/esm/decorators/elementDefine.js.map +2 -2
  49. package/dist/esm/decorators/eventMedia.js +3 -6
  50. package/dist/esm/decorators/eventMedia.js.map +2 -2
  51. package/dist/esm/decorators/fetch.js +216 -82
  52. package/dist/esm/decorators/fetch.js.map +3 -3
  53. package/dist/esm/decorators/index.js +1 -0
  54. package/dist/esm/decorators/index.js.map +2 -2
  55. package/dist/esm/decorators/intersectionObserver.js +4 -7
  56. package/dist/esm/decorators/intersectionObserver.js.map +2 -2
  57. package/dist/esm/decorators/mutationObserver.js +4 -7
  58. package/dist/esm/decorators/mutationObserver.js.map +2 -2
  59. package/dist/esm/decorators/parameter.js +197 -33
  60. package/dist/esm/decorators/parameter.js.map +3 -3
  61. package/dist/esm/decorators/persistState.js +455 -0
  62. package/dist/esm/decorators/persistState.js.map +7 -0
  63. package/dist/esm/decorators/resizeObserver.js +4 -7
  64. package/dist/esm/decorators/resizeObserver.js.map +2 -2
  65. package/dist/esm/decorators/setInterval.js +3 -6
  66. package/dist/esm/decorators/setInterval.js.map +2 -2
  67. package/dist/esm/decorators/setTimeout.js +3 -6
  68. package/dist/esm/decorators/setTimeout.js.map +2 -2
  69. package/dist/esm/decorators/subscribeSwcAppMessage.js.map +1 -1
  70. package/dist/esm/elements/SwcAppMixin.js +51 -3
  71. package/dist/esm/elements/SwcAppMixin.js.map +2 -2
  72. package/dist/esm-bundle/dooboostore-simple-web-component.esm.js +3226 -2391
  73. package/dist/esm-bundle/dooboostore-simple-web-component.esm.js.map +4 -4
  74. package/dist/types/decorators/addEventListener.d.ts +15 -0
  75. package/dist/types/decorators/addEventListener.d.ts.map +1 -1
  76. package/dist/types/decorators/applyAttribute.d.ts +1 -0
  77. package/dist/types/decorators/applyAttribute.d.ts.map +1 -1
  78. package/dist/types/decorators/applyClass.d.ts.map +1 -1
  79. package/dist/types/decorators/applyNode.d.ts +4 -2
  80. package/dist/types/decorators/applyNode.d.ts.map +1 -1
  81. package/dist/types/decorators/changedAttribute.d.ts.map +1 -1
  82. package/dist/types/decorators/elementDefine.d.ts.map +1 -1
  83. package/dist/types/decorators/eventMedia.d.ts.map +1 -1
  84. package/dist/types/decorators/fetch.d.ts +52 -31
  85. package/dist/types/decorators/fetch.d.ts.map +1 -1
  86. package/dist/types/decorators/index.d.ts +1 -0
  87. package/dist/types/decorators/index.d.ts.map +1 -1
  88. package/dist/types/decorators/intersectionObserver.d.ts.map +1 -1
  89. package/dist/types/decorators/mutationObserver.d.ts.map +1 -1
  90. package/dist/types/decorators/parameter.d.ts +169 -31
  91. package/dist/types/decorators/parameter.d.ts.map +1 -1
  92. package/dist/types/decorators/persistState.d.ts +66 -0
  93. package/dist/types/decorators/persistState.d.ts.map +1 -0
  94. package/dist/types/decorators/resizeObserver.d.ts.map +1 -1
  95. package/dist/types/decorators/setInterval.d.ts.map +1 -1
  96. package/dist/types/decorators/setTimeout.d.ts.map +1 -1
  97. package/dist/types/decorators/subscribeSwcAppMessage.d.ts +1 -1
  98. package/dist/types/decorators/subscribeSwcAppMessage.d.ts.map +1 -1
  99. package/dist/types/elements/SwcAppMixin.d.ts +12 -0
  100. package/dist/types/elements/SwcAppMixin.d.ts.map +1 -1
  101. package/dist/umd-bundle/dooboostore-simple-web-component.umd.js +3226 -2391
  102. package/dist/umd-bundle/dooboostore-simple-web-component.umd.js.map +4 -4
  103. package/package.json +3 -3
  104. package/src/decorators/addEventListener.ts +23 -15
  105. package/src/decorators/applyAttribute.ts +8 -3
  106. package/src/decorators/applyClass.ts +22 -2
  107. package/src/decorators/applyNode.ts +18 -6
  108. package/src/decorators/changedAttribute.ts +3 -4
  109. package/src/decorators/elementDefine.ts +19 -7
  110. package/src/decorators/eventMedia.ts +3 -6
  111. package/src/decorators/fetch.ts +270 -140
  112. package/src/decorators/index.ts +1 -0
  113. package/src/decorators/intersectionObserver.ts +4 -5
  114. package/src/decorators/mutationObserver.ts +4 -5
  115. package/src/decorators/parameter.ts +326 -42
  116. package/src/decorators/persistState.ts +408 -0
  117. package/src/decorators/resizeObserver.ts +4 -5
  118. package/src/decorators/setInterval.ts +3 -4
  119. package/src/decorators/setTimeout.ts +3 -4
  120. package/src/decorators/subscribeSwcAppMessage.ts +1 -1
  121. package/src/elements/SwcAppMixin.ts +64 -5
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/decorators/applyNode.ts"],
4
- "sourcesContent": ["import { ReflectUtils } from '@dooboostore/core';\nimport { ensureInit } from './elementDefine';\nimport {SpecialSelector, SwcQueryOptions, SwcFnSelector, SwcSelector, HelperHostSet, SwcRootType} from '../types';\nimport { SwcUtils} from \"../utils/Utils\";\nimport {findAllStateMetadata} from \"./state\";\nimport {ElementApply} from \"@dooboostore/core-web\";\n/*\n<!-- beforebegin -->\n<p> <-- it's me\n <!-- afterbegin -->\n foo\n <!-- beforeend -->\n</p>\n<!-- afterend -->\n */\nexport type ApplyNodePosition = 'beforeBegin' | 'afterBegin' | 'beforeEnd' | 'afterEnd' | 'replace' | 'replaceChildren' | 'innerHtml' | 'innerText' | 'remove' | 'clearChildren';\n\nexport type ApplyNodeFnSelector = SwcFnSelector;\nexport type ApplyNodeSelector = SwcSelector;\n\n// \uACF5\uD1B5 \uC635\uC158 \u2014 root \uC5C6\uC74C\nexport interface ApplyNodeBaseOptions {\n position?: ApplyNodePosition;\n filter?: (target: HTMLElement | ShadowRoot, newValue: any, meta: { currentThis: any, helper: HelperHostSet }) => boolean;\n fallback?: (helper: HelperHostSet) => any;\n valueKey?: symbol | string;\n}\n\n// \uBB38\uC790\uC5F4 \uC140\uB809\uD130 \uC804\uC6A9 \u2014 root \uD5C8\uC6A9\nexport type ApplyNodeQueryOptions = ApplyNodeBaseOptions & { root?: SwcRootType };\n// \uD568\uC218 \uC140\uB809\uD130 \uC804\uC6A9 \u2014 root \uAE08\uC9C0\nexport type ApplyNodeNonQueryOptions = ApplyNodeBaseOptions;\nexport type ApplyNodeOptions = ApplyNodeQueryOptions;\n\n// \uC140\uB809\uD130 \uC885\uB958\uC5D0 \uB530\uB77C \uC635\uC158 \uD0C0\uC785 \uBD84\uAE30\nexport type ApplyNodeOptionsOf<S extends ApplyNodeSelector> = S extends string ? ApplyNodeQueryOptions : ApplyNodeNonQueryOptions;\n\nexport interface ApplyNodeMetadata {\n propertyKey: string | symbol;\n selector: ApplyNodeSelector;\n options: ApplyNodeOptions;\n}\n\nexport const APPLY_NODE_METADATA_KEY = Symbol.for('simple-web-component:apply-node');\n\n/**\n * Resolve selector to string or elements\n * Handles function-based selectors and returns elements if applicable\n */\nconst resolveSelector = (selector: ApplyNodeSelector, inst: any, win: Window): string | HTMLElement | null => {\n if (typeof selector === 'function') {\n const hostSet = SwcUtils.getHelperAndHostSet(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 result.length > 0 ? (result[0] as HTMLElement) : null;\n }\n if (Array.isArray(result)) {\n return result.length > 0 ? (result[0] as HTMLElement) : null;\n }\n if (result === null) {\n return null;\n }\n // result must be a string at this point\n return result as unknown as string;\n }\n return selector as string;\n};\n\n// const normalizeNodes = (res: any, doc: Document): Node[] => {\n// const items = Array.isArray(res) ? res : [res];\n// return items.map(it => {\n// if (it instanceof Node) return it;\n// return doc.createTextNode(it !== undefined && it !== null ? String(it) : '');\n// });\n// };\n\nconst applyToDom = (currentThis: any, targetEl: HTMLElement, res: Node | string | (Node | string)[] | NodeList, pos: ApplyNodePosition, win: Window, host?: any) => {\n if (!targetEl) return;\n \n // Handle clearChildren - ignore return value and always clear\n if (pos === 'clearChildren') {\n targetEl.replaceChildren();\n return [];\n }\n\n // remove: \uB300\uC0C1 \uC790\uCCB4\uB97C DOM\uC5D0\uC11C \uB5C0\uB2E4. $this \uCC98\uB7FC shadow root \uB85C \uC7A1\uD614\uC73C\uBA74 \uADF8 \uC8FC\uC778 \uC5D8\uB9AC\uBA3C\uD2B8\uB97C \uB5C0\uB2E4.\n if (pos === 'remove') {\n (targetEl instanceof win.ShadowRoot ? (targetEl as any).host : targetEl).remove();\n return [];\n }\n \n const doc = win.document;\n const hostSet = SwcUtils.getHelperAndHostSet(currentThis);\n const id = currentThis._swcId;\n\n // \uB9AC\uD134\uAC12 \u2192 \uB178\uB4DC: Node \uADF8\uB300\uB85C / \uBB38\uC790\uC5F4\uC740 innerText \uBA74 \uD14D\uC2A4\uD2B8, \uADF8 \uC678 \uC704\uCE58\uB294 HTML / \uBC30\uC5F4\u00B7NodeList \uB294 \uD56D\uBAA9\uB9C8\uB2E4.\n // Node \uD310\uB2E8\uC740 nodeType \uC73C\uB85C \u2014 \uB2E4\uB978 window(iframe) \uC5D0\uC11C \uB9CC\uB4E0 \uB178\uB4DC\uB294 instanceof win.Node \uAC00 false \uB77C\uC11C.\n const toNodes = (v: any): Node[] => {\n if (v === null || v === undefined || v === false) return [];\n if (typeof v === 'object' && typeof v.nodeType === 'number') return [v];\n if (typeof v === 'object' && typeof v.length === 'number') return Array.from(v as ArrayLike<any>).flatMap(toNodes);\n if (pos === 'innerText') return [doc.createTextNode(String(v))];\n const t = doc.createElement('template');\n t.innerHTML = String(v);\n return Array.from(t.content.childNodes);\n };\n const nodes: Node[] = toNodes(res);\n\n SwcUtils.projectProcessHtml(id, nodes, doc);\n\n const isShadowRoot = targetEl instanceof win.ShadowRoot;\n // const nodes = normalizeNodes(res, doc);\n if (pos === 'replace') {\n if (!isShadowRoot) targetEl.replaceWith(...nodes);\n } else if (pos === 'innerHtml') {\n targetEl.replaceChildren(...nodes);\n } else if (pos === 'innerText') {\n targetEl.replaceChildren(...nodes);\n } else if (pos === 'replaceChildren') {\n targetEl.replaceChildren(...nodes);\n } else {\n if (pos === 'beforeEnd') {\n targetEl.append(...nodes)\n }\n else if (pos === 'afterBegin') targetEl.prepend(...nodes);\n else if (pos === 'beforeBegin' && !isShadowRoot) targetEl.before(...nodes);\n else if (pos === 'afterEnd' && !isShadowRoot) targetEl.after(...nodes);\n }\n\n const stateContext: any = {...hostSet};\n findAllStateMetadata(currentThis).forEach(it => {\n stateContext[it.name] = currentThis[it.propertyKey]\n })\n new ElementApply(targetEl, {id: id}).apply({target: 'noInitialized', context: stateContext, bind: currentThis});\n return nodes;\n};\n\n/**\n * @applyNode decorator to surgically add/replace nodes to a target element.\n * \n * Overloads:\n * - applyNode(selector, options) - Apply to specific selector\n * - applyNode(options) - Apply to $this (current element)\n */\nexport function applyNode(selector: string, options?: ApplyNodeQueryOptions): MethodDecorator;\nexport function applyNode(selector: ApplyNodeFnSelector, options?: ApplyNodeNonQueryOptions): MethodDecorator;\nexport function applyNode(options: ApplyNodeQueryOptions): MethodDecorator;\nexport function applyNode(selectorOrOptions: ApplyNodeSelector | ApplyNodeOptions, maybeOptions?: ApplyNodeOptions): MethodDecorator {\n // Determine selector and options based on overload\n let selector: ApplyNodeSelector;\n let options: ApplyNodeOptions;\n\n if (typeof selectorOrOptions === 'string' || typeof selectorOrOptions === 'function') {\n // First overload: applyNode(selector, options)\n selector = selectorOrOptions;\n options = maybeOptions || {position: 'replaceChildren'};\n } else {\n // Second overload: applyNode(options) - default to $this\n selector = '$this';\n options = selectorOrOptions || {position: 'replaceChildren'};\n }\n\n return (targetObj: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor) => {\n const constructor = targetObj.constructor;\n let metaList = ReflectUtils.getOwnMetadata(APPLY_NODE_METADATA_KEY, constructor) as Map<string | symbol, ApplyNodeMetadata>;\n if (!metaList) {\n metaList = new Map<string | symbol, ApplyNodeMetadata>();\n ReflectUtils.defineMetadata(APPLY_NODE_METADATA_KEY, metaList, constructor);\n }\n metaList.set(propertyKey, {propertyKey, selector, options});\n\n const original = descriptor.value;\n descriptor.value = function (...args: any[]) {\n ensureInit(this);\n\n const currentWin = SwcUtils.resolveWindow(this);\n const currentDoc = currentWin.document;\n const hostSet = SwcUtils.getHelperAndHostSet(this);\n\n const getTarget = () => {\n const r = options.root || 'auto';\n const applyRoot = (t: any) => {\n if (!t) return t;\n if (r === 'auto') return t.shadowRoot || t;\n if (r === 'shadow') return t.shadowRoot;\n if (r === 'light') return t;\n if (r === 'all') return t.shadowRoot || t;\n return t;\n };\n\n // Resolve selector if it's a function\n const resolved = resolveSelector(selector, this, currentWin);\n \n // If selector function returned an element directly, use it\n if (resolved instanceof currentWin.Element) {\n return applyRoot(resolved);\n }\n if (resolved === null) {\n return null;\n }\n\n // Handle string selector\n const stringSelector = resolved as string;\n\n if (stringSelector === '$this') return applyRoot(this);\n if (stringSelector === '$host') return applyRoot(hostSet.$host);\n if (stringSelector === '$parentHost') return applyRoot(hostSet.$parentHost);\n if (stringSelector === '$appHost') return applyRoot(hostSet.$appHost);\n if (stringSelector === '$firstHost') return applyRoot(hostSet.$firstHost);\n if (stringSelector === '$lastHost') return applyRoot(hostSet.$lastHost);\n\n const targetRoot = applyRoot(this);\n return targetRoot ? targetRoot.querySelector(stringSelector) : null;\n };\n\n const targetEl = getTarget();\n const res = original.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 APPLY_NODE_METADATA_KEY.\n */\n const extractValue = (v: any) => {\n const keyToUse = options.valueKey ?? APPLY_NODE_METADATA_KEY;\n if (v && typeof v === 'object' && keyToUse in v) {\n return v[keyToUse];\n }\n return v;\n };\n\n const runApply = (target: any, val: any) => {\n const pos = options.position || 'beforeEnd';\n // remove \uB294 \uAC12\uC774 '\uC9C0\uC6B8\uC9C0 \uB9D0\uC9C0' \uB2E4: truthy \uC77C \uB54C\uB9CC \uC9C0\uC6B4\uB2E4 (undefined \uB294 \uC704\uC5D0\uC11C \uC774\uBBF8 \uAC78\uB7EC\uC9D0)\n if (pos === 'remove' && !val) return;\n // Delegate HTML/node processing to applyToDom which centralizes\n // processing. runApply should not call processHtml itself to avoid\n // duplicate processing.\n const processedVal = val;\n\n // \uC0AC\uC6A9\uC790\uAC00 filter\uB97C \uBA85\uC2DC\uD558\uBA74 \uADF8 \uC870\uAC74\uC73C\uB85C, \uC544\uB2C8\uBA74 \uD56D\uC0C1 \uC801\uC6A9\n if (!options.filter || options.filter(target, processedVal, {currentThis: this, helper: hostSet})) {\n applyToDom(this, target, processedVal, pos, currentWin);\n }\n };\n\n\n const fallbackNodes: Node[] = [];\n if (targetEl && options.fallback) {\n const loadingRes = options.fallback.call(this, hostSet);\n // applyToDom expects a Window as the 4th argument\n fallbackNodes.push(...applyToDom(this, targetEl, loadingRes, options.position || 'beforeEnd', currentWin));\n }\n\n if (res instanceof Promise) {\n return res.then(finalRes => {\n const extracted = extractValue(finalRes);\n fallbackNodes.forEach((it: any)=>it.remove());\n if (extracted !== undefined && targetEl) runApply(targetEl, extracted);\n return finalRes;\n });\n } else {\n const extracted = extractValue(res);\n if (extracted !== undefined && targetEl) runApply(targetEl, extracted);\n return res;\n }\n };\n };\n}\n\n// --- Overloaded convenience functions for common patterns ---\n\n/**\n * @replaceChildrenNode decorator - replaces children of target element\n * \n * Overloads:\n * - replaceChildrenNode(selector, options) - Replace children of specific selector\n * - replaceChildrenNode(options) - Replace children of $this (current element)\n * - @replaceChildrenNode - Bare decorator, replaces children of $this\n */\nexport type ApplyNodeQueryOptionsNoPos = Omit<ApplyNodeQueryOptions, 'position'>;\nexport type ApplyNodeNonQueryOptionsNoPos = Omit<ApplyNodeNonQueryOptions, 'position'>;\nexport type ApplyNodeOptionsOfNoPos<S extends ApplyNodeSelector> = S extends string ? ApplyNodeQueryOptionsNoPos : ApplyNodeNonQueryOptionsNoPos;\n\nexport function replaceChildren(selector: string, options?: ApplyNodeQueryOptionsNoPos): MethodDecorator;\nexport function replaceChildren(selector: ApplyNodeFnSelector, options?: ApplyNodeNonQueryOptionsNoPos): MethodDecorator;\nexport function replaceChildren(options: ApplyNodeQueryOptionsNoPos): MethodDecorator;\nexport function replaceChildren(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;\nexport function replaceChildren(selectorOrOptions?: ApplyNodeSelector | Omit<ApplyNodeOptions, 'position'> | Object, maybeOptions?: Omit<ApplyNodeOptions, 'position'> | string | symbol, descriptor?: PropertyDescriptor): MethodDecorator | PropertyDescriptor | void {\n // Bare decorator usage: @replaceChildrenNode\n if (descriptor !== undefined && (typeof maybeOptions === 'symbol' || typeof maybeOptions === 'string')) {\n return applyNode({position: 'replaceChildren'})(selectorOrOptions, maybeOptions, descriptor);\n }\n \n if (typeof selectorOrOptions === 'string' || typeof selectorOrOptions === 'function') {\n return applyNode(selectorOrOptions as any, {...maybeOptions as Omit<ApplyNodeOptions, 'position'>, position: 'replaceChildren'});\n }\n return applyNode({...selectorOrOptions as Omit<ApplyNodeOptions, 'position'>, position: 'replaceChildren'});\n}\n\n/**\n * @clearChildrenNode decorator - clears all children of target element\n * \n * Overloads:\n * - clearChildrenNode(selector, options) - Clear children of specific selector\n * - clearChildrenNode(options) - Clear children of $this (current element)\n * - @clearChildrenNode - Bare decorator, clears children of $this\n */\nexport function clearChildrenNode(selector: ApplyNodeSelector, options?: Omit<ApplyNodeOptions, 'position'>): MethodDecorator;\nexport function clearChildrenNode(options: Omit<ApplyNodeOptions, 'position'>): MethodDecorator;\nexport function clearChildrenNode(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;\nexport function clearChildrenNode(selectorOrOptions?: ApplyNodeSelector | Omit<ApplyNodeOptions, 'position'> | Object, maybeOptions?: Omit<ApplyNodeOptions, 'position'> | string | symbol, descriptor?: PropertyDescriptor): MethodDecorator | PropertyDescriptor | void {\n // Bare decorator usage: @clearChildrenNode\n if (descriptor !== undefined && (typeof maybeOptions === 'symbol' || typeof maybeOptions === 'string')) {\n return applyNode({position: 'clearChildren'})(selectorOrOptions, maybeOptions, descriptor);\n }\n \n if (typeof selectorOrOptions === 'string' || typeof selectorOrOptions === 'function') {\n return applyNode(selectorOrOptions as any, {...maybeOptions as Omit<ApplyNodeOptions, 'position'>, position: 'clearChildren'});\n }\n return applyNode({...selectorOrOptions as Omit<ApplyNodeOptions, 'position'>, position: 'clearChildren'});\n}\n\n// Alias for clearChildrenNode\nexport const clearNode = clearChildrenNode;\n\n/**\n * @removeNode - \uBA54\uC11C\uB4DC \uBC18\uD658\uAC12\uC774 truthy \uBA74 \uB300\uC0C1 \uC5D8\uB9AC\uBA3C\uD2B8\uB97C DOM\uC5D0\uC11C \uC81C\uAC70\uD55C\uB2E4.\n * \uBC18\uD658\uAC12(valueKey \uAC00 \uC788\uC73C\uBA74 \uADF8 \uAC12)\uC774 falsy(undefined / null / false / 0 / '')\uBA74 \uC81C\uAC70\uD558\uC9C0 \uC54A\uB294\uB2E4. \uBC18\uD658\uAC12\uC740 \uADF8\uB300\uB85C \uD1B5\uACFC.\n * \uC120\uD0DD\uC790\uC5D0 \uB9DE\uB294 \uCCAB \uBC88\uC9F8 \uC5D8\uB9AC\uBA3C\uD2B8\uB97C \uC9C0\uC6B4\uB2E4. \uC120\uD0DD\uC790\uAC00 \uC5C6\uAC70\uB098 '$this' \uBA74 \uC790\uAE30 \uC790\uC2E0\uC744 \uC9C0\uC6B4\uB2E4.\n *\n * - @removeNode('.toast') / @removeNode('.toast', { valueKey: 'close' })\n * - @removeNode({ valueKey: 'done' }) ($this)\n * - @removeNode ($this, bare)\n */\nexport function removeNode(selector: ApplyNodeSelector, options?: Omit<ApplyNodeOptions, 'position'>): MethodDecorator;\nexport function removeNode(options: Omit<ApplyNodeOptions, 'position'>): MethodDecorator;\nexport function removeNode(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;\nexport function removeNode(selectorOrOptions?: ApplyNodeSelector | Omit<ApplyNodeOptions, 'position'> | Object, maybeOptions?: Omit<ApplyNodeOptions, 'position'> | string | symbol, descriptor?: PropertyDescriptor): MethodDecorator | PropertyDescriptor | void {\n if (descriptor !== undefined && (typeof maybeOptions === 'symbol' || typeof maybeOptions === 'string')) {\n return applyNode({position: 'remove'})(selectorOrOptions as Object, maybeOptions, descriptor);\n }\n if (typeof selectorOrOptions === 'string' || typeof selectorOrOptions === 'function') {\n return applyNode(selectorOrOptions as any, {...maybeOptions as Omit<ApplyNodeOptions, 'position'>, position: 'remove'});\n }\n return applyNode({...selectorOrOptions as Omit<ApplyNodeOptions, 'position'>, position: 'remove'});\n}\n\n/**\n * @innerHtmlNode decorator - sets innerHTML of target element\n * \n * Overloads:\n * - innerHtmlNode(selector, options) - Set innerHTML of specific selector\n * - innerHtmlNode(options) - Set innerHTML of $this (current element)\n * - @innerHtmlNode - Bare decorator, sets innerHTML of $this\n */\nexport function innerHtml(selector: ApplyNodeSelector, options?: Omit<ApplyNodeOptions, 'position'>): MethodDecorator;\nexport function innerHtml(options: Omit<ApplyNodeOptions, 'position'>): MethodDecorator;\nexport function innerHtml(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;\nexport function innerHtml(selectorOrOptions?: ApplyNodeSelector | Omit<ApplyNodeOptions, 'position'> | Object, maybeOptions?: Omit<ApplyNodeOptions, 'position'> | string | symbol, descriptor?: PropertyDescriptor): MethodDecorator | PropertyDescriptor | void {\n // Bare decorator usage: @innerHtmlNode\n if (descriptor !== undefined && (typeof maybeOptions === 'symbol' || typeof maybeOptions === 'string')) {\n return applyNode({position: 'innerHtml'})(selectorOrOptions, maybeOptions, descriptor);\n }\n \n if (typeof selectorOrOptions === 'string' || typeof selectorOrOptions === 'function') {\n return applyNode(selectorOrOptions as any, {...maybeOptions as Omit<ApplyNodeOptions, 'position'>, position: 'innerHtml'});\n }\n return applyNode({...selectorOrOptions as Omit<ApplyNodeOptions, 'position'>, position: 'innerHtml'});\n}\n\n// Alias for innerHtmlNode\n// export const setHtmlNode = innerHtml;\n\n/**\n * @innerHtmlLightNode decorator - sets innerHTML of light DOM element\n * \n * Overloads:\n * - innerHtmlLightNode(selector, options) - Set innerHTML of specific selector in light DOM\n * - innerHtmlLightNode(options) - Set innerHTML of $this in light DOM\n * - @innerHtmlLightNode - Bare decorator, sets innerHTML of $this in light DOM\n */\nexport function innerHtmlLight(selector: ApplyNodeSelector, options?: Omit<ApplyNodeOptions, 'position' | 'root'>): MethodDecorator;\nexport function innerHtmlLight(options: Omit<ApplyNodeOptions, 'position' | 'root'>): MethodDecorator;\nexport function innerHtmlLight(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;\nexport function innerHtmlLight(selectorOrOptions?: ApplyNodeSelector | Omit<ApplyNodeOptions, 'position' | 'root'> | Object, maybeOptions?: Omit<ApplyNodeOptions, 'position' | 'root'> | string | symbol, descriptor?: PropertyDescriptor): MethodDecorator | PropertyDescriptor | void {\n // Bare decorator usage: @innerHtmlLightNode\n if (descriptor !== undefined && (typeof maybeOptions === 'symbol' || typeof maybeOptions === 'string')) {\n return applyNode({position: 'innerHtml', root: 'light'})(selectorOrOptions, maybeOptions, descriptor);\n }\n \n if (typeof selectorOrOptions === 'string' || typeof selectorOrOptions === 'function') {\n return applyNode(selectorOrOptions as any, {...maybeOptions as Omit<ApplyNodeOptions, 'position' | 'root'>, position: 'innerHtml', root: 'light'});\n }\n return applyNode({...selectorOrOptions as Omit<ApplyNodeOptions, 'position' | 'root'>, position: 'innerHtml', root: 'light'});\n}\n\n\n/**\n * @innerHtmlShadowNode decorator - sets innerHTML of shadow DOM element\n * \n * Overloads:\n * - innerHtmlShadowNode(selector, options) - Set innerHTML of specific selector in shadow DOM\n * - innerHtmlShadowNode(options) - Set innerHTML of $this in shadow DOM\n * - @innerHtmlShadowNode - Bare decorator, sets innerHTML of $this in shadow DOM\n */\nexport function innerHtmlShadow(selector: ApplyNodeSelector, options?: Omit<ApplyNodeOptions, 'position' | 'root'>): MethodDecorator;\nexport function innerHtmlShadow(options: Omit<ApplyNodeOptions, 'position' | 'root'>): MethodDecorator;\nexport function innerHtmlShadow(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;\nexport function innerHtmlShadow(selectorOrOptions?: ApplyNodeSelector | Omit<ApplyNodeOptions, 'position' | 'root'> | Object, maybeOptions?: Omit<ApplyNodeOptions, 'position' | 'root'> | string | symbol, descriptor?: PropertyDescriptor): MethodDecorator | PropertyDescriptor | void {\n // Bare decorator usage: @innerHtmlShadowNode\n if (descriptor !== undefined && (typeof maybeOptions === 'symbol' || typeof maybeOptions === 'string')) {\n return applyNode({position: 'innerHtml', root: 'shadow'})(selectorOrOptions, maybeOptions, descriptor);\n }\n \n if (typeof selectorOrOptions === 'string' || typeof selectorOrOptions === 'function') {\n return applyNode(selectorOrOptions as any, {...maybeOptions as Omit<ApplyNodeOptions, 'position' | 'root'>, position: 'innerHtml', root: 'shadow'});\n }\n return applyNode({...selectorOrOptions as Omit<ApplyNodeOptions, 'position' | 'root'>, position: 'innerHtml', root: 'shadow'});\n}\n\n\n/**\n * @innerTextNode decorator - sets innerText of target element\n * \n * Overloads:\n * - innerTextNode(selector, options) - Set innerText of specific selector\n * - innerTextNode(options) - Set innerText of $this (current element)\n * - @innerTextNode - Bare decorator, sets innerText of $this\n */\nexport function innerText(selector: ApplyNodeSelector, options?: Omit<ApplyNodeOptions, 'position'>): MethodDecorator;\nexport function innerText(options: Omit<ApplyNodeOptions, 'position'>): MethodDecorator;\nexport function innerText(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;\nexport function innerText(selectorOrOptions?: ApplyNodeSelector | Omit<ApplyNodeOptions, 'position'> | Object, maybeOptions?: Omit<ApplyNodeOptions, 'position'> | string | symbol, descriptor?: PropertyDescriptor): MethodDecorator | PropertyDescriptor | void {\n // Bare decorator usage: @innerTextNode\n if (descriptor !== undefined && (typeof maybeOptions === 'symbol' || typeof maybeOptions === 'string')) {\n return applyNode({position: 'innerText'})(selectorOrOptions, maybeOptions, descriptor);\n }\n \n if (typeof selectorOrOptions === 'string' || typeof selectorOrOptions === 'function') {\n return applyNode(selectorOrOptions as any, {...maybeOptions as Omit<ApplyNodeOptions, 'position'>, position: 'innerText'});\n }\n return applyNode({...selectorOrOptions as Omit<ApplyNodeOptions, 'position'>, position: 'innerText'});\n}\n\n\n/**\n * @innerTextLightNode decorator - sets innerText of light DOM element\n * \n * Overloads:\n * - innerTextLightNode(selector, options) - Set innerText of specific selector in light DOM\n * - innerTextLightNode(options) - Set innerText of $this in light DOM\n * - @innerTextLightNode - Bare decorator, sets innerText of $this in light DOM\n */\nexport function innerTextLight(selector: ApplyNodeSelector, options?: Omit<ApplyNodeOptions, 'position' | 'root'>): MethodDecorator;\nexport function innerTextLight(options: Omit<ApplyNodeOptions, 'position' | 'root'>): MethodDecorator;\nexport function innerTextLight(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;\nexport function innerTextLight(selectorOrOptions?: ApplyNodeSelector | Omit<ApplyNodeOptions, 'position' | 'root'> | Object, maybeOptions?: Omit<ApplyNodeOptions, 'position' | 'root'> | string | symbol, descriptor?: PropertyDescriptor): MethodDecorator | PropertyDescriptor | void {\n // Bare decorator usage: @innerTextLightNode\n if (descriptor !== undefined && (typeof maybeOptions === 'symbol' || typeof maybeOptions === 'string')) {\n return applyNode({position: 'innerText', root: 'light'})(selectorOrOptions, maybeOptions, descriptor);\n }\n \n if (typeof selectorOrOptions === 'string' || typeof selectorOrOptions === 'function') {\n return applyNode(selectorOrOptions as any, {...maybeOptions as Omit<ApplyNodeOptions, 'position' | 'root'>, position: 'innerText', root: 'light'});\n }\n return applyNode({...selectorOrOptions as Omit<ApplyNodeOptions, 'position' | 'root'>, position: 'innerText', root: 'light'});\n}\n\n/**\n * @innerTextShadowNode decorator - sets innerText of shadow DOM element\n * \n * Overloads:\n * - innerTextShadowNode(selector, options) - Set innerText of specific selector in shadow DOM\n * - innerTextShadowNode(options) - Set innerText of $this in shadow DOM\n * - @innerTextShadowNode - Bare decorator, sets innerText of $this in shadow DOM\n */\nexport function innerTextShadow(selector: ApplyNodeSelector, options?: Omit<ApplyNodeOptions, 'position' | 'root'>): MethodDecorator;\nexport function innerTextShadow(options: Omit<ApplyNodeOptions, 'position' | 'root'>): MethodDecorator;\nexport function innerTextShadow(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;\nexport function innerTextShadow(selectorOrOptions?: ApplyNodeSelector | Omit<ApplyNodeOptions, 'position' | 'root'> | Object, maybeOptions?: Omit<ApplyNodeOptions, 'position' | 'root'> | string | symbol, descriptor?: PropertyDescriptor): MethodDecorator | PropertyDescriptor | void {\n // Bare decorator usage: @innerTextShadowNode\n if (descriptor !== undefined && (typeof maybeOptions === 'symbol' || typeof maybeOptions === 'string')) {\n return applyNode({position: 'innerText', root: 'shadow'})(selectorOrOptions, maybeOptions, descriptor);\n }\n \n if (typeof selectorOrOptions === 'string' || typeof selectorOrOptions === 'function') {\n return applyNode(selectorOrOptions as any, {...maybeOptions as Omit<ApplyNodeOptions, 'position' | 'root'>, position: 'innerText', root: 'shadow'});\n }\n return applyNode({...selectorOrOptions as Omit<ApplyNodeOptions, 'position' | 'root'>, position: 'innerText', root: 'shadow'});\n}\n\n/**\n * @beforeEndNode decorator - appends nodes to target element\n * \n * Overloads:\n * - beforeEndNode(selector, options) - Append to specific selector\n * - beforeEndNode(options) - Append to $this (current element)\n * - @beforeEndNode - Bare decorator, appends to $this\n */\nexport function insertBeforeEnd(selector: ApplyNodeSelector, options?: Omit<ApplyNodeOptions, 'position'>): MethodDecorator;\nexport function insertBeforeEnd(options: Omit<ApplyNodeOptions, 'position'>): MethodDecorator;\nexport function insertBeforeEnd(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;\nexport function insertBeforeEnd(selectorOrOptions?: ApplyNodeSelector | Omit<ApplyNodeOptions, 'position'> | Object, maybeOptions?: Omit<ApplyNodeOptions, 'position'> | string | symbol, descriptor?: PropertyDescriptor): MethodDecorator | PropertyDescriptor | void {\n // Bare decorator usage: @beforeEndNode\n if (descriptor !== undefined && (typeof maybeOptions === 'symbol' || typeof maybeOptions === 'string')) {\n return applyNode({position: 'beforeEnd'})(selectorOrOptions, maybeOptions, descriptor);\n }\n \n if (typeof selectorOrOptions === 'string' || typeof selectorOrOptions === 'function') {\n return applyNode(selectorOrOptions as any, {...maybeOptions as Omit<ApplyNodeOptions, 'position'>, position: 'beforeEnd'});\n }\n return applyNode({...selectorOrOptions as Omit<ApplyNodeOptions, 'position'>, position: 'beforeEnd'});\n}\n\n\n/**\n * @beforeEndLightNode decorator - appends nodes to light DOM element\n * \n * Overloads:\n * - beforeEndLightNode(selector, options) - Append to specific selector in light DOM\n * - beforeEndLightNode(options) - Append to $this in light DOM\n * - @beforeEndLightNode - Bare decorator, appends to $this in light DOM\n */\nexport function insertBeforeEndLight(selector: ApplyNodeSelector, options?: Omit<ApplyNodeOptions, 'position' | 'root'>): MethodDecorator;\nexport function insertBeforeEndLight(options: Omit<ApplyNodeOptions, 'position' | 'root'>): MethodDecorator;\nexport function insertBeforeEndLight(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;\nexport function insertBeforeEndLight(selectorOrOptions?: ApplyNodeSelector | Omit<ApplyNodeOptions, 'position' | 'root'> | Object, maybeOptions?: Omit<ApplyNodeOptions, 'position' | 'root'> | string | symbol, descriptor?: PropertyDescriptor): MethodDecorator | PropertyDescriptor | void {\n // Bare decorator usage: @beforeEndLightNode\n if (descriptor !== undefined && (typeof maybeOptions === 'symbol' || typeof maybeOptions === 'string')) {\n return applyNode({position: 'beforeEnd', root: 'light'})(selectorOrOptions, maybeOptions, descriptor);\n }\n \n if (typeof selectorOrOptions === 'string' || typeof selectorOrOptions === 'function') {\n return applyNode(selectorOrOptions as any, {...maybeOptions as Omit<ApplyNodeOptions, 'position' | 'root'>, position: 'beforeEnd', root: 'light'});\n }\n return applyNode({...selectorOrOptions as Omit<ApplyNodeOptions, 'position' | 'root'>, position: 'beforeEnd', root: 'light'});\n}\n\n\n/**\n * @beforeEndShadowNode decorator - appends nodes to shadow DOM element\n * \n * Overloads:\n * - beforeEndShadowNode(selector, options) - Append to specific selector in shadow DOM\n * - beforeEndShadowNode(options) - Append to $this in shadow DOM\n * - @beforeEndShadowNode - Bare decorator, appends to $this in shadow DOM\n */\nexport function insertBeforeEndShadow(selector: ApplyNodeSelector, options?: Omit<ApplyNodeOptions, 'position' | 'root'>): MethodDecorator;\nexport function insertBeforeEndShadow(options: Omit<ApplyNodeOptions, 'position' | 'root'>): MethodDecorator;\nexport function insertBeforeEndShadow(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;\nexport function insertBeforeEndShadow(selectorOrOptions?: ApplyNodeSelector | Omit<ApplyNodeOptions, 'position' | 'root'> | Object, maybeOptions?: Omit<ApplyNodeOptions, 'position' | 'root'> | string | symbol, descriptor?: PropertyDescriptor): MethodDecorator | PropertyDescriptor | void {\n // Bare decorator usage: @beforeEndShadowNode\n if (descriptor !== undefined && (typeof maybeOptions === 'symbol' || typeof maybeOptions === 'string')) {\n return applyNode({position: 'beforeEnd', root: 'shadow'})(selectorOrOptions, maybeOptions, descriptor);\n }\n \n if (typeof selectorOrOptions === 'string' || typeof selectorOrOptions === 'function') {\n return applyNode(selectorOrOptions as any, {...maybeOptions as Omit<ApplyNodeOptions, 'position' | 'root'>, position: 'beforeEnd', root: 'shadow'});\n }\n return applyNode({...selectorOrOptions as Omit<ApplyNodeOptions, 'position' | 'root'>, position: 'beforeEnd', root: 'shadow'});\n}\n\n\n/**\n * @afterBeginNode decorator - prepends nodes to target element\n * \n * Overloads:\n * - afterBeginNode(selector, options) - Prepend to specific selector\n * - afterBeginNode(options) - Prepend to $this (current element)\n * - @afterBeginNode - Bare decorator, prepends to $this\n */\nexport function insertAfterBegin(selector: ApplyNodeSelector, options?: Omit<ApplyNodeOptions, 'position'>): MethodDecorator;\nexport function insertAfterBegin(options: Omit<ApplyNodeOptions, 'position'>): MethodDecorator;\nexport function insertAfterBegin(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;\nexport function insertAfterBegin(selectorOrOptions?: ApplyNodeSelector | Omit<ApplyNodeOptions, 'position'> | Object, maybeOptions?: Omit<ApplyNodeOptions, 'position'> | string | symbol, descriptor?: PropertyDescriptor): MethodDecorator | PropertyDescriptor | void {\n // Bare decorator usage: @afterBeginNode\n if (descriptor !== undefined && (typeof maybeOptions === 'symbol' || typeof maybeOptions === 'string')) {\n return applyNode({position: 'afterBegin'})(selectorOrOptions, maybeOptions, descriptor);\n }\n \n if (typeof selectorOrOptions === 'string' || typeof selectorOrOptions === 'function') {\n return applyNode(selectorOrOptions as any, {...maybeOptions as Omit<ApplyNodeOptions, 'position'>, position: 'afterBegin'});\n }\n return applyNode({...selectorOrOptions as Omit<ApplyNodeOptions, 'position'>, position: 'afterBegin'});\n}\n\n\n/**\n * @afterBeginLightNode decorator - prepends nodes to light DOM element\n * \n * Overloads:\n * - afterBeginLightNode(selector, options) - Prepend to specific selector in light DOM\n * - afterBeginLightNode(options) - Prepend to $this in light DOM\n * - @afterBeginLightNode - Bare decorator, prepends to $this in light DOM\n */\nexport function insertAfterBeginLight(selector: ApplyNodeSelector, options?: Omit<ApplyNodeOptions, 'position' | 'root'>): MethodDecorator;\nexport function insertAfterBeginLight(options: Omit<ApplyNodeOptions, 'position' | 'root'>): MethodDecorator;\nexport function insertAfterBeginLight(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;\nexport function insertAfterBeginLight(selectorOrOptions?: ApplyNodeSelector | Omit<ApplyNodeOptions, 'position' | 'root'> | Object, maybeOptions?: Omit<ApplyNodeOptions, 'position' | 'root'> | string | symbol, descriptor?: PropertyDescriptor): MethodDecorator | PropertyDescriptor | void {\n // Bare decorator usage: @afterBeginLightNode\n if (descriptor !== undefined && (typeof maybeOptions === 'symbol' || typeof maybeOptions === 'string')) {\n return applyNode({position: 'afterBegin', root: 'light'})(selectorOrOptions, maybeOptions, descriptor);\n }\n \n if (typeof selectorOrOptions === 'string' || typeof selectorOrOptions === 'function') {\n return applyNode(selectorOrOptions as any, {...maybeOptions as Omit<ApplyNodeOptions, 'position' | 'root'>, position: 'afterBegin', root: 'light'});\n }\n return applyNode({...selectorOrOptions as Omit<ApplyNodeOptions, 'position' | 'root'>, position: 'afterBegin', root: 'light'});\n}\n\n\n/**\n * @replaceChildrenLightNode decorator - replaces children of light DOM element\n * \n * Overloads:\n * - replaceChildrenLightNode(selector, options) - Replace children of specific selector in light DOM\n * - replaceChildrenLightNode(options) - Replace children of $this in light DOM\n * - @replaceChildrenLightNode - Bare decorator, replaces children of $this in light DOM\n */\nexport function replaceChildrenLight(selector: ApplyNodeSelector, options?: Omit<ApplyNodeOptions, 'position' | 'root'>): MethodDecorator;\nexport function replaceChildrenLight(options: Omit<ApplyNodeOptions, 'position' | 'root'>): MethodDecorator;\nexport function replaceChildrenLight(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;\nexport function replaceChildrenLight(selectorOrOptions?: ApplyNodeSelector | Omit<ApplyNodeOptions, 'position' | 'root'> | Object, maybeOptions?: Omit<ApplyNodeOptions, 'position' | 'root'> | string | symbol, descriptor?: PropertyDescriptor): MethodDecorator | PropertyDescriptor | void {\n // Bare decorator usage: @replaceChildrenLightNode\n if (descriptor !== undefined && (typeof maybeOptions === 'symbol' || typeof maybeOptions === 'string')) {\n return applyNode({position: 'replaceChildren', root: 'light'})(selectorOrOptions, maybeOptions, descriptor);\n }\n \n if (typeof selectorOrOptions === 'string' || typeof selectorOrOptions === 'function') {\n return applyNode(selectorOrOptions as any, {...maybeOptions as Omit<ApplyNodeOptions, 'position' | 'root'>, position: 'replaceChildren', root: 'light'});\n }\n return applyNode({...selectorOrOptions as Omit<ApplyNodeOptions, 'position' | 'root'>, position: 'replaceChildren', root: 'light'});\n}\n\n/**\n * @clearChildrenLightNode decorator - clears children of light DOM element\n * \n * Overloads:\n * - clearChildrenLightNode(selector, options) - Clear children of specific selector in light DOM\n * - clearChildrenLightNode(options) - Clear children of $this in light DOM\n * - @clearChildrenLightNode - Bare decorator, clears children of $this in light DOM\n */\nexport function clearChildrenLight(selector: ApplyNodeSelector, options?: Omit<ApplyNodeOptions, 'position' | 'root'>): MethodDecorator;\nexport function clearChildrenLight(options: Omit<ApplyNodeOptions, 'position' | 'root'>): MethodDecorator;\nexport function clearChildrenLight(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;\nexport function clearChildrenLight(selectorOrOptions?: ApplyNodeSelector | Omit<ApplyNodeOptions, 'position' | 'root'> | Object, maybeOptions?: Omit<ApplyNodeOptions, 'position' | 'root'> | string | symbol, descriptor?: PropertyDescriptor): MethodDecorator | PropertyDescriptor | void {\n // Bare decorator usage: @clearChildrenLightNode\n if (descriptor !== undefined && (typeof maybeOptions === 'symbol' || typeof maybeOptions === 'string')) {\n return applyNode({position: 'clearChildren', root: 'light'})(selectorOrOptions, maybeOptions, descriptor);\n }\n \n if (typeof selectorOrOptions === 'string' || typeof selectorOrOptions === 'function') {\n return applyNode(selectorOrOptions as any, {...maybeOptions as Omit<ApplyNodeOptions, 'position' | 'root'>, position: 'clearChildren', root: 'light'});\n }\n return applyNode({...selectorOrOptions as Omit<ApplyNodeOptions, 'position' | 'root'>, position: 'clearChildren', root: 'light'});\n}\n\n\n\n\n// \u2500\u2500\u2500 Aliases \u2500\u2500\u2500\nexport const apply = applyNode;\nexport const node = applyNode;\n\n// \u2500\u2500\u2500 \uD3B8\uC758 \uD5EC\uD37C (selector/root \uC0DD\uB7B5) \u2500\u2500\u2500\n\nexport function applyAppHost(options: ApplyNodeQueryOptions): MethodDecorator;\nexport function applyAppHost(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;\nexport function applyAppHost(optionsOrTarget?: ApplyNodeQueryOptions | Object, propertyKey?: string | symbol, descriptor?: PropertyDescriptor): MethodDecorator | PropertyDescriptor | void {\n if ((typeof propertyKey === 'string' || typeof propertyKey === 'symbol') && descriptor !== undefined) {\n return (applyNode('$appHost', {}) as any)(optionsOrTarget, propertyKey, descriptor);\n }\n return applyNode('$appHost', optionsOrTarget as ApplyNodeQueryOptions);\n}\nexport function applyLight(selector: string, options?: Omit<ApplyNodeQueryOptions, 'root'>): MethodDecorator {\n return applyNode(selector, {...options ?? {}, root: 'light'});\n}\nexport function applyShadow(selector: string, options?: Omit<ApplyNodeQueryOptions, 'root'>): MethodDecorator {\n return applyNode(selector, {...options ?? {}, root: 'shadow'});\n}\nexport function applyAll(selector: string, options?: Omit<ApplyNodeQueryOptions, 'root'>): MethodDecorator {\n return applyNode(selector, {...options ?? {}, root: 'all'});\n}\n\nexport const findAllApplyNodeMetadata = (target: any): Map<string | symbol, ApplyNodeMetadata> => {\n const result = new Map<string | symbol, ApplyNodeMetadata>();\n const maps = ReflectUtils.findAllMetadata<Map<string | symbol, ApplyNodeMetadata>>(APPLY_NODE_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// \u2500\u2500\u2500 filter \uC720\uD2F8 (applyNode/replace*/innerHtml* options.filter\uC6A9) \u2500\u2500\u2500\n// filter\uB294 true \uBC18\uD658 \uC2DC \uC801\uC6A9, false \uBC18\uD658 \uC2DC \uC2A4\uD0B5.\n\nconst filterScopeOf = (target: HTMLElement | ShadowRoot): Element | null => {\n if (target && typeof (target as HTMLElement).querySelector === 'function') {\n return target as unknown as Element;\n }\n const host = (target as ShadowRoot)?.host as unknown as Element | undefined;\n return host && typeof host.querySelector === 'function' ? host : null;\n};\n\nconst tagNameOf = (node: any): string | null => {\n const tag = node?.tagName;\n return typeof tag === 'string' ? tag.toLowerCase() : null;\n};\n\n// \uC0C8 \uB178\uB4DC\uC640 \uAC19\uC740 \uD0DC\uADF8\uAC00 target \uC548\uC5D0 \uC774\uBBF8 \uC788\uC73C\uBA74 \uC2A4\uD0B5 (SSR adopting\uC6A9).\nexport const skipIfSameTagPresent = (target: HTMLElement | ShadowRoot, newValue: any): boolean => {\n const nodes = (Array.isArray(newValue) ? newValue : [newValue]).filter((n) => tagNameOf(n) !== null);\n if (nodes.length === 0) return true;\n const scope = filterScopeOf(target);\n if (!scope) return true;\n return !nodes.some((n) => scope.querySelector(tagNameOf(n)!));\n};\n\n// \uC9C0\uC815 selector\uAC00 target \uC548\uC5D0 \uC774\uBBF8 \uC788\uC73C\uBA74 \uC2A4\uD0B5 (\uAC19\uC740 path \uCFFC\uB9AC \uBCC0\uACBD \uC2DC \uD398\uC774\uC9C0 \uC7AC\uC0DD\uC131 \uBC29\uC9C0\uC6A9).\n// \uC0AC\uC6A9: @innerHtmlLight({ filter: skipIfExists('center-math-page') })\nexport const skipIfExists = (selector: string) =>\n (target: HTMLElement | ShadowRoot): boolean => {\n const scope = filterScopeOf(target);\n if (!scope) return true;\n return !scope.querySelector(selector);\n };\n\n// \uC0C8 \uAC12\uC774 \uBE44\uC5B4\uC788\uC73C\uBA74 \uC2A4\uD0B5 (null/''/\uBE48 \uBC30\uC5F4).\nexport const skipIfEmpty = (_target: HTMLElement | ShadowRoot, newValue: any): boolean => {\n if (newValue === null || newValue === undefined || newValue === false) return false;\n if (typeof newValue === 'string') return newValue.trim().length > 0;\n if (Array.isArray(newValue)) return newValue.length > 0;\n return true;\n};\n\n// \uD14D\uC2A4\uD2B8\uAC00 \uB2EC\uB77C\uC9C8 \uB54C\uB9CC \uC801\uC6A9 (\uD3F4\uB9C1 \uAC31\uC2E0\uC6A9).\nexport const applyIfChanged = (target: HTMLElement | ShadowRoot, newValue: any): boolean => {\n const textOf = (v: any): string => {\n if (typeof v === 'string') return v;\n if (Array.isArray(v)) return v.map(textOf).join('');\n return typeof v?.textContent === 'string' ? v.textContent : '';\n };\n const current = typeof (target as HTMLElement)?.textContent === 'string' ? (target as HTMLElement).textContent! : '';\n return current !== textOf(newValue);\n};\n"],
5
- "mappings": "AAAA,SAAS,oBAAoB;AAC7B,SAAS,kBAAkB;AAE3B,SAAS,gBAAe;AACxB,SAAQ,4BAA2B;AACnC,SAAQ,oBAAmB;AAsCpB,MAAM,0BAA0B,OAAO,IAAI,iCAAiC;AAMnF,MAAM,kBAAkB,CAAC,UAA6B,MAAW,QAA6C;AAC5G,MAAI,OAAO,aAAa,YAAY;AAClC,UAAM,UAAU,SAAS,oBAAoB,IAAI;AACjD,UAAM,SAAS,SAAS,MAAM,OAAO;AAErC,QAAI,kBAAkB,IAAI,SAAS;AACjC,aAAO;AAAA,IACT;AACA,QAAI,kBAAkB,IAAI,UAAU;AAClC,aAAO,OAAO,SAAS,IAAK,OAAO,CAAC,IAAoB;AAAA,IAC1D;AACA,QAAI,MAAM,QAAQ,MAAM,GAAG;AACzB,aAAO,OAAO,SAAS,IAAK,OAAO,CAAC,IAAoB;AAAA,IAC1D;AACA,QAAI,WAAW,MAAM;AACnB,aAAO;AAAA,IACT;AAEA,WAAO;AAAA,EACT;AACA,SAAO;AACT;AAUA,MAAM,aAAa,CAAC,aAAkB,UAAuB,KAAmD,KAAwB,KAAa,SAAe;AAClK,MAAI,CAAC,SAAU;AAGf,MAAI,QAAQ,iBAAiB;AAC3B,aAAS,gBAAgB;AACzB,WAAO,CAAC;AAAA,EACV;AAGA,MAAI,QAAQ,UAAU;AACpB,KAAC,oBAAoB,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,MAAM,cAAc,QAAQ;AACtC;AAGK,MAAM,cAAc,CAAC,SAAmC,aAA2B;AACxF,MAAI,aAAa,QAAQ,aAAa,UAAa,aAAa,MAAO,QAAO;AAC9E,MAAI,OAAO,aAAa,SAAU,QAAO,SAAS,KAAK,EAAE,SAAS;AAClE,MAAI,MAAM,QAAQ,QAAQ,EAAG,QAAO,SAAS,SAAS;AACtD,SAAO;AACT;AAGO,MAAM,iBAAiB,CAAC,QAAkC,aAA2B;AAC1F,QAAM,SAAS,CAAC,MAAmB;AACjC,QAAI,OAAO,MAAM,SAAU,QAAO;AAClC,QAAI,MAAM,QAAQ,CAAC,EAAG,QAAO,EAAE,IAAI,MAAM,EAAE,KAAK,EAAE;AAClD,WAAO,OAAO,GAAG,gBAAgB,WAAW,EAAE,cAAc;AAAA,EAC9D;AACA,QAAM,UAAU,OAAQ,QAAwB,gBAAgB,WAAY,OAAuB,cAAe;AAClH,SAAO,YAAY,OAAO,QAAQ;AACpC;",
4
+ "sourcesContent": ["import { ReflectUtils } from '@dooboostore/core';\nimport { ensureInit } from './elementDefine';\nimport {SpecialSelector, SwcQueryOptions, SwcFnSelector, SwcSelector, HelperHostSet, SwcRootType} from '../types';\nimport { SwcUtils} from \"../utils/Utils\";\nimport {findAllStateMetadata} from \"./state\";\nimport {ElementApply} from \"@dooboostore/core-web\";\n/*\n<!-- beforebegin -->\n<p> <-- it's me\n <!-- afterbegin -->\n foo\n <!-- beforeend -->\n</p>\n<!-- afterend -->\n */\nexport type ApplyNodePosition = 'beforeBegin' | 'afterBegin' | 'beforeEnd' | 'afterEnd' | 'replace' | 'replaceChildren' | 'innerHtml' | 'innerText' | 'remove' | 'clearChildren';\n\nexport type ApplyNodeFnSelector = SwcFnSelector;\nexport type ApplyNodeSelector = SwcSelector;\n\n// \uACF5\uD1B5 \uC635\uC158 \u2014 root \uC5C6\uC74C\nexport interface ApplyNodeBaseOptions {\n position?: ApplyNodePosition;\n filter?: (target: HTMLElement | ShadowRoot, newValue: any, meta: { currentThis: any, helper: HelperHostSet }) => boolean;\n fallback?: (helper: HelperHostSet) => any;\n valueKey?: symbol | string;\n}\n\n// \uBB38\uC790\uC5F4 \uC140\uB809\uD130 \uC804\uC6A9 \u2014 root \uD5C8\uC6A9\nexport type ApplyNodeQueryOptions = ApplyNodeBaseOptions & { root?: SwcRootType };\n// \uD568\uC218 \uC140\uB809\uD130 \uC804\uC6A9 \u2014 root \uAE08\uC9C0\nexport type ApplyNodeNonQueryOptions = ApplyNodeBaseOptions;\nexport type ApplyNodeOptions = ApplyNodeQueryOptions;\n\n// \uC140\uB809\uD130 \uC885\uB958\uC5D0 \uB530\uB77C \uC635\uC158 \uD0C0\uC785 \uBD84\uAE30\nexport type ApplyNodeOptionsOf<S extends ApplyNodeSelector> = S extends string ? ApplyNodeQueryOptions : ApplyNodeNonQueryOptions;\n\nexport interface ApplyNodeMetadata {\n propertyKey: string | symbol;\n selector: ApplyNodeSelector;\n options: ApplyNodeOptions;\n}\n\nexport const APPLY_NODE_METADATA_KEY = Symbol.for('simple-web-component:apply-node');\n\n/**\n * Resolve selector to string or elements\n * Handles function-based selectors and returns elements if applicable\n */\nconst resolveSelector = (selector: ApplyNodeSelector, inst: any, win: Window): string | HTMLElement | null => {\n if (typeof selector === 'function') {\n const hostSet = SwcUtils.getHelperAndHostSet(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 result.length > 0 ? (result[0] as HTMLElement) : null;\n }\n if (Array.isArray(result)) {\n return result.length > 0 ? (result[0] as HTMLElement) : null;\n }\n if (result === null) {\n return null;\n }\n // result must be a string at this point\n return result as unknown as string;\n }\n return selector as string;\n};\n\n// const normalizeNodes = (res: any, doc: Document): Node[] => {\n// const items = Array.isArray(res) ? res : [res];\n// return items.map(it => {\n// if (it instanceof Node) return it;\n// return doc.createTextNode(it !== undefined && it !== null ? String(it) : '');\n// });\n// };\n\nconst applyToDom = (currentThis: any, targetEl: HTMLElement, res: Node | string | (Node | string)[] | NodeList, pos: ApplyNodePosition, win: Window, host?: any) => {\n if (!targetEl) return;\n \n // Handle clearChildren - ignore return value and always clear\n if (pos === 'clearChildren') {\n targetEl.replaceChildren();\n return [];\n }\n\n // remove: \uB300\uC0C1 \uC790\uCCB4\uB97C DOM\uC5D0\uC11C \uB5C0\uB2E4. $this \uCC98\uB7FC shadow root \uB85C \uC7A1\uD614\uC73C\uBA74 \uADF8 \uC8FC\uC778 \uC5D8\uB9AC\uBA3C\uD2B8\uB97C \uB5C0\uB2E4.\n if (pos === 'remove') {\n (targetEl instanceof win.ShadowRoot ? (targetEl as any).host : targetEl).remove();\n return [];\n }\n \n const doc = win.document;\n const hostSet = SwcUtils.getHelperAndHostSet(currentThis);\n const id = currentThis._swcId;\n\n // \uB9AC\uD134\uAC12 \u2192 \uB178\uB4DC: Node \uADF8\uB300\uB85C / \uBB38\uC790\uC5F4\uC740 innerText \uBA74 \uD14D\uC2A4\uD2B8, \uADF8 \uC678 \uC704\uCE58\uB294 HTML / \uBC30\uC5F4\u00B7NodeList \uB294 \uD56D\uBAA9\uB9C8\uB2E4.\n // Node \uD310\uB2E8\uC740 nodeType \uC73C\uB85C \u2014 \uB2E4\uB978 window(iframe) \uC5D0\uC11C \uB9CC\uB4E0 \uB178\uB4DC\uB294 instanceof win.Node \uAC00 false \uB77C\uC11C.\n const toNodes = (v: any): Node[] => {\n if (v === null || v === undefined || v === false) return [];\n if (typeof v === 'object' && typeof v.nodeType === 'number') return [v];\n if (typeof v === 'object' && typeof v.length === 'number') return Array.from(v as ArrayLike<any>).flatMap(toNodes);\n if (pos === 'innerText') return [doc.createTextNode(String(v))];\n const t = doc.createElement('template');\n t.innerHTML = String(v);\n return Array.from(t.content.childNodes);\n };\n const nodes: Node[] = toNodes(res);\n\n SwcUtils.projectProcessHtml(id, nodes, doc);\n\n const isShadowRoot = targetEl instanceof win.ShadowRoot;\n // const nodes = normalizeNodes(res, doc);\n if (pos === 'replace') {\n if (!isShadowRoot) targetEl.replaceWith(...nodes);\n } else if (pos === 'innerHtml') {\n targetEl.replaceChildren(...nodes);\n } else if (pos === 'innerText') {\n targetEl.replaceChildren(...nodes);\n } else if (pos === 'replaceChildren') {\n targetEl.replaceChildren(...nodes);\n } else {\n if (pos === 'beforeEnd') {\n targetEl.append(...nodes)\n }\n else if (pos === 'afterBegin') targetEl.prepend(...nodes);\n else if (pos === 'beforeBegin' && !isShadowRoot) targetEl.before(...nodes);\n else if (pos === 'afterEnd' && !isShadowRoot) targetEl.after(...nodes);\n }\n\n const stateContext: any = {...hostSet};\n findAllStateMetadata(currentThis).forEach(it => {\n stateContext[it.name] = currentThis[it.propertyKey]\n })\n new ElementApply(targetEl, {id: id}).apply({target: 'noInitialized', context: stateContext, bind: currentThis});\n return nodes;\n};\n\n/**\n * @applyNode decorator to surgically add/replace nodes to a target element.\n * \n * Overloads:\n * - applyNode(selector, options) - Apply to specific selector\n * - applyNode(options) - Apply to $this (current element)\n */\nexport function applyNode(selector: string, options?: ApplyNodeQueryOptions): MethodDecorator;\nexport function applyNode(selector: ApplyNodeFnSelector, options?: ApplyNodeNonQueryOptions): MethodDecorator;\nexport function applyNode(options: ApplyNodeQueryOptions): MethodDecorator;\nexport function applyNode(selectorOrOptions: ApplyNodeSelector | ApplyNodeOptions, maybeOptions?: ApplyNodeOptions): MethodDecorator {\n // Determine selector and options based on overload\n let selector: ApplyNodeSelector;\n let options: ApplyNodeOptions;\n\n if (typeof selectorOrOptions === 'string' || typeof selectorOrOptions === 'function') {\n // First overload: applyNode(selector, options)\n selector = selectorOrOptions;\n options = maybeOptions || {position: 'replaceChildren'};\n } else {\n // Second overload: applyNode(options) - default to $this\n selector = '$this';\n options = selectorOrOptions || {position: 'replaceChildren'};\n }\n\n return (targetObj: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor) => {\n const constructor = targetObj.constructor;\n let metaList = ReflectUtils.getOwnMetadata(APPLY_NODE_METADATA_KEY, constructor) as Map<string | symbol, ApplyNodeMetadata>;\n if (!metaList) {\n metaList = new Map<string | symbol, ApplyNodeMetadata>();\n ReflectUtils.defineMetadata(APPLY_NODE_METADATA_KEY, metaList, constructor);\n }\n metaList.set(propertyKey, {propertyKey, selector, options});\n\n const original = descriptor.value;\n descriptor.value = function (...args: any[]) {\n ensureInit(this);\n\n const currentWin = SwcUtils.resolveWindow(this);\n const currentDoc = currentWin.document;\n const hostSet = SwcUtils.getHelperAndHostSet(this);\n\n const getTarget = () => {\n const r = options.root || 'auto';\n const applyRoot = (t: any) => {\n if (!t) return t;\n if (r === 'auto') return t.shadowRoot || t;\n if (r === 'shadow') return t.shadowRoot;\n if (r === 'light') return t;\n if (r === 'all') return t.shadowRoot || t;\n return t;\n };\n\n // Resolve selector if it's a function\n const resolved = resolveSelector(selector, this, currentWin);\n \n // If selector function returned an element directly, use it\n if (resolved instanceof currentWin.Element) {\n return applyRoot(resolved);\n }\n if (resolved === null) {\n return null;\n }\n\n // Handle string selector\n const stringSelector = resolved as string;\n\n if (stringSelector === '$this') return applyRoot(this);\n if (stringSelector === '$host') return applyRoot(hostSet.$host);\n if (stringSelector === '$parentHost') return applyRoot(hostSet.$parentHost);\n if (stringSelector === '$appHost') return applyRoot(hostSet.$appHost);\n if (stringSelector === '$firstHost') return applyRoot(hostSet.$firstHost);\n if (stringSelector === '$lastHost') return applyRoot(hostSet.$lastHost);\n\n const targetRoot = applyRoot(this);\n return targetRoot ? targetRoot.querySelector(stringSelector) : null;\n };\n\n const targetEl = getTarget();\n const res = original.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 APPLY_NODE_METADATA_KEY.\n */\n const extractValue = (v: any) => {\n const keyToUse = options.valueKey ?? APPLY_NODE_METADATA_KEY;\n if (v && typeof v === 'object' && keyToUse in v) {\n return v[keyToUse];\n }\n return v;\n };\n\n // remove / clearChildren: \uC774\uB984\uC5D0 \uC774\uBBF8 \uC758\uB3C4\uAC00 \uC788\uC73C\uB2C8 \uBC18\uD658\uAC12\uACFC \uC0C1\uAD00\uC5C6\uC774 \uC2E4\uD589\uD55C\uB2E4.\n // valueKey \uB97C \uC92C\uC744 \uB54C\uB9CC \uADF8 \uD0A4 \uAC12\uC774 truthy \uC778\uC9C0 \uBCF8\uB2E4 (\uD0A4\uAC00 \uC5C6\uAC70\uB098 falsy \uBA74 \uC548 \uD568).\n const decide = (raw: any) => {\n if (options.position === 'remove' || options.position === 'clearChildren') {\n if (options.valueKey === undefined) return true;\n return raw && typeof raw === 'object' ? raw[options.valueKey] : undefined;\n }\n return extractValue(raw);\n };\n\n const runApply = (target: any, val: any) => {\n const pos = options.position || 'beforeEnd';\n // remove / clearChildren: valueKey \uB85C \uBF51\uC740 \uAC12\uC774 falsy \uBA74 \uC548 \uD55C\uB2E4 (valueKey \uC5C6\uC73C\uBA74 decide \uAC00 \uD56D\uC0C1 true)\n if ((pos === 'remove' || pos === 'clearChildren') && !val) return;\n // Delegate HTML/node processing to applyToDom which centralizes\n // processing. runApply should not call processHtml itself to avoid\n // duplicate processing.\n const processedVal = val;\n\n // \uC0AC\uC6A9\uC790\uAC00 filter\uB97C \uBA85\uC2DC\uD558\uBA74 \uADF8 \uC870\uAC74\uC73C\uB85C, \uC544\uB2C8\uBA74 \uD56D\uC0C1 \uC801\uC6A9\n if (!options.filter || options.filter(target, processedVal, {currentThis: this, helper: hostSet})) {\n applyToDom(this, target, processedVal, pos, currentWin);\n }\n };\n\n\n const fallbackNodes: Node[] = [];\n if (targetEl && options.fallback) {\n const loadingRes = options.fallback.call(this, hostSet);\n // applyToDom expects a Window as the 4th argument\n fallbackNodes.push(...applyToDom(this, targetEl, loadingRes, options.position || 'beforeEnd', currentWin));\n }\n\n if (res instanceof Promise) {\n return res.then(finalRes => {\n const extracted = decide(finalRes);\n fallbackNodes.forEach((it: any)=>it.remove());\n if (extracted !== undefined && targetEl) runApply(targetEl, extracted);\n return finalRes;\n });\n } else {\n const extracted = decide(res);\n if (extracted !== undefined && targetEl) runApply(targetEl, extracted);\n return res;\n }\n };\n };\n}\n\n// --- Overloaded convenience functions for common patterns ---\n\n/**\n * @replaceChildrenNode decorator - replaces children of target element\n * \n * Overloads:\n * - replaceChildrenNode(selector, options) - Replace children of specific selector\n * - replaceChildrenNode(options) - Replace children of $this (current element)\n * - @replaceChildrenNode - Bare decorator, replaces children of $this\n */\nexport type ApplyNodeQueryOptionsNoPos = Omit<ApplyNodeQueryOptions, 'position'>;\nexport type ApplyNodeNonQueryOptionsNoPos = Omit<ApplyNodeNonQueryOptions, 'position'>;\nexport type ApplyNodeOptionsOfNoPos<S extends ApplyNodeSelector> = S extends string ? ApplyNodeQueryOptionsNoPos : ApplyNodeNonQueryOptionsNoPos;\n\nexport function replaceChildren(selector: string, options?: ApplyNodeQueryOptionsNoPos): MethodDecorator;\nexport function replaceChildren(selector: ApplyNodeFnSelector, options?: ApplyNodeNonQueryOptionsNoPos): MethodDecorator;\nexport function replaceChildren(options: ApplyNodeQueryOptionsNoPos): MethodDecorator;\nexport function replaceChildren(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;\nexport function replaceChildren(selectorOrOptions?: ApplyNodeSelector | Omit<ApplyNodeOptions, 'position'> | Object, maybeOptions?: Omit<ApplyNodeOptions, 'position'> | string | symbol, descriptor?: PropertyDescriptor): MethodDecorator | PropertyDescriptor | void {\n // Bare decorator usage: @replaceChildrenNode\n if (descriptor !== undefined && (typeof maybeOptions === 'symbol' || typeof maybeOptions === 'string')) {\n return applyNode({position: 'replaceChildren'})(selectorOrOptions, maybeOptions, descriptor);\n }\n \n if (typeof selectorOrOptions === 'string' || typeof selectorOrOptions === 'function') {\n return applyNode(selectorOrOptions as any, {...maybeOptions as Omit<ApplyNodeOptions, 'position'>, position: 'replaceChildren'});\n }\n return applyNode({...selectorOrOptions as Omit<ApplyNodeOptions, 'position'>, position: 'replaceChildren'});\n}\n\n/**\n * @clearChildrenNode decorator - clears all children of target element\n * \uBC18\uD658\uAC12\uACFC \uC0C1\uAD00\uC5C6\uC774 \uBE44\uC6B4\uB2E4. valueKey \uB97C \uC92C\uC744 \uB54C\uB9CC \uADF8 \uD0A4 \uAC12\uC774 truthy \uC77C \uB54C \uBE44\uC6B4\uB2E4 (@removeNode \uC640 \uAC19\uC740 \uADDC\uCE59).\n * \n * Overloads:\n * - clearChildrenNode(selector, options) - Clear children of specific selector\n * - clearChildrenNode(options) - Clear children of $this (current element)\n * - @clearChildrenNode - Bare decorator, clears children of $this\n */\nexport function clearChildrenNode(selector: ApplyNodeSelector, options?: Omit<ApplyNodeOptions, 'position'>): MethodDecorator;\nexport function clearChildrenNode(options: Omit<ApplyNodeOptions, 'position'>): MethodDecorator;\nexport function clearChildrenNode(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;\nexport function clearChildrenNode(selectorOrOptions?: ApplyNodeSelector | Omit<ApplyNodeOptions, 'position'> | Object, maybeOptions?: Omit<ApplyNodeOptions, 'position'> | string | symbol, descriptor?: PropertyDescriptor): MethodDecorator | PropertyDescriptor | void {\n // Bare decorator usage: @clearChildrenNode\n if (descriptor !== undefined && (typeof maybeOptions === 'symbol' || typeof maybeOptions === 'string')) {\n return applyNode({position: 'clearChildren'})(selectorOrOptions, maybeOptions, descriptor);\n }\n \n if (typeof selectorOrOptions === 'string' || typeof selectorOrOptions === 'function') {\n return applyNode(selectorOrOptions as any, {...maybeOptions as Omit<ApplyNodeOptions, 'position'>, position: 'clearChildren'});\n }\n return applyNode({...selectorOrOptions as Omit<ApplyNodeOptions, 'position'>, position: 'clearChildren'});\n}\n\n// Alias for clearChildrenNode\nexport const clearNode = clearChildrenNode;\n\n/**\n * @removeNode - \uBA54\uC11C\uB4DC\uAC00 \uB05D\uB098\uBA74 \uB300\uC0C1 \uC5D8\uB9AC\uBA3C\uD2B8\uB97C DOM\uC5D0\uC11C \uC81C\uAC70\uD55C\uB2E4. \uBC18\uD658\uAC12\uC740 \uADF8\uB300\uB85C \uD1B5\uACFC.\n * - \uC774\uB984\uC5D0 \uC758\uB3C4\uAC00 \uC788\uC73C\uB2C8 \uBC18\uD658\uAC12\uACFC \uC0C1\uAD00\uC5C6\uC774 \uC9C0\uC6B4\uB2E4.\n * - valueKey \uB97C \uC92C\uC744 \uB54C\uB9CC \uADF8 \uD0A4 \uAC12\uC744 \uBCF8\uB2E4: truthy \uBA74 \uC9C0\uC6B0\uACE0, \uD0A4\uAC00 \uC5C6\uAC70\uB098 falsy \uBA74 \uC548 \uC9C0\uC6B4\uB2E4.\n * \uC120\uD0DD\uC790\uC5D0 \uB9DE\uB294 \uCCAB \uBC88\uC9F8 \uC5D8\uB9AC\uBA3C\uD2B8\uB97C \uC9C0\uC6B4\uB2E4. \uC120\uD0DD\uC790\uAC00 \uC5C6\uAC70\uB098 '$this' \uBA74 \uC790\uAE30 \uC790\uC2E0\uC744 \uC9C0\uC6B4\uB2E4.\n *\n * - @removeNode('.toast') / @removeNode('.toast', { valueKey: 'close' })\n * - @removeNode({ valueKey: 'done' }) ($this)\n * - @removeNode ($this, bare)\n */\nexport function removeNode(selector: ApplyNodeSelector, options?: Omit<ApplyNodeOptions, 'position'>): MethodDecorator;\nexport function removeNode(options: Omit<ApplyNodeOptions, 'position'>): MethodDecorator;\nexport function removeNode(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;\nexport function removeNode(selectorOrOptions?: ApplyNodeSelector | Omit<ApplyNodeOptions, 'position'> | Object, maybeOptions?: Omit<ApplyNodeOptions, 'position'> | string | symbol, descriptor?: PropertyDescriptor): MethodDecorator | PropertyDescriptor | void {\n if (descriptor !== undefined && (typeof maybeOptions === 'symbol' || typeof maybeOptions === 'string')) {\n return applyNode({position: 'remove'})(selectorOrOptions as Object, maybeOptions, descriptor);\n }\n if (typeof selectorOrOptions === 'string' || typeof selectorOrOptions === 'function') {\n return applyNode(selectorOrOptions as any, {...maybeOptions as Omit<ApplyNodeOptions, 'position'>, position: 'remove'});\n }\n return applyNode({...selectorOrOptions as Omit<ApplyNodeOptions, 'position'>, position: 'remove'});\n}\n\n/**\n * @innerHtmlNode decorator - sets innerHTML of target element\n * \n * Overloads:\n * - innerHtmlNode(selector, options) - Set innerHTML of specific selector\n * - innerHtmlNode(options) - Set innerHTML of $this (current element)\n * - @innerHtmlNode - Bare decorator, sets innerHTML of $this\n */\nexport function innerHtml(selector: ApplyNodeSelector, options?: Omit<ApplyNodeOptions, 'position'>): MethodDecorator;\nexport function innerHtml(options: Omit<ApplyNodeOptions, 'position'>): MethodDecorator;\nexport function innerHtml(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;\nexport function innerHtml(selectorOrOptions?: ApplyNodeSelector | Omit<ApplyNodeOptions, 'position'> | Object, maybeOptions?: Omit<ApplyNodeOptions, 'position'> | string | symbol, descriptor?: PropertyDescriptor): MethodDecorator | PropertyDescriptor | void {\n // Bare decorator usage: @innerHtmlNode\n if (descriptor !== undefined && (typeof maybeOptions === 'symbol' || typeof maybeOptions === 'string')) {\n return applyNode({position: 'innerHtml'})(selectorOrOptions, maybeOptions, descriptor);\n }\n \n if (typeof selectorOrOptions === 'string' || typeof selectorOrOptions === 'function') {\n return applyNode(selectorOrOptions as any, {...maybeOptions as Omit<ApplyNodeOptions, 'position'>, position: 'innerHtml'});\n }\n return applyNode({...selectorOrOptions as Omit<ApplyNodeOptions, 'position'>, position: 'innerHtml'});\n}\n\n// Alias for innerHtmlNode\n// export const setHtmlNode = innerHtml;\n\n/**\n * @innerHtmlLightNode decorator - sets innerHTML of light DOM element\n * \n * Overloads:\n * - innerHtmlLightNode(selector, options) - Set innerHTML of specific selector in light DOM\n * - innerHtmlLightNode(options) - Set innerHTML of $this in light DOM\n * - @innerHtmlLightNode - Bare decorator, sets innerHTML of $this in light DOM\n */\nexport function innerHtmlLight(selector: ApplyNodeSelector, options?: Omit<ApplyNodeOptions, 'position' | 'root'>): MethodDecorator;\nexport function innerHtmlLight(options: Omit<ApplyNodeOptions, 'position' | 'root'>): MethodDecorator;\nexport function innerHtmlLight(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;\nexport function innerHtmlLight(selectorOrOptions?: ApplyNodeSelector | Omit<ApplyNodeOptions, 'position' | 'root'> | Object, maybeOptions?: Omit<ApplyNodeOptions, 'position' | 'root'> | string | symbol, descriptor?: PropertyDescriptor): MethodDecorator | PropertyDescriptor | void {\n // Bare decorator usage: @innerHtmlLightNode\n if (descriptor !== undefined && (typeof maybeOptions === 'symbol' || typeof maybeOptions === 'string')) {\n return applyNode({position: 'innerHtml', root: 'light'})(selectorOrOptions, maybeOptions, descriptor);\n }\n \n if (typeof selectorOrOptions === 'string' || typeof selectorOrOptions === 'function') {\n return applyNode(selectorOrOptions as any, {...maybeOptions as Omit<ApplyNodeOptions, 'position' | 'root'>, position: 'innerHtml', root: 'light'});\n }\n return applyNode({...selectorOrOptions as Omit<ApplyNodeOptions, 'position' | 'root'>, position: 'innerHtml', root: 'light'});\n}\n\n\n/**\n * @innerHtmlShadowNode decorator - sets innerHTML of shadow DOM element\n * \n * Overloads:\n * - innerHtmlShadowNode(selector, options) - Set innerHTML of specific selector in shadow DOM\n * - innerHtmlShadowNode(options) - Set innerHTML of $this in shadow DOM\n * - @innerHtmlShadowNode - Bare decorator, sets innerHTML of $this in shadow DOM\n */\nexport function innerHtmlShadow(selector: ApplyNodeSelector, options?: Omit<ApplyNodeOptions, 'position' | 'root'>): MethodDecorator;\nexport function innerHtmlShadow(options: Omit<ApplyNodeOptions, 'position' | 'root'>): MethodDecorator;\nexport function innerHtmlShadow(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;\nexport function innerHtmlShadow(selectorOrOptions?: ApplyNodeSelector | Omit<ApplyNodeOptions, 'position' | 'root'> | Object, maybeOptions?: Omit<ApplyNodeOptions, 'position' | 'root'> | string | symbol, descriptor?: PropertyDescriptor): MethodDecorator | PropertyDescriptor | void {\n // Bare decorator usage: @innerHtmlShadowNode\n if (descriptor !== undefined && (typeof maybeOptions === 'symbol' || typeof maybeOptions === 'string')) {\n return applyNode({position: 'innerHtml', root: 'shadow'})(selectorOrOptions, maybeOptions, descriptor);\n }\n \n if (typeof selectorOrOptions === 'string' || typeof selectorOrOptions === 'function') {\n return applyNode(selectorOrOptions as any, {...maybeOptions as Omit<ApplyNodeOptions, 'position' | 'root'>, position: 'innerHtml', root: 'shadow'});\n }\n return applyNode({...selectorOrOptions as Omit<ApplyNodeOptions, 'position' | 'root'>, position: 'innerHtml', root: 'shadow'});\n}\n\n\n/**\n * @innerTextNode decorator - sets innerText of target element\n * \n * Overloads:\n * - innerTextNode(selector, options) - Set innerText of specific selector\n * - innerTextNode(options) - Set innerText of $this (current element)\n * - @innerTextNode - Bare decorator, sets innerText of $this\n */\nexport function innerText(selector: ApplyNodeSelector, options?: Omit<ApplyNodeOptions, 'position'>): MethodDecorator;\nexport function innerText(options: Omit<ApplyNodeOptions, 'position'>): MethodDecorator;\nexport function innerText(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;\nexport function innerText(selectorOrOptions?: ApplyNodeSelector | Omit<ApplyNodeOptions, 'position'> | Object, maybeOptions?: Omit<ApplyNodeOptions, 'position'> | string | symbol, descriptor?: PropertyDescriptor): MethodDecorator | PropertyDescriptor | void {\n // Bare decorator usage: @innerTextNode\n if (descriptor !== undefined && (typeof maybeOptions === 'symbol' || typeof maybeOptions === 'string')) {\n return applyNode({position: 'innerText'})(selectorOrOptions, maybeOptions, descriptor);\n }\n \n if (typeof selectorOrOptions === 'string' || typeof selectorOrOptions === 'function') {\n return applyNode(selectorOrOptions as any, {...maybeOptions as Omit<ApplyNodeOptions, 'position'>, position: 'innerText'});\n }\n return applyNode({...selectorOrOptions as Omit<ApplyNodeOptions, 'position'>, position: 'innerText'});\n}\n\n\n/**\n * @innerTextLightNode decorator - sets innerText of light DOM element\n * \n * Overloads:\n * - innerTextLightNode(selector, options) - Set innerText of specific selector in light DOM\n * - innerTextLightNode(options) - Set innerText of $this in light DOM\n * - @innerTextLightNode - Bare decorator, sets innerText of $this in light DOM\n */\nexport function innerTextLight(selector: ApplyNodeSelector, options?: Omit<ApplyNodeOptions, 'position' | 'root'>): MethodDecorator;\nexport function innerTextLight(options: Omit<ApplyNodeOptions, 'position' | 'root'>): MethodDecorator;\nexport function innerTextLight(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;\nexport function innerTextLight(selectorOrOptions?: ApplyNodeSelector | Omit<ApplyNodeOptions, 'position' | 'root'> | Object, maybeOptions?: Omit<ApplyNodeOptions, 'position' | 'root'> | string | symbol, descriptor?: PropertyDescriptor): MethodDecorator | PropertyDescriptor | void {\n // Bare decorator usage: @innerTextLightNode\n if (descriptor !== undefined && (typeof maybeOptions === 'symbol' || typeof maybeOptions === 'string')) {\n return applyNode({position: 'innerText', root: 'light'})(selectorOrOptions, maybeOptions, descriptor);\n }\n \n if (typeof selectorOrOptions === 'string' || typeof selectorOrOptions === 'function') {\n return applyNode(selectorOrOptions as any, {...maybeOptions as Omit<ApplyNodeOptions, 'position' | 'root'>, position: 'innerText', root: 'light'});\n }\n return applyNode({...selectorOrOptions as Omit<ApplyNodeOptions, 'position' | 'root'>, position: 'innerText', root: 'light'});\n}\n\n/**\n * @innerTextShadowNode decorator - sets innerText of shadow DOM element\n * \n * Overloads:\n * - innerTextShadowNode(selector, options) - Set innerText of specific selector in shadow DOM\n * - innerTextShadowNode(options) - Set innerText of $this in shadow DOM\n * - @innerTextShadowNode - Bare decorator, sets innerText of $this in shadow DOM\n */\nexport function innerTextShadow(selector: ApplyNodeSelector, options?: Omit<ApplyNodeOptions, 'position' | 'root'>): MethodDecorator;\nexport function innerTextShadow(options: Omit<ApplyNodeOptions, 'position' | 'root'>): MethodDecorator;\nexport function innerTextShadow(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;\nexport function innerTextShadow(selectorOrOptions?: ApplyNodeSelector | Omit<ApplyNodeOptions, 'position' | 'root'> | Object, maybeOptions?: Omit<ApplyNodeOptions, 'position' | 'root'> | string | symbol, descriptor?: PropertyDescriptor): MethodDecorator | PropertyDescriptor | void {\n // Bare decorator usage: @innerTextShadowNode\n if (descriptor !== undefined && (typeof maybeOptions === 'symbol' || typeof maybeOptions === 'string')) {\n return applyNode({position: 'innerText', root: 'shadow'})(selectorOrOptions, maybeOptions, descriptor);\n }\n \n if (typeof selectorOrOptions === 'string' || typeof selectorOrOptions === 'function') {\n return applyNode(selectorOrOptions as any, {...maybeOptions as Omit<ApplyNodeOptions, 'position' | 'root'>, position: 'innerText', root: 'shadow'});\n }\n return applyNode({...selectorOrOptions as Omit<ApplyNodeOptions, 'position' | 'root'>, position: 'innerText', root: 'shadow'});\n}\n\n/**\n * @beforeEndNode decorator - appends nodes to target element\n * \n * Overloads:\n * - beforeEndNode(selector, options) - Append to specific selector\n * - beforeEndNode(options) - Append to $this (current element)\n * - @beforeEndNode - Bare decorator, appends to $this\n */\nexport function insertBeforeEnd(selector: ApplyNodeSelector, options?: Omit<ApplyNodeOptions, 'position'>): MethodDecorator;\nexport function insertBeforeEnd(options: Omit<ApplyNodeOptions, 'position'>): MethodDecorator;\nexport function insertBeforeEnd(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;\nexport function insertBeforeEnd(selectorOrOptions?: ApplyNodeSelector | Omit<ApplyNodeOptions, 'position'> | Object, maybeOptions?: Omit<ApplyNodeOptions, 'position'> | string | symbol, descriptor?: PropertyDescriptor): MethodDecorator | PropertyDescriptor | void {\n // Bare decorator usage: @beforeEndNode\n if (descriptor !== undefined && (typeof maybeOptions === 'symbol' || typeof maybeOptions === 'string')) {\n return applyNode({position: 'beforeEnd'})(selectorOrOptions, maybeOptions, descriptor);\n }\n \n if (typeof selectorOrOptions === 'string' || typeof selectorOrOptions === 'function') {\n return applyNode(selectorOrOptions as any, {...maybeOptions as Omit<ApplyNodeOptions, 'position'>, position: 'beforeEnd'});\n }\n return applyNode({...selectorOrOptions as Omit<ApplyNodeOptions, 'position'>, position: 'beforeEnd'});\n}\n\n\n/**\n * @beforeEndLightNode decorator - appends nodes to light DOM element\n * \n * Overloads:\n * - beforeEndLightNode(selector, options) - Append to specific selector in light DOM\n * - beforeEndLightNode(options) - Append to $this in light DOM\n * - @beforeEndLightNode - Bare decorator, appends to $this in light DOM\n */\nexport function insertBeforeEndLight(selector: ApplyNodeSelector, options?: Omit<ApplyNodeOptions, 'position' | 'root'>): MethodDecorator;\nexport function insertBeforeEndLight(options: Omit<ApplyNodeOptions, 'position' | 'root'>): MethodDecorator;\nexport function insertBeforeEndLight(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;\nexport function insertBeforeEndLight(selectorOrOptions?: ApplyNodeSelector | Omit<ApplyNodeOptions, 'position' | 'root'> | Object, maybeOptions?: Omit<ApplyNodeOptions, 'position' | 'root'> | string | symbol, descriptor?: PropertyDescriptor): MethodDecorator | PropertyDescriptor | void {\n // Bare decorator usage: @beforeEndLightNode\n if (descriptor !== undefined && (typeof maybeOptions === 'symbol' || typeof maybeOptions === 'string')) {\n return applyNode({position: 'beforeEnd', root: 'light'})(selectorOrOptions, maybeOptions, descriptor);\n }\n \n if (typeof selectorOrOptions === 'string' || typeof selectorOrOptions === 'function') {\n return applyNode(selectorOrOptions as any, {...maybeOptions as Omit<ApplyNodeOptions, 'position' | 'root'>, position: 'beforeEnd', root: 'light'});\n }\n return applyNode({...selectorOrOptions as Omit<ApplyNodeOptions, 'position' | 'root'>, position: 'beforeEnd', root: 'light'});\n}\n\n\n/**\n * @beforeEndShadowNode decorator - appends nodes to shadow DOM element\n * \n * Overloads:\n * - beforeEndShadowNode(selector, options) - Append to specific selector in shadow DOM\n * - beforeEndShadowNode(options) - Append to $this in shadow DOM\n * - @beforeEndShadowNode - Bare decorator, appends to $this in shadow DOM\n */\nexport function insertBeforeEndShadow(selector: ApplyNodeSelector, options?: Omit<ApplyNodeOptions, 'position' | 'root'>): MethodDecorator;\nexport function insertBeforeEndShadow(options: Omit<ApplyNodeOptions, 'position' | 'root'>): MethodDecorator;\nexport function insertBeforeEndShadow(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;\nexport function insertBeforeEndShadow(selectorOrOptions?: ApplyNodeSelector | Omit<ApplyNodeOptions, 'position' | 'root'> | Object, maybeOptions?: Omit<ApplyNodeOptions, 'position' | 'root'> | string | symbol, descriptor?: PropertyDescriptor): MethodDecorator | PropertyDescriptor | void {\n // Bare decorator usage: @beforeEndShadowNode\n if (descriptor !== undefined && (typeof maybeOptions === 'symbol' || typeof maybeOptions === 'string')) {\n return applyNode({position: 'beforeEnd', root: 'shadow'})(selectorOrOptions, maybeOptions, descriptor);\n }\n \n if (typeof selectorOrOptions === 'string' || typeof selectorOrOptions === 'function') {\n return applyNode(selectorOrOptions as any, {...maybeOptions as Omit<ApplyNodeOptions, 'position' | 'root'>, position: 'beforeEnd', root: 'shadow'});\n }\n return applyNode({...selectorOrOptions as Omit<ApplyNodeOptions, 'position' | 'root'>, position: 'beforeEnd', root: 'shadow'});\n}\n\n\n/**\n * @afterBeginNode decorator - prepends nodes to target element\n * \n * Overloads:\n * - afterBeginNode(selector, options) - Prepend to specific selector\n * - afterBeginNode(options) - Prepend to $this (current element)\n * - @afterBeginNode - Bare decorator, prepends to $this\n */\nexport function insertAfterBegin(selector: ApplyNodeSelector, options?: Omit<ApplyNodeOptions, 'position'>): MethodDecorator;\nexport function insertAfterBegin(options: Omit<ApplyNodeOptions, 'position'>): MethodDecorator;\nexport function insertAfterBegin(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;\nexport function insertAfterBegin(selectorOrOptions?: ApplyNodeSelector | Omit<ApplyNodeOptions, 'position'> | Object, maybeOptions?: Omit<ApplyNodeOptions, 'position'> | string | symbol, descriptor?: PropertyDescriptor): MethodDecorator | PropertyDescriptor | void {\n // Bare decorator usage: @afterBeginNode\n if (descriptor !== undefined && (typeof maybeOptions === 'symbol' || typeof maybeOptions === 'string')) {\n return applyNode({position: 'afterBegin'})(selectorOrOptions, maybeOptions, descriptor);\n }\n \n if (typeof selectorOrOptions === 'string' || typeof selectorOrOptions === 'function') {\n return applyNode(selectorOrOptions as any, {...maybeOptions as Omit<ApplyNodeOptions, 'position'>, position: 'afterBegin'});\n }\n return applyNode({...selectorOrOptions as Omit<ApplyNodeOptions, 'position'>, position: 'afterBegin'});\n}\n\n\n/**\n * @afterBeginLightNode decorator - prepends nodes to light DOM element\n * \n * Overloads:\n * - afterBeginLightNode(selector, options) - Prepend to specific selector in light DOM\n * - afterBeginLightNode(options) - Prepend to $this in light DOM\n * - @afterBeginLightNode - Bare decorator, prepends to $this in light DOM\n */\nexport function insertAfterBeginLight(selector: ApplyNodeSelector, options?: Omit<ApplyNodeOptions, 'position' | 'root'>): MethodDecorator;\nexport function insertAfterBeginLight(options: Omit<ApplyNodeOptions, 'position' | 'root'>): MethodDecorator;\nexport function insertAfterBeginLight(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;\nexport function insertAfterBeginLight(selectorOrOptions?: ApplyNodeSelector | Omit<ApplyNodeOptions, 'position' | 'root'> | Object, maybeOptions?: Omit<ApplyNodeOptions, 'position' | 'root'> | string | symbol, descriptor?: PropertyDescriptor): MethodDecorator | PropertyDescriptor | void {\n // Bare decorator usage: @afterBeginLightNode\n if (descriptor !== undefined && (typeof maybeOptions === 'symbol' || typeof maybeOptions === 'string')) {\n return applyNode({position: 'afterBegin', root: 'light'})(selectorOrOptions, maybeOptions, descriptor);\n }\n \n if (typeof selectorOrOptions === 'string' || typeof selectorOrOptions === 'function') {\n return applyNode(selectorOrOptions as any, {...maybeOptions as Omit<ApplyNodeOptions, 'position' | 'root'>, position: 'afterBegin', root: 'light'});\n }\n return applyNode({...selectorOrOptions as Omit<ApplyNodeOptions, 'position' | 'root'>, position: 'afterBegin', root: 'light'});\n}\n\n\n/**\n * @replaceChildrenLightNode decorator - replaces children of light DOM element\n * \n * Overloads:\n * - replaceChildrenLightNode(selector, options) - Replace children of specific selector in light DOM\n * - replaceChildrenLightNode(options) - Replace children of $this in light DOM\n * - @replaceChildrenLightNode - Bare decorator, replaces children of $this in light DOM\n */\nexport function replaceChildrenLight(selector: ApplyNodeSelector, options?: Omit<ApplyNodeOptions, 'position' | 'root'>): MethodDecorator;\nexport function replaceChildrenLight(options: Omit<ApplyNodeOptions, 'position' | 'root'>): MethodDecorator;\nexport function replaceChildrenLight(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;\nexport function replaceChildrenLight(selectorOrOptions?: ApplyNodeSelector | Omit<ApplyNodeOptions, 'position' | 'root'> | Object, maybeOptions?: Omit<ApplyNodeOptions, 'position' | 'root'> | string | symbol, descriptor?: PropertyDescriptor): MethodDecorator | PropertyDescriptor | void {\n // Bare decorator usage: @replaceChildrenLightNode\n if (descriptor !== undefined && (typeof maybeOptions === 'symbol' || typeof maybeOptions === 'string')) {\n return applyNode({position: 'replaceChildren', root: 'light'})(selectorOrOptions, maybeOptions, descriptor);\n }\n \n if (typeof selectorOrOptions === 'string' || typeof selectorOrOptions === 'function') {\n return applyNode(selectorOrOptions as any, {...maybeOptions as Omit<ApplyNodeOptions, 'position' | 'root'>, position: 'replaceChildren', root: 'light'});\n }\n return applyNode({...selectorOrOptions as Omit<ApplyNodeOptions, 'position' | 'root'>, position: 'replaceChildren', root: 'light'});\n}\n\n/**\n * @clearChildrenLightNode decorator - clears children of light DOM element\n * \n * Overloads:\n * - clearChildrenLightNode(selector, options) - Clear children of specific selector in light DOM\n * - clearChildrenLightNode(options) - Clear children of $this in light DOM\n * - @clearChildrenLightNode - Bare decorator, clears children of $this in light DOM\n */\nexport function clearChildrenLight(selector: ApplyNodeSelector, options?: Omit<ApplyNodeOptions, 'position' | 'root'>): MethodDecorator;\nexport function clearChildrenLight(options: Omit<ApplyNodeOptions, 'position' | 'root'>): MethodDecorator;\nexport function clearChildrenLight(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;\nexport function clearChildrenLight(selectorOrOptions?: ApplyNodeSelector | Omit<ApplyNodeOptions, 'position' | 'root'> | Object, maybeOptions?: Omit<ApplyNodeOptions, 'position' | 'root'> | string | symbol, descriptor?: PropertyDescriptor): MethodDecorator | PropertyDescriptor | void {\n // Bare decorator usage: @clearChildrenLightNode\n if (descriptor !== undefined && (typeof maybeOptions === 'symbol' || typeof maybeOptions === 'string')) {\n return applyNode({position: 'clearChildren', root: 'light'})(selectorOrOptions, maybeOptions, descriptor);\n }\n \n if (typeof selectorOrOptions === 'string' || typeof selectorOrOptions === 'function') {\n return applyNode(selectorOrOptions as any, {...maybeOptions as Omit<ApplyNodeOptions, 'position' | 'root'>, position: 'clearChildren', root: 'light'});\n }\n return applyNode({...selectorOrOptions as Omit<ApplyNodeOptions, 'position' | 'root'>, position: 'clearChildren', root: 'light'});\n}\n\n\n\n\n// \u2500\u2500\u2500 Aliases \u2500\u2500\u2500\nexport const apply = applyNode;\nexport const node = applyNode;\n\n// \u2500\u2500\u2500 \uD3B8\uC758 \uD5EC\uD37C (selector/root \uC0DD\uB7B5) \u2500\u2500\u2500\n\nexport function applyAppHost(options: ApplyNodeQueryOptions): MethodDecorator;\nexport function applyAppHost(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;\nexport function applyAppHost(optionsOrTarget?: ApplyNodeQueryOptions | Object, propertyKey?: string | symbol, descriptor?: PropertyDescriptor): MethodDecorator | PropertyDescriptor | void {\n if ((typeof propertyKey === 'string' || typeof propertyKey === 'symbol') && descriptor !== undefined) {\n return (applyNode('$appHost', {}) as any)(optionsOrTarget, propertyKey, descriptor);\n }\n return applyNode('$appHost', optionsOrTarget as ApplyNodeQueryOptions);\n}\nexport function applyLight(selector: string, options?: Omit<ApplyNodeQueryOptions, 'root'>): MethodDecorator {\n return applyNode(selector, {...options ?? {}, root: 'light'});\n}\nexport function applyShadow(selector: string, options?: Omit<ApplyNodeQueryOptions, 'root'>): MethodDecorator {\n return applyNode(selector, {...options ?? {}, root: 'shadow'});\n}\nexport function applyAll(selector: string, options?: Omit<ApplyNodeQueryOptions, 'root'>): MethodDecorator {\n return applyNode(selector, {...options ?? {}, root: 'all'});\n}\n\nexport const findAllApplyNodeMetadata = (target: any): Map<string | symbol, ApplyNodeMetadata> => {\n const result = new Map<string | symbol, ApplyNodeMetadata>();\n const maps = ReflectUtils.findAllMetadata<Map<string | symbol, ApplyNodeMetadata>>(APPLY_NODE_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// \u2500\u2500\u2500 filter \uC720\uD2F8 (applyNode/replace*/innerHtml* options.filter\uC6A9) \u2500\u2500\u2500\n// filter\uB294 true \uBC18\uD658 \uC2DC \uC801\uC6A9, false \uBC18\uD658 \uC2DC \uC2A4\uD0B5.\n\nconst filterScopeOf = (target: HTMLElement | ShadowRoot): Element | null => {\n if (target && typeof (target as HTMLElement).querySelector === 'function') {\n return target as unknown as Element;\n }\n const host = (target as ShadowRoot)?.host as unknown as Element | undefined;\n return host && typeof host.querySelector === 'function' ? host : null;\n};\n\nconst tagNameOf = (node: any): string | null => {\n const tag = node?.tagName;\n return typeof tag === 'string' ? tag.toLowerCase() : null;\n};\n\n// \uC0C8 \uB178\uB4DC\uC640 \uAC19\uC740 \uD0DC\uADF8\uAC00 target \uC548\uC5D0 \uC774\uBBF8 \uC788\uC73C\uBA74 \uC2A4\uD0B5 (SSR adopting\uC6A9).\nexport const skipIfSameTagPresent = (target: HTMLElement | ShadowRoot, newValue: any): boolean => {\n const nodes = (Array.isArray(newValue) ? newValue : [newValue]).filter((n) => tagNameOf(n) !== null);\n if (nodes.length === 0) return true;\n const scope = filterScopeOf(target);\n if (!scope) return true;\n return !nodes.some((n) => scope.querySelector(tagNameOf(n)!));\n};\n\n// \uC9C0\uC815 selector\uAC00 target \uC548\uC5D0 \uC774\uBBF8 \uC788\uC73C\uBA74 \uC2A4\uD0B5 (\uAC19\uC740 path \uCFFC\uB9AC \uBCC0\uACBD \uC2DC \uD398\uC774\uC9C0 \uC7AC\uC0DD\uC131 \uBC29\uC9C0\uC6A9).\n// \uC0AC\uC6A9: @innerHtmlLight({ filter: skipIfExists('center-math-page') })\nexport const skipIfExists = (selector: string) =>\n (target: HTMLElement | ShadowRoot): boolean => {\n const scope = filterScopeOf(target);\n if (!scope) return true;\n return !scope.querySelector(selector);\n };\n\n// \uC0C8 \uAC12\uC774 \uBE44\uC5B4\uC788\uC73C\uBA74 \uC2A4\uD0B5 (null/''/\uBE48 \uBC30\uC5F4).\nexport const skipIfEmpty = (_target: HTMLElement | ShadowRoot, newValue: any): boolean => {\n if (newValue === null || newValue === undefined || newValue === false) return false;\n if (typeof newValue === 'string') return newValue.trim().length > 0;\n if (Array.isArray(newValue)) return newValue.length > 0;\n return true;\n};\n\n// \uD14D\uC2A4\uD2B8\uAC00 \uB2EC\uB77C\uC9C8 \uB54C\uB9CC \uC801\uC6A9 (\uD3F4\uB9C1 \uAC31\uC2E0\uC6A9).\nexport const applyIfChanged = (target: HTMLElement | ShadowRoot, newValue: any): boolean => {\n const textOf = (v: any): string => {\n if (typeof v === 'string') return v;\n if (Array.isArray(v)) return v.map(textOf).join('');\n return typeof v?.textContent === 'string' ? v.textContent : '';\n };\n const current = typeof (target as HTMLElement)?.textContent === 'string' ? (target as HTMLElement).textContent! : '';\n return current !== textOf(newValue);\n};\n"],
5
+ "mappings": "AAAA,SAAS,oBAAoB;AAC7B,SAAS,kBAAkB;AAE3B,SAAS,gBAAe;AACxB,SAAQ,4BAA2B;AACnC,SAAQ,oBAAmB;AAsCpB,MAAM,0BAA0B,OAAO,IAAI,iCAAiC;AAMnF,MAAM,kBAAkB,CAAC,UAA6B,MAAW,QAA6C;AAC5G,MAAI,OAAO,aAAa,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AU,QAAO;AAClC,QAAI,MAAM,QAAQ,CAAC,EAAG,QAAO,EAAE,IAAI,MAAM,EAAE,KAAK,EAAE;AAClD,WAAO,OAAO,GAAG,gBAAgB,WAAW,EAAE,cAAc;AAAA,EAC9D;AACA,QAAM,UAAU,OAAQ,QAAwB,gBAAgB,WAAY,OAAuB,cAAe;AAClH,SAAO,YAAY,OAAO,QAAQ;AACpC;",
6
6
  "names": ["node"]
7
7
  }
@@ -51,7 +51,7 @@ const convertAttributeValue = (val, type) => {
51
51
  };
52
52
  import { getAttributeValue, convertValue } from "./applyAttribute.js";
53
53
  import { SwcUtils } from "../utils/Utils.js";
54
- import { buildSwcParameterArgs } from "./parameter.js";
54
+ import { buildSwcParameterArgs, buildCommonKindValues } from "./parameter.js";
55
55
  class ChangedAttributeLifeCycler {
56
56
  constructor() {
57
57
  __publicField(this, "attrChangeMap", null);
@@ -93,13 +93,10 @@ class ChangedAttributeLifeCycler {
93
93
  void (async () => {
94
94
  const helper = SwcUtils.getHelperAndHostSet(inst);
95
95
  if (opts.filter && !await opts.filter(value, { currentThis: inst, helper })) return;
96
- const hostSet = SwcUtils.getHostSet(inst);
97
- const helperSet = SwcUtils.getHelperSet(helperHostSet.$w);
96
+ const common = buildCommonKindValues(inst, helperHostSet.$w);
98
97
  const legacyArgs = [value, old, name, helper];
99
98
  const buildArgs = (beforeReturn) => buildSwcParameterArgs(inst, meta.propertyKey, {
100
- hostSet,
101
- helperHostSet: helper,
102
- helperSet,
99
+ ...common,
103
100
  changedAttributeBeforeReturn: beforeReturn
104
101
  }, [...legacyArgs, beforeReturn]);
105
102
  let args = buildArgs(void 0);
@@ -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 /** \uC18D\uC131 \uBCC0\uACBD \uC2DC \uD578\uB4E4\uB7EC \uC2E4\uD589 \uC5EC\uBD80 \uAC8C\uC774\uD2B8. Promise<boolean>\uB3C4 \uB418\uC5B4 async \uD310\uC815 \uAC00\uB2A5. false\uBA74 \uC2A4\uD0B5. */\n filter?: (value: any, meta: { currentThis: any; helper: HelperHostSet }) => boolean | Promise<boolean>;\n /** filter \uD1B5\uACFC \uD6C4 \uD578\uB4E4\uB7EC \uC9C1\uC804 \uD6C5. await\uB418\uACE0, \uB9AC\uD134\uAC12\uC740 @changedAttributeBeforeReturn \uC73C\uB85C \uD578\uB4E4\uB7EC\uC5D0 \uC8FC\uC785\uB41C\uB2E4. */\n before?: (value: any, meta: { currentThis: any; helper: HelperHostSet }) => any | Promise<any>;\n /** \uD578\uB4E4\uB7EC\uAC00 \uC131\uACF5/\uC2E4\uD328\uD574\uB3C4 \uD56D\uC0C1 \uC2E4\uD589\uB418\uB294 \uC815\uB9AC \uD6C5. ctx\uB85C \uC778\uC790/\uACB0\uACFC/\uC5D0\uB7EC\uB97C \uBC1B\uB294\uB2E4. \uC5D0\uB7EC\uB294 \uB85C\uAE45\uB428. */\n finally?: (value: any, meta: { currentThis: any; helper: HelperHostSet }, ctx: { args: any[]; result?: any; error?: any }) => any | Promise<any>;\n}\n\nexport interface ChangedAttributeThisMetadata {\n attributeName: string;\n propertyKey: string | symbol;\n options: ChangedAttributeThisOptions;\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('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 = typeof target === 'function' ? target : target.constructor;\n return ReflectUtils.findAllMetadata<any[]>(ON_ATTRIBUTE_CHANGED_METADATA_KEY, constructor).flat();\n};\n\nexport const findAllAttributeChangedMetadata = (target: any): Map<string, ChangedAttributeThisMetadata[]> => {\n const constructor = typeof target === '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, convertValue } from './applyAttribute';\nimport { SwcUtils } from '../utils/Utils';\nimport { buildSwcParameterArgs } from './parameter';\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) this.runChanged(helperHostSet, meta, val, null, name);\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 this.runChanged(helperHostSet, meta, convertAttributeValue(newVal, meta.options.type), old, name);\n }\n }\n\n // filter(async)/before/finally + @changedAttributeBeforeReturn \uC8FC\uC785. fire-and-forget.\n private runChanged(helperHostSet: HelperHostSet, meta: ChangedAttributeThisMetadata, value: any, old: string | null, name: string): void {\n const inst = helperHostSet.$this;\n const opts = meta.options;\n void (async () => {\n const helper = SwcUtils.getHelperAndHostSet(inst);\n if (opts.filter && !(await opts.filter(value, { currentThis: inst, helper }))) return;\n const hostSet = SwcUtils.getHostSet(inst);\n const helperSet = SwcUtils.getHelperSet(helperHostSet.$w);\n const legacyArgs = [value, old, name, helper];\n const buildArgs = (beforeReturn: any) => buildSwcParameterArgs(inst, meta.propertyKey, {\n hostSet, helperHostSet: helper, helperSet, changedAttributeBeforeReturn: beforeReturn\n }, [...legacyArgs, beforeReturn]);\n let args = buildArgs(undefined);\n if (opts.before) { const br = await opts.before(value, { currentThis: inst, helper }); args = buildArgs(br); }\n let result: any, error: any;\n try { result = await inst[meta.propertyKey](...args); }\n catch (e) { error = e; }\n finally { if (opts.finally) await opts.finally(value, { currentThis: inst, helper }, { args, result, error }); }\n if (error) throw error;\n })().catch(e => console.error('[SWC] changedAttribute handler error:', e));\n }\n}\n"],
5
- "mappings": ";;;AAAA,SAAS,oBAAoB;AAEtB,MAAM,oCAAoC,OAAO,IAAI,2CAA2C;AAmBvG,MAAM,wBAAwB,CAAC,eAAmC,SAAsC,QAAgB,gBAAuC;AAC7J,QAAM,cAAc,OAAO;AAC3B,MAAI,WAAW,aAAa,eAAe,mCAAmC,WAAW;AACzF,MAAI,CAAC,UAAU;AACb,eAAW,CAAC;AACZ,iBAAa,eAAe,mCAAmC,UAAU,WAAW;AAAA,EACtF;AAEA,QAAM,OAAO,iBAAiB,OAAO,WAAW;AAChD,WAAS,KAAK;AAAA,IACZ,eAAe;AAAA,IACf;AAAA,IACA;AAAA,EACF,CAAC;AACH;AAQO,SAAS,iBAAiB,uBAAyC,sBAAsE,YAAyD;AACvM,OAAK,OAAO,yBAAyB,YAAY,OAAO,yBAAyB,aAAa,eAAe,QAAW;AAEtH,0BAAsB,QAAW,CAAC,GAAG,uBAAiC,oBAAoB;AAC1F;AAAA,EACF;AAEA,QAAM,gBAAgB;AACtB,QAAM,UAAW,wBAAwD,CAAC;AAC1E,SAAO,CAAC,QAAgB,gBAAiC;AACvD,0BAAsB,eAAe,SAAS,QAAQ,WAAW;AAAA,EACnE;AACF;AAEO,MAAM,8BAA8B,CAAC,WAA4D;AACtG,QAAM,cAAc,OAAO,WAAW,aAAa,SA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AAI;AAAA,MAAG,SAC/C,GAAG;AAAE,gBAAQ;AAAA,MAAG,UACvB;AAAU,YAAI,KAAK,QAAS,OAAM,KAAK,QAAQ,OAAO,EAAE,aAAa,MAAM,OAAO,GAAG,EAAE,MAAM,QAAQ,MAAM,CAAC;AAAA,MAAG;AAC/G,UAAI,MAAO,OAAM;AAAA,IACnB,GAAG,EAAE,MAAM,OAAK,QAAQ,MAAM,yCAAyC,CAAC,CAAC;AAAA,EAC3E;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 /** \uC18D\uC131 \uBCC0\uACBD \uC2DC \uD578\uB4E4\uB7EC \uC2E4\uD589 \uC5EC\uBD80 \uAC8C\uC774\uD2B8. Promise<boolean>\uB3C4 \uB418\uC5B4 async \uD310\uC815 \uAC00\uB2A5. false\uBA74 \uC2A4\uD0B5. */\n filter?: (value: any, meta: { currentThis: any; helper: HelperHostSet }) => boolean | Promise<boolean>;\n /** filter \uD1B5\uACFC \uD6C4 \uD578\uB4E4\uB7EC \uC9C1\uC804 \uD6C5. await\uB418\uACE0, \uB9AC\uD134\uAC12\uC740 @changedAttributeBeforeReturn \uC73C\uB85C \uD578\uB4E4\uB7EC\uC5D0 \uC8FC\uC785\uB41C\uB2E4. */\n before?: (value: any, meta: { currentThis: any; helper: HelperHostSet }) => any | Promise<any>;\n /** \uD578\uB4E4\uB7EC\uAC00 \uC131\uACF5/\uC2E4\uD328\uD574\uB3C4 \uD56D\uC0C1 \uC2E4\uD589\uB418\uB294 \uC815\uB9AC \uD6C5. ctx\uB85C \uC778\uC790/\uACB0\uACFC/\uC5D0\uB7EC\uB97C \uBC1B\uB294\uB2E4. \uC5D0\uB7EC\uB294 \uB85C\uAE45\uB428. */\n finally?: (value: any, meta: { currentThis: any; helper: HelperHostSet }, ctx: { args: any[]; result?: any; error?: any }) => any | Promise<any>;\n}\n\nexport interface ChangedAttributeThisMetadata {\n attributeName: string;\n propertyKey: string | symbol;\n options: ChangedAttributeThisOptions;\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('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 = typeof target === 'function' ? target : target.constructor;\n return ReflectUtils.findAllMetadata<any[]>(ON_ATTRIBUTE_CHANGED_METADATA_KEY, constructor).flat();\n};\n\nexport const findAllAttributeChangedMetadata = (target: any): Map<string, ChangedAttributeThisMetadata[]> => {\n const constructor = typeof target === '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, convertValue } from './applyAttribute';\nimport { SwcUtils } from '../utils/Utils';\nimport { buildSwcParameterArgs, buildCommonKindValues } from './parameter';\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) this.runChanged(helperHostSet, meta, val, null, name);\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 this.runChanged(helperHostSet, meta, convertAttributeValue(newVal, meta.options.type), old, name);\n }\n }\n\n // filter(async)/before/finally + @changedAttributeBeforeReturn \uC8FC\uC785. fire-and-forget.\n private runChanged(helperHostSet: HelperHostSet, meta: ChangedAttributeThisMetadata, value: any, old: string | null, name: string): void {\n const inst = helperHostSet.$this;\n const opts = meta.options;\n void (async () => {\n const helper = SwcUtils.getHelperAndHostSet(inst);\n if (opts.filter && !(await opts.filter(value, { currentThis: inst, helper }))) return;\n const common = buildCommonKindValues(inst, helperHostSet.$w);\n const legacyArgs = [value, old, name, helper];\n const buildArgs = (beforeReturn: any) => buildSwcParameterArgs(inst, meta.propertyKey, {\n ...common, changedAttributeBeforeReturn: beforeReturn\n }, [...legacyArgs, beforeReturn]);\n let args = buildArgs(undefined);\n if (opts.before) { const br = await opts.before(value, { currentThis: inst, helper }); args = buildArgs(br); }\n let result: any, error: any;\n try { result = await inst[meta.propertyKey](...args); }\n catch (e) { error = e; }\n finally { if (opts.finally) await opts.finally(value, { currentThis: inst, helper }, { args, result, error }); }\n if (error) throw error;\n })().catch(e => console.error('[SWC] changedAttribute handler error:', e));\n }\n}\n"],
5
+ "mappings": ";;;AAAA,SAAS,oBAAoB;AAEtB,MAAM,oCAAoC,OAAO,IAAI,2CAA2C;AAmBvG,MAAM,wBAAwB,CAAC,eAAmC,SAAsC,QAAgB,gBAAuC;AAC7J,QAAM,cAAc,OAAO;AAC3B,MAAI,WAAW,aAAa,eAAe,mCAAmC,WAAW;AACzF,MAAI,CAAC,UAAU;AACb,eAAW,CAAC;AACZ,iBAAa,eAAe,mCAAmC,UAAU,WAAW;AAAA,EACtF;AAEA,QAAM,OAAO,iBAAiB,OAAO,WAAW;AAChD,WAAS,KAAK;AAAA,IACZ,eAAe;AAAA,IACf;AAAA,IACA;AAAA,EACF,CAA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MAAM,KAAK,aAAa;AAAA,QACrF,GAAG;AAAA,QAAQ,8BAA8B;AAAA,MAC3C,GAAG,CAAC,GAAG,YAAY,YAAY,CAAC;AAChC,UAAI,OAAO,UAAU,MAAS;AAC9B,UAAI,KAAK,QAAQ;AAAE,cAAM,KAAK,MAAM,KAAK,OAAO,OAAO,EAAE,aAAa,MAAM,OAAO,CAAC;AAAG,eAAO,UAAU,EAAE;AAAA,MAAG;AAC7G,UAAI,QAAa;AACjB,UAAI;AAAE,iBAAS,MAAM,KAAK,KAAK,WAAW,EAAE,GAAG,IAAI;AAAA,MAAG,SAC/C,GAAG;AAAE,gBAAQ;AAAA,MAAG,UACvB;AAAU,YAAI,KAAK,QAAS,OAAM,KAAK,QAAQ,OAAO,EAAE,aAAa,MAAM,OAAO,GAAG,EAAE,MAAM,QAAQ,MAAM,CAAC;AAAA,MAAG;AAC/G,UAAI,MAAO,OAAM;AAAA,IACnB,GAAG,EAAE,MAAM,OAAK,QAAQ,MAAM,yCAAyC,CAAC,CAAC;AAAA,EAC3E;AACF;",
6
6
  "names": []
7
7
  }
@@ -11,7 +11,7 @@ import { getQueryMetadata, getQueryAllMetadata } from "./query.js";
11
11
  import { SwcUtils } from "../utils/Utils.js";
12
12
  import { DOM_EVENT_NAMES, HTML_TAG_ENTRIES } from "../config/config.js";
13
13
  import { SituationTypeContainer, SituationTypeContainers } from "@dooboostore/simple-boot/decorators/inject/Inject";
14
- import { buildSwcParameterArgs, getParameterMetadata } from "./parameter.js";
14
+ import { buildSwcParameterArgs, buildDomStorageKindValues, getParameterMetadata } from "./parameter.js";
15
15
  import { InjectSituationType } from "../types/index.js";
16
16
  import { ConvertUtils, ElementApply } from "@dooboostore/core-web";
17
17
  import { isSSR } from "../elements/SwcAppMixin.js";
@@ -24,7 +24,7 @@ import { SetIntervalLifeCycler } from "./setInterval.js";
24
24
  import { SetTimeoutLifeCycler } from "./setTimeout.js";
25
25
  import { RequestAnimationFrameLifeCycler } from "./requestAnimationFrame.js";
26
26
  import { EventMediaLifeCycler } from "./eventMedia.js";
27
- import { FetchLifeCycler } from "./fetch.js";
27
+ import { FetchLifeCycler, assertFetchFields } from "./fetch.js";
28
28
  const ELEMENT_CONFIG_KEY = Symbol.for("simple-web-component:element-config");
29
29
  const getElementConfig = (target) => {
30
30
  const constructor = typeof target === "function" ? target : target.constructor;
@@ -157,7 +157,15 @@ const setupPrototype = (proto, win) => {
157
157
  const app = useHostSet?.$appHost?.simpleApplication;
158
158
  const helperSetValue = SwcUtils.getHelperSet(win);
159
159
  const helperHostSetValue = { ...helperSetValue, ...useHostSet, $this: this };
160
- const kindValues = { hostSet: useHostSet, helperHostSet: helperHostSetValue, helperSet: helperSetValue };
160
+ const kindValues = {
161
+ hostSet: useHostSet,
162
+ helperHostSet: helperHostSetValue,
163
+ helperSet: helperSetValue,
164
+ swcAppRouter: useHostSet?.$appHost?.router,
165
+ swcAppSimpleApplication: useHostSet?.$appHost?.simpleApplication,
166
+ swcAppHost: useHostSet?.$appHost,
167
+ ...buildDomStorageKindValues(this, win)
168
+ };
161
169
  if (app) {
162
170
  const otherStorage = /* @__PURE__ */ new Map();
163
171
  const situations = new SituationTypeContainers([new SituationTypeContainer({ situationType: InjectSituationType.HOST_SET, data: useHostSet }), new SituationTypeContainer({ situationType: InjectSituationType.APP_HOST, data: useHostSet.$appHost }), new SituationTypeContainer({ situationType: InjectSituationType.APP_HOSTS, data: useHostSet.$appHosts }), new SituationTypeContainer({
@@ -171,7 +179,9 @@ const setupPrototype = (proto, win) => {
171
179
  const firstCheckMaker = ({ target, targetKey }, token, idx) => {
172
180
  const saves = getParameterMetadata(target, targetKey);
173
181
  const found = saves.find((s) => s.index === idx);
174
- return found ? kindValues[found.kind] ?? null : void 0;
182
+ if (!found) return void 0;
183
+ const value = kindValues[found.kind];
184
+ return (found.key !== void 0 && typeof value === "function" ? value(found.key) : value) ?? null;
175
185
  };
176
186
  return app.simstanceManager.executeBindParameterSim(
177
187
  {
@@ -245,6 +255,7 @@ const elementDefine = (name, config = {}) => (constructor) => {
245
255
  if (!metadata.window) {
246
256
  throw new Error("window is required");
247
257
  }
258
+ assertFetchFields(constructor);
248
259
  let extendsTagName = metadata.extends;
249
260
  if (!extendsTagName) {
250
261
  let proto2 = constructor;