@dooboostore/simple-web-component 1.0.47 → 1.0.49

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 (233) hide show
  1. package/README.md +223 -27
  2. package/dist/cjs/config/config.js +1 -1
  3. package/dist/cjs/config/config.js.map +2 -2
  4. package/dist/cjs/decorators/addEventListener.js +412 -16
  5. package/dist/cjs/decorators/addEventListener.js.map +3 -3
  6. package/dist/cjs/decorators/applyAttribute.js +25 -0
  7. package/dist/cjs/decorators/applyAttribute.js.map +2 -2
  8. package/dist/cjs/decorators/applyClass.js +49 -18
  9. package/dist/cjs/decorators/applyClass.js.map +3 -3
  10. package/dist/cjs/decorators/applyNode.js +67 -1
  11. package/dist/cjs/decorators/applyNode.js.map +3 -3
  12. package/dist/cjs/decorators/applyProperty.js +101 -3
  13. package/dist/cjs/decorators/applyProperty.js.map +2 -2
  14. package/dist/cjs/decorators/applyStyle.js +36 -5
  15. package/dist/cjs/decorators/applyStyle.js.map +2 -2
  16. package/dist/cjs/decorators/changedAttribute.js +39 -0
  17. package/dist/cjs/decorators/changedAttribute.js.map +2 -2
  18. package/dist/cjs/decorators/elementDefine.js +244 -225
  19. package/dist/cjs/decorators/elementDefine.js.map +3 -3
  20. package/dist/cjs/decorators/emitCustomEvent.js +55 -0
  21. package/dist/cjs/decorators/emitCustomEvent.js.map +2 -2
  22. package/dist/cjs/decorators/index.js +5 -1
  23. package/dist/cjs/decorators/index.js.map +2 -2
  24. package/dist/cjs/decorators/intersectionObserver.js +209 -0
  25. package/dist/cjs/decorators/intersectionObserver.js.map +7 -0
  26. package/dist/cjs/decorators/mutationObserver.js +244 -0
  27. package/dist/cjs/decorators/mutationObserver.js.map +7 -0
  28. package/dist/cjs/decorators/query.js +129 -102
  29. package/dist/cjs/decorators/query.js.map +2 -2
  30. package/dist/cjs/decorators/resizeObserver.js +191 -0
  31. package/dist/cjs/decorators/resizeObserver.js.map +7 -0
  32. package/dist/cjs/decorators/setInterval.js +82 -0
  33. package/dist/cjs/decorators/setInterval.js.map +7 -0
  34. package/dist/cjs/decorators/setTimeout.js +82 -0
  35. package/dist/cjs/decorators/setTimeout.js.map +7 -0
  36. package/dist/cjs/decorators/subscribeSwcAppMessageWhileConnected.js +9 -0
  37. package/dist/cjs/decorators/subscribeSwcAppMessageWhileConnected.js.map +2 -2
  38. package/dist/cjs/decorators/subscribeSwcAppRouteChangeWhileConnected.js +9 -0
  39. package/dist/cjs/decorators/subscribeSwcAppRouteChangeWhileConnected.js.map +2 -2
  40. package/dist/cjs/examples/RxJSOperatorsExample.js +285 -0
  41. package/dist/cjs/examples/RxJSOperatorsExample.js.map +7 -0
  42. package/dist/cjs/types/index.js.map +1 -1
  43. package/dist/esm/config/config.js +1 -1
  44. package/dist/esm/config/config.js.map +2 -2
  45. package/dist/esm/decorators/addEventListener.js +413 -16
  46. package/dist/esm/decorators/addEventListener.js.map +3 -3
  47. package/dist/esm/decorators/applyAttribute.js +25 -0
  48. package/dist/esm/decorators/applyAttribute.js.map +2 -2
  49. package/dist/esm/decorators/applyClass.js +49 -18
  50. package/dist/esm/decorators/applyClass.js.map +3 -3
  51. package/dist/esm/decorators/applyNode.js +67 -1
  52. package/dist/esm/decorators/applyNode.js.map +3 -3
  53. package/dist/esm/decorators/applyProperty.js +101 -3
  54. package/dist/esm/decorators/applyProperty.js.map +2 -2
  55. package/dist/esm/decorators/applyStyle.js +36 -5
  56. package/dist/esm/decorators/applyStyle.js.map +2 -2
  57. package/dist/esm/decorators/changedAttribute.js +40 -0
  58. package/dist/esm/decorators/changedAttribute.js.map +2 -2
  59. package/dist/esm/decorators/elementDefine.js +249 -230
  60. package/dist/esm/decorators/elementDefine.js.map +3 -3
  61. package/dist/esm/decorators/emitCustomEvent.js +55 -0
  62. package/dist/esm/decorators/emitCustomEvent.js.map +2 -2
  63. package/dist/esm/decorators/index.js +5 -1
  64. package/dist/esm/decorators/index.js.map +2 -2
  65. package/dist/esm/decorators/intersectionObserver.js +191 -0
  66. package/dist/esm/decorators/intersectionObserver.js.map +7 -0
  67. package/dist/esm/decorators/mutationObserver.js +226 -0
  68. package/dist/esm/decorators/mutationObserver.js.map +7 -0
  69. package/dist/esm/decorators/query.js +129 -102
  70. package/dist/esm/decorators/query.js.map +2 -2
  71. package/dist/esm/decorators/resizeObserver.js +173 -0
  72. package/dist/esm/decorators/resizeObserver.js.map +7 -0
  73. package/dist/esm/decorators/setInterval.js +64 -0
  74. package/dist/esm/decorators/setInterval.js.map +7 -0
  75. package/dist/esm/decorators/setTimeout.js +64 -0
  76. package/dist/esm/decorators/setTimeout.js.map +7 -0
  77. package/dist/esm/decorators/subscribeSwcAppMessageWhileConnected.js +9 -0
  78. package/dist/esm/decorators/subscribeSwcAppMessageWhileConnected.js.map +2 -2
  79. package/dist/esm/decorators/subscribeSwcAppRouteChangeWhileConnected.js +9 -0
  80. package/dist/esm/decorators/subscribeSwcAppRouteChangeWhileConnected.js.map +2 -2
  81. package/dist/esm/examples/RxJSOperatorsExample.js +266 -0
  82. package/dist/esm/examples/RxJSOperatorsExample.js.map +7 -0
  83. package/dist/esm/types/index.js.map +1 -1
  84. package/dist/esm-bundle/dooboostore-simple-web-component.esm.js +2413 -889
  85. package/dist/esm-bundle/dooboostore-simple-web-component.esm.js.map +4 -4
  86. package/dist/types/config/config.d.ts.map +1 -1
  87. package/dist/types/decorators/addEventListener.d.ts +93 -23
  88. package/dist/types/decorators/addEventListener.d.ts.map +1 -1
  89. package/dist/types/decorators/applyAttribute.d.ts +22 -34
  90. package/dist/types/decorators/applyAttribute.d.ts.map +1 -1
  91. package/dist/types/decorators/applyClass.d.ts +34 -34
  92. package/dist/types/decorators/applyClass.d.ts.map +1 -1
  93. package/dist/types/decorators/applyNode.d.ts +30 -20
  94. package/dist/types/decorators/applyNode.d.ts.map +1 -1
  95. package/dist/types/decorators/applyProperty.d.ts +57 -34
  96. package/dist/types/decorators/applyProperty.d.ts.map +1 -1
  97. package/dist/types/decorators/applyStyle.d.ts +25 -12
  98. package/dist/types/decorators/applyStyle.d.ts.map +1 -1
  99. package/dist/types/decorators/changedAttribute.d.ts +11 -0
  100. package/dist/types/decorators/changedAttribute.d.ts.map +1 -1
  101. package/dist/types/decorators/elementDefine.d.ts.map +1 -1
  102. package/dist/types/decorators/emitCustomEvent.d.ts +28 -4
  103. package/dist/types/decorators/emitCustomEvent.d.ts.map +1 -1
  104. package/dist/types/decorators/index.d.ts +5 -1
  105. package/dist/types/decorators/index.d.ts.map +1 -1
  106. package/dist/types/decorators/intersectionObserver.d.ts +49 -0
  107. package/dist/types/decorators/intersectionObserver.d.ts.map +1 -0
  108. package/dist/types/decorators/mutationObserver.d.ts +46 -0
  109. package/dist/types/decorators/mutationObserver.d.ts.map +1 -0
  110. package/dist/types/decorators/query.d.ts +63 -8
  111. package/dist/types/decorators/query.d.ts.map +1 -1
  112. package/dist/types/decorators/resizeObserver.d.ts +48 -0
  113. package/dist/types/decorators/resizeObserver.d.ts.map +1 -0
  114. package/dist/types/decorators/setInterval.d.ts +29 -0
  115. package/dist/types/decorators/setInterval.d.ts.map +1 -0
  116. package/dist/types/decorators/setTimeout.d.ts +29 -0
  117. package/dist/types/decorators/setTimeout.d.ts.map +1 -0
  118. package/dist/types/decorators/subscribeSwcAppMessageWhileConnected.d.ts +7 -1
  119. package/dist/types/decorators/subscribeSwcAppMessageWhileConnected.d.ts.map +1 -1
  120. package/dist/types/decorators/subscribeSwcAppRouteChangeWhileConnected.d.ts +6 -0
  121. package/dist/types/decorators/subscribeSwcAppRouteChangeWhileConnected.d.ts.map +1 -1
  122. package/dist/types/examples/RxJSOperatorsExample.d.ts +94 -0
  123. package/dist/types/examples/RxJSOperatorsExample.d.ts.map +1 -0
  124. package/dist/types/types/index.d.ts +104 -0
  125. package/dist/types/types/index.d.ts.map +1 -1
  126. package/dist/umd-bundle/dooboostore-simple-web-component.umd.js +2413 -889
  127. package/dist/umd-bundle/dooboostore-simple-web-component.umd.js.map +4 -4
  128. package/package.json +8 -6
  129. package/src/config/config.ts +1 -1
  130. package/src/decorators/addEventListener.ts +426 -23
  131. package/src/decorators/applyAttribute.ts +50 -36
  132. package/src/decorators/applyClass.ts +76 -26
  133. package/src/decorators/applyNode.ts +114 -36
  134. package/src/decorators/applyProperty.ts +152 -40
  135. package/src/decorators/applyStyle.ts +64 -17
  136. package/src/decorators/changedAttribute.ts +46 -0
  137. package/src/decorators/elementDefine.ts +301 -317
  138. package/src/decorators/emitCustomEvent.ts +73 -5
  139. package/src/decorators/index.ts +5 -1
  140. package/src/decorators/intersectionObserver.ts +259 -0
  141. package/src/decorators/mutationObserver.ts +304 -0
  142. package/src/decorators/query.ts +182 -117
  143. package/src/decorators/resizeObserver.ts +235 -0
  144. package/src/decorators/setInterval.ts +80 -0
  145. package/src/decorators/setTimeout.ts +80 -0
  146. package/src/decorators/subscribeSwcAppMessageWhileConnected.ts +17 -0
  147. package/src/decorators/subscribeSwcAppRouteChangeWhileConnected.ts +19 -0
  148. package/src/examples/RxJSOperatorsExample.ts +279 -0
  149. package/src/types/index.ts +141 -0
  150. package/dist/cjs/decorators/queryAll.js +0 -181
  151. package/dist/cjs/decorators/queryAll.js.map +0 -7
  152. package/dist/cjs/elements/tt/SwcAppMixin.js +0 -1
  153. package/dist/cjs/elements/tt/SwcAppMixin.js.map +0 -7
  154. package/dist/cjs/elements/tt/SwcAsync.js +0 -1
  155. package/dist/cjs/elements/tt/SwcAsync.js.map +0 -7
  156. package/dist/cjs/elements/tt/SwcAsyncTemplate.js +0 -1
  157. package/dist/cjs/elements/tt/SwcAsyncTemplate.js.map +0 -7
  158. package/dist/cjs/elements/tt/SwcChoose.js +0 -1
  159. package/dist/cjs/elements/tt/SwcChoose.js.map +0 -7
  160. package/dist/cjs/elements/tt/SwcChooseTemplate.js +0 -1
  161. package/dist/cjs/elements/tt/SwcChooseTemplate.js.map +0 -7
  162. package/dist/cjs/elements/tt/SwcIf.js +0 -1
  163. package/dist/cjs/elements/tt/SwcIf.js.map +0 -7
  164. package/dist/cjs/elements/tt/SwcIfTemplate.js +0 -1
  165. package/dist/cjs/elements/tt/SwcIfTemplate.js.map +0 -7
  166. package/dist/cjs/elements/tt/SwcLoop.js +0 -1
  167. package/dist/cjs/elements/tt/SwcLoop.js.map +0 -7
  168. package/dist/cjs/elements/tt/SwcLoopTemplate.js +0 -1
  169. package/dist/cjs/elements/tt/SwcLoopTemplate.js.map +0 -7
  170. package/dist/cjs/elements/tt/SwcSubTemplates.js +0 -1
  171. package/dist/cjs/elements/tt/SwcSubTemplates.js.map +0 -7
  172. package/dist/cjs/elements/tt/register.js +0 -1
  173. package/dist/cjs/elements/tt/register.js.map +0 -7
  174. package/dist/esm/decorators/queryAll.js +0 -162
  175. package/dist/esm/decorators/queryAll.js.map +0 -7
  176. package/dist/esm/elements/tt/SwcAppMixin.js +0 -1
  177. package/dist/esm/elements/tt/SwcAppMixin.js.map +0 -7
  178. package/dist/esm/elements/tt/SwcAsync.js +0 -1
  179. package/dist/esm/elements/tt/SwcAsync.js.map +0 -7
  180. package/dist/esm/elements/tt/SwcAsyncTemplate.js +0 -1
  181. package/dist/esm/elements/tt/SwcAsyncTemplate.js.map +0 -7
  182. package/dist/esm/elements/tt/SwcChoose.js +0 -1
  183. package/dist/esm/elements/tt/SwcChoose.js.map +0 -7
  184. package/dist/esm/elements/tt/SwcChooseTemplate.js +0 -1
  185. package/dist/esm/elements/tt/SwcChooseTemplate.js.map +0 -7
  186. package/dist/esm/elements/tt/SwcIf.js +0 -1
  187. package/dist/esm/elements/tt/SwcIf.js.map +0 -7
  188. package/dist/esm/elements/tt/SwcIfTemplate.js +0 -1
  189. package/dist/esm/elements/tt/SwcIfTemplate.js.map +0 -7
  190. package/dist/esm/elements/tt/SwcLoop.js +0 -1
  191. package/dist/esm/elements/tt/SwcLoop.js.map +0 -7
  192. package/dist/esm/elements/tt/SwcLoopTemplate.js +0 -1
  193. package/dist/esm/elements/tt/SwcLoopTemplate.js.map +0 -7
  194. package/dist/esm/elements/tt/SwcSubTemplates.js +0 -1
  195. package/dist/esm/elements/tt/SwcSubTemplates.js.map +0 -7
  196. package/dist/esm/elements/tt/register.js +0 -1
  197. package/dist/esm/elements/tt/register.js.map +0 -7
  198. package/dist/types/decorators/queryAll.d.ts +0 -22
  199. package/dist/types/decorators/queryAll.d.ts.map +0 -1
  200. package/dist/types/elements/tt/SwcAppMixin.d.ts +0 -1
  201. package/dist/types/elements/tt/SwcAppMixin.d.ts.map +0 -1
  202. package/dist/types/elements/tt/SwcAsync.d.ts +0 -1
  203. package/dist/types/elements/tt/SwcAsync.d.ts.map +0 -1
  204. package/dist/types/elements/tt/SwcAsyncTemplate.d.ts +0 -1
  205. package/dist/types/elements/tt/SwcAsyncTemplate.d.ts.map +0 -1
  206. package/dist/types/elements/tt/SwcChoose.d.ts +0 -1
  207. package/dist/types/elements/tt/SwcChoose.d.ts.map +0 -1
  208. package/dist/types/elements/tt/SwcChooseTemplate.d.ts +0 -1
  209. package/dist/types/elements/tt/SwcChooseTemplate.d.ts.map +0 -1
  210. package/dist/types/elements/tt/SwcIf.d.ts +0 -1
  211. package/dist/types/elements/tt/SwcIf.d.ts.map +0 -1
  212. package/dist/types/elements/tt/SwcIfTemplate.d.ts +0 -1
  213. package/dist/types/elements/tt/SwcIfTemplate.d.ts.map +0 -1
  214. package/dist/types/elements/tt/SwcLoop.d.ts +0 -1
  215. package/dist/types/elements/tt/SwcLoop.d.ts.map +0 -1
  216. package/dist/types/elements/tt/SwcLoopTemplate.d.ts +0 -1
  217. package/dist/types/elements/tt/SwcLoopTemplate.d.ts.map +0 -1
  218. package/dist/types/elements/tt/SwcSubTemplates.d.ts +0 -1
  219. package/dist/types/elements/tt/SwcSubTemplates.d.ts.map +0 -1
  220. package/dist/types/elements/tt/register.d.ts +0 -1
  221. package/dist/types/elements/tt/register.d.ts.map +0 -1
  222. package/src/decorators/queryAll.ts +0 -186
  223. package/src/elements/tt/SwcAppMixin.ts +0 -13
  224. package/src/elements/tt/SwcAsync.ts +0 -139
  225. package/src/elements/tt/SwcAsyncTemplate.ts +0 -126
  226. package/src/elements/tt/SwcChoose.ts +0 -182
  227. package/src/elements/tt/SwcChooseTemplate.ts +0 -229
  228. package/src/elements/tt/SwcIf.ts +0 -145
  229. package/src/elements/tt/SwcIfTemplate.ts +0 -158
  230. package/src/elements/tt/SwcLoop.ts +0 -222
  231. package/src/elements/tt/SwcLoopTemplate.ts +0 -255
  232. package/src/elements/tt/SwcSubTemplates.ts +0 -6
  233. package/src/elements/tt/register.ts +0 -720
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/decorators/setInterval.ts"],
4
+ "sourcesContent": ["import { ReflectUtils } from '@dooboostore/core';\nimport { ElementDefineLifeCycler, HelperHostSet } from '../types';\n\nexport const SET_INTERVAL_METADATA_KEY = Symbol.for('simple-web-component:set-interval');\n\nexport interface SetIntervalOptions {\n /** \uB9E4 tick\uB9C8\uB2E4 \uB370\uCF54\uB808\uC774\uD2B8\uB41C \uBA54\uC11C\uB4DC\uC5D0 \uB118\uAE38 \uC778\uC790\uB97C \uACC4\uC0B0. \uC5C6\uC73C\uBA74 \uC778\uC790 \uC5C6\uC774 \uD638\uCD9C. */\n parameter?: (set: HelperHostSet) => any[];\n /** \uD0C0\uC774\uBA38 \uB4F1\uB85D \uC9C1\uD6C4 1\uD68C \uD638\uCD9C (\uB514\uBC84\uAE45/\uB85C\uAE45\uC6A9). id\uB294 \uC2E4\uC81C setInterval \uBC18\uD658\uAC12 - cleanup\uC740 \uC790\uB3D9\uC73C\uB85C \uCC98\uB9AC\uB418\uBBC0\uB85C \uC9C1\uC811 clear\uD560 \uD544\uC694 \uC5C6\uC74C. */\n created?: (set: HelperHostSet, id: number) => void;\n /**\n * \uB9E4 tick\uB9C8\uB2E4 \uB370\uCF54\uB808\uC774\uD2B8\uB41C \uBA54\uC11C\uB4DC\uC758 \uB9AC\uD134\uAC12\uC774 \uAC1D\uCCB4\uC774\uACE0 \uC774 \uD0A4\uC758 \uAC12\uC774 \uD568\uC218\uC774\uBA74 (id: number)\uB85C \uD638\uCD9C\uD55C\uB2E4.\n * applyAttribute.ts\uC758 valueKey\uC640 \uB3D9\uC77C\uD55C \uCEE8\uBCA4\uC158 - \uB9AC\uD134 \uAC1D\uCCB4\uC5D0\uC11C \uC774 \uB370\uCF54\uB808\uC774\uD130 \uBAAB\uB9CC \uBF51\uC544 \uC4F4\uB2E4.\n */\n valueKey?: symbol | string;\n}\n\nexport interface SetIntervalMetadata {\n propertyKey: string | symbol;\n interval: number;\n options: SetIntervalOptions;\n}\n\n/**\n * connect \uC2DC \uC790\uB3D9\uC73C\uB85C setInterval\uC744 \uAC78\uACE0, disconnect \uC2DC \uC790\uB3D9\uC73C\uB85C clearInterval \uD55C\uB2E4.\n */\nexport function setInterval(interval: number, options: SetIntervalOptions = {}): MethodDecorator {\n return (target: Object, propertyKey: string | symbol) => {\n const constructor = target.constructor;\n let metaList = ReflectUtils.getOwnMetadata(SET_INTERVAL_METADATA_KEY, constructor) as SetIntervalMetadata[];\n if (!metaList) {\n metaList = [];\n ReflectUtils.defineMetadata(SET_INTERVAL_METADATA_KEY, metaList, constructor);\n }\n metaList.push({ propertyKey, interval, options });\n };\n}\n\nexport const findAllSetIntervalMetadata = (target: any): SetIntervalMetadata[] => {\n const constructor = target instanceof Function ? target : target.constructor;\n return (ReflectUtils.findAllMetadata<SetIntervalMetadata[]>(SET_INTERVAL_METADATA_KEY, constructor) || []).flat();\n};\n\nexport class SetIntervalLifeCycler implements ElementDefineLifeCycler {\n private readonly activeMap = new WeakMap<any, number[]>();\n\n onConnected(helperHostSet: HelperHostSet): void {\n const inst = helperHostSet.$this;\n const ids: number[] = [];\n for (const meta of findAllSetIntervalMetadata(inst)) {\n const id = helperHostSet.$w.setInterval(() => {\n const args = meta.options.parameter?.(helperHostSet) ?? [];\n try {\n const res = inst[meta.propertyKey](...args);\n const vk = meta.options.valueKey;\n if (vk && res && typeof res === 'object' && typeof res[vk] === 'function') {\n res[vk](id);\n }\n } catch (e) {\n console.error('[SWC] setInterval tick error:', e);\n }\n }, meta.interval);\n meta.options.created?.(helperHostSet, id);\n ids.push(id);\n }\n this.activeMap.set(inst, ids);\n }\n\n onDisconnected(helperHostSet: HelperHostSet): void {\n const inst = helperHostSet.$this;\n for (const id of this.activeMap.get(inst) ?? []) {\n try {\n helperHostSet.$w.clearInterval(id);\n } catch (e) {\n console.error('[SWC] clearInterval error:', e);\n }\n }\n this.activeMap.delete(inst);\n }\n}\n"],
5
+ "mappings": ";;;AAAA,SAAS,oBAAoB;AAGtB,MAAM,4BAA4B,OAAO,IAAI,mCAAmC;AAuBhF,SAAS,YAAY,UAAkB,UAA8B,CAAC,GAAoB;AAC/F,SAAO,CAAC,QAAgB,gBAAiC;AACvD,UAAM,cAAc,OAAO;AAC3B,QAAI,WAAW,aAAa,eAAe,2BAA2B,WAAW;AACjF,QAAI,CAAC,UAAU;AACb,iBAAW,CAAC;AACZ,mBAAa,eAAe,2BAA2B,UAAU,WAAW;AAAA,IAC9E;AACA,aAAS,KAAK,EAAE,aAAa,UAAU,QAAQ,CAAC;AAAA,EAClD;AACF;AAEO,MAAM,6BAA6B,CAAC,WAAuC;AAChF,QAAM,cAAc,kBAAkB,WAAW,SAAS,OAAO;AACjE,UAAQ,aAAa,gBAAuC,2BAA2B,WAAW,KAAK,CAAC,GAAG,KAAK;AAClH;AAEO,MAAM,sBAAyD;AAAA,EAA/D;AACL,wBAAiB,aAAY,oBAAI,QAAuB;AAAA;AAAA,EAExD,YAAY,eAAoC;AAC9C,UAAM,OAAO,cAAc;AAC3B,UAAM,MAAgB,CAAC;AACvB,eAAW,QAAQ,2BAA2B,IAAI,GAAG;AACnD,YAAM,KAAK,cAAc,GAAG,YAAY,MAAM;AAC5C,cAAM,OAAO,KAAK,QAAQ,YAAY,aAAa,KAAK,CAAC;AACzD,YAAI;AACF,gBAAM,MAAM,KAAK,KAAK,WAAW,EAAE,GAAG,IAAI;AAC1C,gBAAM,KAAK,KAAK,QAAQ;AACxB,cAAI,MAAM,OAAO,OAAO,QAAQ,YAAY,OAAO,IAAI,EAAE,MAAM,YAAY;AACzE,gBAAI,EAAE,EAAE,EAAE;AAAA,UACZ;AAAA,QACF,SAAS,GAAG;AACV,kBAAQ,MAAM,iCAAiC,CAAC;AAAA,QAClD;AAAA,MACF,GAAG,KAAK,QAAQ;AAChB,WAAK,QAAQ,UAAU,eAAe,EAAE;AACxC,UAAI,KAAK,EAAE;AAAA,IACb;AACA,SAAK,UAAU,IAAI,MAAM,GAAG;AAAA,EAC9B;AAAA,EAEA,eAAe,eAAoC;AACjD,UAAM,OAAO,cAAc;AAC3B,eAAW,MAAM,KAAK,UAAU,IAAI,IAAI,KAAK,CAAC,GAAG;AAC/C,UAAI;AACF,sBAAc,GAAG,cAAc,EAAE;AAAA,MACnC,SAAS,GAAG;AACV,gBAAQ,MAAM,8BAA8B,CAAC;AAAA,MAC/C;AAAA,IACF;AACA,SAAK,UAAU,OAAO,IAAI;AAAA,EAC5B;AACF;",
6
+ "names": []
7
+ }
@@ -0,0 +1,64 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
+ import { ReflectUtils } from "@dooboostore/core";
5
+ const SET_TIMEOUT_METADATA_KEY = Symbol.for("simple-web-component:set-timeout");
6
+ function setTimeout(delay, options = {}) {
7
+ return (target, propertyKey) => {
8
+ const constructor = target.constructor;
9
+ let metaList = ReflectUtils.getOwnMetadata(SET_TIMEOUT_METADATA_KEY, constructor);
10
+ if (!metaList) {
11
+ metaList = [];
12
+ ReflectUtils.defineMetadata(SET_TIMEOUT_METADATA_KEY, metaList, constructor);
13
+ }
14
+ metaList.push({ propertyKey, delay, options });
15
+ };
16
+ }
17
+ const findAllSetTimeoutMetadata = (target) => {
18
+ const constructor = target instanceof Function ? target : target.constructor;
19
+ return (ReflectUtils.findAllMetadata(SET_TIMEOUT_METADATA_KEY, constructor) || []).flat();
20
+ };
21
+ class SetTimeoutLifeCycler {
22
+ constructor() {
23
+ __publicField(this, "activeMap", /* @__PURE__ */ new WeakMap());
24
+ }
25
+ onConnected(helperHostSet) {
26
+ const inst = helperHostSet.$this;
27
+ const ids = [];
28
+ for (const meta of findAllSetTimeoutMetadata(inst)) {
29
+ const id = helperHostSet.$w.setTimeout(() => {
30
+ const args = meta.options.parameter?.(helperHostSet) ?? [];
31
+ try {
32
+ const res = inst[meta.propertyKey](...args);
33
+ const vk = meta.options.valueKey;
34
+ if (vk && res && typeof res === "object" && typeof res[vk] === "function") {
35
+ res[vk](id);
36
+ }
37
+ } catch (e) {
38
+ console.error("[SWC] setTimeout fire error:", e);
39
+ }
40
+ }, meta.delay);
41
+ meta.options.created?.(helperHostSet, id);
42
+ ids.push(id);
43
+ }
44
+ this.activeMap.set(inst, ids);
45
+ }
46
+ onDisconnected(helperHostSet) {
47
+ const inst = helperHostSet.$this;
48
+ for (const id of this.activeMap.get(inst) ?? []) {
49
+ try {
50
+ helperHostSet.$w.clearTimeout(id);
51
+ } catch (e) {
52
+ console.error("[SWC] clearTimeout error:", e);
53
+ }
54
+ }
55
+ this.activeMap.delete(inst);
56
+ }
57
+ }
58
+ export {
59
+ SET_TIMEOUT_METADATA_KEY,
60
+ SetTimeoutLifeCycler,
61
+ findAllSetTimeoutMetadata,
62
+ setTimeout
63
+ };
64
+ //# sourceMappingURL=setTimeout.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/decorators/setTimeout.ts"],
4
+ "sourcesContent": ["import { ReflectUtils } from '@dooboostore/core';\nimport { ElementDefineLifeCycler, HelperHostSet } from '../types';\n\nexport const SET_TIMEOUT_METADATA_KEY = Symbol.for('simple-web-component:set-timeout');\n\nexport interface SetTimeoutOptions {\n /** \uC2E4\uD589 \uC2DC \uB370\uCF54\uB808\uC774\uD2B8\uB41C \uBA54\uC11C\uB4DC\uC5D0 \uB118\uAE38 \uC778\uC790\uB97C \uACC4\uC0B0. \uC5C6\uC73C\uBA74 \uC778\uC790 \uC5C6\uC774 \uD638\uCD9C. */\n parameter?: (set: HelperHostSet) => any[];\n /** \uD0C0\uC774\uBA38 \uB4F1\uB85D \uC9C1\uD6C4 1\uD68C \uD638\uCD9C (\uB514\uBC84\uAE45/\uB85C\uAE45\uC6A9). id\uB294 \uC2E4\uC81C setTimeout \uBC18\uD658\uAC12 - cleanup\uC740 \uC790\uB3D9\uC73C\uB85C \uCC98\uB9AC\uB418\uBBC0\uB85C \uC9C1\uC811 clear\uD560 \uD544\uC694 \uC5C6\uC74C. */\n created?: (set: HelperHostSet, id: number) => void;\n /**\n * fire \uC2DC \uB370\uCF54\uB808\uC774\uD2B8\uB41C \uBA54\uC11C\uB4DC\uC758 \uB9AC\uD134\uAC12\uC774 \uAC1D\uCCB4\uC774\uACE0 \uC774 \uD0A4\uC758 \uAC12\uC774 \uD568\uC218\uC774\uBA74 (id: number)\uB85C \uD638\uCD9C\uD55C\uB2E4.\n * applyAttribute.ts\uC758 valueKey\uC640 \uB3D9\uC77C\uD55C \uCEE8\uBCA4\uC158 - \uB9AC\uD134 \uAC1D\uCCB4\uC5D0\uC11C \uC774 \uB370\uCF54\uB808\uC774\uD130 \uBAAB\uB9CC \uBF51\uC544 \uC4F4\uB2E4.\n */\n valueKey?: symbol | string;\n}\n\nexport interface SetTimeoutMetadata {\n propertyKey: string | symbol;\n delay: number;\n options: SetTimeoutOptions;\n}\n\n/**\n * connect \uC2DC \uC790\uB3D9\uC73C\uB85C setTimeout\uC744 \uAC78\uACE0, disconnect \uC2DC (\uC544\uC9C1 \uC2E4\uD589 \uC804\uC774\uB77C\uBA74) \uC790\uB3D9\uC73C\uB85C clearTimeout \uD55C\uB2E4.\n */\nexport function setTimeout(delay: number, options: SetTimeoutOptions = {}): MethodDecorator {\n return (target: Object, propertyKey: string | symbol) => {\n const constructor = target.constructor;\n let metaList = ReflectUtils.getOwnMetadata(SET_TIMEOUT_METADATA_KEY, constructor) as SetTimeoutMetadata[];\n if (!metaList) {\n metaList = [];\n ReflectUtils.defineMetadata(SET_TIMEOUT_METADATA_KEY, metaList, constructor);\n }\n metaList.push({ propertyKey, delay, options });\n };\n}\n\nexport const findAllSetTimeoutMetadata = (target: any): SetTimeoutMetadata[] => {\n const constructor = target instanceof Function ? target : target.constructor;\n return (ReflectUtils.findAllMetadata<SetTimeoutMetadata[]>(SET_TIMEOUT_METADATA_KEY, constructor) || []).flat();\n};\n\nexport class SetTimeoutLifeCycler implements ElementDefineLifeCycler {\n private readonly activeMap = new WeakMap<any, number[]>();\n\n onConnected(helperHostSet: HelperHostSet): void {\n const inst = helperHostSet.$this;\n const ids: number[] = [];\n for (const meta of findAllSetTimeoutMetadata(inst)) {\n const id = helperHostSet.$w.setTimeout(() => {\n const args = meta.options.parameter?.(helperHostSet) ?? [];\n try {\n const res = inst[meta.propertyKey](...args);\n const vk = meta.options.valueKey;\n if (vk && res && typeof res === 'object' && typeof res[vk] === 'function') {\n res[vk](id);\n }\n } catch (e) {\n console.error('[SWC] setTimeout fire error:', e);\n }\n }, meta.delay);\n meta.options.created?.(helperHostSet, id);\n ids.push(id);\n }\n this.activeMap.set(inst, ids);\n }\n\n onDisconnected(helperHostSet: HelperHostSet): void {\n const inst = helperHostSet.$this;\n for (const id of this.activeMap.get(inst) ?? []) {\n try {\n helperHostSet.$w.clearTimeout(id);\n } catch (e) {\n console.error('[SWC] clearTimeout error:', e);\n }\n }\n this.activeMap.delete(inst);\n }\n}\n"],
5
+ "mappings": ";;;AAAA,SAAS,oBAAoB;AAGtB,MAAM,2BAA2B,OAAO,IAAI,kCAAkC;AAuB9E,SAAS,WAAW,OAAe,UAA6B,CAAC,GAAoB;AAC1F,SAAO,CAAC,QAAgB,gBAAiC;AACvD,UAAM,cAAc,OAAO;AAC3B,QAAI,WAAW,aAAa,eAAe,0BAA0B,WAAW;A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BAA6B,CAAC;AAAA,MAC9C;AAAA,IACF;AACA,SAAK,UAAU,OAAO,IAAI;AAAA,EAC5B;AACF;",
6
+ "names": []
7
+ }
@@ -36,7 +36,16 @@ const getSubscribeSwcAppMessageWhileConnectedMetadata = (target) => {
36
36
  const constructor = target instanceof Function ? target : target.constructor;
37
37
  return ReflectUtils.getOwnMetadata(SUBSCRIBE_SWC_APP_MESSAGE_WHILE_CONNECTED_METADATA_KEY, constructor);
38
38
  };
