create-nuclo 0.1.1

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 (534) hide show
  1. package/README.md +60 -0
  2. package/package.json +35 -0
  3. package/src/create-nuclo.mjs +193 -0
  4. package/templates/basic/README.md +16 -0
  5. package/templates/basic/_gitignore +5 -0
  6. package/templates/basic/index.html +26 -0
  7. package/templates/basic/node_modules/.package-lock.json +348 -0
  8. package/templates/basic/node_modules/.vite/deps/_metadata.json +15 -0
  9. package/templates/basic/node_modules/.vite/deps/nuclo.js +1665 -0
  10. package/templates/basic/node_modules/.vite/deps/nuclo.js.map +1 -0
  11. package/templates/basic/node_modules/.vite/deps/package.json +3 -0
  12. package/templates/basic/node_modules/@oxc-project/types/LICENSE +22 -0
  13. package/templates/basic/node_modules/@oxc-project/types/README.md +3 -0
  14. package/templates/basic/node_modules/@oxc-project/types/package.json +26 -0
  15. package/templates/basic/node_modules/@oxc-project/types/types.d.ts +1912 -0
  16. package/templates/basic/node_modules/@rolldown/binding-darwin-arm64/README.md +3 -0
  17. package/templates/basic/node_modules/@rolldown/binding-darwin-arm64/package.json +37 -0
  18. package/templates/basic/node_modules/@rolldown/binding-darwin-arm64/rolldown-binding.darwin-arm64.node +0 -0
  19. package/templates/basic/node_modules/@rolldown/pluginutils/LICENSE +21 -0
  20. package/templates/basic/node_modules/@rolldown/pluginutils/README.md +145 -0
  21. package/templates/basic/node_modules/@rolldown/pluginutils/dist/filter/index.d.mts +194 -0
  22. package/templates/basic/node_modules/@rolldown/pluginutils/dist/filter/index.mjs +2 -0
  23. package/templates/basic/node_modules/@rolldown/pluginutils/dist/filter-B_mD-HGz.mjs +323 -0
  24. package/templates/basic/node_modules/@rolldown/pluginutils/dist/index.d.mts +2 -0
  25. package/templates/basic/node_modules/@rolldown/pluginutils/dist/index.mjs +2 -0
  26. package/templates/basic/node_modules/@rolldown/pluginutils/package.json +40 -0
  27. package/templates/basic/node_modules/detect-libc/LICENSE +201 -0
  28. package/templates/basic/node_modules/detect-libc/README.md +163 -0
  29. package/templates/basic/node_modules/detect-libc/index.d.ts +14 -0
  30. package/templates/basic/node_modules/detect-libc/lib/detect-libc.js +313 -0
  31. package/templates/basic/node_modules/detect-libc/lib/elf.js +39 -0
  32. package/templates/basic/node_modules/detect-libc/lib/filesystem.js +51 -0
  33. package/templates/basic/node_modules/detect-libc/lib/process.js +24 -0
  34. package/templates/basic/node_modules/detect-libc/package.json +44 -0
  35. package/templates/basic/node_modules/fdir/LICENSE +7 -0
  36. package/templates/basic/node_modules/fdir/README.md +91 -0
  37. package/templates/basic/node_modules/fdir/dist/index.cjs +588 -0
  38. package/templates/basic/node_modules/fdir/dist/index.d.cts +155 -0
  39. package/templates/basic/node_modules/fdir/dist/index.d.mts +155 -0
  40. package/templates/basic/node_modules/fdir/dist/index.mjs +570 -0
  41. package/templates/basic/node_modules/fdir/package.json +103 -0
  42. package/templates/basic/node_modules/lightningcss/LICENSE +373 -0
  43. package/templates/basic/node_modules/lightningcss/README.md +105 -0
  44. package/templates/basic/node_modules/lightningcss/node/ast.d.ts +9892 -0
  45. package/templates/basic/node_modules/lightningcss/node/ast.js.flow +10539 -0
  46. package/templates/basic/node_modules/lightningcss/node/browserslistToTargets.js +48 -0
  47. package/templates/basic/node_modules/lightningcss/node/composeVisitors.js +450 -0
  48. package/templates/basic/node_modules/lightningcss/node/flags.js +28 -0
  49. package/templates/basic/node_modules/lightningcss/node/index.d.ts +494 -0
  50. package/templates/basic/node_modules/lightningcss/node/index.js +59 -0
  51. package/templates/basic/node_modules/lightningcss/node/index.js.flow +843 -0
  52. package/templates/basic/node_modules/lightningcss/node/index.mjs +4 -0
  53. package/templates/basic/node_modules/lightningcss/node/targets.d.ts +40 -0
  54. package/templates/basic/node_modules/lightningcss/node/targets.js.flow +39 -0
  55. package/templates/basic/node_modules/lightningcss/package.json +110 -0
  56. package/templates/basic/node_modules/lightningcss-darwin-arm64/LICENSE +373 -0
  57. package/templates/basic/node_modules/lightningcss-darwin-arm64/README.md +1 -0
  58. package/templates/basic/node_modules/lightningcss-darwin-arm64/lightningcss.darwin-arm64.node +0 -0
  59. package/templates/basic/node_modules/lightningcss-darwin-arm64/package.json +34 -0
  60. package/templates/basic/node_modules/nanoid/LICENSE +20 -0
  61. package/templates/basic/node_modules/nanoid/README.md +36 -0
  62. package/templates/basic/node_modules/nanoid/async/index.browser.cjs +42 -0
  63. package/templates/basic/node_modules/nanoid/async/index.browser.js +42 -0
  64. package/templates/basic/node_modules/nanoid/async/index.cjs +44 -0
  65. package/templates/basic/node_modules/nanoid/async/index.d.ts +56 -0
  66. package/templates/basic/node_modules/nanoid/async/index.js +44 -0
  67. package/templates/basic/node_modules/nanoid/async/index.native.js +35 -0
  68. package/templates/basic/node_modules/nanoid/async/package.json +12 -0
  69. package/templates/basic/node_modules/nanoid/bin/nanoid.cjs +55 -0
  70. package/templates/basic/node_modules/nanoid/index.browser.cjs +44 -0
  71. package/templates/basic/node_modules/nanoid/index.browser.js +44 -0
  72. package/templates/basic/node_modules/nanoid/index.cjs +57 -0
  73. package/templates/basic/node_modules/nanoid/index.d.cts +91 -0
  74. package/templates/basic/node_modules/nanoid/index.d.ts +91 -0
  75. package/templates/basic/node_modules/nanoid/index.js +62 -0
  76. package/templates/basic/node_modules/nanoid/nanoid.js +1 -0
  77. package/templates/basic/node_modules/nanoid/non-secure/index.cjs +24 -0
  78. package/templates/basic/node_modules/nanoid/non-secure/index.d.ts +33 -0
  79. package/templates/basic/node_modules/nanoid/non-secure/index.js +24 -0
  80. package/templates/basic/node_modules/nanoid/non-secure/package.json +6 -0
  81. package/templates/basic/node_modules/nanoid/package.json +89 -0
  82. package/templates/basic/node_modules/nanoid/url-alphabet/index.cjs +4 -0
  83. package/templates/basic/node_modules/nanoid/url-alphabet/index.js +4 -0
  84. package/templates/basic/node_modules/nanoid/url-alphabet/package.json +6 -0
  85. package/templates/basic/node_modules/nuclo/LICENSE.md +45 -0
  86. package/templates/basic/node_modules/nuclo/README.md +727 -0
  87. package/templates/basic/node_modules/nuclo/dist/bootstrap.d.ts +5 -0
  88. package/templates/basic/node_modules/nuclo/dist/bootstrap.d.ts.map +1 -0
  89. package/templates/basic/node_modules/nuclo/dist/element/attributes.d.ts +3 -0
  90. package/templates/basic/node_modules/nuclo/dist/element/attributes.d.ts.map +1 -0
  91. package/templates/basic/node_modules/nuclo/dist/element/class-name.d.ts +6 -0
  92. package/templates/basic/node_modules/nuclo/dist/element/class-name.d.ts.map +1 -0
  93. package/templates/basic/node_modules/nuclo/dist/element/events.d.ts +35 -0
  94. package/templates/basic/node_modules/nuclo/dist/element/events.d.ts.map +1 -0
  95. package/templates/basic/node_modules/nuclo/dist/element/factory.d.ts +32 -0
  96. package/templates/basic/node_modules/nuclo/dist/element/factory.d.ts.map +1 -0
  97. package/templates/basic/node_modules/nuclo/dist/element/inline-style.d.ts +9 -0
  98. package/templates/basic/node_modules/nuclo/dist/element/inline-style.d.ts.map +1 -0
  99. package/templates/basic/node_modules/nuclo/dist/element/modifiers.d.ts +11 -0
  100. package/templates/basic/node_modules/nuclo/dist/element/modifiers.d.ts.map +1 -0
  101. package/templates/basic/node_modules/nuclo/dist/element/tags.d.ts +5 -0
  102. package/templates/basic/node_modules/nuclo/dist/element/tags.d.ts.map +1 -0
  103. package/templates/basic/node_modules/nuclo/dist/hydration.d.ts +73 -0
  104. package/templates/basic/node_modules/nuclo/dist/hydration.d.ts.map +1 -0
  105. package/templates/basic/node_modules/nuclo/dist/index.d.ts +17 -0
  106. package/templates/basic/node_modules/nuclo/dist/index.d.ts.map +1 -0
  107. package/templates/basic/node_modules/nuclo/dist/list/index.d.ts +7 -0
  108. package/templates/basic/node_modules/nuclo/dist/list/index.d.ts.map +1 -0
  109. package/templates/basic/node_modules/nuclo/dist/list/runtime.d.ts +6 -0
  110. package/templates/basic/node_modules/nuclo/dist/list/runtime.d.ts.map +1 -0
  111. package/templates/basic/node_modules/nuclo/dist/list/types.d.ts +18 -0
  112. package/templates/basic/node_modules/nuclo/dist/list/types.d.ts.map +1 -0
  113. package/templates/basic/node_modules/nuclo/dist/nuclo.cjs +2 -0
  114. package/templates/basic/node_modules/nuclo/dist/nuclo.cjs.map +1 -0
  115. package/templates/basic/node_modules/nuclo/dist/nuclo.mjs +2 -0
  116. package/templates/basic/node_modules/nuclo/dist/nuclo.mjs.map +1 -0
  117. package/templates/basic/node_modules/nuclo/dist/nuclo.umd.js +2 -0
  118. package/templates/basic/node_modules/nuclo/dist/nuclo.umd.js.map +1 -0
  119. package/templates/basic/node_modules/nuclo/dist/polyfill/Document.d.ts +19 -0
  120. package/templates/basic/node_modules/nuclo/dist/polyfill/Document.d.ts.map +1 -0
  121. package/templates/basic/node_modules/nuclo/dist/polyfill/Element.d.ts +48 -0
  122. package/templates/basic/node_modules/nuclo/dist/polyfill/Element.d.ts.map +1 -0
  123. package/templates/basic/node_modules/nuclo/dist/polyfill/Event.d.ts +43 -0
  124. package/templates/basic/node_modules/nuclo/dist/polyfill/Event.d.ts.map +1 -0
  125. package/templates/basic/node_modules/nuclo/dist/polyfill/Node.d.ts +13 -0
  126. package/templates/basic/node_modules/nuclo/dist/polyfill/Node.d.ts.map +1 -0
  127. package/templates/basic/node_modules/nuclo/dist/polyfill/Text.d.ts +11 -0
  128. package/templates/basic/node_modules/nuclo/dist/polyfill/Text.d.ts.map +1 -0
  129. package/templates/basic/node_modules/nuclo/dist/polyfill/index.d.ts +24 -0
  130. package/templates/basic/node_modules/nuclo/dist/polyfill/index.d.ts.map +1 -0
  131. package/templates/basic/node_modules/nuclo/dist/polyfill/nuclo.polyfill.cjs +2 -0
  132. package/templates/basic/node_modules/nuclo/dist/polyfill/nuclo.polyfill.cjs.map +1 -0
  133. package/templates/basic/node_modules/nuclo/dist/polyfill/nuclo.polyfill.mjs +2 -0
  134. package/templates/basic/node_modules/nuclo/dist/polyfill/nuclo.polyfill.mjs.map +1 -0
  135. package/templates/basic/node_modules/nuclo/dist/render.d.ts +33 -0
  136. package/templates/basic/node_modules/nuclo/dist/render.d.ts.map +1 -0
  137. package/templates/basic/node_modules/nuclo/dist/shared/conditions.d.ts +4 -0
  138. package/templates/basic/node_modules/nuclo/dist/shared/conditions.d.ts.map +1 -0
  139. package/templates/basic/node_modules/nuclo/dist/shared/dom.d.ts +69 -0
  140. package/templates/basic/node_modules/nuclo/dist/shared/dom.d.ts.map +1 -0
  141. package/templates/basic/node_modules/nuclo/dist/shared/environment.d.ts +5 -0
  142. package/templates/basic/node_modules/nuclo/dist/shared/environment.d.ts.map +1 -0
  143. package/templates/basic/node_modules/nuclo/dist/shared/errors.d.ts +2 -0
  144. package/templates/basic/node_modules/nuclo/dist/shared/errors.d.ts.map +1 -0
  145. package/templates/basic/node_modules/nuclo/dist/shared/renderables.d.ts +4 -0
  146. package/templates/basic/node_modules/nuclo/dist/shared/renderables.d.ts.map +1 -0
  147. package/templates/basic/node_modules/nuclo/dist/shared/strings.d.ts +19 -0
  148. package/templates/basic/node_modules/nuclo/dist/shared/strings.d.ts.map +1 -0
  149. package/templates/basic/node_modules/nuclo/dist/shared/type-guards.d.ts +16 -0
  150. package/templates/basic/node_modules/nuclo/dist/shared/type-guards.d.ts.map +1 -0
  151. package/templates/basic/node_modules/nuclo/dist/ssr/index.d.ts +19 -0
  152. package/templates/basic/node_modules/nuclo/dist/ssr/index.d.ts.map +1 -0
  153. package/templates/basic/node_modules/nuclo/dist/ssr/nuclo.ssr.cjs +2 -0
  154. package/templates/basic/node_modules/nuclo/dist/ssr/nuclo.ssr.cjs.map +1 -0
  155. package/templates/basic/node_modules/nuclo/dist/ssr/nuclo.ssr.mjs +2 -0
  156. package/templates/basic/node_modules/nuclo/dist/ssr/nuclo.ssr.mjs.map +1 -0
  157. package/templates/basic/node_modules/nuclo/dist/ssr/render-to-string.d.ts +41 -0
  158. package/templates/basic/node_modules/nuclo/dist/ssr/render-to-string.d.ts.map +1 -0
  159. package/templates/basic/node_modules/nuclo/dist/style/css.d.ts +19 -0
  160. package/templates/basic/node_modules/nuclo/dist/style/css.d.ts.map +1 -0
  161. package/templates/basic/node_modules/nuclo/dist/style/engine.d.ts +34 -0
  162. package/templates/basic/node_modules/nuclo/dist/style/engine.d.ts.map +1 -0
  163. package/templates/basic/node_modules/nuclo/dist/style/index.d.ts +3 -0
  164. package/templates/basic/node_modules/nuclo/dist/style/index.d.ts.map +1 -0
  165. package/templates/basic/node_modules/nuclo/dist/update/conditional.d.ts +3 -0
  166. package/templates/basic/node_modules/nuclo/dist/update/conditional.d.ts.map +1 -0
  167. package/templates/basic/node_modules/nuclo/dist/update/reactive-attributes.d.ts +45 -0
  168. package/templates/basic/node_modules/nuclo/dist/update/reactive-attributes.d.ts.map +1 -0
  169. package/templates/basic/node_modules/nuclo/dist/update/reactive-text.d.ts +38 -0
  170. package/templates/basic/node_modules/nuclo/dist/update/reactive-text.d.ts.map +1 -0
  171. package/templates/basic/node_modules/nuclo/dist/update/registry.d.ts +97 -0
  172. package/templates/basic/node_modules/nuclo/dist/update/registry.d.ts.map +1 -0
  173. package/templates/basic/node_modules/nuclo/dist/update/scope.d.ts +7 -0
  174. package/templates/basic/node_modules/nuclo/dist/update/scope.d.ts.map +1 -0
  175. package/templates/basic/node_modules/nuclo/dist/update/update.d.ts +4 -0
  176. package/templates/basic/node_modules/nuclo/dist/update/update.d.ts.map +1 -0
  177. package/templates/basic/node_modules/nuclo/dist/when/builder.d.ts +16 -0
  178. package/templates/basic/node_modules/nuclo/dist/when/builder.d.ts.map +1 -0
  179. package/templates/basic/node_modules/nuclo/dist/when/index.d.ts +44 -0
  180. package/templates/basic/node_modules/nuclo/dist/when/index.d.ts.map +1 -0
  181. package/templates/basic/node_modules/nuclo/dist/when/runtime.d.ts +59 -0
  182. package/templates/basic/node_modules/nuclo/dist/when/runtime.d.ts.map +1 -0
  183. package/templates/basic/node_modules/nuclo/package.json +88 -0
  184. package/templates/basic/node_modules/nuclo/types/core/base.d.ts +113 -0
  185. package/templates/basic/node_modules/nuclo/types/features/list.d.ts +38 -0
  186. package/templates/basic/node_modules/nuclo/types/features/on.d.ts +59 -0
  187. package/templates/basic/node_modules/nuclo/types/features/render.d.ts +49 -0
  188. package/templates/basic/node_modules/nuclo/types/features/scope.d.ts +6 -0
  189. package/templates/basic/node_modules/nuclo/types/features/style.d.ts +77 -0
  190. package/templates/basic/node_modules/nuclo/types/features/update.d.ts +6 -0
  191. package/templates/basic/node_modules/nuclo/types/features/when.d.ts +18 -0
  192. package/templates/basic/node_modules/nuclo/types/html/tags.d.ts +119 -0
  193. package/templates/basic/node_modules/nuclo/types/index.d.ts +137 -0
  194. package/templates/basic/node_modules/nuclo/types/polyfill.d.ts +131 -0
  195. package/templates/basic/node_modules/nuclo/types/ssr.d.ts +45 -0
  196. package/templates/basic/node_modules/nuclo/types/style.d.ts +404 -0
  197. package/templates/basic/node_modules/nuclo/types/svg/base.d.ts +118 -0
  198. package/templates/basic/node_modules/nuclo/types/svg/tags.d.ts +68 -0
  199. package/templates/basic/node_modules/picocolors/LICENSE +15 -0
  200. package/templates/basic/node_modules/picocolors/README.md +21 -0
  201. package/templates/basic/node_modules/picocolors/package.json +25 -0
  202. package/templates/basic/node_modules/picocolors/picocolors.browser.js +4 -0
  203. package/templates/basic/node_modules/picocolors/picocolors.d.ts +5 -0
  204. package/templates/basic/node_modules/picocolors/picocolors.js +75 -0
  205. package/templates/basic/node_modules/picocolors/types.d.ts +51 -0
  206. package/templates/basic/node_modules/picomatch/LICENSE +21 -0
  207. package/templates/basic/node_modules/picomatch/README.md +743 -0
  208. package/templates/basic/node_modules/picomatch/index.js +17 -0
  209. package/templates/basic/node_modules/picomatch/lib/constants.js +184 -0
  210. package/templates/basic/node_modules/picomatch/lib/parse.js +1416 -0
  211. package/templates/basic/node_modules/picomatch/lib/picomatch.js +361 -0
  212. package/templates/basic/node_modules/picomatch/lib/scan.js +391 -0
  213. package/templates/basic/node_modules/picomatch/lib/utils.js +72 -0
  214. package/templates/basic/node_modules/picomatch/package.json +83 -0
  215. package/templates/basic/node_modules/picomatch/posix.js +3 -0
  216. package/templates/basic/node_modules/postcss/LICENSE +20 -0
  217. package/templates/basic/node_modules/postcss/README.md +25 -0
  218. package/templates/basic/node_modules/postcss/lib/at-rule.d.ts +139 -0
  219. package/templates/basic/node_modules/postcss/lib/at-rule.js +25 -0
  220. package/templates/basic/node_modules/postcss/lib/comment.d.ts +67 -0
  221. package/templates/basic/node_modules/postcss/lib/comment.js +13 -0
  222. package/templates/basic/node_modules/postcss/lib/container.d.ts +478 -0
  223. package/templates/basic/node_modules/postcss/lib/container.js +447 -0
  224. package/templates/basic/node_modules/postcss/lib/css-syntax-error.d.ts +247 -0
  225. package/templates/basic/node_modules/postcss/lib/css-syntax-error.js +133 -0
  226. package/templates/basic/node_modules/postcss/lib/declaration.d.ts +150 -0
  227. package/templates/basic/node_modules/postcss/lib/declaration.js +24 -0
  228. package/templates/basic/node_modules/postcss/lib/document.d.ts +68 -0
  229. package/templates/basic/node_modules/postcss/lib/document.js +33 -0
  230. package/templates/basic/node_modules/postcss/lib/fromJSON.d.ts +9 -0
  231. package/templates/basic/node_modules/postcss/lib/fromJSON.js +68 -0
  232. package/templates/basic/node_modules/postcss/lib/input.d.ts +226 -0
  233. package/templates/basic/node_modules/postcss/lib/input.js +276 -0
  234. package/templates/basic/node_modules/postcss/lib/lazy-result.d.ts +189 -0
  235. package/templates/basic/node_modules/postcss/lib/lazy-result.js +563 -0
  236. package/templates/basic/node_modules/postcss/lib/list.d.ts +60 -0
  237. package/templates/basic/node_modules/postcss/lib/list.js +58 -0
  238. package/templates/basic/node_modules/postcss/lib/map-generator.js +376 -0
  239. package/templates/basic/node_modules/postcss/lib/no-work-result.d.ts +45 -0
  240. package/templates/basic/node_modules/postcss/lib/no-work-result.js +137 -0
  241. package/templates/basic/node_modules/postcss/lib/node.d.ts +555 -0
  242. package/templates/basic/node_modules/postcss/lib/node.js +456 -0
  243. package/templates/basic/node_modules/postcss/lib/parse.d.ts +9 -0
  244. package/templates/basic/node_modules/postcss/lib/parse.js +42 -0
  245. package/templates/basic/node_modules/postcss/lib/parser.js +618 -0
  246. package/templates/basic/node_modules/postcss/lib/postcss.d.mts +66 -0
  247. package/templates/basic/node_modules/postcss/lib/postcss.d.ts +461 -0
  248. package/templates/basic/node_modules/postcss/lib/postcss.js +101 -0
  249. package/templates/basic/node_modules/postcss/lib/postcss.mjs +30 -0
  250. package/templates/basic/node_modules/postcss/lib/previous-map.d.ts +80 -0
  251. package/templates/basic/node_modules/postcss/lib/previous-map.js +161 -0
  252. package/templates/basic/node_modules/postcss/lib/processor.d.ts +114 -0
  253. package/templates/basic/node_modules/postcss/lib/processor.js +67 -0
  254. package/templates/basic/node_modules/postcss/lib/result.d.ts +204 -0
  255. package/templates/basic/node_modules/postcss/lib/result.js +42 -0
  256. package/templates/basic/node_modules/postcss/lib/root.d.ts +86 -0
  257. package/templates/basic/node_modules/postcss/lib/root.js +61 -0
  258. package/templates/basic/node_modules/postcss/lib/rule.d.ts +126 -0
  259. package/templates/basic/node_modules/postcss/lib/rule.js +27 -0
  260. package/templates/basic/node_modules/postcss/lib/stringifier.d.ts +45 -0
  261. package/templates/basic/node_modules/postcss/lib/stringifier.js +374 -0
  262. package/templates/basic/node_modules/postcss/lib/stringify.d.ts +9 -0
  263. package/templates/basic/node_modules/postcss/lib/stringify.js +11 -0
  264. package/templates/basic/node_modules/postcss/lib/symbols.js +5 -0
  265. package/templates/basic/node_modules/postcss/lib/terminal-highlight.js +70 -0
  266. package/templates/basic/node_modules/postcss/lib/tokenize.js +270 -0
  267. package/templates/basic/node_modules/postcss/lib/warn-once.js +13 -0
  268. package/templates/basic/node_modules/postcss/lib/warning.d.ts +146 -0
  269. package/templates/basic/node_modules/postcss/lib/warning.js +37 -0
  270. package/templates/basic/node_modules/postcss/package.json +88 -0
  271. package/templates/basic/node_modules/rolldown/LICENSE +25 -0
  272. package/templates/basic/node_modules/rolldown/README.md +11 -0
  273. package/templates/basic/node_modules/rolldown/bin/cli.mjs +2 -0
  274. package/templates/basic/node_modules/rolldown/dist/cli.d.mts +1 -0
  275. package/templates/basic/node_modules/rolldown/dist/cli.mjs +1202 -0
  276. package/templates/basic/node_modules/rolldown/dist/config.d.mts +14 -0
  277. package/templates/basic/node_modules/rolldown/dist/config.mjs +4 -0
  278. package/templates/basic/node_modules/rolldown/dist/experimental-index.d.mts +280 -0
  279. package/templates/basic/node_modules/rolldown/dist/experimental-index.mjs +331 -0
  280. package/templates/basic/node_modules/rolldown/dist/experimental-runtime-types.d.ts +107 -0
  281. package/templates/basic/node_modules/rolldown/dist/filter-index.d.mts +195 -0
  282. package/templates/basic/node_modules/rolldown/dist/filter-index.mjs +380 -0
  283. package/templates/basic/node_modules/rolldown/dist/get-log-filter.d.mts +3 -0
  284. package/templates/basic/node_modules/rolldown/dist/get-log-filter.mjs +68 -0
  285. package/templates/basic/node_modules/rolldown/dist/index.d.mts +4 -0
  286. package/templates/basic/node_modules/rolldown/dist/index.mjs +50 -0
  287. package/templates/basic/node_modules/rolldown/dist/parallel-plugin-worker.d.mts +1 -0
  288. package/templates/basic/node_modules/rolldown/dist/parallel-plugin-worker.mjs +29 -0
  289. package/templates/basic/node_modules/rolldown/dist/parallel-plugin.d.mts +13 -0
  290. package/templates/basic/node_modules/rolldown/dist/parallel-plugin.mjs +6 -0
  291. package/templates/basic/node_modules/rolldown/dist/parse-ast-index.d.mts +32 -0
  292. package/templates/basic/node_modules/rolldown/dist/parse-ast-index.mjs +60 -0
  293. package/templates/basic/node_modules/rolldown/dist/plugins-index.d.mts +33 -0
  294. package/templates/basic/node_modules/rolldown/dist/plugins-index.mjs +40 -0
  295. package/templates/basic/node_modules/rolldown/dist/shared/binding-B1q9aYT-.d.mts +1947 -0
  296. package/templates/basic/node_modules/rolldown/dist/shared/binding-BmkJW3Wy.mjs +588 -0
  297. package/templates/basic/node_modules/rolldown/dist/shared/bindingify-input-options-BsDhfYrS.mjs +2240 -0
  298. package/templates/basic/node_modules/rolldown/dist/shared/constructors-2i1T9YcF.d.mts +36 -0
  299. package/templates/basic/node_modules/rolldown/dist/shared/constructors-CE6zZSUt.mjs +65 -0
  300. package/templates/basic/node_modules/rolldown/dist/shared/define-config-BBz954-q.d.mts +3901 -0
  301. package/templates/basic/node_modules/rolldown/dist/shared/define-config-Demdg3_4.mjs +6 -0
  302. package/templates/basic/node_modules/rolldown/dist/shared/error-BlQ0-ek7.mjs +85 -0
  303. package/templates/basic/node_modules/rolldown/dist/shared/get-log-filter-BpNVNJ5-.d.mts +35 -0
  304. package/templates/basic/node_modules/rolldown/dist/shared/load-config-FRmAU9xl.mjs +120 -0
  305. package/templates/basic/node_modules/rolldown/dist/shared/logging-BSNejiLS.d.mts +50 -0
  306. package/templates/basic/node_modules/rolldown/dist/shared/logs-aMKUxRpj.mjs +180 -0
  307. package/templates/basic/node_modules/rolldown/dist/shared/misc-CoQm4NHO.mjs +21 -0
  308. package/templates/basic/node_modules/rolldown/dist/shared/normalize-string-or-regex-BYkbbGqQ.mjs +68 -0
  309. package/templates/basic/node_modules/rolldown/dist/shared/parse-DVMnkavl.mjs +74 -0
  310. package/templates/basic/node_modules/rolldown/dist/shared/prompt-B1Yc1NPt.mjs +847 -0
  311. package/templates/basic/node_modules/rolldown/dist/shared/resolve-tsconfig-CdIAR1Eb.mjs +124 -0
  312. package/templates/basic/node_modules/rolldown/dist/shared/rolldown-build-aV0QeeTW.mjs +3264 -0
  313. package/templates/basic/node_modules/rolldown/dist/shared/rolldown-tbHvKzVl.mjs +40 -0
  314. package/templates/basic/node_modules/rolldown/dist/shared/transform-CEmFsvJW.d.mts +149 -0
  315. package/templates/basic/node_modules/rolldown/dist/shared/watch-DIhJ-T1s.mjs +374 -0
  316. package/templates/basic/node_modules/rolldown/dist/utils-index.d.mts +376 -0
  317. package/templates/basic/node_modules/rolldown/dist/utils-index.mjs +2414 -0
  318. package/templates/basic/node_modules/rolldown/package.json +153 -0
  319. package/templates/basic/node_modules/source-map-js/LICENSE +28 -0
  320. package/templates/basic/node_modules/source-map-js/README.md +765 -0
  321. package/templates/basic/node_modules/source-map-js/lib/array-set.js +121 -0
  322. package/templates/basic/node_modules/source-map-js/lib/base64-vlq.js +140 -0
  323. package/templates/basic/node_modules/source-map-js/lib/base64.js +67 -0
  324. package/templates/basic/node_modules/source-map-js/lib/binary-search.js +111 -0
  325. package/templates/basic/node_modules/source-map-js/lib/mapping-list.js +79 -0
  326. package/templates/basic/node_modules/source-map-js/lib/quick-sort.js +132 -0
  327. package/templates/basic/node_modules/source-map-js/lib/source-map-consumer.d.ts +1 -0
  328. package/templates/basic/node_modules/source-map-js/lib/source-map-consumer.js +1188 -0
  329. package/templates/basic/node_modules/source-map-js/lib/source-map-generator.d.ts +1 -0
  330. package/templates/basic/node_modules/source-map-js/lib/source-map-generator.js +444 -0
  331. package/templates/basic/node_modules/source-map-js/lib/source-node.d.ts +1 -0
  332. package/templates/basic/node_modules/source-map-js/lib/source-node.js +413 -0
  333. package/templates/basic/node_modules/source-map-js/lib/util.js +594 -0
  334. package/templates/basic/node_modules/source-map-js/package.json +71 -0
  335. package/templates/basic/node_modules/source-map-js/source-map.d.ts +104 -0
  336. package/templates/basic/node_modules/source-map-js/source-map.js +8 -0
  337. package/templates/basic/node_modules/tinyglobby/LICENSE +21 -0
  338. package/templates/basic/node_modules/tinyglobby/README.md +25 -0
  339. package/templates/basic/node_modules/tinyglobby/dist/index.cjs +335 -0
  340. package/templates/basic/node_modules/tinyglobby/dist/index.d.cts +148 -0
  341. package/templates/basic/node_modules/tinyglobby/dist/index.d.mts +148 -0
  342. package/templates/basic/node_modules/tinyglobby/dist/index.mjs +307 -0
  343. package/templates/basic/node_modules/tinyglobby/package.json +70 -0
  344. package/templates/basic/node_modules/typescript/LICENSE.txt +55 -0
  345. package/templates/basic/node_modules/typescript/README.md +50 -0
  346. package/templates/basic/node_modules/typescript/SECURITY.md +39 -0
  347. package/templates/basic/node_modules/typescript/ThirdPartyNoticeText.txt +193 -0
  348. package/templates/basic/node_modules/typescript/bin/tsc +2 -0
  349. package/templates/basic/node_modules/typescript/bin/tsserver +2 -0
  350. package/templates/basic/node_modules/typescript/lib/_tsc.js +134465 -0
  351. package/templates/basic/node_modules/typescript/lib/_tsserver.js +659 -0
  352. package/templates/basic/node_modules/typescript/lib/_typingsInstaller.js +222 -0
  353. package/templates/basic/node_modules/typescript/lib/cs/diagnosticMessages.generated.json +2129 -0
  354. package/templates/basic/node_modules/typescript/lib/de/diagnosticMessages.generated.json +2125 -0
  355. package/templates/basic/node_modules/typescript/lib/es/diagnosticMessages.generated.json +2129 -0
  356. package/templates/basic/node_modules/typescript/lib/fr/diagnosticMessages.generated.json +2129 -0
  357. package/templates/basic/node_modules/typescript/lib/it/diagnosticMessages.generated.json +2125 -0
  358. package/templates/basic/node_modules/typescript/lib/ja/diagnosticMessages.generated.json +2129 -0
  359. package/templates/basic/node_modules/typescript/lib/ko/diagnosticMessages.generated.json +2129 -0
  360. package/templates/basic/node_modules/typescript/lib/lib.d.ts +20 -0
  361. package/templates/basic/node_modules/typescript/lib/lib.decorators.d.ts +382 -0
  362. package/templates/basic/node_modules/typescript/lib/lib.decorators.legacy.d.ts +20 -0
  363. package/templates/basic/node_modules/typescript/lib/lib.dom.asynciterable.d.ts +18 -0
  364. package/templates/basic/node_modules/typescript/lib/lib.dom.d.ts +45125 -0
  365. package/templates/basic/node_modules/typescript/lib/lib.dom.iterable.d.ts +18 -0
  366. package/templates/basic/node_modules/typescript/lib/lib.es2015.collection.d.ts +150 -0
  367. package/templates/basic/node_modules/typescript/lib/lib.es2015.core.d.ts +595 -0
  368. package/templates/basic/node_modules/typescript/lib/lib.es2015.d.ts +26 -0
  369. package/templates/basic/node_modules/typescript/lib/lib.es2015.generator.d.ts +75 -0
  370. package/templates/basic/node_modules/typescript/lib/lib.es2015.iterable.d.ts +603 -0
  371. package/templates/basic/node_modules/typescript/lib/lib.es2015.promise.d.ts +79 -0
  372. package/templates/basic/node_modules/typescript/lib/lib.es2015.proxy.d.ts +126 -0
  373. package/templates/basic/node_modules/typescript/lib/lib.es2015.reflect.d.ts +142 -0
  374. package/templates/basic/node_modules/typescript/lib/lib.es2015.symbol.d.ts +44 -0
  375. package/templates/basic/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts +324 -0
  376. package/templates/basic/node_modules/typescript/lib/lib.es2016.array.include.d.ts +114 -0
  377. package/templates/basic/node_modules/typescript/lib/lib.es2016.d.ts +19 -0
  378. package/templates/basic/node_modules/typescript/lib/lib.es2016.full.d.ts +21 -0
  379. package/templates/basic/node_modules/typescript/lib/lib.es2016.intl.d.ts +29 -0
  380. package/templates/basic/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts +19 -0
  381. package/templates/basic/node_modules/typescript/lib/lib.es2017.d.ts +24 -0
  382. package/templates/basic/node_modules/typescript/lib/lib.es2017.date.d.ts +29 -0
  383. package/templates/basic/node_modules/typescript/lib/lib.es2017.full.d.ts +21 -0
  384. package/templates/basic/node_modules/typescript/lib/lib.es2017.intl.d.ts +42 -0
  385. package/templates/basic/node_modules/typescript/lib/lib.es2017.object.d.ts +47 -0
  386. package/templates/basic/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts +133 -0
  387. package/templates/basic/node_modules/typescript/lib/lib.es2017.string.d.ts +43 -0
  388. package/templates/basic/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts +51 -0
  389. package/templates/basic/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts +75 -0
  390. package/templates/basic/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts +51 -0
  391. package/templates/basic/node_modules/typescript/lib/lib.es2018.d.ts +22 -0
  392. package/templates/basic/node_modules/typescript/lib/lib.es2018.full.d.ts +22 -0
  393. package/templates/basic/node_modules/typescript/lib/lib.es2018.intl.d.ts +81 -0
  394. package/templates/basic/node_modules/typescript/lib/lib.es2018.promise.d.ts +28 -0
  395. package/templates/basic/node_modules/typescript/lib/lib.es2018.regexp.d.ts +35 -0
  396. package/templates/basic/node_modules/typescript/lib/lib.es2019.array.d.ts +77 -0
  397. package/templates/basic/node_modules/typescript/lib/lib.es2019.d.ts +22 -0
  398. package/templates/basic/node_modules/typescript/lib/lib.es2019.full.d.ts +22 -0
  399. package/templates/basic/node_modules/typescript/lib/lib.es2019.intl.d.ts +21 -0
  400. package/templates/basic/node_modules/typescript/lib/lib.es2019.object.d.ts +31 -0
  401. package/templates/basic/node_modules/typescript/lib/lib.es2019.string.d.ts +35 -0
  402. package/templates/basic/node_modules/typescript/lib/lib.es2019.symbol.d.ts +22 -0
  403. package/templates/basic/node_modules/typescript/lib/lib.es2020.bigint.d.ts +763 -0
  404. package/templates/basic/node_modules/typescript/lib/lib.es2020.d.ts +25 -0
  405. package/templates/basic/node_modules/typescript/lib/lib.es2020.date.d.ts +40 -0
  406. package/templates/basic/node_modules/typescript/lib/lib.es2020.full.d.ts +22 -0
  407. package/templates/basic/node_modules/typescript/lib/lib.es2020.intl.d.ts +472 -0
  408. package/templates/basic/node_modules/typescript/lib/lib.es2020.number.d.ts +26 -0
  409. package/templates/basic/node_modules/typescript/lib/lib.es2020.promise.d.ts +45 -0
  410. package/templates/basic/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts +97 -0
  411. package/templates/basic/node_modules/typescript/lib/lib.es2020.string.d.ts +42 -0
  412. package/templates/basic/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts +39 -0
  413. package/templates/basic/node_modules/typescript/lib/lib.es2021.d.ts +21 -0
  414. package/templates/basic/node_modules/typescript/lib/lib.es2021.full.d.ts +22 -0
  415. package/templates/basic/node_modules/typescript/lib/lib.es2021.intl.d.ts +164 -0
  416. package/templates/basic/node_modules/typescript/lib/lib.es2021.promise.d.ts +46 -0
  417. package/templates/basic/node_modules/typescript/lib/lib.es2021.string.d.ts +31 -0
  418. package/templates/basic/node_modules/typescript/lib/lib.es2021.weakref.d.ts +76 -0
  419. package/templates/basic/node_modules/typescript/lib/lib.es2022.array.d.ts +119 -0
  420. package/templates/basic/node_modules/typescript/lib/lib.es2022.d.ts +23 -0
  421. package/templates/basic/node_modules/typescript/lib/lib.es2022.error.d.ts +73 -0
  422. package/templates/basic/node_modules/typescript/lib/lib.es2022.full.d.ts +22 -0
  423. package/templates/basic/node_modules/typescript/lib/lib.es2022.intl.d.ts +143 -0
  424. package/templates/basic/node_modules/typescript/lib/lib.es2022.object.d.ts +24 -0
  425. package/templates/basic/node_modules/typescript/lib/lib.es2022.regexp.d.ts +37 -0
  426. package/templates/basic/node_modules/typescript/lib/lib.es2022.string.d.ts +23 -0
  427. package/templates/basic/node_modules/typescript/lib/lib.es2023.array.d.ts +922 -0
  428. package/templates/basic/node_modules/typescript/lib/lib.es2023.collection.d.ts +19 -0
  429. package/templates/basic/node_modules/typescript/lib/lib.es2023.d.ts +20 -0
  430. package/templates/basic/node_modules/typescript/lib/lib.es2023.full.d.ts +22 -0
  431. package/templates/basic/node_modules/typescript/lib/lib.es2023.intl.d.ts +62 -0
  432. package/templates/basic/node_modules/typescript/lib/lib.es2024.arraybuffer.d.ts +63 -0
  433. package/templates/basic/node_modules/typescript/lib/lib.es2024.collection.d.ts +27 -0
  434. package/templates/basic/node_modules/typescript/lib/lib.es2024.d.ts +24 -0
  435. package/templates/basic/node_modules/typescript/lib/lib.es2024.full.d.ts +22 -0
  436. package/templates/basic/node_modules/typescript/lib/lib.es2024.object.d.ts +27 -0
  437. package/templates/basic/node_modules/typescript/lib/lib.es2024.promise.d.ts +33 -0
  438. package/templates/basic/node_modules/typescript/lib/lib.es2024.regexp.d.ts +23 -0
  439. package/templates/basic/node_modules/typescript/lib/lib.es2024.sharedmemory.d.ts +66 -0
  440. package/templates/basic/node_modules/typescript/lib/lib.es2024.string.d.ts +27 -0
  441. package/templates/basic/node_modules/typescript/lib/lib.es2025.collection.d.ts +94 -0
  442. package/templates/basic/node_modules/typescript/lib/lib.es2025.d.ts +23 -0
  443. package/templates/basic/node_modules/typescript/lib/lib.es2025.float16.d.ts +443 -0
  444. package/templates/basic/node_modules/typescript/lib/lib.es2025.full.d.ts +22 -0
  445. package/templates/basic/node_modules/typescript/lib/lib.es2025.intl.d.ts +200 -0
  446. package/templates/basic/node_modules/typescript/lib/lib.es2025.iterator.d.ts +146 -0
  447. package/templates/basic/node_modules/typescript/lib/lib.es2025.promise.d.ts +32 -0
  448. package/templates/basic/node_modules/typescript/lib/lib.es2025.regexp.d.ts +30 -0
  449. package/templates/basic/node_modules/typescript/lib/lib.es5.d.ts +4599 -0
  450. package/templates/basic/node_modules/typescript/lib/lib.es6.d.ts +21 -0
  451. package/templates/basic/node_modules/typescript/lib/lib.esnext.array.d.ts +33 -0
  452. package/templates/basic/node_modules/typescript/lib/lib.esnext.collection.d.ts +47 -0
  453. package/templates/basic/node_modules/typescript/lib/lib.esnext.d.ts +27 -0
  454. package/templates/basic/node_modules/typescript/lib/lib.esnext.date.d.ts +21 -0
  455. package/templates/basic/node_modules/typescript/lib/lib.esnext.decorators.d.ts +26 -0
  456. package/templates/basic/node_modules/typescript/lib/lib.esnext.disposable.d.ts +191 -0
  457. package/templates/basic/node_modules/typescript/lib/lib.esnext.error.d.ts +22 -0
  458. package/templates/basic/node_modules/typescript/lib/lib.esnext.full.d.ts +22 -0
  459. package/templates/basic/node_modules/typescript/lib/lib.esnext.intl.d.ts +107 -0
  460. package/templates/basic/node_modules/typescript/lib/lib.esnext.sharedmemory.d.ts +23 -0
  461. package/templates/basic/node_modules/typescript/lib/lib.esnext.temporal.d.ts +485 -0
  462. package/templates/basic/node_modules/typescript/lib/lib.esnext.typedarrays.d.ts +90 -0
  463. package/templates/basic/node_modules/typescript/lib/lib.scripthost.d.ts +320 -0
  464. package/templates/basic/node_modules/typescript/lib/lib.webworker.asynciterable.d.ts +18 -0
  465. package/templates/basic/node_modules/typescript/lib/lib.webworker.d.ts +15606 -0
  466. package/templates/basic/node_modules/typescript/lib/lib.webworker.importscripts.d.ts +21 -0
  467. package/templates/basic/node_modules/typescript/lib/lib.webworker.iterable.d.ts +18 -0
  468. package/templates/basic/node_modules/typescript/lib/pl/diagnosticMessages.generated.json +2129 -0
  469. package/templates/basic/node_modules/typescript/lib/pt-br/diagnosticMessages.generated.json +2129 -0
  470. package/templates/basic/node_modules/typescript/lib/ru/diagnosticMessages.generated.json +2125 -0
  471. package/templates/basic/node_modules/typescript/lib/tr/diagnosticMessages.generated.json +2129 -0
  472. package/templates/basic/node_modules/typescript/lib/tsc.js +8 -0
  473. package/templates/basic/node_modules/typescript/lib/tsserver.js +8 -0
  474. package/templates/basic/node_modules/typescript/lib/tsserverlibrary.d.ts +17 -0
  475. package/templates/basic/node_modules/typescript/lib/tsserverlibrary.js +21 -0
  476. package/templates/basic/node_modules/typescript/lib/typesMap.json +497 -0
  477. package/templates/basic/node_modules/typescript/lib/typescript.d.ts +11448 -0
  478. package/templates/basic/node_modules/typescript/lib/typescript.js +201039 -0
  479. package/templates/basic/node_modules/typescript/lib/typingsInstaller.js +8 -0
  480. package/templates/basic/node_modules/typescript/lib/watchGuard.js +53 -0
  481. package/templates/basic/node_modules/typescript/lib/zh-cn/diagnosticMessages.generated.json +2129 -0
  482. package/templates/basic/node_modules/typescript/lib/zh-tw/diagnosticMessages.generated.json +2125 -0
  483. package/templates/basic/node_modules/typescript/package.json +118 -0
  484. package/templates/basic/node_modules/vite/LICENSE.md +2287 -0
  485. package/templates/basic/node_modules/vite/README.md +20 -0
  486. package/templates/basic/node_modules/vite/bin/openChrome.js +68 -0
  487. package/templates/basic/node_modules/vite/bin/vite.js +79 -0
  488. package/templates/basic/node_modules/vite/client.d.ts +285 -0
  489. package/templates/basic/node_modules/vite/dist/client/client.mjs +1269 -0
  490. package/templates/basic/node_modules/vite/dist/client/env.mjs +18 -0
  491. package/templates/basic/node_modules/vite/dist/node/chunks/build.js +5371 -0
  492. package/templates/basic/node_modules/vite/dist/node/chunks/dist.js +6784 -0
  493. package/templates/basic/node_modules/vite/dist/node/chunks/lib.js +371 -0
  494. package/templates/basic/node_modules/vite/dist/node/chunks/logger.js +364 -0
  495. package/templates/basic/node_modules/vite/dist/node/chunks/moduleRunnerTransport.d.ts +96 -0
  496. package/templates/basic/node_modules/vite/dist/node/chunks/node.js +35836 -0
  497. package/templates/basic/node_modules/vite/dist/node/chunks/postcss-import.js +467 -0
  498. package/templates/basic/node_modules/vite/dist/node/cli.js +836 -0
  499. package/templates/basic/node_modules/vite/dist/node/index.d.ts +4011 -0
  500. package/templates/basic/node_modules/vite/dist/node/index.js +3 -0
  501. package/templates/basic/node_modules/vite/dist/node/internal.d.ts +2 -0
  502. package/templates/basic/node_modules/vite/dist/node/internal.js +2 -0
  503. package/templates/basic/node_modules/vite/dist/node/module-runner.d.ts +314 -0
  504. package/templates/basic/node_modules/vite/dist/node/module-runner.js +1274 -0
  505. package/templates/basic/node_modules/vite/misc/false.js +1 -0
  506. package/templates/basic/node_modules/vite/misc/true.js +1 -0
  507. package/templates/basic/node_modules/vite/package.json +194 -0
  508. package/templates/basic/node_modules/vite/types/customEvent.d.ts +79 -0
  509. package/templates/basic/node_modules/vite/types/hmrPayload.d.ts +80 -0
  510. package/templates/basic/node_modules/vite/types/hot.d.ts +39 -0
  511. package/templates/basic/node_modules/vite/types/import-meta.d.ts +5 -0
  512. package/templates/basic/node_modules/vite/types/importGlob.d.ts +131 -0
  513. package/templates/basic/node_modules/vite/types/importMeta.d.ts +30 -0
  514. package/templates/basic/node_modules/vite/types/internal/cssPreprocessorOptions.d.ts +44 -0
  515. package/templates/basic/node_modules/vite/types/internal/esbuildOptions.d.ts +28 -0
  516. package/templates/basic/node_modules/vite/types/internal/lightningcssOptions.d.ts +18 -0
  517. package/templates/basic/node_modules/vite/types/internal/rollupTypeCompat.d.ts +24 -0
  518. package/templates/basic/node_modules/vite/types/internal/terserOptions.d.ts +11 -0
  519. package/templates/basic/node_modules/vite/types/metadata.d.ts +47 -0
  520. package/templates/basic/package-lock.json +926 -0
  521. package/templates/basic/package.json +18 -0
  522. package/templates/basic/public/apple-touch-icon.png +0 -0
  523. package/templates/basic/public/favicon-16x16.png +0 -0
  524. package/templates/basic/public/favicon-32x32.png +0 -0
  525. package/templates/basic/public/favicon.ico +0 -0
  526. package/templates/basic/public/icon-192.png +0 -0
  527. package/templates/basic/public/icon-512.png +0 -0
  528. package/templates/basic/public/nuclo-logo.svg +24 -0
  529. package/templates/basic/public/site.webmanifest +23 -0
  530. package/templates/basic/src/app.ts +37 -0
  531. package/templates/basic/src/main.ts +5 -0
  532. package/templates/basic/src/styles.ts +85 -0
  533. package/templates/basic/tsconfig.json +23 -0
  534. package/templates/basic/vite.config.ts +3 -0
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Base Node class for instanceof checks in Node.js polyfill
3
+ */
4
+ export declare class NucloNode {
5
+ nodeType: number;
6
+ nodeName: string;
7
+ nodeValue: string | null;
8
+ parentNode: unknown;
9
+ _childNodes: Node[] | null;
10
+ textContent: string;
11
+ get childNodes(): NodeListOf<ChildNode>;
12
+ }
13
+ //# sourceMappingURL=Node.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Node.d.ts","sourceRoot":"","sources":["../../src/polyfill/Node.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,qBAAa,SAAS;IACpB,QAAQ,EAAE,MAAM,CAAK;IACrB,QAAQ,EAAE,MAAM,CAAM;IACtB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAQ;IAChC,UAAU,EAAE,OAAO,CAAQ;IAC3B,WAAW,EAAE,IAAI,EAAE,GAAG,IAAI,CAAQ;IAClC,WAAW,EAAE,MAAM,CAAM;IAEzB,IAAI,UAAU,IAAI,UAAU,CAAC,SAAS,CAAC,CAgCtC;CACF"}
@@ -0,0 +1,11 @@
1
+ export declare class NucloText {
2
+ nodeType: number;
3
+ nodeName: string;
4
+ data: string;
5
+ textContent: string;
6
+ parentNode: unknown;
7
+ constructor(data: string);
8
+ get nodeValue(): string;
9
+ set nodeValue(value: string);
10
+ }
11
+ //# sourceMappingURL=Text.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../../src/polyfill/Text.ts"],"names":[],"mappings":"AAAA,qBAAa,SAAS;IACpB,QAAQ,SAAK;IACb,QAAQ,SAAW;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,OAAO,CAAQ;gBAEf,IAAI,EAAE,MAAM;IAKxB,IAAI,SAAS,IAAI,MAAM,CAEtB;IAED,IAAI,SAAS,CAAC,KAAK,EAAE,MAAM,EAG1B;CACF"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Polyfills for Node.js environments
3
+ *
4
+ * This module provides minimal browser API polyfills to allow Nuclo to run in Node.js
5
+ * for server-side rendering (SSR) scenarios.
6
+ *
7
+ * To use in Node.js:
8
+ * ```typescript
9
+ * import 'nuclo/polyfill';
10
+ * // or
11
+ * import { document, Event, CustomEvent } from 'nuclo/polyfill';
12
+ * ```
13
+ */
14
+ export { NucloDocument, document } from './Document';
15
+ export { NucloElement } from './Element';
16
+ export { NucloText } from './Text';
17
+ export { NucloEvent, NucloCustomEvent, Event, CustomEvent } from './Event';
18
+ export { NucloNode } from './Node';
19
+ import { NucloElement } from './Element';
20
+ import { NucloNode } from './Node';
21
+ export declare const Node: typeof NucloNode;
22
+ export declare const Element: typeof NucloElement;
23
+ export declare const HTMLElement: typeof NucloElement;
24
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/polyfill/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAC3E,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAGnC,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAInC,eAAO,MAAM,IAAI,kBAAY,CAAC;AAC9B,eAAO,MAAM,OAAO,qBAAe,CAAC;AACpC,eAAO,MAAM,WAAW,qBAAe,CAAC"}
@@ -0,0 +1,2 @@
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=typeof window<`u`&&typeof document<`u`;var t=class{nodeType=1;nodeName=``;nodeValue=null;parentNode=null;_childNodes=null;textContent=``;get childNodes(){let e=this._childNodes??[];return{...e,length:e.length,item:t=>e[t]||null,[Symbol.iterator]:function*(){for(let t of e)yield t},forEach:t=>{for(let n=0;n<e.length;n++)t(e[n],n,this.childNodes)},entries:function*(){for(let t=0;t<e.length;t++)yield[t,e[t]]},keys:function*(){for(let t=0;t<e.length;t++)yield t},values:function*(){for(let t of e)yield t}}}},n=class{get cssText(){let e=Object.entries(this);return e.length===0?``:e.map(([e,t])=>`${e}: ${t}`).join(`; `)}setProperty(e,t){this[e]=t}getPropertyValue(e){return this[e]||``}},r=class{_el;constructor(e){this._el=e}add(...e){let t=this._el.className?this._el.className.split(` `).filter(Boolean):[];for(let n of e)n&&!t.includes(n)&&t.push(n);this._el.className=t.join(` `)}remove(...e){this._el.className&&(this._el.className=this._el.className.split(` `).filter(t=>t&&!e.includes(t)).join(` `))}contains(e){return!!this._el.className&&this._el.className.split(` `).includes(e)}toggle(e,t){let n=this.contains(e);return t===void 0?n?(this.remove(e),!1):(this.add(e),!0):t?(this.add(e),!0):(this.remove(e),!1)}replace(e,t){return this.contains(e)?(this.remove(e),this.add(t),!0):!1}item(e){return this._el.className.split(` `).filter(Boolean)[e]??null}get length(){return this._el.className?this._el.className.split(` `).filter(Boolean).length:0}get value(){return this._el.className}set value(e){this._el.className=e}toString(){return this._el.className}supports(e){return!1}forEach(e){let t=this._el.className.split(` `).filter(Boolean);for(let n=0;n<t.length;n++)e(t[n],n,this)}[Symbol.iterator](){let e=this._el.className.split(` `).filter(Boolean),t=0;return{next(){return t<e.length?{value:e[t++],done:!1}:{value:``,done:!0}}}}entries(){let e=this._el.className.split(` `).filter(Boolean),t=0;return{next(){return t<e.length?{value:[t,e[t++]],done:!1}:{value:[0,``],done:!0}}}}keys(){let e=this.length,t=0;return{next(){return t<e?{value:t++,done:!1}:{value:0,done:!0}}}}values(){return this[Symbol.iterator]()}};function i(e){return typeof e==`object`&&!!e&&`tagName`in e}function a(e){return typeof e==`object`&&!!e&&`nodeType`in e&&e.nodeType===3}function o(e){return typeof e==`object`&&!!e&&`nodeType`in e&&e.nodeType===8}var s=class extends t{tagName;children;className=``;textContent=``;_innerHTML=``;parentNode=null;rawMods;mods;id=``;namespaceURI;sheet;_listeners;_style;_classList;_attributes;get attributes(){return this._attributes??=new Map}set attributes(e){this._attributes=e}get style(){return this._style??=new n}set style(e){this._style=e}get classList(){return this._classList??=new r(this)}set classList(e){this._classList=e}get innerHTML(){return this.serializeChildren()}set innerHTML(e){this._innerHTML=e}serializeChildren(){let e=``;for(let t of this.children)i(t)?e+=this.serializeElement(t):a(t)?e+=t.textContent||``:o(t)&&(e+=`<!--${t.data||``}-->`);return e}serializeElement(e){let t=e.tagName.toLowerCase(),n=`<${t}`;if(e.id&&(n+=` id="${e.id}"`),e.className&&(n+=` class="${e.className}"`),e._attributes)for(let[t,r]of e._attributes)t!==`id`&&t!==`class`&&(n+=` ${t}="${r}"`);if(n+=`>`,e.children&&e.children.length>0)for(let t of e.children)i(t)?n+=this.serializeElement(t):a(t)?n+=t.textContent||``:o(t)&&(n+=`<!--${t.data||``}-->`);return n+=`</${t}>`,n}constructor(t){if(super(),this.tagName=t.toLowerCase(),this.nodeType=1,this.nodeName=t.toUpperCase(),this.children=[],!e)this._listeners=null;else{this._listeners=new Map;let e={};if(this.style=new Proxy({},{get:(t,n)=>n===`setProperty`?(t,n)=>{e[t]=n}:n===`getPropertyValue`?t=>e[t]||``:n===`cssText`?Object.entries(e).map(([e,t])=>`${e}: ${t}`).join(`; `):e[n],set:(t,n,r)=>(e[n]=r,!0)}),this.tagName===`style`){let e=[];this.sheet={cssRules:e,insertRule:(t,n)=>{let r=n??e.length,i;if(t.trim().startsWith(`@`)){let e=[],n=t.replace(/^@\w+\s+/,``).replace(/\s*\{[\s\S]*\}$/,``).trim();i={cssText:t,conditionText:n,media:{mediaText:n},cssRules:e,insertRule:(t,n)=>{let r=n??e.length;return e.splice(r,0,{cssText:t,selectorText:t.split(`{`)[0].trim(),style:{},type:1}),r},deleteRule:t=>{e.splice(t,1)},type:4}}else i={cssText:t,selectorText:t.split(`{`)[0].trim(),style:{},type:1};return e.splice(r,0,i),r},deleteRule:t=>{e.splice(t,1)}}}this.classList=c(this)}}appendChild(t){if(t?.nodeType===11){let e=t.childNodes.slice();for(let t=0;t<e.length;t++)this.appendChild(e[t]);return t.childNodes=[],t.children&&=[],t}return this.children.push(t),e&&this._childNodes&&this._childNodes.push(t),typeof t==`object`&&t&&`parentNode`in t&&(t.parentNode=this),t}setAttribute(e,t){(this._attributes??=new Map).set(e,t),e===`class`?this.className=t:e===`id`&&(this.id=t)}getAttribute(e){return this._attributes?.get(e)??null}removeAttribute(e){this._attributes?.delete(e),e===`class`&&(this.className=``)}hasAttribute(e){return this._attributes?.has(e)??!1}insertBefore(t,n){if(n===null)return this.appendChild(t);if(t?.nodeType===11){let e=t.childNodes.slice();for(let t=0;t<e.length;t++)this.insertBefore(e[t],n);return t.childNodes=[],t.children&&=[],t}let r=this.children.indexOf(n);if(r!==-1){if(this.children.splice(r,0,t),e&&this._childNodes){let e=this._childNodes.indexOf(n);e!==-1&&this._childNodes.splice(e,0,t)}typeof t==`object`&&t&&`parentNode`in t&&(t.parentNode=this)}return t}removeChild(t){let n=this.children.indexOf(t);if(n!==-1){if(this.children.splice(n,1),e&&this._childNodes){let e=this._childNodes.indexOf(t);e!==-1&&this._childNodes.splice(e,1)}typeof t==`object`&&t&&`parentNode`in t&&(t.parentNode=null)}return t}replaceChild(t,n){let r=this.children.indexOf(n);if(r!==-1){if(this.children[r]=t,e&&this._childNodes){let e=this._childNodes.indexOf(n);e!==-1&&(this._childNodes[e]=t)}typeof t==`object`&&t&&`parentNode`in t&&(t.parentNode=this),typeof n==`object`&&n&&`parentNode`in n&&(n.parentNode=null)}return n}addEventListener(e,t){this._listeners&&(this._listeners.has(e)||this._listeners.set(e,new Set),this._listeners.get(e).add(t))}removeEventListener(e,t){let n=this._listeners?.get(e);n&&n.delete(t)}dispatchEvent(e){let t=this._listeners?.get(e.type);if(t)for(let n of t)try{n(e)}catch(e){console.error(`Error in event listener:`,e)}return e.bubbles&&this.parentNode&&typeof this.parentNode==`object`&&`dispatchEvent`in this.parentNode&&typeof this.parentNode.dispatchEvent==`function`&&this.parentNode.dispatchEvent(e),!0}querySelector(e){if(e.startsWith(`#`)){let t=e.slice(1);return this.querySelectorById(t)}else if(e.startsWith(`.`)){let t=e.slice(1);return this.querySelectorByClass(t)}else return this.querySelectorByTag(e)}querySelectorById(e){if(this.id===e)return this;for(let t of this.children)if(i(t)){if(t.id===e)return t;let n=t.querySelector(`#${e}`);if(n)return n}return null}querySelectorByClass(e){if(this.classList.contains(e))return this;for(let t of this.children)if(i(t)){if(t.classList?.contains(e))return t;let n=t.querySelector(`.${e}`);if(n)return n}return null}querySelectorByTag(e){let t=e.toLowerCase();if(this.tagName.toLowerCase()===t)return this;for(let n of this.children)if(i(n)){if(n.tagName.toLowerCase()===t)return n;let r=n.querySelector(e);if(r)return r}return null}querySelectorAll(e){let t=[];if(e.startsWith(`#`)){let n=this.querySelector(e);n&&t.push(n)}else if(e.startsWith(`.`)){let n=e.slice(1);this.querySelectorAllByClass(n,t)}else{let n=e.toLowerCase();this.querySelectorAllByTag(n,t)}return t}querySelectorAllByClass(e,t){this.classList.contains(e)&&t.push(this);for(let n of this.children)i(n)&&n.querySelectorAllByClass(e,t)}querySelectorAllByTag(e,t){this.tagName.toLowerCase()===e&&t.push(this);for(let n of this.children)i(n)&&n.querySelectorAllByTag(e,t)}};function c(e){let t=()=>e.className.split(` `).filter(e=>e),n=t=>{e.className=t.join(` `)},r={add:(...e)=>{let r=t();for(let t of e)t&&!r.includes(t)&&r.push(t);n(r)},remove:(...e)=>{e.length!==0&&n(t().filter(t=>!e.includes(t)))},toggle:(e,t)=>{let n=r.contains(e);return t===void 0?n?(r.remove(e),!1):(r.add(e),!0):t?(r.add(e),!0):(r.remove(e),!1)},contains:e=>t().includes(e),replace:(e,r)=>{let i=t(),a=i.indexOf(e);return a===-1?!1:(i[a]=r,n(i),!0)},item:e=>t()[e]||null,get length(){return t().length},toString:()=>e.className,[Symbol.iterator]:function*(){yield*t()},forEach:e=>{let n=t();for(let t=0;t<n.length;t++)e(n[t],t,r)},entries:function*(){let e=t();for(let t=0;t<e.length;t++)yield[t,e[t]]},keys:function*(){let e=t();for(let t=0;t<e.length;t++)yield t},values:function*(){yield*t()},get value(){return e.className},set value(t){e.className=t},supports:e=>!1};return r}var l=class{nodeType=3;nodeName=`#text`;data;textContent;parentNode=null;constructor(e){this.data=e,this.textContent=e}get nodeValue(){return this.data}set nodeValue(e){this.data=e,this.textContent=e}},u=class{nodeType=11;nodeName=`#document-fragment`;childNodes=[];children=[];textContent=``;get firstChild(){return this.childNodes.length>0?this.childNodes[0]:null}get lastChild(){return this.childNodes.length>0?this.childNodes[this.childNodes.length-1]:null}appendChild(e){return this.childNodes.push(e),e.nodeType===1&&this.children.push(e),e.parentNode=this,e}insertBefore(e,t){if(!t)return this.appendChild(e);let n=this.childNodes.indexOf(t);if(n!==-1&&(this.childNodes.splice(n,0,e),e.nodeType===1)){let n=this.children.indexOf(t);n!==-1&&this.children.splice(n,0,e)}return e.parentNode=this,e}removeChild(e){let t=this.childNodes.indexOf(e);if(t!==-1&&this.childNodes.splice(t,1),e.nodeType===1){let t=this.children.indexOf(e);t!==-1&&this.children.splice(t,1)}return e.parentNode=null,e}replaceChild(e,t){let n=this.childNodes.indexOf(t);if(n!==-1&&(this.childNodes[n]=e,t.nodeType===1&&e.nodeType===1)){let n=this.children.indexOf(t);n!==-1&&(this.children[n]=e)}return e.parentNode=this,t.parentNode=null,e}querySelector(){return null}querySelectorAll(){return[]}},d=class{head;body;_listeners;constructor(){this.head=new s(`head`),this.body=new s(`body`),this._listeners=new Map}createElement(e,t){return new s(e)}createElementNS(e,t,n){let r=new s(t);return r.namespaceURI=e,r}createTextNode(e){return new l(e)}createComment(e){return{nodeType:8,nodeName:`#comment`,data:e,textContent:e,nodeValue:e,parentNode:null,nextSibling:null,previousSibling:null}}createDocumentFragment(){return new u}querySelector(e){if(e.startsWith(`#`)){let t=e.slice(1);if(t===`nuclo-styles`&&this.head.children){for(let e of this.head.children)if(e.id===t)return e}}return null}querySelectorAll(e){return[]}addEventListener(e,t,n){this._listeners.has(e)||this._listeners.set(e,new Map),this._listeners.get(e).set(t,{listener:t,options:n})}removeEventListener(e,t,n){let r=this._listeners.get(e);r&&(r.delete(t),r.size===0&&this._listeners.delete(e))}dispatchEvent(e){let t=this._listeners.get(e.type);if(t){let n=Array.from(t.values());for(let t=0;t<n.length;t++){let{listener:r}=n[t];try{r(e)}catch(e){console.error(`Error in event listener:`,e)}}}return!0}contains(e){return!1}};const f=globalThis.document||new d;var p=class{type;bubbles;cancelable;composed;currentTarget=null;defaultPrevented=!1;eventPhase=0;isTrusted=!1;target=null;timeStamp;AT_TARGET=2;BUBBLING_PHASE=3;CAPTURING_PHASE=1;NONE=0;returnValue=!0;srcElement=null;cancelBubble=!1;constructor(e,t){this.type=e,this.bubbles=t?.bubbles||!1,this.cancelable=t?.cancelable||!1,this.composed=t?.composed||!1,this.timeStamp=Date.now()}composedPath(){return[]}initEvent(e,t,n){}preventDefault(){this.cancelable&&(this.defaultPrevented=!0)}stopImmediatePropagation(){this.cancelBubble=!0}stopPropagation(){this.cancelBubble=!0}},m=class extends p{detail;constructor(e,t){super(e,t),this.detail=t?.detail}initCustomEvent(e,t,n,r){}};const h=globalThis.Event||p,g=globalThis.CustomEvent||m,_=t,v=s,y=s;if(typeof window>`u`&&typeof globalThis<`u`){let e=globalThis;e.document||=f,e.Event||=h,e.CustomEvent||=g,e.Node||=t,e.Element||=s,e.HTMLElement||=s}exports.CustomEvent=g,exports.Element=v,exports.Event=h,exports.HTMLElement=y,exports.Node=_,exports.NucloCustomEvent=m,exports.NucloDocument=d,exports.NucloElement=s,exports.NucloEvent=p,exports.NucloNode=t,exports.NucloText=l,exports.document=f;
2
+ //# sourceMappingURL=nuclo.polyfill.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nuclo.polyfill.cjs","names":["document","document"],"sources":["../../src/shared/environment.ts","../../src/polyfill/Node.ts","../../src/polyfill/Element.ts","../../src/polyfill/Text.ts","../../src/polyfill/Document.ts","../../src/polyfill/Event.ts","../../src/polyfill/index.ts"],"sourcesContent":["/**\n * Simplified environment detection - minimal overhead for smaller bundle size\n */\n\n// Basic environment detection - no complex caching or edge cases\nexport const isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined';\n","/**\n * Base Node class for instanceof checks in Node.js polyfill\n */\nexport class NucloNode {\n nodeType: number = 1; // ELEMENT_NODE\n nodeName: string = '';\n nodeValue: string | null = null;\n parentNode: unknown = null;\n _childNodes: Node[] | null = null;\n textContent: string = '';\n\n get childNodes(): NodeListOf<ChildNode> {\n const nodes = this._childNodes ?? [];\n return {\n ...nodes,\n length: nodes.length,\n item: (index: number) => (nodes[index] as ChildNode) || null,\n [Symbol.iterator]: function* () {\n for (const node of nodes) {\n yield node as ChildNode;\n }\n },\n forEach: (callback: (value: ChildNode, key: number, parent: NodeListOf<ChildNode>) => void) => {\n for (let i = 0; i < nodes.length; i++) {\n callback(nodes[i] as ChildNode, i, this.childNodes);\n }\n },\n entries: function* () {\n for (let i = 0; i < nodes.length; i++) {\n yield [i, nodes[i] as ChildNode] as [number, ChildNode];\n }\n },\n keys: function* () {\n for (let i = 0; i < nodes.length; i++) {\n yield i;\n }\n },\n values: function* () {\n for (const node of nodes) {\n yield node as ChildNode;\n }\n }\n } as unknown as NodeListOf<ChildNode>;\n }\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { NucloNode } from './Node';\nimport { isBrowser } from '../shared/environment';\n\n/**\n * Lightweight style object for SSR — prototype methods instead of Object.defineProperty per element.\n * Stores CSS properties as own properties and provides cssText/setProperty/getPropertyValue via prototype.\n */\nclass SSRStyle {\n [key: string]: unknown;\n\n get cssText(): string {\n const entries = Object.entries(this);\n if (entries.length === 0) return '';\n return entries.map(([k, v]) => `${k}: ${v}`).join('; ');\n }\n\n setProperty(name: string, value: string): void {\n (this as Record<string, unknown>)[name] = value;\n }\n\n getPropertyValue(name: string): string {\n return ((this as Record<string, unknown>)[name] as string) || '';\n }\n}\n\n// Lightweight classList for SSR — prototype methods instead of per-element closures\nclass SSRClassList {\n private _el: NucloElement;\n constructor(el: NucloElement) { this._el = el; }\n\n add(...tokens: string[]): void {\n const classes = this._el.className ? this._el.className.split(' ').filter(Boolean) : [];\n for (const t of tokens) if (t && !classes.includes(t)) classes.push(t);\n this._el.className = classes.join(' ');\n }\n remove(...tokens: string[]): void {\n if (!this._el.className) return;\n this._el.className = this._el.className.split(' ').filter(c => c && !tokens.includes(c)).join(' ');\n }\n contains(token: string): boolean {\n return !!this._el.className && this._el.className.split(' ').includes(token);\n }\n toggle(token: string, force?: boolean): boolean {\n const has = this.contains(token);\n if (force === undefined) { if (has) { this.remove(token); return false; } this.add(token); return true; }\n if (force) { this.add(token); return true; }\n this.remove(token); return false;\n }\n replace(oldToken: string, newToken: string): boolean {\n if (!this.contains(oldToken)) return false;\n this.remove(oldToken); this.add(newToken); return true;\n }\n item(index: number): string | null { return (this._el.className.split(' ').filter(Boolean)[index]) ?? null; }\n get length(): number { return this._el.className ? this._el.className.split(' ').filter(Boolean).length : 0; }\n get value(): string { return this._el.className; }\n set value(v: string) { this._el.className = v; }\n toString(): string { return this._el.className; }\n supports(_token: string): boolean { return false; }\n forEach(cb: (value: string, key: number, parent: DOMTokenList) => void): void {\n const classes = this._el.className.split(' ').filter(Boolean);\n for (let i = 0; i < classes.length; i++) cb(classes[i], i, this as unknown as DOMTokenList);\n }\n [Symbol.iterator](): Iterator<string> {\n const classes = this._el.className.split(' ').filter(Boolean);\n let i = 0;\n return { next(): IteratorResult<string> { return i < classes.length ? { value: classes[i++], done: false } : { value: '', done: true }; } };\n }\n entries(): Iterator<[number, string]> {\n const classes = this._el.className.split(' ').filter(Boolean);\n let i = 0;\n return { next(): IteratorResult<[number, string]> { return i < classes.length ? { value: [i, classes[i++]], done: false } : { value: [0, ''], done: true }; } };\n }\n keys(): Iterator<number> {\n const len = this.length; let i = 0;\n return { next(): IteratorResult<number> { return i < len ? { value: i++, done: false } : { value: 0, done: true }; } };\n }\n values(): Iterator<string> { return this[Symbol.iterator](); }\n}\n\ninterface TextNode {\n nodeType: 3;\n textContent: string;\n}\n\ninterface CommentNode {\n nodeType: 8;\n data: string;\n}\n\nfunction isElementNode(node: unknown): node is NucloElement {\n return typeof node === 'object' && node !== null && 'tagName' in node;\n}\n\nfunction isTextNode(node: unknown): node is TextNode {\n return typeof node === 'object' && node !== null && 'nodeType' in node && (node as { nodeType: number }).nodeType === 3;\n}\n\nfunction isCommentNode(node: unknown): node is CommentNode {\n return typeof node === 'object' && node !== null && 'nodeType' in node && (node as { nodeType: number }).nodeType === 8;\n}\n\nexport class NucloElement extends NucloNode {\n tagName: string;\n children: unknown[];\n className: string = '';\n textContent: string = '';\n private _innerHTML: string = '';\n parentNode: unknown = null;\n rawMods?: unknown[];\n mods?: unknown[];\n id: string = '';\n namespaceURI?: string;\n sheet?: CSSStyleSheet | null;\n private _listeners: Map<string, Set<EventListener>> | null;\n\n // style/classList are allocated lazily: the vast majority of SSR elements\n // never touch either (className is stored on the .className string, and the\n // serializer reads the backing field directly), so eagerly constructing an\n // SSRStyle + SSRClassList per element was pure allocation churn. The browser\n // path assigns these in the constructor, so its getter never lazy-allocates.\n private _style?: CSSStyleDeclaration;\n private _classList?: DOMTokenList;\n\n // attributes is allocated lazily too — most elements carry their identity on\n // .className/.id (separate string fields) and never call setAttribute. Reads\n // short-circuit on the undefined backing map without allocating; the\n // serializer reads _attributes directly. The public getter still lazily\n // materializes a Map for any external `el.attributes` consumer.\n private _attributes?: Map<string, string>;\n\n get attributes(): Map<string, string> {\n return (this._attributes ??= new Map<string, string>());\n }\n set attributes(value: Map<string, string>) {\n this._attributes = value;\n }\n\n get style(): CSSStyleDeclaration {\n return (this._style ??= new SSRStyle() as unknown as CSSStyleDeclaration);\n }\n set style(value: CSSStyleDeclaration) {\n this._style = value;\n }\n\n get classList(): DOMTokenList {\n return (this._classList ??= new SSRClassList(this) as unknown as DOMTokenList);\n }\n set classList(value: DOMTokenList) {\n this._classList = value;\n }\n\n get innerHTML(): string {\n return this.serializeChildren();\n }\n\n set innerHTML(value: string) {\n this._innerHTML = value;\n }\n \n private serializeChildren(): string {\n let html = '';\n for (const child of this.children) {\n if (isElementNode(child)) {\n html += this.serializeElement(child);\n } else if (isTextNode(child)) {\n html += child.textContent || '';\n } else if (isCommentNode(child)) {\n html += `<!--${child.data || ''}-->`;\n }\n }\n return html;\n }\n \n private serializeElement(element: NucloElement): string {\n const tag = element.tagName.toLowerCase();\n let html = `<${tag}`;\n \n // Add attributes\n if (element.id) {\n html += ` id=\"${element.id}\"`;\n }\n if (element.className) {\n html += ` class=\"${element.className}\"`;\n }\n if (element._attributes) {\n for (const [name, value] of element._attributes) {\n if (name !== 'id' && name !== 'class') {\n html += ` ${name}=\"${value}\"`;\n }\n }\n }\n \n html += '>';\n \n // Add children\n if (element.children && element.children.length > 0) {\n for (const child of element.children) {\n if (isElementNode(child)) {\n html += this.serializeElement(child);\n } else if (isTextNode(child)) {\n html += child.textContent || '';\n } else if (isCommentNode(child)) {\n html += `<!--${child.data || ''}-->`;\n }\n }\n }\n \n html += `</${tag}>`;\n return html;\n }\n \n constructor(tagName: string) {\n super();\n this.tagName = tagName.toLowerCase();\n this.nodeType = 1; // ELEMENT_NODE\n this.nodeName = tagName.toUpperCase();\n this.children = [];\n\n if (!isBrowser) {\n // ── SSR path: minimal allocations, no Proxy, no event listeners ──\n // style and classList stay unallocated until first access (see getters).\n this._listeners = null;\n } else {\n // ── Browser path: full-featured Proxy style + DOMTokenList ──\n this._listeners = new Map();\n\n const styleProps: Record<string, string> = {};\n this.style = new Proxy({} as CSSStyleDeclaration, {\n get: (_target, prop: string) => {\n if (prop === 'setProperty') return (name: string, value: string) => { styleProps[name] = value; };\n if (prop === 'getPropertyValue') return (name: string) => styleProps[name] || '';\n if (prop === 'cssText') return Object.entries(styleProps).map(([k, v]) => `${k}: ${v}`).join('; ');\n return styleProps[prop];\n },\n set: (_target, prop: string, value: string) => { styleProps[prop] = value; return true; },\n });\n\n // CSSStyleSheet mock for style elements (browser only)\n if (this.tagName === 'style') {\n const cssRules: CSSRule[] = [];\n this.sheet = {\n cssRules: cssRules as unknown as CSSRuleList,\n insertRule: (rule: string, index?: number) => {\n const idx = index ?? cssRules.length;\n let mockRule: CSSRule;\n if (rule.trim().startsWith('@')) {\n const innerRules: CSSRule[] = [];\n const conditionText = rule.replace(/^@\\w+\\s+/, '').replace(/\\s*\\{[\\s\\S]*\\}$/, '').trim();\n mockRule = {\n cssText: rule, conditionText,\n media: { mediaText: conditionText } as MediaList,\n cssRules: innerRules as unknown as CSSRuleList,\n insertRule: (innerRule: string, innerIndex?: number) => {\n const innerIdx = innerIndex ?? innerRules.length;\n innerRules.splice(innerIdx, 0, { cssText: innerRule, selectorText: innerRule.split('{')[0].trim(), style: {} as CSSStyleDeclaration, type: 1 } as unknown as CSSRule);\n return innerIdx;\n },\n deleteRule: (i: number) => { innerRules.splice(i, 1); },\n type: 4,\n } as unknown as CSSRule;\n } else {\n mockRule = { cssText: rule, selectorText: rule.split('{')[0].trim(), style: {} as CSSStyleDeclaration, type: 1 } as unknown as CSSRule;\n }\n cssRules.splice(idx, 0, mockRule);\n return idx;\n },\n deleteRule: (index: number) => { cssRules.splice(index, 1); },\n } as unknown as CSSStyleSheet;\n }\n\n this.classList = createClassList(this);\n }\n }\n \n appendChild<T extends Node>(child: T): T {\n // Spec behaviour: appending a DocumentFragment moves its children into this\n // node and leaves the fragment empty. The list runtime relies on this to\n // batch row insertions.\n if ((child as any)?.nodeType === 11) {\n const kids = ((child as any).childNodes as Node[]).slice();\n for (let i = 0; i < kids.length; i++) this.appendChild(kids[i]);\n (child as any).childNodes = [];\n if ((child as any).children) (child as any).children = [];\n return child;\n }\n this.children.push(child);\n if (isBrowser && (this as any)['_childNodes']) {\n (this as any)['_childNodes'].push(child);\n }\n if (typeof child === 'object' && child !== null && 'parentNode' in child) {\n (child as { parentNode: unknown }).parentNode = this;\n }\n return child;\n }\n \n setAttribute(name: string, value: string): void {\n (this._attributes ??= new Map<string, string>()).set(name, value);\n if (name === 'class') {\n this.className = value;\n } else if (name === 'id') {\n this.id = value;\n }\n }\n\n getAttribute(name: string): string | null {\n return this._attributes?.get(name) ?? null;\n }\n\n removeAttribute(name: string): void {\n this._attributes?.delete(name);\n if (name === 'class') {\n this.className = '';\n }\n }\n\n hasAttribute(name: string): boolean {\n return this._attributes?.has(name) ?? false;\n }\n \n insertBefore<T extends Node>(newNode: T, referenceNode: Node | null): T {\n if (referenceNode === null) {\n return this.appendChild(newNode);\n }\n // Spec behaviour: inserting a DocumentFragment moves its children (in order)\n // before the reference node and empties the fragment.\n if ((newNode as any)?.nodeType === 11) {\n const kids = ((newNode as any).childNodes as Node[]).slice();\n for (let i = 0; i < kids.length; i++) this.insertBefore(kids[i], referenceNode);\n (newNode as any).childNodes = [];\n if ((newNode as any).children) (newNode as any).children = [];\n return newNode;\n }\n const index = this.children.indexOf(referenceNode);\n if (index !== -1) {\n this.children.splice(index, 0, newNode);\n if (isBrowser && (this as any)['_childNodes']) {\n const childNodesIndex = (this as any)['_childNodes'].indexOf(referenceNode);\n if (childNodesIndex !== -1) {\n (this as any)['_childNodes'].splice(childNodesIndex, 0, newNode);\n }\n }\n if (typeof newNode === 'object' && newNode !== null && 'parentNode' in newNode) {\n (newNode as { parentNode: unknown }).parentNode = this;\n }\n }\n return newNode;\n }\n \n removeChild<T extends Node>(child: T): T {\n const index = this.children.indexOf(child);\n if (index !== -1) {\n this.children.splice(index, 1);\n if (isBrowser && (this as any)['_childNodes']) {\n const cnIndex = (this as any)['_childNodes'].indexOf(child);\n if (cnIndex !== -1) {\n (this as any)['_childNodes'].splice(cnIndex, 1);\n }\n }\n if (typeof child === 'object' && child !== null && 'parentNode' in child) {\n (child as { parentNode: unknown }).parentNode = null;\n }\n }\n return child;\n }\n\n replaceChild<T extends Node>(newChild: Node, oldChild: T): T {\n const index = this.children.indexOf(oldChild);\n if (index !== -1) {\n this.children[index] = newChild;\n if (isBrowser && (this as any)['_childNodes']) {\n const cnIndex = (this as any)['_childNodes'].indexOf(oldChild);\n if (cnIndex !== -1) {\n (this as any)['_childNodes'][cnIndex] = newChild;\n }\n }\n if (typeof newChild === 'object' && newChild !== null && 'parentNode' in newChild) {\n (newChild as { parentNode: unknown }).parentNode = this;\n }\n if (typeof oldChild === 'object' && oldChild !== null && 'parentNode' in oldChild) {\n (oldChild as { parentNode: unknown }).parentNode = null;\n }\n }\n return oldChild;\n }\n \n addEventListener(type: string, listener: EventListener): void {\n if (!this._listeners) return;\n if (!this._listeners.has(type)) {\n this._listeners.set(type, new Set());\n }\n this._listeners.get(type)!.add(listener);\n }\n\n removeEventListener(type: string, listener: EventListener): void {\n const listeners = this._listeners?.get(type);\n if (listeners) {\n listeners.delete(listener);\n }\n }\n\n dispatchEvent(event: Event): boolean {\n const listeners = this._listeners?.get(event.type);\n if (listeners) {\n for (const listener of listeners) {\n try {\n listener(event);\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error('Error in event listener:', error);\n }\n }\n }\n if (event.bubbles && this.parentNode && typeof this.parentNode === 'object' && 'dispatchEvent' in this.parentNode && typeof this.parentNode.dispatchEvent === 'function') {\n this.parentNode.dispatchEvent(event);\n }\n return true;\n }\n \n querySelector(selector: string): Element | null {\n // Simple implementation - supports basic selectors\n // #id, .class, tagName\n if (selector.startsWith('#')) {\n const id = selector.slice(1);\n return this.querySelectorById(id);\n } else if (selector.startsWith('.')) {\n const className = selector.slice(1);\n return this.querySelectorByClass(className);\n } else {\n // Tag name selector\n return this.querySelectorByTag(selector);\n }\n }\n \n private querySelectorById(id: string): Element | null {\n // Check self\n if (this.id === id) {\n return this as unknown as Element;\n }\n // Check children recursively\n for (const child of this.children) {\n if (isElementNode(child)) {\n if (child.id === id) {\n return child as unknown as Element;\n }\n const found = child.querySelector(`#${id}`);\n if (found) return found;\n }\n }\n return null;\n }\n \n private querySelectorByClass(className: string): Element | null {\n // Check self\n if (this.classList.contains(className)) {\n return this as unknown as Element;\n }\n // Check children recursively\n for (const child of this.children) {\n if (isElementNode(child)) {\n if (child.classList?.contains(className)) {\n return child as unknown as Element;\n }\n const found = child.querySelector(`.${className}`);\n if (found) return found;\n }\n }\n return null;\n }\n \n private querySelectorByTag(tagName: string): Element | null {\n const lowerTag = tagName.toLowerCase();\n // Check self\n if (this.tagName.toLowerCase() === lowerTag) {\n return this as unknown as Element;\n }\n // Check children recursively\n for (const child of this.children) {\n if (isElementNode(child)) {\n if (child.tagName.toLowerCase() === lowerTag) {\n return child as unknown as Element;\n }\n const found = child.querySelector(tagName);\n if (found) return found;\n }\n }\n return null;\n }\n \n querySelectorAll(selector: string): NodeListOf<Element> {\n const results: Element[] = [];\n \n if (selector.startsWith('#')) {\n const found = this.querySelector(selector);\n if (found) results.push(found);\n } else if (selector.startsWith('.')) {\n const className = selector.slice(1);\n this.querySelectorAllByClass(className, results);\n } else {\n const tagName = selector.toLowerCase();\n this.querySelectorAllByTag(tagName, results);\n }\n \n return results as unknown as NodeListOf<Element>;\n }\n \n private querySelectorAllByClass(className: string, results: Element[]): void {\n if (this.classList.contains(className)) {\n results.push(this as unknown as Element);\n }\n // Recursion alone collects matching descendants — checking the child here\n // as well would push direct children twice.\n for (const child of this.children) {\n if (isElementNode(child)) {\n child.querySelectorAllByClass(className, results);\n }\n }\n }\n\n private querySelectorAllByTag(tagName: string, results: Element[]): void {\n if (this.tagName.toLowerCase() === tagName) {\n results.push(this as unknown as Element);\n }\n for (const child of this.children) {\n if (isElementNode(child)) {\n child.querySelectorAllByTag(tagName, results);\n }\n }\n }\n}\n\nfunction createClassList(owner: NucloElement): DOMTokenList {\n const getClasses = () => owner.className.split(' ').filter((c) => c);\n const setClasses = (classes: string[]) => {\n owner.className = classes.join(' ');\n };\n\n const classList = {\n add: (...tokens: string[]) => {\n const classes = getClasses();\n for (const token of tokens) {\n if (token && !classes.includes(token)) {\n classes.push(token);\n }\n }\n setClasses(classes);\n },\n remove: (...tokens: string[]) => {\n if (tokens.length === 0) return;\n setClasses(getClasses().filter((c) => !tokens.includes(c)));\n },\n toggle: (token: string, force?: boolean) => {\n const hasClass = classList.contains(token);\n if (force === undefined) {\n if (hasClass) {\n classList.remove(token);\n return false;\n }\n classList.add(token);\n return true;\n }\n if (force) {\n classList.add(token);\n return true;\n }\n classList.remove(token);\n return false;\n },\n contains: (token: string) => getClasses().includes(token),\n replace: (oldToken: string, newToken: string) => {\n const classes = getClasses();\n const index = classes.indexOf(oldToken);\n if (index === -1) return false;\n classes[index] = newToken;\n setClasses(classes);\n return true;\n },\n item: (index: number) => getClasses()[index] || null,\n get length() {\n return getClasses().length;\n },\n toString: () => owner.className,\n [Symbol.iterator]: function* () {\n yield* getClasses();\n },\n forEach: (callback: (value: string, key: number, parent: DOMTokenList) => void) => {\n const classes = getClasses();\n for (let i = 0; i < classes.length; i++) {\n callback(classes[i], i, classList as unknown as DOMTokenList);\n }\n },\n entries: function* () {\n const classes = getClasses();\n for (let i = 0; i < classes.length; i++) {\n yield [i, classes[i]] as [number, string];\n }\n },\n keys: function* () {\n const classes = getClasses();\n for (let i = 0; i < classes.length; i++) {\n yield i;\n }\n },\n values: function* () {\n yield* getClasses();\n },\n get value() {\n return owner.className;\n },\n set value(value: string) {\n owner.className = value;\n },\n supports: (_token: string) => false\n };\n\n return classList as unknown as DOMTokenList;\n}\n","export class NucloText {\n nodeType = 3; // Node.TEXT_NODE\n nodeName = '#text';\n data: string;\n textContent: string;\n parentNode: unknown = null;\n \n constructor(data: string) {\n this.data = data;\n this.textContent = data;\n }\n \n get nodeValue(): string {\n return this.data;\n }\n \n set nodeValue(value: string) {\n this.data = value;\n this.textContent = value;\n }\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { NucloElement } from './Element';\nimport { NucloText } from './Text';\n\n/**\n * Lightweight DocumentFragment for SSR — prototype methods instead of per-instance closures.\n */\nclass SSRDocumentFragment {\n nodeType: number = 11;\n nodeName: string = '#document-fragment';\n childNodes: Node[] = [];\n children: Element[] = [];\n textContent: string = '';\n\n get firstChild(): Node | null {\n return this.childNodes.length > 0 ? this.childNodes[0] : null;\n }\n\n get lastChild(): Node | null {\n return this.childNodes.length > 0 ? this.childNodes[this.childNodes.length - 1] : null;\n }\n\n appendChild<T extends Node>(child: T): T {\n this.childNodes.push(child);\n if ((child as any).nodeType === 1) {\n this.children.push(child as unknown as Element);\n }\n (child as any).parentNode = this;\n return child;\n }\n\n insertBefore<T extends Node>(newNode: T, refNode: Node | null): T {\n if (!refNode) return this.appendChild(newNode);\n const index = this.childNodes.indexOf(refNode);\n if (index !== -1) {\n this.childNodes.splice(index, 0, newNode);\n if ((newNode as any).nodeType === 1) {\n const elementIndex = this.children.indexOf(refNode as Element);\n if (elementIndex !== -1) {\n this.children.splice(elementIndex, 0, newNode as unknown as Element);\n }\n }\n }\n (newNode as any).parentNode = this;\n return newNode;\n }\n\n removeChild<T extends Node>(child: T): T {\n const index = this.childNodes.indexOf(child);\n if (index !== -1) this.childNodes.splice(index, 1);\n if ((child as any).nodeType === 1) {\n const elementIndex = this.children.indexOf(child as unknown as Element);\n if (elementIndex !== -1) this.children.splice(elementIndex, 1);\n }\n (child as any).parentNode = null;\n return child;\n }\n\n replaceChild<T extends Node>(newChild: T, oldChild: Node): T {\n const index = this.childNodes.indexOf(oldChild);\n if (index !== -1) {\n this.childNodes[index] = newChild;\n if ((oldChild as any).nodeType === 1 && (newChild as any).nodeType === 1) {\n const elementIndex = this.children.indexOf(oldChild as Element);\n if (elementIndex !== -1) {\n this.children[elementIndex] = newChild as unknown as Element;\n }\n }\n }\n (newChild as any).parentNode = this;\n (oldChild as any).parentNode = null;\n return newChild;\n }\n\n querySelector(): null { return null; }\n querySelectorAll(): NodeListOf<Element> { return [] as unknown as NodeListOf<Element>; }\n}\n\nexport class NucloDocument {\n head: ExpandedElement;\n body: ExpandedElement;\n private _listeners: Map<string, Map<EventListener, { listener: EventListener; options?: boolean | AddEventListenerOptions }>>;\n \n constructor() {\n this.head = new NucloElement('head') as unknown as ExpandedElement;\n this.body = new NucloElement('body') as unknown as ExpandedElement;\n this._listeners = new Map();\n }\n \n createElement(tagName: string, _options?: unknown): ExpandedElement {\n return new NucloElement(tagName) as unknown as ExpandedElement;\n }\n \n createElementNS(namespace: string, tagName: string, _options?: unknown): ExpandedElement {\n const element = new NucloElement(tagName) as unknown as ExpandedElement;\n (element as any).namespaceURI = namespace;\n return element;\n }\n \n createTextNode(data: string): Text {\n return new NucloText(data) as unknown as Text;\n }\n \n createComment(data: string): Comment {\n const comment = {\n nodeType: 8,\n nodeName: '#comment',\n data,\n textContent: data,\n nodeValue: data,\n parentNode: null,\n nextSibling: null,\n previousSibling: null\n };\n return comment as unknown as Comment;\n }\n \n createDocumentFragment(): DocumentFragment {\n return new SSRDocumentFragment() as unknown as DocumentFragment;\n }\n \n querySelector(selector: string): Element | null {\n // Simple implementation - only supports ID selector for #nuclo-styles\n if (selector.startsWith('#')) {\n const id = selector.slice(1);\n if (id === 'nuclo-styles' && this.head.children) {\n for (const child of this.head.children) {\n if ((child as any).id === id) {\n return child as unknown as Element;\n }\n }\n }\n }\n return null;\n }\n \n querySelectorAll(_selector: string): NodeListOf<Element> {\n return [] as unknown as NodeListOf<Element>;\n }\n \n addEventListener(type: string, listener: EventListener, options?: boolean | AddEventListenerOptions): void {\n if (!this._listeners.has(type)) {\n this._listeners.set(type, new Map());\n }\n const listenersMap = this._listeners.get(type)!;\n listenersMap.set(listener, { listener, options });\n }\n \n removeEventListener(type: string, listener: EventListener, _options?: boolean | AddEventListenerOptions): void {\n const listeners = this._listeners.get(type);\n if (listeners) {\n listeners.delete(listener);\n // Clean up empty maps to prevent memory leaks\n if (listeners.size === 0) {\n this._listeners.delete(type);\n }\n }\n }\n \n dispatchEvent(event: Event): boolean {\n const listeners = this._listeners.get(event.type);\n if (listeners) {\n // Create a copy to avoid issues if listeners are modified during dispatch\n const listenersCopy = Array.from(listeners.values());\n for (let i = 0; i < listenersCopy.length; i++) {\n const { listener } = listenersCopy[i];\n try {\n listener(event);\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error('Error in event listener:', error);\n }\n }\n }\n return true;\n }\n \n contains(_node: Node): boolean {\n return false;\n }\n}\n\nexport const document = globalThis.document || new NucloDocument();","/* eslint-disable @typescript-eslint/no-explicit-any */\nexport class NucloEvent implements Event {\n type: string;\n bubbles: boolean;\n cancelable: boolean;\n composed: boolean;\n currentTarget: EventTarget | null = null;\n defaultPrevented: boolean = false;\n eventPhase: number = 0;\n isTrusted: boolean = false;\n target: EventTarget | null = null;\n timeStamp: number;\n readonly AT_TARGET = 2;\n readonly BUBBLING_PHASE = 3;\n readonly CAPTURING_PHASE = 1;\n readonly NONE = 0;\n returnValue: boolean = true;\n srcElement: EventTarget | null = null;\n cancelBubble: boolean = false;\n \n constructor(type: string, eventInitDict?: EventInit) {\n this.type = type;\n this.bubbles = eventInitDict?.bubbles || false;\n this.cancelable = eventInitDict?.cancelable || false;\n this.composed = eventInitDict?.composed || false;\n this.timeStamp = Date.now();\n }\n \n composedPath(): EventTarget[] {\n return [];\n }\n \n initEvent(_type: string, _bubbles?: boolean, _cancelable?: boolean): void {\n // Legacy method - no-op\n }\n \n preventDefault(): void {\n if (this.cancelable) {\n this.defaultPrevented = true;\n }\n }\n \n stopImmediatePropagation(): void {\n this.cancelBubble = true;\n }\n \n stopPropagation(): void {\n this.cancelBubble = true;\n }\n}\n\nexport class NucloCustomEvent<T = any> extends NucloEvent implements CustomEvent<T> {\n detail: T;\n \n constructor(type: string, eventInitDict?: CustomEventInit<T>) {\n super(type, eventInitDict);\n this.detail = eventInitDict?.detail as T;\n }\n \n initCustomEvent(_type: string, _bubbles?: boolean, _cancelable?: boolean, _detail?: T): void {\n // Legacy method - no-op\n }\n}\n\n// Export polyfills if browser globals don't exist\nexport const Event = globalThis.Event || NucloEvent;\nexport const CustomEvent = globalThis.CustomEvent || NucloCustomEvent;\n","/**\n * Polyfills for Node.js environments\n * \n * This module provides minimal browser API polyfills to allow Nuclo to run in Node.js\n * for server-side rendering (SSR) scenarios.\n * \n * To use in Node.js:\n * ```typescript\n * import 'nuclo/polyfill';\n * // or\n * import { document, Event, CustomEvent } from 'nuclo/polyfill';\n * ```\n */\n\nexport { NucloDocument, document } from './Document';\nexport { NucloElement } from './Element';\nexport { NucloText } from './Text';\nexport { NucloEvent, NucloCustomEvent, Event, CustomEvent } from './Event';\nexport { NucloNode } from './Node';\n\n// Import for local use\nimport { NucloElement } from './Element';\nimport { NucloNode } from './Node';\nimport { document } from './Document';\nimport { Event, CustomEvent } from './Event';\n\nexport const Node = NucloNode;\nexport const Element = NucloElement;\nexport const HTMLElement = NucloElement;\n\n// Auto-apply polyfills to globalThis if in Node environment (synchronous — no top-level await)\nif (typeof window === 'undefined' && typeof globalThis !== 'undefined') {\n interface GlobalWithPolyfills {\n document?: typeof document;\n Event?: typeof Event;\n CustomEvent?: typeof CustomEvent;\n Node?: typeof NucloNode;\n Element?: typeof NucloElement;\n HTMLElement?: typeof NucloElement;\n }\n\n const g = globalThis as unknown as GlobalWithPolyfills;\n\n if (!g.document) g.document = document;\n if (!g.Event) g.Event = Event;\n if (!g.CustomEvent) g.CustomEvent = CustomEvent;\n if (!g.Node) g.Node = NucloNode;\n if (!g.Element) g.Element = NucloElement;\n if (!g.HTMLElement) g.HTMLEl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&&typeof document<`u`;var t=class{nodeType=1;nodeName=``;nodeValue=null;parentNode=null;_childNodes=null;textContent=``;get childNodes(){let e=this._childNodes??[];return{...e,length:e.length,item:t=>e[t]||null,[Symbol.iterator]:function*(){for(let t of e)yield t},forEach:t=>{for(let n=0;n<e.length;n++)t(e[n],n,this.childNodes)},entries:function*(){for(let t=0;t<e.length;t++)yield[t,e[t]]},keys:function*(){for(let t=0;t<e.length;t++)yield t},values:function*(){for(let t of e)yield t}}}},n=class{get cssText(){let e=Object.entries(this);return e.length===0?``:e.map(([e,t])=>`${e}: ${t}`).join(`; `)}setProperty(e,t){this[e]=t}getPropertyValue(e){return this[e]||``}},r=class{_el;constructor(e){this._el=e}add(...e){let t=this._el.className?this._el.className.split(` `).filter(Boolean):[];for(let n of e)n&&!t.includes(n)&&t.push(n);this._el.className=t.join(` `)}remove(...e){this._el.className&&(this._el.className=this._el.className.split(` `).filter(t=>t&&!e.includes(t)).join(` `))}contains(e){return!!this._el.className&&this._el.className.split(` `).includes(e)}toggle(e,t){let n=this.contains(e);return t===void 0?n?(this.remove(e),!1):(this.add(e),!0):t?(this.add(e),!0):(this.remove(e),!1)}replace(e,t){return this.contains(e)?(this.remove(e),this.add(t),!0):!1}item(e){return this._el.className.split(` `).filter(Boolean)[e]??null}get length(){return this._el.className?this._el.className.split(` `).filter(Boolean).length:0}get value(){return this._el.className}set value(e){this._el.className=e}toString(){return this._el.className}supports(e){return!1}forEach(e){let t=this._el.className.split(` `).filter(Boolean);for(let n=0;n<t.length;n++)e(t[n],n,this)}[Symbol.iterator](){let e=this._el.className.split(` `).filter(Boolean),t=0;return{next(){return t<e.length?{value:e[t++],done:!1}:{value:``,done:!0}}}}entries(){let e=this._el.className.split(` `).filter(Boolean),t=0;return{next(){return t<e.length?{value:[t,e[t++]],done:!1}:{value:[0,``],done:!0}}}}keys(){let e=this.length,t=0;return{next(){return t<e?{value:t++,done:!1}:{value:0,done:!0}}}}values(){return this[Symbol.iterator]()}};function i(e){return typeof e==`object`&&!!e&&`tagName`in e}function a(e){return typeof e==`object`&&!!e&&`nodeType`in e&&e.nodeType===3}function o(e){return typeof e==`object`&&!!e&&`nodeType`in e&&e.nodeType===8}var s=class extends t{tagName;children;className=``;textContent=``;_innerHTML=``;parentNode=null;rawMods;mods;id=``;namespaceURI;sheet;_listeners;_style;_classList;_attributes;get attributes(){return this._attributes??=new Map}set attributes(e){this._attributes=e}get style(){return this._style??=new n}set style(e){this._style=e}get classList(){return this._classList??=new r(this)}set classList(e){this._classList=e}get innerHTML(){return this.serializeChildren()}set innerHTML(e){this._innerHTML=e}serializeChildren(){let e=``;for(let t of this.children)i(t)?e+=this.serializeElement(t):a(t)?e+=t.textContent||``:o(t)&&(e+=`<!--${t.data||``}-->`);return e}serializeElement(e){let t=e.tagName.toLowerCase(),n=`<${t}`;if(e.id&&(n+=` id="${e.id}"`),e.className&&(n+=` class="${e.className}"`),e._attributes)for(let[t,r]of e._attributes)t!==`id`&&t!==`class`&&(n+=` ${t}="${r}"`);if(n+=`>`,e.children&&e.children.length>0)for(let t of e.children)i(t)?n+=this.serializeElement(t):a(t)?n+=t.textContent||``:o(t)&&(n+=`<!--${t.data||``}-->`);return n+=`</${t}>`,n}constructor(t){if(super(),this.tagName=t.toLowerCase(),this.nodeType=1,this.nodeName=t.toUpperCase(),this.children=[],!e)this._listeners=null;else{this._listeners=new Map;let e={};if(this.style=new Proxy({},{get:(t,n)=>n===`setProperty`?(t,n)=>{e[t]=n}:n===`getPropertyValue`?t=>e[t]||``:n===`cssText`?Object.entries(e).map(([e,t])=>`${e}: ${t}`).join(`; `):e[n],set:(t,n,r)=>(e[n]=r,!0)}),this.tagName===`style`){let e=[];this.sheet={cssRules:e,insertRule:(t,n)=>{let r=n??e.length,i;if(t.trim().startsWith(`@`)){let e=[],n=t.replace(/^@\w+\s+/,``).replace(/\s*\{[\s\S]*\}$/,``).trim();i={cssText:t,conditionText:n,media:{mediaText:n},cssRules:e,insertRule:(t,n)=>{let r=n??e.length;return e.splice(r,0,{cssText:t,selectorText:t.split(`{`)[0].trim(),style:{},type:1}),r},deleteRule:t=>{e.splice(t,1)},type:4}}else i={cssText:t,selectorText:t.split(`{`)[0].trim(),style:{},type:1};return e.splice(r,0,i),r},deleteRule:t=>{e.splice(t,1)}}}this.classList=c(this)}}appendChild(t){if(t?.nodeType===11){let e=t.childNodes.slice();for(let t=0;t<e.length;t++)this.appendChild(e[t]);return t.childNodes=[],t.children&&=[],t}return this.children.push(t),e&&this._childNodes&&this._childNodes.push(t),typeof t==`object`&&t&&`parentNode`in t&&(t.parentNode=this),t}setAttribute(e,t){(this._attributes??=new Map).set(e,t),e===`class`?this.className=t:e===`id`&&(this.id=t)}getAttribute(e){return this._attributes?.get(e)??null}removeAttribute(e){this._attributes?.delete(e),e===`class`&&(this.className=``)}hasAttribute(e){return this._attributes?.has(e)??!1}insertBefore(t,n){if(n===null)return this.appendChild(t);if(t?.nodeType===11){let e=t.childNodes.slice();for(let t=0;t<e.length;t++)this.insertBefore(e[t],n);return t.childNodes=[],t.children&&=[],t}let r=this.children.indexOf(n);if(r!==-1){if(this.children.splice(r,0,t),e&&this._childNodes){let e=this._childNodes.indexOf(n);e!==-1&&this._childNodes.splice(e,0,t)}typeof t==`object`&&t&&`parentNode`in t&&(t.parentNode=this)}return t}removeChild(t){let n=this.children.indexOf(t);if(n!==-1){if(this.children.splice(n,1),e&&this._childNodes){let e=this._childNodes.indexOf(t);e!==-1&&this._childNodes.splice(e,1)}typeof t==`object`&&t&&`parentNode`in t&&(t.parentNode=null)}return t}replaceChild(t,n){let r=this.children.indexOf(n);if(r!==-1){if(this.children[r]=t,e&&this._childNodes){let e=this._childNodes.indexOf(n);e!==-1&&(this._childNodes[e]=t)}typeof t==`object`&&t&&`parentNode`in t&&(t.parentNode=this),typeof n==`object`&&n&&`parentNode`in n&&(n.parentNode=null)}return n}addEventListener(e,t){this._listeners&&(this._listeners.has(e)||this._listeners.set(e,new Set),this._listeners.get(e).add(t))}removeEventListener(e,t){let n=this._listeners?.get(e);n&&n.delete(t)}dispatchEvent(e){let t=this._listeners?.get(e.type);if(t)for(let n of t)try{n(e)}catch(e){console.error(`Error in event listener:`,e)}return e.bubbles&&this.parentNode&&typeof this.parentNode==`object`&&`dispatchEvent`in this.parentNode&&typeof this.parentNode.dispatchEvent==`function`&&this.parentNode.dispatchEvent(e),!0}querySelector(e){if(e.startsWith(`#`)){let t=e.slice(1);return this.querySelectorById(t)}else if(e.startsWith(`.`)){let t=e.slice(1);return this.querySelectorByClass(t)}else return this.querySelectorByTag(e)}querySelectorById(e){if(this.id===e)return this;for(let t of this.children)if(i(t)){if(t.id===e)return t;let n=t.querySelector(`#${e}`);if(n)return n}return null}querySelectorByClass(e){if(this.classList.contains(e))return this;for(let t of this.children)if(i(t)){if(t.classList?.contains(e))return t;let n=t.querySelector(`.${e}`);if(n)return n}return null}querySelectorByTag(e){let t=e.toLowerCase();if(this.tagName.toLowerCase()===t)return this;for(let n of this.children)if(i(n)){if(n.tagName.toLowerCase()===t)return n;let r=n.querySelector(e);if(r)return r}return null}querySelectorAll(e){let t=[];if(e.startsWith(`#`)){let n=this.querySelector(e);n&&t.push(n)}else if(e.startsWith(`.`)){let n=e.slice(1);this.querySelectorAllByClass(n,t)}else{let n=e.toLowerCase();this.querySelectorAllByTag(n,t)}return t}querySelectorAllByClass(e,t){this.classList.contains(e)&&t.push(this);for(let n of this.children)i(n)&&n.querySelectorAllByClass(e,t)}querySelectorAllByTag(e,t){this.tagName.toLowerCase()===e&&t.push(this);for(let n of this.children)i(n)&&n.querySelectorAllByTag(e,t)}};function c(e){let t=()=>e.className.split(` `).filter(e=>e),n=t=>{e.className=t.join(` `)},r={add:(...e)=>{let r=t();for(let t of e)t&&!r.includes(t)&&r.push(t);n(r)},remove:(...e)=>{e.length!==0&&n(t().filter(t=>!e.includes(t)))},toggle:(e,t)=>{let n=r.contains(e);return t===void 0?n?(r.remove(e),!1):(r.add(e),!0):t?(r.add(e),!0):(r.remove(e),!1)},contains:e=>t().includes(e),replace:(e,r)=>{let i=t(),a=i.indexOf(e);return a===-1?!1:(i[a]=r,n(i),!0)},item:e=>t()[e]||null,get length(){return t().length},toString:()=>e.className,[Symbol.iterator]:function*(){yield*t()},forEach:e=>{let n=t();for(let t=0;t<n.length;t++)e(n[t],t,r)},entries:function*(){let e=t();for(let t=0;t<e.length;t++)yield[t,e[t]]},keys:function*(){let e=t();for(let t=0;t<e.length;t++)yield t},values:function*(){yield*t()},get value(){return e.className},set value(t){e.className=t},supports:e=>!1};return r}var l=class{nodeType=3;nodeName=`#text`;data;textContent;parentNode=null;constructor(e){this.data=e,this.textContent=e}get nodeValue(){return this.data}set nodeValue(e){this.data=e,this.textContent=e}},u=class{nodeType=11;nodeName=`#document-fragment`;childNodes=[];children=[];textContent=``;get firstChild(){return this.childNodes.length>0?this.childNodes[0]:null}get lastChild(){return this.childNodes.length>0?this.childNodes[this.childNodes.length-1]:null}appendChild(e){return this.childNodes.push(e),e.nodeType===1&&this.children.push(e),e.parentNode=this,e}insertBefore(e,t){if(!t)return this.appendChild(e);let n=this.childNodes.indexOf(t);if(n!==-1&&(this.childNodes.splice(n,0,e),e.nodeType===1)){let n=this.children.indexOf(t);n!==-1&&this.children.splice(n,0,e)}return e.parentNode=this,e}removeChild(e){let t=this.childNodes.indexOf(e);if(t!==-1&&this.childNodes.splice(t,1),e.nodeType===1){let t=this.children.indexOf(e);t!==-1&&this.children.splice(t,1)}return e.parentNode=null,e}replaceChild(e,t){let n=this.childNodes.indexOf(t);if(n!==-1&&(this.childNodes[n]=e,t.nodeType===1&&e.nodeType===1)){let n=this.children.indexOf(t);n!==-1&&(this.children[n]=e)}return e.parentNode=this,t.parentNode=null,e}querySelector(){return null}querySelectorAll(){return[]}},d=class{head;body;_listeners;constructor(){this.head=new s(`head`),this.body=new s(`body`),this._listeners=new Map}createElement(e,t){return new s(e)}createElementNS(e,t,n){let r=new s(t);return r.namespaceURI=e,r}createTextNode(e){return new l(e)}createComment(e){return{nodeType:8,nodeName:`#comment`,data:e,textContent:e,nodeValue:e,parentNode:null,nextSibling:null,previousSibling:null}}createDocumentFragment(){return new u}querySelector(e){if(e.startsWith(`#`)){let t=e.slice(1);if(t===`nuclo-styles`&&this.head.children){for(let e of this.head.children)if(e.id===t)return e}}return null}querySelectorAll(e){return[]}addEventListener(e,t,n){this._listeners.has(e)||this._listeners.set(e,new Map),this._listeners.get(e).set(t,{listener:t,options:n})}removeEventListener(e,t,n){let r=this._listeners.get(e);r&&(r.delete(t),r.size===0&&this._listeners.delete(e))}dispatchEvent(e){let t=this._listeners.get(e.type);if(t){let n=Array.from(t.values());for(let t=0;t<n.length;t++){let{listener:r}=n[t];try{r(e)}catch(e){console.error(`Error in event listener:`,e)}}}return!0}contains(e){return!1}};const f=globalThis.document||new d;var p=class{type;bubbles;cancelable;composed;currentTarget=null;defaultPrevented=!1;eventPhase=0;isTrusted=!1;target=null;timeStamp;AT_TARGET=2;BUBBLING_PHASE=3;CAPTURING_PHASE=1;NONE=0;returnValue=!0;srcElement=null;cancelBubble=!1;constructor(e,t){this.type=e,this.bubbles=t?.bubbles||!1,this.cancelable=t?.cancelable||!1,this.composed=t?.composed||!1,this.timeStamp=Date.now()}composedPath(){return[]}initEvent(e,t,n){}preventDefault(){this.cancelable&&(this.defaultPrevented=!0)}stopImmediatePropagation(){this.cancelBubble=!0}stopPropagation(){this.cancelBubble=!0}},m=class extends p{detail;constructor(e,t){super(e,t),this.detail=t?.detail}initCustomEvent(e,t,n,r){}};const h=globalThis.Event||p,g=globalThis.CustomEvent||m,_=t,v=s,y=s;if(typeof window>`u`&&typeof globalThis<`u`){let e=globalThis;e.document||=f,e.Event||=h,e.CustomEvent||=g,e.Node||=t,e.Element||=s,e.HTMLElement||=s}export{g as CustomEvent,v as Element,h as Event,y as HTMLElement,_ as Node,m as NucloCustomEvent,d as NucloDocument,s as NucloElement,p as NucloEvent,t as NucloNode,l as NucloText,f as document};
2
+ //# sourceMappingURL=nuclo.polyfill.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nuclo.polyfill.mjs","names":["document","document"],"sources":["../../src/shared/environment.ts","../../src/polyfill/Node.ts","../../src/polyfill/Element.ts","../../src/polyfill/Text.ts","../../src/polyfill/Document.ts","../../src/polyfill/Event.ts","../../src/polyfill/index.ts"],"sourcesContent":["/**\n * Simplified environment detection - minimal overhead for smaller bundle size\n */\n\n// Basic environment detection - no complex caching or edge cases\nexport const isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined';\n","/**\n * Base Node class for instanceof checks in Node.js polyfill\n */\nexport class NucloNode {\n nodeType: number = 1; // ELEMENT_NODE\n nodeName: string = '';\n nodeValue: string | null = null;\n parentNode: unknown = null;\n _childNodes: Node[] | null = null;\n textContent: string = '';\n\n get childNodes(): NodeListOf<ChildNode> {\n const nodes = this._childNodes ?? [];\n return {\n ...nodes,\n length: nodes.length,\n item: (index: number) => (nodes[index] as ChildNode) || null,\n [Symbol.iterator]: function* () {\n for (const node of nodes) {\n yield node as ChildNode;\n }\n },\n forEach: (callback: (value: ChildNode, key: number, parent: NodeListOf<ChildNode>) => void) => {\n for (let i = 0; i < nodes.length; i++) {\n callback(nodes[i] as ChildNode, i, this.childNodes);\n }\n },\n entries: function* () {\n for (let i = 0; i < nodes.length; i++) {\n yield [i, nodes[i] as ChildNode] as [number, ChildNode];\n }\n },\n keys: function* () {\n for (let i = 0; i < nodes.length; i++) {\n yield i;\n }\n },\n values: function* () {\n for (const node of nodes) {\n yield node as ChildNode;\n }\n }\n } as unknown as NodeListOf<ChildNode>;\n }\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { NucloNode } from './Node';\nimport { isBrowser } from '../shared/environment';\n\n/**\n * Lightweight style object for SSR — prototype methods instead of Object.defineProperty per element.\n * Stores CSS properties as own properties and provides cssText/setProperty/getPropertyValue via prototype.\n */\nclass SSRStyle {\n [key: string]: unknown;\n\n get cssText(): string {\n const entries = Object.entries(this);\n if (entries.length === 0) return '';\n return entries.map(([k, v]) => `${k}: ${v}`).join('; ');\n }\n\n setProperty(name: string, value: string): void {\n (this as Record<string, unknown>)[name] = value;\n }\n\n getPropertyValue(name: string): string {\n return ((this as Record<string, unknown>)[name] as string) || '';\n }\n}\n\n// Lightweight classList for SSR — prototype methods instead of per-element closures\nclass SSRClassList {\n private _el: NucloElement;\n constructor(el: NucloElement) { this._el = el; }\n\n add(...tokens: string[]): void {\n const classes = this._el.className ? this._el.className.split(' ').filter(Boolean) : [];\n for (const t of tokens) if (t && !classes.includes(t)) classes.push(t);\n this._el.className = classes.join(' ');\n }\n remove(...tokens: string[]): void {\n if (!this._el.className) return;\n this._el.className = this._el.className.split(' ').filter(c => c && !tokens.includes(c)).join(' ');\n }\n contains(token: string): boolean {\n return !!this._el.className && this._el.className.split(' ').includes(token);\n }\n toggle(token: string, force?: boolean): boolean {\n const has = this.contains(token);\n if (force === undefined) { if (has) { this.remove(token); return false; } this.add(token); return true; }\n if (force) { this.add(token); return true; }\n this.remove(token); return false;\n }\n replace(oldToken: string, newToken: string): boolean {\n if (!this.contains(oldToken)) return false;\n this.remove(oldToken); this.add(newToken); return true;\n }\n item(index: number): string | null { return (this._el.className.split(' ').filter(Boolean)[index]) ?? null; }\n get length(): number { return this._el.className ? this._el.className.split(' ').filter(Boolean).length : 0; }\n get value(): string { return this._el.className; }\n set value(v: string) { this._el.className = v; }\n toString(): string { return this._el.className; }\n supports(_token: string): boolean { return false; }\n forEach(cb: (value: string, key: number, parent: DOMTokenList) => void): void {\n const classes = this._el.className.split(' ').filter(Boolean);\n for (let i = 0; i < classes.length; i++) cb(classes[i], i, this as unknown as DOMTokenList);\n }\n [Symbol.iterator](): Iterator<string> {\n const classes = this._el.className.split(' ').filter(Boolean);\n let i = 0;\n return { next(): IteratorResult<string> { return i < classes.length ? { value: classes[i++], done: false } : { value: '', done: true }; } };\n }\n entries(): Iterator<[number, string]> {\n const classes = this._el.className.split(' ').filter(Boolean);\n let i = 0;\n return { next(): IteratorResult<[number, string]> { return i < classes.length ? { value: [i, classes[i++]], done: false } : { value: [0, ''], done: true }; } };\n }\n keys(): Iterator<number> {\n const len = this.length; let i = 0;\n return { next(): IteratorResult<number> { return i < len ? { value: i++, done: false } : { value: 0, done: true }; } };\n }\n values(): Iterator<string> { return this[Symbol.iterator](); }\n}\n\ninterface TextNode {\n nodeType: 3;\n textContent: string;\n}\n\ninterface CommentNode {\n nodeType: 8;\n data: string;\n}\n\nfunction isElementNode(node: unknown): node is NucloElement {\n return typeof node === 'object' && node !== null && 'tagName' in node;\n}\n\nfunction isTextNode(node: unknown): node is TextNode {\n return typeof node === 'object' && node !== null && 'nodeType' in node && (node as { nodeType: number }).nodeType === 3;\n}\n\nfunction isCommentNode(node: unknown): node is CommentNode {\n return typeof node === 'object' && node !== null && 'nodeType' in node && (node as { nodeType: number }).nodeType === 8;\n}\n\nexport class NucloElement extends NucloNode {\n tagName: string;\n children: unknown[];\n className: string = '';\n textContent: string = '';\n private _innerHTML: string = '';\n parentNode: unknown = null;\n rawMods?: unknown[];\n mods?: unknown[];\n id: string = '';\n namespaceURI?: string;\n sheet?: CSSStyleSheet | null;\n private _listeners: Map<string, Set<EventListener>> | null;\n\n // style/classList are allocated lazily: the vast majority of SSR elements\n // never touch either (className is stored on the .className string, and the\n // serializer reads the backing field directly), so eagerly constructing an\n // SSRStyle + SSRClassList per element was pure allocation churn. The browser\n // path assigns these in the constructor, so its getter never lazy-allocates.\n private _style?: CSSStyleDeclaration;\n private _classList?: DOMTokenList;\n\n // attributes is allocated lazily too — most elements carry their identity on\n // .className/.id (separate string fields) and never call setAttribute. Reads\n // short-circuit on the undefined backing map without allocating; the\n // serializer reads _attributes directly. The public getter still lazily\n // materializes a Map for any external `el.attributes` consumer.\n private _attributes?: Map<string, string>;\n\n get attributes(): Map<string, string> {\n return (this._attributes ??= new Map<string, string>());\n }\n set attributes(value: Map<string, string>) {\n this._attributes = value;\n }\n\n get style(): CSSStyleDeclaration {\n return (this._style ??= new SSRStyle() as unknown as CSSStyleDeclaration);\n }\n set style(value: CSSStyleDeclaration) {\n this._style = value;\n }\n\n get classList(): DOMTokenList {\n return (this._classList ??= new SSRClassList(this) as unknown as DOMTokenList);\n }\n set classList(value: DOMTokenList) {\n this._classList = value;\n }\n\n get innerHTML(): string {\n return this.serializeChildren();\n }\n\n set innerHTML(value: string) {\n this._innerHTML = value;\n }\n \n private serializeChildren(): string {\n let html = '';\n for (const child of this.children) {\n if (isElementNode(child)) {\n html += this.serializeElement(child);\n } else if (isTextNode(child)) {\n html += child.textContent || '';\n } else if (isCommentNode(child)) {\n html += `<!--${child.data || ''}-->`;\n }\n }\n return html;\n }\n \n private serializeElement(element: NucloElement): string {\n const tag = element.tagName.toLowerCase();\n let html = `<${tag}`;\n \n // Add attributes\n if (element.id) {\n html += ` id=\"${element.id}\"`;\n }\n if (element.className) {\n html += ` class=\"${element.className}\"`;\n }\n if (element._attributes) {\n for (const [name, value] of element._attributes) {\n if (name !== 'id' && name !== 'class') {\n html += ` ${name}=\"${value}\"`;\n }\n }\n }\n \n html += '>';\n \n // Add children\n if (element.children && element.children.length > 0) {\n for (const child of element.children) {\n if (isElementNode(child)) {\n html += this.serializeElement(child);\n } else if (isTextNode(child)) {\n html += child.textContent || '';\n } else if (isCommentNode(child)) {\n html += `<!--${child.data || ''}-->`;\n }\n }\n }\n \n html += `</${tag}>`;\n return html;\n }\n \n constructor(tagName: string) {\n super();\n this.tagName = tagName.toLowerCase();\n this.nodeType = 1; // ELEMENT_NODE\n this.nodeName = tagName.toUpperCase();\n this.children = [];\n\n if (!isBrowser) {\n // ── SSR path: minimal allocations, no Proxy, no event listeners ──\n // style and classList stay unallocated until first access (see getters).\n this._listeners = null;\n } else {\n // ── Browser path: full-featured Proxy style + DOMTokenList ──\n this._listeners = new Map();\n\n const styleProps: Record<string, string> = {};\n this.style = new Proxy({} as CSSStyleDeclaration, {\n get: (_target, prop: string) => {\n if (prop === 'setProperty') return (name: string, value: string) => { styleProps[name] = value; };\n if (prop === 'getPropertyValue') return (name: string) => styleProps[name] || '';\n if (prop === 'cssText') return Object.entries(styleProps).map(([k, v]) => `${k}: ${v}`).join('; ');\n return styleProps[prop];\n },\n set: (_target, prop: string, value: string) => { styleProps[prop] = value; return true; },\n });\n\n // CSSStyleSheet mock for style elements (browser only)\n if (this.tagName === 'style') {\n const cssRules: CSSRule[] = [];\n this.sheet = {\n cssRules: cssRules as unknown as CSSRuleList,\n insertRule: (rule: string, index?: number) => {\n const idx = index ?? cssRules.length;\n let mockRule: CSSRule;\n if (rule.trim().startsWith('@')) {\n const innerRules: CSSRule[] = [];\n const conditionText = rule.replace(/^@\\w+\\s+/, '').replace(/\\s*\\{[\\s\\S]*\\}$/, '').trim();\n mockRule = {\n cssText: rule, conditionText,\n media: { mediaText: conditionText } as MediaList,\n cssRules: innerRules as unknown as CSSRuleList,\n insertRule: (innerRule: string, innerIndex?: number) => {\n const innerIdx = innerIndex ?? innerRules.length;\n innerRules.splice(innerIdx, 0, { cssText: innerRule, selectorText: innerRule.split('{')[0].trim(), style: {} as CSSStyleDeclaration, type: 1 } as unknown as CSSRule);\n return innerIdx;\n },\n deleteRule: (i: number) => { innerRules.splice(i, 1); },\n type: 4,\n } as unknown as CSSRule;\n } else {\n mockRule = { cssText: rule, selectorText: rule.split('{')[0].trim(), style: {} as CSSStyleDeclaration, type: 1 } as unknown as CSSRule;\n }\n cssRules.splice(idx, 0, mockRule);\n return idx;\n },\n deleteRule: (index: number) => { cssRules.splice(index, 1); },\n } as unknown as CSSStyleSheet;\n }\n\n this.classList = createClassList(this);\n }\n }\n \n appendChild<T extends Node>(child: T): T {\n // Spec behaviour: appending a DocumentFragment moves its children into this\n // node and leaves the fragment empty. The list runtime relies on this to\n // batch row insertions.\n if ((child as any)?.nodeType === 11) {\n const kids = ((child as any).childNodes as Node[]).slice();\n for (let i = 0; i < kids.length; i++) this.appendChild(kids[i]);\n (child as any).childNodes = [];\n if ((child as any).children) (child as any).children = [];\n return child;\n }\n this.children.push(child);\n if (isBrowser && (this as any)['_childNodes']) {\n (this as any)['_childNodes'].push(child);\n }\n if (typeof child === 'object' && child !== null && 'parentNode' in child) {\n (child as { parentNode: unknown }).parentNode = this;\n }\n return child;\n }\n \n setAttribute(name: string, value: string): void {\n (this._attributes ??= new Map<string, string>()).set(name, value);\n if (name === 'class') {\n this.className = value;\n } else if (name === 'id') {\n this.id = value;\n }\n }\n\n getAttribute(name: string): string | null {\n return this._attributes?.get(name) ?? null;\n }\n\n removeAttribute(name: string): void {\n this._attributes?.delete(name);\n if (name === 'class') {\n this.className = '';\n }\n }\n\n hasAttribute(name: string): boolean {\n return this._attributes?.has(name) ?? false;\n }\n \n insertBefore<T extends Node>(newNode: T, referenceNode: Node | null): T {\n if (referenceNode === null) {\n return this.appendChild(newNode);\n }\n // Spec behaviour: inserting a DocumentFragment moves its children (in order)\n // before the reference node and empties the fragment.\n if ((newNode as any)?.nodeType === 11) {\n const kids = ((newNode as any).childNodes as Node[]).slice();\n for (let i = 0; i < kids.length; i++) this.insertBefore(kids[i], referenceNode);\n (newNode as any).childNodes = [];\n if ((newNode as any).children) (newNode as any).children = [];\n return newNode;\n }\n const index = this.children.indexOf(referenceNode);\n if (index !== -1) {\n this.children.splice(index, 0, newNode);\n if (isBrowser && (this as any)['_childNodes']) {\n const childNodesIndex = (this as any)['_childNodes'].indexOf(referenceNode);\n if (childNodesIndex !== -1) {\n (this as any)['_childNodes'].splice(childNodesIndex, 0, newNode);\n }\n }\n if (typeof newNode === 'object' && newNode !== null && 'parentNode' in newNode) {\n (newNode as { parentNode: unknown }).parentNode = this;\n }\n }\n return newNode;\n }\n \n removeChild<T extends Node>(child: T): T {\n const index = this.children.indexOf(child);\n if (index !== -1) {\n this.children.splice(index, 1);\n if (isBrowser && (this as any)['_childNodes']) {\n const cnIndex = (this as any)['_childNodes'].indexOf(child);\n if (cnIndex !== -1) {\n (this as any)['_childNodes'].splice(cnIndex, 1);\n }\n }\n if (typeof child === 'object' && child !== null && 'parentNode' in child) {\n (child as { parentNode: unknown }).parentNode = null;\n }\n }\n return child;\n }\n\n replaceChild<T extends Node>(newChild: Node, oldChild: T): T {\n const index = this.children.indexOf(oldChild);\n if (index !== -1) {\n this.children[index] = newChild;\n if (isBrowser && (this as any)['_childNodes']) {\n const cnIndex = (this as any)['_childNodes'].indexOf(oldChild);\n if (cnIndex !== -1) {\n (this as any)['_childNodes'][cnIndex] = newChild;\n }\n }\n if (typeof newChild === 'object' && newChild !== null && 'parentNode' in newChild) {\n (newChild as { parentNode: unknown }).parentNode = this;\n }\n if (typeof oldChild === 'object' && oldChild !== null && 'parentNode' in oldChild) {\n (oldChild as { parentNode: unknown }).parentNode = null;\n }\n }\n return oldChild;\n }\n \n addEventListener(type: string, listener: EventListener): void {\n if (!this._listeners) return;\n if (!this._listeners.has(type)) {\n this._listeners.set(type, new Set());\n }\n this._listeners.get(type)!.add(listener);\n }\n\n removeEventListener(type: string, listener: EventListener): void {\n const listeners = this._listeners?.get(type);\n if (listeners) {\n listeners.delete(listener);\n }\n }\n\n dispatchEvent(event: Event): boolean {\n const listeners = this._listeners?.get(event.type);\n if (listeners) {\n for (const listener of listeners) {\n try {\n listener(event);\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error('Error in event listener:', error);\n }\n }\n }\n if (event.bubbles && this.parentNode && typeof this.parentNode === 'object' && 'dispatchEvent' in this.parentNode && typeof this.parentNode.dispatchEvent === 'function') {\n this.parentNode.dispatchEvent(event);\n }\n return true;\n }\n \n querySelector(selector: string): Element | null {\n // Simple implementation - supports basic selectors\n // #id, .class, tagName\n if (selector.startsWith('#')) {\n const id = selector.slice(1);\n return this.querySelectorById(id);\n } else if (selector.startsWith('.')) {\n const className = selector.slice(1);\n return this.querySelectorByClass(className);\n } else {\n // Tag name selector\n return this.querySelectorByTag(selector);\n }\n }\n \n private querySelectorById(id: string): Element | null {\n // Check self\n if (this.id === id) {\n return this as unknown as Element;\n }\n // Check children recursively\n for (const child of this.children) {\n if (isElementNode(child)) {\n if (child.id === id) {\n return child as unknown as Element;\n }\n const found = child.querySelector(`#${id}`);\n if (found) return found;\n }\n }\n return null;\n }\n \n private querySelectorByClass(className: string): Element | null {\n // Check self\n if (this.classList.contains(className)) {\n return this as unknown as Element;\n }\n // Check children recursively\n for (const child of this.children) {\n if (isElementNode(child)) {\n if (child.classList?.contains(className)) {\n return child as unknown as Element;\n }\n const found = child.querySelector(`.${className}`);\n if (found) return found;\n }\n }\n return null;\n }\n \n private querySelectorByTag(tagName: string): Element | null {\n const lowerTag = tagName.toLowerCase();\n // Check self\n if (this.tagName.toLowerCase() === lowerTag) {\n return this as unknown as Element;\n }\n // Check children recursively\n for (const child of this.children) {\n if (isElementNode(child)) {\n if (child.tagName.toLowerCase() === lowerTag) {\n return child as unknown as Element;\n }\n const found = child.querySelector(tagName);\n if (found) return found;\n }\n }\n return null;\n }\n \n querySelectorAll(selector: string): NodeListOf<Element> {\n const results: Element[] = [];\n \n if (selector.startsWith('#')) {\n const found = this.querySelector(selector);\n if (found) results.push(found);\n } else if (selector.startsWith('.')) {\n const className = selector.slice(1);\n this.querySelectorAllByClass(className, results);\n } else {\n const tagName = selector.toLowerCase();\n this.querySelectorAllByTag(tagName, results);\n }\n \n return results as unknown as NodeListOf<Element>;\n }\n \n private querySelectorAllByClass(className: string, results: Element[]): void {\n if (this.classList.contains(className)) {\n results.push(this as unknown as Element);\n }\n // Recursion alone collects matching descendants — checking the child here\n // as well would push direct children twice.\n for (const child of this.children) {\n if (isElementNode(child)) {\n child.querySelectorAllByClass(className, results);\n }\n }\n }\n\n private querySelectorAllByTag(tagName: string, results: Element[]): void {\n if (this.tagName.toLowerCase() === tagName) {\n results.push(this as unknown as Element);\n }\n for (const child of this.children) {\n if (isElementNode(child)) {\n child.querySelectorAllByTag(tagName, results);\n }\n }\n }\n}\n\nfunction createClassList(owner: NucloElement): DOMTokenList {\n const getClasses = () => owner.className.split(' ').filter((c) => c);\n const setClasses = (classes: string[]) => {\n owner.className = classes.join(' ');\n };\n\n const classList = {\n add: (...tokens: string[]) => {\n const classes = getClasses();\n for (const token of tokens) {\n if (token && !classes.includes(token)) {\n classes.push(token);\n }\n }\n setClasses(classes);\n },\n remove: (...tokens: string[]) => {\n if (tokens.length === 0) return;\n setClasses(getClasses().filter((c) => !tokens.includes(c)));\n },\n toggle: (token: string, force?: boolean) => {\n const hasClass = classList.contains(token);\n if (force === undefined) {\n if (hasClass) {\n classList.remove(token);\n return false;\n }\n classList.add(token);\n return true;\n }\n if (force) {\n classList.add(token);\n return true;\n }\n classList.remove(token);\n return false;\n },\n contains: (token: string) => getClasses().includes(token),\n replace: (oldToken: string, newToken: string) => {\n const classes = getClasses();\n const index = classes.indexOf(oldToken);\n if (index === -1) return false;\n classes[index] = newToken;\n setClasses(classes);\n return true;\n },\n item: (index: number) => getClasses()[index] || null,\n get length() {\n return getClasses().length;\n },\n toString: () => owner.className,\n [Symbol.iterator]: function* () {\n yield* getClasses();\n },\n forEach: (callback: (value: string, key: number, parent: DOMTokenList) => void) => {\n const classes = getClasses();\n for (let i = 0; i < classes.length; i++) {\n callback(classes[i], i, classList as unknown as DOMTokenList);\n }\n },\n entries: function* () {\n const classes = getClasses();\n for (let i = 0; i < classes.length; i++) {\n yield [i, classes[i]] as [number, string];\n }\n },\n keys: function* () {\n const classes = getClasses();\n for (let i = 0; i < classes.length; i++) {\n yield i;\n }\n },\n values: function* () {\n yield* getClasses();\n },\n get value() {\n return owner.className;\n },\n set value(value: string) {\n owner.className = value;\n },\n supports: (_token: string) => false\n };\n\n return classList as unknown as DOMTokenList;\n}\n","export class NucloText {\n nodeType = 3; // Node.TEXT_NODE\n nodeName = '#text';\n data: string;\n textContent: string;\n parentNode: unknown = null;\n \n constructor(data: string) {\n this.data = data;\n this.textContent = data;\n }\n \n get nodeValue(): string {\n return this.data;\n }\n \n set nodeValue(value: string) {\n this.data = value;\n this.textContent = value;\n }\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { NucloElement } from './Element';\nimport { NucloText } from './Text';\n\n/**\n * Lightweight DocumentFragment for SSR — prototype methods instead of per-instance closures.\n */\nclass SSRDocumentFragment {\n nodeType: number = 11;\n nodeName: string = '#document-fragment';\n childNodes: Node[] = [];\n children: Element[] = [];\n textContent: string = '';\n\n get firstChild(): Node | null {\n return this.childNodes.length > 0 ? this.childNodes[0] : null;\n }\n\n get lastChild(): Node | null {\n return this.childNodes.length > 0 ? this.childNodes[this.childNodes.length - 1] : null;\n }\n\n appendChild<T extends Node>(child: T): T {\n this.childNodes.push(child);\n if ((child as any).nodeType === 1) {\n this.children.push(child as unknown as Element);\n }\n (child as any).parentNode = this;\n return child;\n }\n\n insertBefore<T extends Node>(newNode: T, refNode: Node | null): T {\n if (!refNode) return this.appendChild(newNode);\n const index = this.childNodes.indexOf(refNode);\n if (index !== -1) {\n this.childNodes.splice(index, 0, newNode);\n if ((newNode as any).nodeType === 1) {\n const elementIndex = this.children.indexOf(refNode as Element);\n if (elementIndex !== -1) {\n this.children.splice(elementIndex, 0, newNode as unknown as Element);\n }\n }\n }\n (newNode as any).parentNode = this;\n return newNode;\n }\n\n removeChild<T extends Node>(child: T): T {\n const index = this.childNodes.indexOf(child);\n if (index !== -1) this.childNodes.splice(index, 1);\n if ((child as any).nodeType === 1) {\n const elementIndex = this.children.indexOf(child as unknown as Element);\n if (elementIndex !== -1) this.children.splice(elementIndex, 1);\n }\n (child as any).parentNode = null;\n return child;\n }\n\n replaceChild<T extends Node>(newChild: T, oldChild: Node): T {\n const index = this.childNodes.indexOf(oldChild);\n if (index !== -1) {\n this.childNodes[index] = newChild;\n if ((oldChild as any).nodeType === 1 && (newChild as any).nodeType === 1) {\n const elementIndex = this.children.indexOf(oldChild as Element);\n if (elementIndex !== -1) {\n this.children[elementIndex] = newChild as unknown as Element;\n }\n }\n }\n (newChild as any).parentNode = this;\n (oldChild as any).parentNode = null;\n return newChild;\n }\n\n querySelector(): null { return null; }\n querySelectorAll(): NodeListOf<Element> { return [] as unknown as NodeListOf<Element>; }\n}\n\nexport class NucloDocument {\n head: ExpandedElement;\n body: ExpandedElement;\n private _listeners: Map<string, Map<EventListener, { listener: EventListener; options?: boolean | AddEventListenerOptions }>>;\n \n constructor() {\n this.head = new NucloElement('head') as unknown as ExpandedElement;\n this.body = new NucloElement('body') as unknown as ExpandedElement;\n this._listeners = new Map();\n }\n \n createElement(tagName: string, _options?: unknown): ExpandedElement {\n return new NucloElement(tagName) as unknown as ExpandedElement;\n }\n \n createElementNS(namespace: string, tagName: string, _options?: unknown): ExpandedElement {\n const element = new NucloElement(tagName) as unknown as ExpandedElement;\n (element as any).namespaceURI = namespace;\n return element;\n }\n \n createTextNode(data: string): Text {\n return new NucloText(data) as unknown as Text;\n }\n \n createComment(data: string): Comment {\n const comment = {\n nodeType: 8,\n nodeName: '#comment',\n data,\n textContent: data,\n nodeValue: data,\n parentNode: null,\n nextSibling: null,\n previousSibling: null\n };\n return comment as unknown as Comment;\n }\n \n createDocumentFragment(): DocumentFragment {\n return new SSRDocumentFragment() as unknown as DocumentFragment;\n }\n \n querySelector(selector: string): Element | null {\n // Simple implementation - only supports ID selector for #nuclo-styles\n if (selector.startsWith('#')) {\n const id = selector.slice(1);\n if (id === 'nuclo-styles' && this.head.children) {\n for (const child of this.head.children) {\n if ((child as any).id === id) {\n return child as unknown as Element;\n }\n }\n }\n }\n return null;\n }\n \n querySelectorAll(_selector: string): NodeListOf<Element> {\n return [] as unknown as NodeListOf<Element>;\n }\n \n addEventListener(type: string, listener: EventListener, options?: boolean | AddEventListenerOptions): void {\n if (!this._listeners.has(type)) {\n this._listeners.set(type, new Map());\n }\n const listenersMap = this._listeners.get(type)!;\n listenersMap.set(listener, { listener, options });\n }\n \n removeEventListener(type: string, listener: EventListener, _options?: boolean | AddEventListenerOptions): void {\n const listeners = this._listeners.get(type);\n if (listeners) {\n listeners.delete(listener);\n // Clean up empty maps to prevent memory leaks\n if (listeners.size === 0) {\n this._listeners.delete(type);\n }\n }\n }\n \n dispatchEvent(event: Event): boolean {\n const listeners = this._listeners.get(event.type);\n if (listeners) {\n // Create a copy to avoid issues if listeners are modified during dispatch\n const listenersCopy = Array.from(listeners.values());\n for (let i = 0; i < listenersCopy.length; i++) {\n const { listener } = listenersCopy[i];\n try {\n listener(event);\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error('Error in event listener:', error);\n }\n }\n }\n return true;\n }\n \n contains(_node: Node): boolean {\n return false;\n }\n}\n\nexport const document = globalThis.document || new NucloDocument();","/* eslint-disable @typescript-eslint/no-explicit-any */\nexport class NucloEvent implements Event {\n type: string;\n bubbles: boolean;\n cancelable: boolean;\n composed: boolean;\n currentTarget: EventTarget | null = null;\n defaultPrevented: boolean = false;\n eventPhase: number = 0;\n isTrusted: boolean = false;\n target: EventTarget | null = null;\n timeStamp: number;\n readonly AT_TARGET = 2;\n readonly BUBBLING_PHASE = 3;\n readonly CAPTURING_PHASE = 1;\n readonly NONE = 0;\n returnValue: boolean = true;\n srcElement: EventTarget | null = null;\n cancelBubble: boolean = false;\n \n constructor(type: string, eventInitDict?: EventInit) {\n this.type = type;\n this.bubbles = eventInitDict?.bubbles || false;\n this.cancelable = eventInitDict?.cancelable || false;\n this.composed = eventInitDict?.composed || false;\n this.timeStamp = Date.now();\n }\n \n composedPath(): EventTarget[] {\n return [];\n }\n \n initEvent(_type: string, _bubbles?: boolean, _cancelable?: boolean): void {\n // Legacy method - no-op\n }\n \n preventDefault(): void {\n if (this.cancelable) {\n this.defaultPrevented = true;\n }\n }\n \n stopImmediatePropagation(): void {\n this.cancelBubble = true;\n }\n \n stopPropagation(): void {\n this.cancelBubble = true;\n }\n}\n\nexport class NucloCustomEvent<T = any> extends NucloEvent implements CustomEvent<T> {\n detail: T;\n \n constructor(type: string, eventInitDict?: CustomEventInit<T>) {\n super(type, eventInitDict);\n this.detail = eventInitDict?.detail as T;\n }\n \n initCustomEvent(_type: string, _bubbles?: boolean, _cancelable?: boolean, _detail?: T): void {\n // Legacy method - no-op\n }\n}\n\n// Export polyfills if browser globals don't exist\nexport const Event = globalThis.Event || NucloEvent;\nexport const CustomEvent = globalThis.CustomEvent || NucloCustomEvent;\n","/**\n * Polyfills for Node.js environments\n * \n * This module provides minimal browser API polyfills to allow Nuclo to run in Node.js\n * for server-side rendering (SSR) scenarios.\n * \n * To use in Node.js:\n * ```typescript\n * import 'nuclo/polyfill';\n * // or\n * import { document, Event, CustomEvent } from 'nuclo/polyfill';\n * ```\n */\n\nexport { NucloDocument, document } from './Document';\nexport { NucloElement } from './Element';\nexport { NucloText } from './Text';\nexport { NucloEvent, NucloCustomEvent, Event, CustomEvent } from './Event';\nexport { NucloNode } from './Node';\n\n// Import for local use\nimport { NucloElement } from './Element';\nimport { NucloNode } from './Node';\nimport { document } from './Document';\nimport { Event, CustomEvent } from './Event';\n\nexport const Node = NucloNode;\nexport const Element = NucloElement;\nexport const HTMLElement = NucloElement;\n\n// Auto-apply polyfills to globalThis if in Node environment (synchronous — no top-level await)\nif (typeof window === 'undefined' && typeof globalThis !== 'undefined') {\n interface GlobalWithPolyfills {\n document?: typeof document;\n Event?: typeof Event;\n CustomEvent?: typeof CustomEvent;\n Node?: typeof NucloNode;\n Element?: typeof NucloElement;\n HTMLElement?: typeof NucloElement;\n }\n\n const g = globalThis as unknown as GlobalWithPolyfills;\n\n if (!g.document) g.document = document;\n if (!g.Event) g.Event = Event;\n if (!g.CustomEvent) g.CustomEvent = CustomEvent;\n if (!g.Node) g.Node = NucloNode;\n if (!g.Element) g.Element = NucloElement;\n if (!g.HTMLElement) g.HTMLElement = NucloElement;\n}\n"],"mappings":"AAKA,MAAa,EAAY,OAAO,OAAW,KAAe,OAAO,SAAa,ICF9E,IAAa,EAAb,KAAuB,CACrB,SAAmB,EACnB,SAAmB,GACnB,UAA2B,KAC3B,WAAsB,KACtB,YAA6B,KAC7B,YAAsB,GAEtB,IAAI,YAAoC,CACtC,IAAM,EAAQ,KAAK,aAAe,CAAC,EACnC,MAAO,CACL,GAAG,EACH,OAAQ,EAAM,OACd,KAAO,GAAmB,EAAM,IAAwB,KACxD,CAAC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AAY,EAAc,EAA2B,CACnD,KAAK,KAAO,EACZ,KAAK,QAAU,GAAe,SAAW,GACzC,KAAK,WAAa,GAAe,YAAc,GAC/C,KAAK,SAAW,GAAe,UAAY,GAC3C,KAAK,UAAY,KAAK,IAAI,CAC5B,CAEA,cAA8B,CAC5B,MAAO,CAAC,CACV,CAEA,UAAU,EAAe,EAAoB,EAA6B,CAE1E,CAEA,gBAAuB,CACjB,KAAK,aACP,KAAK,iBAAmB,GAE5B,CAEA,0BAAiC,CAC/B,KAAK,aAAe,EACtB,CAEA,iBAAwB,CACtB,KAAK,aAAe,EACtB,CACF,EAEa,EAAb,cAA+C,CAAqC,CAClF,OAEA,YAAY,EAAc,EAAoC,CAC5D,MAAM,EAAM,CAAa,EACzB,KAAK,OAAS,GAAe,MAC/B,CAEA,gBAAgB,EAAe,EAAoB,EAAuB,EAAmB,CAE7F,CACF,EAGA,MAAa,EAAQ,WAAW,OAAS,EAC5B,EAAc,WAAW,aAAe,ECxCxC,EAAO,EACP,EAAU,EACV,EAAc,EAG3B,GAAI,OAAO,OAAW,KAAe,OAAO,WAAe,IAAa,CAUtE,IAAM,EAAI,WAEV,AAAiB,EAAE,WAAWC,EAC9B,AAAc,EAAE,QAAQ,EACxB,AAAoB,EAAE,cAAc,EACpC,AAAa,EAAE,OAAO,EACtB,AAAgB,EAAE,UAAU,EAC5B,AAAoB,EAAE,cAAc,CACtC"}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Renders a NodeModFn to a parent element by calling it and appending the result.
3
+ *
4
+ * @param nodeModFn The NodeModFn to render (created by tag builders like div(), h1(), etc.)
5
+ * @param parent The parent element to render into (defaults to document.body)
6
+ * @param index The index to pass to the NodeModFn (defaults to 0)
7
+ * @returns The rendered element
8
+ */
9
+ export declare function render<TTagName extends ElementTagName = ElementTagName>(nodeModFn: NodeModFn<TTagName>, parent?: Element, index?: number): ExpandedElement<TTagName>;
10
+ /**
11
+ * Hydrates an existing server-rendered DOM tree by walking it in parallel with
12
+ * the component tree, reusing existing nodes and re-attaching reactivity.
13
+ *
14
+ * Instead of clearing the container and creating new DOM nodes (like render()),
15
+ * hydrate() claims existing nodes from the SSR output and registers reactive
16
+ * text nodes, attributes, event listeners, list runtimes, and when runtimes
17
+ * on them.
18
+ *
19
+ * @param nodeModFn The NodeModFn to hydrate (same component used for SSR)
20
+ * @param parent The parent element containing the SSR HTML (defaults to document.body)
21
+ * @returns The hydrated root element
22
+ *
23
+ * @example
24
+ * ```ts
25
+ * // Server: const html = renderToString(div(h1("Hello")));
26
+ * // Client:
27
+ * const app = document.getElementById("app")!;
28
+ * // app.innerHTML already contains the SSR HTML
29
+ * hydrate(div(h1("Hello")), app);
30
+ * ```
31
+ */
32
+ export declare function hydrate<TTagName extends ElementTagName = ElementTagName>(nodeModFn: NodeModFn<TTagName>, parent?: Element): ExpandedElement<TTagName>;
33
+ //# sourceMappingURL=render.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../src/render.ts"],"names":[],"mappings":"AAGA;;;;;;;GAOG;AACH,wBAAgB,MAAM,CAAC,QAAQ,SAAS,cAAc,GAAG,cAAc,EACrE,SAAS,EAAE,SAAS,CAAC,QAAQ,CAAC,EAC9B,MAAM,CAAC,EAAE,OAAO,EAChB,KAAK,GAAE,MAAU,GAChB,eAAe,CAAC,QAAQ,CAAC,CAK3B;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,OAAO,CAAC,QAAQ,SAAS,cAAc,GAAG,cAAc,EACtE,SAAS,EAAE,SAAS,CAAC,QAAQ,CAAC,EAC9B,MAAM,CAAC,EAAE,OAAO,GACf,eAAe,CAAC,QAAQ,CAAC,CA4B3B"}
@@ -0,0 +1,4 @@
1
+ export type ConditionInput = boolean | (() => boolean);
2
+ export declare function runCondition(condition: () => boolean, onError?: (error: unknown) => void): boolean;
3
+ export declare function resolveCondition(value: ConditionInput, onError?: (error: unknown) => void): boolean;
4
+ //# sourceMappingURL=conditions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conditions.d.ts","sourceRoot":"","sources":["../../src/shared/conditions.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,CAAC,MAAM,OAAO,CAAC,CAAC;AAEvD,wBAAgB,YAAY,CAC1B,SAAS,EAAE,MAAM,OAAO,EACxB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,GACjC,OAAO,CAUT;AAED,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,cAAc,EACrB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,GACjC,OAAO,CAET"}
@@ -0,0 +1,69 @@
1
+ export declare const SVG_NAMESPACE = "http://www.w3.org/2000/svg";
2
+ /**
3
+ * Creates an HTML element.
4
+ * Wrapper for document.createElement with type safety.
5
+ */
6
+ export declare function createElement<K extends keyof HTMLElementTagNameMap>(tagName: K): HTMLElementTagNameMap[K] | null;
7
+ export declare function createElement(tagName: string): ExpandedElement | null;
8
+ /**
9
+ * Creates an element in the given namespace (typically for SVG elements).
10
+ * Wrapper for document.createElementNS with type safety.
11
+ */
12
+ export declare function createElementNS(namespace: string, tagName: string): ExpandedElement | null;
13
+ /**
14
+ * Creates a text node with the given content.
15
+ * Wrapper for document.createTextNode.
16
+ */
17
+ export declare function createTextNode(text: string): Text | null;
18
+ /**
19
+ * Creates a document fragment.
20
+ * Wrapper for document.createDocumentFragment.
21
+ */
22
+ export declare function createDocumentFragment(): DocumentFragment | null;
23
+ export declare function safeRemoveChild(child: Node): boolean;
24
+ export declare function createComment(text: string): Comment | null;
25
+ export declare function createConditionalComment(tagName: string, suffix?: string): Comment | null;
26
+ export declare function createMarkerPair(prefix: string, id: number | string): {
27
+ start: Comment;
28
+ end: Comment;
29
+ };
30
+ export declare function clearBetweenMarkers(startMarker: Comment, endMarker: Comment): void;
31
+ export declare function insertNodesBefore(nodes: Node[], referenceNode: Node): void;
32
+ export declare function appendChildren(parent: Element | Node, ...children: Array<Element | Node | string | null | undefined>): Element | Node;
33
+ export declare function isNodeConnected(node: Node | null | undefined): boolean;
34
+ /**
35
+ * Safely replaces an old node with a new node in the DOM.
36
+ * Returns true on success, false on failure (and logs the error).
37
+ */
38
+ export declare function replaceNodeSafely(oldNode: Node, newNode: Node): boolean;
39
+ /**
40
+ * Safely casts an Element-like object to Node & ParentNode interface.
41
+ * This is a common pattern needed when working with DOM manipulation.
42
+ *
43
+ * @param element - The element to cast
44
+ * @returns The element typed as Node & ParentNode
45
+ */
46
+ export declare function asParentNode<T extends Element | object>(element: T): Node & ParentNode;
47
+ /**
48
+ * Creates a scoped DOM insertion context that temporarily redirects appendChild
49
+ * to insertBefore at a specific reference node. This is useful for inserting
50
+ * content at specific positions in the DOM tree.
51
+ *
52
+ * @param host - The host element
53
+ * @param referenceNode - The node before which new nodes should be inserted
54
+ * @param callback - Function to execute with the scoped context
55
+ * @returns The result of the callback
56
+ */
57
+ export declare function withScopedInsertion<T, THost extends Element | object>(host: THost, referenceNode: Node, callback: () => T): T;
58
+ /**
59
+ * Type-safe wrapper for setting CSS style properties.
60
+ * Provides better error handling than direct CSSStyleDeclaration access.
61
+ * Supports both camelCase and kebab-case property names.
62
+ *
63
+ * @param element - The element to apply styles to
64
+ * @param property - The CSS property name (camelCase or kebab-case)
65
+ * @param value - The value to set (string, number, or null to remove)
66
+ * @returns true if the style was applied successfully, false otherwise
67
+ */
68
+ export declare function setStyleProperty(element: HTMLElement, property: string, value: string | number | null): boolean;
69
+ //# sourceMappingURL=dom.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dom.d.ts","sourceRoot":"","sources":["../../src/shared/dom.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,aAAa,+BAA+B,CAAC;AAE1D;;;GAGG;AACH,wBAAgB,aAAa,CAAC,CAAC,SAAS,MAAM,qBAAqB,EACjE,OAAO,EAAE,CAAC,GACT,qBAAqB,CAAC,CAAC,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GG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,GAAG,OAAO,CASvE;AAID;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,CAAC,SAAS,OAAO,GAAG,MAAM,EAAE,OAAO,EAAE,CAAC,GAAG,IAAI,GAAG,UAAU,CAEtF;AAED;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,KAAK,SAAS,OAAO,GAAG,MAAM,EACnE,IAAI,EAAE,KAAK,EACX,aAAa,EAAE,IAAI,EACnB,QAAQ,EAAE,MAAM,CAAC,GAChB,CAAC,CAiBH;AAED;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,WAAW,EACpB,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,GAC5B,OAAO,CAgBT"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Simplified environment detection - minimal overhead for smaller bundle size
3
+ */
4
+ export declare const isBrowser: boolean;
5
+ //# sourceMappingURL=environment.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"environment.d.ts","sourceRoot":"","sources":["../../src/shared/environment.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,eAAO,MAAM,SAAS,SAAmE,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function logError(message: string, error?: Error | unknown): void;
2
+ //# sourceMappingURL=errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/shared/errors.ts"],"names":[],"mappings":"AAAA,wBAAgB,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,IAAI,CAKvE"}
@@ -0,0 +1,4 @@
1
+ type RenderableInput<TTagName extends ElementTagName = ElementTagName> = NodeModFn<TTagName> | DetachedExpandedElementFactory<TTagName> | DetachedSVGElementFactory | SVGElementModifierFn | ExpandedElement<TTagName> | SVGElement | Node | null | undefined;
2
+ export declare function resolveRenderable<TTagName extends ElementTagName = ElementTagName>(result: RenderableInput<TTagName>, host: ExpandedElement<TTagName>, index: number): ExpandedElement<TTagName> | null;
3
+ export {};
4
+ //# sourceMappingURL=renderables.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renderables.d.ts","sourceRoot":"","sources":["../../src/shared/renderables.ts"],"names":[],"mappings":"AAEA,KAAK,eAAe,CAAC,QAAQ,SAAS,cAAc,GAAG,cAAc,IACjE,SAAS,CAAC,QAAQ,CAAC,GACnB,8BAA8B,CAAC,QAAQ,CAAC,GACxC,yBAAyB,GACzB,oBAAoB,GACpB,eAAe,CAAC,QAAQ,CAAC,GACzB,UAAU,GACV,IAAI,GACJ,IAAI,GACJ,SAAS,CAAC;AAEd,wBAAgB,iBAAiB,CAAC,QAAQ,SAAS,cAAc,GAAG,cAAc,EAChF,MAAM,EAAE,eAAe,CAAC,QAAQ,CAAC,EACjC,IAAI,EAAE,eAAe,CAAC,QAAQ,CAAC,EAC/B,KAAK,EAAE,MAAM,GACZ,eAAe,CAAC,QAAQ,CAAC,GAAG,IAAI,CAclC"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * String utility functions
3
+ */
4
+ /**
5
+ * Converts camelCase to kebab-case (optimized for performance)
6
+ * Uses direct character code manipulation for maximum speed
7
+ * @example camelToKebab('backgroundColor') => 'background-color'
8
+ */
9
+ export declare function camelToKebab(str: string): string;
10
+ /**
11
+ * Escapes HTML special characters in attribute values (includes " and ')
12
+ */
13
+ export declare function escapeHtml(text: string): string;
14
+ /**
15
+ * Escapes HTML special characters in text node content.
16
+ * Only &, < and > need escaping — quotes are safe inside text nodes.
17
+ */
18
+ export declare function escapeText(text: string): string;
19
+ //# sourceMappingURL=strings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"strings.d.ts","sourceRoot":"","sources":["../../src/shared/strings.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAqBhD;AAKD;;GAEG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAqB/C;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAkB/C"}
@@ -0,0 +1,16 @@
1
+ export declare function isPrimitive(value: unknown): value is Primitive;
2
+ export declare function isNode<T>(value: T): value is T & Node;
3
+ export declare function isObject(value: unknown): value is object;
4
+ export declare function isTagLike<T>(value: T): value is T & {
5
+ tagName?: string;
6
+ };
7
+ export declare function isBoolean(value: unknown): value is boolean;
8
+ /**
9
+ * Narrows `value` to a callable. The generic `<T extends Function>` is intentionally
10
+ * removed: it allowed callers to assert any specific function signature via the type
11
+ * parameter without a runtime check, which is unsafe. Use explicit casts at call sites
12
+ * when a more specific signature is needed.
13
+ */
14
+ export declare function isFunction(value: unknown): value is (...args: unknown[]) => unknown;
15
+ export declare function isZeroArityFunction(value: unknown): value is () => unknown;
16
+ //# sourceMappingURL=type-guards.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"type-guards.d.ts","sourceRoot":"","sources":["../../src/shared/type-guards.ts"],"names":[],"mappings":"AAAA,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,SAAS,CAE9D;AAED,wBAAgB,MAAM,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,KAAK,IAAI,CAAC,GAAG,IAAI,CAKrD;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAExD;AAED,wBAAgB,SAAS,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,KAAK,IAAI,CAAC,GAAG;IAAE,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,CAExE;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,OAAO,CAE1D;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,CAEnF;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,OAAO,CAE1E"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Server-Side Rendering (SSR) entry point for Nuclo
3
+ *
4
+ * This module provides utilities for rendering Nuclo components to HTML strings
5
+ * in Node.js environments for server-side rendering.
6
+ *
7
+ * @example
8
+ * ```ts
9
+ * import { renderToString } from 'nuclo/ssr';
10
+ * import '../polyfill'; // Load polyfills for Node.js
11
+ * import { div } from 'nuclo';
12
+ *
13
+ * const html = renderToString(div("Hello, World!"));
14
+ * console.log(html); // '<div>Hello, World!</div>'
15
+ * ```
16
+ */
17
+ export { renderToString, renderManyToString, renderToStringWithContainer } from './render-to-string';
18
+ export { setSSRCollector, getCssText } from '../style/engine';
19
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ssr/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,2BAA2B,EAC5B,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC"}