@dooboostore/simple-web-component 1.0.13 → 1.0.14

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 (427) hide show
  1. package/dist/cjs/decorators/elementDefine.js.map +2 -2
  2. package/dist/cjs/elements/SwcInterfaces.js.map +2 -2
  3. package/dist/cjs/elements/apps/SwcApp.js +14 -7
  4. package/dist/cjs/elements/apps/SwcApp.js.map +2 -2
  5. package/dist/cjs/elements/apps/SwcAppAnchor.js +14 -7
  6. package/dist/cjs/elements/apps/SwcAppAnchor.js.map +2 -2
  7. package/dist/cjs/elements/apps/SwcAppArea.js +14 -7
  8. package/dist/cjs/elements/apps/SwcAppArea.js.map +2 -2
  9. package/dist/cjs/elements/apps/SwcAppAudio.js +14 -7
  10. package/dist/cjs/elements/apps/SwcAppAudio.js.map +2 -2
  11. package/dist/cjs/elements/apps/SwcAppBase.js +14 -7
  12. package/dist/cjs/elements/apps/SwcAppBase.js.map +2 -2
  13. package/dist/cjs/elements/apps/SwcAppBody.js +14 -7
  14. package/dist/cjs/elements/apps/SwcAppBody.js.map +2 -2
  15. package/dist/cjs/elements/apps/SwcAppButton.js +14 -7
  16. package/dist/cjs/elements/apps/SwcAppButton.js.map +2 -2
  17. package/dist/cjs/elements/apps/SwcAppCanvas.js +14 -7
  18. package/dist/cjs/elements/apps/SwcAppCanvas.js.map +2 -2
  19. package/dist/cjs/elements/apps/SwcAppData.js +14 -7
  20. package/dist/cjs/elements/apps/SwcAppData.js.map +2 -2
  21. package/dist/cjs/elements/apps/SwcAppDataList.js +14 -7
  22. package/dist/cjs/elements/apps/SwcAppDataList.js.map +2 -2
  23. package/dist/cjs/elements/apps/SwcAppDetails.js +14 -7
  24. package/dist/cjs/elements/apps/SwcAppDetails.js.map +2 -2
  25. package/dist/cjs/elements/apps/SwcAppDialog.js +14 -7
  26. package/dist/cjs/elements/apps/SwcAppDialog.js.map +2 -2
  27. package/dist/cjs/elements/apps/SwcAppDiv.js +14 -7
  28. package/dist/cjs/elements/apps/SwcAppDiv.js.map +2 -2
  29. package/dist/cjs/elements/apps/SwcAppDl.js +14 -7
  30. package/dist/cjs/elements/apps/SwcAppDl.js.map +2 -2
  31. package/dist/cjs/elements/apps/SwcAppEmbed.js +14 -7
  32. package/dist/cjs/elements/apps/SwcAppEmbed.js.map +2 -2
  33. package/dist/cjs/elements/apps/SwcAppFieldSet.js +14 -7
  34. package/dist/cjs/elements/apps/SwcAppFieldSet.js.map +2 -2
  35. package/dist/cjs/elements/apps/SwcAppForm.js +14 -7
  36. package/dist/cjs/elements/apps/SwcAppForm.js.map +2 -2
  37. package/dist/cjs/elements/apps/SwcAppHeading.js +14 -7
  38. package/dist/cjs/elements/apps/SwcAppHeading.js.map +2 -2
  39. package/dist/cjs/elements/apps/SwcAppHr.js +14 -7
  40. package/dist/cjs/elements/apps/SwcAppHr.js.map +2 -2
  41. package/dist/cjs/elements/apps/SwcAppIFrame.js +14 -7
  42. package/dist/cjs/elements/apps/SwcAppIFrame.js.map +2 -2
  43. package/dist/cjs/elements/apps/SwcAppImage.js +14 -7
  44. package/dist/cjs/elements/apps/SwcAppImage.js.map +2 -2
  45. package/dist/cjs/elements/apps/SwcAppInput.js +14 -7
  46. package/dist/cjs/elements/apps/SwcAppInput.js.map +2 -2
  47. package/dist/cjs/elements/apps/SwcAppLabel.js +14 -7
  48. package/dist/cjs/elements/apps/SwcAppLabel.js.map +2 -2
  49. package/dist/cjs/elements/apps/SwcAppLegend.js +14 -7
  50. package/dist/cjs/elements/apps/SwcAppLegend.js.map +2 -2
  51. package/dist/cjs/elements/apps/SwcAppLi.js +14 -7
  52. package/dist/cjs/elements/apps/SwcAppLi.js.map +2 -2
  53. package/dist/cjs/elements/apps/SwcAppLink.js +14 -7
  54. package/dist/cjs/elements/apps/SwcAppLink.js.map +2 -2
  55. package/dist/cjs/elements/apps/SwcAppMap.js +14 -7
  56. package/dist/cjs/elements/apps/SwcAppMap.js.map +2 -2
  57. package/dist/cjs/elements/apps/SwcAppMeta.js +14 -7
  58. package/dist/cjs/elements/apps/SwcAppMeta.js.map +2 -2
  59. package/dist/cjs/elements/apps/SwcAppMeter.js +14 -7
  60. package/dist/cjs/elements/apps/SwcAppMeter.js.map +2 -2
  61. package/dist/cjs/elements/apps/SwcAppMod.js +14 -7
  62. package/dist/cjs/elements/apps/SwcAppMod.js.map +2 -2
  63. package/dist/cjs/elements/apps/SwcAppObject.js +14 -7
  64. package/dist/cjs/elements/apps/SwcAppObject.js.map +2 -2
  65. package/dist/cjs/elements/apps/SwcAppOl.js +14 -7
  66. package/dist/cjs/elements/apps/SwcAppOl.js.map +2 -2
  67. package/dist/cjs/elements/apps/SwcAppOptGroup.js +14 -7
  68. package/dist/cjs/elements/apps/SwcAppOptGroup.js.map +2 -2
  69. package/dist/cjs/elements/apps/SwcAppOption.js +14 -7
  70. package/dist/cjs/elements/apps/SwcAppOption.js.map +2 -2
  71. package/dist/cjs/elements/apps/SwcAppOutput.js +14 -7
  72. package/dist/cjs/elements/apps/SwcAppOutput.js.map +2 -2
  73. package/dist/cjs/elements/apps/SwcAppParagraph.js +14 -7
  74. package/dist/cjs/elements/apps/SwcAppParagraph.js.map +2 -2
  75. package/dist/cjs/elements/apps/SwcAppParam.js +14 -7
  76. package/dist/cjs/elements/apps/SwcAppParam.js.map +2 -2
  77. package/dist/cjs/elements/apps/SwcAppPicture.js +14 -7
  78. package/dist/cjs/elements/apps/SwcAppPicture.js.map +2 -2
  79. package/dist/cjs/elements/apps/SwcAppPre.js +14 -7
  80. package/dist/cjs/elements/apps/SwcAppPre.js.map +2 -2
  81. package/dist/cjs/elements/apps/SwcAppProgress.js +14 -7
  82. package/dist/cjs/elements/apps/SwcAppProgress.js.map +2 -2
  83. package/dist/cjs/elements/apps/SwcAppQuote.js +14 -7
  84. package/dist/cjs/elements/apps/SwcAppQuote.js.map +2 -2
  85. package/dist/cjs/elements/apps/SwcAppScript.js +14 -7
  86. package/dist/cjs/elements/apps/SwcAppScript.js.map +2 -2
  87. package/dist/cjs/elements/apps/SwcAppSelect.js +14 -7
  88. package/dist/cjs/elements/apps/SwcAppSelect.js.map +2 -2
  89. package/dist/cjs/elements/apps/SwcAppSlot.js +14 -7
  90. package/dist/cjs/elements/apps/SwcAppSlot.js.map +2 -2
  91. package/dist/cjs/elements/apps/SwcAppSource.js +14 -7
  92. package/dist/cjs/elements/apps/SwcAppSource.js.map +2 -2
  93. package/dist/cjs/elements/apps/SwcAppSpan.js +14 -7
  94. package/dist/cjs/elements/apps/SwcAppSpan.js.map +2 -2
  95. package/dist/cjs/elements/apps/SwcAppStyle.js +14 -7
  96. package/dist/cjs/elements/apps/SwcAppStyle.js.map +2 -2
  97. package/dist/cjs/elements/apps/SwcAppTable.js +14 -7
  98. package/dist/cjs/elements/apps/SwcAppTable.js.map +2 -2
  99. package/dist/cjs/elements/apps/SwcAppTableCell.js +14 -7
  100. package/dist/cjs/elements/apps/SwcAppTableCell.js.map +2 -2
  101. package/dist/cjs/elements/apps/SwcAppTableRow.js +14 -7
  102. package/dist/cjs/elements/apps/SwcAppTableRow.js.map +2 -2
  103. package/dist/cjs/elements/apps/SwcAppTableSection.js +14 -7
  104. package/dist/cjs/elements/apps/SwcAppTableSection.js.map +2 -2
  105. package/dist/cjs/elements/apps/SwcAppTemplate.js +14 -7
  106. package/dist/cjs/elements/apps/SwcAppTemplate.js.map +2 -2
  107. package/dist/cjs/elements/apps/SwcAppTextArea.js +14 -7
  108. package/dist/cjs/elements/apps/SwcAppTextArea.js.map +2 -2
  109. package/dist/cjs/elements/apps/SwcAppTime.js +14 -7
  110. package/dist/cjs/elements/apps/SwcAppTime.js.map +2 -2
  111. package/dist/cjs/elements/apps/SwcAppTitle.js +14 -7
  112. package/dist/cjs/elements/apps/SwcAppTitle.js.map +2 -2
  113. package/dist/cjs/elements/apps/SwcAppTrack.js +14 -7
  114. package/dist/cjs/elements/apps/SwcAppTrack.js.map +2 -2
  115. package/dist/cjs/elements/apps/SwcAppUl.js +14 -7
  116. package/dist/cjs/elements/apps/SwcAppUl.js.map +2 -2
  117. package/dist/cjs/elements/apps/SwcAppVideo.js +14 -7
  118. package/dist/cjs/elements/apps/SwcAppVideo.js.map +2 -2
  119. package/dist/cjs/router/ElementRouter.js +172 -0
  120. package/dist/cjs/router/ElementRouter.js.map +7 -0
  121. package/dist/esm/decorators/elementDefine.js.map +2 -2
  122. package/dist/esm/elements/SwcInterfaces.js.map +2 -2
  123. package/dist/esm/elements/apps/SwcApp.js +14 -7
  124. package/dist/esm/elements/apps/SwcApp.js.map +2 -2
  125. package/dist/esm/elements/apps/SwcAppAnchor.js +14 -7
  126. package/dist/esm/elements/apps/SwcAppAnchor.js.map +2 -2
  127. package/dist/esm/elements/apps/SwcAppArea.js +14 -7
  128. package/dist/esm/elements/apps/SwcAppArea.js.map +2 -2
  129. package/dist/esm/elements/apps/SwcAppAudio.js +14 -7
  130. package/dist/esm/elements/apps/SwcAppAudio.js.map +2 -2
  131. package/dist/esm/elements/apps/SwcAppBase.js +14 -7
  132. package/dist/esm/elements/apps/SwcAppBase.js.map +2 -2
  133. package/dist/esm/elements/apps/SwcAppBody.js +14 -7
  134. package/dist/esm/elements/apps/SwcAppBody.js.map +2 -2
  135. package/dist/esm/elements/apps/SwcAppButton.js +14 -7
  136. package/dist/esm/elements/apps/SwcAppButton.js.map +2 -2
  137. package/dist/esm/elements/apps/SwcAppCanvas.js +14 -7
  138. package/dist/esm/elements/apps/SwcAppCanvas.js.map +2 -2
  139. package/dist/esm/elements/apps/SwcAppData.js +14 -7
  140. package/dist/esm/elements/apps/SwcAppData.js.map +2 -2
  141. package/dist/esm/elements/apps/SwcAppDataList.js +14 -7
  142. package/dist/esm/elements/apps/SwcAppDataList.js.map +2 -2
  143. package/dist/esm/elements/apps/SwcAppDetails.js +14 -7
  144. package/dist/esm/elements/apps/SwcAppDetails.js.map +2 -2
  145. package/dist/esm/elements/apps/SwcAppDialog.js +14 -7
  146. package/dist/esm/elements/apps/SwcAppDialog.js.map +2 -2
  147. package/dist/esm/elements/apps/SwcAppDiv.js +14 -7
  148. package/dist/esm/elements/apps/SwcAppDiv.js.map +2 -2
  149. package/dist/esm/elements/apps/SwcAppDl.js +14 -7
  150. package/dist/esm/elements/apps/SwcAppDl.js.map +2 -2
  151. package/dist/esm/elements/apps/SwcAppEmbed.js +14 -7
  152. package/dist/esm/elements/apps/SwcAppEmbed.js.map +2 -2
  153. package/dist/esm/elements/apps/SwcAppFieldSet.js +14 -7
  154. package/dist/esm/elements/apps/SwcAppFieldSet.js.map +2 -2
  155. package/dist/esm/elements/apps/SwcAppForm.js +14 -7
  156. package/dist/esm/elements/apps/SwcAppForm.js.map +2 -2
  157. package/dist/esm/elements/apps/SwcAppHeading.js +14 -7
  158. package/dist/esm/elements/apps/SwcAppHeading.js.map +2 -2
  159. package/dist/esm/elements/apps/SwcAppHr.js +14 -7
  160. package/dist/esm/elements/apps/SwcAppHr.js.map +2 -2
  161. package/dist/esm/elements/apps/SwcAppIFrame.js +14 -7
  162. package/dist/esm/elements/apps/SwcAppIFrame.js.map +2 -2
  163. package/dist/esm/elements/apps/SwcAppImage.js +14 -7
  164. package/dist/esm/elements/apps/SwcAppImage.js.map +2 -2
  165. package/dist/esm/elements/apps/SwcAppInput.js +14 -7
  166. package/dist/esm/elements/apps/SwcAppInput.js.map +2 -2
  167. package/dist/esm/elements/apps/SwcAppLabel.js +14 -7
  168. package/dist/esm/elements/apps/SwcAppLabel.js.map +2 -2
  169. package/dist/esm/elements/apps/SwcAppLegend.js +14 -7
  170. package/dist/esm/elements/apps/SwcAppLegend.js.map +2 -2
  171. package/dist/esm/elements/apps/SwcAppLi.js +14 -7
  172. package/dist/esm/elements/apps/SwcAppLi.js.map +2 -2
  173. package/dist/esm/elements/apps/SwcAppLink.js +14 -7
  174. package/dist/esm/elements/apps/SwcAppLink.js.map +2 -2
  175. package/dist/esm/elements/apps/SwcAppMap.js +14 -7
  176. package/dist/esm/elements/apps/SwcAppMap.js.map +2 -2
  177. package/dist/esm/elements/apps/SwcAppMeta.js +14 -7
  178. package/dist/esm/elements/apps/SwcAppMeta.js.map +2 -2
  179. package/dist/esm/elements/apps/SwcAppMeter.js +14 -7
  180. package/dist/esm/elements/apps/SwcAppMeter.js.map +2 -2
  181. package/dist/esm/elements/apps/SwcAppMod.js +14 -7
  182. package/dist/esm/elements/apps/SwcAppMod.js.map +2 -2
  183. package/dist/esm/elements/apps/SwcAppObject.js +14 -7
  184. package/dist/esm/elements/apps/SwcAppObject.js.map +2 -2
  185. package/dist/esm/elements/apps/SwcAppOl.js +14 -7
  186. package/dist/esm/elements/apps/SwcAppOl.js.map +2 -2
  187. package/dist/esm/elements/apps/SwcAppOptGroup.js +14 -7
  188. package/dist/esm/elements/apps/SwcAppOptGroup.js.map +2 -2
  189. package/dist/esm/elements/apps/SwcAppOption.js +14 -7
  190. package/dist/esm/elements/apps/SwcAppOption.js.map +2 -2
  191. package/dist/esm/elements/apps/SwcAppOutput.js +14 -7
  192. package/dist/esm/elements/apps/SwcAppOutput.js.map +2 -2
  193. package/dist/esm/elements/apps/SwcAppParagraph.js +14 -7
  194. package/dist/esm/elements/apps/SwcAppParagraph.js.map +2 -2
  195. package/dist/esm/elements/apps/SwcAppParam.js +14 -7
  196. package/dist/esm/elements/apps/SwcAppParam.js.map +2 -2
  197. package/dist/esm/elements/apps/SwcAppPicture.js +14 -7
  198. package/dist/esm/elements/apps/SwcAppPicture.js.map +2 -2
  199. package/dist/esm/elements/apps/SwcAppPre.js +14 -7
  200. package/dist/esm/elements/apps/SwcAppPre.js.map +2 -2
  201. package/dist/esm/elements/apps/SwcAppProgress.js +14 -7
  202. package/dist/esm/elements/apps/SwcAppProgress.js.map +2 -2
  203. package/dist/esm/elements/apps/SwcAppQuote.js +14 -7
  204. package/dist/esm/elements/apps/SwcAppQuote.js.map +2 -2
  205. package/dist/esm/elements/apps/SwcAppScript.js +14 -7
  206. package/dist/esm/elements/apps/SwcAppScript.js.map +2 -2
  207. package/dist/esm/elements/apps/SwcAppSelect.js +14 -7
  208. package/dist/esm/elements/apps/SwcAppSelect.js.map +2 -2
  209. package/dist/esm/elements/apps/SwcAppSlot.js +14 -7
  210. package/dist/esm/elements/apps/SwcAppSlot.js.map +2 -2
  211. package/dist/esm/elements/apps/SwcAppSource.js +14 -7
  212. package/dist/esm/elements/apps/SwcAppSource.js.map +2 -2
  213. package/dist/esm/elements/apps/SwcAppSpan.js +14 -7
  214. package/dist/esm/elements/apps/SwcAppSpan.js.map +2 -2
  215. package/dist/esm/elements/apps/SwcAppStyle.js +14 -7
  216. package/dist/esm/elements/apps/SwcAppStyle.js.map +2 -2
  217. package/dist/esm/elements/apps/SwcAppTable.js +14 -7
  218. package/dist/esm/elements/apps/SwcAppTable.js.map +2 -2
  219. package/dist/esm/elements/apps/SwcAppTableCell.js +14 -7
  220. package/dist/esm/elements/apps/SwcAppTableCell.js.map +2 -2
  221. package/dist/esm/elements/apps/SwcAppTableRow.js +14 -7
  222. package/dist/esm/elements/apps/SwcAppTableRow.js.map +2 -2
  223. package/dist/esm/elements/apps/SwcAppTableSection.js +14 -7
  224. package/dist/esm/elements/apps/SwcAppTableSection.js.map +2 -2
  225. package/dist/esm/elements/apps/SwcAppTemplate.js +14 -7
  226. package/dist/esm/elements/apps/SwcAppTemplate.js.map +2 -2
  227. package/dist/esm/elements/apps/SwcAppTextArea.js +14 -7
  228. package/dist/esm/elements/apps/SwcAppTextArea.js.map +2 -2
  229. package/dist/esm/elements/apps/SwcAppTime.js +14 -7
  230. package/dist/esm/elements/apps/SwcAppTime.js.map +2 -2
  231. package/dist/esm/elements/apps/SwcAppTitle.js +14 -7
  232. package/dist/esm/elements/apps/SwcAppTitle.js.map +2 -2
  233. package/dist/esm/elements/apps/SwcAppTrack.js +14 -7
  234. package/dist/esm/elements/apps/SwcAppTrack.js.map +2 -2
  235. package/dist/esm/elements/apps/SwcAppUl.js +14 -7
  236. package/dist/esm/elements/apps/SwcAppUl.js.map +2 -2
  237. package/dist/esm/elements/apps/SwcAppVideo.js +14 -7
  238. package/dist/esm/elements/apps/SwcAppVideo.js.map +2 -2
  239. package/dist/esm/router/ElementRouter.js +153 -0
  240. package/dist/esm/router/ElementRouter.js.map +7 -0
  241. package/dist/esm-bundle/dooboostore-simple-web-component.esm.js +912 -415
  242. package/dist/esm-bundle/dooboostore-simple-web-component.esm.js.map +4 -4
  243. package/dist/types/decorators/elementDefine.d.ts.map +1 -1
  244. package/dist/types/elements/SwcInterfaces.d.ts +3 -1
  245. package/dist/types/elements/SwcInterfaces.d.ts.map +1 -1
  246. package/dist/types/elements/apps/SwcApp.d.ts +2 -3
  247. package/dist/types/elements/apps/SwcApp.d.ts.map +1 -1
  248. package/dist/types/elements/apps/SwcAppAnchor.d.ts +2 -3
  249. package/dist/types/elements/apps/SwcAppAnchor.d.ts.map +1 -1
  250. package/dist/types/elements/apps/SwcAppArea.d.ts +2 -3
  251. package/dist/types/elements/apps/SwcAppArea.d.ts.map +1 -1
  252. package/dist/types/elements/apps/SwcAppAudio.d.ts +2 -3
  253. package/dist/types/elements/apps/SwcAppAudio.d.ts.map +1 -1
  254. package/dist/types/elements/apps/SwcAppBase.d.ts +2 -3
  255. package/dist/types/elements/apps/SwcAppBase.d.ts.map +1 -1
  256. package/dist/types/elements/apps/SwcAppBody.d.ts +2 -3
  257. package/dist/types/elements/apps/SwcAppBody.d.ts.map +1 -1
  258. package/dist/types/elements/apps/SwcAppButton.d.ts +2 -3
  259. package/dist/types/elements/apps/SwcAppButton.d.ts.map +1 -1
  260. package/dist/types/elements/apps/SwcAppCanvas.d.ts +2 -3
  261. package/dist/types/elements/apps/SwcAppCanvas.d.ts.map +1 -1
  262. package/dist/types/elements/apps/SwcAppData.d.ts +2 -3
  263. package/dist/types/elements/apps/SwcAppData.d.ts.map +1 -1
  264. package/dist/types/elements/apps/SwcAppDataList.d.ts +2 -3
  265. package/dist/types/elements/apps/SwcAppDataList.d.ts.map +1 -1
  266. package/dist/types/elements/apps/SwcAppDetails.d.ts +2 -3
  267. package/dist/types/elements/apps/SwcAppDetails.d.ts.map +1 -1
  268. package/dist/types/elements/apps/SwcAppDialog.d.ts +2 -3
  269. package/dist/types/elements/apps/SwcAppDialog.d.ts.map +1 -1
  270. package/dist/types/elements/apps/SwcAppDiv.d.ts +2 -3
  271. package/dist/types/elements/apps/SwcAppDiv.d.ts.map +1 -1
  272. package/dist/types/elements/apps/SwcAppDl.d.ts +2 -3
  273. package/dist/types/elements/apps/SwcAppDl.d.ts.map +1 -1
  274. package/dist/types/elements/apps/SwcAppEmbed.d.ts +2 -3
  275. package/dist/types/elements/apps/SwcAppEmbed.d.ts.map +1 -1
  276. package/dist/types/elements/apps/SwcAppFieldSet.d.ts +2 -3
  277. package/dist/types/elements/apps/SwcAppFieldSet.d.ts.map +1 -1
  278. package/dist/types/elements/apps/SwcAppForm.d.ts +2 -3
  279. package/dist/types/elements/apps/SwcAppForm.d.ts.map +1 -1
  280. package/dist/types/elements/apps/SwcAppHeading.d.ts +2 -3
  281. package/dist/types/elements/apps/SwcAppHeading.d.ts.map +1 -1
  282. package/dist/types/elements/apps/SwcAppHr.d.ts +2 -3
  283. package/dist/types/elements/apps/SwcAppHr.d.ts.map +1 -1
  284. package/dist/types/elements/apps/SwcAppIFrame.d.ts +2 -3
  285. package/dist/types/elements/apps/SwcAppIFrame.d.ts.map +1 -1
  286. package/dist/types/elements/apps/SwcAppImage.d.ts +2 -3
  287. package/dist/types/elements/apps/SwcAppImage.d.ts.map +1 -1
  288. package/dist/types/elements/apps/SwcAppInput.d.ts +2 -3
  289. package/dist/types/elements/apps/SwcAppInput.d.ts.map +1 -1
  290. package/dist/types/elements/apps/SwcAppLabel.d.ts +2 -3
  291. package/dist/types/elements/apps/SwcAppLabel.d.ts.map +1 -1
  292. package/dist/types/elements/apps/SwcAppLegend.d.ts +2 -3
  293. package/dist/types/elements/apps/SwcAppLegend.d.ts.map +1 -1
  294. package/dist/types/elements/apps/SwcAppLi.d.ts +2 -3
  295. package/dist/types/elements/apps/SwcAppLi.d.ts.map +1 -1
  296. package/dist/types/elements/apps/SwcAppLink.d.ts +2 -3
  297. package/dist/types/elements/apps/SwcAppLink.d.ts.map +1 -1
  298. package/dist/types/elements/apps/SwcAppMap.d.ts +2 -3
  299. package/dist/types/elements/apps/SwcAppMap.d.ts.map +1 -1
  300. package/dist/types/elements/apps/SwcAppMeta.d.ts +2 -3
  301. package/dist/types/elements/apps/SwcAppMeta.d.ts.map +1 -1
  302. package/dist/types/elements/apps/SwcAppMeter.d.ts +2 -3
  303. package/dist/types/elements/apps/SwcAppMeter.d.ts.map +1 -1
  304. package/dist/types/elements/apps/SwcAppMod.d.ts +2 -3
  305. package/dist/types/elements/apps/SwcAppMod.d.ts.map +1 -1
  306. package/dist/types/elements/apps/SwcAppObject.d.ts +2 -3
  307. package/dist/types/elements/apps/SwcAppObject.d.ts.map +1 -1
  308. package/dist/types/elements/apps/SwcAppOl.d.ts +2 -3
  309. package/dist/types/elements/apps/SwcAppOl.d.ts.map +1 -1
  310. package/dist/types/elements/apps/SwcAppOptGroup.d.ts +2 -3
  311. package/dist/types/elements/apps/SwcAppOptGroup.d.ts.map +1 -1
  312. package/dist/types/elements/apps/SwcAppOption.d.ts +2 -3
  313. package/dist/types/elements/apps/SwcAppOption.d.ts.map +1 -1
  314. package/dist/types/elements/apps/SwcAppOutput.d.ts +2 -3
  315. package/dist/types/elements/apps/SwcAppOutput.d.ts.map +1 -1
  316. package/dist/types/elements/apps/SwcAppParagraph.d.ts +2 -3
  317. package/dist/types/elements/apps/SwcAppParagraph.d.ts.map +1 -1
  318. package/dist/types/elements/apps/SwcAppParam.d.ts +2 -3
  319. package/dist/types/elements/apps/SwcAppParam.d.ts.map +1 -1
  320. package/dist/types/elements/apps/SwcAppPicture.d.ts +2 -3
  321. package/dist/types/elements/apps/SwcAppPicture.d.ts.map +1 -1
  322. package/dist/types/elements/apps/SwcAppPre.d.ts +2 -3
  323. package/dist/types/elements/apps/SwcAppPre.d.ts.map +1 -1
  324. package/dist/types/elements/apps/SwcAppProgress.d.ts +2 -3
  325. package/dist/types/elements/apps/SwcAppProgress.d.ts.map +1 -1
  326. package/dist/types/elements/apps/SwcAppQuote.d.ts +2 -3
  327. package/dist/types/elements/apps/SwcAppQuote.d.ts.map +1 -1
  328. package/dist/types/elements/apps/SwcAppScript.d.ts +2 -3
  329. package/dist/types/elements/apps/SwcAppScript.d.ts.map +1 -1
  330. package/dist/types/elements/apps/SwcAppSelect.d.ts +2 -3
  331. package/dist/types/elements/apps/SwcAppSelect.d.ts.map +1 -1
  332. package/dist/types/elements/apps/SwcAppSlot.d.ts +2 -3
  333. package/dist/types/elements/apps/SwcAppSlot.d.ts.map +1 -1
  334. package/dist/types/elements/apps/SwcAppSource.d.ts +2 -3
  335. package/dist/types/elements/apps/SwcAppSource.d.ts.map +1 -1
  336. package/dist/types/elements/apps/SwcAppSpan.d.ts +2 -3
  337. package/dist/types/elements/apps/SwcAppSpan.d.ts.map +1 -1
  338. package/dist/types/elements/apps/SwcAppStyle.d.ts +2 -3
  339. package/dist/types/elements/apps/SwcAppStyle.d.ts.map +1 -1
  340. package/dist/types/elements/apps/SwcAppTable.d.ts +2 -3
  341. package/dist/types/elements/apps/SwcAppTable.d.ts.map +1 -1
  342. package/dist/types/elements/apps/SwcAppTableCell.d.ts +2 -3
  343. package/dist/types/elements/apps/SwcAppTableCell.d.ts.map +1 -1
  344. package/dist/types/elements/apps/SwcAppTableRow.d.ts +2 -3
  345. package/dist/types/elements/apps/SwcAppTableRow.d.ts.map +1 -1
  346. package/dist/types/elements/apps/SwcAppTableSection.d.ts +2 -3
  347. package/dist/types/elements/apps/SwcAppTableSection.d.ts.map +1 -1
  348. package/dist/types/elements/apps/SwcAppTemplate.d.ts +2 -3
  349. package/dist/types/elements/apps/SwcAppTemplate.d.ts.map +1 -1
  350. package/dist/types/elements/apps/SwcAppTextArea.d.ts +2 -3
  351. package/dist/types/elements/apps/SwcAppTextArea.d.ts.map +1 -1
  352. package/dist/types/elements/apps/SwcAppTime.d.ts +2 -3
  353. package/dist/types/elements/apps/SwcAppTime.d.ts.map +1 -1
  354. package/dist/types/elements/apps/SwcAppTitle.d.ts +2 -3
  355. package/dist/types/elements/apps/SwcAppTitle.d.ts.map +1 -1
  356. package/dist/types/elements/apps/SwcAppTrack.d.ts +2 -3
  357. package/dist/types/elements/apps/SwcAppTrack.d.ts.map +1 -1
  358. package/dist/types/elements/apps/SwcAppUl.d.ts +2 -3
  359. package/dist/types/elements/apps/SwcAppUl.d.ts.map +1 -1
  360. package/dist/types/elements/apps/SwcAppVideo.d.ts +2 -3
  361. package/dist/types/elements/apps/SwcAppVideo.d.ts.map +1 -1
  362. package/dist/types/router/ElementRouter.d.ts +41 -0
  363. package/dist/types/router/ElementRouter.d.ts.map +1 -0
  364. package/dist/umd-bundle/dooboostore-simple-web-component.umd.js +912 -415
  365. package/dist/umd-bundle/dooboostore-simple-web-component.umd.js.map +4 -4
  366. package/package.json +2 -2
  367. package/src/decorators/elementDefine.ts +1 -0
  368. package/src/elements/SwcInterfaces.ts +6 -2
  369. package/src/elements/apps/SwcApp.ts +17 -9
  370. package/src/elements/apps/SwcAppAnchor.ts +17 -9
  371. package/src/elements/apps/SwcAppArea.ts +17 -9
  372. package/src/elements/apps/SwcAppAudio.ts +17 -9
  373. package/src/elements/apps/SwcAppBase.ts +17 -9
  374. package/src/elements/apps/SwcAppBody.ts +17 -9
  375. package/src/elements/apps/SwcAppButton.ts +17 -9
  376. package/src/elements/apps/SwcAppCanvas.ts +17 -9
  377. package/src/elements/apps/SwcAppData.ts +17 -9
  378. package/src/elements/apps/SwcAppDataList.ts +17 -9
  379. package/src/elements/apps/SwcAppDetails.ts +17 -9
  380. package/src/elements/apps/SwcAppDialog.ts +17 -9
  381. package/src/elements/apps/SwcAppDiv.ts +17 -9
  382. package/src/elements/apps/SwcAppDl.ts +17 -9
  383. package/src/elements/apps/SwcAppEmbed.ts +17 -9
  384. package/src/elements/apps/SwcAppFieldSet.ts +17 -9
  385. package/src/elements/apps/SwcAppForm.ts +17 -9
  386. package/src/elements/apps/SwcAppHeading.ts +17 -9
  387. package/src/elements/apps/SwcAppHr.ts +17 -9
  388. package/src/elements/apps/SwcAppIFrame.ts +17 -9
  389. package/src/elements/apps/SwcAppImage.ts +17 -9
  390. package/src/elements/apps/SwcAppInput.ts +17 -9
  391. package/src/elements/apps/SwcAppLabel.ts +17 -9
  392. package/src/elements/apps/SwcAppLegend.ts +17 -9
  393. package/src/elements/apps/SwcAppLi.ts +17 -9
  394. package/src/elements/apps/SwcAppLink.ts +17 -9
  395. package/src/elements/apps/SwcAppMap.ts +17 -9
  396. package/src/elements/apps/SwcAppMeta.ts +17 -9
  397. package/src/elements/apps/SwcAppMeter.ts +17 -9
  398. package/src/elements/apps/SwcAppMod.ts +17 -9
  399. package/src/elements/apps/SwcAppObject.ts +17 -9
  400. package/src/elements/apps/SwcAppOl.ts +17 -9
  401. package/src/elements/apps/SwcAppOptGroup.ts +17 -9
  402. package/src/elements/apps/SwcAppOption.ts +17 -9
  403. package/src/elements/apps/SwcAppOutput.ts +17 -9
  404. package/src/elements/apps/SwcAppParagraph.ts +17 -9
  405. package/src/elements/apps/SwcAppParam.ts +17 -9
  406. package/src/elements/apps/SwcAppPicture.ts +17 -9
  407. package/src/elements/apps/SwcAppPre.ts +17 -9
  408. package/src/elements/apps/SwcAppProgress.ts +17 -9
  409. package/src/elements/apps/SwcAppQuote.ts +17 -9
  410. package/src/elements/apps/SwcAppScript.ts +17 -9
  411. package/src/elements/apps/SwcAppSelect.ts +17 -9
  412. package/src/elements/apps/SwcAppSlot.ts +17 -9
  413. package/src/elements/apps/SwcAppSource.ts +17 -9
  414. package/src/elements/apps/SwcAppSpan.ts +17 -9
  415. package/src/elements/apps/SwcAppStyle.ts +17 -9
  416. package/src/elements/apps/SwcAppTable.ts +17 -9
  417. package/src/elements/apps/SwcAppTableCell.ts +17 -9
  418. package/src/elements/apps/SwcAppTableRow.ts +17 -9
  419. package/src/elements/apps/SwcAppTableSection.ts +17 -9
  420. package/src/elements/apps/SwcAppTemplate.ts +17 -9
  421. package/src/elements/apps/SwcAppTextArea.ts +17 -9
  422. package/src/elements/apps/SwcAppTime.ts +17 -9
  423. package/src/elements/apps/SwcAppTitle.ts +17 -9
  424. package/src/elements/apps/SwcAppTrack.ts +17 -9
  425. package/src/elements/apps/SwcAppUl.ts +17 -9
  426. package/src/elements/apps/SwcAppVideo.ts +17 -9
  427. package/src/router/ElementRouter.ts +187 -0
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/decorators/elementDefine.ts"],
4
- "sourcesContent": ["import { ReflectUtils } from '@dooboostore/core/reflect/ReflectUtils';\nimport { getInnerHtmlMetadataList } from './innerHtml';\nimport { getQueryMetadata } from './query';\nimport { getQueryAllMetadata } from './queryAll';\nimport { getAddEventListenerMetadata } from './addEventListener';\nimport { getLifecycleMetadata, ON_BEFORE_CONNECTED_METADATA_KEY, ON_AFTER_CONNECTED_METADATA_KEY, ON_BEFORE_DISCONNECTED_METADATA_KEY, ON_AFTER_DISCONNECTED_METADATA_KEY, ON_BEFORE_ADOPTED_METADATA_KEY, ON_AFTER_ADOPTED_METADATA_KEY, ON_ADD_EVENT_LISTENER_METADATA_KEY, ON_ATTRIBUTE_CHANGED_METADATA_KEY, ATTRIBUTE_CHANGED_WILDCARD, getMutationSubscribeMetadataList } from './lifecycles';\nimport { getAttributeMetadataList } from './attribute';\nimport { getStateMetadataList } from './state';\nimport { getEmitCustomEventMetadataList } from './emitCustomEvent';\nimport { SwcUtils, SWC_NOT_FOUND } from '../utils/Utils';\nimport { HTML_TAG_ENTRIES } from '../config/config';\nimport {getInject, SituationTypeContainer, SituationTypeContainers} from '@dooboostore/simple-boot/decorators/inject/Inject';\nimport { InjectSituationType, HostSet } from '../elements/SwcInterfaces';\nimport { ConstructorType } from '@dooboostore/core/types';\n\nexport interface ElementConfig {\n name: string;\n extends?: string;\n observedAttributes?: string[];\n customElementRegistry?: CustomElementRegistry;\n autoRemoveEventListeners?: boolean;\n window?: Window;\n}\n\nexport const ELEMENT_CONFIG_KEY = Symbol('simple-web-component:element-config');\nexport const STATE_CHANGE_EVENT = 'swc:state-change';\n\n// --- \uD658\uACBD \uCD08\uAE30\uD654 \uD5EC\uD37C ---\n\nfunction buildEnv(configWindow?: Window) {\n const win: any = configWindow || (typeof window !== 'undefined' ? window : undefined);\n const doc: Document = win?.document;\n\n const builtInTagMap = new Map<any, string>();\n for (const [cls, tag] of HTML_TAG_ENTRIES) {\n if (win?.[cls]) builtInTagMap.set(win[cls], tag);\n }\n\n const domHelpers = {\n $d: doc,\n $w: win,\n $q: (sel: string, root?: Element | Document | ShadowRoot) => (root ?? doc).querySelector(sel),\n $qa: (sel: string, root?: Element | Document | ShadowRoot) => Array.from((root ?? doc).querySelectorAll(sel)),\n $qi: (id: string, root?: Document | ShadowRoot) => (root ?? doc).getElementById(id)\n } as const;\n\n return { win, doc, builtInTagMap, domHelpers };\n}\n\nexport const elementDefine =\n (inConfig: ElementConfig | string): ClassDecorator =>\n (constructor: any) => {\n const config: ElementConfig = typeof inConfig === 'string' ? { name: inConfig } : inConfig;\n const { win, doc, builtInTagMap: BUILT_IN_TAG_MAP, domHelpers: SWC_DOM_HELPERS } = buildEnv(config.window);\n config.window = win;\n const SWC_DOM_HELPER_KEYS = Object.keys(SWC_DOM_HELPERS) as (keyof typeof SWC_DOM_HELPERS)[];\n const SWC_DOM_HELPER_VALS = () => SWC_DOM_HELPER_KEYS.map(k => (SWC_DOM_HELPERS as any)[k]);\n\n let extendsTagName = config.extends;\n if (!extendsTagName) {\n let proto = constructor;\n while (proto && proto !== HTMLElement && proto !== Function.prototype) {\n extendsTagName = BUILT_IN_TAG_MAP.get(proto);\n if (extendsTagName) break;\n proto = Object.getPrototypeOf(proto);\n }\n config.extends = extendsTagName;\n }\n\n const attributePropsList = getAttributeMetadataList(constructor);\n const emitCustomEventList = getEmitCustomEventMetadataList(constructor);\n const stateList = getStateMetadataList(constructor);\n const observedFromProps = attributePropsList ? attributePropsList.map(it => it.options.name!) : [];\n const observedFromEmits = emitCustomEventList ? emitCustomEventList.map(it => it.options.attributeName!) : [];\n const swcLifecycleAttributes = ['swc-on-constructor', 'swc-on-before-connected', 'swc-on-after-connected', 'swc-on-before-disconnected', 'swc-on-after-disconnected', 'swc-on-before-adopted', 'swc-on-after-adopted', 'swc-on-attribute-changed'];\n const mergedObservedAttributes = [...new Set([...(config.observedAttributes ?? []), ...observedFromProps, ...observedFromEmits, ...swcLifecycleAttributes])];\n\n const NewClass = class extends (constructor as any) {\n private _swcId = Math.random().toString(36).substring(2, 11);\n private _observer: MutationObserver | null = null;\n private _shadowObserver: MutationObserver | null = null;\n private _boundElements = new WeakMap<Element, Set<string | symbol>>();\n private _activeListeners: Array<{ el: Element | HTMLElement; type: string; handler: EventListener; options?: any }> = [];\n private _emitHandlers = new Map<string, EventListener>();\n private _stateBindings = new Map<string, any[]>();\n private _internalStates = new Map<string | symbol, any>();\n private _externalSources = new Map<string, HTMLElement>();\n\n _getHostContext(): Record<string, any> {\n const ctx: Record<string, any> = {};\n if (stateList) {\n stateList.forEach(meta => {\n const name = meta.options.name!;\n const val = this._internalStates.get(meta.propertyKey);\n ctx[name] = val;\n });\n }\n if (attributePropsList) {\n attributePropsList.forEach(meta => {\n const name = meta.options.name!;\n const val = this._internalStates.get(meta.propertyKey);\n ctx[name] = val;\n });\n }\n const hostVal = (this as any).value !== undefined ? (this as any).value : this;\n ctx['value'] = hostVal;\n const alias = this.getAttribute('as');\n if (alias && alias !== 'value') ctx[alias] = hostVal;\n return ctx;\n }\n\n static get observedAttributes() {\n return mergedObservedAttributes;\n }\n\n private _executeSwcScript(attrName: string, hostSet: HostSet, extraArgs: Record<string, any> = {}) {\n const script = this.getAttribute(attrName);\n if (script) {\n try {\n const args = { ...hostSet, ...SWC_DOM_HELPERS, ...extraArgs };\n const argNames = Object.keys(args);\n const argValues = Object.values(args);\n new Function(...argNames, script).apply(this, argValues);\n } catch (e) {\n console.error(`[SWC] Failed to execute ${attrName} script:`, e);\n }\n }\n }\n\n private async _invokeLifecycleMethod(methodName: string | symbol, hostSet: HostSet, extraArgs: any[] = []) {\n if (typeof (this as any)[methodName] !== 'function') return;\n const app = hostSet.$appHost?.simpleApplication;\n\n if (app) {\n const otherStorage = new Map<any, any>();\n const situations = new SituationTypeContainers([new SituationTypeContainer({ situationType: InjectSituationType.HOST_SET, data: hostSet }), new SituationTypeContainer({ situationType: InjectSituationType.APP_HOST, data: hostSet.$appHost }), new SituationTypeContainer({ situationType: InjectSituationType.APP_HOSTS, data: hostSet.$appHosts }), new SituationTypeContainer({ situationType: InjectSituationType.HOST, data: hostSet.$host }), new SituationTypeContainer({ situationType: InjectSituationType.HOSTS, data: hostSet.$hosts }), new SituationTypeContainer({ situationType: InjectSituationType.FIRST_HOST, data: hostSet.$firstHost }), new SituationTypeContainer({ situationType: InjectSituationType.LAST_HOST, data: hostSet.$lastHost }), new SituationTypeContainer({ situationType: InjectSituationType.FIRST_APP_HOST, data: hostSet.$firstAppHost }), new SituationTypeContainer({ situationType: InjectSituationType.LAST_APP_HOST, data: hostSet.$lastAppHost })]);\n otherStorage.set(SituationTypeContainers, situations);\n\n return app.simstanceManager.executeBindParameterSimPromise(\n {\n target: this,\n targetKey: methodName,\n inputParameters: extraArgs\n },\n otherStorage\n );\n } else {\n return (this as any)[methodName](hostSet,...extraArgs);\n }\n }\n\n constructor(...args: any[]) {\n super(...args);\n const hostSet = SwcUtils.getHostSet(this as any);\n this._executeSwcScript('swc-on-constructor', hostSet);\n\n if (stateList) {\n stateList.forEach(meta => {\n const key = meta.propertyKey;\n const stateName = meta.options.name!;\n const initialVal = (this as any)[key];\n this._internalStates.set(\n key,\n SwcUtils.createReactiveProxy(initialVal, () => this._updateState(stateName))\n );\n Object.defineProperty(this, key, {\n get: () => this._internalStates.get(key),\n set: newVal => {\n if (this._internalStates.get(key) === newVal) return;\n this._internalStates.set(\n key,\n SwcUtils.createReactiveProxy(newVal, () => this._updateState(stateName))\n );\n this._updateState(stateName);\n },\n enumerable: true,\n configurable: true\n });\n });\n }\n if (attributePropsList) {\n attributePropsList.forEach(meta => {\n const key = meta.propertyKey;\n const attrName = meta.options.name!;\n const attrValue = this.getAttribute(attrName);\n let initialVal = attrValue !== null ? attrValue : (this as any)[key];\n if (initialVal === undefined) initialVal = null;\n if (attrValue !== null) {\n if (meta.options.type === Number) initialVal = Number(attrValue);\n else if (meta.options.type === Boolean) initialVal = true;\n else if (meta.options.type === Object) {\n try {\n initialVal = JSON.parse(attrValue);\n } catch (e) {}\n }\n }\n this._internalStates.set(key, initialVal);\n Object.defineProperty(this, key, {\n get: () => this._internalStates.get(key),\n set: newVal => {\n if (this._internalStates.get(key) === newVal) return;\n this._internalStates.set(key, newVal);\n if (typeof (this as any)._updateState === 'function') (this as any)._updateState(attrName);\n if (!meta.options.disableReflect && this.setAttribute && typeof newVal !== 'object') {\n if (newVal === null || newVal === undefined || newVal === false) this.removeAttribute(attrName);\n else this.setAttribute(attrName, String(newVal));\n }\n },\n enumerable: true,\n configurable: true\n });\n });\n }\n const innerHtmlList = getInnerHtmlMetadataList(this);\n if (innerHtmlList?.some(it => it.options.useShadow === true) && !this.shadowRoot) {\n this.attachShadow({ mode: 'open' });\n }\n }\n\n private _isSyncing = false;\n private _syncDecorators() {\n if (this._isSyncing) return;\n this._isSyncing = true;\n try {\n this._buildStateMap();\n this._syncEventListenersAndQueries();\n } finally {\n this._isSyncing = false;\n }\n }\n\n private _syncEventListenersAndQueries() {\n const getSearchRoots = (rootOption?: string): Node[] => {\n const roots: Node[] = [];\n if (rootOption === 'shadow') {\n if (this.shadowRoot) roots.push(this.shadowRoot);\n } else if (rootOption === 'light') {\n roots.push(this as any as Node);\n } else if (rootOption === 'all') {\n if (this.shadowRoot) roots.push(this.shadowRoot);\n roots.push(this as any as Node);\n } else {\n roots.push(this.shadowRoot || (this as any as Node));\n }\n return roots;\n };\n const queryMetadata = getQueryMetadata(this);\n if (queryMetadata) {\n queryMetadata\n .filter(it => it.isMethod)\n .forEach(it => {\n const searchRoots = getSearchRoots(it.options.root);\n let foundEl: Element | null = null;\n for (const root of searchRoots) {\n foundEl = it.selector ? (root as HTMLElement).querySelector(it.selector) : (this as any as Element);\n if (foundEl) break;\n }\n if (foundEl) {\n let bound = this._boundElements.get(foundEl);\n if (!bound) {\n bound = new Set();\n this._boundElements.set(foundEl, bound);\n }\n if (!bound.has(it.propertyKey)) {\n (this as any)[it.propertyKey](foundEl);\n bound.add(it.propertyKey);\n }\n }\n });\n }\n const queryAllMetadata = getQueryAllMetadata(this);\n if (queryAllMetadata) {\n queryAllMetadata\n .filter(it => it.isMethod)\n .forEach(it => {\n const searchRoots = getSearchRoots(it.options.root);\n const allElements: Element[] = [];\n searchRoots.forEach(root => {\n const found = it.selector ? (root as HTMLElement).querySelectorAll(it.selector) : [this as any as Element];\n allElements.push(...Array.from(found));\n });\n (this as any)[it.propertyKey](allElements);\n });\n }\n const eventListeners = getAddEventListenerMetadata(this);\n if (eventListeners) {\n eventListeners.forEach(it => {\n const { query, type, root: rootOption, ...options } = it.options;\n const searchRoots = getSearchRoots(rootOption);\n searchRoots.forEach(root => {\n const targetElements = query ? (root as HTMLElement).querySelectorAll(query) : [this as any as Element];\n targetElements.forEach(targetElement => {\n if (targetElement) {\n let bound = this._boundElements.get(targetElement);\n if (!bound) {\n bound = new Set();\n this._boundElements.set(targetElement, bound);\n }\n const eventKey = `event:${String(it.propertyKey)}:${type}`;\n if (!bound.has(eventKey)) {\n const handler = (event: any) => {\n if (it.options.stopImmediatePropagation) event.stopImmediatePropagation();\n if (it.options.stopPropagation) event.stopPropagation();\n if (it.options.preventDefault) event.preventDefault();\n (this as any)[it.propertyKey](event, targetElement);\n };\n targetElement.addEventListener(type, handler, options);\n bound.add(eventKey);\n if (config.autoRemoveEventListeners) this._activeListeners.push({ el: targetElement, type, handler, options });\n const addEventMethods = getLifecycleMetadata(this, ON_ADD_EVENT_LISTENER_METADATA_KEY);\n addEventMethods?.forEach((m: string | symbol) => {\n if (typeof (this as any)[m] === 'function') (this as any)[m](targetElement, type, handler);\n });\n }\n }\n });\n });\n });\n }\n }\n\n private _buildStateMap() {\n const scan = (root: Node) => {\n const walker = doc.createTreeWalker(root, (win as any).NodeFilter.SHOW_ELEMENT | (win as any).NodeFilter.SHOW_TEXT);\n let node: Node | null = null;\n while ((node = walker.nextNode())) {\n if (node.nodeType === Node.TEXT_NODE) this._parseAndBind(node, 'text');\n else if (node.nodeType === Node.ELEMENT_NODE) {\n const el = node as HTMLElement;\n const alias = el.getAttribute('as');\n if (alias && !this._externalSources.has(alias)) {\n this._externalSources.set(alias, el);\n const aliasKey = `alias-event:${alias}`;\n let bound = this._boundElements.get(el);\n if (!bound) {\n bound = new Set();\n this._boundElements.set(el, bound);\n }\n if (!bound.has(aliasKey)) {\n el.addEventListener(STATE_CHANGE_EVENT, () => this._updateState(alias));\n bound.add(aliasKey);\n }\n }\n const $hosts = SwcUtils.findAllSwcHosts(el);\n $hosts.forEach(host => {\n const hAlias = host.getAttribute('as');\n if (hAlias) {\n const hostBindKey = `parent-host-event:${hAlias}`;\n let hBound = this._boundElements.get(host);\n if (!hBound) {\n hBound = new Set();\n this._boundElements.set(host, hBound);\n }\n if (!hBound.has(hostBindKey)) {\n host.addEventListener(STATE_CHANGE_EVENT, () => this._updateState(hAlias));\n hBound.add(hostBindKey);\n }\n }\n });\n Array.from(el.attributes).forEach(attr => {\n if (attr.name.startsWith('swc-on-') && !swcLifecycleAttributes.includes(attr.name)) {\n const eventName = attr.name.substring(7);\n const script = attr.value;\n const hostSet = SwcUtils.getHostSet(el);\n if (eventName === 'connected') {\n const eventKey = `attr-once:${attr.name}`;\n let bound = this._boundElements.get(el);\n if (!bound) {\n bound = new Set();\n this._boundElements.set(el, bound);\n }\n if (!bound.has(eventKey)) {\n if (script) {\n try {\n const argNames = Object.keys(hostSet);\n const argValues = Object.values(hostSet);\n new Function('event', '$data', ...argNames, ...SWC_DOM_HELPER_KEYS, script).call(el, null, null, ...argValues, ...SWC_DOM_HELPER_VALS());\n } catch (e) {\n console.error(`[SWC] Failed to execute ${attr.name} script:`, e);\n }\n }\n bound.add(eventKey);\n }\n return;\n }\n const eventKey = `attr-event:${attr.name}`;\n let bound = this._boundElements.get(el);\n if (!bound) {\n bound = new Set();\n this._boundElements.set(el, bound);\n }\n if (!bound.has(eventKey)) {\n const handler = (event: any) => {\n if (script) {\n try {\n const argNames = Object.keys(hostSet);\n const argValues = Object.values(hostSet);\n new Function('event', '$data', ...argNames, ...SWC_DOM_HELPER_KEYS, script).call(el, event, (event as CustomEvent).detail, ...argValues, ...SWC_DOM_HELPER_VALS());\n } catch (e) {\n console.error(`[SWC] Failed to execute ${attr.name} script:`, e);\n }\n }\n };\n el.addEventListener(eventName, handler);\n bound.add(eventKey);\n if (config.autoRemoveEventListeners) this._activeListeners.push({ el, type: eventName, handler });\n }\n }\n this._parseAndBind(attr, 'attribute', el);\n });\n const isSwcChild = (el as any)._swcId || getElementConfig(el.constructor) || (el.getAttribute('is')?.startsWith('swc-') ?? false);\n if (isSwcChild) {\n const next = walker.nextSibling();\n if (!next) break;\n node = next;\n if (node.nodeType === Node.TEXT_NODE) this._parseAndBind(node, 'text');\n }\n }\n }\n };\n if (this.shadowRoot) scan(this.shadowRoot);\n scan(this as any as Node);\n }\n\n private _parseAndBind(node: Node | Attr, type: 'text' | 'attribute', owner?: HTMLElement) {\n const tplKey = `__swc_original_${this._swcId}`;\n const isAlreadyBound = (node as any).__swc_bound_ids?.has(this._swcId);\n const content = (node as any)[tplKey] || node.textContent || '';\n const matches = Array.from(content.matchAll(/{{(.*?)}}/g)) as any[];\n if (matches.length === 0 || isAlreadyBound) return;\n matches.forEach(match => {\n const fullPath = (match[1] as string).trim();\n const rootName = fullPath.split('.')[0];\n const isState = stateList?.some(s => s.options.name === rootName);\n const isAttr = attributePropsList?.some(a => a.options.name === rootName);\n const isLogicKey = (this as any)._asKey === rootName || (this as any)._asItemKey === rootName || (this as any)._asIndexKey === rootName;\n const isExternal = this._externalSources.has(rootName);\n const isSelfAlias = this.getAttribute('as') === rootName;\n const isInstanceProp = rootName in this;\n let isParentAlias = false;\n let curr: any = (this as any).parentElement || ((this as any).getRootNode?.() as any)?.host;\n while (curr) {\n if (curr.getAttribute?.('as') === rootName) {\n isParentAlias = true;\n break;\n }\n curr = curr.parentElement || (curr.getRootNode?.() as any)?.host;\n }\n if (!isState && !isAttr && !isLogicKey && !isExternal && !isSelfAlias && !isInstanceProp && !isParentAlias) return;\n if (!this._stateBindings.has(rootName)) this._stateBindings.set(rootName, []);\n if (!(node as any)[tplKey]) (node as any)[tplKey] = content;\n if (!(node as any).__swc_bound_ids) (node as any).__swc_bound_ids = new Set();\n (node as any).__swc_bound_ids.add(this._swcId);\n this._stateBindings.get(rootName)!.push({ node, type, owner, path: fullPath });\n this._updateState(rootName);\n });\n }\n\n private _isUpdatingState = false;\n private _updateState(stateName: string) {\n if (!this._stateBindings) return;\n if (this._isUpdatingState) return;\n this._isUpdatingState = true;\n try {\n this._executeBindingUpdate(stateName);\n const selfAlias = this.getAttribute('as');\n if (selfAlias && selfAlias !== stateName) this._executeBindingUpdate(selfAlias);\n this.dispatchEvent(new CustomEvent(STATE_CHANGE_EVENT, { bubbles: true, composed: true, detail: { source: stateName, host: this } }));\n } finally {\n this._isUpdatingState = false;\n }\n }\n\n private _executeBindingUpdate(stateName: string) {\n const bindings = this._stateBindings.get(stateName);\n if (!bindings) return;\n const tplKey = `__swc_original_${this._swcId}`;\n bindings.forEach(bin => {\n let text = (bin.node as any)[tplKey];\n if (!text) return;\n const matches = Array.from(text.matchAll(/{{(.*?)}}/g)) as RegExpMatchArray[];\n let updatedText = text;\n for (const match of matches) {\n const path = match[1].trim();\n const root = path.split('.')[0];\n let val: any = undefined;\n let current: HTMLElement | null = this as any as HTMLElement;\n while (current) {\n const currentNewClass = current as any;\n if (current.getAttribute('as') === root) {\n val = SwcUtils.getValueByPath(current, path.split('.').slice(1).join('.') || 'value', 'value');\n if (val !== SWC_NOT_FOUND) break;\n }\n const externalSource = currentNewClass._externalSources?.get(root);\n if (externalSource) {\n val = SwcUtils.getValueByPath(externalSource, path.split('.').slice(1).join('.') || 'value', 'value');\n if (val !== SWC_NOT_FOUND) break;\n }\n const cStates = getStateMetadataList(current.constructor);\n const cAttrs = getAttributeMetadataList(current.constructor);\n const sMeta = cStates?.find(s => s.options.name === root);\n const aMeta = cAttrs?.find(a => a.options.name === root);\n if (sMeta || aMeta) {\n const propKey = sMeta ? String(sMeta.propertyKey) : String(aMeta!.propertyKey);\n const rootVal = (current as any)[propKey];\n const subPath = path.split('.').slice(1).join('.');\n if (subPath) {\n val = SwcUtils.getValueByPath(rootVal, subPath, subPath.split('.')[0]);\n if (val === SWC_NOT_FOUND) {\n const parts = subPath.split('.');\n let cur = rootVal;\n for (const p of parts) {\n if (cur === null || cur === undefined) {\n cur = SWC_NOT_FOUND;\n break;\n }\n cur = cur[p];\n }\n if (cur !== undefined && cur !== SWC_NOT_FOUND) val = cur;\n }\n } else {\n val = rootVal;\n }\n if (val !== SWC_NOT_FOUND && val !== undefined) break;\n }\n if (root in current) {\n val = SwcUtils.getValueByPath(current, path, root);\n if (val !== SWC_NOT_FOUND) break;\n }\n current = current.parentElement || (current.getRootNode() as any).host;\n }\n if (val !== SWC_NOT_FOUND && val !== undefined) {\n const strVal = val === null ? '' : typeof val === 'object' ? JSON.stringify(val) : String(val);\n updatedText = updatedText.replace(match[0], strVal);\n if (bin.type === 'attribute' && bin.owner) {\n const attrName = (bin.node as Attr).name;\n const ownerAttrs = getAttributeMetadataList(bin.owner.constructor);\n const attrMeta = ownerAttrs?.find(a => a.options.name === attrName);\n const propName = attrMeta ? String(attrMeta.propertyKey) : attrName.replace(/-([a-z])/g, g => g[1].toUpperCase());\n if (val === null || val === undefined) {\n bin.owner.removeAttribute(attrName);\n if (propName in bin.owner) (bin.owner as any)[propName] = val;\n } else {\n if (propName in bin.owner) (bin.owner as any)[propName] = val;\n bin.owner.setAttribute(attrName, updatedText);\n if ((attrName === 'value' || attrName === 'checked') && bin.owner.tagName.match(/INPUT|TEXTAREA|SELECT/)) {\n (bin.owner as any)[attrName] = updatedText;\n }\n }\n }\n }\n }\n if (bin.type === 'text') bin.node.textContent = updatedText;\n });\n }\n\n disconnectedCallback() {\n const hostSet = SwcUtils.getHostSet(this as any);\n this._executeSwcScript('swc-on-before-disconnected', hostSet);\n const bMethods = getLifecycleMetadata<(string | symbol)[]>(this, ON_BEFORE_DISCONNECTED_METADATA_KEY);\n bMethods?.forEach(m => this._invokeLifecycleMethod(m, hostSet));\n if (this._observer) this._observer.disconnect();\n if (this._shadowObserver) this._shadowObserver.disconnect();\n if (config.autoRemoveEventListeners) {\n this._activeListeners.forEach(({ el, type, handler, options }) => el.removeEventListener(type, handler, options));\n this._activeListeners = [];\n }\n if (super.disconnectedCallback) super.disconnectedCallback();\n const aMethods = getLifecycleMetadata<(string | symbol)[]>(this, ON_AFTER_DISCONNECTED_METADATA_KEY);\n aMethods?.forEach(m => this._invokeLifecycleMethod(m, hostSet));\n this._executeSwcScript('swc-on-after-disconnected', hostSet);\n }\n\n adoptedCallback() {\n const hostSet = SwcUtils.getHostSet(this as any);\n this._executeSwcScript('swc-on-before-adopted', hostSet);\n const bMethods = getLifecycleMetadata<(string | symbol)[]>(this, ON_BEFORE_ADOPTED_METADATA_KEY);\n bMethods?.forEach(m => this._invokeLifecycleMethod(m, hostSet));\n if (super.adoptedCallback) super.adoptedCallback();\n const aMethods = getLifecycleMetadata<(string | symbol)[]>(this, ON_AFTER_ADOPTED_METADATA_KEY);\n aMethods?.forEach(m => this._invokeLifecycleMethod(m, hostSet));\n this._executeSwcScript('swc-on-after-adopted', hostSet);\n }\n\n async connectedCallback() {\n const hostSet = SwcUtils.getHostSet(this as any);\n this._executeSwcScript('swc-on-before-connected', hostSet);\n const bMethods = getLifecycleMetadata<(string | symbol)[]>(this, ON_BEFORE_CONNECTED_METADATA_KEY);\n if (bMethods) {\n for (const m of bMethods) {\n await this._invokeLifecycleMethod(m, hostSet);\n }\n }\n if (typeof (this as any).initCore === 'function') (this as any).initCore();\n const iHtmlList = getInnerHtmlMetadataList(this);\n let sContent = '';\n let lContent = '';\n if (iHtmlList) {\n for (const meta of iHtmlList) {\n const result = await (this as any)[meta.propertyKey]();\n if (result !== undefined) {\n if (meta.options.useShadow === true) sContent += result;\n else lContent += result;\n }\n }\n }\n if (this.shadowRoot) this.shadowRoot.innerHTML = sContent;\n if (lContent) this.innerHTML = lContent;\n (this as any)._syncDecorators();\n\n // --- Root Host self-binding logic ---\n const isManagedByParent = !!SwcUtils.findNearestSwcHost(this as any);\n if (!isManagedByParent) {\n Array.from(this.attributes as any).forEach((attr: any) => {\n if (attr.name.startsWith('swc-on-') && !swcLifecycleAttributes.includes(attr.name)) {\n const eventName = attr.name.substring(7);\n const script = attr.value;\n if (eventName === 'connected') {\n const eventKey = `host-attr-once:${attr.name}`;\n let bound = this._boundElements.get(this as any);\n if (!bound) {\n bound = new Set();\n this._boundElements.set(this as any, bound);\n }\n if (!bound.has(eventKey)) {\n if (script) {\n try {\n const argNames = Object.keys(hostSet);\n const argValues = Object.values(hostSet);\n new Function('event', '$data', ...argNames, ...SWC_DOM_HELPER_KEYS, script).call(this, null, null, ...argValues, ...SWC_DOM_HELPER_VALS());\n } catch (e) {\n console.error(`[SWC] Failed to execute ${attr.name} script:`, e);\n }\n }\n bound.add(eventKey);\n }\n return;\n }\n const eventKey = `host-attr-event:${attr.name}`;\n let bound = this._boundElements.get(this as any);\n if (!bound) {\n bound = new Set();\n this._boundElements.set(this as any, bound);\n }\n if (!bound.has(eventKey)) {\n const handler = (event: any) => {\n if (script) {\n try {\n const argNames = Object.keys(hostSet);\n const argValues = Object.values(hostSet);\n new Function('event', '$data', ...argNames, ...SWC_DOM_HELPER_KEYS, script).call(this, event, (event as CustomEvent).detail, ...argValues, ...SWC_DOM_HELPER_VALS());\n } catch (e) {\n console.error(`[SWC] Failed to execute ${attr.name} script:`, e);\n }\n }\n };\n this.addEventListener(eventName, handler);\n bound.add(eventKey);\n if (config.autoRemoveEventListeners) this._activeListeners.push({ el: this as any, type: eventName, handler });\n }\n }\n });\n }\n\n const mutationMetaList = getMutationSubscribeMetadataList(this);\n const fireMutationCallbacks = (mutationList: MutationRecord[], observer: MutationObserver, root: 'light' | 'shadow') => {\n mutationMetaList?.forEach(meta => {\n const r = meta.options.root ?? 'auto';\n const matches = r === 'all' || r === root || (r === 'auto' && (this.shadowRoot ? root === 'shadow' : root === 'light'));\n if (matches && typeof (this as any)[meta.propertyKey] === 'function') {\n (this as any)[meta.propertyKey](mutationList, observer, root);\n }\n });\n };\n this._observer = new (win as any).MutationObserver((mutationList: MutationRecord[], observer: MutationObserver) => {\n (this as any)._syncDecorators();\n fireMutationCallbacks(mutationList, observer, 'light');\n });\n // @ts-ignore\n this._observer.observe(this as any, { childList: true, subtree: true });\n if (this.shadowRoot) {\n this._shadowObserver = new (win as any).MutationObserver((mutationList: MutationRecord[], observer: MutationObserver) => {\n (this as any)._syncDecorators();\n fireMutationCallbacks(mutationList, observer, 'shadow');\n });\n // @ts-ignore\n this._shadowObserver.observe(this.shadowRoot, { childList: true, subtree: true });\n }\n if (super.connectedCallback) await super.connectedCallback();\n const aMethods = getLifecycleMetadata<(string | symbol)[]>(this, ON_AFTER_CONNECTED_METADATA_KEY);\n if (aMethods) {\n for (const m of aMethods) {\n await this._invokeLifecycleMethod(m, hostSet);\n }\n }\n this._executeSwcScript('swc-on-after-connected', hostSet);\n }\n\n attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null) {\n if (super.attributeChangedCallback) super.attributeChangedCallback(name, oldValue, newValue);\n if (attributePropsList) {\n attributePropsList.forEach(meta => {\n if (meta.options.name === name) {\n const current = (this as any)[meta.propertyKey];\n if (typeof current === 'object' && current !== null) return;\n if (String(current) !== String(newValue)) (this as any)[meta.propertyKey] = newValue;\n }\n });\n }\n if (typeof (this as any)._updateState === 'function') (this as any)._updateState(name);\n const aMethodsMap = getLifecycleMetadata(constructor, ON_ATTRIBUTE_CHANGED_METADATA_KEY) as Map<string, (string | symbol)[]>;\n const mKeys = aMethodsMap?.get(name);\n const hostSet = SwcUtils.getHostSet(this as any);\n if (mKeys && Array.isArray(mKeys)) {\n mKeys.forEach(key => this._invokeLifecycleMethod(key, hostSet, [newValue, oldValue, name]));\n }\n if (emitCustomEventList) {\n const eMeta = emitCustomEventList.find(it => it.options.attributeName === name);\n if (eMeta) {\n const eType = eMeta.options.type;\n const oHandler = this._emitHandlers.get(eType);\n if (oHandler) this.removeEventListener(eType, oHandler);\n if (newValue) {\n const nHandler = (e: Event) => {\n new Function('event', '$data', newValue).call(this, e, (e as CustomEvent).detail);\n };\n this.addEventListener(eType, nHandler);\n this._emitHandlers.set(eType, nHandler);\n }\n }\n }\n const wMethodsKeys = aMethodsMap?.get(ATTRIBUTE_CHANGED_WILDCARD);\n if (wMethodsKeys && Array.isArray(wMethodsKeys)) {\n wMethodsKeys.forEach(key => this._invokeLifecycleMethod(key, hostSet, [newValue, oldValue, name]));\n }\n this._executeSwcScript('swc-on-attribute-changed', hostSet, { $new: newValue, $old: oldValue, $name: name });\n }\n };\n\n // [METADATA INHERITANCE FIX]\n // Copy method metadata from original constructor to NewClass\n // This ensures @Inject and other decorators on methods work correctly in the wrapped class.\n const originalProto = constructor.prototype;\n const newProto = NewClass.prototype;\n Object.getOwnPropertyNames(originalProto).forEach(name => {\n if (name === 'constructor') return;\n const keys = Reflect.getMetadataKeys(originalProto, name);\n keys.forEach(key => {\n const metadata = Reflect.getMetadata(key, originalProto, name);\n Reflect.defineMetadata(key, metadata, newProto, name);\n });\n });\n\n ReflectUtils.defineMetadata(ELEMENT_CONFIG_KEY, config, NewClass);\n ReflectUtils.defineMetadata(ELEMENT_CONFIG_KEY, config, constructor);\n const registry = config.customElementRegistry || (typeof win !== 'undefined' ? win.customElements : undefined);\n if (registry && !registry.get(config.name)) {\n const options = config.extends ? { extends: config.extends } : undefined;\n registry.define(config.name, NewClass as any, options);\n }\n return NewClass as any;\n };\n\nexport const getElementConfig = (target: any): ElementConfig | undefined => {\n const constructor = target instanceof Function ? target : target.constructor;\n return ReflectUtils.getMetadata(ELEMENT_CONFIG_KEY, constructor);\n};\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAA6B;AAC7B,uBAAyC;AACzC,mBAAiC;AACjC,sBAAoC;AACpC,8BAA4C;AAC5C,wBAAqX;AACrX,uBAAyC;AACzC,mBAAqC;AACrC,6BAA+C;AAC/C,mBAAwC;AACxC,oBAAiC;AACjC,oBAAyE;AACzE,2BAA6C;AAYtC,MAAM,qBAAqB,OAAO,qCAAqC;AACvE,MAAM,qBAAqB;AAIlC,SAAS,SAAS,cAAuB;AACvC,QAAM,MAAW,iBAAiB,OAAO,WAAW,cAAc,SAAS;AAC3E,QAAM,MAAgB,KAAK;AAE3B,QAAM,gBAAgB,oBAAI,IAAiB;AAC3C,aAAW,CAAC,KAAK,GAAG,KAAK,gCAAkB;AACzC,QAAI,MAAM,GAAG,EAAG,eAAc,IAAI,IAAI,GAAG,GAAG,GAAG;AAAA,EACjD;AAEA,QAAM,aAAa;AAAA,IACjB,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI,CAAC,KAAa,UAA4C,QAAQ,KAAK,cAAc,GAAG;AAAA,IAC5F,KAAK,CAAC,KAAa,SAA2C,MAAM,MAAM,QAAQ,KAAK,iBAAiB,GAAG,CAAC;AAAA,IAC5G,KAAK,CAAC,IAAY,UAAkC,QAAQ,KAAK,eAAe,EAAE;AAAA,EACpF;AAEA,SAAO,EAAE,KAAK,KAAK,eAAe,WAAW;AAC/C;AAEO,MAAM,gBACX,CAAC,aACD,CAAC,gBAAqB;AACpB,QAAM,SAAwB,OAAO,aAAa,WAAW,EAAE,MAAM,SAAS,IAAI;AAClF,QAAM,EAAE,KAAK,KAAK,eAAe,kBAAkB,YAAY,gBAAgB,IAAI,SAAS,O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"sourcesContent": ["import { ReflectUtils } from '@dooboostore/core/reflect/ReflectUtils';\nimport { getInnerHtmlMetadataList } from './innerHtml';\nimport { getQueryMetadata } from './query';\nimport { getQueryAllMetadata } from './queryAll';\nimport { getAddEventListenerMetadata } from './addEventListener';\nimport { getLifecycleMetadata, ON_BEFORE_CONNECTED_METADATA_KEY, ON_AFTER_CONNECTED_METADATA_KEY, ON_BEFORE_DISCONNECTED_METADATA_KEY, ON_AFTER_DISCONNECTED_METADATA_KEY, ON_BEFORE_ADOPTED_METADATA_KEY, ON_AFTER_ADOPTED_METADATA_KEY, ON_ADD_EVENT_LISTENER_METADATA_KEY, ON_ATTRIBUTE_CHANGED_METADATA_KEY, ATTRIBUTE_CHANGED_WILDCARD, getMutationSubscribeMetadataList } from './lifecycles';\nimport { getAttributeMetadataList } from './attribute';\nimport { getStateMetadataList } from './state';\nimport { getEmitCustomEventMetadataList } from './emitCustomEvent';\nimport { SwcUtils, SWC_NOT_FOUND } from '../utils/Utils';\nimport { HTML_TAG_ENTRIES } from '../config/config';\nimport {getInject, SituationTypeContainer, SituationTypeContainers} from '@dooboostore/simple-boot/decorators/inject/Inject';\nimport { InjectSituationType, HostSet } from '../elements/SwcInterfaces';\nimport { ConstructorType } from '@dooboostore/core/types';\n\nexport interface ElementConfig {\n name: string;\n extends?: string;\n observedAttributes?: string[];\n customElementRegistry?: CustomElementRegistry;\n autoRemoveEventListeners?: boolean;\n window?: Window;\n}\n\nexport const ELEMENT_CONFIG_KEY = Symbol('simple-web-component:element-config');\nexport const STATE_CHANGE_EVENT = 'swc:state-change';\n\n// --- \uD658\uACBD \uCD08\uAE30\uD654 \uD5EC\uD37C ---\n\nfunction buildEnv(configWindow?: Window) {\n const win: any = configWindow || (typeof window !== 'undefined' ? window : undefined);\n const doc: Document = win?.document;\n\n const builtInTagMap = new Map<any, string>();\n for (const [cls, tag] of HTML_TAG_ENTRIES) {\n if (win?.[cls]) builtInTagMap.set(win[cls], tag);\n }\n\n const domHelpers = {\n $d: doc,\n $w: win,\n $q: (sel: string, root?: Element | Document | ShadowRoot) => (root ?? doc).querySelector(sel),\n $qa: (sel: string, root?: Element | Document | ShadowRoot) => Array.from((root ?? doc).querySelectorAll(sel)),\n $qi: (id: string, root?: Document | ShadowRoot) => (root ?? doc).getElementById(id)\n } as const;\n\n return { win, doc, builtInTagMap, domHelpers };\n}\n\nexport const elementDefine =\n (inConfig: ElementConfig | string): ClassDecorator =>\n (constructor: any) => {\n const config: ElementConfig = typeof inConfig === 'string' ? { name: inConfig } : inConfig;\n const { win, doc, builtInTagMap: BUILT_IN_TAG_MAP, domHelpers: SWC_DOM_HELPERS } = buildEnv(config.window);\n config.window = win;\n const SWC_DOM_HELPER_KEYS = Object.keys(SWC_DOM_HELPERS) as (keyof typeof SWC_DOM_HELPERS)[];\n const SWC_DOM_HELPER_VALS = () => SWC_DOM_HELPER_KEYS.map(k => (SWC_DOM_HELPERS as any)[k]);\n\n let extendsTagName = config.extends;\n if (!extendsTagName) {\n let proto = constructor;\n while (proto && proto !== HTMLElement && proto !== Function.prototype) {\n extendsTagName = BUILT_IN_TAG_MAP.get(proto);\n if (extendsTagName) break;\n proto = Object.getPrototypeOf(proto);\n }\n config.extends = extendsTagName;\n }\n\n const attributePropsList = getAttributeMetadataList(constructor);\n const emitCustomEventList = getEmitCustomEventMetadataList(constructor);\n const stateList = getStateMetadataList(constructor);\n const observedFromProps = attributePropsList ? attributePropsList.map(it => it.options.name!) : [];\n const observedFromEmits = emitCustomEventList ? emitCustomEventList.map(it => it.options.attributeName!) : [];\n const swcLifecycleAttributes = ['swc-on-constructor', 'swc-on-before-connected', 'swc-on-after-connected', 'swc-on-before-disconnected', 'swc-on-after-disconnected', 'swc-on-before-adopted', 'swc-on-after-adopted', 'swc-on-attribute-changed'];\n const mergedObservedAttributes = [...new Set([...(config.observedAttributes ?? []), ...observedFromProps, ...observedFromEmits, ...swcLifecycleAttributes])];\n\n const NewClass = class extends (constructor as any) {\n private _swcId = Math.random().toString(36).substring(2, 11);\n private _observer: MutationObserver | null = null;\n private _shadowObserver: MutationObserver | null = null;\n private _boundElements = new WeakMap<Element, Set<string | symbol>>();\n private _activeListeners: Array<{ el: Element | HTMLElement; type: string; handler: EventListener; options?: any }> = [];\n private _emitHandlers = new Map<string, EventListener>();\n private _stateBindings = new Map<string, any[]>();\n private _internalStates = new Map<string | symbol, any>();\n private _externalSources = new Map<string, HTMLElement>();\n\n _getHostContext(): Record<string, any> {\n const ctx: Record<string, any> = {};\n if (stateList) {\n stateList.forEach(meta => {\n const name = meta.options.name!;\n const val = this._internalStates.get(meta.propertyKey);\n ctx[name] = val;\n });\n }\n if (attributePropsList) {\n attributePropsList.forEach(meta => {\n const name = meta.options.name!;\n const val = this._internalStates.get(meta.propertyKey);\n ctx[name] = val;\n });\n }\n const hostVal = (this as any).value !== undefined ? (this as any).value : this;\n ctx['value'] = hostVal;\n const alias = this.getAttribute('as');\n if (alias && alias !== 'value') ctx[alias] = hostVal;\n return ctx;\n }\n\n static get observedAttributes() {\n return mergedObservedAttributes;\n }\n\n private _executeSwcScript(attrName: string, hostSet: HostSet, extraArgs: Record<string, any> = {}) {\n const script = this.getAttribute(attrName);\n if (script) {\n try {\n const args = { ...hostSet, ...SWC_DOM_HELPERS, ...extraArgs };\n const argNames = Object.keys(args);\n const argValues = Object.values(args);\n new Function(...argNames, script).apply(this, argValues);\n } catch (e) {\n console.error(`[SWC] Failed to execute ${attrName} script:`, e);\n }\n }\n }\n\n private async _invokeLifecycleMethod(methodName: string | symbol, hostSet: HostSet, extraArgs: any[] = []) {\n if (typeof (this as any)[methodName] !== 'function') return;\n const app = hostSet.$appHost?.simpleApplication;\n\n if (app) {\n const otherStorage = new Map<any, any>();\n const situations = new SituationTypeContainers([new SituationTypeContainer({ situationType: InjectSituationType.HOST_SET, data: hostSet }), new SituationTypeContainer({ situationType: InjectSituationType.APP_HOST, data: hostSet.$appHost }), new SituationTypeContainer({ situationType: InjectSituationType.APP_HOSTS, data: hostSet.$appHosts }), new SituationTypeContainer({ situationType: InjectSituationType.HOST, data: hostSet.$host }), new SituationTypeContainer({ situationType: InjectSituationType.HOSTS, data: hostSet.$hosts }), new SituationTypeContainer({ situationType: InjectSituationType.FIRST_HOST, data: hostSet.$firstHost }), new SituationTypeContainer({ situationType: InjectSituationType.LAST_HOST, data: hostSet.$lastHost }), new SituationTypeContainer({ situationType: InjectSituationType.FIRST_APP_HOST, data: hostSet.$firstAppHost }), new SituationTypeContainer({ situationType: InjectSituationType.LAST_APP_HOST, data: hostSet.$lastAppHost })]);\n otherStorage.set(SituationTypeContainers, situations);\n\n return app.simstanceManager.executeBindParameterSimPromise(\n {\n target: this,\n targetKey: methodName,\n inputParameters: extraArgs\n },\n otherStorage\n );\n } else {\n return (this as any)[methodName](hostSet,...extraArgs);\n }\n }\n\n constructor(...args: any[]) {\n super(...args);\n const hostSet = SwcUtils.getHostSet(this as any);\n this._executeSwcScript('swc-on-constructor', hostSet);\n\n if (stateList) {\n stateList.forEach(meta => {\n const key = meta.propertyKey;\n const stateName = meta.options.name!;\n const initialVal = (this as any)[key];\n this._internalStates.set(\n key,\n SwcUtils.createReactiveProxy(initialVal, () => this._updateState(stateName))\n );\n Object.defineProperty(this, key, {\n get: () => this._internalStates.get(key),\n set: newVal => {\n if (this._internalStates.get(key) === newVal) return;\n this._internalStates.set(\n key,\n SwcUtils.createReactiveProxy(newVal, () => this._updateState(stateName))\n );\n this._updateState(stateName);\n },\n enumerable: true,\n configurable: true\n });\n });\n }\n if (attributePropsList) {\n attributePropsList.forEach(meta => {\n const key = meta.propertyKey;\n const attrName = meta.options.name!;\n const attrValue = this.getAttribute(attrName);\n let initialVal = attrValue !== null ? attrValue : (this as any)[key];\n if (initialVal === undefined) initialVal = null;\n if (attrValue !== null) {\n if (meta.options.type === Number) initialVal = Number(attrValue);\n else if (meta.options.type === Boolean) initialVal = true;\n else if (meta.options.type === Object) {\n try {\n initialVal = JSON.parse(attrValue);\n } catch (e) {}\n }\n }\n this._internalStates.set(key, initialVal);\n Object.defineProperty(this, key, {\n get: () => this._internalStates.get(key),\n set: newVal => {\n if (this._internalStates.get(key) === newVal) return;\n this._internalStates.set(key, newVal);\n if (typeof (this as any)._updateState === 'function') (this as any)._updateState(attrName);\n if (!meta.options.disableReflect && this.setAttribute && typeof newVal !== 'object') {\n if (newVal === null || newVal === undefined || newVal === false) this.removeAttribute(attrName);\n else this.setAttribute(attrName, String(newVal));\n }\n },\n enumerable: true,\n configurable: true\n });\n });\n }\n const innerHtmlList = getInnerHtmlMetadataList(this);\n if (innerHtmlList?.some(it => it.options.useShadow === true) && !this.shadowRoot) {\n this.attachShadow({ mode: 'open' });\n }\n }\n\n private _isSyncing = false;\n private _syncDecorators() {\n if (this._isSyncing) return;\n this._isSyncing = true;\n try {\n this._buildStateMap();\n this._syncEventListenersAndQueries();\n } finally {\n this._isSyncing = false;\n }\n }\n\n private _syncEventListenersAndQueries() {\n const getSearchRoots = (rootOption?: string): Node[] => {\n const roots: Node[] = [];\n if (rootOption === 'shadow') {\n if (this.shadowRoot) roots.push(this.shadowRoot);\n } else if (rootOption === 'light') {\n roots.push(this as any as Node);\n } else if (rootOption === 'all') {\n if (this.shadowRoot) roots.push(this.shadowRoot);\n roots.push(this as any as Node);\n } else {\n roots.push(this.shadowRoot || (this as any as Node));\n }\n return roots;\n };\n const queryMetadata = getQueryMetadata(this);\n if (queryMetadata) {\n queryMetadata\n .filter(it => it.isMethod)\n .forEach(it => {\n const searchRoots = getSearchRoots(it.options.root);\n let foundEl: Element | null = null;\n for (const root of searchRoots) {\n foundEl = it.selector ? (root as HTMLElement).querySelector(it.selector) : (this as any as Element);\n if (foundEl) break;\n }\n if (foundEl) {\n let bound = this._boundElements.get(foundEl);\n if (!bound) {\n bound = new Set();\n this._boundElements.set(foundEl, bound);\n }\n if (!bound.has(it.propertyKey)) {\n (this as any)[it.propertyKey](foundEl);\n bound.add(it.propertyKey);\n }\n }\n });\n }\n const queryAllMetadata = getQueryAllMetadata(this);\n if (queryAllMetadata) {\n queryAllMetadata\n .filter(it => it.isMethod)\n .forEach(it => {\n const searchRoots = getSearchRoots(it.options.root);\n const allElements: Element[] = [];\n searchRoots.forEach(root => {\n const found = it.selector ? (root as HTMLElement).querySelectorAll(it.selector) : [this as any as Element];\n allElements.push(...Array.from(found));\n });\n (this as any)[it.propertyKey](allElements);\n });\n }\n const eventListeners = getAddEventListenerMetadata(this);\n if (eventListeners) {\n eventListeners.forEach(it => {\n const { query, type, root: rootOption, ...options } = it.options;\n const searchRoots = getSearchRoots(rootOption);\n searchRoots.forEach(root => {\n const targetElements = query ? (root as HTMLElement).querySelectorAll(query) : [this as any as Element];\n targetElements.forEach(targetElement => {\n if (targetElement) {\n let bound = this._boundElements.get(targetElement);\n if (!bound) {\n bound = new Set();\n this._boundElements.set(targetElement, bound);\n }\n const eventKey = `event:${String(it.propertyKey)}:${type}`;\n if (!bound.has(eventKey)) {\n const handler = (event: any) => {\n if (it.options.stopImmediatePropagation) event.stopImmediatePropagation();\n if (it.options.stopPropagation) event.stopPropagation();\n if (it.options.preventDefault) event.preventDefault();\n (this as any)[it.propertyKey](event, targetElement);\n };\n targetElement.addEventListener(type, handler, options);\n bound.add(eventKey);\n if (config.autoRemoveEventListeners) this._activeListeners.push({ el: targetElement, type, handler, options });\n const addEventMethods = getLifecycleMetadata(this, ON_ADD_EVENT_LISTENER_METADATA_KEY);\n addEventMethods?.forEach((m: string | symbol) => {\n if (typeof (this as any)[m] === 'function') (this as any)[m](targetElement, type, handler);\n });\n }\n }\n });\n });\n });\n }\n }\n\n private _buildStateMap() {\n const scan = (root: Node) => {\n const walker = doc.createTreeWalker(root, (win as any).NodeFilter.SHOW_ELEMENT | (win as any).NodeFilter.SHOW_TEXT);\n let node: Node | null = null;\n while ((node = walker.nextNode())) {\n if (node.nodeType === Node.TEXT_NODE) this._parseAndBind(node, 'text');\n else if (node.nodeType === Node.ELEMENT_NODE) {\n const el = node as HTMLElement;\n const alias = el.getAttribute('as');\n if (alias && !this._externalSources.has(alias)) {\n this._externalSources.set(alias, el);\n const aliasKey = `alias-event:${alias}`;\n let bound = this._boundElements.get(el);\n if (!bound) {\n bound = new Set();\n this._boundElements.set(el, bound);\n }\n if (!bound.has(aliasKey)) {\n el.addEventListener(STATE_CHANGE_EVENT, () => this._updateState(alias));\n bound.add(aliasKey);\n }\n }\n const $hosts = SwcUtils.findAllSwcHosts(el);\n $hosts.forEach(host => {\n const hAlias = host.getAttribute('as');\n if (hAlias) {\n const hostBindKey = `parent-host-event:${hAlias}`;\n let hBound = this._boundElements.get(host);\n if (!hBound) {\n hBound = new Set();\n this._boundElements.set(host, hBound);\n }\n if (!hBound.has(hostBindKey)) {\n host.addEventListener(STATE_CHANGE_EVENT, () => this._updateState(hAlias));\n hBound.add(hostBindKey);\n }\n }\n });\n Array.from(el.attributes).forEach(attr => {\n if (attr.name.startsWith('swc-on-') && !swcLifecycleAttributes.includes(attr.name)) {\n const eventName = attr.name.substring(7);\n const script = attr.value;\n const hostSet = SwcUtils.getHostSet(el);\n if (eventName === 'connected') {\n const eventKey = `attr-once:${attr.name}`;\n let bound = this._boundElements.get(el);\n if (!bound) {\n bound = new Set();\n this._boundElements.set(el, bound);\n }\n if (!bound.has(eventKey)) {\n if (script) {\n try {\n const argNames = Object.keys(hostSet);\n const argValues = Object.values(hostSet);\n new Function('event', '$data', ...argNames, ...SWC_DOM_HELPER_KEYS, script).call(el, null, null, ...argValues, ...SWC_DOM_HELPER_VALS());\n } catch (e) {\n console.error(`[SWC] Failed to execute ${attr.name} script:`, e);\n }\n }\n bound.add(eventKey);\n }\n return;\n }\n const eventKey = `attr-event:${attr.name}`;\n let bound = this._boundElements.get(el);\n if (!bound) {\n bound = new Set();\n this._boundElements.set(el, bound);\n }\n if (!bound.has(eventKey)) {\n const handler = (event: any) => {\n if (script) {\n try {\n const argNames = Object.keys(hostSet);\n const argValues = Object.values(hostSet);\n new Function('event', '$data', ...argNames, ...SWC_DOM_HELPER_KEYS, script).call(el, event, (event as CustomEvent).detail, ...argValues, ...SWC_DOM_HELPER_VALS());\n } catch (e) {\n console.error(`[SWC] Failed to execute ${attr.name} script:`, e);\n }\n }\n };\n el.addEventListener(eventName, handler);\n bound.add(eventKey);\n if (config.autoRemoveEventListeners) this._activeListeners.push({ el, type: eventName, handler });\n }\n }\n this._parseAndBind(attr, 'attribute', el);\n });\n const isSwcChild = (el as any)._swcId || getElementConfig(el.constructor) || (el.getAttribute('is')?.startsWith('swc-') ?? false);\n if (isSwcChild) {\n const next = walker.nextSibling();\n if (!next) break;\n node = next;\n if (node.nodeType === Node.TEXT_NODE) this._parseAndBind(node, 'text');\n }\n }\n }\n };\n if (this.shadowRoot) scan(this.shadowRoot);\n scan(this as any as Node);\n }\n\n private _parseAndBind(node: Node | Attr, type: 'text' | 'attribute', owner?: HTMLElement) {\n const tplKey = `__swc_original_${this._swcId}`;\n const isAlreadyBound = (node as any).__swc_bound_ids?.has(this._swcId);\n const content = (node as any)[tplKey] || node.textContent || '';\n const matches = Array.from(content.matchAll(/{{(.*?)}}/g)) as any[];\n if (matches.length === 0 || isAlreadyBound) return;\n matches.forEach(match => {\n const fullPath = (match[1] as string).trim();\n const rootName = fullPath.split('.')[0];\n const isState = stateList?.some(s => s.options.name === rootName);\n const isAttr = attributePropsList?.some(a => a.options.name === rootName);\n const isLogicKey = (this as any)._asKey === rootName || (this as any)._asItemKey === rootName || (this as any)._asIndexKey === rootName;\n const isExternal = this._externalSources.has(rootName);\n const isSelfAlias = this.getAttribute('as') === rootName;\n const isInstanceProp = rootName in this;\n let isParentAlias = false;\n let curr: any = (this as any).parentElement || ((this as any).getRootNode?.() as any)?.host;\n while (curr) {\n if (curr.getAttribute?.('as') === rootName) {\n isParentAlias = true;\n break;\n }\n curr = curr.parentElement || (curr.getRootNode?.() as any)?.host;\n }\n if (!isState && !isAttr && !isLogicKey && !isExternal && !isSelfAlias && !isInstanceProp && !isParentAlias) return;\n if (!this._stateBindings.has(rootName)) this._stateBindings.set(rootName, []);\n if (!(node as any)[tplKey]) (node as any)[tplKey] = content;\n if (!(node as any).__swc_bound_ids) (node as any).__swc_bound_ids = new Set();\n (node as any).__swc_bound_ids.add(this._swcId);\n this._stateBindings.get(rootName)!.push({ node, type, owner, path: fullPath });\n this._updateState(rootName);\n });\n }\n\n private _isUpdatingState = false;\n private _updateState(stateName: string) {\n if (!this._stateBindings) return;\n if (this._isUpdatingState) return;\n this._isUpdatingState = true;\n try {\n this._executeBindingUpdate(stateName);\n const selfAlias = this.getAttribute('as');\n if (selfAlias && selfAlias !== stateName) this._executeBindingUpdate(selfAlias);\n this.dispatchEvent(new CustomEvent(STATE_CHANGE_EVENT, { bubbles: true, composed: true, detail: { source: stateName, host: this } }));\n } finally {\n this._isUpdatingState = false;\n }\n }\n\n private _executeBindingUpdate(stateName: string) {\n const bindings = this._stateBindings.get(stateName);\n if (!bindings) return;\n const tplKey = `__swc_original_${this._swcId}`;\n bindings.forEach(bin => {\n let text = (bin.node as any)[tplKey];\n if (!text) return;\n const matches = Array.from(text.matchAll(/{{(.*?)}}/g)) as RegExpMatchArray[];\n let updatedText = text;\n for (const match of matches) {\n const path = match[1].trim();\n const root = path.split('.')[0];\n let val: any = undefined;\n let current: HTMLElement | null = this as any as HTMLElement;\n while (current) {\n const currentNewClass = current as any;\n if (current.getAttribute('as') === root) {\n val = SwcUtils.getValueByPath(current, path.split('.').slice(1).join('.') || 'value', 'value');\n if (val !== SWC_NOT_FOUND) break;\n }\n const externalSource = currentNewClass._externalSources?.get(root);\n if (externalSource) {\n val = SwcUtils.getValueByPath(externalSource, path.split('.').slice(1).join('.') || 'value', 'value');\n if (val !== SWC_NOT_FOUND) break;\n }\n const cStates = getStateMetadataList(current.constructor);\n const cAttrs = getAttributeMetadataList(current.constructor);\n const sMeta = cStates?.find(s => s.options.name === root);\n const aMeta = cAttrs?.find(a => a.options.name === root);\n if (sMeta || aMeta) {\n const propKey = sMeta ? String(sMeta.propertyKey) : String(aMeta!.propertyKey);\n const rootVal = (current as any)[propKey];\n const subPath = path.split('.').slice(1).join('.');\n if (subPath) {\n val = SwcUtils.getValueByPath(rootVal, subPath, subPath.split('.')[0]);\n if (val === SWC_NOT_FOUND) {\n const parts = subPath.split('.');\n let cur = rootVal;\n for (const p of parts) {\n if (cur === null || cur === undefined) {\n cur = SWC_NOT_FOUND;\n break;\n }\n cur = cur[p];\n }\n if (cur !== undefined && cur !== SWC_NOT_FOUND) val = cur;\n }\n } else {\n val = rootVal;\n }\n if (val !== SWC_NOT_FOUND && val !== undefined) break;\n }\n if (root in current) {\n val = SwcUtils.getValueByPath(current, path, root);\n if (val !== SWC_NOT_FOUND) break;\n }\n current = current.parentElement || (current.getRootNode() as any).host;\n }\n if (val !== SWC_NOT_FOUND && val !== undefined) {\n const strVal = val === null ? '' : typeof val === 'object' ? JSON.stringify(val) : String(val);\n updatedText = updatedText.replace(match[0], strVal);\n if (bin.type === 'attribute' && bin.owner) {\n const attrName = (bin.node as Attr).name;\n const ownerAttrs = getAttributeMetadataList(bin.owner.constructor);\n const attrMeta = ownerAttrs?.find(a => a.options.name === attrName);\n const propName = attrMeta ? String(attrMeta.propertyKey) : attrName.replace(/-([a-z])/g, g => g[1].toUpperCase());\n if (val === null || val === undefined) {\n bin.owner.removeAttribute(attrName);\n if (propName in bin.owner) (bin.owner as any)[propName] = val;\n } else {\n if (propName in bin.owner) (bin.owner as any)[propName] = val;\n bin.owner.setAttribute(attrName, updatedText);\n if ((attrName === 'value' || attrName === 'checked') && bin.owner.tagName.match(/INPUT|TEXTAREA|SELECT/)) {\n (bin.owner as any)[attrName] = updatedText;\n }\n }\n }\n }\n }\n if (bin.type === 'text') bin.node.textContent = updatedText;\n });\n }\n\n disconnectedCallback() {\n const hostSet = SwcUtils.getHostSet(this as any);\n this._executeSwcScript('swc-on-before-disconnected', hostSet);\n const bMethods = getLifecycleMetadata<(string | symbol)[]>(this, ON_BEFORE_DISCONNECTED_METADATA_KEY);\n bMethods?.forEach(m => this._invokeLifecycleMethod(m, hostSet));\n if (this._observer) this._observer.disconnect();\n if (this._shadowObserver) this._shadowObserver.disconnect();\n if (config.autoRemoveEventListeners) {\n this._activeListeners.forEach(({ el, type, handler, options }) => el.removeEventListener(type, handler, options));\n this._activeListeners = [];\n }\n if (super.disconnectedCallback) super.disconnectedCallback();\n const aMethods = getLifecycleMetadata<(string | symbol)[]>(this, ON_AFTER_DISCONNECTED_METADATA_KEY);\n aMethods?.forEach(m => this._invokeLifecycleMethod(m, hostSet));\n this._executeSwcScript('swc-on-after-disconnected', hostSet);\n }\n\n adoptedCallback() {\n const hostSet = SwcUtils.getHostSet(this as any);\n this._executeSwcScript('swc-on-before-adopted', hostSet);\n const bMethods = getLifecycleMetadata<(string | symbol)[]>(this, ON_BEFORE_ADOPTED_METADATA_KEY);\n bMethods?.forEach(m => this._invokeLifecycleMethod(m, hostSet));\n if (super.adoptedCallback) super.adoptedCallback();\n const aMethods = getLifecycleMetadata<(string | symbol)[]>(this, ON_AFTER_ADOPTED_METADATA_KEY);\n aMethods?.forEach(m => this._invokeLifecycleMethod(m, hostSet));\n this._executeSwcScript('swc-on-after-adopted', hostSet);\n }\n\n async connectedCallback() {\n // await new Promise(resolve => setTimeout(resolve, 0));\n const hostSet = SwcUtils.getHostSet(this as any);\n this._executeSwcScript('swc-on-before-connected', hostSet);\n const bMethods = getLifecycleMetadata<(string | symbol)[]>(this, ON_BEFORE_CONNECTED_METADATA_KEY);\n if (bMethods) {\n for (const m of bMethods) {\n await this._invokeLifecycleMethod(m, hostSet);\n }\n }\n if (typeof (this as any).initCore === 'function') (this as any).initCore();\n const iHtmlList = getInnerHtmlMetadataList(this);\n let sContent = '';\n let lContent = '';\n if (iHtmlList) {\n for (const meta of iHtmlList) {\n const result = await (this as any)[meta.propertyKey]();\n if (result !== undefined) {\n if (meta.options.useShadow === true) sContent += result;\n else lContent += result;\n }\n }\n }\n if (this.shadowRoot) this.shadowRoot.innerHTML = sContent;\n if (lContent) this.innerHTML = lContent;\n (this as any)._syncDecorators();\n\n // --- Root Host self-binding logic ---\n const isManagedByParent = !!SwcUtils.findNearestSwcHost(this as any);\n if (!isManagedByParent) {\n Array.from(this.attributes as any).forEach((attr: any) => {\n if (attr.name.startsWith('swc-on-') && !swcLifecycleAttributes.includes(attr.name)) {\n const eventName = attr.name.substring(7);\n const script = attr.value;\n if (eventName === 'connected') {\n const eventKey = `host-attr-once:${attr.name}`;\n let bound = this._boundElements.get(this as any);\n if (!bound) {\n bound = new Set();\n this._boundElements.set(this as any, bound);\n }\n if (!bound.has(eventKey)) {\n if (script) {\n try {\n const argNames = Object.keys(hostSet);\n const argValues = Object.values(hostSet);\n new Function('event', '$data', ...argNames, ...SWC_DOM_HELPER_KEYS, script).call(this, null, null, ...argValues, ...SWC_DOM_HELPER_VALS());\n } catch (e) {\n console.error(`[SWC] Failed to execute ${attr.name} script:`, e);\n }\n }\n bound.add(eventKey);\n }\n return;\n }\n const eventKey = `host-attr-event:${attr.name}`;\n let bound = this._boundElements.get(this as any);\n if (!bound) {\n bound = new Set();\n this._boundElements.set(this as any, bound);\n }\n if (!bound.has(eventKey)) {\n const handler = (event: any) => {\n if (script) {\n try {\n const argNames = Object.keys(hostSet);\n const argValues = Object.values(hostSet);\n new Function('event', '$data', ...argNames, ...SWC_DOM_HELPER_KEYS, script).call(this, event, (event as CustomEvent).detail, ...argValues, ...SWC_DOM_HELPER_VALS());\n } catch (e) {\n console.error(`[SWC] Failed to execute ${attr.name} script:`, e);\n }\n }\n };\n this.addEventListener(eventName, handler);\n bound.add(eventKey);\n if (config.autoRemoveEventListeners) this._activeListeners.push({ el: this as any, type: eventName, handler });\n }\n }\n });\n }\n\n const mutationMetaList = getMutationSubscribeMetadataList(this);\n const fireMutationCallbacks = (mutationList: MutationRecord[], observer: MutationObserver, root: 'light' | 'shadow') => {\n mutationMetaList?.forEach(meta => {\n const r = meta.options.root ?? 'auto';\n const matches = r === 'all' || r === root || (r === 'auto' && (this.shadowRoot ? root === 'shadow' : root === 'light'));\n if (matches && typeof (this as any)[meta.propertyKey] === 'function') {\n (this as any)[meta.propertyKey](mutationList, observer, root);\n }\n });\n };\n this._observer = new (win as any).MutationObserver((mutationList: MutationRecord[], observer: MutationObserver) => {\n (this as any)._syncDecorators();\n fireMutationCallbacks(mutationList, observer, 'light');\n });\n // @ts-ignore\n this._observer.observe(this as any, { childList: true, subtree: true });\n if (this.shadowRoot) {\n this._shadowObserver = new (win as any).MutationObserver((mutationList: MutationRecord[], observer: MutationObserver) => {\n (this as any)._syncDecorators();\n fireMutationCallbacks(mutationList, observer, 'shadow');\n });\n // @ts-ignore\n this._shadowObserver.observe(this.shadowRoot, { childList: true, subtree: true });\n }\n if (super.connectedCallback) await super.connectedCallback();\n const aMethods = getLifecycleMetadata<(string | symbol)[]>(this, ON_AFTER_CONNECTED_METADATA_KEY);\n if (aMethods) {\n for (const m of aMethods) {\n await this._invokeLifecycleMethod(m, hostSet);\n }\n }\n this._executeSwcScript('swc-on-after-connected', hostSet);\n }\n\n attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null) {\n if (super.attributeChangedCallback) super.attributeChangedCallback(name, oldValue, newValue);\n if (attributePropsList) {\n attributePropsList.forEach(meta => {\n if (meta.options.name === name) {\n const current = (this as any)[meta.propertyKey];\n if (typeof current === 'object' && current !== null) return;\n if (String(current) !== String(newValue)) (this as any)[meta.propertyKey] = newValue;\n }\n });\n }\n if (typeof (this as any)._updateState === 'function') (this as any)._updateState(name);\n const aMethodsMap = getLifecycleMetadata(constructor, ON_ATTRIBUTE_CHANGED_METADATA_KEY) as Map<string, (string | symbol)[]>;\n const mKeys = aMethodsMap?.get(name);\n const hostSet = SwcUtils.getHostSet(this as any);\n if (mKeys && Array.isArray(mKeys)) {\n mKeys.forEach(key => this._invokeLifecycleMethod(key, hostSet, [newValue, oldValue, name]));\n }\n if (emitCustomEventList) {\n const eMeta = emitCustomEventList.find(it => it.options.attributeName === name);\n if (eMeta) {\n const eType = eMeta.options.type;\n const oHandler = this._emitHandlers.get(eType);\n if (oHandler) this.removeEventListener(eType, oHandler);\n if (newValue) {\n const nHandler = (e: Event) => {\n new Function('event', '$data', newValue).call(this, e, (e as CustomEvent).detail);\n };\n this.addEventListener(eType, nHandler);\n this._emitHandlers.set(eType, nHandler);\n }\n }\n }\n const wMethodsKeys = aMethodsMap?.get(ATTRIBUTE_CHANGED_WILDCARD);\n if (wMethodsKeys && Array.isArray(wMethodsKeys)) {\n wMethodsKeys.forEach(key => this._invokeLifecycleMethod(key, hostSet, [newValue, oldValue, name]));\n }\n this._executeSwcScript('swc-on-attribute-changed', hostSet, { $new: newValue, $old: oldValue, $name: name });\n }\n };\n\n // [METADATA INHERITANCE FIX]\n // Copy method metadata from original constructor to NewClass\n // This ensures @Inject and other decorators on methods work correctly in the wrapped class.\n const originalProto = constructor.prototype;\n const newProto = NewClass.prototype;\n Object.getOwnPropertyNames(originalProto).forEach(name => {\n if (name === 'constructor') return;\n const keys = Reflect.getMetadataKeys(originalProto, name);\n keys.forEach(key => {\n const metadata = Reflect.getMetadata(key, originalProto, name);\n Reflect.defineMetadata(key, metadata, newProto, name);\n });\n });\n\n ReflectUtils.defineMetadata(ELEMENT_CONFIG_KEY, config, NewClass);\n ReflectUtils.defineMetadata(ELEMENT_CONFIG_KEY, config, constructor);\n const registry = config.customElementRegistry || (typeof win !== 'undefined' ? win.customElements : undefined);\n if (registry && !registry.get(config.name)) {\n const options = config.extends ? { extends: config.extends } : undefined;\n registry.define(config.name, NewClass as any, options);\n }\n return NewClass as any;\n };\n\nexport const getElementConfig = (target: any): ElementConfig | undefined => {\n const constructor = target instanceof Function ? target : target.constructor;\n return ReflectUtils.getMetadata(ELEMENT_CONFIG_KEY, constructor);\n};\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAA6B;AAC7B,uBAAyC;AACzC,mBAAiC;AACjC,sBAAoC;AACpC,8BAA4C;AAC5C,wBAAqX;AACrX,uBAAyC;AACzC,mBAAqC;A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,WAAK,kBAAkB,4BAA4B,SAAS,EAAE,MAAM,UAAU,MAAM,UAAU,OAAO,KAAK,CAAC;AAAA,IAC7G;AAAA,EACF;AAKA,QAAM,gBAAgB,YAAY;AAClC,QAAM,WAAW,SAAS;AAC1B,SAAO,oBAAoB,aAAa,EAAE,QAAQ,UAAQ;AACxD,QAAI,SAAS,cAAe;AAC5B,UAAM,OAAO,QAAQ,gBAAgB,eAAe,IAAI;AACxD,SAAK,QAAQ,SAAO;AAClB,YAAM,WAAW,QAAQ,YAAY,KAAK,eAAe,IAAI;AAC7D,cAAQ,eAAe,KAAK,UAAU,UAAU,IAAI;AAAA,IACtD,CAAC;AAAA,EACH,CAAC;AAED,mCAAa,eAAe,oBAAoB,QAAQ,QAAQ;AAChE,mCAAa,eAAe,oBAAoB,QAAQ,WAAW;AACnE,QAAM,WAAW,OAAO,0BAA0B,OAAO,QAAQ,cAAc,IAAI,iBAAiB;AACpG,MAAI,YAAY,CAAC,SAAS,IAAI,OAAO,IAAI,GAAG;AAC1C,UAAM,UAAU,OAAO,UAAU,EAAE,SAAS,OAAO,QAAQ,IAAI;AAC/D,aAAS,OAAO,OAAO,MAAM,UAAiB,OAAO;AAAA,EACvD;AACA,SAAO;AACT;AAEK,MAAM,mBAAmB,CAAC,WAA2C;AAC1E,QAAM,cAAc,kBAAkB,WAAW,SAAS,OAAO;AACjE,SAAO,iCAAa,YAAY,oBAAoB,WAAW;AACjE;",
6
6
  "names": ["eventKey", "bound"]
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/elements/SwcInterfaces.ts"],
4
- "sourcesContent": ["import { SimpleApplication } from '@dooboostore/simple-boot/SimpleApplication';\nimport { ConstructorType, Optional } from '@dooboostore/core/types';\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 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}\nexport type HostSet = {\n $host: SwcHTMLElementInterface | null;\n $hosts: SwcHTMLElementInterface[];\n $firstHost: SwcHTMLElementInterface | null;\n $lastHost: SwcHTMLElementInterface | null;\n $appHost: SwcAppInterface | null;\n $appHosts: SwcAppInterface[];\n $firstAppHost: SwcAppInterface | null;\n $lastAppHost: SwcAppInterface | null;\n};\n\nexport interface SwcHTMLElementInterface extends HTMLElement {\n getAppHost(): SwcAppInterface | undefined;\n getAppHosts(): SwcAppInterface[];\n getFirstAppHost(): SwcAppInterface | undefined;\n getLastAppHost(): SwcAppInterface | undefined;\n getHosts(): SwcHTMLElementInterface[];\n getHost(): SwcHTMLElementInterface | undefined;\n getFirstHost(): SwcHTMLElementInterface | undefined;\n getLastHost(): SwcHTMLElementInterface | undefined;\n getHostSet(): HostSet;\n}\n\nexport type SwcConfigType = {\n rootRouter: ConstructorType<any>;\n routeType: 'path' | 'hash';\n path?: string;\n window: Window;\n};\n\nexport type SwcAttributeConfigType = Optional<SwcConfigType, 'routeType' | 'window'>;\n\nexport interface SwcAppInterface extends SwcHTMLElementInterface {\n simpleApplication?: SimpleApplication;\n routing(path: string): Promise<void>;\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEO,IAAK,sBAAL,kBAAKA,yBAAL;AACL,EAAAA,qBAAA,cAAW;AACX,EAAAA,qBAAA,cAAW;AACX,EAAAA,qBAAA,eAAY;AACZ,EAAAA,qBAAA,UAAO;AACP,EAAAA,qBAAA,WAAQ;AACR,EAAAA,qBAAA,gBAAa;AACb,EAAAA,qBAAA,eAAY;AACZ,EAAAA,qBAAA,oBAAiB;AACjB,EAAAA,qBAAA,mBAAgB;AATN,SAAAA;AAAA,GAAA;",
4
+ "sourcesContent": ["import { SimpleApplication } from '@dooboostore/simple-boot/SimpleApplication';\nimport { ConstructorType, Optional } from '@dooboostore/core/types';\nimport { Router } from '@dooboostore/core-web/routers/Router';\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 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 HostSet = {\n $host: SwcHTMLElementInterface | null;\n $hosts: SwcHTMLElementInterface[];\n $firstHost: SwcHTMLElementInterface | null;\n $lastHost: SwcHTMLElementInterface | null;\n $appHost: SwcAppInterface | null;\n $appHosts: SwcAppInterface[];\n $firstAppHost: SwcAppInterface | null;\n $lastAppHost: SwcAppInterface | null;\n};\n\nexport interface SwcHTMLElementInterface extends HTMLElement {\n getAppHost(): SwcAppInterface | undefined;\n getAppHosts(): SwcAppInterface[];\n getFirstAppHost(): SwcAppInterface | undefined;\n getLastAppHost(): SwcAppInterface | undefined;\n getHosts(): SwcHTMLElementInterface[];\n getHost(): SwcHTMLElementInterface | undefined;\n getFirstHost(): SwcHTMLElementInterface | undefined;\n getLastHost(): SwcHTMLElementInterface | undefined;\n getHostSet(): HostSet;\n}\n\nexport type SwcConfigType = {\n rootRouter: ConstructorType<any>;\n routeType: 'path' | 'hash' | 'element';\n path?: string;\n window: Window;\n};\n\nexport type SwcAttributeConfigType = Optional<SwcConfigType, 'routeType' | 'window'>;\n\nexport interface SwcAppInterface extends SwcHTMLElementInterface {\n simpleApplication?: SimpleApplication;\n router?: Router;\n routing(path: string): Promise<void>;\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIO,IAAK,sBAAL,kBAAKA,yBAAL;AACL,EAAAA,qBAAA,cAAW;AACX,EAAAA,qBAAA,cAAW;AACX,EAAAA,qBAAA,eAAY;AACZ,EAAAA,qBAAA,UAAO;AACP,EAAAA,qBAAA,WAAQ;AACR,EAAAA,qBAAA,gBAAa;AACb,EAAAA,qBAAA,eAAY;AACZ,EAAAA,qBAAA,oBAAiB;AACjB,EAAAA,qBAAA,mBAAgB;AATN,SAAAA;AAAA,GAAA;",
6
6
  "names": ["InjectSituationType"]
7
7
  }
@@ -25,6 +25,7 @@ var import_elementDefine = require("../../decorators/elementDefine");
25
25
  var import_SimpleApplication = require("@dooboostore/simple-boot/SimpleApplication");
26
26
  var import_PathRouter = require("@dooboostore/core-web/routers/PathRouter");
27
27
  var import_HashRouter = require("@dooboostore/core-web/routers/HashRouter");
28
+ var import_ElementRouter = require("../../router/ElementRouter");
28
29
  var import_SimOption = require("@dooboostore/simple-boot/SimOption");
29
30
  var import_Router = require("@dooboostore/core-web/routers/Router");
30
31
  var __decorate = function(decorators, target, key, desc) {
@@ -51,12 +52,18 @@ let SwcApp = class SwcApp2 extends import_base.SwcHTMLElementBase {
51
52
  const userConfig = new Function(`return ${applicationConfigStr}`).apply(this);
52
53
  if (userConfig) {
53
54
  const _config = {
54
- routeType: "path",
55
+ routeType: "element",
55
56
  window,
56
57
  ...userConfig
57
58
  };
58
- this._router = _config.routeType === "path" ? new import_PathRouter.PathRouter({ window: _config.window }) : new import_HashRouter.HashRouter({ window: _config.window });
59
- this.routerSubscription = this._router.observable.subscribe((route) => {
59
+ if (_config.routeType === "path") {
60
+ this.router = new import_PathRouter.PathRouter({ window: _config.window, firstUrl: _config.path });
61
+ } else if (_config.routeType === "hash") {
62
+ this.router = new import_HashRouter.HashRouter({ window: _config.window, firstUrl: _config.path });
63
+ } else {
64
+ this.router = new import_ElementRouter.ElementRouter({ window: _config.window, firstUrl: _config.path });
65
+ }
66
+ this.routerSubscription = this.router.observable.subscribe((route) => {
60
67
  if (route.triggerPoint === "end") {
61
68
  this.routingProcess(route.path);
62
69
  }
@@ -67,8 +74,8 @@ let SwcApp = class SwcApp2 extends import_base.SwcHTMLElementBase {
67
74
  });
68
75
  this.simpleApplication = new import_SimpleApplication.SimpleApplication(option);
69
76
  const otherInstanceSim = /* @__PURE__ */ new Map();
70
- if (this._router) {
71
- otherInstanceSim.set(import_Router.Router, this._router);
77
+ if (this.router) {
78
+ otherInstanceSim.set(import_Router.Router, this.router);
72
79
  }
73
80
  this.simpleApplication.run(otherInstanceSim);
74
81
  const data = this.simpleApplication.sim(_config.rootRouter);
@@ -80,7 +87,7 @@ let SwcApp = class SwcApp2 extends import_base.SwcHTMLElementBase {
80
87
  }
81
88
  }
82
89
  if (_config.path) {
83
- await this._router?.go(_config.path);
90
+ await this.router?.go(_config.path);
84
91
  }
85
92
  }
86
93
  } catch (e) {
@@ -92,7 +99,7 @@ let SwcApp = class SwcApp2 extends import_base.SwcHTMLElementBase {
92
99
  this.routerSubscription?.unsubscribe();
93
100
  }
94
101
  async routing(path) {
95
- await this._router?.go(path);
102
+ await this.router?.go(path);
96
103
  }
97
104
  async routingProcess(path) {
98
105
  await this.simpleApplication?.routing(path);
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/elements/apps/SwcApp.ts"],
4
- "sourcesContent": ["import { SwcHTMLElementBase } from '../base';\nimport { elementDefine } from '../../decorators/elementDefine';\nimport { SimpleApplication } from '@dooboostore/simple-boot/SimpleApplication';\nimport { SwcAppInterface, SwcConfigType, SwcAttributeConfigType } from '../SwcInterfaces';\nimport { PathRouter } from '@dooboostore/core-web/routers/PathRouter';\nimport { HashRouter } from '@dooboostore/core-web/routers/HashRouter';\nimport { SimOption } from '@dooboostore/simple-boot/SimOption';\nimport { ConstructorType } from '@dooboostore/core/types';\nimport { Router, RouterEventType } from '@dooboostore/core-web/routers/Router';\nimport { Subscription } from '@dooboostore/core/message/Subscription';\n\n@elementDefine({ name: 'swc-app', extends: undefined })\nexport class SwcApp extends SwcHTMLElementBase implements SwcAppInterface {\n public simpleApplication?: SimpleApplication;\n protected _router?: PathRouter | HashRouter;\n private routerSubscription?: Subscription;\n\n constructor() {\n super();\n }\n\n async connectedCallback() {\n if (this._isInitialized) return;\n this._isInitialized = true;\n\n // Push to the end of the event loop to ensure global scripts are evaluated\n await new Promise(resolve => setTimeout(resolve, 0));\n\n const applicationConfigStr = this.getAttribute('swc-get-application-config');\n if (applicationConfigStr) {\n try {\n const userConfig: SwcAttributeConfigType = new Function(`return ${applicationConfigStr}`).apply(this);\n if (userConfig) {\n const _config = {\n routeType: 'path',\n window: window,\n ...userConfig\n };\n\n this._router = _config.routeType === 'path' ? new PathRouter({ window: _config.window }) : new HashRouter({ window: _config.window });\n this.routerSubscription = this._router.observable.subscribe((route: RouterEventType) => {\n if (route.triggerPoint === 'end') {\n this.routingProcess(route.path);\n }\n });\n const option = new SimOption({\n excludeProxys: [Node],\n rootRouter: _config.rootRouter\n });\n\n this.simpleApplication = new SimpleApplication(option);\n\n // Use 'any' key for Map to allow Abstract classes like Router\n const otherInstanceSim = new Map<any, any>();\n if (this._router) {\n otherInstanceSim.set(Router, this._router);\n }\n this.simpleApplication.run(otherInstanceSim);\n const data = this.simpleApplication.sim(_config.rootRouter);\n if (data instanceof Node) {\n if (this.shadowRoot) {\n this.shadowRoot.replaceChildren(data);\n } else if (!this.contains(data)) {\n this.replaceChildren(data);\n }\n }\n if (_config.path) {\n await this._router?.go(_config.path);\n }\n }\n } catch (e) {\n console.error('[SWC-APP] Failed to execute swc-get-application-config script:', e);\n }\n }\n }\n\n disconnectedCallback() {\n this.routerSubscription?.unsubscribe();\n }\n\n async routing(path: string) {\n await this._router?.go(path);\n }\n\n private async routingProcess(path: string) {\n await this.simpleApplication?.routing(path);\n }\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;AAAA,kBAAmC;AACnC,2BAA8B;AAC9B,+BAAkC;AAElC,wBAA2B;AAC3B,wBAA2B;AAC3B,uBAA0B;AAE1B,oBAAwC;;;;;;;;;;AAIjC,IAAM,SAAN,MAAMA,gBAAe,+BAAkB;EAK5C,cAAA;AACE,UAAK;EACP;EAEA,MAAM,oBAAiB;AACrB,QAAI,KAAK;AAAgB;AACzB,SAAK,iBAAiB;AAGtB,UAAM,IAAI,QAAQ,aAAW,WAAW,SAAS,CAAC,CAAC;AAEnD,UAAM,uBAAuB,KAAK,aAAa,4BAA4B;AAC3E,QAAI,sBAAsB;AACxB,UAAI;AACF,cAAM,aAAqC,IAAI,SAAS,UAAU,oBAAoB,EAAE,EAAE,MAAM,IAAI;AACpG,YAAI,YAAY;AACd,gBAAM,UAAU;YACd,WAAW;YACX;YACA,GAAG;;AAGL,eAAK,UAAU,QAAQ,cAAc,SAAS,IAAI,6BAAW,EAAE,QAAQ,QAAQ,OAAM,CAAE,IAAI,IAAI,6BAAW,EAAE,QAAQ,QAAQ,OAAM,CAAE;AACpI,eAAK,qBAAqB,KAAK,QAAQ,WAAW,UAAU,CAAC,UAA0B;AACrF,gBAAI,MAAM,iBAAiB,OAAO;AAChC,mBAAK,eAAe,MAAM,IAAI;YAChC;UACF,CAAC;AACD,gBAAM,SAAS,IAAI,2BAAU;YAC3B,eAAe,CAAC,IAAI;YACpB,YAAY,QAAQ;WACrB;AAED,eAAK,oBAAoB,IAAI,2CAAkB,MAAM;AAGrD,gBAAM,mBAAmB,oBAAI,IAAG;AAChC,cAAI,KAAK,SAAS;AAChB,6BAAiB,IAAI,sBAAQ,KAAK,OAAO;UAC3C;AACA,eAAK,kBAAkB,IAAI,gBAAgB;AAC3C,gBAAM,OAAO,KAAK,kBAAkB,IAAI,QAAQ,UAAU;AAC1D,cAAI,gBAAgB,MAAM;AACxB,gBAAI,KAAK,YAAY;AACnB,mBAAK,WAAW,gBAAgB,IAAI;YACtC,WAAW,CAAC,KAAK,SAAS,IAAI,GAAG;AAC/B,mBAAK,gBAAgB,IAAI;YAC3B;UACF;AACA,cAAI,QAAQ,MAAM;AAChB,kBAAM,KAAK,SAAS,GAAG,QAAQ,IAAI;UACrC;QACF;MACF,SAAS,GAAG;AACV,gBAAQ,MAAM,kEAAkE,CAAC;MACnF;IACF;EACF;EAEA,uBAAoB;AAClB,SAAK,oBAAoB,YAAW;EACtC;EAEA,MAAM,QAAQ,MAAY;AACxB,UAAM,KAAK,SAAS,GAAG,IAAI;EAC7B;EAEQ,MAAM,eAAe,MAAY;AACvC,UAAM,KAAK,mBAAmB,QAAQ,IAAI;EAC5C;;AA1EW,SAAM,WAAA;MADlB,oCAAc,EAAE,MAAM,WAAW,SAAS,OAAS,CAAE;;GACzC,MAAM;",
4
+ "sourcesContent": ["import { SwcHTMLElementBase } from '../base';\nimport { elementDefine } from '../../decorators/elementDefine';\nimport { SimpleApplication } from '@dooboostore/simple-boot/SimpleApplication';\nimport { SwcAppInterface, SwcConfigType, SwcAttributeConfigType } from '../SwcInterfaces';\nimport { PathRouter } from '@dooboostore/core-web/routers/PathRouter';\nimport { HashRouter } from '@dooboostore/core-web/routers/HashRouter';\nimport { ElementRouter } from '../../router/ElementRouter';\nimport { SimOption } from '@dooboostore/simple-boot/SimOption';\nimport { ConstructorType } from '@dooboostore/core/types';\nimport { Router, RouterEventType } from '@dooboostore/core-web/routers/Router';\nimport { Subscription } from '@dooboostore/core/message/Subscription';\n\n@elementDefine({ name: 'swc-app', extends: undefined })\nexport class SwcApp extends SwcHTMLElementBase implements SwcAppInterface {\n public simpleApplication?: SimpleApplication;\n public router?: Router;\n private routerSubscription?: Subscription;\n\n constructor() {\n super();\n }\n\n async connectedCallback() {\n if (this._isInitialized) return;\n this._isInitialized = true;\n\n // Push to the end of the event loop to ensure global scripts are evaluated\n await new Promise(resolve => setTimeout(resolve, 0));\n\n const applicationConfigStr = this.getAttribute('swc-get-application-config');\n if (applicationConfigStr) {\n try {\n const userConfig: SwcAttributeConfigType = new Function(`return ${applicationConfigStr}`).apply(this);\n if (userConfig) {\n const _config: SwcConfigType = {\n routeType: 'element',\n window: window,\n ...userConfig\n };\n\n if (_config.routeType === 'path') {\n this.router = new PathRouter({ window: _config.window, firstUrl: _config.path });\n } else if (_config.routeType === 'hash') {\n this.router = new HashRouter({ window: _config.window, firstUrl: _config.path });\n } else {\n this.router = new ElementRouter({ window: _config.window, firstUrl: _config.path });\n }\n\n this.routerSubscription = this.router.observable.subscribe((route: RouterEventType) => {\n if (route.triggerPoint === 'end') {\n this.routingProcess(route.path);\n }\n });\n const option = new SimOption({\n excludeProxys: [Node],\n rootRouter: _config.rootRouter\n });\n\n this.simpleApplication = new SimpleApplication(option);\n\n // Use 'any' key for Map to allow Abstract classes like Router\n const otherInstanceSim = new Map<any, any>();\n if (this.router) {\n otherInstanceSim.set(Router, this.router);\n }\n this.simpleApplication.run(otherInstanceSim);\n const data = this.simpleApplication.sim(_config.rootRouter);\n if (data instanceof Node) {\n if (this.shadowRoot) {\n this.shadowRoot.replaceChildren(data);\n } else if (!this.contains(data)) {\n this.replaceChildren(data);\n }\n }\n if (_config.path) {\n await this.router?.go(_config.path);\n }\n }\n } catch (e) {\n console.error('[SWC-APP] Failed to execute swc-get-application-config script:', e);\n }\n }\n }\n\n disconnectedCallback() {\n this.routerSubscription?.unsubscribe();\n }\n\n async routing(path: string) {\n await this.router?.go(path);\n }\n\n private async routingProcess(path: string) {\n await this.simpleApplication?.routing(path);\n }\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;AAAA,kBAAmC;AACnC,2BAA8B;AAC9B,+BAAkC;AAElC,wBAA2B;AAC3B,wBAA2B;AAC3B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,IAAI,QAAQ,UAAU;AAC1D,cAAI,gBAAgB,MAAM;AACxB,gBAAI,KAAK,YAAY;AACnB,mBAAK,WAAW,gBAAgB,IAAI;YACtC,WAAW,CAAC,KAAK,SAAS,IAAI,GAAG;AAC/B,mBAAK,gBAAgB,IAAI;YAC3B;UACF;AACA,cAAI,QAAQ,MAAM;AAChB,kBAAM,KAAK,QAAQ,GAAG,QAAQ,IAAI;UACpC;QACF;MACF,SAAS,GAAG;AACV,gBAAQ,MAAM,kEAAkE,CAAC;MACnF;IACF;EACF;EAEA,uBAAoB;AAClB,SAAK,oBAAoB,YAAW;EACtC;EAEA,MAAM,QAAQ,MAAY;AACxB,UAAM,KAAK,QAAQ,GAAG,IAAI;EAC5B;EAEQ,MAAM,eAAe,MAAY;AACvC,UAAM,KAAK,mBAAmB,QAAQ,IAAI;EAC5C;;AAjFW,SAAM,WAAA;MADlB,oCAAc,EAAE,MAAM,WAAW,SAAS,OAAS,CAAE;;GACzC,MAAM;",
6
6
  "names": ["SwcApp"]
7
7
  }
@@ -25,6 +25,7 @@ var import_elementDefine = require("../../decorators/elementDefine");
25
25
  var import_SimpleApplication = require("@dooboostore/simple-boot/SimpleApplication");
26
26
  var import_PathRouter = require("@dooboostore/core-web/routers/PathRouter");
27
27
  var import_HashRouter = require("@dooboostore/core-web/routers/HashRouter");
28
+ var import_ElementRouter = require("../../router/ElementRouter");
28
29
  var import_SimOption = require("@dooboostore/simple-boot/SimOption");
29
30
  var import_Router = require("@dooboostore/core-web/routers/Router");
30
31
  var __decorate = function(decorators, target, key, desc) {
@@ -51,12 +52,18 @@ let SwcAppAnchor = class SwcAppAnchor2 extends import_SwcHTMLAnchorElementBase.S
51
52
  const userConfig = new Function(`return ${applicationConfigStr}`).apply(this);
52
53
  if (userConfig) {
53
54
  const _config = {
54
- routeType: "path",
55
+ routeType: "element",
55
56
  window,
56
57
  ...userConfig
57
58
  };
58
- this._router = _config.routeType === "path" ? new import_PathRouter.PathRouter({ window: _config.window }) : new import_HashRouter.HashRouter({ window: _config.window });
59
- this.routerSubscription = this._router.observable.subscribe((route) => {
59
+ if (_config.routeType === "path") {
60
+ this.router = new import_PathRouter.PathRouter({ window: _config.window, firstUrl: _config.path });
61
+ } else if (_config.routeType === "hash") {
62
+ this.router = new import_HashRouter.HashRouter({ window: _config.window, firstUrl: _config.path });
63
+ } else {
64
+ this.router = new import_ElementRouter.ElementRouter({ window: _config.window, firstUrl: _config.path });
65
+ }
66
+ this.routerSubscription = this.router.observable.subscribe((route) => {
60
67
  if (route.triggerPoint === "end") {
61
68
  this.routingProcess(route.path);
62
69
  }
@@ -67,8 +74,8 @@ let SwcAppAnchor = class SwcAppAnchor2 extends import_SwcHTMLAnchorElementBase.S
67
74
  });
68
75
  this.simpleApplication = new import_SimpleApplication.SimpleApplication(option);
69
76
  const otherInstanceSim = /* @__PURE__ */ new Map();
70
- if (this._router) {
71
- otherInstanceSim.set(import_Router.Router, this._router);
77
+ if (this.router) {
78
+ otherInstanceSim.set(import_Router.Router, this.router);
72
79
  }
73
80
  this.simpleApplication.run(otherInstanceSim);
74
81
  const data = this.simpleApplication.sim(_config.rootRouter);
@@ -80,7 +87,7 @@ let SwcAppAnchor = class SwcAppAnchor2 extends import_SwcHTMLAnchorElementBase.S
80
87
  }
81
88
  }
82
89
  if (_config.path) {
83
- await this._router?.go(_config.path);
90
+ await this.router?.go(_config.path);
84
91
  }
85
92
  }
86
93
  } catch (e) {
@@ -92,7 +99,7 @@ let SwcAppAnchor = class SwcAppAnchor2 extends import_SwcHTMLAnchorElementBase.S
92
99
  this.routerSubscription?.unsubscribe();
93
100
  }
94
101
  async routing(path) {
95
- await this._router?.go(path);
102
+ await this.router?.go(path);
96
103
  }
97
104
  async routingProcess(path) {
98
105
  await this.simpleApplication?.routing(path);
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/elements/apps/SwcAppAnchor.ts"],
4
- "sourcesContent": ["import { SwcHTMLAnchorElementBase } from '../base/SwcHTMLAnchorElementBase';\nimport { elementDefine } from '../../decorators/elementDefine';\nimport { SimpleApplication } from '@dooboostore/simple-boot/SimpleApplication';\nimport { SwcAppInterface, SwcConfigType, SwcAttributeConfigType } from '../SwcInterfaces';\nimport { PathRouter } from '@dooboostore/core-web/routers/PathRouter';\nimport { HashRouter } from '@dooboostore/core-web/routers/HashRouter';\nimport { SimOption } from '@dooboostore/simple-boot/SimOption';\nimport { ConstructorType } from '@dooboostore/core/types';\nimport { Router, RouterEventType } from '@dooboostore/core-web/routers/Router';\nimport { Subscription } from '@dooboostore/core/message/Subscription';\n\n@elementDefine({ name: 'swc-app-a', extends: 'a' })\nexport class SwcAppAnchor extends SwcHTMLAnchorElementBase implements SwcAppInterface {\n public simpleApplication?: SimpleApplication;\n protected _router?: PathRouter | HashRouter;\n private routerSubscription?: Subscription;\n\n constructor() {\n super();\n }\n\n async connectedCallback() {\n if (this._isInitialized) return;\n this._isInitialized = true;\n\n // Push to the end of the event loop to ensure global scripts are evaluated\n await new Promise(resolve => setTimeout(resolve, 0));\n\n const applicationConfigStr = this.getAttribute('swc-get-application-config');\n if (applicationConfigStr) {\n try {\n const userConfig: SwcAttributeConfigType = new Function(`return ${applicationConfigStr}`).apply(this);\n if (userConfig) {\n const _config = {\n routeType: 'path',\n window: window,\n ...userConfig\n };\n\n this._router = _config.routeType === 'path' ? new PathRouter({ window: _config.window }) : new HashRouter({ window: _config.window });\n this.routerSubscription = this._router.observable.subscribe((route: RouterEventType) => {\n if (route.triggerPoint === 'end') {\n this.routingProcess(route.path);\n }\n });\n const option = new SimOption({\n excludeProxys: [Node],\n rootRouter: _config.rootRouter\n });\n\n this.simpleApplication = new SimpleApplication(option);\n\n // Use 'any' key for Map to allow Abstract classes like Router\n const otherInstanceSim = new Map<any, any>();\n if (this._router) {\n otherInstanceSim.set(Router, this._router);\n }\n this.simpleApplication.run(otherInstanceSim);\n const data = this.simpleApplication.sim(_config.rootRouter);\n if (data instanceof Node) {\n if (this.shadowRoot) {\n this.shadowRoot.replaceChildren(data);\n } else if (!this.contains(data)) {\n this.replaceChildren(data);\n }\n }\n if (_config.path) {\n await this._router?.go(_config.path);\n }\n }\n } catch (e) {\n console.error('[SWC-APP] Failed to execute swc-get-application-config script:', e);\n }\n }\n }\n\n disconnectedCallback() {\n this.routerSubscription?.unsubscribe();\n }\n\n async routing(path: string) {\n await this._router?.go(path);\n }\n\n private async routingProcess(path: string) {\n await this.simpleApplication?.routing(path);\n }\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;AAAA,sCAAyC;AACzC,2BAA8B;AAC9B,+BAAkC;AAElC,wBAA2B;AAC3B,wBAA2B;AAC3B,uBAA0B;AAE1B,oBAAwC;;;;;;;;;;AAIjC,IAAM,eAAN,MAAMA,sBAAqB,yDAAwB;EAKxD,cAAA;AACE,UAAK;EACP;EAEA,MAAM,oBAAiB;AACrB,QAAI,KAAK;AAAgB;AACzB,SAAK,iBAAiB;AAGtB,UAAM,IAAI,QAAQ,aAAW,WAAW,SAAS,CAAC,CAAC;AAEnD,UAAM,uBAAuB,KAAK,aAAa,4BAA4B;AAC3E,QAAI,sBAAsB;AACxB,UAAI;AACF,cAAM,aAAqC,IAAI,SAAS,UAAU,oBAAoB,EAAE,EAAE,MAAM,IAAI;AACpG,YAAI,YAAY;AACd,gBAAM,UAAU;YACd,WAAW;YACX;YACA,GAAG;;AAGL,eAAK,UAAU,QAAQ,cAAc,SAAS,IAAI,6BAAW,EAAE,QAAQ,QAAQ,OAAM,CAAE,IAAI,IAAI,6BAAW,EAAE,QAAQ,QAAQ,OAAM,CAAE;AACpI,eAAK,qBAAqB,KAAK,QAAQ,WAAW,UAAU,CAAC,UAA0B;AACrF,gBAAI,MAAM,iBAAiB,OAAO;AAChC,mBAAK,eAAe,MAAM,IAAI;YAChC;UACF,CAAC;AACD,gBAAM,SAAS,IAAI,2BAAU;YAC3B,eAAe,CAAC,IAAI;YACpB,YAAY,QAAQ;WACrB;AAED,eAAK,oBAAoB,IAAI,2CAAkB,MAAM;AAGrD,gBAAM,mBAAmB,oBAAI,IAAG;AAChC,cAAI,KAAK,SAAS;AAChB,6BAAiB,IAAI,sBAAQ,KAAK,OAAO;UAC3C;AACA,eAAK,kBAAkB,IAAI,gBAAgB;AAC3C,gBAAM,OAAO,KAAK,kBAAkB,IAAI,QAAQ,UAAU;AAC1D,cAAI,gBAAgB,MAAM;AACxB,gBAAI,KAAK,YAAY;AACnB,mBAAK,WAAW,gBAAgB,IAAI;YACtC,WAAW,CAAC,KAAK,SAAS,IAAI,GAAG;AAC/B,mBAAK,gBAAgB,IAAI;YAC3B;UACF;AACA,cAAI,QAAQ,MAAM;AAChB,kBAAM,KAAK,SAAS,GAAG,QAAQ,IAAI;UACrC;QACF;MACF,SAAS,GAAG;AACV,gBAAQ,MAAM,kEAAkE,CAAC;MACnF;IACF;EACF;EAEA,uBAAoB;AAClB,SAAK,oBAAoB,YAAW;EACtC;EAEA,MAAM,QAAQ,MAAY;AACxB,UAAM,KAAK,SAAS,GAAG,IAAI;EAC7B;EAEQ,MAAM,eAAe,MAAY;AACvC,UAAM,KAAK,mBAAmB,QAAQ,IAAI;EAC5C;;AA1EW,eAAY,WAAA;MADxB,oCAAc,EAAE,MAAM,aAAa,SAAS,IAAG,CAAE;;GACrC,YAAY;",
4
+ "sourcesContent": ["import { SwcHTMLAnchorElementBase } from '../base/SwcHTMLAnchorElementBase';\nimport { elementDefine } from '../../decorators/elementDefine';\nimport { SimpleApplication } from '@dooboostore/simple-boot/SimpleApplication';\nimport { SwcAppInterface, SwcConfigType, SwcAttributeConfigType } from '../SwcInterfaces';\nimport { PathRouter } from '@dooboostore/core-web/routers/PathRouter';\nimport { HashRouter } from '@dooboostore/core-web/routers/HashRouter';\nimport { ElementRouter } from '../../router/ElementRouter';\nimport { SimOption } from '@dooboostore/simple-boot/SimOption';\nimport { ConstructorType } from '@dooboostore/core/types';\nimport { Router, RouterEventType } from '@dooboostore/core-web/routers/Router';\nimport { Subscription } from '@dooboostore/core/message/Subscription';\n\n@elementDefine({ name: 'swc-app-a', extends: 'a' })\nexport class SwcAppAnchor extends SwcHTMLAnchorElementBase implements SwcAppInterface {\n public simpleApplication?: SimpleApplication;\n public router?: Router;\n private routerSubscription?: Subscription;\n\n constructor() {\n super();\n }\n\n async connectedCallback() {\n if (this._isInitialized) return;\n this._isInitialized = true;\n\n // Push to the end of the event loop to ensure global scripts are evaluated\n await new Promise(resolve => setTimeout(resolve, 0));\n\n const applicationConfigStr = this.getAttribute('swc-get-application-config');\n if (applicationConfigStr) {\n try {\n const userConfig: SwcAttributeConfigType = new Function(`return ${applicationConfigStr}`).apply(this);\n if (userConfig) {\n const _config: SwcConfigType = {\n routeType: 'element',\n window: window,\n ...userConfig\n };\n\n if (_config.routeType === 'path') {\n this.router = new PathRouter({ window: _config.window, firstUrl: _config.path });\n } else if (_config.routeType === 'hash') {\n this.router = new HashRouter({ window: _config.window, firstUrl: _config.path });\n } else {\n this.router = new ElementRouter({ window: _config.window, firstUrl: _config.path });\n }\n\n this.routerSubscription = this.router.observable.subscribe((route: RouterEventType) => {\n if (route.triggerPoint === 'end') {\n this.routingProcess(route.path);\n }\n });\n const option = new SimOption({\n excludeProxys: [Node],\n rootRouter: _config.rootRouter\n });\n\n this.simpleApplication = new SimpleApplication(option);\n\n // Use 'any' key for Map to allow Abstract classes like Router\n const otherInstanceSim = new Map<any, any>();\n if (this.router) {\n otherInstanceSim.set(Router, this.router);\n }\n this.simpleApplication.run(otherInstanceSim);\n const data = this.simpleApplication.sim(_config.rootRouter);\n if (data instanceof Node) {\n if (this.shadowRoot) {\n this.shadowRoot.replaceChildren(data);\n } else if (!this.contains(data)) {\n this.replaceChildren(data);\n }\n }\n if (_config.path) {\n await this.router?.go(_config.path);\n }\n }\n } catch (e) {\n console.error('[SWC-APP] Failed to execute swc-get-application-config script:', e);\n }\n }\n }\n\n disconnectedCallback() {\n this.routerSubscription?.unsubscribe();\n }\n\n async routing(path: string) {\n await this.router?.go(path);\n }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AAGrD,gBAAM,mBAAmB,oBAAI,IAAG;AAChC,cAAI,KAAK,QAAQ;AACf,6BAAiB,IAAI,sBAAQ,KAAK,MAAM;UAC1C;AACA,eAAK,kBAAkB,IAAI,gBAAgB;AAC3C,gBAAM,OAAO,KAAK,kBAAkB,IAAI,QAAQ,UAAU;AAC1D,cAAI,gBAAgB,MAAM;AACxB,gBAAI,KAAK,YAAY;AACnB,mBAAK,WAAW,gBAAgB,IAAI;YACtC,WAAW,CAAC,KAAK,SAAS,IAAI,GAAG;AAC/B,mBAAK,gBAAgB,IAAI;YAC3B;UACF;AACA,cAAI,QAAQ,MAAM;AAChB,kBAAM,KAAK,QAAQ,GAAG,QAAQ,IAAI;UACpC;QACF;MACF,SAAS,GAAG;AACV,gBAAQ,MAAM,kEAAkE,CAAC;MACnF;IACF;EACF;EAEA,uBAAoB;AAClB,SAAK,oBAAoB,YAAW;EACtC;EAEA,MAAM,QAAQ,MAAY;AACxB,UAAM,KAAK,QAAQ,GAAG,IAAI;EAC5B;EAEQ,MAAM,eAAe,MAAY;AACvC,UAAM,KAAK,mBAAmB,QAAQ,IAAI;EAC5C;;AAjFW,eAAY,WAAA;MADxB,oCAAc,EAAE,MAAM,aAAa,SAAS,IAAG,CAAE;;GACrC,YAAY;",
6
6
  "names": ["SwcAppAnchor"]
7
7
  }
@@ -25,6 +25,7 @@ var import_elementDefine = require("../../decorators/elementDefine");
25
25
  var import_SimpleApplication = require("@dooboostore/simple-boot/SimpleApplication");
26
26
  var import_PathRouter = require("@dooboostore/core-web/routers/PathRouter");
27
27
  var import_HashRouter = require("@dooboostore/core-web/routers/HashRouter");
28
+ var import_ElementRouter = require("../../router/ElementRouter");
28
29
  var import_SimOption = require("@dooboostore/simple-boot/SimOption");
29
30
  var import_Router = require("@dooboostore/core-web/routers/Router");
30
31
  var __decorate = function(decorators, target, key, desc) {
@@ -51,12 +52,18 @@ let SwcAppArea = class SwcAppArea2 extends import_SwcHTMLAreaElementBase.SwcHTML
51
52
  const userConfig = new Function(`return ${applicationConfigStr}`).apply(this);
52
53
  if (userConfig) {
53
54
  const _config = {
54
- routeType: "path",
55
+ routeType: "element",
55
56
  window,
56
57
  ...userConfig
57
58
  };
58
- this._router = _config.routeType === "path" ? new import_PathRouter.PathRouter({ window: _config.window }) : new import_HashRouter.HashRouter({ window: _config.window });
59
- this.routerSubscription = this._router.observable.subscribe((route) => {
59
+ if (_config.routeType === "path") {
60
+ this.router = new import_PathRouter.PathRouter({ window: _config.window, firstUrl: _config.path });
61
+ } else if (_config.routeType === "hash") {
62
+ this.router = new import_HashRouter.HashRouter({ window: _config.window, firstUrl: _config.path });
63
+ } else {
64
+ this.router = new import_ElementRouter.ElementRouter({ window: _config.window, firstUrl: _config.path });
65
+ }
66
+ this.routerSubscription = this.router.observable.subscribe((route) => {
60
67
  if (route.triggerPoint === "end") {
61
68
  this.routingProcess(route.path);
62
69
  }
@@ -67,8 +74,8 @@ let SwcAppArea = class SwcAppArea2 extends import_SwcHTMLAreaElementBase.SwcHTML
67
74
  });
68
75
  this.simpleApplication = new import_SimpleApplication.SimpleApplication(option);
69
76
  const otherInstanceSim = /* @__PURE__ */ new Map();
70
- if (this._router) {
71
- otherInstanceSim.set(import_Router.Router, this._router);
77
+ if (this.router) {
78
+ otherInstanceSim.set(import_Router.Router, this.router);
72
79
  }
73
80
  this.simpleApplication.run(otherInstanceSim);
74
81
  const data = this.simpleApplication.sim(_config.rootRouter);
@@ -80,7 +87,7 @@ let SwcAppArea = class SwcAppArea2 extends import_SwcHTMLAreaElementBase.SwcHTML
80
87
  }
81
88
  }
82
89
  if (_config.path) {
83
- await this._router?.go(_config.path);
90
+ await this.router?.go(_config.path);
84
91
  }
85
92
  }
86
93
  } catch (e) {
@@ -92,7 +99,7 @@ let SwcAppArea = class SwcAppArea2 extends import_SwcHTMLAreaElementBase.SwcHTML
92
99
  this.routerSubscription?.unsubscribe();
93
100
  }
94
101
  async routing(path) {
95
- await this._router?.go(path);
102
+ await this.router?.go(path);
96
103
  }
97
104
  async routingProcess(path) {
98
105
  await this.simpleApplication?.routing(path);
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/elements/apps/SwcAppArea.ts"],
4
- "sourcesContent": ["import { SwcHTMLAreaElementBase } from '../base/SwcHTMLAreaElementBase';\nimport { elementDefine } from '../../decorators/elementDefine';\nimport { SimpleApplication } from '@dooboostore/simple-boot/SimpleApplication';\nimport { SwcAppInterface, SwcConfigType, SwcAttributeConfigType } from '../SwcInterfaces';\nimport { PathRouter } from '@dooboostore/core-web/routers/PathRouter';\nimport { HashRouter } from '@dooboostore/core-web/routers/HashRouter';\nimport { SimOption } from '@dooboostore/simple-boot/SimOption';\nimport { ConstructorType } from '@dooboostore/core/types';\nimport { Router, RouterEventType } from '@dooboostore/core-web/routers/Router';\nimport { Subscription } from '@dooboostore/core/message/Subscription';\n\n@elementDefine({ name: 'swc-app-area', extends: 'area' })\nexport class SwcAppArea extends SwcHTMLAreaElementBase implements SwcAppInterface {\n public simpleApplication?: SimpleApplication;\n protected _router?: PathRouter | HashRouter;\n private routerSubscription?: Subscription;\n\n constructor() {\n super();\n }\n\n async connectedCallback() {\n if (this._isInitialized) return;\n this._isInitialized = true;\n\n // Push to the end of the event loop to ensure global scripts are evaluated\n await new Promise(resolve => setTimeout(resolve, 0));\n\n const applicationConfigStr = this.getAttribute('swc-get-application-config');\n if (applicationConfigStr) {\n try {\n const userConfig: SwcAttributeConfigType = new Function(`return ${applicationConfigStr}`).apply(this);\n if (userConfig) {\n const _config = {\n routeType: 'path',\n window: window,\n ...userConfig\n };\n\n this._router = _config.routeType === 'path' ? new PathRouter({ window: _config.window }) : new HashRouter({ window: _config.window });\n this.routerSubscription = this._router.observable.subscribe((route: RouterEventType) => {\n if (route.triggerPoint === 'end') {\n this.routingProcess(route.path);\n }\n });\n const option = new SimOption({\n excludeProxys: [Node],\n rootRouter: _config.rootRouter\n });\n\n this.simpleApplication = new SimpleApplication(option);\n\n // Use 'any' key for Map to allow Abstract classes like Router\n const otherInstanceSim = new Map<any, any>();\n if (this._router) {\n otherInstanceSim.set(Router, this._router);\n }\n this.simpleApplication.run(otherInstanceSim);\n const data = this.simpleApplication.sim(_config.rootRouter);\n if (data instanceof Node) {\n if (this.shadowRoot) {\n this.shadowRoot.replaceChildren(data);\n } else if (!this.contains(data)) {\n this.replaceChildren(data);\n }\n }\n if (_config.path) {\n await this._router?.go(_config.path);\n }\n }\n } catch (e) {\n console.error('[SWC-APP] Failed to execute swc-get-application-config script:', e);\n }\n }\n }\n\n disconnectedCallback() {\n this.routerSubscription?.unsubscribe();\n }\n\n async routing(path: string) {\n await this._router?.go(path);\n }\n\n private async routingProcess(path: string) {\n await this.simpleApplication?.routing(path);\n }\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;AAAA,oCAAuC;AACvC,2BAA8B;AAC9B,+BAAkC;AAElC,wBAA2B;AAC3B,wBAA2B;AAC3B,uBAA0B;AAE1B,oBAAwC;;;;;;;;;;AAIjC,IAAM,aAAN,MAAMA,oBAAmB,qDAAsB;EAKpD,cAAA;AACE,UAAK;EACP;EAEA,MAAM,oBAAiB;AACrB,QAAI,KAAK;AAAgB;AACzB,SAAK,iBAAiB;AAGtB,UAAM,IAAI,QAAQ,aAAW,WAAW,SAAS,CAAC,CAAC;AAEnD,UAAM,uBAAuB,KAAK,aAAa,4BAA4B;AAC3E,QAAI,sBAAsB;AACxB,UAAI;AACF,cAAM,aAAqC,IAAI,SAAS,UAAU,oBAAoB,EAAE,EAAE,MAAM,IAAI;AACpG,YAAI,YAAY;AACd,gBAAM,UAAU;YACd,WAAW;YACX;YACA,GAAG;;AAGL,eAAK,UAAU,QAAQ,cAAc,SAAS,IAAI,6BAAW,EAAE,QAAQ,QAAQ,OAAM,CAAE,IAAI,IAAI,6BAAW,EAAE,QAAQ,QAAQ,OAAM,CAAE;AACpI,eAAK,qBAAqB,KAAK,QAAQ,WAAW,UAAU,CAAC,UAA0B;AACrF,gBAAI,MAAM,iBAAiB,OAAO;AAChC,mBAAK,eAAe,MAAM,IAAI;YAChC;UACF,CAAC;AACD,gBAAM,SAAS,IAAI,2BAAU;YAC3B,eAAe,CAAC,IAAI;YACpB,YAAY,QAAQ;WACrB;AAED,eAAK,oBAAoB,IAAI,2CAAkB,MAAM;AAGrD,gBAAM,mBAAmB,oBAAI,IAAG;AAChC,cAAI,KAAK,SAAS;AAChB,6BAAiB,IAAI,sBAAQ,KAAK,OAAO;UAC3C;AACA,eAAK,kBAAkB,IAAI,gBAAgB;AAC3C,gBAAM,OAAO,KAAK,kBAAkB,IAAI,QAAQ,UAAU;AAC1D,cAAI,gBAAgB,MAAM;AACxB,gBAAI,KAAK,YAAY;AACnB,mBAAK,WAAW,gBAAgB,IAAI;YACtC,WAAW,CAAC,KAAK,SAAS,IAAI,GAAG;AAC/B,mBAAK,gBAAgB,IAAI;YAC3B;UACF;AACA,cAAI,QAAQ,MAAM;AAChB,kBAAM,KAAK,SAAS,GAAG,QAAQ,IAAI;UACrC;QACF;MACF,SAAS,GAAG;AACV,gBAAQ,MAAM,kEAAkE,CAAC;MACnF;IACF;EACF;EAEA,uBAAoB;AAClB,SAAK,oBAAoB,YAAW;EACtC;EAEA,MAAM,QAAQ,MAAY;AACxB,UAAM,KAAK,SAAS,GAAG,IAAI;EAC7B;EAEQ,MAAM,eAAe,MAAY;AACvC,UAAM,KAAK,mBAAmB,QAAQ,IAAI;EAC5C;;AA1EW,aAAU,WAAA;MADtB,oCAAc,EAAE,MAAM,gBAAgB,SAAS,OAAM,CAAE;;GAC3C,UAAU;",
4
+ "sourcesContent": ["import { SwcHTMLAreaElementBase } from '../base/SwcHTMLAreaElementBase';\nimport { elementDefine } from '../../decorators/elementDefine';\nimport { SimpleApplication } from '@dooboostore/simple-boot/SimpleApplication';\nimport { SwcAppInterface, SwcConfigType, SwcAttributeConfigType } from '../SwcInterfaces';\nimport { PathRouter } from '@dooboostore/core-web/routers/PathRouter';\nimport { HashRouter } from '@dooboostore/core-web/routers/HashRouter';\nimport { ElementRouter } from '../../router/ElementRouter';\nimport { SimOption } from '@dooboostore/simple-boot/SimOption';\nimport { ConstructorType } from '@dooboostore/core/types';\nimport { Router, RouterEventType } from '@dooboostore/core-web/routers/Router';\nimport { Subscription } from '@dooboostore/core/message/Subscription';\n\n@elementDefine({ name: 'swc-app-area', extends: 'area' })\nexport class SwcAppArea extends SwcHTMLAreaElementBase implements SwcAppInterface {\n public simpleApplication?: SimpleApplication;\n public router?: Router;\n private routerSubscription?: Subscription;\n\n constructor() {\n super();\n }\n\n async connectedCallback() {\n if (this._isInitialized) return;\n this._isInitialized = true;\n\n // Push to the end of the event loop to ensure global scripts are evaluated\n await new Promise(resolve => setTimeout(resolve, 0));\n\n const applicationConfigStr = this.getAttribute('swc-get-application-config');\n if (applicationConfigStr) {\n try {\n const userConfig: SwcAttributeConfigType = new Function(`return ${applicationConfigStr}`).apply(this);\n if (userConfig) {\n const _config: SwcConfigType = {\n routeType: 'element',\n window: window,\n ...userConfig\n };\n\n if (_config.routeType === 'path') {\n this.router = new PathRouter({ window: _config.window, firstUrl: _config.path });\n } else if (_config.routeType === 'hash') {\n this.router = new HashRouter({ window: _config.window, firstUrl: _config.path });\n } else {\n this.router = new ElementRouter({ window: _config.window, firstUrl: _config.path });\n }\n\n this.routerSubscription = this.router.observable.subscribe((route: RouterEventType) => {\n if (route.triggerPoint === 'end') {\n this.routingProcess(route.path);\n }\n });\n const option = new SimOption({\n excludeProxys: [Node],\n rootRouter: _config.rootRouter\n });\n\n this.simpleApplication = new SimpleApplication(option);\n\n // Use 'any' key for Map to allow Abstract classes like Router\n const otherInstanceSim = new Map<any, any>();\n if (this.router) {\n otherInstanceSim.set(Router, this.router);\n }\n this.simpleApplication.run(otherInstanceSim);\n const data = this.simpleApplication.sim(_config.rootRouter);\n if (data instanceof Node) {\n if (this.shadowRoot) {\n this.shadowRoot.replaceChildren(data);\n } else if (!this.contains(data)) {\n this.replaceChildren(data);\n }\n }\n if (_config.path) {\n await this.router?.go(_config.path);\n }\n }\n } catch (e) {\n console.error('[SWC-APP] Failed to execute swc-get-application-config script:', e);\n }\n }\n }\n\n disconnectedCallback() {\n this.routerSubscription?.unsubscribe();\n }\n\n async routing(path: string) {\n await this.router?.go(path);\n }\n\n private async routingProcess(path: string) {\n await this.simpleApplication?.routing(path);\n }\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;AAAA,oCAAuC;AACvC,2BAA8B;AAC9B,+BAAkC;AAElC,wBAA2B;AAC3B,wBAA2B;AAC3B,2BAA8B;AAC9B,uBAA0B;AAE1B,oBAAwC;;;;;;;;;;AAIjC,IAAM,aAAN,MAAMA,oBAAmB,qDAAsB;EAKpD,cAAA;AACE,UAAK;EACP;EAEA,MAAM,oBAAiB;AACrB,QAAI,KAAK;AAAgB;AACzB,SAAK,iBAAiB;AAGtB,UAAM,IAAI,QAAQ,aAAW,WAAW,SAAS,CAAC,CAAC;AAEnD,UAAM,uBAAuB,KAAK,aAAa,4BAA4B;AAC3E,QAAI,sBAAsB;AACxB,UAAI;AACF,cAAM,aAAqC,IAAI,SAAS,UAAU,oBAAoB,EAAE,EAAE,MAAM,IAAI;AACpG,YAAI,YAAY;AACd,gBAAM,UAAyB;YAC7B,WAAW;YACX;YACA,GAAG;;AAGL,cAAI,QAAQ,cAAc,QAAQ;AAChC,iBAAK,SAAS,IAAI,6BAAW,EAAE,QAAQ,QAAQ,QAAQ,UAAU,QAAQ,KAAI,CAAE;UACjF,WAAW,QAAQ,cAAc,QAAQ;AACvC,iBAAK,SAAS,IAAI,6BAAW,EAAE,QAAQ,QAAQ,QAAQ,UAAU,QAAQ,KAAI,CAAE;UACjF,OAAO;AACL,iBAAK,SAAS,IAAI,mCAAc,EAAE,QAAQ,QAAQ,QAAQ,UAAU,QAAQ,KAAI,CAAE;UACpF;AAEA,eAAK,qBAAqB,KAAK,OAAO,WAAW,UAAU,CAAC,UAA0B;AACpF,gBAAI,MAAM,iBAAiB,OAAO;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