@stacksjs/stx 0.2.95 → 0.2.97

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 (612) hide show
  1. package/dist/a11y.js +598 -2
  2. package/dist/analytics.js +159 -2
  3. package/dist/analyzer.js +240 -2
  4. package/dist/animation.js +688 -2
  5. package/dist/app-shell.js +220 -2
  6. package/dist/app.js +79 -2
  7. package/dist/assets.js +155 -2
  8. package/dist/ast.js +630 -2
  9. package/dist/async-components.js +428 -2
  10. package/dist/auth.js +12 -2
  11. package/dist/broadcasting.js +102 -2
  12. package/dist/browser-composables.js +565 -2
  13. package/dist/build-assets.js +29 -2
  14. package/dist/build-mode-detector.js +50 -2
  15. package/dist/build-optimizer.js +433 -2
  16. package/dist/build-views.js +180 -2
  17. package/dist/build.js +33 -2
  18. package/dist/builtins/drawer.js +37 -2
  19. package/dist/builtins/escape.js +3 -2
  20. package/dist/builtins/icon.js +83 -2
  21. package/dist/builtins/index.js +34 -2
  22. package/dist/builtins/modal.js +38 -2
  23. package/dist/builtins/safe-image.js +51 -2
  24. package/dist/builtins/stx-image.js +200 -2
  25. package/dist/builtins/stx-link.js +41 -2
  26. package/dist/builtins/stx-loading-indicator.js +35 -2
  27. package/dist/builtins/suspense.js +24 -2
  28. package/dist/builtins/toast.js +42 -2
  29. package/dist/builtins/tooltip.js +106 -2
  30. package/dist/builtins/transition-group.js +22 -2
  31. package/dist/bundle-analyzer/collector.js +233 -2
  32. package/dist/bundle-analyzer/index.js +82 -2
  33. package/dist/bundle-analyzer/report.js +318 -2
  34. package/dist/bundle-analyzer/treemap.js +594 -2
  35. package/dist/caching.js +131 -2
  36. package/dist/cli.js +11317 -10982
  37. package/dist/client/directive.js +14 -2
  38. package/dist/client/index.js +2 -2
  39. package/dist/client-helpers.js +312 -2
  40. package/dist/client-script-bundler.js +216 -6
  41. package/dist/client-script.js +754 -2
  42. package/dist/client.js +73 -4
  43. package/dist/component-hmr.js +585 -2
  44. package/dist/component-library.d.ts +6 -0
  45. package/dist/component-library.js +683 -0
  46. package/dist/component-processing.js +613 -2
  47. package/dist/component-registry.js +90 -2
  48. package/dist/component-renderer.js +660 -2
  49. package/dist/components.js +213 -2
  50. package/dist/composables/index.js +220 -2
  51. package/dist/composables/use-battery.js +101 -2
  52. package/dist/composables/use-broadcast-channel.js +80 -2
  53. package/dist/composables/use-channel.js +124 -2
  54. package/dist/composables/use-clipboard.js +79 -2
  55. package/dist/composables/use-color-mode.js +131 -2
  56. package/dist/composables/use-cookie.js +86 -2
  57. package/dist/composables/use-device-orientation.js +181 -2
  58. package/dist/composables/use-event-listener.js +27 -2
  59. package/dist/composables/use-event-source.js +166 -2
  60. package/dist/composables/use-eye-dropper.js +142 -2
  61. package/dist/composables/use-fetch.js +223 -2
  62. package/dist/composables/use-fullscreen.js +110 -2
  63. package/dist/composables/use-geolocation.js +101 -2
  64. package/dist/composables/use-idle.js +182 -2
  65. package/dist/composables/use-intersection-observer.js +168 -2
  66. package/dist/composables/use-keyboard.js +224 -2
  67. package/dist/composables/use-media-query.js +62 -2
  68. package/dist/composables/use-meta.js +48 -2
  69. package/dist/composables/use-mouse.js +286 -2
  70. package/dist/composables/use-mutation-observer.js +129 -2
  71. package/dist/composables/use-network.js +85 -2
  72. package/dist/composables/use-notification.js +94 -2
  73. package/dist/composables/use-permissions.js +132 -2
  74. package/dist/composables/use-query.js +0 -1
  75. package/dist/composables/use-resize-observer.js +157 -2
  76. package/dist/composables/use-router.js +51 -2
  77. package/dist/composables/use-share.js +104 -2
  78. package/dist/composables/use-speech.js +294 -2
  79. package/dist/composables/use-storage.js +130 -2
  80. package/dist/composables/use-text-selection.js +205 -4
  81. package/dist/composables/use-timer.js +183 -2
  82. package/dist/composables/use-utilities.js +176 -2
  83. package/dist/composables/use-wake-lock.js +122 -2
  84. package/dist/composables/use-websocket.js +165 -2
  85. package/dist/composables/use-window.js +163 -2
  86. package/dist/composables.js +552 -2
  87. package/dist/composition-api.js +190 -2
  88. package/dist/computed.js +376 -8
  89. package/dist/conditionals.js +599 -2
  90. package/dist/config.js +751 -2
  91. package/dist/craft-bridge.js +432 -2
  92. package/dist/craft-compiler.js +810 -2
  93. package/dist/craft-components.js +945 -2
  94. package/dist/craft-entry.js +5 -2
  95. package/dist/craft-ssr.js +559 -2
  96. package/dist/csp.js +220 -2
  97. package/dist/csrf.js +38 -2
  98. package/dist/custom-directives.js +136 -2
  99. package/dist/defer.js +156 -2
  100. package/dist/deploy/config-generators.js +214 -2
  101. package/dist/deploy/index.js +203 -2
  102. package/dist/deploy/netlify.js +167 -2
  103. package/dist/dev-server/crosswind.js +379 -2
  104. package/dist/dev-server/index.js +7 -2
  105. package/dist/dev-server/keyboard-shortcuts.js +81 -2
  106. package/dist/dev-server/native-window.js +91 -2
  107. package/dist/dev-server/port-utils.js +40 -2
  108. package/dist/dev-server/serve-app.js +682 -2
  109. package/dist/dev-server/serve-file.js +439 -2
  110. package/dist/dev-server/serve-markdown.js +281 -2
  111. package/dist/dev-server/serve-multi.js +579 -2
  112. package/dist/dev-server/terminal-colors.js +45 -2
  113. package/dist/dev-server/theme-selector.js +111 -2
  114. package/dist/dev-server/types.js +43 -2
  115. package/dist/dev-server.js +4 -2
  116. package/dist/devtools.js +462 -18
  117. package/dist/directive-api.js +355 -2
  118. package/dist/docs.js +567 -2
  119. package/dist/doctor.js +123 -2
  120. package/dist/document-shell.js +105 -2
  121. package/dist/dynamic-components.js +78 -2
  122. package/dist/edge-runtime.js +539 -2
  123. package/dist/env.js +9 -2
  124. package/dist/error-boundaries.js +62 -12
  125. package/dist/error-handling.js +1 -2
  126. package/dist/errors/codes.js +97 -2
  127. package/dist/errors/formatter.js +196 -2
  128. package/dist/errors/index.js +44 -2
  129. package/dist/errors/logger.js +250 -2
  130. package/dist/errors/sanitizer.js +181 -2
  131. package/dist/errors/types.js +86 -2
  132. package/dist/events.js +382 -2
  133. package/dist/expressions.js +650 -2
  134. package/dist/formatter.js +265 -2
  135. package/dist/forms-validation.js +510 -4
  136. package/dist/forms.js +709 -2
  137. package/dist/head.js +224 -2
  138. package/dist/heatmap.js +566 -2
  139. package/dist/hot-reload.js +367 -2
  140. package/dist/html-masking.js +73 -2
  141. package/dist/hydration-runtime.js +195 -2
  142. package/dist/hydration.js +654 -2
  143. package/dist/i18n.js +633 -2
  144. package/dist/image-optimization/auto-sibling.js +88 -2
  145. package/dist/image-optimization/build-plugin.js +241 -2
  146. package/dist/image-optimization/component.js +244 -2
  147. package/dist/image-optimization/directive.js +203 -2
  148. package/dist/image-optimization/index.js +54 -2
  149. package/dist/image-optimization/processor.js +262 -2
  150. package/dist/image-optimization/serve.js +102 -2
  151. package/dist/includes.js +733 -2
  152. package/dist/index.d.ts +1 -0
  153. package/dist/index.js +134 -2
  154. package/dist/init.js +505 -2
  155. package/dist/inline-assets.js +82 -2
  156. package/dist/interactive.js +383 -2
  157. package/dist/internal-markdown.js +141 -2
  158. package/dist/island-chunking.js +52 -2
  159. package/dist/js-ts.js +57 -2
  160. package/dist/jsx-runtime.js +289 -2
  161. package/dist/keep-alive.js +421 -2
  162. package/dist/lazy-loader.js +245 -2
  163. package/dist/loading-indicator.js +322 -2
  164. package/dist/loops.js +643 -2
  165. package/dist/manifest.js +31 -2
  166. package/dist/markdown.js +68 -2
  167. package/dist/media/client/blur-up.js +217 -2
  168. package/dist/media/client/index.js +53 -2
  169. package/dist/media/client/lazy-load.js +283 -2
  170. package/dist/media/client/upload-handler.js +354 -2
  171. package/dist/media/image/component.js +574 -2
  172. package/dist/media/image/directive.js +160 -2
  173. package/dist/media/image/editing.js +193 -2
  174. package/dist/media/image/index.js +80 -2
  175. package/dist/media/image/placeholder.js +188 -2
  176. package/dist/media/image/processor/cache.js +51 -2
  177. package/dist/media/image/processor/index.js +3 -2
  178. package/dist/media/image/processor/optimizer.js +202 -2
  179. package/dist/media/image/processor/responsive.js +162 -2
  180. package/dist/media/image/srcset.js +194 -2
  181. package/dist/media/index.js +198 -2
  182. package/dist/media/manager/embed.js +253 -2
  183. package/dist/media/protected/component.js +235 -2
  184. package/dist/media/protected/index.js +20 -2
  185. package/dist/media/protected/signature.js +205 -2
  186. package/dist/media/shared/cache.js +132 -2
  187. package/dist/media/shared/hash.js +35 -2
  188. package/dist/media/shared/index.js +2 -2
  189. package/dist/media/types.js +0 -1
  190. package/dist/media/upload/component.js +320 -2
  191. package/dist/media/upload/index.js +1 -2
  192. package/dist/media/video/directive.js +142 -2
  193. package/dist/media/video/index.js +583 -2
  194. package/dist/media/video/processor/cache.js +52 -2
  195. package/dist/media/video/processor/index.js +4 -2
  196. package/dist/media/video/processor/streaming.js +197 -2
  197. package/dist/media/video/processor/thumbnail.js +134 -2
  198. package/dist/media/video/processor/transcoder.js +283 -2
  199. package/dist/method-spoofing.js +17 -2
  200. package/dist/middleware.js +40 -2
  201. package/dist/misc-directives.js +222 -2
  202. package/dist/native-build.js +511 -2
  203. package/dist/parser/directive-parser.js +239 -2
  204. package/dist/parser/expression-parser.js +358 -2
  205. package/dist/parser/index.js +23 -2
  206. package/dist/parser/tokenizer.js +534 -2
  207. package/dist/partial-hydration.js +427 -2
  208. package/dist/performance-utils.js +430 -2
  209. package/dist/placeholder.js +35 -2
  210. package/dist/plugin-system.js +214 -2
  211. package/dist/plugin.js +173 -2
  212. package/dist/precompiler.js +660 -81
  213. package/dist/process.js +711 -2
  214. package/dist/production-build.js +596 -2
  215. package/dist/production-builder.js +132 -2
  216. package/dist/production-server.js +188 -2
  217. package/dist/props.js +224 -2
  218. package/dist/public-env.js +19 -2
  219. package/dist/pwa/audit.js +255 -2
  220. package/dist/pwa/directives.js +332 -2
  221. package/dist/pwa/icons.js +109 -2
  222. package/dist/pwa/index.js +47 -2
  223. package/dist/pwa/inject.js +102 -2
  224. package/dist/pwa/manifest.js +186 -2
  225. package/dist/pwa/offline.js +259 -2
  226. package/dist/pwa/precache.js +116 -2
  227. package/dist/pwa/service-worker.js +860 -2
  228. package/dist/pwa/workbox-strategies.js +167 -2
  229. package/dist/pwa/workbox.js +382 -2
  230. package/dist/pwa.js +427 -427
  231. package/dist/reactive-bindings.js +266 -2
  232. package/dist/reactive.js +569 -2
  233. package/dist/reactivity.js +559 -2
  234. package/dist/release.js +1 -2
  235. package/dist/render.js +165 -2
  236. package/dist/route-middleware.js +17 -2
  237. package/dist/router.js +9 -2
  238. package/dist/routes.js +14 -2
  239. package/dist/runtime-injection.js +120 -2
  240. package/dist/runtime.js +94 -2
  241. package/dist/safe-evaluator.js +444 -2
  242. package/dist/scaffolding.js +897 -2
  243. package/dist/screenshot.js +87 -2
  244. package/dist/script-classifier.js +32 -2
  245. package/dist/script-validation.js +158 -2
  246. package/dist/seo.js +457 -2
  247. package/dist/serve.js +237 -2
  248. package/dist/server-bindings.js +108 -2
  249. package/dist/server-components.js +338 -11
  250. package/dist/signal-processing.js +946 -2
  251. package/dist/signals-api.js +154 -2
  252. package/dist/signals.js +5287 -2
  253. package/dist/site-builder/build.js +224 -2
  254. package/dist/site-builder/i18n.js +140 -2
  255. package/dist/site-builder/index.js +15 -2
  256. package/dist/site-builder/robots.js +26 -2
  257. package/dist/site-builder/router.js +27 -2
  258. package/dist/site-builder/seo.js +36 -2
  259. package/dist/site-builder/sitemap.js +26 -2
  260. package/dist/site-builder/theme.js +33 -2
  261. package/dist/site-builder/types.js +0 -1
  262. package/dist/slots.js +201 -2
  263. package/dist/source-maps.js +350 -2
  264. package/dist/spa-shell.js +34 -2
  265. package/dist/ssg.js +389 -389
  266. package/dist/ssr.js +355 -2
  267. package/dist/state-management.js +533 -2
  268. package/dist/store-imports.js +13 -2
  269. package/dist/store-loader.js +72 -5
  270. package/dist/stores-client.js +132 -2
  271. package/dist/story/addons.js +261 -2
  272. package/dist/story/analytics.js +235 -2
  273. package/dist/story/auto-stories.js +158 -2
  274. package/dist/story/bookmarks.js +277 -2
  275. package/dist/story/bun-test.js +102 -2
  276. package/dist/story/cli.js +155 -2
  277. package/dist/story/collect/analyzer.js +305 -2
  278. package/dist/story/collect/index.js +27 -2
  279. package/dist/story/collect/parser.js +129 -2
  280. package/dist/story/collect/scanner.js +101 -2
  281. package/dist/story/collect/tree.js +110 -2
  282. package/dist/story/commands/build.js +172 -2
  283. package/dist/story/commands/dev.js +78 -2
  284. package/dist/story/commands/index.js +3 -2
  285. package/dist/story/commands/preview.js +56 -2
  286. package/dist/story/compiled-output.js +151 -2
  287. package/dist/story/composition.js +261 -2
  288. package/dist/story/config-watcher.js +67 -2
  289. package/dist/story/config.js +64 -2
  290. package/dist/story/context.js +27 -2
  291. package/dist/story/controls/index.js +320 -2
  292. package/dist/story/crosswind.js +189 -2
  293. package/dist/story/desktop-preview.js +105 -2
  294. package/dist/story/docs-generator.js +186 -2
  295. package/dist/story/errors.js +239 -2
  296. package/dist/story/figma-export.js +224 -2
  297. package/dist/story/generator.js +165 -2
  298. package/dist/story/hmr.js +131 -2
  299. package/dist/story/hot-swap.js +207 -2
  300. package/dist/story/index.js +49 -2
  301. package/dist/story/interactions.js +225 -2
  302. package/dist/story/keyboard-shortcuts.js +345 -2
  303. package/dist/story/output.js +153 -2
  304. package/dist/story/performance.js +252 -2
  305. package/dist/story/presets.js +289 -2
  306. package/dist/story/props-validation.js +215 -2
  307. package/dist/story/renderer.js +209 -2
  308. package/dist/story/search-index.js +106 -2
  309. package/dist/story/search.js +140 -2
  310. package/dist/story/server.js +965 -2
  311. package/dist/story/setup.js +78 -2
  312. package/dist/story/snapshots.js +170 -2
  313. package/dist/story/testing.js +163 -2
  314. package/dist/story/theme.js +170 -2
  315. package/dist/story/types.js +0 -2
  316. package/dist/story/ui/code-panel.js +175 -2
  317. package/dist/story/ui/controls-panel.js +168 -2
  318. package/dist/story/ui/index.js +4 -2
  319. package/dist/story/ui/navigation.js +250 -2
  320. package/dist/story/ui/preview.js +251 -2
  321. package/dist/story/visual-testing.js +247 -2
  322. package/dist/streaming.js +537 -2
  323. package/dist/strict-lint.js +288 -2
  324. package/dist/style-scoping.js +50 -2
  325. package/dist/suspense.js +398 -2
  326. package/dist/teleport.js +109 -2
  327. package/dist/template-compiler.js +63 -2
  328. package/dist/template-hydrator.js +82 -2
  329. package/dist/template-tag-balance.js +93 -2
  330. package/dist/testing.js +581 -2
  331. package/dist/transitions.js +443 -2
  332. package/dist/type-checker.js +581 -2
  333. package/dist/types/component-types.d.ts +54 -0
  334. package/dist/types/component-types.js +0 -1
  335. package/dist/types/config-types.js +0 -1
  336. package/dist/types/context-types.js +0 -1
  337. package/dist/types/csp-types.js +0 -1
  338. package/dist/types/directive-types.js +3 -2
  339. package/dist/types/index.d.ts +5 -0
  340. package/dist/types/index.js +1 -2
  341. package/dist/types/pwa-types.js +0 -1
  342. package/dist/types.js +1 -2
  343. package/dist/typescript-templates.js +386 -4
  344. package/dist/utils.js +942 -2
  345. package/dist/validator.js +171 -2
  346. package/dist/variable-extractor.js +1094 -2
  347. package/dist/view-composers.js +29 -2
  348. package/dist/virtual-scrolling.js +454 -2
  349. package/dist/visual-editor.js +688 -28
  350. package/dist/vue-template.js +475 -2
  351. package/dist/web-components/css-scoping.js +177 -2
  352. package/dist/web-components/index.js +13 -2
  353. package/dist/web-components/reactive-generator.js +121 -56
  354. package/dist/web-components.js +1447 -2
  355. package/dist/x-element.js +17 -5
  356. package/package.json +5 -6
  357. package/dist/chunk-04n64bnt.js +0 -5
  358. package/dist/chunk-06w68hyg.js +0 -7
  359. package/dist/chunk-07y6m5xx.js +0 -3
  360. package/dist/chunk-095s3972.js +0 -99
  361. package/dist/chunk-09k66d8a.js +0 -3
  362. package/dist/chunk-0a61y94n.js +0 -24
  363. package/dist/chunk-0b9w2w1y.js +0 -1
  364. package/dist/chunk-0dx4q6yq.js +0 -3
  365. package/dist/chunk-0dz85jrp.js +0 -3
  366. package/dist/chunk-0jd0pndq.js +0 -3
  367. package/dist/chunk-0p0nyq50.js +0 -6
  368. package/dist/chunk-0p1h3p3w.js +0 -3
  369. package/dist/chunk-0qakwen3.js +0 -1
  370. package/dist/chunk-0qnz93q2.js +0 -3
  371. package/dist/chunk-10debkj5.js +0 -71
  372. package/dist/chunk-15nesxgt.js +0 -5224
  373. package/dist/chunk-1sr54zp8.js +0 -3
  374. package/dist/chunk-1v49fwr5.js +0 -3
  375. package/dist/chunk-1xz0w746.js +0 -1539
  376. package/dist/chunk-1z5nhbjt.js +0 -90
  377. package/dist/chunk-1zgsgk4b.js +0 -1
  378. package/dist/chunk-20swzkx3.js +0 -216
  379. package/dist/chunk-27zsyhrd.js +0 -4
  380. package/dist/chunk-29y0hk5z.js +0 -3
  381. package/dist/chunk-2cdvw21b.js +0 -274
  382. package/dist/chunk-2j21d3ka.js +0 -161
  383. package/dist/chunk-2jxbwnkz.js +0 -2
  384. package/dist/chunk-31dr4bys.js +0 -6
  385. package/dist/chunk-35faj94w.js +0 -15
  386. package/dist/chunk-39gm08bn.js +0 -39
  387. package/dist/chunk-3a4qsygv.js +0 -51
  388. package/dist/chunk-3te20hqw.js +0 -3
  389. package/dist/chunk-43t7faps.js +0 -24
  390. package/dist/chunk-44hd3kab.js +0 -1
  391. package/dist/chunk-47kpewks.js +0 -71
  392. package/dist/chunk-4aj7ftqb.js +0 -1
  393. package/dist/chunk-4d2y57k7.js +0 -3
  394. package/dist/chunk-4deg33rw.js +0 -57
  395. package/dist/chunk-4k7d8p8d.js +0 -188
  396. package/dist/chunk-4qcy5tx6.js +0 -53
  397. package/dist/chunk-4x7kae4j.js +0 -3
  398. package/dist/chunk-55nwdnsd.js +0 -3
  399. package/dist/chunk-55yp0q8t.js +0 -201
  400. package/dist/chunk-5f43yz6z.js +0 -12
  401. package/dist/chunk-5shey2e4.js +0 -3
  402. package/dist/chunk-6b5k6w2q.js +0 -7
  403. package/dist/chunk-6djzdes9.js +0 -14
  404. package/dist/chunk-6e4c6g46.js +0 -3
  405. package/dist/chunk-6eqbxcrd.js +0 -8
  406. package/dist/chunk-7074g241.js +0 -3
  407. package/dist/chunk-7b6s3g65.js +0 -179
  408. package/dist/chunk-7cgmq685.js +0 -33
  409. package/dist/chunk-7dkz6z2s.js +0 -3
  410. package/dist/chunk-7ed3tean.js +0 -3
  411. package/dist/chunk-7gd339hd.js +0 -109
  412. package/dist/chunk-7j5e8sdj.js +0 -3
  413. package/dist/chunk-7n8g0nfn.js +0 -38
  414. package/dist/chunk-7sqdeqsw.js +0 -1
  415. package/dist/chunk-80g54ncj.js +0 -3
  416. package/dist/chunk-8a5bxece.js +0 -4
  417. package/dist/chunk-8ahwt6a4.js +0 -721
  418. package/dist/chunk-8b3z0zd5.js +0 -8
  419. package/dist/chunk-8dhdpa5h.js +0 -4
  420. package/dist/chunk-8n9nnqr6.js +0 -3
  421. package/dist/chunk-8qc1bsym.js +0 -3
  422. package/dist/chunk-8va64c9n.js +0 -3
  423. package/dist/chunk-8vtm0m84.js +0 -3
  424. package/dist/chunk-8xj7c3mf.js +0 -8
  425. package/dist/chunk-988dw6q3.js +0 -9
  426. package/dist/chunk-9b6cec0v.js +0 -321
  427. package/dist/chunk-9cf97f9p.js +0 -3
  428. package/dist/chunk-9ecv8aqj.js +0 -14
  429. package/dist/chunk-9eq3ht5f.js +0 -8
  430. package/dist/chunk-9jtj77jx.js +0 -3
  431. package/dist/chunk-9t14se2t.js +0 -83
  432. package/dist/chunk-9wmq2272.js +0 -3
  433. package/dist/chunk-9zbk5zx5.js +0 -57
  434. package/dist/chunk-a2g2qb2y.js +0 -386
  435. package/dist/chunk-a3hyn4we.js +0 -79
  436. package/dist/chunk-a87qqft6.js +0 -194
  437. package/dist/chunk-ah88wzbg.js +0 -10
  438. package/dist/chunk-akf1r75r.js +0 -102
  439. package/dist/chunk-amaa1bev.js +0 -2
  440. package/dist/chunk-avx8aydt.js +0 -3
  441. package/dist/chunk-ay9qf4zj.js +0 -6
  442. package/dist/chunk-aywxfqev.js +0 -3
  443. package/dist/chunk-azkegjd8.js +0 -61
  444. package/dist/chunk-b77wjyn7.js +0 -84
  445. package/dist/chunk-baf1hfwh.js +0 -231
  446. package/dist/chunk-bdk6g1vj.js +0 -3
  447. package/dist/chunk-bhqgmyqw.js +0 -36
  448. package/dist/chunk-bk3j0n82.js +0 -341
  449. package/dist/chunk-bndmdahk.js +0 -3
  450. package/dist/chunk-bpgg59wa.js +0 -3
  451. package/dist/chunk-bs3gmfxz.js +0 -5
  452. package/dist/chunk-bxc7kjsk.js +0 -32
  453. package/dist/chunk-c7jg8w13.js +0 -3
  454. package/dist/chunk-ckxjqqn9.js +0 -3
  455. package/dist/chunk-cn8az1b4.js +0 -1
  456. package/dist/chunk-d0zjtdw4.js +0 -29
  457. package/dist/chunk-d1qh1x2g.js +0 -3
  458. package/dist/chunk-djddhmcc.js +0 -60
  459. package/dist/chunk-dqn9gyhb.js +0 -21
  460. package/dist/chunk-drjq2zwg.js +0 -3
  461. package/dist/chunk-dvfs1h3c.js +0 -117
  462. package/dist/chunk-e2q9c5vq.js +0 -8
  463. package/dist/chunk-e98v1bc6.js +0 -12
  464. package/dist/chunk-ejayeex8.js +0 -2
  465. package/dist/chunk-ejh8fyak.js +0 -3
  466. package/dist/chunk-ek2w6zvy.js +0 -4
  467. package/dist/chunk-ewa88139.js +0 -6
  468. package/dist/chunk-fjk3x41y.js +0 -3
  469. package/dist/chunk-frg705zq.js +0 -302
  470. package/dist/chunk-fzm3y0r3.js +0 -267
  471. package/dist/chunk-g1vt329s.js +0 -21
  472. package/dist/chunk-g4ps1dj8.js +0 -140
  473. package/dist/chunk-gkzq8zw4.js +0 -23
  474. package/dist/chunk-gz5fmp3q.js +0 -3
  475. package/dist/chunk-h0hjy0kn.js +0 -292
  476. package/dist/chunk-h5jxydqq.js +0 -147
  477. package/dist/chunk-h5wa62ek.js +0 -145
  478. package/dist/chunk-h7aq56qj.js +0 -28
  479. package/dist/chunk-h82kjdr4.js +0 -83
  480. package/dist/chunk-hbehnm18.js +0 -3
  481. package/dist/chunk-hbgxbgam.js +0 -58
  482. package/dist/chunk-hc2mf5h6.js +0 -4
  483. package/dist/chunk-hjm2xab3.js +0 -3
  484. package/dist/chunk-hjv76kcw.js +0 -1
  485. package/dist/chunk-hrnnh4tq.js +0 -142
  486. package/dist/chunk-ht43ds42.js +0 -236
  487. package/dist/chunk-hxx3za24.js +0 -62
  488. package/dist/chunk-hy8820vc.js +0 -6
  489. package/dist/chunk-j447q024.js +0 -28
  490. package/dist/chunk-j58vh0w6.js +0 -314
  491. package/dist/chunk-j8tn8enq.js +0 -3
  492. package/dist/chunk-jc0fc4ht.js +0 -11
  493. package/dist/chunk-jcs0ymw7.js +0 -3
  494. package/dist/chunk-jjamhxpm.js +0 -139
  495. package/dist/chunk-jjb05d21.js +0 -3
  496. package/dist/chunk-jjdq01dv.js +0 -128
  497. package/dist/chunk-jnmgm2xw.js +0 -5
  498. package/dist/chunk-jpndqst5.js +0 -3
  499. package/dist/chunk-jt0ezawy.js +0 -351
  500. package/dist/chunk-jz73j3qs.js +0 -169
  501. package/dist/chunk-k21df0pg.js +0 -10
  502. package/dist/chunk-k848dzsa.js +0 -429
  503. package/dist/chunk-kdfe4t91.js +0 -3
  504. package/dist/chunk-keawsbpn.js +0 -5
  505. package/dist/chunk-kgym7ch9.js +0 -8
  506. package/dist/chunk-khdn7jwe.js +0 -3
  507. package/dist/chunk-km25cwz6.js +0 -3
  508. package/dist/chunk-knm8a8yx.js +0 -398
  509. package/dist/chunk-krqn0ddk.js +0 -3
  510. package/dist/chunk-ktkmvaa8.js +0 -1
  511. package/dist/chunk-kx6eb6ma.js +0 -4
  512. package/dist/chunk-kypas8vy.js +0 -4
  513. package/dist/chunk-m167kjhv.js +0 -4
  514. package/dist/chunk-m491r0rj.js +0 -358
  515. package/dist/chunk-m8448qby.js +0 -11
  516. package/dist/chunk-mgj88zeq.js +0 -64
  517. package/dist/chunk-mhgk632d.js +0 -3
  518. package/dist/chunk-mv4fb50w.js +0 -1
  519. package/dist/chunk-n5kg7fpx.js +0 -7
  520. package/dist/chunk-n98x35xd.js +0 -8
  521. package/dist/chunk-n9dhs1dw.js +0 -106
  522. package/dist/chunk-nd9rmddh.js +0 -6
  523. package/dist/chunk-ngxfwzq3.js +0 -3
  524. package/dist/chunk-nhv099jv.js +0 -19
  525. package/dist/chunk-nm15ccsg.js +0 -5
  526. package/dist/chunk-npfmdb6y.js +0 -71
  527. package/dist/chunk-nvwb4x04.js +0 -3
  528. package/dist/chunk-nw34xajc.js +0 -8
  529. package/dist/chunk-p077sw22.js +0 -3
  530. package/dist/chunk-p1h8065h.js +0 -3
  531. package/dist/chunk-p3e0cqtt.js +0 -34
  532. package/dist/chunk-p3fpb79v.js +0 -477
  533. package/dist/chunk-p52yzjq6.js +0 -498
  534. package/dist/chunk-p73meypx.js +0 -134
  535. package/dist/chunk-pa9zb7ty.js +0 -4
  536. package/dist/chunk-payfb24w.js +0 -207
  537. package/dist/chunk-pcm1vd8w.js +0 -3
  538. package/dist/chunk-pcntd9h4.js +0 -3
  539. package/dist/chunk-pg1fvqb9.js +0 -167
  540. package/dist/chunk-psc3wfcf.js +0 -1115
  541. package/dist/chunk-pznnww6k.js +0 -6
  542. package/dist/chunk-q6zhd9yf.js +0 -3
  543. package/dist/chunk-qa59zejf.js +0 -246
  544. package/dist/chunk-qvrbjpdc.js +0 -3
  545. package/dist/chunk-qygvvygy.js +0 -12
  546. package/dist/chunk-r0jcmpv6.js +0 -68
  547. package/dist/chunk-r5m9xtm7.js +0 -3
  548. package/dist/chunk-rh80q1nd.js +0 -1
  549. package/dist/chunk-rkffm9sy.js +0 -128
  550. package/dist/chunk-rpx5fa65.js +0 -3
  551. package/dist/chunk-rqxf5hns.js +0 -3
  552. package/dist/chunk-rtr974rc.js +0 -30
  553. package/dist/chunk-rvptcndz.js +0 -3
  554. package/dist/chunk-rw26rpek.js +0 -171
  555. package/dist/chunk-rw7937v4.js +0 -19
  556. package/dist/chunk-rwrv9wbf.js +0 -3
  557. package/dist/chunk-rz2ec6g7.js +0 -347
  558. package/dist/chunk-s6ja2bdg.js +0 -66
  559. package/dist/chunk-scpkdrdb.js +0 -4
  560. package/dist/chunk-shv88d2d.js +0 -10
  561. package/dist/chunk-t0c9wvpr.js +0 -3
  562. package/dist/chunk-tffh3b1e.js +0 -35
  563. package/dist/chunk-tg2f1mzq.js +0 -11
  564. package/dist/chunk-trfswy66.js +0 -77
  565. package/dist/chunk-tzwtg722.js +0 -3
  566. package/dist/chunk-v7f8jj15.js +0 -4
  567. package/dist/chunk-v8j49spx.js +0 -3
  568. package/dist/chunk-v97390pe.js +0 -1
  569. package/dist/chunk-vcr5pzpx.js +0 -233
  570. package/dist/chunk-veeerpwa.js +0 -3
  571. package/dist/chunk-vg5kt6az.js +0 -4
  572. package/dist/chunk-vgv7jvyz.js +0 -219
  573. package/dist/chunk-vjbefncc.js +0 -3
  574. package/dist/chunk-vmxjghsm.js +0 -3
  575. package/dist/chunk-vw7vqd76.js +0 -3
  576. package/dist/chunk-vx22he47.js +0 -1
  577. package/dist/chunk-w3b6m427.js +0 -45
  578. package/dist/chunk-wazkqv7n.js +0 -3
  579. package/dist/chunk-wf7zrjsw.js +0 -138
  580. package/dist/chunk-wfg2gm11.js +0 -3
  581. package/dist/chunk-wg9k6h8w.js +0 -12
  582. package/dist/chunk-wkz2vwkr.js +0 -81
  583. package/dist/chunk-wvef3ngh.js +0 -127
  584. package/dist/chunk-wvf31nzs.js +0 -3
  585. package/dist/chunk-x05nxhyv.js +0 -262
  586. package/dist/chunk-x0770gt9.js +0 -4
  587. package/dist/chunk-x24s4heg.js +0 -1166
  588. package/dist/chunk-x3r64r0c.js +0 -6
  589. package/dist/chunk-x5g9w4hh.js +0 -5
  590. package/dist/chunk-xgkv66q5.js +0 -2230
  591. package/dist/chunk-xqq1vxb6.js +0 -1
  592. package/dist/chunk-xs03kc1h.js +0 -196
  593. package/dist/chunk-xv34zbp4.js +0 -3
  594. package/dist/chunk-xw36p73h.js +0 -90
  595. package/dist/chunk-xyg1r5w0.js +0 -4
  596. package/dist/chunk-xys2sxh6.js +0 -16
  597. package/dist/chunk-y0qg6rrv.js +0 -3
  598. package/dist/chunk-y1k17c8b.js +0 -21
  599. package/dist/chunk-y5xz0jc4.js +0 -141
  600. package/dist/chunk-y6xsqe9a.js +0 -10
  601. package/dist/chunk-yb1t2h8h.js +0 -11
  602. package/dist/chunk-ygvyc6wv.js +0 -90
  603. package/dist/chunk-yj4x5ehw.js +0 -21
  604. package/dist/chunk-yn38c15w.js +0 -4
  605. package/dist/chunk-ynhngsdh.js +0 -3
  606. package/dist/chunk-yrsb6j3z.js +0 -3
  607. package/dist/chunk-yywfvfph.js +0 -2
  608. package/dist/chunk-zcxzdrn7.js +0 -5
  609. package/dist/chunk-zen6ax1y.js +0 -27
  610. package/dist/chunk-zf2pek72.js +0 -3
  611. package/dist/chunk-zk3d0jjf.js +0 -7
  612. package/dist/chunk-zy3rp1ab.js +0 -93