39
+ class MessageSubscribeLifeCycler {
40
+ onConnected(_helperHostSet) {
41
+ }
42
+ /** SwcAppMixin 이 구독 대상 메타를 꺼낼 때 사용 */
43
+ getMetadata(helperHostSet) {
44
+ return getSubscribeSwcAppMessageWhileConnectedMetadata(helperHostSet.$this);
45
+ }
46
+ }
39
47
  export {
48
+ MessageSubscribeLifeCycler,
40
49
  SUBSCRIBE_SWC_APP_MESSAGE_WHILE_CONNECTED_METADATA_KEY,
41
50
  getSubscribeSwcAppMessageWhileConnectedMetadata,
42
51
  receiveMessage,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/decorators/subscribeSwcAppMessageWhileConnected.ts"],
4
- "sourcesContent": ["import { ReflectUtils } from '@dooboostore/core';\nimport { SwcAppMessage, SpecialSelector, SwcQueryOptions, HelperHostSet } from '../types';\n\nexport const SUBSCRIBE_SWC_APP_MESSAGE_WHILE_CONNECTED_METADATA_KEY = Symbol.for('simple-web-component:subscribe-swc-app-message-while-connected');\n\nexport interface SwcAppMessageSubscriberMetadata {\n propertyKey: string | symbol;\n messageType?: string;\n filter?: (message: SwcAppMessage, currentThis: any) => boolean;\n}\n\nexport interface SwcAppMessageOptions {\n filter?: (message: SwcAppMessage, currentThis: any) => boolean;\n}\n\nfunction createSubscribeSwcAppMessageWhileConnected(options?: SwcAppMessageOptions, messageType?: string): MethodDecorator {\n return (target: Object, propertyKey: string | symbol, descriptor?: PropertyDescriptor) => {\n const filter = options?.filter;\n\n const constructor = target.constructor;\n let list = ReflectUtils.getOwnMetadata(SUBSCRIBE_SWC_APP_MESSAGE_WHILE_CONNECTED_METADATA_KEY, constructor) as SwcAppMessageSubscriberMetadata[];\n if (!list) {\n list = [];\n ReflectUtils.defineMetadata(SUBSCRIBE_SWC_APP_MESSAGE_WHILE_CONNECTED_METADATA_KEY, list, constructor);\n }\n list.push({ propertyKey, messageType, filter });\n \n return descriptor;\n };\n}\n\n// \uC624\uBC84\uB85C\uB4DC \uC2DC\uADF8\uB2C8\uCC98 - \uC9C1\uC811 \uC0AC\uC6A9 (\uAD04\uD638 \uC5C6\uC74C)\nexport function subscribeSwcAppMessageWhileConnected(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;\n// \uC624\uBC84\uB85C\uB4DC \uC2DC\uADF8\uB2C8\uCC98 - \uD568\uC218 \uD638\uCD9C (\uAD04\uD638 \uC788\uC74C) - \uBA54\uC2DC\uC9C0 \uD0C0\uC785\uB9CC\nexport function subscribeSwcAppMessageWhileConnected(messageType: string): MethodDecorator;\n// \uC624\uBC84\uB85C\uB4DC \uC2DC\uADF8\uB2C8\uCC98 - \uD568\uC218 \uD638\uCD9C (\uAD04\uD638 \uC788\uC74C) - \uC635\uC158\uB9CC\nexport function subscribeSwcAppMessageWhileConnected(options: SwcAppMessageOptions): MethodDecorator;\n// \uC624\uBC84\uB85C\uB4DC \uC2DC\uADF8\uB2C8\uCC98 - \uD568\uC218 \uD638\uCD9C (\uAD04\uD638 \uC788\uC74C) - \uBA54\uC2DC\uC9C0 \uD0C0\uC785 + \uC635\uC158\nexport function subscribeSwcAppMessageWhileConnected(messageType: string, options: SwcAppMessageOptions): MethodDecorator;\n\nexport function subscribeSwcAppMessageWhileConnected(targetOrMessageTypeOrOptions?: any, optionsOrPropertyKey?: any, descriptor?: PropertyDescriptor): any {\n // \uC9C1\uC811 \uB370\uCF54\uB808\uC774\uD130\uB85C \uC0AC\uC6A9\uB41C \uACBD\uC6B0 (\uAD04\uD638 \uC5C6\uC74C): @subscribeSwcAppMessageWhileConnected\n if (targetOrMessageTypeOrOptions && typeof targetOrMessageTypeOrOptions === 'object' && \n optionsOrPropertyKey && (typeof optionsOrPropertyKey === 'string' || typeof optionsOrPropertyKey === 'symbol') &&\n descriptor) {\n const target = targetOrMessageTypeOrOptions;\n const propertyKey = optionsOrPropertyKey;\n return createSubscribeSwcAppMessageWhileConnected({})(target, propertyKey, descriptor);\n }\n\n // \uD568\uC218\uB85C \uD638\uCD9C\uB41C \uACBD\uC6B0 (\uAD04\uD638 \uC788\uC74C)\n let messageType: string | undefined;\n let options: SwcAppMessageOptions = {};\n\n if (typeof targetOrMessageTypeOrOptions === 'string') {\n // \uBA54\uC2DC\uC9C0 \uD0C0\uC785 \uC804\uB2EC: @subscribeSwcAppMessageWhileConnected('messageType') \uB610\uB294 @subscribeSwcAppMessageWhileConnected('messageType', options)\n messageType = targetOrMessageTypeOrOptions;\n if (optionsOrPropertyKey && typeof optionsOrPropertyKey === 'object') {\n options = optionsOrPropertyKey;\n }\n } else if (targetOrMessageTypeOrOptions && typeof targetOrMessageTypeOrOptions === 'object') {\n // \uC635\uC158\uB9CC \uC804\uB2EC: @subscribeSwcAppMessageWhileConnected({ filter: ... })\n options = targetOrMessageTypeOrOptions;\n }\n\n return createSubscribeSwcAppMessageWhileConnected(options, messageType);\n}\n\nexport const receiveMessage = subscribeSwcAppMessageWhileConnected;\n// Helper function to retrieve message subscribers metadata\nexport const getSubscribeSwcAppMessageWhileConnectedMetadata = (target: any): SwcAppMessageSubscriberMetadata[] | undefined => {\n const constructor = target instanceof Function ? target : target.constructor;\n return ReflectUtils.getOwnMetadata(SUBSCRIBE_SWC_APP_MESSAGE_WHILE_CONNECTED_METADATA_KEY, constructor);\n};\n"],
5
- "mappings": "AAAA,SAAS,oBAAoB;AAGtB,MAAM,yDAAyD,OAAO,IAAI,gEAAgE;AAYjJ,SAAS,2CAA2C,SAAgC,aAAuC;AACzH,SAAO,CAAC,QAAgB,aAA8B,eAAoC;AACxF,UAAM,SAAS,SAAS;AAExB,UAAM,cAAc,OAAO;AAC3B,QAAI,OAAO,aAAa,eAAe,wDAAwD,WAAW;AAC1G,QAAI,CAAC,MAAM;AACT,aAAO,CAAC;AACR,mBAAa,eAAe,wDAAwD,MAAM,WAAW;AAAA,IACvG;AACA,SAAK,KAAK,EAAE,aAAa,aAAa,OAAO,CAAC;AAE9C,WAAO;AAAA,EACT;AACF;AAWO,SAAS,qCAAqC,8BAAoC,sBAA4B,YAAsC;AAEzJ,MAAI,gCAAgC,OAAO,iCAAiC,YACxE,yBAAyB,OAAO,yBAAyB,YAAY,OAAO,yBAAyB,aACrG,YAAY;AACd,UAAM,SAAS;AACf,UAAM,cAAc;AACpB,WAAO,2CAA2C,CAAC,CAAC,EAAE,QAAQ,aAAa,UAAU;AAAA,EACvF;AAGA,MAAI;AACJ,MAAI,UAAgC,CAAC;AAErC,MAAI,OAAO,iCAAiC,UAAU;AAEpD,kBAAc;AACd,QAAI,wBAAwB,OAAO,yBAAyB,UAAU;AACpE,gBAAU;AAAA,IACZ;AAAA,EACF,WAAW,gCAAgC,OAAO,iCAAiC,UAAU;AAE3F,cAAU;AAAA,EACZ;AAEA,SAAO,2CAA2C,SAAS,WAAW;AACxE;AAEO,MAAM,iBAAiB;AAEvB,MAAM,kDAAkD,CAAC,WAA+D;AAC7H,QAAM,cAAc,kBAAkB,WAAW,SAAS,OAAO;AACjE,SAAO,aAAa,eAAe,wDAAwD,WAAW;AACxG;",
4
+ "sourcesContent": ["import { ReflectUtils } from '@dooboostore/core';\nimport { SwcAppMessage, SpecialSelector, SwcQueryOptions, HelperHostSet } from '../types';\n\nexport const SUBSCRIBE_SWC_APP_MESSAGE_WHILE_CONNECTED_METADATA_KEY = Symbol.for('simple-web-component:subscribe-swc-app-message-while-connected');\n\nexport interface SwcAppMessageSubscriberMetadata {\n propertyKey: string | symbol;\n messageType?: string;\n filter?: (message: SwcAppMessage, currentThis: any) => boolean;\n}\n\nexport interface SwcAppMessageOptions {\n filter?: (message: SwcAppMessage, currentThis: any) => boolean;\n}\n\nfunction createSubscribeSwcAppMessageWhileConnected(options?: SwcAppMessageOptions, messageType?: string): MethodDecorator {\n return (target: Object, propertyKey: string | symbol, descriptor?: PropertyDescriptor) => {\n const filter = options?.filter;\n\n const constructor = target.constructor;\n let list = ReflectUtils.getOwnMetadata(SUBSCRIBE_SWC_APP_MESSAGE_WHILE_CONNECTED_METADATA_KEY, constructor) as SwcAppMessageSubscriberMetadata[];\n if (!list) {\n list = [];\n ReflectUtils.defineMetadata(SUBSCRIBE_SWC_APP_MESSAGE_WHILE_CONNECTED_METADATA_KEY, list, constructor);\n }\n list.push({ propertyKey, messageType, filter });\n \n return descriptor;\n };\n}\n\n// \uC624\uBC84\uB85C\uB4DC \uC2DC\uADF8\uB2C8\uCC98 - \uC9C1\uC811 \uC0AC\uC6A9 (\uAD04\uD638 \uC5C6\uC74C)\nexport function subscribeSwcAppMessageWhileConnected(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;\n// \uC624\uBC84\uB85C\uB4DC \uC2DC\uADF8\uB2C8\uCC98 - \uD568\uC218 \uD638\uCD9C (\uAD04\uD638 \uC788\uC74C) - \uBA54\uC2DC\uC9C0 \uD0C0\uC785\uB9CC\nexport function subscribeSwcAppMessageWhileConnected(messageType: string): MethodDecorator;\n// \uC624\uBC84\uB85C\uB4DC \uC2DC\uADF8\uB2C8\uCC98 - \uD568\uC218 \uD638\uCD9C (\uAD04\uD638 \uC788\uC74C) - \uC635\uC158\uB9CC\nexport function subscribeSwcAppMessageWhileConnected(options: SwcAppMessageOptions): MethodDecorator;\n// \uC624\uBC84\uB85C\uB4DC \uC2DC\uADF8\uB2C8\uCC98 - \uD568\uC218 \uD638\uCD9C (\uAD04\uD638 \uC788\uC74C) - \uBA54\uC2DC\uC9C0 \uD0C0\uC785 + \uC635\uC158\nexport function subscribeSwcAppMessageWhileConnected(messageType: string, options: SwcAppMessageOptions): MethodDecorator;\n\nexport function subscribeSwcAppMessageWhileConnected(targetOrMessageTypeOrOptions?: any, optionsOrPropertyKey?: any, descriptor?: PropertyDescriptor): any {\n // \uC9C1\uC811 \uB370\uCF54\uB808\uC774\uD130\uB85C \uC0AC\uC6A9\uB41C \uACBD\uC6B0 (\uAD04\uD638 \uC5C6\uC74C): @subscribeSwcAppMessageWhileConnected\n if (targetOrMessageTypeOrOptions && typeof targetOrMessageTypeOrOptions === 'object' && \n optionsOrPropertyKey && (typeof optionsOrPropertyKey === 'string' || typeof optionsOrPropertyKey === 'symbol') &&\n descriptor) {\n const target = targetOrMessageTypeOrOptions;\n const propertyKey = optionsOrPropertyKey;\n return createSubscribeSwcAppMessageWhileConnected({})(target, propertyKey, descriptor);\n }\n\n // \uD568\uC218\uB85C \uD638\uCD9C\uB41C \uACBD\uC6B0 (\uAD04\uD638 \uC788\uC74C)\n let messageType: string | undefined;\n let options: SwcAppMessageOptions = {};\n\n if (typeof targetOrMessageTypeOrOptions === 'string') {\n // \uBA54\uC2DC\uC9C0 \uD0C0\uC785 \uC804\uB2EC: @subscribeSwcAppMessageWhileConnected('messageType') \uB610\uB294 @subscribeSwcAppMessageWhileConnected('messageType', options)\n messageType = targetOrMessageTypeOrOptions;\n if (optionsOrPropertyKey && typeof optionsOrPropertyKey === 'object') {\n options = optionsOrPropertyKey;\n }\n } else if (targetOrMessageTypeOrOptions && typeof targetOrMessageTypeOrOptions === 'object') {\n // \uC635\uC158\uB9CC \uC804\uB2EC: @subscribeSwcAppMessageWhileConnected({ filter: ... })\n options = targetOrMessageTypeOrOptions;\n }\n\n return createSubscribeSwcAppMessageWhileConnected(options, messageType);\n}\n\nexport const receiveMessage = subscribeSwcAppMessageWhileConnected;\n// Helper function to retrieve message subscribers metadata\nexport const getSubscribeSwcAppMessageWhileConnectedMetadata = (target: any): SwcAppMessageSubscriberMetadata[] | undefined => {\n const constructor = target instanceof Function ? target : target.constructor;\n return ReflectUtils.getOwnMetadata(SUBSCRIBE_SWC_APP_MESSAGE_WHILE_CONNECTED_METADATA_KEY, constructor);\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// MessageSubscribeLifeCycler\n// NOTE: \uC2E4\uC81C \uAD6C\uB3C5 \uB85C\uC9C1\uC740 SwcAppMixin._connected \uC5D0\uC11C \uCC98\uB9AC\uB41C\uB2E4.\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 } from '../types';\n\nexport class MessageSubscribeLifeCycler implements ElementDefineLifeCycler {\n onConnected(_helperHostSet: HelperHostSet): void {\n // \uC2E4\uC81C \uAD6C\uB3C5\uC740 SwcAppMixin._connected \uC5D0\uC11C \uCC98\uB9AC\n }\n\n /** SwcAppMixin \uC774 \uAD6C\uB3C5 \uB300\uC0C1 \uBA54\uD0C0\uB97C \uAEBC\uB0BC \uB54C \uC0AC\uC6A9 */\n getMetadata(helperHostSet: HelperHostSet): SwcAppMessageSubscriberMetadata[] | undefined {\n return getSubscribeSwcAppMessageWhileConnectedMetadata(helperHostSet.$this);\n }\n}\n"],
5
+ "mappings": "AAAA,SAAS,oBAAoB;AAGtB,MAAM,yDAAyD,OAAO,IAAI,gEAAgE;AAYjJ,SAAS,2CAA2C,SAAgC,aAAuC;AACzH,SAAO,CAAC,QAAgB,aAA8B,eAAoC;AACxF,UAAM,SAAS,SAAS;AAExB,UAAM,cAAc,OAAO;AAC3B,QAAI,OAAO,aAAa,eAAe,wDAAwD,WAAW;AAC1G,QAAI,CAAC,MAAM;AACT,aAAO,CAAC;AACR,mBAAa,eAAe,wDAAwD,MAAM,WAAW;AAAA,IACvG;AACA,SAAK,KAAK,EAAE,aAAa,aAAa,OAAO,CAAC;AAE9C,WAAO;AAAA,EACT;AACF;AAWO,SAAS,qCAAqC,8BAAoC,sBAA4B,YAAsC;AAEzJ,MAAI,gCAAgC,OAAO,iCAAiC,YACxE,yBAAyB,OAAO,yBAAyB,YAAY,OAAO,yBAAyB,aACrG,YAAY;AACd,UAAM,SAAS;AACf,UAAM,cAAc;AACpB,WAAO,2CAA2C,CAAC,CAAC,EAAE,QAAQ,aAAa,UAAU;AAAA,EACvF;AAGA,MAAI;AACJ,MAAI,UAAgC,CAAC;AAErC,MAAI,OAAO,iCAAiC,UAAU;AAEpD,kBAAc;AACd,QAAI,wBAAwB,OAAO,yBAAyB,UAAU;AACpE,gBAAU;AAAA,IACZ;AAAA,EACF,WAAW,gCAAgC,OAAO,iCAAiC,UAAU;AAE3F,cAAU;AAAA,EACZ;AAEA,SAAO,2CAA2C,SAAS,WAAW;AACxE;AAEO,MAAM,iBAAiB;AAEvB,MAAM,kDAAkD,CAAC,WAA+D;AAC7H,QAAM,cAAc,kBAAkB,WAAW,SAAS,OAAO;AACjE,SAAO,aAAa,eAAe,wDAAwD,WAAW;AACxG;AAQO,MAAM,2BAA8D;AAAA,EACzE,YAAY,gBAAqC;AAAA,EAEjD;AAAA;AAAA,EAGA,YAAY,eAA6E;AACvF,WAAO,gDAAgD,cAAc,KAAK;AAAA,EAC5E;AACF;",
6
6
  "names": []
7
7
  }
