@dooboostore/simple-web-component 1.0.50 → 1.0.52

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 (241) hide show
  1. package/README.md +735 -354
  2. package/dist/cjs/SwcAppEngine.js.map +2 -2
  3. package/dist/cjs/decorators/addEventListener.js +64 -146
  4. package/dist/cjs/decorators/addEventListener.js.map +2 -2
  5. package/dist/cjs/decorators/applyAttribute.js +36 -48
  6. package/dist/cjs/decorators/applyAttribute.js.map +2 -2
  7. package/dist/cjs/decorators/applyClass.js +9 -12
  8. package/dist/cjs/decorators/applyClass.js.map +2 -2
  9. package/dist/cjs/decorators/applyNode.js +14 -22
  10. package/dist/cjs/decorators/applyNode.js.map +2 -2
  11. package/dist/cjs/decorators/applyProperty.js +12 -42
  12. package/dist/cjs/decorators/applyProperty.js.map +2 -2
  13. package/dist/cjs/decorators/applySlot.js +3 -3
  14. package/dist/cjs/decorators/applySlot.js.map +2 -2
  15. package/dist/cjs/decorators/applyStyle.js +9 -12
  16. package/dist/cjs/decorators/applyStyle.js.map +2 -2
  17. package/dist/cjs/decorators/around.js +124 -0
  18. package/dist/cjs/decorators/around.js.map +7 -0
  19. package/dist/cjs/decorators/changedAttribute.js +40 -12
  20. package/dist/cjs/decorators/changedAttribute.js.map +2 -2
  21. package/dist/cjs/decorators/elementDefine.js +224 -195
  22. package/dist/cjs/decorators/elementDefine.js.map +3 -3
  23. package/dist/cjs/decorators/emitCustomEvent.js +14 -12
  24. package/dist/cjs/decorators/emitCustomEvent.js.map +2 -2
  25. package/dist/cjs/decorators/eventMedia.js +36 -8
  26. package/dist/cjs/decorators/eventMedia.js.map +2 -2
  27. package/dist/cjs/decorators/fetch.js +278 -0
  28. package/dist/cjs/decorators/fetch.js.map +7 -0
  29. package/dist/cjs/decorators/index.js +5 -2
  30. package/dist/cjs/decorators/index.js.map +2 -2
  31. package/dist/cjs/decorators/intersectionObserver.js +33 -13
  32. package/dist/cjs/decorators/intersectionObserver.js.map +2 -2
  33. package/dist/cjs/decorators/lifecycles.js +11 -11
  34. package/dist/cjs/decorators/lifecycles.js.map +2 -2
  35. package/dist/cjs/decorators/mutationObserver.js +55 -39
  36. package/dist/cjs/decorators/mutationObserver.js.map +3 -3
  37. package/dist/cjs/decorators/parameter.js +92 -9
  38. package/dist/cjs/decorators/parameter.js.map +2 -2
  39. package/dist/cjs/decorators/publishSwcAppMessage.js +2 -2
  40. package/dist/cjs/decorators/publishSwcAppMessage.js.map +2 -2
  41. package/dist/cjs/decorators/query.js +11 -5
  42. package/dist/cjs/decorators/query.js.map +2 -2
  43. package/dist/cjs/decorators/requestAnimationFrame.js +7 -16
  44. package/dist/cjs/decorators/requestAnimationFrame.js.map +2 -2
  45. package/dist/cjs/decorators/resizeObserver.js +41 -17
  46. package/dist/cjs/decorators/resizeObserver.js.map +3 -3
  47. package/dist/cjs/decorators/setInterval.js +36 -25
  48. package/dist/cjs/decorators/setInterval.js.map +2 -2
  49. package/dist/cjs/decorators/setTimeout.js +36 -25
  50. package/dist/cjs/decorators/setTimeout.js.map +2 -2
  51. package/dist/cjs/decorators/state.js +13 -10
  52. package/dist/cjs/decorators/state.js.map +2 -2
  53. package/dist/cjs/decorators/{subscribeSwcAppMessageWhileConnected.js → subscribeSwcAppMessage.js} +20 -21
  54. package/dist/cjs/decorators/subscribeSwcAppMessage.js.map +7 -0
  55. package/dist/cjs/decorators/{subscribeSwcAppRouteChangeWhileConnected.js → subscribeSwcAppRouteChange.js} +23 -19
  56. package/dist/cjs/decorators/subscribeSwcAppRouteChange.js.map +7 -0
  57. package/dist/cjs/decorators/swcAppRoute.js +149 -0
  58. package/dist/cjs/decorators/swcAppRoute.js.map +7 -0
  59. package/dist/cjs/elements/SwcApp.js +70 -0
  60. package/dist/cjs/elements/SwcApp.js.map +2 -2
  61. package/dist/cjs/elements/SwcAppMixin.js +262 -83
  62. package/dist/cjs/elements/SwcAppMixin.js.map +3 -3
  63. package/dist/cjs/types/index.js +5 -1
  64. package/dist/cjs/types/index.js.map +2 -2
  65. package/dist/cjs/utils/Utils.js +36 -15
  66. package/dist/cjs/utils/Utils.js.map +2 -2
  67. package/dist/esm/SwcAppEngine.js.map +2 -2
  68. package/dist/esm/decorators/addEventListener.js +64 -146
  69. package/dist/esm/decorators/addEventListener.js.map +2 -2
  70. package/dist/esm/decorators/applyAttribute.js +36 -48
  71. package/dist/esm/decorators/applyAttribute.js.map +2 -2
  72. package/dist/esm/decorators/applyClass.js +9 -12
  73. package/dist/esm/decorators/applyClass.js.map +2 -2
  74. package/dist/esm/decorators/applyNode.js +15 -23
  75. package/dist/esm/decorators/applyNode.js.map +2 -2
  76. package/dist/esm/decorators/applyProperty.js +12 -42
  77. package/dist/esm/decorators/applyProperty.js.map +2 -2
  78. package/dist/esm/decorators/applySlot.js +3 -3
  79. package/dist/esm/decorators/applySlot.js.map +2 -2
  80. package/dist/esm/decorators/applyStyle.js +9 -12
  81. package/dist/esm/decorators/applyStyle.js.map +2 -2
  82. package/dist/esm/decorators/around.js +105 -0
  83. package/dist/esm/decorators/around.js.map +7 -0
  84. package/dist/esm/decorators/changedAttribute.js +40 -12
  85. package/dist/esm/decorators/changedAttribute.js.map +2 -2
  86. package/dist/esm/decorators/elementDefine.js +222 -193
  87. package/dist/esm/decorators/elementDefine.js.map +3 -3
  88. package/dist/esm/decorators/emitCustomEvent.js +15 -13
  89. package/dist/esm/decorators/emitCustomEvent.js.map +2 -2
  90. package/dist/esm/decorators/eventMedia.js +36 -8
  91. package/dist/esm/decorators/eventMedia.js.map +2 -2
  92. package/dist/esm/decorators/fetch.js +259 -0
  93. package/dist/esm/decorators/fetch.js.map +7 -0
  94. package/dist/esm/decorators/index.js +5 -2
  95. package/dist/esm/decorators/index.js.map +2 -2
  96. package/dist/esm/decorators/intersectionObserver.js +33 -13
  97. package/dist/esm/decorators/intersectionObserver.js.map +2 -2
  98. package/dist/esm/decorators/lifecycles.js +11 -11
  99. package/dist/esm/decorators/lifecycles.js.map +2 -2
  100. package/dist/esm/decorators/mutationObserver.js +55 -39
  101. package/dist/esm/decorators/mutationObserver.js.map +3 -3
  102. package/dist/esm/decorators/parameter.js +92 -9
  103. package/dist/esm/decorators/parameter.js.map +2 -2
  104. package/dist/esm/decorators/publishSwcAppMessage.js +2 -2
  105. package/dist/esm/decorators/publishSwcAppMessage.js.map +2 -2
  106. package/dist/esm/decorators/query.js +11 -5
  107. package/dist/esm/decorators/query.js.map +2 -2
  108. package/dist/esm/decorators/requestAnimationFrame.js +8 -17
  109. package/dist/esm/decorators/requestAnimationFrame.js.map +2 -2
  110. package/dist/esm/decorators/resizeObserver.js +41 -17
  111. package/dist/esm/decorators/resizeObserver.js.map +2 -2
  112. package/dist/esm/decorators/setInterval.js +37 -26
  113. package/dist/esm/decorators/setInterval.js.map +2 -2
  114. package/dist/esm/decorators/setTimeout.js +37 -26
  115. package/dist/esm/decorators/setTimeout.js.map +2 -2
  116. package/dist/esm/decorators/state.js +13 -10
  117. package/dist/esm/decorators/state.js.map +2 -2
  118. package/dist/esm/decorators/subscribeSwcAppMessage.js +53 -0
  119. package/dist/esm/decorators/subscribeSwcAppMessage.js.map +7 -0
  120. package/dist/esm/decorators/{subscribeSwcAppRouteChangeWhileConnected.js → subscribeSwcAppRouteChange.js} +20 -16
  121. package/dist/esm/decorators/subscribeSwcAppRouteChange.js.map +7 -0
  122. package/dist/esm/decorators/swcAppRoute.js +130 -0
  123. package/dist/esm/decorators/swcAppRoute.js.map +7 -0
  124. package/dist/esm/elements/SwcApp.js +70 -0
  125. package/dist/esm/elements/SwcApp.js.map +2 -2
  126. package/dist/esm/elements/SwcAppMixin.js +264 -85
  127. package/dist/esm/elements/SwcAppMixin.js.map +3 -3
  128. package/dist/esm/types/index.js +5 -1
  129. package/dist/esm/types/index.js.map +2 -2
  130. package/dist/esm/utils/Utils.js +36 -15
  131. package/dist/esm/utils/Utils.js.map +2 -2
  132. package/dist/esm-bundle/dooboostore-simple-web-component.esm.js +1893 -1000
  133. package/dist/esm-bundle/dooboostore-simple-web-component.esm.js.map +4 -4
  134. package/dist/types/SwcAppEngine.d.ts +1 -0
  135. package/dist/types/SwcAppEngine.d.ts.map +1 -1
  136. package/dist/types/decorators/addEventListener.d.ts +923 -960
  137. package/dist/types/decorators/addEventListener.d.ts.map +1 -1
  138. package/dist/types/decorators/applyAttribute.d.ts +26 -38
  139. package/dist/types/decorators/applyAttribute.d.ts.map +1 -1
  140. package/dist/types/decorators/applyClass.d.ts +1 -3
  141. package/dist/types/decorators/applyClass.d.ts.map +1 -1
  142. package/dist/types/decorators/applyNode.d.ts +15 -17
  143. package/dist/types/decorators/applyNode.d.ts.map +1 -1
  144. package/dist/types/decorators/applyProperty.d.ts +25 -45
  145. package/dist/types/decorators/applyProperty.d.ts.map +1 -1
  146. package/dist/types/decorators/applyStyle.d.ts +1 -3
  147. package/dist/types/decorators/applyStyle.d.ts.map +1 -1
  148. package/dist/types/decorators/around.d.ts +87 -0
  149. package/dist/types/decorators/around.d.ts.map +1 -0
  150. package/dist/types/decorators/changedAttribute.d.ts +21 -1
  151. package/dist/types/decorators/changedAttribute.d.ts.map +1 -1
  152. package/dist/types/decorators/elementDefine.d.ts.map +1 -1
  153. package/dist/types/decorators/emitCustomEvent.d.ts +0 -1
  154. package/dist/types/decorators/emitCustomEvent.d.ts.map +1 -1
  155. package/dist/types/decorators/eventMedia.d.ts +24 -1
  156. package/dist/types/decorators/eventMedia.d.ts.map +1 -1
  157. package/dist/types/decorators/fetch.d.ts +139 -0
  158. package/dist/types/decorators/fetch.d.ts.map +1 -0
  159. package/dist/types/decorators/index.d.ts +5 -2
  160. package/dist/types/decorators/index.d.ts.map +1 -1
  161. package/dist/types/decorators/intersectionObserver.d.ts +24 -11
  162. package/dist/types/decorators/intersectionObserver.d.ts.map +1 -1
  163. package/dist/types/decorators/lifecycles.d.ts +8 -7
  164. package/dist/types/decorators/lifecycles.d.ts.map +1 -1
  165. package/dist/types/decorators/mutationObserver.d.ts +26 -13
  166. package/dist/types/decorators/mutationObserver.d.ts.map +1 -1
  167. package/dist/types/decorators/parameter.d.ts +84 -6
  168. package/dist/types/decorators/parameter.d.ts.map +1 -1
  169. package/dist/types/decorators/publishSwcAppMessage.d.ts +0 -1
  170. package/dist/types/decorators/publishSwcAppMessage.d.ts.map +1 -1
  171. package/dist/types/decorators/query.d.ts +7 -7
  172. package/dist/types/decorators/query.d.ts.map +1 -1
  173. package/dist/types/decorators/requestAnimationFrame.d.ts +1 -1
  174. package/dist/types/decorators/requestAnimationFrame.d.ts.map +1 -1
  175. package/dist/types/decorators/resizeObserver.d.ts +26 -13
  176. package/dist/types/decorators/resizeObserver.d.ts.map +1 -1
  177. package/dist/types/decorators/setInterval.d.ts +10 -0
  178. package/dist/types/decorators/setInterval.d.ts.map +1 -1
  179. package/dist/types/decorators/setTimeout.d.ts +10 -0
  180. package/dist/types/decorators/setTimeout.d.ts.map +1 -1
  181. package/dist/types/decorators/state.d.ts.map +1 -1
  182. package/dist/types/decorators/subscribeSwcAppMessage.d.ts +44 -0
  183. package/dist/types/decorators/subscribeSwcAppMessage.d.ts.map +1 -0
  184. package/dist/types/decorators/subscribeSwcAppRouteChange.d.ts +60 -0
  185. package/dist/types/decorators/subscribeSwcAppRouteChange.d.ts.map +1 -0
  186. package/dist/types/decorators/swcAppRoute.d.ts +94 -0
  187. package/dist/types/decorators/swcAppRoute.d.ts.map +1 -0
  188. package/dist/types/elements/SwcApp.d.ts.map +1 -1
  189. package/dist/types/elements/SwcAppMixin.d.ts +423 -388
  190. package/dist/types/elements/SwcAppMixin.d.ts.map +1 -1
  191. package/dist/types/types/index.d.ts +43 -4
  192. package/dist/types/types/index.d.ts.map +1 -1
  193. package/dist/types/utils/Utils.d.ts +15 -5
  194. package/dist/types/utils/Utils.d.ts.map +1 -1
  195. package/dist/umd-bundle/dooboostore-simple-web-component.umd.js +1893 -1000
  196. package/dist/umd-bundle/dooboostore-simple-web-component.umd.js.map +4 -4
  197. package/package.json +8 -6
  198. package/src/SwcAppEngine.ts +1 -0
  199. package/src/decorators/addEventListener.ts +102 -96
  200. package/src/decorators/applyAttribute.ts +76 -138
  201. package/src/decorators/applyClass.ts +8 -14
  202. package/src/decorators/applyNode.ts +33 -41
  203. package/src/decorators/applyProperty.ts +51 -99
  204. package/src/decorators/applySlot.ts +3 -3
  205. package/src/decorators/applyStyle.ts +8 -14
  206. package/src/decorators/around.ts +196 -0
  207. package/src/decorators/changedAttribute.ts +39 -15
  208. package/src/decorators/elementDefine.ts +270 -219
  209. package/src/decorators/emitCustomEvent.ts +17 -13
  210. package/src/decorators/eventMedia.ts +50 -9
  211. package/src/decorators/fetch.ts +454 -0
  212. package/src/decorators/index.ts +5 -2
  213. package/src/decorators/intersectionObserver.ts +38 -24
  214. package/src/decorators/lifecycles.ts +24 -22
  215. package/src/decorators/mutationObserver.ts +71 -52
  216. package/src/decorators/parameter.ts +145 -14
  217. package/src/decorators/publishSwcAppMessage.ts +3 -4
  218. package/src/decorators/query.ts +22 -14
  219. package/src/decorators/requestAnimationFrame.ts +10 -19
  220. package/src/decorators/resizeObserver.ts +50 -29
  221. package/src/decorators/setInterval.ts +37 -26
  222. package/src/decorators/setTimeout.ts +37 -26
  223. package/src/decorators/state.ts +19 -13
  224. package/src/decorators/subscribeSwcAppMessage.ts +106 -0
  225. package/src/decorators/subscribeSwcAppRouteChange.ts +131 -0
  226. package/src/decorators/swcAppRoute.ts +231 -0
  227. package/src/elements/SwcApp.ts +40 -10
  228. package/src/elements/SwcAppMixin.ts +340 -101
  229. package/src/types/index.ts +38 -5
  230. package/src/utils/Utils.ts +50 -18
  231. package/dist/cjs/decorators/subscribeSwcAppMessageWhileConnected.js.map +0 -7
  232. package/dist/cjs/decorators/subscribeSwcAppRouteChangeWhileConnected.js.map +0 -7
  233. package/dist/esm/decorators/subscribeSwcAppMessageWhileConnected.js +0 -54
  234. package/dist/esm/decorators/subscribeSwcAppMessageWhileConnected.js.map +0 -7
  235. package/dist/esm/decorators/subscribeSwcAppRouteChangeWhileConnected.js.map +0 -7
  236. package/dist/types/decorators/subscribeSwcAppMessageWhileConnected.d.ts +0 -23
  237. package/dist/types/decorators/subscribeSwcAppMessageWhileConnected.d.ts.map +0 -1
  238. package/dist/types/decorators/subscribeSwcAppRouteChangeWhileConnected.d.ts +0 -31
  239. package/dist/types/decorators/subscribeSwcAppRouteChangeWhileConnected.d.ts.map +0 -1
  240. package/src/decorators/subscribeSwcAppMessageWhileConnected.ts +0 -91
  241. package/src/decorators/subscribeSwcAppRouteChangeWhileConnected.ts +0 -107
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/decorators/swcAppRoute.ts"],
4
+ "sourcesContent": ["import { ReflectUtils } from '@dooboostore/core';\nimport type { RouteAction, Router, RouterMethodOptions } from '@dooboostore/core-web';\nimport { SwcUtils } from '../utils/Utils';\nimport type { HelperHostSet } from '../types';\n\nexport const SWC_APP_ROUTE_METADATA_KEY = Symbol.for('simple-web-component:swc-app-route');\n\nexport interface SwcAppRouteMetadata {\n propertyKey: string | symbol;\n options?: SwcAppRouteOptions;\n}\n\n/** router.go \uC758 \uC774\uB3D9 \uC124\uC815 (\uB9AC\uD134\uAC12\uC73C\uB85C \uC9C1\uC811 \uC904 \uB54C) */\nexport type SwcAppRouteGoConfig = { path: RouteAction; replace?: boolean; state?: RouterMethodOptions; scrollToTop?: boolean };\n\n/**\n * type 'go' \uC77C \uB54C \uBA54\uC11C\uB4DC \uB9AC\uD134\uAC12 \u2192 \uC774\uB3D9\uD560 \uACF3.\n * - string / RouteAction({ path, searchParams }) : router.go \uB85C \uC774\uB3D9\n * - SwcAppRouteGoConfig({ path, replace, state, scrollToTop }) : \uADF8\uB300\uB85C router.go\n * - number : history \uC774\uB3D9 (-1 = \uB4A4\uB85C)\n * - undefined / null / false : \uC774\uB3D9\uD558\uC9C0 \uC54A\uC74C (\uC870\uAC74\uBD80 \uC774\uB3D9)\n */\nexport type SwcAppRouteGoValue = RouteAction | SwcAppRouteGoConfig | number | undefined | null | false;\n\n/**\n * \uC5B4\uB5A4 Router \uBA54\uC11C\uB4DC\uB85C \uC774\uB3D9\uD560\uC9C0. \uAE30\uBCF8 'go'.\n * - go: string / RouteAction / SwcAppRouteGoConfig / number (\uAC00\uB4DC \uC801\uC6A9)\n * - push / replace: RouteAction (\uAC00\uB4DC \uC801\uC6A9)\n * - pushDeleteSearchParam / replaceDeleteSearchParam / pushDeleteHashSearchParam / replaceDeleteHashSearchParam: string | string[]\n * - pushAddSearchParam / replaceAddSearchParam: [[key, value], ...]\n * - pushUpsertSearchParam / replaceUpsertSearchParam: { key: value | value[] }\n * query \uB9CC \uBC14\uAFB8\uB294 \uBA54\uC11C\uB4DC\uB294 \uACBD\uB85C\uAC00 \uADF8\uB300\uB85C\uB77C beforeLeave \uAC00\uB4DC \uB300\uC0C1\uC774 \uC544\uB2C8\uB2E4.\n * \uC5B4\uB290 \uACBD\uC6B0\uB4E0 undefined / null / false \uB97C \uB9AC\uD134\uD558\uBA74 \uC544\uBB34 \uAC83\uB3C4 \uD558\uC9C0 \uC54A\uB294\uB2E4.\n */\nexport type SwcAppRouteType =\n | 'go' | 'push' | 'replace'\n | 'pushDeleteSearchParam' | 'pushDeleteHashSearchParam' | 'pushAddSearchParam' | 'pushUpsertSearchParam'\n | 'replaceDeleteSearchParam' | 'replaceDeleteHashSearchParam' | 'replaceAddSearchParam' | 'replaceUpsertSearchParam';\n\nexport interface SwcAppRouteOptions {\n /** Router \uBA54\uC11C\uB4DC. \uAE30\uBCF8 'go' */\n type?: SwcAppRouteType;\n /** \uAE30\uBCF8 replace (type 'go' \uC804\uC6A9. \uB9AC\uD134\uAC12\uC774 SwcAppRouteGoConfig \uBA74 \uADF8\uCABD\uC774 \uC6B0\uC120) */\n replace?: boolean;\n /** \uAE30\uBCF8 state (go \uB294 SwcAppRouteGoConfig \uC758 state, \uB098\uBA38\uC9C0\uB294 \uB450 \uBC88\uC9F8 \uC778\uC790) */\n state?: RouterMethodOptions;\n /** \uAE30\uBCF8 scrollToTop (type 'go' \uC804\uC6A9. router.go \uAE30\uBCF8\uAC12 true) */\n scrollToTop?: boolean;\n /** false \uB97C \uB9AC\uD134\uD558\uBA74 \uC774\uB3D9\uD558\uC9C0 \uC54A\uB294\uB2E4. target = \uC774\uB3D9\uC744 \uD558\uB294 Router, value = valueKey \uB85C \uAEBC\uB0B8 \uB9AC\uD134\uAC12 */\n filter?: (target: Router, value: any, meta: { currentThis: any; helper: HelperHostSet }) => boolean;\n /**\n * Custom key to extract value from return object.\n * If not provided, uses SWC_APP_ROUTE_METADATA_KEY by default.\n * Useful when this decorator is stacked with others on the same method.\n *\n * Example:\n * @swcAppRoute({ valueKey: 'go' })\n * @publishSwcAppMessage('saved', { valueKey: 'saved' })\n * save() {\n * return { go: '/done', saved: { id: 1 } };\n * }\n */\n valueKey?: symbol | string;\n}\n\nconst isGoConfig = (v: any): v is SwcAppRouteGoConfig =>\n !!v && typeof v === 'object' && 'path' in v && ('replace' in v || 'state' in v || 'scrollToTop' in v || typeof v.path === 'object');\n\nfunction createSwcAppRoute(options?: SwcAppRouteOptions): MethodDecorator {\n return (target: Object, propertyKey: string | symbol, descriptor?: PropertyDescriptor) => {\n const constructor = target.constructor;\n let list = ReflectUtils.getOwnMetadata(SWC_APP_ROUTE_METADATA_KEY, constructor) as SwcAppRouteMetadata[];\n if (!list) {\n list = [];\n ReflectUtils.defineMetadata(SWC_APP_ROUTE_METADATA_KEY, list, constructor);\n }\n list.push({ propertyKey, options });\n\n if (!descriptor) {\n return descriptor;\n }\n\n // \uBA54\uC11C\uB4DC \uB798\uD551 - \uC6D0\uBCF8 \uBA54\uC11C\uB4DC\uC758 \uBC18\uD658\uAC12\uC73C\uB85C \uC774\uB3D9 (DI \uB85C router \uB97C \uBC1B\uC744 \uD544\uC694 \uC5C6\uC74C: \uC694\uC18C\uAC00 \uC18D\uD55C SwcApp \uC758 router \uC0AC\uC6A9)\n const originalMethod = descriptor.value;\n descriptor.value = function (...args: any[]) {\n const result = originalMethod.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 SWC_APP_ROUTE_METADATA_KEY.\n */\n const extractValue = (v: any) => {\n const keyToUse = options?.valueKey ?? SWC_APP_ROUTE_METADATA_KEY;\n if (v && typeof v === 'object' && keyToUse in v) {\n return v[keyToUse];\n }\n return v;\n };\n\n const route = (value: any) => {\n if (value === undefined || value === null || value === false) return;\n const router = SwcUtils.getAppHost(this as HTMLElement)?.router;\n if (!router) {\n console.warn('swcAppRoute: no SwcApp router found for', this);\n return;\n }\n if (options?.filter) {\n const helper = SwcUtils.getHelperAndHostSet(this as HTMLElement);\n if (!options.filter(router, value, { currentThis: this, helper })) return;\n }\n const type = options?.type ?? 'go';\n if (type === 'go') {\n if (typeof value === 'number') return router.go(value);\n const defaults = { replace: options?.replace, state: options?.state, scrollToTop: options?.scrollToTop };\n return router.go(isGoConfig(value) ? { ...defaults, ...value } : { ...defaults, path: value as RouteAction });\n }\n const state = options?.state;\n // push/replace \uB294 \uACBD\uB85C\uAC00 \uBC14\uB00C\uBBC0\uB85C go \uC640 \uAC19\uC774 beforeLeave \uAC00\uB4DC\uB97C \uAC70\uCE5C\uB2E4 (\uAC00\uB4DC \uC5C6\uC73C\uBA74 \uB3D9\uAE30)\n if ((type === 'push' || type === 'replace') && router.hasLeaveGuards) {\n return router.canLeave(router.getRouteData({ pathOrUrl: router.toUrl(value) }), router.value).then(ok => {\n if (!ok) return;\n if (type === 'push') router.push(value as RouteAction, state);\n else router.replace(value as RouteAction, state);\n });\n }\n switch (type) {\n case 'push':\n return router.push(value as RouteAction, state);\n case 'replace':\n return router.replace(value as RouteAction, state);\n case 'pushDeleteSearchParam':\n return router.pushDeleteSearchParam(value as string | string[], state);\n case 'pushDeleteHashSearchParam':\n return router.pushDeleteHashSearchParam(value as string | string[], state);\n case 'pushAddSearchParam':\n return router.pushAddSearchParam(value as [[string, string]], state);\n case 'pushUpsertSearchParam':\n return router.pushUpsertSearchParam(value as Record<string, string | string[]>, state);\n case 'replaceDeleteSearchParam':\n return router.replaceDeleteSearchParam(value as string | string[], state);\n case 'replaceDeleteHashSearchParam':\n return router.replaceDeleteHashSearchParam(value as string | string[], state);\n case 'replaceAddSearchParam':\n return router.replaceAddSearchParam(value as [[string, string]], state);\n case 'replaceUpsertSearchParam':\n return router.replaceUpsertSearchParam(value as Record<string, string | string[]>, state);\n }\n };\n\n // Promise \uCCB4\uD06C\n if (result instanceof Promise) {\n result\n .then(data => route(extractValue(data)))\n .catch(err => {\n console.warn('swcAppRoute async error:', err);\n });\n } else {\n route(extractValue(result));\n }\n\n return result;\n };\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 swcAppRoute(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 swcAppRoute(options: SwcAppRouteOptions): MethodDecorator;\n\nexport function swcAppRoute(targetOrOptions?: any, propertyKey?: string | symbol, descriptor?: PropertyDescriptor): any {\n // \uC9C1\uC811 \uB370\uCF54\uB808\uC774\uD130\uB85C \uC0AC\uC6A9\uB41C \uACBD\uC6B0 (\uAD04\uD638 \uC5C6\uC74C): @swcAppRoute\n if (targetOrOptions && typeof targetOrOptions === 'object' && propertyKey && (typeof propertyKey === 'string' || typeof propertyKey === 'symbol') && descriptor) {\n return createSwcAppRoute()(targetOrOptions, propertyKey, descriptor);\n }\n // \uD568\uC218\uB85C \uD638\uCD9C\uB41C \uACBD\uC6B0 (\uC778\uC790 \uC788\uC74C): @swcAppRoute({...})\n return createSwcAppRoute(targetOrOptions as SwcAppRouteOptions | undefined);\n}\n\n// --- Aliases ---\n\n/** type \uC744 \uACE0\uC815\uD55C \uBCC4\uCE6D. @swcAppRoutePush / @swcAppRoutePush({ state }) \uB458 \uB2E4. replace/scrollToTop \uC740 go \uC804\uC6A9 */\ntype SwcAppRouteTypedOptions<T extends SwcAppRouteType> = T extends 'go'\n ? Omit<SwcAppRouteOptions, 'type'>\n : Omit<SwcAppRouteOptions, 'type' | 'replace' | 'scrollToTop'>;\ntype SwcAppRouteTypedDecorator<T extends SwcAppRouteType> = {\n (target: Object, propertyKey: string | symbol, descriptor: PropertyDescriptor): PropertyDescriptor | void;\n (options: SwcAppRouteTypedOptions<T>): MethodDecorator; // \uBE48 \uAD04\uD638 \uAE08\uC9C0 \u2014 \uC778\uC790\uAC00 \uC5C6\uC73C\uBA74 bare\n};\nconst typedRoute = <T extends SwcAppRouteType>(type: T): SwcAppRouteTypedDecorator<T> =>\n ((targetOrOptions?: any, propertyKey?: string | symbol, descriptor?: PropertyDescriptor): any => {\n if (targetOrOptions && typeof targetOrOptions === 'object' && propertyKey && (typeof propertyKey === 'string' || typeof propertyKey === 'symbol') && descriptor) {\n return createSwcAppRoute({ type })(targetOrOptions, propertyKey, descriptor);\n }\n return createSwcAppRoute({ ...(targetOrOptions ?? {}), type });\n }) as SwcAppRouteTypedDecorator<T>;\n\n/** \uB9AC\uD134: string / RouteAction / SwcAppRouteGoConfig / number \u2192 router.go */\nexport const swcAppRouteGo = typedRoute('go');\n/** \uB9AC\uD134: RouteAction \u2192 router.push */\nexport const swcAppRoutePush = typedRoute('push');\n/** \uB9AC\uD134: RouteAction \u2192 router.replace */\nexport const swcAppRouteReplace = typedRoute('replace');\n/** \uB9AC\uD134: string | string[] \u2192 router.pushDeleteSearchParam */\nexport const swcAppRoutePushDeleteSearchParam = typedRoute('pushDeleteSearchParam');\n/** \uB9AC\uD134: string | string[] \u2192 router.pushDeleteHashSearchParam */\nexport const swcAppRoutePushDeleteHashSearchParam = typedRoute('pushDeleteHashSearchParam');\n/** \uB9AC\uD134: [[key, value], ...] \u2192 router.pushAddSearchParam */\nexport const swcAppRoutePushAddSearchParam = typedRoute('pushAddSearchParam');\n/** \uB9AC\uD134: { key: value | value[] } \u2192 router.pushUpsertSearchParam */\nexport const swcAppRoutePushUpsertSearchParam = typedRoute('pushUpsertSearchParam');\n/** \uB9AC\uD134: string | string[] \u2192 router.replaceDeleteSearchParam */\nexport const swcAppRouteReplaceDeleteSearchParam = typedRoute('replaceDeleteSearchParam');\n/** \uB9AC\uD134: string | string[] \u2192 router.replaceDeleteHashSearchParam */\nexport const swcAppRouteReplaceDeleteHashSearchParam = typedRoute('replaceDeleteHashSearchParam');\n/** \uB9AC\uD134: [[key, value], ...] \u2192 router.replaceAddSearchParam */\nexport const swcAppRouteReplaceAddSearchParam = typedRoute('replaceAddSearchParam');\n/** \uB9AC\uD134: { key: value | value[] } \u2192 router.replaceUpsertSearchParam */\nexport const swcAppRouteReplaceUpsertSearchParam = typedRoute('replaceUpsertSearchParam');\n\n// Helper function to retrieve route metadata\nexport const getSwcAppRouteMetadata = (target: any): SwcAppRouteMetadata[] | undefined => {\n const constructor = typeof target === 'function' ? target : target.constructor;\n return ReflectUtils.findAllMetadata<any[]>(SWC_APP_ROUTE_METADATA_KEY, constructor).flat();\n};\n"],
5
+ "mappings": "AAAA,SAAS,oBAAoB;AAE7B,SAAS,gBAAgB;AAGlB,MAAM,6BAA6B,OAAO,IAAI,oCAAoC;AA4DzF,MAAM,aAAa,CAAC,MAClB,CAAC,CAAC,KAAK,OAAO,MAAM,YAAY,UAAU,MAAM,aAAa,KAAK,WAAW,KAAK,iBAAiB,KAAK,OAAO,EAAE,SAAS;AAE5H,SAAS,kBAAkB,SAA+C;AACxE,SAAO,CAAC,QAAgB,aAA8B,eAAoC;AACxF,UAAM,cAAc,OAAO;AAC3B,QAAI,OAAO,aAAa,eAAe,4BAA4B,WAAW;AAC9E,QAAI,CAAC,MAAM;AACT,aAAO,CAAC;AACR,mBAAa,eAAe,4BAA4B,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Aa,UAAU;AAAA,EACrE;AAEA,SAAO,kBAAkB,eAAiD;AAC5E;AAYA,MAAM,aAAa,CAA4B,SAC5C,CAAC,iBAAuB,aAA+B,eAAyC;AAC/F,MAAI,mBAAmB,OAAO,oBAAoB,YAAY,gBAAgB,OAAO,gBAAgB,YAAY,OAAO,gBAAgB,aAAa,YAAY;AAC/J,WAAO,kBAAkB,EAAE,KAAK,CAAC,EAAE,iBAAiB,aAAa,UAAU;AAAA,EAC7E;AACA,SAAO,kBAAkB,EAAE,GAAI,mBAAmB,CAAC,GAAI,KAAK,CAAC;AAC/D;AAGK,MAAM,gBAAgB,WAAW,IAAI;AAErC,MAAM,kBAAkB,WAAW,MAAM;AAEzC,MAAM,qBAAqB,WAAW,SAAS;AAE/C,MAAM,mCAAmC,WAAW,uBAAuB;AAE3E,MAAM,uCAAuC,WAAW,2BAA2B;AAEnF,MAAM,gCAAgC,WAAW,oBAAoB;AAErE,MAAM,mCAAmC,WAAW,uBAAuB;AAE3E,MAAM,sCAAsC,WAAW,0BAA0B;AAEjF,MAAM,0CAA0C,WAAW,8BAA8B;AAEzF,MAAM,mCAAmC,WAAW,uBAAuB;AAE3E,MAAM,sCAAsC,WAAW,0BAA0B;AAGjF,MAAM,yBAAyB,CAAC,WAAmD;AACxF,QAAM,cAAc,OAAO,WAAW,aAAa,SAAS,OAAO;AACnE,SAAO,aAAa,gBAAuB,4BAA4B,WAAW,EAAE,KAAK;AAC3F;",
6
+ "names": []
7
+ }
@@ -16,6 +16,13 @@ const defineSwcApp = async (w) => {
16
16
  if (existing)
17
17
  return existing;
18
18
  let SwcAppImpl = class SwcAppImpl extends SwcAppMixin(w.HTMLElement) {
19
+ // SwcAppMixin에서 모든 기능을 상속받음. 기본 요소라 훅에서 할 일은 없음.
20
+ onConnected() {
21
+ }
22
+ onDisconnected() {
23
+ }
24
+ onSwcAppConnected() {
25
+ }
19
26
  };
20
27
  SwcAppImpl = __decorate([
21
28
  elementDefine(swcAppTagName, { window: w })
@@ -31,6 +38,13 @@ const defineSwcAppBody = async (w) => {
31
38
  if (existing)
32
39
  return existing;
33
40
  let SwcAppBodyImpl = class SwcAppBodyImpl extends SwcAppMixin(w.HTMLBodyElement) {
41
+ // SwcAppMixin에서 모든 기능을 상속받음. 기본 요소라 훅에서 할 일은 없음.
42
+ onConnected() {
43
+ }
44
+ onDisconnected() {
45
+ }
46
+ onSwcAppConnected() {
47
+ }
34
48
  };
35
49
  SwcAppBodyImpl = __decorate([
36
50
  elementDefine(swcAppBodyTagName, { window: w, extends: "body" })
@@ -46,6 +60,13 @@ const defineSwcAppDiv = async (w) => {
46
60
  if (existing)
47
61
  return existing;
48
62
  let SwcAppDivImpl = class SwcAppDivImpl extends SwcAppMixin(w.HTMLDivElement) {
63
+ // SwcAppMixin에서 모든 기능을 상속받음. 기본 요소라 훅에서 할 일은 없음.
64
+ onConnected() {
65
+ }
66
+ onDisconnected() {
67
+ }
68
+ onSwcAppConnected() {
69
+ }
49
70
  };
50
71
  SwcAppDivImpl = __decorate([
51
72
  elementDefine(swcAppDivTagName, { window: w, extends: "div" })
@@ -61,6 +82,13 @@ const defineSwcAppSection = async (w) => {
61
82
  if (existing)
62
83
  return existing;
63
84
  let SwcAppSectionImpl = class SwcAppSectionImpl extends SwcAppMixin(w.HTMLElement) {
85
+ // SwcAppMixin에서 모든 기능을 상속받음. 기본 요소라 훅에서 할 일은 없음.
86
+ onConnected() {
87
+ }
88
+ onDisconnected() {
89
+ }
90
+ onSwcAppConnected() {
91
+ }
64
92
  };
65
93
  SwcAppSectionImpl = __decorate([
66
94
  elementDefine(swcAppSectionTagName, { window: w, extends: "section" })
@@ -76,6 +104,13 @@ const defineSwcAppMain = async (w) => {
76
104
  if (existing)
77
105
  return existing;
78
106
  let SwcAppMainImpl = class SwcAppMainImpl extends SwcAppMixin(w.HTMLElement) {
107
+ // SwcAppMixin에서 모든 기능을 상속받음. 기본 요소라 훅에서 할 일은 없음.
108
+ onConnected() {
109
+ }
110
+ onDisconnected() {
111
+ }
112
+ onSwcAppConnected() {
113
+ }
79
114
  };
80
115
  SwcAppMainImpl = __decorate([
81
116
  elementDefine(swcAppMainTagName, { window: w, extends: "main" })
@@ -91,6 +126,13 @@ const defineSwcAppArticle = async (w) => {
91
126
  if (existing)
92
127
  return existing;
93
128
  let SwcAppArticleImpl = class SwcAppArticleImpl extends SwcAppMixin(w.HTMLElement) {
129
+ // SwcAppMixin에서 모든 기능을 상속받음. 기본 요소라 훅에서 할 일은 없음.
130
+ onConnected() {
131
+ }
132
+ onDisconnected() {
133
+ }
134
+ onSwcAppConnected() {
135
+ }
94
136
  };
95
137
  SwcAppArticleImpl = __decorate([
96
138
  elementDefine(swcAppArticleTagName, { window: w, extends: "article" })
@@ -106,6 +148,13 @@ const defineSwcAppHeader = async (w) => {
106
148
  if (existing)
107
149
  return existing;
108
150
  let SwcAppHeaderImpl = class SwcAppHeaderImpl extends SwcAppMixin(w.HTMLElement) {
151
+ // SwcAppMixin에서 모든 기능을 상속받음. 기본 요소라 훅에서 할 일은 없음.
152
+ onConnected() {
153
+ }
154
+ onDisconnected() {
155
+ }
156
+ onSwcAppConnected() {
157
+ }
109
158
  };
110
159
  SwcAppHeaderImpl = __decorate([
111
160
  elementDefine(swcAppHeaderTagName, { window: w, extends: "header" })
@@ -121,6 +170,13 @@ const defineSwcAppFooter = async (w) => {
121
170
  if (existing)
122
171
  return existing;
123
172
  let SwcAppFooterImpl = class SwcAppFooterImpl extends SwcAppMixin(w.HTMLElement) {
173
+ // SwcAppMixin에서 모든 기능을 상속받음. 기본 요소라 훅에서 할 일은 없음.
174
+ onConnected() {
175
+ }
176
+ onDisconnected() {
177
+ }
178
+ onSwcAppConnected() {
179
+ }
124
180
  };
125
181
  SwcAppFooterImpl = __decorate([
126
182
  elementDefine(swcAppFooterTagName, { window: w, extends: "footer" })
@@ -136,6 +192,13 @@ const defineSwcAppNav = async (w) => {
136
192
  if (existing)
137
193
  return existing;
138
194
  let SwcAppNavImpl = class SwcAppNavImpl extends SwcAppMixin(w.HTMLElement) {
195
+ // SwcAppMixin에서 모든 기능을 상속받음. 기본 요소라 훅에서 할 일은 없음.
196
+ onConnected() {
197
+ }
198
+ onDisconnected() {
199
+ }
200
+ onSwcAppConnected() {
201
+ }
139
202
  };
140
203
  SwcAppNavImpl = __decorate([
141
204
  elementDefine(swcAppNavTagName, { window: w, extends: "nav" })
@@ -151,6 +214,13 @@ const defineSwcAppAside = async (w) => {
151
214
  if (existing)
152
215
  return existing;
153
216
  let SwcAppAsideImpl = class SwcAppAsideImpl extends SwcAppMixin(w.HTMLElement) {
217
+ // SwcAppMixin에서 모든 기능을 상속받음. 기본 요소라 훅에서 할 일은 없음.
218
+ onConnected() {
219
+ }
220
+ onDisconnected() {
221
+ }
222
+ onSwcAppConnected() {
223
+ }
154
224
  };
155
225
  SwcAppAsideImpl = __decorate([
156
226
  elementDefine(swcAppAsideTagName, { window: w, extends: "aside" })
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/elements/SwcApp.ts"],
4
- "sourcesContent": ["import {elementDefine} from \"../decorators\";\nimport {SwcAppInterface} from \"../types\";\nimport {SwcAppMixin} from \"./SwcAppMixin\";\nimport {SwcUtils, createElement, CreateElementConfig} from \"../utils/Utils\";\n\n// ============================================\n// SwcApp (HTMLElement)\n// ============================================\nexport const swcAppTagName = 'swc-app';\n\nexport const SwcApp = (w: Window, data?: CreateElementConfig) => {\n return createElement<SwcAppInterface>(w, swcAppTagName, data);\n};\n\nexport const defineSwcApp = async (w: Window) => {\n const existing = w.customElements.get(swcAppTagName);\n if (existing) return existing;\n\n @elementDefine(swcAppTagName, {window: w})\n class SwcAppImpl extends SwcAppMixin(w.HTMLElement) implements SwcAppInterface {\n // SwcAppMixin에서 모든 기능을 상속받음\n }\n\n return w.customElements.whenDefined(swcAppTagName);\n};\n\n// ============================================\n// SwcAppBody (HTMLBodyElement)\n// ============================================\nexport const swcAppBodyTagName = 'swc-app-body';\n\nexport const SwcAppBody = (w: Window, data?: CreateElementConfig) => {\n return createElement<SwcAppInterface & HTMLBodyElement>(w, swcAppBodyTagName, data);\n};\n\nexport const defineSwcAppBody = async (w: Window) => {\n const existing = w.customElements.get(swcAppBodyTagName);\n if (existing) return existing;\n\n @elementDefine(swcAppBodyTagName, {window: w, extends: 'body'})\n class SwcAppBodyImpl extends SwcAppMixin(w.HTMLBodyElement) implements SwcAppInterface {\n // SwcAppMixin에서 모든 기능을 상속받음\n }\n return w.customElements.whenDefined(swcAppBodyTagName);\n};\n\n// ============================================\n// SwcAppDiv (HTMLDivElement)\n// ============================================\nexport const swcAppDivTagName = 'swc-app-div';\n\nexport const SwcAppDiv = (w: Window, data?: CreateElementConfig) => {\n return createElement<SwcAppInterface & HTMLDivElement>(w, swcAppDivTagName, data);\n};\n\nexport const defineSwcAppDiv = async (w: Window) => {\n const existing = w.customElements.get(swcAppDivTagName);\n if (existing) return existing;\n\n @elementDefine(swcAppDivTagName, {window: w, extends: 'div'})\n class SwcAppDivImpl extends SwcAppMixin(w.HTMLDivElement) implements SwcAppInterface {\n // SwcAppMixin에서 모든 기능을 상속받음\n }\n\n return w.customElements.whenDefined(swcAppDivTagName);\n};\n\n// ============================================\n// SwcAppSection (HTMLElement)\n// ============================================\nexport const swcAppSectionTagName = 'swc-app-section';\n\nexport const SwcAppSection = (w: Window, data?: CreateElementConfig) => {\n return createElement<SwcAppInterface & HTMLElement>(w, swcAppSectionTagName, data);\n};\n\nexport const defineSwcAppSection = async (w: Window) => {\n const existing = w.customElements.get(swcAppSectionTagName);\n if (existing) return existing;\n\n @elementDefine(swcAppSectionTagName, {window: w, extends: 'section'})\n class SwcAppSectionImpl extends SwcAppMixin(w.HTMLElement) implements SwcAppInterface {\n // SwcAppMixin에서 모든 기능을 상속받음\n }\n\n return w.customElements.whenDefined(swcAppSectionTagName);\n};\n\n// ============================================\n// SwcAppMain (HTMLElement)\n// ============================================\nexport const swcAppMainTagName = 'swc-app-main';\n\nexport const SwcAppMain = (w: Window, data?: CreateElementConfig) => {\n return createElement<SwcAppInterface & HTMLElement>(w, swcAppMainTagName, data);\n};\n\nexport const defineSwcAppMain = async (w: Window) => {\n const existing = w.customElements.get(swcAppMainTagName);\n if (existing) return existing;\n\n @elementDefine(swcAppMainTagName, {window: w, extends: 'main'})\n class SwcAppMainImpl extends SwcAppMixin(w.HTMLElement) implements SwcAppInterface {\n // SwcAppMixin에서 모든 기능을 상속받음\n }\n\n return w.customElements.whenDefined(swcAppMainTagName);\n};\n\n// ============================================\n// SwcAppArticle (HTMLElement)\n// ============================================\nexport const swcAppArticleTagName = 'swc-app-article';\n\nexport const SwcAppArticle = (w: Window, data?: CreateElementConfig) => {\n return createElement<SwcAppInterface & HTMLElement>(w, swcAppArticleTagName, data);\n};\n\nexport const defineSwcAppArticle = async (w: Window) => {\n const existing = w.customElements.get(swcAppArticleTagName);\n if (existing) return existing;\n\n @elementDefine(swcAppArticleTagName, {window: w, extends: 'article'})\n class SwcAppArticleImpl extends SwcAppMixin(w.HTMLElement) implements SwcAppInterface {\n // SwcAppMixin에서 모든 기능을 상속받음\n }\n\n return w.customElements.whenDefined(swcAppArticleTagName);\n};\n\n// ============================================\n// SwcAppHeader (HTMLElement)\n// ============================================\nexport const swcAppHeaderTagName = 'swc-app-header';\n\nexport const SwcAppHeader = (w: Window, data?: CreateElementConfig) => {\n return createElement<SwcAppInterface & HTMLElement>(w, swcAppHeaderTagName, data);\n};\n\nexport const defineSwcAppHeader = async (w: Window) => {\n const existing = w.customElements.get(swcAppHeaderTagName);\n if (existing) return existing;\n\n @elementDefine(swcAppHeaderTagName, {window: w, extends: 'header'})\n class SwcAppHeaderImpl extends SwcAppMixin(w.HTMLElement) implements SwcAppInterface {\n // SwcAppMixin에서 모든 기능을 상속받음\n }\n\n return w.customElements.whenDefined(swcAppHeaderTagName);\n};\n\n// ============================================\n// SwcAppFooter (HTMLElement)\n// ============================================\nexport const swcAppFooterTagName = 'swc-app-footer';\n\nexport const SwcAppFooter = (w: Window, data?: CreateElementConfig) => {\n return createElement<SwcAppInterface & HTMLElement>(w, swcAppFooterTagName, data);\n};\n\nexport const defineSwcAppFooter = async (w: Window) => {\n const existing = w.customElements.get(swcAppFooterTagName);\n if (existing) return existing;\n\n @elementDefine(swcAppFooterTagName, {window: w, extends: 'footer'})\n class SwcAppFooterImpl extends SwcAppMixin(w.HTMLElement) implements SwcAppInterface {\n // SwcAppMixin에서 모든 기능을 상속받음\n }\n\n return w.customElements.whenDefined(swcAppFooterTagName);\n};\n\n// ============================================\n// SwcAppNav (HTMLElement)\n// ============================================\nexport const swcAppNavTagName = 'swc-app-nav';\n\nexport const SwcAppNav = (w: Window, data?: CreateElementConfig) => {\n return createElement<SwcAppInterface & HTMLElement>(w, swcAppNavTagName, data);\n};\n\nexport const defineSwcAppNav = async (w: Window) => {\n const existing = w.customElements.get(swcAppNavTagName);\n if (existing) return existing;\n\n @elementDefine(swcAppNavTagName, {window: w, extends: 'nav'})\n class SwcAppNavImpl extends SwcAppMixin(w.HTMLElement) implements SwcAppInterface {\n // SwcAppMixin에서 모든 기능을 상속받음\n }\n\n return w.customElements.whenDefined(swcAppNavTagName);\n};\n\n// ============================================\n// SwcAppAside (HTMLElement)\n// ============================================\nexport const swcAppAsideTagName = 'swc-app-aside';\n\nexport const SwcAppAside = (w: Window, data?: CreateElementConfig) => {\n return createElement<SwcAppInterface & HTMLElement>(w, swcAppAsideTagName, data);\n};\n\nexport const defineSwcAppAside = async (w: Window) => {\n const existing = w.customElements.get(swcAppAsideTagName);\n if (existing) return existing;\n\n @elementDefine(swcAppAsideTagName, {window: w, extends: 'aside'})\n class SwcAppAsideImpl extends SwcAppMixin(w.HTMLElement) implements SwcAppInterface {\n // SwcAppMixin에서 모든 기능을 상속받음\n }\n\n return w.customElements.whenDefined(swcAppAsideTagName);\n};\n\n// ============================================\n// Factory Array\n// ============================================\nexport const swcAppFactories = [\n defineSwcApp,\n defineSwcAppBody,\n defineSwcAppDiv,\n defineSwcAppSection,\n defineSwcAppMain,\n defineSwcAppArticle,\n defineSwcAppHeader,\n defineSwcAppFooter,\n defineSwcAppNav,\n defineSwcAppAside\n];\n\n// ============================================\n// Define All SwcApp Elements\n// ============================================\nexport const defineSwcAppAll = async (w: Window) => {\n await Promise.all(swcAppFactories.map(factory => factory(w)));\n return w.customElements.whenDefined(swcAppTagName);\n};\n\n// Default export for backward compatibility\nexport default defineSwcAppAll;"],
5
- "mappings": ";;;;;;AAAA,SAAQ,qBAAoB;AAE5B,SAAQ,mBAAkB;AAC1B,SAAkB,qBAAyC;AAKpD,MAAM,gBAAgB;AAEtB,MAAM,SAAS,CAAC,GAAW,SAA8B;AAC9D,SAAO,cAA+B,GAAG,eAAe,IAAI;AAC9D;AAEO,MAAM,eAAe,OAAO,MAAa;AAC9C,QAAM,WAAW,EAAE,eAAe,IAAI,aAAa;AACnD,MAAI;AAAU,WAAO;AAGrB,MAAM,aAAN,MAAM,mBAAmB,YAAY,EAAE,WAAW,EAAC;;AAA7C,eAAU,WAAA;IADf,cAAc,eAAe,EAAC,QAAQ,EAAC,CAAC;KACnC,UAAU;AAIhB,SAAO,EAAE,eAAe,YAAY,aAAa;AACnD;AAKO,MAAM,oBAAoB;AAE1B,MAAM,aAAa,CAAC,GAAW,SAA8B;AAClE,SAAO,cAAiD,GAAG,mBAAmB,IAAI;AACpF;AAEO,MAAM,mBAAmB,OAAO,MAAa;AAClD,QAAM,WAAW,EAAE,eAAe,IAAI,iBAAiB;AACvD,MAAI;AAAU,WAAO;AAGrB,MAAM,iBAAN,MAAM,uBAAuB,YAAY,EAAE,eAAe,EAAC;;AAArD,mBAAc,WAAA;IADnB,cAAc,mBAAmB,EAAC,QAAQ,GAAG,SAAS,OAAM,CAAC;KACxD,cAAc;AAGpB,SAAO,EAAE,eAAe,YAAY,iBAAiB;AACvD;AAKO,MAAM,mBAAmB;AAEzB,MAAM,YAAY,CAAC,GAAW,SAA8B;AACjE,SAAO,cAAgD,GAAG,kBAAkB,IAAI;AAClF;AAEO,MAAM,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QAAM,WAAW,EAAE,eAAe,IAAI,gBAAgB;AACtD,MAAI;AAAU,WAAO;AAGrB,MAAM,gBAAN,MAAM,sBAAsB,YAAY,EAAE,WAAW,EAAC;;AAAhD,kBAAa,WAAA;IADlB,cAAc,kBAAkB,EAAC,QAAQ,GAAG,SAAS,MAAK,CAAC;KACtD,aAAa;AAInB,SAAO,EAAE,eAAe,YAAY,gBAAgB;AACtD;AAKO,MAAM,qBAAqB;AAE3B,MAAM,cAAc,CAAC,GAAW,SAA8B;AACnE,SAAO,cAA6C,GAAG,oBAAoB,IAAI;AACjF;AAEO,MAAM,oBAAoB,OAAO,MAAa;AACnD,QAAM,WAAW,EAAE,eAAe,IAAI,kBAAkB;AACxD,MAAI;AAAU,WAAO;AAGrB,MAAM,kBAAN,MAAM,wBAAwB,YAAY,EAAE,WAAW,EAAC;;AAAlD,oBAAe,WAAA;IADpB,cAAc,oBAAoB,EAAC,QAAQ,GAAG,SAAS,QAAO,CAAC;KAC1D,eAAe;AAIrB,SAAO,EAAE,eAAe,YAAY,kBAAkB;AACxD;AAKO,MAAM,kBAAkB;EAC7B;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAMK,MAAM,kBAAkB,OAAO,MAAa;AACjD,QAAM,QAAQ,IAAI,gBAAgB,IAAI,aAAW,QAAQ,CAAC,CAAC,CAAC;AAC5D,SAAO,EAAE,eAAe,YAAY,aAAa;AACnD;AAGA,IAAA,iBAAe;",
4
+ "sourcesContent": ["import {elementDefine} from \"../decorators\";\nimport {SwcAppInterface} from \"../types\";\nimport {SwcAppMixin} from \"./SwcAppMixin\";\nimport {SwcUtils, createElement, CreateElementConfig} from \"../utils/Utils\";\n\n// ============================================\n// SwcApp (HTMLElement)\n// ============================================\nexport const swcAppTagName = 'swc-app';\n\nexport const SwcApp = (w: Window, data?: CreateElementConfig) => {\n return createElement<SwcAppInterface>(w, swcAppTagName, data);\n};\n\nexport const defineSwcApp = async (w: Window) => {\n const existing = w.customElements.get(swcAppTagName);\n if (existing) return existing;\n\n @elementDefine(swcAppTagName, {window: w})\n class SwcAppImpl extends SwcAppMixin(w.HTMLElement) implements SwcAppInterface {\n // SwcAppMixin에서 모든 기능을 상속받음. 기본 요소라 훅에서 할 일은 없음.\n onConnected(): void {}\n onDisconnected(): void {}\n onSwcAppConnected(): void {}\n }\n\n return w.customElements.whenDefined(swcAppTagName);\n};\n\n// ============================================\n// SwcAppBody (HTMLBodyElement)\n// ============================================\nexport const swcAppBodyTagName = 'swc-app-body';\n\nexport const SwcAppBody = (w: Window, data?: CreateElementConfig) => {\n return createElement<SwcAppInterface & HTMLBodyElement>(w, swcAppBodyTagName, data);\n};\n\nexport const defineSwcAppBody = async (w: Window) => {\n const existing = w.customElements.get(swcAppBodyTagName);\n if (existing) return existing;\n\n @elementDefine(swcAppBodyTagName, {window: w, extends: 'body'})\n class SwcAppBodyImpl extends SwcAppMixin(w.HTMLBodyElement) implements SwcAppInterface {\n // SwcAppMixin에서 모든 기능을 상속받음. 기본 요소라 훅에서 할 일은 없음.\n onConnected(): void {}\n onDisconnected(): void {}\n onSwcAppConnected(): void {}\n }\n return w.customElements.whenDefined(swcAppBodyTagName);\n};\n\n// ============================================\n// SwcAppDiv (HTMLDivElement)\n// ============================================\nexport const swcAppDivTagName = 'swc-app-div';\n\nexport const SwcAppDiv = (w: Window, data?: CreateElementConfig) => {\n return createElement<SwcAppInterface & HTMLDivElement>(w, swcAppDivTagName, data);\n};\n\nexport const defineSwcAppDiv = async (w: Window) => {\n const existing = w.customElements.get(swcAppDivTagName);\n if (existing) return existing;\n\n @elementDefine(swcAppDivTagName, {window: w, extends: 'div'})\n class SwcAppDivImpl extends SwcAppMixin(w.HTMLDivElement) implements SwcAppInterface {\n // SwcAppMixin에서 모든 기능을 상속받음. 기본 요소라 훅에서 할 일은 없음.\n onConnected(): void {}\n onDisconnected(): void {}\n onSwcAppConnected(): void {}\n }\n\n return w.customElements.whenDefined(swcAppDivTagName);\n};\n\n// ============================================\n// SwcAppSection (HTMLElement)\n// ============================================\nexport const swcAppSectionTagName = 'swc-app-section';\n\nexport const SwcAppSection = (w: Window, data?: CreateElementConfig) => {\n return createElement<SwcAppInterface & HTMLElement>(w, swcAppSectionTagName, data);\n};\n\nexport const defineSwcAppSection = async (w: Window) => {\n const existing = w.customElements.get(swcAppSectionTagName);\n if (existing) return existing;\n\n @elementDefine(swcAppSectionTagName, {window: w, extends: 'section'})\n class SwcAppSectionImpl extends SwcAppMixin(w.HTMLElement) implements SwcAppInterface {\n // SwcAppMixin에서 모든 기능을 상속받음. 기본 요소라 훅에서 할 일은 없음.\n onConnected(): void {}\n onDisconnected(): void {}\n onSwcAppConnected(): void {}\n }\n\n return w.customElements.whenDefined(swcAppSectionTagName);\n};\n\n// ============================================\n// SwcAppMain (HTMLElement)\n// ============================================\nexport const swcAppMainTagName = 'swc-app-main';\n\nexport const SwcAppMain = (w: Window, data?: CreateElementConfig) => {\n return createElement<SwcAppInterface & HTMLElement>(w, swcAppMainTagName, data);\n};\n\nexport const defineSwcAppMain = async (w: Window) => {\n const existing = w.customElements.get(swcAppMainTagName);\n if (existing) return existing;\n\n @elementDefine(swcAppMainTagName, {window: w, extends: 'main'})\n class SwcAppMainImpl extends SwcAppMixin(w.HTMLElement) implements SwcAppInterface {\n // SwcAppMixin에서 모든 기능을 상속받음. 기본 요소라 훅에서 할 일은 없음.\n onConnected(): void {}\n onDisconnected(): void {}\n onSwcAppConnected(): void {}\n }\n\n return w.customElements.whenDefined(swcAppMainTagName);\n};\n\n// ============================================\n// SwcAppArticle (HTMLElement)\n// ============================================\nexport const swcAppArticleTagName = 'swc-app-article';\n\nexport const SwcAppArticle = (w: Window, data?: CreateElementConfig) => {\n return createElement<SwcAppInterface & HTMLElement>(w, swcAppArticleTagName, data);\n};\n\nexport const defineSwcAppArticle = async (w: Window) => {\n const existing = w.customElements.get(swcAppArticleTagName);\n if (existing) return existing;\n\n @elementDefine(swcAppArticleTagName, {window: w, extends: 'article'})\n class SwcAppArticleImpl extends SwcAppMixin(w.HTMLElement) implements SwcAppInterface {\n // SwcAppMixin에서 모든 기능을 상속받음. 기본 요소라 훅에서 할 일은 없음.\n onConnected(): void {}\n onDisconnected(): void {}\n onSwcAppConnected(): void {}\n }\n\n return w.customElements.whenDefined(swcAppArticleTagName);\n};\n\n// ============================================\n// SwcAppHeader (HTMLElement)\n// ============================================\nexport const swcAppHeaderTagName = 'swc-app-header';\n\nexport const SwcAppHeader = (w: Window, data?: CreateElementConfig) => {\n return createElement<SwcAppInterface & HTMLElement>(w, swcAppHeaderTagName, data);\n};\n\nexport const defineSwcAppHeader = async (w: Window) => {\n const existing = w.customElements.get(swcAppHeaderTagName);\n if (existing) return existing;\n\n @elementDefine(swcAppHeaderTagName, {window: w, extends: 'header'})\n class SwcAppHeaderImpl extends SwcAppMixin(w.HTMLElement) implements SwcAppInterface {\n // SwcAppMixin에서 모든 기능을 상속받음. 기본 요소라 훅에서 할 일은 없음.\n onConnected(): void {}\n onDisconnected(): void {}\n onSwcAppConnected(): void {}\n }\n\n return w.customElements.whenDefined(swcAppHeaderTagName);\n};\n\n// ============================================\n// SwcAppFooter (HTMLElement)\n// ============================================\nexport const swcAppFooterTagName = 'swc-app-footer';\n\nexport const SwcAppFooter = (w: Window, data?: CreateElementConfig) => {\n return createElement<SwcAppInterface & HTMLElement>(w, swcAppFooterTagName, data);\n};\n\nexport const defineSwcAppFooter = async (w: Window) => {\n const existing = w.customElements.get(swcAppFooterTagName);\n if (existing) return existing;\n\n @elementDefine(swcAppFooterTagName, {window: w, extends: 'footer'})\n class SwcAppFooterImpl extends SwcAppMixin(w.HTMLElement) implements SwcAppInterface {\n // SwcAppMixin에서 모든 기능을 상속받음. 기본 요소라 훅에서 할 일은 없음.\n onConnected(): void {}\n onDisconnected(): void {}\n onSwcAppConnected(): void {}\n }\n\n return w.customElements.whenDefined(swcAppFooterTagName);\n};\n\n// ============================================\n// SwcAppNav (HTMLElement)\n// ============================================\nexport const swcAppNavTagName = 'swc-app-nav';\n\nexport const SwcAppNav = (w: Window, data?: CreateElementConfig) => {\n return createElement<SwcAppInterface & HTMLElement>(w, swcAppNavTagName, data);\n};\n\nexport const defineSwcAppNav = async (w: Window) => {\n const existing = w.customElements.get(swcAppNavTagName);\n if (existing) return existing;\n\n @elementDefine(swcAppNavTagName, {window: w, extends: 'nav'})\n class SwcAppNavImpl extends SwcAppMixin(w.HTMLElement) implements SwcAppInterface {\n // SwcAppMixin에서 모든 기능을 상속받음. 기본 요소라 훅에서 할 일은 없음.\n onConnected(): void {}\n onDisconnected(): void {}\n onSwcAppConnected(): void {}\n }\n\n return w.customElements.whenDefined(swcAppNavTagName);\n};\n\n// ============================================\n// SwcAppAside (HTMLElement)\n// ============================================\nexport const swcAppAsideTagName = 'swc-app-aside';\n\nexport const SwcAppAside = (w: Window, data?: CreateElementConfig) => {\n return createElement<SwcAppInterface & HTMLElement>(w, swcAppAsideTagName, data);\n};\n\nexport const defineSwcAppAside = async (w: Window) => {\n const existing = w.customElements.get(swcAppAsideTagName);\n if (existing) return existing;\n\n @elementDefine(swcAppAsideTagName, {window: w, extends: 'aside'})\n class SwcAppAsideImpl extends SwcAppMixin(w.HTMLElement) implements SwcAppInterface {\n // SwcAppMixin에서 모든 기능을 상속받음. 기본 요소라 훅에서 할 일은 없음.\n onConnected(): void {}\n onDisconnected(): void {}\n onSwcAppConnected(): void {}\n }\n\n return w.customElements.whenDefined(swcAppAsideTagName);\n};\n\n// ============================================\n// Factory Array\n// ============================================\nexport const swcAppFactories = [\n defineSwcApp,\n defineSwcAppBody,\n defineSwcAppDiv,\n defineSwcAppSection,\n defineSwcAppMain,\n defineSwcAppArticle,\n defineSwcAppHeader,\n defineSwcAppFooter,\n defineSwcAppNav,\n defineSwcAppAside\n];\n\n// ============================================\n// Define All SwcApp Elements\n// ============================================\nexport const defineSwcAppAll = async (w: Window) => {\n await Promise.all(swcAppFactories.map(factory => factory(w)));\n return w.customElements.whenDefined(swcAppTagName);\n};\n\n// Default export for backward compatibility\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