@@ -1,83 +0,0 @@
1
- // @bun
2
- function Q(A){let q=[],E=/@interaction\s*\(\s*['"]([^'"]+)['"]\s*\)([\s\S]*?)@endinteraction/g,z=E.exec(A);while(z!==null){let j=z[1],D=z[2].trim(),B=O(D);q.push({name:j,storyId:"",variantId:"",steps:B}),z=E.exec(A)}return q}function O(A){let q=[],E=A.split(`
3
- `).map((z)=>z.trim()).filter(Boolean);for(let z of E){let j=z.match(/await\s+click\s*\(\s*['"]([^'"]+)['"]\s*\)/);if(j){q.push({action:"click",selector:j[1]});continue}let D=z.match(/await\s+type\s*\(\s*['"]([^'"]+)['"]\s*,\s*['"]([^'"]+)['"]\s*\)/);if(D){q.push({action:"type",selector:D[1],value:D[2]});continue}let B=z.match(/await\s+select\s*\(\s*['"]([^'"]+)['"]\s*,\s*['"]([^'"]+)['"]\s*\)/);if(B){q.push({action:"select",selector:B[1],value:B[2]});continue}let H=z.match(/await\s+hover\s*\(\s*['"]([^'"]+)['"]\s*\)/);if(H){q.push({action:"hover",selector:H[1]});continue}let J=z.match(/await\s+wait\s*\(\s*(\d+)\s*\)/);if(J){q.push({action:"wait",duration:Number.parseInt(J[1],10)});continue}let C=z.match(/expect\s*\(\s*['"]([^'"]+)['"]\s*\)\s*\.\s*(\w+)\s*\(\s*['"]?([^'")\s]+)['"]?\s*\)/);if(C){let N=C[1],K=C[2],L=C[3],G;switch(K){case"toHaveText":case"toContainText":G={type:"text",expected:L};break;case"toHaveValue":G={type:"value",expected:L};break;case"toBeVisible":G={type:"visible",expected:!0};break;case"toBeHidden":G={type:"hidden",expected:!0};break;case"toHaveClass":G={type:"class",expected:L};break;default:G={type:"text",expected:L}}q.push({action:"assert",selector:N,assertion:G})}}return q}async function U(A,q,E){let z=[];for(let j of E){let D=Date.now(),B=!0,H,J;try{if(j.setup)await j.setup();for(let C=0;C<j.steps.length;C++){let N=j.steps[C],K=await P(N);if(!K.success){B=!1,H=K.error,J=C;break}}if(j.teardown)await j.teardown()}catch(C){B=!1,H=String(C)}z.push({name:j.name,passed:B,error:H,duration:Date.now()-D,failedStep:J})}return z}async function P(A){switch(A.action){case"wait":return await new Promise((q)=>setTimeout(q,A.duration||100)),{success:!0};case"click":case"type":case"select":case"hover":case"focus":case"blur":return{success:!0};case"assert":return{success:!0};default:return{success:!1,error:`Unknown action: ${A.action}`}}}function V(){return`
4
- window.__stxInteraction = {
5
- async click(selector) {
6
- const el = document.querySelector(selector);
7
- if (!el) throw new Error('Element not found: ' + selector);
8
- el.click();
9
- },
10
-
11
- async type(selector, value) {
12
- const el = document.querySelector(selector);
13
- if (!el) throw new Error('Element not found: ' + selector);
14
- el.value = value;
15
- el.dispatchEvent(new Event('input', { bubbles: true }));
16
- el.dispatchEvent(new Event('change', { bubbles: true }));
17
- },
18
-
19
- async select(selector, value) {
20
- const el = document.querySelector(selector);
21
- if (!el) throw new Error('Element not found: ' + selector);
22
- el.value = value;
23
- el.dispatchEvent(new Event('change', { bubbles: true }));
24
- },
25
-
26
- async hover(selector) {
27
- const el = document.querySelector(selector);
28
- if (!el) throw new Error('Element not found: ' + selector);
29
- el.dispatchEvent(new MouseEvent('mouseenter', { bubbles: true }));
30
- },
31
-
32
- async wait(ms) {
33
- return new Promise(resolve => setTimeout(resolve, ms));
34
- },
35
-
36
- expect(selector) {
37
- const el = document.querySelector(selector);
38
- return {
39
- toHaveText(expected) {
40
- if (!el) throw new Error('Element not found: ' + selector);
41
- if (el.textContent !== expected) {
42
- throw new Error('Expected text "' + expected + '" but got "' + el.textContent + '"');
43
- }
44
- },
45
- toContainText(expected) {
46
- if (!el) throw new Error('Element not found: ' + selector);
47
- if (!el.textContent.includes(expected)) {
48
- throw new Error('Expected text to contain "' + expected + '"');
49
- }
50
- },
51
- toHaveValue(expected) {
52
- if (!el) throw new Error('Element not found: ' + selector);
53
- if (el.value !== expected) {
54
- throw new Error('Expected value "' + expected + '" but got "' + el.value + '"');
55
- }
56
- },
57
- toBeVisible() {
58
- if (!el) throw new Error('Element not found: ' + selector);
59
- const style = window.getComputedStyle(el);
60
- if (style.display === 'none' || style.visibility === 'hidden') {
61
- throw new Error('Expected element to be visible');
62
- }
63
- },
64
- toBeHidden() {
65
- if (el) {
66
- const style = window.getComputedStyle(el);
67
- if (style.display !== 'none' && style.visibility !== 'hidden') {
68
- throw new Error('Expected element to be hidden');
69
- }
70
- }
71
- },
72
- toHaveClass(className) {
73
- if (!el) throw new Error('Element not found: ' + selector);
74
- if (!el.classList.contains(className)) {
75
- throw new Error('Expected element to have class "' + className + '"');
76
- }
77
- }
78
- };
79
- }
80
- };
81
- `}function W(A){let q=[],E=A.filter((j)=>j.passed).length,z=A.filter((j)=>!j.passed).length;q.push(""),q.push("Interaction Tests"),q.push("\u2500".repeat(40));for(let j of A){let D=j.passed?"\u2713":"\u2717",B=j.passed?"PASS":"FAIL";if(q.push(`${D} ${j.name} [${B}] (${j.duration}ms)`),!j.passed&&j.error){if(q.push(` Error: ${j.error}`),j.failedStep!==void 0)q.push(` Failed at step: ${j.failedStep+1}`)}}return q.push(""),q.push(`Total: ${A.length} | Passed: ${E} | Failed: ${z}`),q.push(""),q.join(`
82
- `)}
83
- export{Q as ha,U as ia,V as ja,W as ka};
@@ -1,3 +0,0 @@
1
- // @bun
2
- import{Qs as $}from"./chunk-1xz0w746.js";import{py as Z}from"./chunk-zen6ax1y.js";import{Ry as Y}from"./chunk-27zsyhrd.js";import{uz as _}from"./chunk-w3b6m427.js";function A(L,K){let H={},B=L.trim();if(B.startsWith("{"))B=B.slice(1);if(B.endsWith("}"))B=B.slice(0,-1);if(B=B.trim(),!B)return H;let z=0;while(z<B.length){while(z<B.length&&/\s/.test(B[z]))z++;if(z>=B.length)break;let I="";if(B[z]==='"'||B[z]==="'"){let F=B[z];z++;while(z<B.length&&B[z]!==F)if(B[z]==="\\"&&z+1<B.length)I+=B[z+1],z+=2;else I+=B[z],z++;z++}else while(z<B.length&&/[\w$]/.test(B[z]))I+=B[z],z++;while(z<B.length&&/\s/.test(B[z]))z++;if(B[z]===":")z++;while(z<B.length&&/\s/.test(B[z]))z++;let G,Q=z;if(B[z]==='"'||B[z]==="'"){let F=B[z];z++;let M="";while(z<B.length&&B[z]!==F)if(B[z]==="\\"&&z+1<B.length)M+=B[z+1],z+=2;else M+=B[z],z++;z++,G=M}else if(B[z]==="{"){let F=1;z++;while(z<B.length&&F>0){if(B[z]==="{")F++;else if(B[z]==="}")F--;else if(B[z]==='"'||B[z]==="'"){let J=B[z];z++;while(z<B.length&&B[z]!==J){if(B[z]==="\\")z++;z++}}z++}let M=B.slice(Q,z);G=A(M,K)}else if(B[z]==="["){let F=1;z++;while(z<B.length&&F>0){if(B[z]==="[")F++;else if(B[z]==="]")F--;else if(B[z]==='"'||B[z]==="'"){let J=B[z];z++;while(z<B.length&&B[z]!==J){if(B[z]==="\\")z++;z++}}z++}let M=B.slice(Q,z);try{G=JSON.parse(M.replace(/'/g,'"'))}catch{G=M}}else{let F="";while(z<B.length&&B[z]!==","&&!/\s/.test(B[z]))F+=B[z],z++;if(F=F.trim(),F==="true")G=!0;else if(F==="false")G=!1;else if(F==="null")G=null;else if(F==="undefined")G=void 0;else if(/^-?\d+(\.\d+)?$/.test(F))G=Number(F);else if(F in K)G=K[F];else G=F}if(I)H[I]=G;while(z<B.length&&/\s/.test(B[z]))z++;if(B[z]===",")z++}return H}function D(L,K,H){let B=[];for(let[z,I]of Object.entries(K)){let G=L[z];if(I.required&&(G===void 0||G===null)){B.push(`Component "${H}": Missing required prop "${z}"`);continue}if(G===void 0||G===null)continue;let Q=Array.isArray(I.type)?I.type:[I.type];if(!Q.includes("any")){let F=O(G);if(!Q.includes(F))B.push(`Component "${H}": Prop "${z}" expected ${Q.join(" | ")}, got ${F}`)}if(I.validator&&!I.validator(G))B.push(`Component "${H}": Prop "${z}" failed custom validation`)}return B}function T(L,K){let H={...L};for(let[B,z]of Object.entries(K))if(H[B]===void 0&&z.default!==void 0)H[B]=typeof z.default==="function"?z.default():z.default;return H}function O(L){if(Array.isArray(L))return"array";if(L===null)return"null";return typeof L}var R={name:"component",handler:async(L,K,H,B)=>{if(K.length<1)return Z("Component","component directive requires at least the component name",Y.INVALID_DIRECTIVE_SYNTAX);let z=K[0].replace(/['"]/g,""),I={};if(K.length>1)try{let J=K.slice(1).join(",").trim();if(J.startsWith("{")){if(I=_(J,H),Object.keys(I).length===0)I=A(J,H)}else{let U=J.trim(),X=H[U];if(X&&typeof X==="object"&&!Array.isArray(X))I=X}}catch(J){let U=J instanceof Error?J.message:String(J);return console.error("Component props parsing error:",U),Z("Component",`Error parsing component props: ${U}`,Y.EVALUATION_ERROR)}let G=H.__stx_options||{},Q=G.componentsDir||"components",F=new Set;if(!H.__processedComponents)H.__processedComponents=new Set;let M=H.__processedComponents;try{return await $(z,I,"",Q,H,B,G,M,F)}catch(J){console.error("Component rendering error:",J);let U=J instanceof Error?J.message:String(J);return Z("Component",`Error rendering component: ${U}`,Y.COMPONENT_RENDER_ERROR)}},hasEndTag:!1};function q(){return[R]}
3
- export{D as fp,T as gp,R as hp,q as ip};
@@ -1,58 +0,0 @@
1
- // @bun
2
- import{py as U}from"./chunk-zen6ax1y.js";import{Ry as v}from"./chunk-27zsyhrd.js";import{uz as D}from"./chunk-w3b6m427.js";function P(F,z,V,Y){let G=F;G=G.replace(/@meta\(\s*['"]([^'"]+)['"](?:,\s*['"]([^'"]+)['"]\s*)?\)/g,($,N,A)=>{if(!A&&N.includes(":")){let Z=N.split(":"),q=N,B=Z.length>1?Z[1]:"";if(B&&z[B])A=z[B];else if(q.startsWith("og:")&&z.openGraph&&z.openGraph[Z[1]])A=z.openGraph[Z[1]];else A="";return A?`<meta property="${J(q)}" content="${J(A)}">`:""}return A?`<meta name="${J(N)}" content="${J(A)}">`:""});let I=/@metaTag\s*\(/g,_;while((_=I.exec(G))!==null){let $=_.index,N=$+_[0].length-1,A=1,Z=N+1;while(Z<G.length&&A>0){if(G[Z]==="(")A++;else if(G[Z]===")"){if(A--,A===0)break}Z++}if(A!==0)break;let q=G.substring(N+1,Z).trim(),B=Z+1,L=(()=>{try{let R=D(q,z);if(!R)return"";let j="<meta";if(R.name)j+=` name="${J(String(R.name))}"`;if(R.property)j+=` property="${J(String(R.property))}"`;if(R.httpEquiv)j+=` http-equiv="${J(String(R.httpEquiv))}"`;if(R.content)j+=` content="${J(String(R.content))}"`;return j+=">",j}catch(R){let j=R instanceof Error?R.message:String(R);return U("MetaTag",j,v.EVALUATION_ERROR)}})();G=G.substring(0,$)+L+G.substring(B),I.lastIndex=0}return G}function y(F,z,V){let Y=F,G=/@structuredData\s*\(/g,I;while((I=G.exec(Y))!==null){let _=I.index,$=_+I[0].length-1,N=1,A=$+1;while(A<Y.length&&N>0){if(Y[A]==="(")N++;else if(Y[A]===")"){if(N--,N===0)break}A++}if(N!==0)break;let Z=Y.substring($+1,A).trim(),q=A+1,B=(()=>{try{let L=D(Z,z);if(!L)return"";if(!L["@context"])L["@context"]="https://schema.org";return`<script type="application/ld+json">${JSON.stringify(L).replace(/<\//g,"<\\/")}</script>`}catch(L){let R=L instanceof Error?L.message:String(L);return U("StructuredData",R,v.EVALUATION_ERROR)}})();Y=Y.substring(0,_)+B+Y.substring(q),G.lastIndex=0}return Y}function T(F,z,V,Y){let G=F,I=/@seo\s*\(\s*\{/g,_;while((_=I.exec(G))!==null){let $=G.indexOf("{",_.index+4),N=1,A=$+1,Z=null,q=!1;while(A<G.length&&N>0){let O=G[A];if(q){q=!1,A++;continue}if(O==="\\"&&Z){q=!0,A++;continue}if(Z){if(O===Z)Z=null;A++;continue}if(O==='"'||O==="'"||O==="`"){Z=O,A++;continue}if(O==="{")N++;else if(O==="}")N--;A++}if(N!==0)break;let B=G.substring(A).match(/^\s*\)/);if(!B)break;let L=A+B[0].length,R=G.substring($,A),j=G.substring(_.index,L),X=((O)=>{try{let Q=D(O,z);if(!Q)return"";let k="";if(Q.title)k+=`<title>${J(Q.title)}</title>
3
- `,k+=`<meta name="title" content="${J(Q.title)}">
4
- `;if(Q.description)k+=`<meta name="description" content="${J(Q.description)}">
5
- `;if(Q.keywords){let W=Array.isArray(Q.keywords)?Q.keywords.join(", "):Q.keywords;k+=`<meta name="keywords" content="${J(W)}">
6
- `}if(Q.robots)k+=`<meta name="robots" content="${J(Q.robots)}">
7
- `;if(Q.canonical)k+=`<link rel="canonical" href="${J(Q.canonical)}">
8
- `;if(Q.openGraph){let W=Q.openGraph;if(k+=`<meta property="og:type" content="${J(W.type||"website")}">
9
- `,W.title||Q.title){let K=W.title||Q.title||"";k+=`<meta property="og:title" content="${J(K)}">
10
- `}if(W.description||Q.description){let K=W.description||Q.description||"";k+=`<meta property="og:description" content="${J(K)}">
11
- `}if(W.url||Q.canonical){let K=W.url||Q.canonical||"";k+=`<meta property="og:url" content="${J(K)}">
12
- `}if(W.image){if(k+=`<meta property="og:image" content="${J(W.image)}">
13
- `,W.imageAlt)k+=`<meta property="og:image:alt" content="${J(W.imageAlt)}">
14
- `;if(W.imageWidth)k+=`<meta property="og:image:width" content="${J(String(W.imageWidth))}">
15
- `;if(W.imageHeight)k+=`<meta property="og:image:height" content="${J(String(W.imageHeight))}">
16
- `}if(W.siteName)k+=`<meta property="og:site_name" content="${J(W.siteName)}">
17
- `}if(Q.twitter){let W=Q.twitter;if(k+=`<meta name="twitter:card" content="${J(W.card||"summary_large_image")}">
18
- `,W.title||Q.title){let K=W.title||Q.title||"";k+=`<meta name="twitter:title" content="${J(K)}">
19
- `}if(W.description||Q.description){let K=W.description||Q.description||"";k+=`<meta name="twitter:description" content="${J(K)}">
20
- `}if(W.image||Q.openGraph&&Q.openGraph.image){let K=W.image||(Q.openGraph?Q.openGraph.image:"")||"";k+=`<meta name="twitter:image" content="${J(K)}">
21
- `}if(W.site)k+=`<meta name="twitter:site" content="${J(W.site)}">
22
- `;if(W.creator)k+=`<meta name="twitter:creator" content="${J(W.creator)}">
23
- `}if(Q.structuredData){let W=JSON.stringify(Q.structuredData).replace(/<\//g,"<\\/");k+=`<script type="application/ld+json">${W}</script>
24
- `}return k.trim()}catch(Q){let k=Q instanceof Error?Q.message:String(Q);return U("SEO",`Error processing @seo directive: ${k}`,v.EVALUATION_ERROR)}})(R);G=G.substring(0,_.index)+X+G.substring(L),I.lastIndex=_.index+X.length}return G}function H(F,z,V){if(V.seo?.enabled===!1)return F;if(F.includes("<!-- stx SEO Tags -->")||V.skipDefaultSeoTags===!0)return F;let Y=z.__stx_runtime_head;if(!!(Y?.title||Y?.meta?.some((q)=>q.property==="og:title"||q.name==="og:title"||q.name==="twitter:title"||q.name==="description")))return F;if(/<meta\s+(?:[^>]*\s)?property=["']og:title["']/i.test(F)||/<meta\s+(?:[^>]*\s)?name=["']og:title["']/i.test(F)||/<meta\s+(?:[^>]*\s)?name=["']twitter:title["']/i.test(F))return F;if(!F.includes("<head>")&&!F.includes("<head "))return F;let I=F.includes("<title>")||F.includes("</title>"),_="";if(z.title)_=z.title;else if(z.meta&&z.meta.title)_=z.meta.title;else if(V.seo?.defaultConfig?.title)_=V.seo.defaultConfig.title;else _=V.defaultTitle||"stx Project";let $="";if(z.description)$=z.description;else if(z.meta&&z.meta.description)$=z.meta.description;else if(V.seo?.defaultConfig?.description)$=V.seo.defaultConfig.description;else $=V.defaultDescription||"A website built with stx templating engine";let N="";if(z.image)N=z.image;else if(z.meta&&z.meta.image)N=z.meta.image;else if(z.openGraph&&z.openGraph.image)N=z.openGraph.image;else if(V.seo?.defaultImage)N=V.seo.defaultImage;else if(V.defaultImage)N=V.defaultImage;let A=`
25
- <!-- stx SEO Tags -->
26
- <meta name="title" content="${J(_)}">
27
- <meta name="description" content="${J($)}">
28
- <meta property="og:title" content="${J(_)}">
29
- <meta property="og:description" content="${J($)}">
30
- <meta property="og:type" content="website">
31
- <meta name="twitter:card" content="summary_large_image">
32
- <meta name="twitter:title" content="${J(_)}">
33
- <meta name="twitter:description" content="${J($)}">
34
- `;if(N)A+=`
35
- <meta property="og:image" content="${J(N)}">
36
- <meta name="twitter:image" content="${J(N)}">
37
- `;let Z=F;if(!I)Z=Z.replace(/<head[^>]*>/,`$&
38
- <title>${J(_)}</title>`);return Z.replace(/<head[^>]*>/,`$&
39
- ${A}
40
- `)}function J(F){return F.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}var S={name:"meta",handler:(F,z,V,Y)=>{if(z.length<1)return U("Meta","meta directive requires at least the meta name",v.INVALID_DIRECTIVE_SYNTAX);let G=z[0].replace(/['"]/g,""),I=z.length>1?z[1].replace(/['"]/g,""):"";return`<meta name="${J(G)}" content="${J(I)}">`},hasEndTag:!1},w={name:"structuredData",handler:(F,z,V,Y)=>{if(F.trim()==="")return U("StructuredData","structuredData directive requires JSON-LD content",v.INVALID_DIRECTIVE_SYNTAX);try{let G=JSON.parse(F);if(!G["@context"])G["@context"]="https://schema.org";if(!G["@type"])return U("StructuredData","structuredData requires @type property",v.INVALID_DIRECTIVE_SYNTAX);return`<script type="application/ld+json">${JSON.stringify(G)}</script>`}catch(G){let I=G instanceof Error?G.message:String(G);return U("StructuredData",I,v.EVALUATION_ERROR)}},hasEndTag:!0};function f(){return[S,w]}function x(F,z){let{baseUrl:V,defaultChangefreq:Y="weekly",defaultPriority:G=0.5,includeLastmod:I=!0}=z,_=V.replace(/\/$/,"");return`<?xml version="1.0" encoding="UTF-8"?>
41
- <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
42
- ${F.map((N)=>{let A=N.loc.startsWith("http")?N.loc:`${_}${N.loc.startsWith("/")?"":"/"}${N.loc}`,Z=N.lastmod||(I?new Date().toISOString().split("T")[0]:void 0),q=N.changefreq||Y,B=N.priority??G,L=` <url>
43
- <loc>${C(A)}</loc>`;if(Z)L+=`
44
- <lastmod>${Z}</lastmod>`;return L+=`
45
- <changefreq>${q}</changefreq>`,L+=`
46
- <priority>${B.toFixed(1)}</priority>`,L+=`
47
- </url>`,L}).join(`
48
- `)}
49
- </urlset>`}function h(F,z){let V=z.replace(/\/$/,""),Y=new Date().toISOString().split("T")[0];return`<?xml version="1.0" encoding="UTF-8"?>
50
- <sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
51
- ${F.map((I)=>{let _=I.startsWith("http")?I:`${V}${I.startsWith("/")?"":"/"}${I}`;return` <sitemap>
52
- <loc>${C(_)}</loc>
53
- <lastmod>${Y}</lastmod>
54
- </sitemap>`}).join(`
55
- `)}
56
- </sitemapindex>`}async function d(F,z){let{extensions:V=[".stx",".html",".htm"],ignore:Y=["_*",".*","node_modules","components","partials","layouts"]}=z,G=[],I=V.length===1?`*${V[0]}`:`*{${V.join(",")}}`,_=new Bun.Glob(`**/${I}`);for await(let $ of _.scan(F)){if(Y.some((B)=>{if(B.startsWith("*"))return $.includes(B.slice(1));return $.startsWith(B)||$.includes(`/${B}`)}))continue;let A=$.replace(/\\/g,"/").replace(/index\.(stx|html|htm)$/,"").replace(/\.(stx|html|htm)$/,"");if(!A.startsWith("/"))A=`/${A}`;if(A!=="/"&&A.endsWith("/"))A=A.slice(0,-1);let Z=`${F}/${$}`,q;try{let B=await Bun.file(Z).stat();if(B)q=new Date(B.mtime).toISOString().split("T")[0]}catch{}G.push({loc:A||"/",lastmod:q,priority:A==="/"?1:0.5})}return G.sort(($,N)=>$.loc.localeCompare(N.loc)),G}function b(F){let z=[];for(let V of F.rules){if(z.push(`User-agent: ${V.userAgent}`),V.allow)for(let Y of V.allow)z.push(`Allow: ${Y}`);if(V.disallow)for(let Y of V.disallow)z.push(`Disallow: ${Y}`);if(V.crawlDelay!==void 0)z.push(`Crawl-delay: ${V.crawlDelay}`);z.push("")}if(F.sitemap){let V=Array.isArray(F.sitemap)?F.sitemap:[F.sitemap];for(let Y of V)z.push(`Sitemap: ${Y}`)}if(F.host)z.push(`Host: ${F.host}`);return z.join(`
57
- `).trim()}function u(F){return b({rules:[{userAgent:"*",allow:["/"]}],sitemap:F})}function C(F){return F.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")}
58
- export{P as wt,y as xt,T as yt,H as zt,S as At,w as Bt,f as Ct,x as Dt,h as Et,d as Ft,b as Gt,u as Ht};
@@ -1,4 +0,0 @@
1
- // @bun
2
- import{cA as Q}from"./chunk-35faj94w.js";import O from"fs";import R from"path";async function U(j,b={}){let q=Date.now(),z={total:0,passed:0,failed:0,new:0,failures:[],duration:0},K=b.snapshotDir||R.join(j.root,".stx","story","snapshots");await O.promises.mkdir(K,{recursive:!0});let B=j.storyFiles;if(b.filter&&b.filter.length>0)B=B.filter((J)=>b.filter.some((G)=>J.fileName.toLowerCase().includes(G.toLowerCase())));for(let J of B)await W(J,K,b,z);return z.duration=Date.now()-q,z}async function W(j,b,q,z){let K=j.story;if(!K)return;for(let B of K.variants){z.total++;let J=R.join(b,`${j.id}-${B.id}.snap`),G=X(B.source||""),L=await Z(J);if(q.update||!L){let M={storyId:j.id,variantId:B.id,component:j.fileName,timestamp:Date.now(),hash:G};if(await O.promises.writeFile(J,JSON.stringify(M,null,2)),!L)z.new++;z.passed++}else try{let M=await O.promises.readFile(J,"utf-8"),N=JSON.parse(M);if(N.hash===G)z.passed++;else z.failed++,z.failures.push({storyId:j.id,variantId:B.id,component:j.fileName,message:"Snapshot mismatch",difference:Y(N.hash,G)})}catch(M){z.failed++,z.failures.push({storyId:j.id,variantId:B.id,component:j.fileName,message:`Error reading snapshot: ${M}`})}}}async function k(j,b={}){return(await U(j,{...b,update:!0})).total}function X(j){let b=0;for(let q=0;q<j.length;q++){let z=j.charCodeAt(q);b=(b<<5)-b+z,b=b&b}return b.toString(16)}function Y(j,b){if(j===b)return 0;let q=Math.abs(Number.parseInt(j,16)-Number.parseInt(b,16));return Math.min(q/1e6,1)}async function Z(j){try{return await O.promises.access(j),!0}catch{return!1}}function w(j){let b=[];if(b.push(""),b.push("\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501"),b.push(" STX Story Visual Regression Tests"),b.push("\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501"),b.push(""),j.failures.length>0){b.push(" \u274C Failures:"),b.push("");for(let q of j.failures){if(b.push(` \u2022 ${q.component} / ${q.variantId}`),b.push(` ${q.message}`),q.difference!==void 0)b.push(` Difference: ${(q.difference*100).toFixed(2)}%`);b.push("")}}if(b.push(" Summary:"),b.push(` Total: ${j.total}`),b.push(` Passed: ${j.passed} \u2713`),b.push(` Failed: ${j.failed} \u2717`),j.new>0)b.push(` New: ${j.new} \u26A1`);return b.push(` Time: ${j.duration}ms`),b.push(""),b.push("\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501"),b.push(""),b.join(`
3
- `)}async function A(j,b={}){let q=performance.now(),z=[],K=0,B=0;for(let G of j.storyFiles)try{let L=await Bun.file(G.path).text(),M=await Q(L,G.path);if(M.length>0){for(let N of M)z.push({storyId:G.id,variantId:"default",component:G.component,message:`A11y: ${N.message}`,expected:"No accessibility violations",actual:`${N.type}: ${N.message} (impact: ${N.impact})`});B++}else K++}catch(L){z.push({storyId:G.id,variantId:"default",component:G.component,message:`Failed to check a11y: ${L instanceof Error?L.message:String(L)}`,expected:"File readable for a11y check",actual:"File read error"}),B++}let J=performance.now()-q;return{total:j.storyFiles.length,passed:K,failed:B,new:0,failures:z,duration:J}}
4
- export{U as be,k as ce,w as de,A as ee};
@@ -1,3 +0,0 @@
1
- // @bun
2
- var B=0,A=new Map;function F(){B=0,A.clear()}function G(b,q){let j=B++,w=`<!--__STX_${b.toUpperCase()}_${j}__-->`;return A.set(w,{type:b,expression:q}),w}function I(){let b={};for(let[q,j]of A)b[q]={type:j.type,expression:j.expression};return b}function J(b){let q={},j=/<!--__STX_(EXPR|COND|RAW)_(\d+)__-->/g,w;while((w=j.exec(b))!==null){let z=w[0],D=w[1].toLowerCase(),E=A.get(z);q[z]={type:D,expression:E?.expression||""}}return q}function K(b,q){let j=b;for(let[w,z]of q)j=j.split(w).join(z);return j}function N(b){return b.includes("<!--__STX_")}
3
- export{F as $t,G as au,I as bu,J as cu,K as du,N as eu};
@@ -1 +0,0 @@
1
- // @bun
@@ -1,142 +0,0 @@
1
- // @bun
2
- import{Rs as J,Sr as H}from"./chunk-1xz0w746.js";import A from"fs";import $ from"path";async function B(z){try{let G=(await Bun.file(z).text()).match(/<script\b[^>]*>([\s\S]*?)<\/script>/i);if(!G)return[];let K=G[1],q=[],j=/\/\*\*\s*([\s\S]*?)\s*\*\/\s*(?:(?:const|let|var)\s*)?(?:([\w$]+)\s*=|module\.exports\.([\w$]+)\s*=|\s*([\w$]+)\s*:)/g,O;while((O=j.exec(K))!==null){let Q=O[1],U=O[2]||O[3]||O[4];if(!U)continue;let V={name:U},X=Q.match(/@type\s+\{([^}]+)\}/i);if(X)V.type=X[1].trim();if(Q.match(/@required/i))V.required=!0;let S=Q.match(/@default\s+(.+?)(?:\s+|$)/i);if(S)V.default=S[1].trim();let _=Q.split(`
3
- `).map((Z)=>Z.trim().replace(/^\*\s*/,"")).filter((Z)=>!Z.startsWith("@")&&Z.length>0);V.description=_.join(" ").trim(),q.push(V)}if(q.length===0){let Q=K.match(/module\.exports\s*=\s*\{([^}]+)\}/i);if(Q){let V=Q[1].split(",").map((X)=>X.trim()).filter(Boolean);for(let X of V){let[Y]=X.split(":").map((S)=>S.trim());if(Y)q.push({name:Y})}}}return q}catch(I){return console.error(`Error extracting props from ${z}:`,I),[]}}async function E(z){try{let I=await Bun.file(z).text(),G=I.match(/^\s*<!--\s*([\s\S]*?)\s*-->/)||I.match(/^\s*\/\*\*\s*([\s\S]*?)\s*\*\//);if(G)return G[1].split(`
4
- `).map((K)=>K.trim().replace(/^\*\s*/,"")).join(" ").trim();return""}catch{return""}}async function N(z,I=!1,G){let K=$.basename(z,".stx"),q=await B(z),j=await E(z),O="";if(I&&G)O=`<${G}></${G}>`;else{let Q=q.map((U)=>{if(U.type==="boolean")return`:${U.name}="true"`;return`${U.name}="value"`}).join(`
5
- `);O=`<${K}
6
- ${Q}
7
- />`}return{name:K,path:z,description:j,props:q,example:O,isWebComponent:I,tag:G}}async function L(z){try{if(!await J(z))return console.warn(`Components directory does not exist: ${z}`),[];let I=await A.promises.readdir(z,{withFileTypes:!0}),G=[];for(let K of I){let q=$.join(z,K.name);if(K.isDirectory()){let j=await L(q);G.push(...j)}else if(K.isFile()&&K.name.endsWith(".stx"))G.push(q)}return G}catch(I){return console.error(`Error finding component files in ${z}:`,I),[]}}async function W(z,I){try{if(!await J(z))return[];let G=await L(z),K=[],q=new Map;if(I?.components?.length)for(let j of I.components)q.set(j.file,j);for(let j of G){let O=q.get(j),Q=!!O,U=O?.tag,V=await N(j,Q,U);K.push(V)}return K}catch(G){return console.error("Error generating component docs:",G),[]}}async function F(z){try{if(!await J(z))return[];let I=await A.promises.readdir(z,{withFileTypes:!0}),G=[];for(let K of I){if(!K.isFile()||!K.name.endsWith(".stx"))continue;let q=$.join(z,K.name),j=await Bun.file(q).text(),O=$.basename(q,".stx"),Q=j.match(/^\s*<!--\s*([\s\S]*?)\s*-->/)||j.match(/^\s*\/\*\*\s*([\s\S]*?)\s*\*\//),U=Q?Q[1].split(`
8
- `).map((R)=>R.trim().replace(/^\*\s*/,"")).join(" ").trim():"",V=/@component\(\s*['"]([^'"]+)['"]/g,X=/<([A-Z][a-zA-Z0-9]*|[a-z]+-[a-z0-9-]+)(?:\s[^>]*)?\/?>|\{\{\s*slot\s*\}\}/g,Y=new Set,S;while((S=V.exec(j))!==null)Y.add(S[1]);while((S=X.exec(j))!==null)if(S[1]&&S[1]!=="slot")Y.add(S[1]);let _=/@([a-z]+)(?:\s*\(|\s+|$)/g,Z=new Set;while((S=_.exec(j))!==null)Z.add(S[1]);G.push({name:O,path:q,description:U,components:[...Y],directives:[...Z]})}return G}catch(I){return console.error("Error generating template docs:",I),[]}}async function y(z=[]){try{let I=[{name:"if",description:"Conditionally render content based on a condition",hasEndTag:!0,example:`@if(user.isLoggedIn)
9
- <p>Welcome, {{ user.name }}!</p>
10
- @endif`},{name:"else",description:"Provides an alternative if a condition is not met",hasEndTag:!1,example:`@if(user.isLoggedIn)
11
- <p>Welcome back!</p>
12
- @else
13
- <p>Please log in</p>
14
- @endif`},{name:"elseif",description:"Provides an alternative condition",hasEndTag:!1,example:`@if(score > 90)
15
- <p>A</p>
16
- @elseif(score > 80)
17
- <p>B</p>
18
- @elseif(score > 70)
19
- <p>C</p>
20
- @endif`},{name:"unless",description:"Conditionally render content if a condition is false",hasEndTag:!0,example:`@unless(user.isLoggedIn)
21
- <p>Please log in</p>
22
- @endunless`},{name:"for",description:"Loop through an array or object",hasEndTag:!0,example:`@for(item of items)
23
- <li>{{ item.name }}</li>
24
- @endfor`},{name:"while",description:"Loop while a condition is true",hasEndTag:!0,example:`@while(page < totalPages)
25
- <p>Page {{ page }}</p>
26
- @endwhile`},{name:"component",description:"Include a component in the template",hasEndTag:!1,example:'@component("alert", { type: "warning", title: "Warning", message: "This is a warning" })'},{name:"include",description:"Include a partial template",hasEndTag:!1,example:'@include("partials/header")'},{name:"raw",description:"Display content without processing expressions",hasEndTag:!0,example:`@raw
27
- {{ This will be displayed as-is }}
28
- @endraw`},{name:"translate",description:"Translate a string using the i18n system",hasEndTag:!1,example:'@translate("welcome.message", { name: user.name })'},{name:"t",description:"Short alias for translate directive",hasEndTag:!1,example:'@t("welcome.message", { name: user.name })'}];for(let G of z)I.push({name:G.name,description:G.description||"",hasEndTag:G.hasEndTag||!1,example:""});return I}catch(I){return console.error("Error generating directive docs:",I),[]}}function T(z=[],I=[],G=[],K){let q=`# stx Documentation
29
-
30
- `;if(K)q+=`${K}
31
-
32
- `;if(z.length>0){q+=`## Components
33
-
34
- `;for(let j of z){if(q+=`### ${j.name}
35
-
36
- `,j.description)q+=`${j.description}
37
-
38
- `;if(j.isWebComponent)q+=`**Web Component Tag:** \`${j.tag}\`
39
-
40
- `;if(j.props.length>0){q+=`#### Properties
41
-
42
- `,q+=`| Name | Type | Required | Default | Description |
43
- `,q+=`| ---- | ---- | -------- | ------- | ----------- |
44
- `;for(let O of j.props)q+=`| ${O.name} | ${O.type||"any"} | ${O.required?"Yes":"No"} | ${O.default||"-"} | ${O.description||"-"} |
45
- `;q+=`
46
- `}if(j.example)q+=`#### Example
47
-
48
- `,q+="```html\n",q+=j.example,q+="\n```\n\n"}}if(I.length>0){q+=`## Templates
49
-
50
- `;for(let j of I){if(q+=`### ${j.name}
51
-
52
- `,j.description)q+=`${j.description}
53
-
54
- `;if(j.components&&j.components.length>0)q+=`**Components Used:** ${j.components.join(", ")}
55
-
56
- `;if(j.directives&&j.directives.length>0)q+=`**Directives Used:** ${j.directives.join(", ")}
57
-
58
- `}}if(G.length>0){q+=`## Directives
59
-
60
- `,q+=`| Directive | Description | Has End Tag |
61
- `,q+=`| --------- | ----------- | ----------- |
62
- `;for(let j of G)q+=`| @${j.name} | ${j.description||"-"} | ${j.hasEndTag?"Yes":"No"} |
63
- `;q+=`
64
- `;for(let j of G)if(j.example)q+=`### @${j.name}
65
-
66
- `,q+=`${j.description||""}
67
-
68
- `,q+=`#### Example
69
-
70
- `,q+="```html\n",q+=j.example,q+="\n```\n\n"}return q}function M(z=[],I=[],G=[],K){let q=`<!DOCTYPE html>
71
- <html lang="en">
72
- <head>
73
- <meta charset="UTF-8">
74
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
75
- <title>stx Documentation</title>
76
- <style>
77
- body {
78
- font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
79
- line-height: 1.6;
80
- color: #333;
81
- max-width: 1200px;
82
- margin: 0 auto;
83
- padding: 2rem;
84
- }
85
- h1, h2, h3, h4 { margin-top: 2rem; }
86
- table {
87
- border-collapse: collapse;
88
- width: 100%;
89
- margin: 1rem 0;
90
- }
91
- th, td {
92
- text-align: left;
93
- padding: 0.5rem;
94
- border-bottom: 1px solid #ddd;
95
- }
96
- th { border-bottom: 2px solid #ddd; }
97
- pre {
98
- background: #f5f5f5;
99
- padding: 1rem;
100
- border-radius: 4px;
101
- overflow-x: auto;
102
- }
103
- code {
104
- background: #f5f5f5;
105
- padding: 0.2rem 0.4rem;
106
- border-radius: 4px;
107
- font-size: 0.9em;
108
- }
109
- </style>
110
- </head>
111
- <body>
112
- <h1>stx Documentation</h1>
113
- `;if(K)q+=`<div>${K}</div>`;if(z.length>0){q+="<h2>Components</h2>";for(let j of z){if(q+=`<h3>${j.name}</h3>`,j.description)q+=`<p>${j.description}</p>`;if(j.isWebComponent)q+=`<p><strong>Web Component Tag:</strong> <code>${j.tag}</code></p>`;if(j.props.length>0){q+="<h4>Properties</h4>",q+=`<table>
114
- <thead>
115
- <tr>
116
- <th>Name</th>
117
- <th>Type</th>
118
- <th>Required</th>
119
- <th>Default</th>
120
- <th>Description</th>
121
- </tr>
122
- </thead>
123
- <tbody>`;for(let O of j.props)q+=`<tr>
124
- <td>${O.name}</td>
125
- <td>${O.type||"any"}</td>
126
- <td>${O.required?"Yes":"No"}</td>
127
- <td>${O.default||"-"}</td>
128
- <td>${O.description||"-"}</td>
129
- </tr>`;q+="</tbody></table>"}if(j.example)q+="<h4>Example</h4>",q+=`<pre><code>${j.example.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}</code></pre>`}}if(I.length>0){q+="<h2>Templates</h2>";for(let j of I){if(q+=`<h3>${j.name}</h3>`,j.description)q+=`<p>${j.description}</p>`;if(j.components&&j.components.length>0)q+=`<p><strong>Components Used:</strong> ${j.components.join(", ")}</p>`;if(j.directives&&j.directives.length>0)q+=`<p><strong>Directives Used:</strong> ${j.directives.join(", ")}</p>`}}if(G.length>0){q+="<h2>Directives</h2>",q+=`<table>
130
- <thead>
131
- <tr>
132
- <th>Directive</th>
133
- <th>Description</th>
134
- <th>Has End Tag</th>
135
- </tr>
136
- </thead>
137
- <tbody>`;for(let j of G)q+=`<tr>
138
- <td>@${j.name}</td>
139
- <td>${j.description||"-"}</td>
140
- <td>${j.hasEndTag?"Yes":"No"}</td>
141
- </tr>`;q+="</tbody></table>";for(let j of G)if(j.example)q+=`<h3>@${j.name}</h3>`,q+=`<p>${j.description||""}</p>`,q+="<h4>Example</h4>",q+=`<pre><code>${j.example.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}</code></pre>`}return q+="</body></html>",q}function u(z=[],I=[],G=[],K){return JSON.stringify({components:z,templates:I,directives:G,extraContent:K||""},null,2)}async function P(z){try{let{componentsDir:I,templatesDir:G,webComponentsConfig:K,customDirectives:q,config:j}=z;if(!j.enabled)return!1;let O=j.outputDir||"docs";if(await A.promises.mkdir(O,{recursive:!0}),console.log("Generating documentation..."),I)console.log(`Components directory: ${I}`);if(G)console.log(`Templates directory: ${G}`);console.log(`Output directory: ${O}`);let Q=[];if(j.components!==!1&&I)console.log("Generating component documentation..."),Q=await W(I,K),console.log(`Found ${Q.length} components`);let U=[];if(j.templates!==!1&&G)console.log("Generating template documentation..."),U=await F(G),console.log(`Found ${U.length} templates`);let V=[];if(j.directives!==!1)console.log("Generating directive documentation..."),V=await y(q),console.log(`Found ${V.length} directives`);let X=j.format||"markdown",Y=j.extraContent,S="",_="";switch(X){case"markdown":S=T(Q,U,V,Y),_="md";break;case"html":S=M(Q,U,V,Y),_="html";break;case"json":S=u(Q,U,V,Y),_="json";break;default:throw Error(`Unsupported documentation format: ${X}`)}let Z=$.join(O,`stx-docs.${_}`);return await Bun.write(Z,S),console.log(`Documentation generated: ${Z}`),!0}catch(I){return console.error("Error generating documentation:",I),!1}}async function g(z){let I={enabled:!0,outputDir:z.output||"docs",format:z.format||"markdown",components:z.components!==!1,templates:z.templates!==!1,directives:z.directives!==!1,extraContent:z.extraContent},G=z.componentsDir||H.componentsDir,K=z.templatesDir||".";return P({componentsDir:G,templatesDir:K,webComponentsConfig:H.webComponents,customDirectives:H.customDirectives,config:I})}
142
- export{B as dn,E as en,N as fn,L as gn,W as hn,F as in,y as jn,T as kn,M as ln,u as mn,P as nn,g as on};
@@ -1,236 +0,0 @@
1
- // @bun
2
- import{pB as B}from"./chunk-xv34zbp4.js";import z from"path";async function I(b){let j=b.pwa?.offline;if(!j?.enabled)return"";if(j.page){let k=z.isAbsolute(j.page)?j.page:z.resolve(process.cwd(),j.page);if(await Bun.file(k).exists())try{let{processDirectives:q}=await import("././process.js"),x=await Bun.file(k).text();return await q(x,{},k,b,new Set)}catch(q){console.warn(`[PWA] Failed to process custom offline page: ${q}`)}else console.warn(`[PWA] Custom offline page not found: ${k}`)}return F(b)}function F(b){let j=b.pwa?.offline,k=b.pwa?.manifest,q=j?.fallbackTitle||"You are offline",x=j?.fallbackMessage||"Please check your internet connection and try again.",y=k?.themeColor||"#4f46e5",A=k?.shortName||k?.name||"App";return`<!DOCTYPE html>
3
- <html lang="en">
4
- <head>
5
- <meta charset="UTF-8">
6
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
- <meta name="theme-color" content="${y}">
8
- <title>${w(q)} - ${w(A)}</title>
9
- <style>
10
- :root {
11
- --theme-color: ${y};
12
- --text-primary: #1a1a2e;
13
- --text-secondary: #666;
14
- --bg-gradient-start: #f5f7fa;
15
- --bg-gradient-end: #c3cfe2;
16
- }
17
-
18
- @media (prefers-color-scheme: dark) {
19
- :root {
20
- --text-primary: #f0f0f0;
21
- --text-secondary: #a0a0a0;
22
- --bg-gradient-start: #1a1a2e;
23
- --bg-gradient-end: #16213e;
24
- }
25
- }
26
-
27
- * {
28
- margin: 0;
29
- padding: 0;
30
- box-sizing: border-box;
31
- }
32
-
33
- body {
34
- font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
35
- min-height: 100vh;
36
- display: flex;
37
- align-items: center;
38
- justify-content: center;
39
- background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
40
- padding: 20px;
41
- }
42
-
43
- .offline-container {
44
- text-align: center;
45
- max-width: 400px;
46
- padding: 48px 40px;
47
- background: white;
48
- border-radius: 20px;
49
- box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
50
- }
51
-
52
- @media (prefers-color-scheme: dark) {
53
- .offline-container {
54
- background: #242438;
55
- box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
56
- }
57
- }
58
-
59
- .offline-icon {
60
- width: 96px;
61
- height: 96px;
62
- margin-bottom: 28px;
63
- color: var(--theme-color);
64
- animation: float 3s ease-in-out infinite;
65
- }
66
-
67
- @keyframes float {
68
- 0%, 100% { transform: translateY(0); }
69
- 50% { transform: translateY(-10px); }
70
- }
71
-
72
- h1 {
73
- font-size: 28px;
74
- font-weight: 700;
75
- color: var(--text-primary);
76
- margin-bottom: 16px;
77
- letter-spacing: -0.5px;
78
- }
79
-
80
- p {
81
- color: var(--text-secondary);
82
- line-height: 1.7;
83
- margin-bottom: 32px;
84
- font-size: 16px;
85
- }
86
-
87
- .retry-btn {
88
- display: inline-flex;
89
- align-items: center;
90
- gap: 8px;
91
- padding: 14px 36px;
92
- background: var(--theme-color);
93
- color: white;
94
- border: none;
95
- border-radius: 12px;
96
- font-size: 16px;
97
- font-weight: 600;
98
- cursor: pointer;
99
- transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
100
- }
101
-
102
- .retry-btn:hover {
103
- transform: translateY(-2px);
104
- box-shadow: 0 8px 20px rgba(79, 70, 229, 0.35);
105
- }
106
-
107
- .retry-btn:active {
108
- transform: translateY(0);
109
- }
110
-
111
- .retry-btn svg {
112
- width: 18px;
113
- height: 18px;
114
- }
115
-
116
- .status-indicator {
117
- margin-top: 24px;
118
- padding: 10px 16px;
119
- background: rgba(255, 193, 7, 0.1);
120
- border-radius: 8px;
121
- font-size: 14px;
122
- color: #b8860b;
123
- display: flex;
124
- align-items: center;
125
- justify-content: center;
126
- gap: 8px;
127
- }
128
-
129
- @media (prefers-color-scheme: dark) {
130
- .status-indicator {
131
- background: rgba(255, 193, 7, 0.15);
132
- color: #ffc107;
133
- }
134
- }
135
-
136
- .status-dot {
137
- width: 8px;
138
- height: 8px;
139
- background: #ffc107;
140
- border-radius: 50%;
141
- animation: pulse 2s infinite;
142
- }
143
-
144
- @keyframes pulse {
145
- 0%, 100% { opacity: 1; }
146
- 50% { opacity: 0.5; }
147
- }
148
-
149
- .online .status-indicator {
150
- background: rgba(40, 167, 69, 0.1);
151
- color: #28a745;
152
- }
153
-
154
- @media (prefers-color-scheme: dark) {
155
- .online .status-indicator {
156
- background: rgba(40, 167, 69, 0.15);
157
- }
158
- }
159
-
160
- .online .status-dot {
161
- background: #28a745;
162
- animation: none;
163
- }
164
- </style>
165
- </head>
166
- <body>
167
- <div class="offline-container" id="container">
168
- <svg class="offline-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
169
- <path d="M1 1l22 22"/>
170
- <path d="M16.72 11.06A10.94 10.94 0 0 1 19 12.55"/>
171
- <path d="M5 12.55a10.94 10.94 0 0 1 5.17-2.39"/>
172
- <path d="M10.71 5.05A16 16 0 0 1 22.58 9"/>
173
- <path d="M1.42 9a15.91 15.91 0 0 1 4.7-2.88"/>
174
- <path d="M8.53 16.11a6 6 0 0 1 6.95 0"/>
175
- <circle cx="12" cy="20" r="1"/>
176
- </svg>
177
-
178
- <h1>${w(q)}</h1>
179
- <p>${w(x)}</p>
180
-
181
- <button class="retry-btn" onclick="window.location.reload()">
182
- <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
183
- <polyline points="23 4 23 10 17 10"></polyline>
184
- <path d="M20.49 15a9 9 0 1 1-2.12-9.36L23 10"></path>
185
- </svg>
186
- Try Again
187
- </button>
188
-
189
- <div class="status-indicator">
190
- <span class="status-dot"></span>
191
- <span id="status-text">Waiting for connection...</span>
192
- </div>
193
- </div>
194
-
195
- <script>
196
- // Update status and auto-reload when online
197
- var reloadTimeout = null;
198
- var checkInterval = null;
199
-
200
- function updateStatus() {
201
- var container = document.getElementById('container');
202
- var statusText = document.getElementById('status-text');
203
-
204
- if (navigator.onLine) {
205
- container.classList.add('online');
206
- statusText.textContent = 'Back online! Reloading...';
207
- if (!reloadTimeout) {
208
- if (checkInterval) { clearInterval(checkInterval); checkInterval = null; }
209
- reloadTimeout = setTimeout(function() { window.location.reload(); }, 1000);
210
- }
211
- }
212
- else {
213
- container.classList.remove('online');
214
- statusText.textContent = 'Waiting for connection...';
215
- if (reloadTimeout) { clearTimeout(reloadTimeout); reloadTimeout = null; }
216
- }
217
- }
218
-
219
- window.addEventListener('online', updateStatus);
220
- window.addEventListener('offline', updateStatus);
221
-
222
- // Initial check
223
- updateStatus();
224
-
225
- // Periodic check every 5 seconds
226
- checkInterval = setInterval(function() {
227
- if (!navigator.onLine) {
228
- fetch('/', { method: 'HEAD', cache: 'no-store' })
229
- .then(function() { updateStatus(); })
230
- .catch(function() { /* Still offline */ });
231
- }
232
- }, 5000);
233
- </script>
234
- </body>
235
- </html>`}function w(b){return b.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}
236
- export{I as if};