@@ -41,7 +41,16 @@ const getSubscribeSwcAppRouteChangeWhileConnectedMetadata = (target) => {
41
41
  if (!results) return [];
42
42
  return [...results].sort((a, b) => (a.options?.order ?? 0) - (b.options?.order ?? 0));
43
43
  };
44
+ class RouteSubscribeLifeCycler {
45
+ onConnected(_helperHostSet) {
46
+ }
47
+ /** SwcAppMixin 이 구독 대상 메타를 꺼낼 때 사용 */
48
+ getMetadata(helperHostSet) {
49
+ return getSubscribeSwcAppRouteChangeWhileConnectedMetadata(helperHostSet.$this);
50
+ }
51
+ }
44
52
  export {
53
+ RouteSubscribeLifeCycler,
45
54
  SUBSCRIBE_SWC_APP_ROUTE_CHANGE_WHILE_CONNECTED_METADATA_KEY,
46
55
  changedRoute,
47
56
  getSubscribeSwcAppRouteChangeWhileConnectedMetadata,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/decorators/subscribeSwcAppRouteChangeWhileConnected.ts"],
4
- "sourcesContent": ["import {ReflectUtils} from '@dooboostore/core';\nimport {Router} from '@dooboostore/core-web';\nimport {HelperHostSet} from '../types';\n\nexport const SUBSCRIBE_SWC_APP_ROUTE_CHANGE_WHILE_CONNECTED_METADATA_KEY = Symbol.for('simple-web-component:subscribe-swc-app-route-change-while-connected');\n\nexport type RoutePathType = string | string[] | ((currentThis: any) => string | string[]);\n\nexport interface SwcAppRouteChangeSubscriberMetadata {\n propertyKey: string | symbol;\n options?: SwcAppRouteChangeOptions;\n}\n\nexport interface SwcAppRouteChangeOptions {\n path?: RoutePathType;\n filter?: (router: Router, meta: { currentThis: any; helper: HelperHostSet }) => boolean;\n order?: number;\n valueKey?: symbol | string;\n}\n\nfunction createSubscribeSwcAppRouteChangeWhileConnected(options?: SwcAppRouteChangeOptions): MethodDecorator {\n return (target: Object, propertyKey: string | symbol, descriptor?: PropertyDescriptor) => {\n const pathPattern = options?.path;\n const filter = options?.filter;\n\n const constructor = target.constructor;\n let list = ReflectUtils.getOwnMetadata(SUBSCRIBE_SWC_APP_ROUTE_CHANGE_WHILE_CONNECTED_METADATA_KEY, constructor) as SwcAppRouteChangeSubscriberMetadata[];\n if (!list) {\n list = [];\n ReflectUtils.defineMetadata(SUBSCRIBE_SWC_APP_ROUTE_CHANGE_WHILE_CONNECTED_METADATA_KEY, list, constructor);\n }\n list.push({ propertyKey, options });\n\n return descriptor;\n };\n}\n\n// \uC624\uBC84\uB85C\uB4DC \uC2DC\uADF8\uB2C8\uCC98 - \uC9C1\uC811 \uC0AC\uC6A9 (\uAD04\uD638 \uC5C6\uC74C)\nexport function subscribeSwcAppRouteChangeWhileConnected(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;\n// \uC624\uBC84\uB85C\uB4DC \uC2DC\uADF8\uB2C8\uCC98 - \uD568\uC218 \uD638\uCD9C (\uAD04\uD638 \uC788\uC74C)\nexport function subscribeSwcAppRouteChangeWhileConnected(): MethodDecorator;\nexport function subscribeSwcAppRouteChangeWhileConnected(pathPattern: RoutePathType): MethodDecorator;\nexport function subscribeSwcAppRouteChangeWhileConnected(pathPattern: RoutePathType, config: Omit<SwcAppRouteChangeOptions, 'path'>): MethodDecorator;\nexport function subscribeSwcAppRouteChangeWhileConnected(options: SwcAppRouteChangeOptions): MethodDecorator;\n\n// \uC2E4\uC81C \uAD6C\uD604 (\uC774\uC911 \uBAA8\uB4DC)\nexport function subscribeSwcAppRouteChangeWhileConnected(targetOrOptions?: any, propertyKeyOrConfig?: any, descriptor?: PropertyDescriptor): any {\n // \uC9C1\uC811 \uB370\uCF54\uB808\uC774\uD130\uB85C \uC0AC\uC6A9\uB41C \uACBD\uC6B0 (\uAD04\uD638 \uC5C6\uC74C): @subscribeSwcAppRouteChangeWhileConnected\n // propertyKey\uAC00 string | symbol\uC774\uACE0 descriptor\uAC00 \uC788\uC73C\uBA74 \uC9C1\uC811 \uC0AC\uC6A9\n if (propertyKeyOrConfig && (typeof propertyKeyOrConfig === 'string' || typeof propertyKeyOrConfig === 'symbol')) {\n return createSubscribeSwcAppRouteChangeWhileConnected({})(targetOrOptions, propertyKeyOrConfig, descriptor);\n }\n\n // \uD568\uC218\uB85C \uD638\uCD9C\uB41C \uACBD\uC6B0 (\uAD04\uD638 \uC788\uC74C): @subscribeSwcAppRouteChangeWhileConnected() / @subscribeSwcAppRouteChangeWhileConnected('/path')\n let options: SwcAppRouteChangeOptions = {};\n\n if (Array.isArray(targetOrOptions)) {\n // \uBC30\uC5F4: @subscribeSwcAppRouteChangeWhileConnected(['/path1', '/path2'])\n // \uB610\uB294: @subscribeSwcAppRouteChangeWhileConnected(['/path1', '/path2'], { order: 1 })\n options.path = targetOrOptions;\n if (propertyKeyOrConfig && typeof propertyKeyOrConfig === 'object') {\n options = { ...options, ...propertyKeyOrConfig };\n }\n } else if (typeof targetOrOptions === 'string' || typeof targetOrOptions === 'function') {\n // \uBB38\uC790\uC5F4 \uB610\uB294 \uD568\uC218: @subscribeSwcAppRouteChangeWhileConnected('/path')\n // \uB610\uB294: @subscribeSwcAppRouteChangeWhileConnected('/path', { order: 1 })\n options.path = targetOrOptions;\n if (propertyKeyOrConfig && typeof propertyKeyOrConfig === 'object') {\n options = { ...options, ...propertyKeyOrConfig };\n }\n } else if (targetOrOptions && typeof targetOrOptions === 'object') {\n // \uAC1D\uCCB4: @subscribeSwcAppRouteChangeWhileConnected({ path: '/path', filter: ..., order: 1 })\n options = targetOrOptions;\n }\n\n return createSubscribeSwcAppRouteChangeWhileConnected(options);\n}\nexport const changedRoute = subscribeSwcAppRouteChangeWhileConnected;\n\n// Helper function to retrieve route change subscribers metadata\nexport const getSubscribeSwcAppRouteChangeWhileConnectedMetadata = (target: any): SwcAppRouteChangeSubscriberMetadata[] => {\n const constructor = target instanceof Function ? target : target.constructor;\n const results = ReflectUtils.getOwnMetadata(SUBSCRIBE_SWC_APP_ROUTE_CHANGE_WHILE_CONNECTED_METADATA_KEY, constructor);\n if (!results) return [];\n \n // Sort by order (default 0 if not specified)\n return [...results].sort((a, b) => (a.options?.order ?? 0) - (b.options?.order ?? 0));\n};\n"],
5
- "mappings": "AAAA,SAAQ,oBAAmB;AAIpB,MAAM,8DAA8D,OAAO,IAAI,qEAAqE;AAgB3J,SAAS,+CAA+C,SAAqD;AAC3G,SAAO,CAAC,QAAgB,aAA8B,eAAoC;AACxF,UAAM,cAAc,SAAS;AAC7B,UAAM,SAAS,SAAS;AAExB,UAAM,cAAc,OAAO;AAC3B,QAAI,OAAO,aAAa,eAAe,6DAA6D,WAAW;AAC/G,QAAI,CAAC,MAAM;AACT,aAAO,CAAC;AACR,mBAAa,eAAe,6DAA6D,MAAM,WAAW;AAAA,IAC5G;AACA,SAAK,KAAK,EAAE,aAAa,QAAQ,CAAC;AAElC,WAAO;AAAA,EACT;AACF;AAWO,SAAS,yCAAyC,iBAAuB,qBAA2B,YAAsC;AAG/I,MAAI,wBAAwB,OAAO,wBAAwB,YAAY,OAAO,wBAAwB,WAAW;AAC/G,WAAO,+CAA+C,CAAC,CAAC,EAAE,iBAAiB,qBAAqB,UAAU;AAAA,EAC5G;AAGA,MAAI,UAAoC,CAAC;AAEzC,MAAI,MAAM,QAAQ,eAAe,GAAG;AAGlC,YAAQ,OAAO;AACf,QAAI,uBAAuB,OAAO,wBAAwB,UAAU;AAClE,gBAAU,EAAE,GAAG,SAAS,GAAG,oBAAoB;AAAA,IACjD;AAAA,EACF,WAAW,OAAO,oBAAoB,YAAY,OAAO,oBAAoB,YAAY;AAGvF,YAAQ,OAAO;AACf,QAAI,uBAAuB,OAAO,wBAAwB,UAAU;AAClE,gBAAU,EAAE,GAAG,SAAS,GAAG,oBAAoB;AAAA,IACjD;AAAA,EACF,WAAW,mBAAmB,OAAO,oBAAoB,UAAU;AAEjE,cAAU;AAAA,EACZ;AAEA,SAAO,+CAA+C,OAAO;AAC/D;AACO,MAAM,eAAe;AAGrB,MAAM,sDAAsD,CAAC,WAAuD;AACzH,QAAM,cAAc,kBAAkB,WAAW,SAAS,OAAO;AACjE,QAAM,UAAU,aAAa,eAAe,6DAA6D,WAAW;AACpH,MAAI,CAAC,QAAS,QAAO,CAAC;AAGtB,SAAO,CAAC,GAAG,OAAO,EAAE,KAAK,CAAC,GAAG,OAAO,EAAE,SAAS,SAAS,MAAM,EAAE,SAAS,SAAS,EAAE;AACtF;",
4
+ "sourcesContent": ["import {ReflectUtils} from '@dooboostore/core';\nimport {Router} from '@dooboostore/core-web';\nimport {HelperHostSet} from '../types';\n\nexport const SUBSCRIBE_SWC_APP_ROUTE_CHANGE_WHILE_CONNECTED_METADATA_KEY = Symbol.for('simple-web-component:subscribe-swc-app-route-change-while-connected');\n\nexport type RoutePathType = string | string[] | ((currentThis: any) => string | string[]);\n\nexport interface SwcAppRouteChangeSubscriberMetadata {\n propertyKey: string | symbol;\n options?: SwcAppRouteChangeOptions;\n}\n\nexport interface SwcAppRouteChangeOptions {\n path?: RoutePathType;\n filter?: (router: Router, meta: { currentThis: any; helper: HelperHostSet }) => boolean;\n order?: number;\n valueKey?: symbol | string;\n}\n\nfunction createSubscribeSwcAppRouteChangeWhileConnected(options?: SwcAppRouteChangeOptions): MethodDecorator {\n return (target: Object, propertyKey: string | symbol, descriptor?: PropertyDescriptor) => {\n const pathPattern = options?.path;\n const filter = options?.filter;\n\n const constructor = target.constructor;\n let list = ReflectUtils.getOwnMetadata(SUBSCRIBE_SWC_APP_ROUTE_CHANGE_WHILE_CONNECTED_METADATA_KEY, constructor) as SwcAppRouteChangeSubscriberMetadata[];\n if (!list) {\n list = [];\n ReflectUtils.defineMetadata(SUBSCRIBE_SWC_APP_ROUTE_CHANGE_WHILE_CONNECTED_METADATA_KEY, list, constructor);\n }\n list.push({ propertyKey, options });\n\n return descriptor;\n };\n}\n\n// \uC624\uBC84\uB85C\uB4DC \uC2DC\uADF8\uB2C8\uCC98 - \uC9C1\uC811 \uC0AC\uC6A9 (\uAD04\uD638 \uC5C6\uC74C)\nexport function subscribeSwcAppRouteChangeWhileConnected(target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;\n// \uC624\uBC84\uB85C\uB4DC \uC2DC\uADF8\uB2C8\uCC98 - \uD568\uC218 \uD638\uCD9C (\uAD04\uD638 \uC788\uC74C)\nexport function subscribeSwcAppRouteChangeWhileConnected(): MethodDecorator;\nexport function subscribeSwcAppRouteChangeWhileConnected(pathPattern: RoutePathType): MethodDecorator;\nexport function subscribeSwcAppRouteChangeWhileConnected(pathPattern: RoutePathType, config: Omit<SwcAppRouteChangeOptions, 'path'>): MethodDecorator;\nexport function subscribeSwcAppRouteChangeWhileConnected(options: SwcAppRouteChangeOptions): MethodDecorator;\n\n// \uC2E4\uC81C \uAD6C\uD604 (\uC774\uC911 \uBAA8\uB4DC)\nexport function subscribeSwcAppRouteChangeWhileConnected(targetOrOptions?: any, propertyKeyOrConfig?: any, descriptor?: PropertyDescriptor): any {\n // \uC9C1\uC811 \uB370\uCF54\uB808\uC774\uD130\uB85C \uC0AC\uC6A9\uB41C \uACBD\uC6B0 (\uAD04\uD638 \uC5C6\uC74C): @subscribeSwcAppRouteChangeWhileConnected\n // propertyKey\uAC00 string | symbol\uC774\uACE0 descriptor\uAC00 \uC788\uC73C\uBA74 \uC9C1\uC811 \uC0AC\uC6A9\n if (propertyKeyOrConfig && (typeof propertyKeyOrConfig === 'string' || typeof propertyKeyOrConfig === 'symbol')) {\n return createSubscribeSwcAppRouteChangeWhileConnected({})(targetOrOptions, propertyKeyOrConfig, descriptor);\n }\n\n // \uD568\uC218\uB85C \uD638\uCD9C\uB41C \uACBD\uC6B0 (\uAD04\uD638 \uC788\uC74C): @subscribeSwcAppRouteChangeWhileConnected() / @subscribeSwcAppRouteChangeWhileConnected('/path')\n let options: SwcAppRouteChangeOptions = {};\n\n if (Array.isArray(targetOrOptions)) {\n // \uBC30\uC5F4: @subscribeSwcAppRouteChangeWhileConnected(['/path1', '/path2'])\n // \uB610\uB294: @subscribeSwcAppRouteChangeWhileConnected(['/path1', '/path2'], { order: 1 })\n options.path = targetOrOptions;\n if (propertyKeyOrConfig && typeof propertyKeyOrConfig === 'object') {\n options = { ...options, ...propertyKeyOrConfig };\n }\n } else if (typeof targetOrOptions === 'string' || typeof targetOrOptions === 'function') {\n // \uBB38\uC790\uC5F4 \uB610\uB294 \uD568\uC218: @subscribeSwcAppRouteChangeWhileConnected('/path')\n // \uB610\uB294: @subscribeSwcAppRouteChangeWhileConnected('/path', { order: 1 })\n options.path = targetOrOptions;\n if (propertyKeyOrConfig && typeof propertyKeyOrConfig === 'object') {\n options = { ...options, ...propertyKeyOrConfig };\n }\n } else if (targetOrOptions && typeof targetOrOptions === 'object') {\n // \uAC1D\uCCB4: @subscribeSwcAppRouteChangeWhileConnected({ path: '/path', filter: ..., order: 1 })\n options = targetOrOptions;\n }\n\n return createSubscribeSwcAppRouteChangeWhileConnected(options);\n}\nexport const changedRoute = subscribeSwcAppRouteChangeWhileConnected;\n\n// Helper function to retrieve route change subscribers metadata\nexport const getSubscribeSwcAppRouteChangeWhileConnectedMetadata = (target: any): SwcAppRouteChangeSubscriberMetadata[] => {\n const constructor = target instanceof Function ? target : target.constructor;\n const results = ReflectUtils.getOwnMetadata(SUBSCRIBE_SWC_APP_ROUTE_CHANGE_WHILE_CONNECTED_METADATA_KEY, constructor);\n if (!results) return [];\n \n // Sort by order (default 0 if not specified)\n return [...results].sort((a, b) => (a.options?.order ?? 0) - (b.options?.order ?? 0));\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// RouteSubscribeLifeCycler\n// NOTE: \uC2E4\uC81C \uAD6C\uB3C5 \uB85C\uC9C1\uC740 SwcAppMixin._connected \uC5D0\uC11C \uCC98\uB9AC\uB41C\uB2E4.\n// \uC774 cycler \uB294 \uBA54\uD0C0\uB370\uC774\uD130 \uC811\uADFC \uC9C4\uC785\uC810 \uC5ED\uD560\uB9CC \uD558\uBA70,\n// \uD5A5\uD6C4 SwcAppMixin \uC5D0\uC11C \uB85C\uC9C1\uC744 \uBD84\uB9AC\uD560 \uB54C \uC774 \uD074\uB798\uC2A4\uB85C \uC774\uC804\uD55C\uB2E4.\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 } from '../types';\n\nexport class RouteSubscribeLifeCycler implements ElementDefineLifeCycler {\n onConnected(_helperHostSet: HelperHostSet): void {\n // \uC2E4\uC81C \uAD6C\uB3C5\uC740 SwcAppMixin._connected \uC5D0\uC11C \uCC98\uB9AC\n }\n\n /** SwcAppMixin \uC774 \uAD6C\uB3C5 \uB300\uC0C1 \uBA54\uD0C0\uB97C \uAEBC\uB0BC \uB54C \uC0AC\uC6A9 */\n getMetadata(helperHostSet: HelperHostSet): SwcAppRouteChangeSubscriberMetadata[] {\n return getSubscribeSwcAppRouteChangeWhileConnectedMetad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A6D,WAAW;AACpH,MAAI,CAAC,QAAS,QAAO,CAAC;AAGtB,SAAO,CAAC,GAAG,OAAO,EAAE,KAAK,CAAC,GAAG,OAAO,EAAE,SAAS,SAAS,MAAM,EAAE,SAAS,SAAS,EAAE;AACtF;AAUO,MAAM,yBAA4D;AAAA,EACvE,YAAY,gBAAqC;AAAA,EAEjD;AAAA;AAAA,EAGA,YAAY,eAAqE;AAC/E,WAAO,oDAAoD,cAAc,KAAK;AAAA,EAChF;AACF;",
6
6
  "names": []
7
7
  }
@@ -0,0 +1,266 @@
1
+ var __decorate = function(decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ var __metadata = function(k, v) {
8
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
+ };
10
+ var _a, _b, _c, _d, _e, _f, _g, _h;
11
+ import { elementDefine, addEventListener } from "../decorators/index.js";
12
+ let SearchComponent = class SearchComponent2 extends HTMLElement {
13
+ constructor() {
14
+ super(...arguments);
15
+ this.results = [];
16
+ }
17
+ async onSearchInput(event) {
18
+ const input = event.target;
19
+ const query = input.value.trim();
20
+ if (query.length > 2) {
21
+ try {
22
+ const response = await fetch(`/api/search?q=${encodeURIComponent(query)}`);
23
+ this.results = await response.json();
24
+ this.renderResults();
25
+ } catch (error) {
26
+ console.error("Search failed:", error);
27
+ }
28
+ } else {
29
+ this.results = [];
30
+ this.renderResults();
31
+ }
32
+ }
33
+ renderResults() {
34
+ console.log("Rendering results:", this.results);
35
+ }
36
+ };
37
+ __decorate([
38
+ addEventListener("$this", "input", { debounceTime: 1e3 }),
39
+ __metadata("design:type", Function),
40
+ __metadata("design:paramtypes", [typeof (_a = typeof Event !== "undefined" && Event) === "function" ? _a : Object]),
41
+ __metadata("design:returntype", Promise)
42
+ ], SearchComponent.prototype, "onSearchInput", null);
43
+ SearchComponent = __decorate([
44
+ elementDefine("search-component")
45
+ ], SearchComponent);
46
+ let ResponsiveLayout = class ResponsiveLayout2 extends HTMLElement {
47
+ onWindowResize(event) {
48
+ const width = window.innerWidth;
49
+ const height = window.innerHeight;
50
+ console.log(`Window resized to: ${width}x${height}`);
51
+ this.updateLayout(width, height);
52
+ }
53
+ updateLayout(width, height) {
54
+ if (width < 768) {
55
+ this.classList.add("mobile");
56
+ this.classList.remove("desktop");
57
+ } else {
58
+ this.classList.add("desktop");
59
+ this.classList.remove("mobile");
60
+ }
61
+ }
62
+ };
63
+ __decorate([
64
+ addEventListener("$window", "resize", { throttleTime: 250 }),
65
+ __metadata("design:type", Function),
66
+ __metadata("design:paramtypes", [typeof (_b = typeof Event !== "undefined" && Event) === "function" ? _b : Object]),
67
+ __metadata("design:returntype", void 0)
68
+ ], ResponsiveLayout.prototype, "onWindowResize", null);
69
+ ResponsiveLayout = __decorate([
70
+ elementDefine("responsive-layout")
71
+ ], ResponsiveLayout);
72
+ let FormInput = class FormInput2 extends HTMLElement {
73
+ onFormInput(event) {
74
+ const input = event.target;
75
+ const fieldName = input.name;
76
+ const value = input.value;
77
+ console.log(`Validating ${fieldName}: ${value}`);
78
+ this.validateField(fieldName, value);
79
+ }
80
+ validateField(name, value) {
81
+ const isValid = value.length > 0;
82
+ console.log(`Field ${name} is ${isValid ? "valid" : "invalid"}`);
83
+ }
84
+ };
85
+ __decorate([
86
+ addEventListener("$this", "input", {
87
+ debounceTime: 300,
88
+ distinctUntilChanged: true
89
+ }),
90
+ __metadata("design:type", Function),
91
+ __metadata("design:paramtypes", [typeof (_c = typeof Event !== "undefined" && Event) === "function" ? _c : Object]),
92
+ __metadata("design:returntype", void 0)
93
+ ], FormInput.prototype, "onFormInput", null);
94
+ FormInput = __decorate([
95
+ elementDefine("form-input")
96
+ ], FormInput);
97
+ let InfiniteScroll = class InfiniteScroll2 extends HTMLElement {
98
+ constructor() {
99
+ super(...arguments);
100
+ this.isLoading = false;
101
+ }
102
+ onScroll(event) {
103
+ if (this.isLoading)
104
+ return;
105
+ if (this.isNearBottom()) {
106
+ console.log("Near bottom, loading more content...");
107
+ this.loadMoreContent();
108
+ }
109
+ }
110
+ isNearBottom() {
111
+ const scrollTop = window.scrollY;
112
+ const windowHeight = window.innerHeight;
113
+ const documentHeight = document.documentElement.scrollHeight;
114
+ return scrollTop + windowHeight >= documentHeight - 500;
115
+ }
116
+ async loadMoreContent() {
117
+ this.isLoading = true;
118
+ try {
119
+ await new Promise((resolve) => setTimeout(resolve, 1e3));
120
+ console.log("Content loaded");
121
+ } finally {
122
+ this.isLoading = false;
123
+ }
124
+ }
125
+ };
126
+ __decorate([
127
+ addEventListener("$window", "scroll", { throttleTime: 100 }),
128
+ __metadata("design:type", Function),
129
+ __metadata("design:paramtypes", [typeof (_d = typeof Event !== "undefined" && Event) === "function" ? _d : Object]),
130
+ __metadata("design:returntype", void 0)
131
+ ], InfiniteScroll.prototype, "onScroll", null);
132
+ InfiniteScroll = __decorate([
133
+ elementDefine("infinite-scroll")
134
+ ], InfiniteScroll);
135
+ let LengthTracker = class LengthTracker2 extends HTMLElement {
136
+ onInputChange(event) {
137
+ const input = event.target;
138
+ const length = input.value.length;
139
+ console.log(`Input length changed to: ${length}`);
140
+ this.updateLengthDisplay(length);
141
+ }
142
+ updateLengthDisplay(length) {
143
+ const display = this.querySelector(".length-display");
144
+ if (display) {
145
+ display.textContent = `${length} characters`;
146
+ }
147
+ }
148
+ };
149
+ __decorate([
150
+ addEventListener("$this", "input", {
151
+ distinctUntilChanged: (prev, curr) => {
152
+ return prev?.length === curr?.length;
153
+ }
154
+ }),
155
+ __metadata("design:type", Function),
156
+ __metadata("design:paramtypes", [typeof (_e = typeof Event !== "undefined" && Event) === "function" ? _e : Object]),
157
+ __metadata("design:returntype", void 0)
158
+ ], LengthTracker.prototype, "onInputChange", null);
159
+ LengthTracker = __decorate([
160
+ elementDefine("length-tracker")
161
+ ], LengthTracker);
162
+ let AutoSaveEditor = class AutoSaveEditor2 extends HTMLElement {
163
+ constructor() {
164
+ super(...arguments);
165
+ this.lastSavedContent = "";
166
+ }
167
+ async onContentChange(event) {
168
+ const textarea = event.target;
169
+ const content = textarea.value;
170
+ if (content !== this.lastSavedContent) {
171
+ console.log("Auto-saving content...");
172
+ await this.saveContent(content);
173
+ this.lastSavedContent = content;
174
+ }
175
+ }
176
+ async saveContent(content) {
177
+ try {
178
+ const response = await fetch("/api/save", {
179
+ method: "POST",
180
+ headers: { "Content-Type": "application/json" },
181
+ body: JSON.stringify({ content })
182
+ });
183
+ if (response.ok) {
184
+ console.log("Content saved successfully");
185
+ this.showSaveIndicator();
186
+ }
187
+ } catch (error) {
188
+ console.error("Save failed:", error);
189
+ }
190
+ }
191
+ showSaveIndicator() {
192
+ const indicator = this.querySelector(".save-indicator");
193
+ if (indicator) {
194
+ indicator.classList.add("show");
195
+ setTimeout(() => indicator.classList.remove("show"), 2e3);
196
+ }
197
+ }
198
+ };
199
+ __decorate([
200
+ addEventListener("$this", "input", {
201
+ debounceTime: 2e3,
202
+ distinctUntilChanged: (prev, curr) => {
203
+ return prev === curr;
204
+ }
205
+ }),
206
+ __metadata("design:type", Function),
207
+ __metadata("design:paramtypes", [typeof (_f = typeof Event !== "undefined" && Event) === "function" ? _f : Object]),
208
+ __metadata("design:returntype", Promise)
209
+ ], AutoSaveEditor.prototype, "onContentChange", null);
210
+ AutoSaveEditor = __decorate([
211
+ elementDefine("auto-save-editor")
212
+ ], AutoSaveEditor);
213
+ let KeyboardHandler = class KeyboardHandler2 extends HTMLElement {
214
+ onSaveShortcut(event) {
215
+ event.preventDefault();
216
+ console.log("Save shortcut triggered");
217
+ this.handleSave();
218
+ }
219
+ handleSave() {
220
+ console.log("Saving...");
221
+ }
222
+ };
223
+ __decorate([
224
+ addEventListener("$document", "keydown", {
225
+ throttleTime: 500,
226
+ filter: (event) => {
227
+ return (event.ctrlKey || event.metaKey) && event.key === "s";
228
+ }
229
+ }),
230
+ __metadata("design:type", Function),
231
+ __metadata("design:paramtypes", [typeof (_g = typeof KeyboardEvent !== "undefined" && KeyboardEvent) === "function" ? _g : Object]),
232
+ __metadata("design:returntype", void 0)
233
+ ], KeyboardHandler.prototype, "onSaveShortcut", null);
234
+ KeyboardHandler = __decorate([
235
+ elementDefine("keyboard-handler")
236
+ ], KeyboardHandler);
237
+ let MouseTracker = class MouseTracker2 extends HTMLElement {
238
+ onMouseMove(event) {
239
+ const x = event.clientX;
240
+ const y = event.clientY;
241
+ this.updateCursorPosition(x, y);
242
+ }
243
+ updateCursorPosition(x, y) {
244
+ console.log(`Cursor at: ${x}, ${y}`);
245
+ }
246
+ };
247
+ __decorate([
248
+ addEventListener("$document", "mousemove", { throttleTime: 100 }),
249
+ __metadata("design:type", Function),
250
+ __metadata("design:paramtypes", [typeof (_h = typeof MouseEvent !== "undefined" && MouseEvent) === "function" ? _h : Object]),
251
+ __metadata("design:returntype", void 0)
252
+ ], MouseTracker.prototype, "onMouseMove", null);
253
+ MouseTracker = __decorate([
254
+ elementDefine("mouse-tracker")
255
+ ], MouseTracker);
256
+ export {
257
+ AutoSaveEditor,
258
+ FormInput,
259
+ InfiniteScroll,
260
+ KeyboardHandler,
261
+ LengthTracker,
262
+ MouseTracker,
263
+ ResponsiveLayout,
264
+ SearchComponent
265
+ };
266
+ //# sourceMappingURL=RxJSOperatorsExample.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/examples/RxJSOperatorsExample.ts"],
4
+ "sourcesContent": ["/**\n * Example: Using RxJS-like Operators with @addEventListener\n * \n * This example demonstrates how to use debounceTime, throttleTime, and distinctUntilChanged\n * operators with the @addEventListener decorator.\n */\n\nimport { elementDefine, addEventListener } from '../decorators';\n\n/**\n * Example 1: Search Component with Debounce\n * \n * Waits 1 second after user stops typing before performing search.\n * Prevents excessive API calls during typing.\n */\n@elementDefine('search-component')\nexport class SearchComponent extends HTMLElement {\n private results: any[] = [];\n\n @addEventListener('$this', 'input', { debounceTime: 1000 })\n async onSearchInput(event: Event) {\n const input = event.target as HTMLInputElement;\n const query = input.value.trim();\n\n if (query.length > 2) {\n try {\n // Simulate API call\n const response = await fetch(`/api/search?q=${encodeURIComponent(query)}`);\n this.results = await response.json();\n this.renderResults();\n } catch (error) {\n console.error('Search failed:', error);\n }\n } else {\n this.results = [];\n this.renderResults();\n }\n }\n\n private renderResults() {\n // Render search results\n console.log('Rendering results:', this.results);\n }\n}\n\n/**\n * Example 2: Window Resize Handler with Throttle\n * \n * Recalculates layout at most 4 times per second (every 250ms).\n * Prevents performance issues from excessive resize calculations.\n */\n@elementDefine('responsive-layout')\nexport class ResponsiveLayout extends HTMLElement {\n @addEventListener('$window', 'resize', { throttleTime: 250 })\n onWindowResize(event: Event) {\n const width = window.innerWidth;\n const height = window.innerHeight;\n\n console.log(`Window resized to: ${width}x${height}`);\n this.updateLayout(width, height);\n }\n\n private updateLayout(width: number, height: number) {\n // Update layout based on new dimensions\n if (width < 768) {\n this.classList.add('mobile');\n this.classList.remove('desktop');\n } else {\n this.classList.add('desktop');\n this.classList.remove('mobile');\n }\n }\n}\n\n/**\n * Example 3: Form Input with Debounce + Distinct\n * \n * Validates field only when:\n * 1. User stops typing (debounce 300ms)\n * 2. AND the value actually changed (distinct)\n */\n@elementDefine('form-input')\nexport class FormInput extends HTMLElement {\n @addEventListener('$this', 'input', {\n debounceTime: 300,\n distinctUntilChanged: true\n })\n onFormInput(event: Event) {\n const input = event.target as HTMLInputElement;\n const fieldName = input.name;\n const value = input.value;\n\n console.log(`Validating ${fieldName}: ${value}`);\n this.validateField(fieldName, value);\n }\n\n private validateField(name: string, value: string) {\n // Perform validation\n const isValid = value.length > 0;\n console.log(`Field ${name} is ${isValid ? 'valid' : 'invalid'}`);\n }\n}\n\n/**\n * Example 4: Scroll Event with Throttle\n * \n * Checks if user scrolled to bottom at most 10 times per second.\n * Prevents excessive \"load more\" API calls.\n */\n@elementDefine('infinite-scroll')\nexport class InfiniteScroll extends HTMLElement {\n private isLoading = false;\n\n @addEventListener('$window', 'scroll', { throttleTime: 100 })\n onScroll(event: Event) {\n if (this.isLoading) return;\n\n if (this.isNearBottom()) {\n console.log('Near bottom, loading more content...');\n this.loadMoreContent();\n }\n }\n\n private isNearBottom(): boolean {\n const scrollTop = window.scrollY;\n const windowHeight = window.innerHeight;\n const documentHeight = document.documentElement.scrollHeight;\n\n return scrollTop + windowHeight >= documentHeight - 500;\n }\n\n private async loadMoreContent() {\n this.isLoading = true;\n try {\n // Simulate API call\n await new Promise(resolve => setTimeout(resolve, 1000));\n console.log('Content loaded');\n } finally {\n this.isLoading = false;\n }\n }\n}\n\n/**\n * Example 5: Custom Comparison with Distinct\n * \n * Only fires when the input value length changes.\n * Ignores changes that don't affect the length.\n */\n@elementDefine('length-tracker')\nexport class LengthTracker extends HTMLElement {\n @addEventListener('$this', 'input', {\n distinctUntilChanged: (prev: any, curr: any) => {\n // Only consider it changed if the length differs\n return prev?.length === curr?.length;\n }\n })\n onInputChange(event: Event) {\n const input = event.target as HTMLInputElement;\n const length = input.value.length;\n\n console.log(`Input length changed to: ${length}`);\n this.updateLengthDisplay(length);\n }\n\n private updateLengthDisplay(length: number) {\n // Update UI with new length\n const display = this.querySelector('.length-display');\n if (display) {\n display.textContent = `${length} characters`;\n }\n }\n}\n\n/**\n * Example 6: Complex Scenario - Auto-save with Multiple Operators\n * \n * Combines debounce and distinct for intelligent auto-save:\n * - Waits 2 seconds after user stops typing\n * - Only saves if content actually changed\n * - Prevents unnecessary save operations\n */\n@elementDefine('auto-save-editor')\nexport class AutoSaveEditor extends HTMLElement {\n private lastSavedContent = '';\n\n @addEventListener('$this', 'input', {\n debounceTime: 2000,\n distinctUntilChanged: (prev: any, curr: any) => {\n // Consider changed if the content is different\n return prev === curr;\n }\n })\n async onContentChange(event: Event) {\n const textarea = event.target as HTMLTextAreaElement;\n const content = textarea.value;\n\n if (content !== this.lastSavedContent) {\n console.log('Auto-saving content...');\n await this.saveContent(content);\n this.lastSavedContent = content;\n }\n }\n\n private async saveContent(content: string) {\n try {\n // Simulate API call\n const response = await fetch('/api/save', {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify({ content })\n });\n\n if (response.ok) {\n console.log('Content saved successfully');\n this.showSaveIndicator();\n }\n } catch (error) {\n console.error('Save failed:', error);\n }\n }\n\n private showSaveIndicator() {\n const indicator = this.querySelector('.save-indicator');\n if (indicator) {\n indicator.classList.add('show');\n setTimeout(() => indicator.classList.remove('show'), 2000);\n }\n }\n}\n\n/**\n * Example 7: Keyboard Shortcut Handler with Throttle\n * \n * Prevents rapid repeated execution of keyboard shortcuts.\n */\n@elementDefine('keyboard-handler')\nexport class KeyboardHandler extends HTMLElement {\n @addEventListener('$document', 'keydown', {\n throttleTime: 500,\n filter: (event: KeyboardEvent) => {\n // Only handle Ctrl+S or Cmd+S\n return (event.ctrlKey || event.metaKey) && event.key === 's';\n }\n })\n onSaveShortcut(event: KeyboardEvent) {\n event.preventDefault();\n console.log('Save shortcut triggered');\n this.handleSave();\n }\n\n private handleSave() {\n // Handle save operation\n console.log('Saving...');\n }\n}\n\n/**\n * Example 8: Mouse Move Tracking with Throttle\n * \n * Tracks mouse position at most 10 times per second.\n * Useful for analytics or interactive features.\n */\n@elementDefine('mouse-tracker')\nexport class MouseTracker extends HTMLElement {\n @addEventListener('$document', 'mousemove', { throttleTime: 100 })\n onMouseMove(event: MouseEvent) {\n const x = event.clientX;\n const y = event.clientY;\n\n // Update cursor position indicator\n this.updateCursorPosition(x, y);\n }\n\n private updateCursorPosition(x: number, y: number) {\n // Update UI with cursor position\n console.log(`Cursor at: ${x}, ${y}`);\n }\n}\n"],
5
+ "mappings": ";;;;;;;;;;AAOA,SAAS,eAAe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racker"]
7
+ }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/types/index.ts"],
4
- "sourcesContent": ["import { SimpleApplication } from '@dooboostore/simple-boot';\nimport { Router } from '@dooboostore/core-web';\nimport {SwcAttributeConfigType, SwcConfigType} from \"../SwcAppEngine\";\n\nexport enum InjectSituationType {\n HOST_SET = 'SIMPLE_WEB_COMPONENT://HOSTSET',\n APP_HOST = 'SIMPLE_WEB_COMPONENT://APPHOST',\n APP_HOSTS = 'SIMPLE_WEB_COMPONENT://APPHOSTS',\n HOST = 'SIMPLE_WEB_COMPONENT://HOST',\n PARENT_HOST = 'SIMPLE_WEB_COMPONENT://PARENTHOST',\n HOSTS = 'SIMPLE_WEB_COMPONENT://HOSTS',\n FIRST_HOST = 'SIMPLE_WEB_COMPONENT://FIRSTHOST',\n LAST_HOST = 'SIMPLE_WEB_COMPONENT://LASTHOST',\n FIRST_APP_HOST = 'SIMPLE_WEB_COMPONENT://FIRSTAPPHOST',\n LAST_APP_HOST = 'SIMPLE_WEB_COMPONENT://LASTAPPHOST'\n}\n\nexport type SwcRootType = 'light' | 'shadow' | 'all' | 'auto';\n\nexport type SpecialSelector = '$this' | '$window' | '$document' | '$host' | '$appHost' | '$firstHost' | '$lastHost' | '$firstAppHost' | '$lastAppHost' | '$hosts' | '$appHosts';\n\nexport type SwcQueryOptions = { root?: SwcRootType };\n\nexport type HelperSet = {\n $d: Document;\n $w: Window;\n $q: (selector: string, root?: Element | Document | ShadowRoot) => HTMLElement | null;\n $qa: (selector: string, root?: Element | Document | ShadowRoot) => HTMLElement[];\n $qi: (id: string, root?: Document | ShadowRoot) => HTMLElement | null;\n};\n\nexport type HostSet = {\n $host: HTMLElement | null; // Nearest parent SWC component\n $parentHost: HTMLElement | null; // Grandparent SWC ancestor\n $hosts: HTMLElement[]; // All SWC ancestors [root, ..., parent]\n $firstHost: HTMLElement | null; // Top-most SWC ancestor\n $lastHost: HTMLElement | null; // Same as $host\n // $templateHost: HTMLTemplateElement | null | undefined;\n $appHost: SwcAppInterface | null;\n $appHosts: SwcAppInterface[];\n $firstAppHost: SwcAppInterface | null;\n $lastAppHost: SwcAppInterface | null;\n};\n\nexport type HelperHostSet = HelperSet & HostSet & {$this: any};\n\nexport type SwcAppMessage<T = any> = {\n publisher?: any;\n data?: T;\n type?: string;\n};\n\n\nexport interface SwcAppInterface extends HTMLElement {\n simpleApplication?: SimpleApplication;\n config?: SwcConfigType;\n router?: Router;\n connect(config?: SwcAttributeConfigType): Promise<void>;\n routing(path: string): Promise<void>;\n reload(): void;\n back(): void;\n forward(): void;\n publishMessage(message: SwcAppMessage): void;\n}\n\nexport interface SwcElement {\n _swcId: string;\n // createSlotString(id: string): string\n // createEaHtml(id: string, script: string): string\n // createEaText(id: string, script: string): string\n // createEaAttribute(id: string, attributeName: string): string\n // createEaEvent(id: string, eventName: string): string\n // createEaProperty(id: string, propertyName: string): string\n}"],
4
+ "sourcesContent": ["import { SimpleApplication } from '@dooboostore/simple-boot';\nimport { Router } from '@dooboostore/core-web';\nimport {SwcAttributeConfigType, SwcConfigType} from \"../SwcAppEngine\";\n\nexport enum InjectSituationType {\n HOST_SET = 'SIMPLE_WEB_COMPONENT://HOSTSET',\n APP_HOST = 'SIMPLE_WEB_COMPONENT://APPHOST',\n APP_HOSTS = 'SIMPLE_WEB_COMPONENT://APPHOSTS',\n HOST = 'SIMPLE_WEB_COMPONENT://HOST',\n PARENT_HOST = 'SIMPLE_WEB_COMPONENT://PARENTHOST',\n HOSTS = 'SIMPLE_WEB_COMPONENT://HOSTS',\n FIRST_HOST = 'SIMPLE_WEB_COMPONENT://FIRSTHOST',\n LAST_HOST = 'SIMPLE_WEB_COMPONENT://LASTHOST',\n FIRST_APP_HOST = 'SIMPLE_WEB_COMPONENT://FIRSTAPPHOST',\n LAST_APP_HOST = 'SIMPLE_WEB_COMPONENT://LASTAPPHOST'\n}\n\nexport type SwcRootType = 'light' | 'shadow' | 'all' | 'auto';\n\nexport type SpecialSelector = '$this' | '$window' | '$document' | '$host' | '$appHost' | '$firstHost' | '$lastHost' | '$firstAppHost' | '$lastAppHost' | '$hosts' | '$appHosts';\n\nexport type SwcQueryOptions = { root?: SwcRootType };\n\nexport type HelperSet = {\n $d: Document;\n $w: Window;\n $q: (selector: string, root?: Element | Document | ShadowRoot) => HTMLElement | null;\n $qa: (selector: string, root?: Element | Document | ShadowRoot) => HTMLElement[];\n $qi: (id: string, root?: Document | ShadowRoot) => HTMLElement | null;\n};\n\nexport type HostSet = {\n $host: HTMLElement | null; // Nearest parent SWC component\n $parentHost: HTMLElement | null; // Grandparent SWC ancestor\n $hosts: HTMLElement[]; // All SWC ancestors [root, ..., parent]\n $firstHost: HTMLElement | null; // Top-most SWC ancestor\n $lastHost: HTMLElement | null; // Same as $host\n // $templateHost: HTMLTemplateElement | null | undefined;\n $appHost: SwcAppInterface | null;\n $appHosts: SwcAppInterface[];\n $firstAppHost: SwcAppInterface | null;\n $lastAppHost: SwcAppInterface | null;\n};\n\nexport type HelperHostSet = HelperSet & HostSet & {$this: any};\n\n// \uACF5\uD1B5 \uC140\uB809\uD130 \uD568\uC218 \u2014 \uC694\uC18C/\uB178\uB4DC\uB97C \uC9C1\uC811 \uBC18\uD658\uD558\uB294 \uD568\uC218 \uC140\uB809\uD130 (query\uB294 Node\uAE4C\uC9C0 \uBC18\uD658 \uAC00\uB2A5)\nexport type SwcFnSelector = (currentThis: any, helper: HelperHostSet) => Node | NodeList | Element | Element[] | null;\n// \uACF5\uD1B5 \uC140\uB809\uD130 \u2014 \uBB38\uC790\uC5F4(CSS/\uD2B9\uC218) \uB610\uB294 \uD568\uC218\nexport type SwcSelector = string | SwcFnSelector;\n\nexport type SwcAppMessage<T = any> = {\n publisher?: any;\n data?: T;\n type?: string;\n};\n\n\nexport interface SwcAppInterface extends HTMLElement {\n simpleApplication?: SimpleApplication;\n config?: SwcConfigType;\n router?: Router;\n connect(config?: SwcAttributeConfigType): Promise<void>;\n routing(path: string): Promise<void>;\n reload(): void;\n back(): void;\n forward(): void;\n publishMessage(message: SwcAppMessage): void;\n}\n\nexport interface SwcElement {\n _swcId: string;\n // createSlotString(id: string): string\n // createEaHtml(id: string, script: string): string\n // createEaText(id: string, script: string): string\n // createEaAttribute(id: string, attributeName: string): string\n // createEaEvent(id: string, eventName: string): string\n // createEaProperty(id: string, propertyName: string): string\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// ElementDefineLifeCycler\n//\n// \uAC01 \uB370\uCF54\uB808\uC774\uD130 \uD30C\uC77C(addEventListener, mutationObserver, \u2026)\uC774 \uC774 interface\uB97C\n// \uAD6C\uD604\uD574 export \uD558\uACE0, elementDefine.ts\uB294 cyclers \uBC30\uC5F4\uB85C \uAD00\uB9AC\uD558\uBA70 \uC704\uC784\uB9CC \uD55C\uB2E4.\n//\n// \uC2DC\uD074\uB7EC\uB294 \uC0DD\uC131\uC790\uC5D0\uC11C \uC544\uBB34 \uC778\uC790\uB3C4 \uBC1B\uC9C0 \uC54A\uB294\uB2E4. \uC0C1\uD0DC\uB294 \uC778\uC2A4\uD134\uC2A4\uBCC4\uB85C \uAD00\uB9AC\uD574\uC57C \uD558\uBBC0\uB85C,\n// \uAC01 \uB77C\uC774\uD504\uC0AC\uC774\uD074 \uD6C5(onConnected \uB4F1)\uC758 \uCCAB \uBC88\uC9F8 \uC778\uC790\uB85C HelperHostSet \uC744 \uBC1B\uC544\n// \uADF8 \uC548\uC758 $this(\uD604\uC7AC \uC5D8\uB9AC\uBA3C\uD2B8 \uC778\uC2A4\uD134\uC2A4) / $w(window) \uB85C \uCC98\uB9AC\uD55C\uB2E4.\n// elementDefine \uC740 elementDefine \uC2DC\uC810\uC5D0 \uC2DC\uD074\uB7EC\uB97C 1\uD68C \uC0DD\uC131\uD558\uACE0 \uACC4\uC18D \uC7AC\uC0AC\uC6A9\uD55C\uB2E4.\n// \uBAA8\uB4E0 \uBA54\uC11C\uB4DC\uB294 optional \u2014 \uAD00\uC2EC \uC788\uB294 \uD6C5\uB9CC \uAD6C\uD604\uD558\uBA74 \uB41C\uB2E4.\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\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// onConnected \uBC18\uD658 \uD0C0\uC785\n//\n// \uAC01 cycler \uAC00 \"\uD544\uC694\uD55C observer \uC815\uBCF4\"\uB97C \uC120\uC5B8\uD558\uBA74,\n// elementDefine \uC774 \uC218\uC9D1\uD574\uC11C \uD544\uC694\uD55C \uACBD\uC6B0\uC5D0\uB9CC observer \uC778\uC2A4\uD134\uC2A4\uB97C \uC0DD\uC131\uD55C\uB2E4.\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\n/** observer observe \uB300\uC0C1 \uC5D4\uD2B8\uB9AC. delegate:true \uC774\uBA74 target \uC740 \uC140\uB809\uD130 \uBB38\uC790\uC5F4\uC774\uBA70, \uC2E4\uC81C \uC694\uC18C\uB294 \uB3D9\uC801 \uCD94\uC801\uC73C\uB85C observe/unobserve \uB41C\uB2E4. */\nexport interface ObserverObserveTarget<TOptions> {\n target: Element | ShadowRoot | string;\n options?: TOptions;\n delegate?: boolean;\n /** delegate \uB3D9\uC801 \uCD94\uC801 \uC2DC observe/unobserve \uB97C \uC2E4\uD589\uD560 \uB8E8\uD2B8(\uC2A4\uCF54\uD504). delegate:true \uC77C \uB54C\uB9CC \uC758\uBBF8 \uC788\uB2E4. */\n delegateRoot?: SwcRootType;\n}\n\n/** MutationObserver observe \uB300\uC0C1 \uD558\uB098. \uB3D9\uC77C \uB8E8\uD2B8\uC758 \uC5EC\uB7EC \uB300\uC0C1\uC740 \uAC19\uC740 callback \uC744 \uACF5\uC720\uD55C\uB2E4. */\nexport interface MutationObserverSetEntry {\n target: Element | ShadowRoot | string;\n options?: MutationObserverInit;\n delegate?: boolean;\n delegateRoot?: SwcRootType;\n callback: (mutations: MutationRecord[], observer: MutationObserver) => void;\n}\n\n/** observe \uD560 \uB300\uC0C1 \uBAA9\uB85D (\uC5D4\uD2B8\uB9AC\uBCC4 \uCF5C\uBC31 \uD3EC\uD568). elementDefine \uC774 \uD558\uB098\uC758 MutationObserver \uB85C \uBAA8\uB450 observe \uD55C\uB2E4. */\nexport type MutationObserverSet = MutationObserverSetEntry[];\n\n/** ResizeObserver observe \uB300\uC0C1 \uD558\uB098. \uB3D9\uC77C \uC140\uB809\uD130\uC758 \uC5EC\uB7EC \uB300\uC0C1\uC740 \uAC19\uC740 callback \uC744 \uACF5\uC720\uD55C\uB2E4. */\nexport interface ResizeObserverSetEntry {\n target: Element | ShadowRoot | string;\n options?: ResizeObserverOptions;\n delegate?: boolean;\n delegateRoot?: SwcRootType;\n callback: (entries: ResizeObserverEntry[], observer: ResizeObserver) => void;\n}\n\n/** observe \uD560 \uB300\uC0C1 \uBAA9\uB85D (\uC5D4\uD2B8\uB9AC\uBCC4 \uCF5C\uBC31 \uD3EC\uD568). elementDefine \uC774 \uD558\uB098\uC758 ResizeObserver \uB85C \uBAA8\uB450 observe \uD55C\uB2E4. */\nexport type ResizeObserverSet = ResizeObserverSetEntry[];\n\n/** IntersectionObserver observe \uB300\uC0C1 \uD558\uB098. \uAC19\uC740 \uC635\uC158 \uADF8\uB8F9\uC758 \uC5EC\uB7EC \uB300\uC0C1\uC740 \uAC19\uC740 callback \uC744 \uACF5\uC720\uD55C\uB2E4. */\nexport interface IntersectionObserverSetEntry {\n target: Element | ShadowRoot | string;\n delegate?: boolean;\n delegateRoot?: SwcRootType;\n callback: (entries: IntersectionObserverEntry[], observer: IntersectionObserver) => void;\n}\n\n/** IntersectionObserver \uADF8\uB8F9. observer \uB294 \uC0DD\uC131 \uC2DC\uC810\uC5D0 \uC635\uC158\uC774 \uACE0\uC815\uB418\uBBC0\uB85C \uC635\uC158\uBCC4\uB85C 1\uAC1C\uC529 \uC0DD\uC131\uB41C\uB2E4. */\nexport interface IntersectionObserverGroup {\n /** observer \uC0DD\uC131 \uC635\uC158 (threshold/rootMargin/root). \uC774 \uAC12\uC774 \uAC19\uC73C\uBA74 \uAC19\uC740 observer \uB97C \uACF5\uC720\uD55C\uB2E4. */\n options: IntersectionObserverInit;\n observeTargets: IntersectionObserverSetEntry[];\n}\n\n/** observe \uD560 \uC635\uC158 \uADF8\uB8F9 \uBAA9\uB85D. elementDefine \uC774 \uADF8\uB8F9\uB9C8\uB2E4 IntersectionObserver \uB97C \uC0DD\uC131\uD55C\uB2E4. */\nexport type IntersectionObserverSet = IntersectionObserverGroup[];\n\n/**\n * onConnected \uC758 \uBC18\uD658 \uD0C0\uC785.\n * observer \uAC00 \uD544\uC694 \uC5C6\uB294 cycler \uB294 undefined \uB97C \uBC18\uD658\uD574\uB3C4 \uB41C\uB2E4.\n */\nexport interface OnConnectedResult {\n mutationObserverSet?: MutationObserverSet;\n resizeObserverSet?: ResizeObserverSet;\n intersectionObserverSet?: IntersectionObserverSet;\n}\n\n/**\n * \uAC01 \uB370\uCF54\uB808\uC774\uD130 \uD30C\uC77C\uC774 \uAD6C\uD604\uD558\uB294 \uB77C\uC774\uD504\uC0AC\uC774\uD074 \uC704\uC784 interface.\n *\n * \uAD6C\uD604\uCCB4\uB294 \uC0C1\uD0DC\uB97C \uAC16\uC9C0 \uC54A\uACE0, \uAC01 \uD6C5\uC758 \uCCAB \uBC88\uC9F8 \uC778\uC790\uB85C HelperHostSet \uC744 \uBC1B\uB294\uB2E4.\n * \uAD00\uC2EC \uC788\uB294 \uD6C5\uB9CC \uAD6C\uD604\uD558\uBA74 \uB41C\uB2E4 (\uC804\uBD80 optional).\n *\n * ```ts\n * const eventCycler = new EventListenerLifeCycler();\n * const cyclers: ElementDefineLifeCycler[] = [eventCycler, ...]; // elementDefine \uC2DC 1\uD68C \uC0DD\uC131\n *\n * proto.connectedCallback = async function () {\n * const helperHostSet = SwcUtils.getHelperAndHostSet(win, this);\n * const results = await Promise.all(cyclers.map(c => c.onConnected?.(helperHostSet)));\n * // results \uC5D0\uC11C mutationObserverSet / resizeObserverSet \uC218\uC9D1\n * // \u2192 \uD544\uC694\uD55C \uACBD\uC6B0\uC5D0\uB9CC MutationObserver / ResizeObserver \uC0DD\uC131\n * };\n * proto.disconnectedCallback = function () {\n * for (const c of cyclers) c.onDisconnected?.(helperHostSet);\n * };\n * ```\n */\nexport interface ElementDefineLifeCycler {\n /**\n * connectedCallback \uC2DC \uD638\uCD9C.\n * observer \uAC00 \uD544\uC694\uD558\uBA74 OnConnectedResult \uB97C \uBC18\uD658\uD558\uACE0,\n * \uD544\uC694 \uC5C6\uC73C\uBA74 void / undefined \uB97C \uBC18\uD658\uD55C\uB2E4.\n * @param helperHostSet \uD604\uC7AC \uC5D8\uB9AC\uBA3C\uD2B8 \uC778\uC2A4\uD134\uC2A4($this)\uB97C \uD3EC\uD568\uD55C \uCEE8\uD14D\uC2A4\uD2B8\n * @param resizeObserverSet \uC774\uC804 \uC2DC\uD074\uB7EC\uAC00 \uBC18\uD658\uD55C resize observer set (mutation \uC2DC\uD074\uB7EC\uAC00 \uC8FC\uC785\uBC1B\uC544 \uC0AC\uC6A9)\n */\n onConnected?(helperHostSet: HelperHostSet, resizeObserverSet?: ResizeObserverSet): OnConnectedResult | void | Promise<OnConnectedResult | void>;\n\n /** disconnectedCallback \uC2DC \uD638\uCD9C. \uB4F1\uB85D\uD55C \uB9AC\uC18C\uC2A4\uB97C \uD574\uC81C\uD55C\uB2E4. */\n onDisconnected?(helperHostSet: HelperHostSet): void;\n\n /** adoptedCallback \uC2DC \uD638\uCD9C (\uC120\uD0DD\uC801). */\n onAdopted?(helperHostSet: HelperHostSet): void;\n\n /**\n * attributeChangedCallback \uC2DC \uD638\uCD9C (\uC120\uD0DD\uC801).\n * @param helperHostSet \uD604\uC7AC \uC5D8\uB9AC\uBA3C\uD2B8 \uC778\uC2A4\uD134\uC2A4($this)\uB97C \uD3EC\uD568\uD55C \uCEE8\uD14D\uC2A4\uD2B8\n * @param name \uBCC0\uACBD\uB41C attribute \uC774\uB984\n * @param oldVal \uC774\uC804 \uAC12\n * @param newVal \uC0C8 \uAC12 (ActionExpression \uCC98\uB9AC \uD6C4)\n */\n onAttributeChanged?(helperHostSet: HelperHostSet, name: string, oldVal: string | null, newVal: any): void;\n\n /**\n * observedAttributes \uC5D0 \uD3EC\uD568\uD574\uC57C \uD558\uB294 attribute \uC774\uB984 \uBAA9\uB85D\uC744 \uBC18\uD658\uD55C\uB2E4.\n * elementDefine \uC774 define-time(constructor)\uC5D0 \uD638\uCD9C\uD574 \uC218\uC9D1\uD55C\uB2E4.\n * \uAD00\uC2EC \uC5C6\uC73C\uBA74 \uAD6C\uD604\uD558\uC9C0 \uC54A\uAC70\uB098 \uBE48 \uBC30\uC5F4\uC744 \uBC18\uD658\uD55C\uB2E4.\n * @param target constructor \uB610\uB294 element \uC778\uC2A4\uD134\uC2A4 (\uBA54\uD0C0\uB370\uC774\uD130 \uC870\uD68C\uC6A9)\n */\n getObservedAttributeNames?(target: any): string[];\n}"],
5
5
  "mappings": "AAIO,IAAK,sBAAL,kBAAKA,yBAAL;AACL,EAAAA,qBAAA,cAAW;AACX,EAAAA,qBAAA,cAAW;AACX,EAAAA,qBAAA,eAAY;AACZ,EAAAA,qBAAA,UAAO;AACP,EAAAA,qBAAA,iBAAc;AACd,EAAAA,qBAAA,WAAQ;AACR,EAAAA,qBAAA,gBAAa;AACb,EAAAA,qBAAA,eAAY;AACZ,EAAAA,qBAAA,oBAAiB;AACjB,EAAAA,qBAAA,mBAAgB;AAVN,SAAAA;AAAA,GAAA;",
6
6
  "names": ["InjectSituationType"]
7
7
  }