nebula-cms 0.1.3 → 0.1.5

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 (381) hide show
  1. package/README.md +3 -1
  2. package/dist/astro/index.d.ts +43 -0
  3. package/dist/astro/index.d.ts.map +1 -0
  4. package/dist/astro/index.js +223 -0
  5. package/{src → dist}/client/Admin.svelte +20 -11
  6. package/dist/client/Admin.svelte.d.ts +11 -0
  7. package/dist/client/Admin.svelte.d.ts.map +1 -0
  8. package/dist/client/components/BackendPicker.svelte.d.ts +4 -0
  9. package/dist/client/components/BackendPicker.svelte.d.ts.map +1 -0
  10. package/dist/client/components/DraftChip.svelte.d.ts +10 -0
  11. package/dist/client/components/DraftChip.svelte.d.ts.map +1 -0
  12. package/dist/client/components/MetadataForm.svelte.d.ts +12 -0
  13. package/dist/client/components/MetadataForm.svelte.d.ts.map +1 -0
  14. package/dist/client/components/ThemeToggle.svelte.d.ts +19 -0
  15. package/dist/client/components/ThemeToggle.svelte.d.ts.map +1 -0
  16. package/dist/client/components/dialogs/DeleteDraftDialog.svelte.d.ts +11 -0
  17. package/dist/client/components/dialogs/DeleteDraftDialog.svelte.d.ts.map +1 -0
  18. package/{src → dist}/client/components/dialogs/FilenameDialog.svelte +1 -2
  19. package/dist/client/components/dialogs/FilenameDialog.svelte.d.ts +13 -0
  20. package/dist/client/components/dialogs/FilenameDialog.svelte.d.ts.map +1 -0
  21. package/dist/client/components/editor/EditorPane.svelte.d.ts +4 -0
  22. package/dist/client/components/editor/EditorPane.svelte.d.ts.map +1 -0
  23. package/dist/client/components/editor/EditorTabs.svelte.d.ts +8 -0
  24. package/dist/client/components/editor/EditorTabs.svelte.d.ts.map +1 -0
  25. package/dist/client/components/editor/EditorToolbar.svelte.d.ts +4 -0
  26. package/dist/client/components/editor/EditorToolbar.svelte.d.ts.map +1 -0
  27. package/dist/client/components/editor/FormatSelector.svelte.d.ts +4 -0
  28. package/dist/client/components/editor/FormatSelector.svelte.d.ts.map +1 -0
  29. package/dist/client/components/editor/Toolbar.svelte.d.ts +19 -0
  30. package/dist/client/components/editor/Toolbar.svelte.d.ts.map +1 -0
  31. package/dist/client/components/fields/ArrayField.svelte.d.ts +15 -0
  32. package/dist/client/components/fields/ArrayField.svelte.d.ts.map +1 -0
  33. package/dist/client/components/fields/ArrayItem.svelte.d.ts +28 -0
  34. package/dist/client/components/fields/ArrayItem.svelte.d.ts.map +1 -0
  35. package/dist/client/components/fields/BooleanField.svelte.d.ts +16 -0
  36. package/dist/client/components/fields/BooleanField.svelte.d.ts.map +1 -0
  37. package/dist/client/components/fields/DateField.svelte.d.ts +16 -0
  38. package/dist/client/components/fields/DateField.svelte.d.ts.map +1 -0
  39. package/dist/client/components/fields/EnumField.svelte.d.ts +17 -0
  40. package/dist/client/components/fields/EnumField.svelte.d.ts.map +1 -0
  41. package/dist/client/components/fields/FieldWrapper.svelte.d.ts +18 -0
  42. package/dist/client/components/fields/FieldWrapper.svelte.d.ts.map +1 -0
  43. package/dist/client/components/fields/NumberField.svelte.d.ts +16 -0
  44. package/dist/client/components/fields/NumberField.svelte.d.ts.map +1 -0
  45. package/dist/client/components/fields/ObjectField.svelte.d.ts +16 -0
  46. package/dist/client/components/fields/ObjectField.svelte.d.ts.map +1 -0
  47. package/dist/client/components/fields/SchemaField.svelte.d.ts +16 -0
  48. package/dist/client/components/fields/SchemaField.svelte.d.ts.map +1 -0
  49. package/dist/client/components/fields/StringField.svelte.d.ts +16 -0
  50. package/dist/client/components/fields/StringField.svelte.d.ts.map +1 -0
  51. package/{src → dist}/client/components/sidebar/AdminSidebar.svelte +2 -4
  52. package/dist/client/components/sidebar/AdminSidebar.svelte.d.ts +19 -0
  53. package/dist/client/components/sidebar/AdminSidebar.svelte.d.ts.map +1 -0
  54. package/dist/client/components/sidebar/AdminSidebarSort.svelte.d.ts +12 -0
  55. package/dist/client/components/sidebar/AdminSidebarSort.svelte.d.ts.map +1 -0
  56. package/dist/client/css/icons.css +29 -0
  57. package/dist/client/index.d.ts +2 -0
  58. package/dist/client/index.d.ts.map +1 -0
  59. package/dist/client/js/drafts/merge.svelte.d.ts +24 -0
  60. package/dist/client/js/drafts/merge.svelte.d.ts.map +1 -0
  61. package/dist/client/js/drafts/merge.svelte.js +106 -0
  62. package/dist/client/js/drafts/ops.svelte.d.ts +31 -0
  63. package/dist/client/js/drafts/ops.svelte.d.ts.map +1 -0
  64. package/dist/client/js/drafts/ops.svelte.js +182 -0
  65. package/dist/client/js/drafts/storage.d.ts +45 -0
  66. package/dist/client/js/drafts/storage.d.ts.map +1 -0
  67. package/dist/client/js/drafts/storage.js +76 -0
  68. package/dist/client/js/drafts/workers/diff.d.ts +2 -0
  69. package/dist/client/js/drafts/workers/diff.d.ts.map +1 -0
  70. package/dist/client/js/drafts/workers/diff.js +20 -0
  71. package/dist/client/js/editor/editor.svelte.d.ts +124 -0
  72. package/dist/client/js/editor/editor.svelte.d.ts.map +1 -0
  73. package/dist/client/js/editor/editor.svelte.js +294 -0
  74. package/dist/client/js/editor/languages.d.ts +11 -0
  75. package/dist/client/js/editor/languages.d.ts.map +1 -0
  76. package/dist/client/js/editor/languages.js +93 -0
  77. package/dist/client/js/editor/link-wrap.d.ts +6 -0
  78. package/dist/client/js/editor/link-wrap.d.ts.map +1 -0
  79. package/{src/client/js/editor/link-wrap.ts → dist/client/js/editor/link-wrap.js} +17 -24
  80. package/dist/client/js/editor/markdown-shortcuts.d.ts +4 -0
  81. package/dist/client/js/editor/markdown-shortcuts.d.ts.map +1 -0
  82. package/dist/client/js/editor/markdown-shortcuts.js +219 -0
  83. package/dist/client/js/handlers/admin.d.ts +64 -0
  84. package/dist/client/js/handlers/admin.d.ts.map +1 -0
  85. package/dist/client/js/handlers/admin.js +186 -0
  86. package/dist/client/js/state/dialogs.svelte.d.ts +16 -0
  87. package/dist/client/js/state/dialogs.svelte.d.ts.map +1 -0
  88. package/dist/client/js/state/dialogs.svelte.js +28 -0
  89. package/dist/client/js/state/router.svelte.d.ts +44 -0
  90. package/dist/client/js/state/router.svelte.d.ts.map +1 -0
  91. package/dist/client/js/state/router.svelte.js +141 -0
  92. package/dist/client/js/state/schema.svelte.d.ts +51 -0
  93. package/dist/client/js/state/schema.svelte.d.ts.map +1 -0
  94. package/{src/client/js/state/schema.svelte.ts → dist/client/js/state/schema.svelte.js} +55 -70
  95. package/dist/client/js/state/state.svelte.d.ts +68 -0
  96. package/dist/client/js/state/state.svelte.d.ts.map +1 -0
  97. package/dist/client/js/state/state.svelte.js +300 -0
  98. package/dist/client/js/state/theme.svelte.d.ts +24 -0
  99. package/dist/client/js/state/theme.svelte.d.ts.map +1 -0
  100. package/{src/client/js/state/theme.svelte.ts → dist/client/js/state/theme.svelte.js} +54 -91
  101. package/dist/client/js/storage/adapter.d.ts +130 -0
  102. package/dist/client/js/storage/adapter.d.ts.map +1 -0
  103. package/dist/client/js/storage/adapter.js +5 -0
  104. package/dist/client/js/storage/client.d.ts +72 -0
  105. package/dist/client/js/storage/client.d.ts.map +1 -0
  106. package/dist/client/js/storage/client.js +121 -0
  107. package/dist/client/js/storage/db.d.ts +8 -0
  108. package/dist/client/js/storage/db.d.ts.map +1 -0
  109. package/dist/client/js/storage/db.js +35 -0
  110. package/dist/client/js/storage/fsa.d.ts +51 -0
  111. package/dist/client/js/storage/fsa.d.ts.map +1 -0
  112. package/dist/client/js/storage/fsa.js +91 -0
  113. package/dist/client/js/storage/github.d.ts +62 -0
  114. package/dist/client/js/storage/github.d.ts.map +1 -0
  115. package/dist/client/js/storage/github.js +216 -0
  116. package/dist/client/js/storage/storage.d.ts +32 -0
  117. package/dist/client/js/storage/storage.d.ts.map +1 -0
  118. package/dist/client/js/storage/storage.js +68 -0
  119. package/dist/client/js/storage/workers/frontmatter.d.ts +2 -0
  120. package/dist/client/js/storage/workers/frontmatter.d.ts.map +1 -0
  121. package/dist/client/js/storage/workers/frontmatter.js +253 -0
  122. package/dist/client/js/storage/workers/storage.d.ts +2 -0
  123. package/dist/client/js/storage/workers/storage.d.ts.map +1 -0
  124. package/dist/client/js/storage/workers/storage.js +167 -0
  125. package/dist/client/js/storage/workers/toml-parser.d.ts +2 -0
  126. package/dist/client/js/storage/workers/toml-parser.d.ts.map +1 -0
  127. package/dist/client/js/storage/workers/toml-parser.js +75 -0
  128. package/dist/client/js/storage/workers/yaml-parser.d.ts +2 -0
  129. package/dist/client/js/storage/workers/yaml-parser.d.ts.map +1 -0
  130. package/dist/client/js/storage/workers/yaml-parser.js +100 -0
  131. package/dist/client/js/utils/file-types.d.ts +58 -0
  132. package/dist/client/js/utils/file-types.d.ts.map +1 -0
  133. package/{src/client/js/utils/file-types.ts → dist/client/js/utils/file-types.js} +75 -107
  134. package/dist/client/js/utils/format.d.ts +8 -0
  135. package/dist/client/js/utils/format.d.ts.map +1 -0
  136. package/{src/client/js/utils/format.ts → dist/client/js/utils/format.js} +5 -6
  137. package/dist/client/js/utils/frontmatter.d.ts +12 -0
  138. package/dist/client/js/utils/frontmatter.d.ts.map +1 -0
  139. package/dist/client/js/utils/frontmatter.js +29 -0
  140. package/dist/client/js/utils/schema-utils.d.ts +110 -0
  141. package/dist/client/js/utils/schema-utils.d.ts.map +1 -0
  142. package/dist/client/js/utils/schema-utils.js +242 -0
  143. package/dist/client/js/utils/slug.d.ts +8 -0
  144. package/dist/client/js/utils/slug.d.ts.map +1 -0
  145. package/{src/client/js/utils/slug.ts → dist/client/js/utils/slug.js} +6 -7
  146. package/dist/client/js/utils/sort.d.ts +41 -0
  147. package/dist/client/js/utils/sort.d.ts.map +1 -0
  148. package/dist/client/js/utils/sort.js +65 -0
  149. package/dist/client/js/utils/stable-stringify.d.ts +8 -0
  150. package/dist/client/js/utils/stable-stringify.d.ts.map +1 -0
  151. package/dist/client/js/utils/stable-stringify.js +23 -0
  152. package/dist/client/js/utils/url-utils.d.ts +11 -0
  153. package/dist/client/js/utils/url-utils.d.ts.map +1 -0
  154. package/{src/client/js/utils/url-utils.ts → dist/client/js/utils/url-utils.js} +22 -23
  155. package/dist/client/types/browser-apis.d.ts +39 -0
  156. package/dist/types.d.ts +22 -0
  157. package/dist/types.d.ts.map +1 -0
  158. package/dist/types.js +1 -0
  159. package/package.json +13 -3
  160. package/.github/workflows/ci.yml +0 -27
  161. package/.github/workflows/publish.yml +0 -34
  162. package/.mcp.json +0 -12
  163. package/.prettierignore +0 -5
  164. package/.prettierrc.cjs +0 -22
  165. package/AGENTS.md +0 -183
  166. package/playground/astro.config.mjs +0 -7
  167. package/playground/node_modules/.bin/astro +0 -21
  168. package/playground/node_modules/.vite/deps/@astrojs_svelte_client__js.js +0 -85
  169. package/playground/node_modules/.vite/deps/@astrojs_svelte_client__js.js.map +0 -7
  170. package/playground/node_modules/.vite/deps/_metadata.json +0 -184
  171. package/playground/node_modules/.vite/deps/astro___aria-query.js +0 -6776
  172. package/playground/node_modules/.vite/deps/astro___aria-query.js.map +0 -7
  173. package/playground/node_modules/.vite/deps/astro___axobject-query.js +0 -3754
  174. package/playground/node_modules/.vite/deps/astro___axobject-query.js.map +0 -7
  175. package/playground/node_modules/.vite/deps/astro___html-escaper.js +0 -34
  176. package/playground/node_modules/.vite/deps/astro___html-escaper.js.map +0 -7
  177. package/playground/node_modules/.vite/deps/chunk-AJXJMYAF.js +0 -0
  178. package/playground/node_modules/.vite/deps/chunk-AJXJMYAF.js.map +0 -7
  179. package/playground/node_modules/.vite/deps/chunk-BUSYA2B4.js +0 -8
  180. package/playground/node_modules/.vite/deps/chunk-BUSYA2B4.js.map +0 -7
  181. package/playground/node_modules/.vite/deps/chunk-CNYJBM5F.js +0 -21
  182. package/playground/node_modules/.vite/deps/chunk-CNYJBM5F.js.map +0 -7
  183. package/playground/node_modules/.vite/deps/chunk-DBPNBGEI.js +0 -223
  184. package/playground/node_modules/.vite/deps/chunk-DBPNBGEI.js.map +0 -7
  185. package/playground/node_modules/.vite/deps/chunk-FPEUJ7DG.js +0 -27
  186. package/playground/node_modules/.vite/deps/chunk-FPEUJ7DG.js.map +0 -7
  187. package/playground/node_modules/.vite/deps/chunk-MHDZ3SK7.js +0 -1005
  188. package/playground/node_modules/.vite/deps/chunk-MHDZ3SK7.js.map +0 -7
  189. package/playground/node_modules/.vite/deps/chunk-RBDTDTPY.js +0 -204
  190. package/playground/node_modules/.vite/deps/chunk-RBDTDTPY.js.map +0 -7
  191. package/playground/node_modules/.vite/deps/chunk-RJGEXL5C.js +0 -688
  192. package/playground/node_modules/.vite/deps/chunk-RJGEXL5C.js.map +0 -7
  193. package/playground/node_modules/.vite/deps/chunk-YL4MIWGJ.js +0 -5099
  194. package/playground/node_modules/.vite/deps/chunk-YL4MIWGJ.js.map +0 -7
  195. package/playground/node_modules/.vite/deps/chunk-ZOV3DWEJ.js +0 -4376
  196. package/playground/node_modules/.vite/deps/chunk-ZOV3DWEJ.js.map +0 -7
  197. package/playground/node_modules/.vite/deps/chunk-ZP4UNCSN.js +0 -23
  198. package/playground/node_modules/.vite/deps/chunk-ZP4UNCSN.js.map +0 -7
  199. package/playground/node_modules/.vite/deps/chunk-ZREFNRZZ.js +0 -148
  200. package/playground/node_modules/.vite/deps/chunk-ZREFNRZZ.js.map +0 -7
  201. package/playground/node_modules/.vite/deps/package.json +0 -3
  202. package/playground/node_modules/.vite/deps/smol-toml.js +0 -843
  203. package/playground/node_modules/.vite/deps/smol-toml.js.map +0 -7
  204. package/playground/node_modules/.vite/deps/svelte.js +0 -55
  205. package/playground/node_modules/.vite/deps/svelte.js.map +0 -7
  206. package/playground/node_modules/.vite/deps/svelte___clsx.js +0 -9
  207. package/playground/node_modules/.vite/deps/svelte___clsx.js.map +0 -7
  208. package/playground/node_modules/.vite/deps/svelte_animate.js +0 -57
  209. package/playground/node_modules/.vite/deps/svelte_animate.js.map +0 -7
  210. package/playground/node_modules/.vite/deps/svelte_attachments.js +0 -15
  211. package/playground/node_modules/.vite/deps/svelte_attachments.js.map +0 -7
  212. package/playground/node_modules/.vite/deps/svelte_easing.js +0 -67
  213. package/playground/node_modules/.vite/deps/svelte_easing.js.map +0 -7
  214. package/playground/node_modules/.vite/deps/svelte_events.js +0 -11
  215. package/playground/node_modules/.vite/deps/svelte_events.js.map +0 -7
  216. package/playground/node_modules/.vite/deps/svelte_internal.js +0 -5
  217. package/playground/node_modules/.vite/deps/svelte_internal.js.map +0 -7
  218. package/playground/node_modules/.vite/deps/svelte_internal_client.js +0 -402
  219. package/playground/node_modules/.vite/deps/svelte_internal_client.js.map +0 -7
  220. package/playground/node_modules/.vite/deps/svelte_internal_disclose-version.js +0 -10
  221. package/playground/node_modules/.vite/deps/svelte_internal_disclose-version.js.map +0 -7
  222. package/playground/node_modules/.vite/deps/svelte_internal_flags_async.js +0 -8
  223. package/playground/node_modules/.vite/deps/svelte_internal_flags_async.js.map +0 -7
  224. package/playground/node_modules/.vite/deps/svelte_internal_flags_legacy.js +0 -8
  225. package/playground/node_modules/.vite/deps/svelte_internal_flags_legacy.js.map +0 -7
  226. package/playground/node_modules/.vite/deps/svelte_internal_flags_tracing.js +0 -8
  227. package/playground/node_modules/.vite/deps/svelte_internal_flags_tracing.js.map +0 -7
  228. package/playground/node_modules/.vite/deps/svelte_legacy.js +0 -35
  229. package/playground/node_modules/.vite/deps/svelte_legacy.js.map +0 -7
  230. package/playground/node_modules/.vite/deps/svelte_motion.js +0 -545
  231. package/playground/node_modules/.vite/deps/svelte_motion.js.map +0 -7
  232. package/playground/node_modules/.vite/deps/svelte_reactivity.js +0 -29
  233. package/playground/node_modules/.vite/deps/svelte_reactivity.js.map +0 -7
  234. package/playground/node_modules/.vite/deps/svelte_reactivity_window.js +0 -127
  235. package/playground/node_modules/.vite/deps/svelte_reactivity_window.js.map +0 -7
  236. package/playground/node_modules/.vite/deps/svelte_store.js +0 -103
  237. package/playground/node_modules/.vite/deps/svelte_store.js.map +0 -7
  238. package/playground/node_modules/.vite/deps/svelte_transition.js +0 -208
  239. package/playground/node_modules/.vite/deps/svelte_transition.js.map +0 -7
  240. package/playground/package.json +0 -16
  241. package/playground/pnpm-lock.yaml +0 -3167
  242. package/playground/src/content/authors/jane-doe.json +0 -8
  243. package/playground/src/content/config/build.toml +0 -2
  244. package/playground/src/content/courses/web-fundamentals.json +0 -29
  245. package/playground/src/content/docs/advanced.mdx +0 -6
  246. package/playground/src/content/docs/intro.md +0 -6
  247. package/playground/src/content/guides/getting-started.mdx +0 -6
  248. package/playground/src/content/posts/hello-world.md +0 -7
  249. package/playground/src/content/products/t-shirt.json +0 -16
  250. package/playground/src/content/recipes/pancakes.mdoc +0 -8
  251. package/playground/src/content/settings/site.yml +0 -2
  252. package/playground/src/content.config.ts +0 -198
  253. package/playground/src/env.d.ts +0 -1
  254. package/playground/src/pages/index.astro +0 -11
  255. package/playground/src/pages/nebula.astro +0 -14
  256. package/pnpm-workspace.yaml +0 -2
  257. package/scripts/subset-icons.mjs +0 -178
  258. package/src/astro/index.ts +0 -295
  259. package/src/client/js/drafts/merge.svelte.ts +0 -121
  260. package/src/client/js/drafts/ops.svelte.ts +0 -227
  261. package/src/client/js/drafts/storage.ts +0 -108
  262. package/src/client/js/drafts/workers/diff.ts +0 -40
  263. package/src/client/js/editor/editor.svelte.ts +0 -343
  264. package/src/client/js/editor/languages.ts +0 -98
  265. package/src/client/js/editor/markdown-shortcuts.ts +0 -261
  266. package/src/client/js/handlers/admin.ts +0 -246
  267. package/src/client/js/state/dialogs.svelte.ts +0 -35
  268. package/src/client/js/state/router.svelte.ts +0 -156
  269. package/src/client/js/state/state.svelte.ts +0 -334
  270. package/src/client/js/storage/adapter.ts +0 -102
  271. package/src/client/js/storage/client.ts +0 -150
  272. package/src/client/js/storage/db.ts +0 -36
  273. package/src/client/js/storage/fsa.ts +0 -110
  274. package/src/client/js/storage/github.ts +0 -297
  275. package/src/client/js/storage/storage.ts +0 -83
  276. package/src/client/js/storage/workers/frontmatter.ts +0 -320
  277. package/src/client/js/storage/workers/storage.ts +0 -177
  278. package/src/client/js/storage/workers/toml-parser.ts +0 -106
  279. package/src/client/js/storage/workers/yaml-parser.ts +0 -132
  280. package/src/client/js/utils/frontmatter.ts +0 -38
  281. package/src/client/js/utils/schema-utils.ts +0 -295
  282. package/src/client/js/utils/sort.ts +0 -84
  283. package/src/client/js/utils/stable-stringify.ts +0 -27
  284. package/src/types.ts +0 -25
  285. package/svelte.config.js +0 -4
  286. package/tests/astro/build.test.ts +0 -63
  287. package/tests/astro/index.test.ts +0 -689
  288. package/tests/client/components/Admin.test.ts +0 -446
  289. package/tests/client/components/BackendPicker.test.ts +0 -239
  290. package/tests/client/components/DraftChip.test.ts +0 -53
  291. package/tests/client/components/MetadataForm.test.ts +0 -164
  292. package/tests/client/components/dialogs/DeleteDraftDialog.test.ts +0 -91
  293. package/tests/client/components/dialogs/FilenameDialog.test.ts +0 -209
  294. package/tests/client/components/dialogs/dialog-stubs.ts +0 -19
  295. package/tests/client/components/editor/EditorPane.test.ts +0 -100
  296. package/tests/client/components/editor/EditorTabs.test.ts +0 -253
  297. package/tests/client/components/editor/EditorToolbar.test.ts +0 -252
  298. package/tests/client/components/editor/fixtures.ts +0 -31
  299. package/tests/client/components/fields/ArrayField.test.ts +0 -197
  300. package/tests/client/components/fields/BooleanField.test.ts +0 -206
  301. package/tests/client/components/fields/DateField.test.ts +0 -210
  302. package/tests/client/components/fields/EnumField.test.ts +0 -246
  303. package/tests/client/components/fields/NumberField.test.ts +0 -240
  304. package/tests/client/components/fields/ObjectField.test.ts +0 -157
  305. package/tests/client/components/fields/SchemaField.test.ts +0 -190
  306. package/tests/client/components/fields/StringField.test.ts +0 -223
  307. package/tests/client/components/sidebar/AdminSidebar.test.ts +0 -285
  308. package/tests/client/components/sidebar/AdminSidebarSort.test.ts +0 -135
  309. package/tests/client/components/sidebar/sort-mock.ts +0 -23
  310. package/tests/client/js/drafts/fixtures.ts +0 -22
  311. package/tests/client/js/drafts/merge.test.ts +0 -282
  312. package/tests/client/js/drafts/ops.test.ts +0 -658
  313. package/tests/client/js/drafts/storage.test.ts +0 -200
  314. package/tests/client/js/drafts/workers/diff.test.ts +0 -165
  315. package/tests/client/js/editor/editor.test.ts +0 -616
  316. package/tests/client/js/editor/link-wrap.test.ts +0 -225
  317. package/tests/client/js/editor/markdown-shortcuts.test.ts +0 -370
  318. package/tests/client/js/handlers/admin.test.ts +0 -467
  319. package/tests/client/js/state/router.test.ts +0 -619
  320. package/tests/client/js/state/schema.test.ts +0 -266
  321. package/tests/client/js/state/state.test.ts +0 -328
  322. package/tests/client/js/storage/adapter.test.ts +0 -115
  323. package/tests/client/js/storage/client.test.ts +0 -250
  324. package/tests/client/js/storage/db.test.ts +0 -59
  325. package/tests/client/js/storage/fsa.test.ts +0 -284
  326. package/tests/client/js/storage/github.test.ts +0 -349
  327. package/tests/client/js/storage/mock-port.ts +0 -95
  328. package/tests/client/js/storage/storage.test.ts +0 -77
  329. package/tests/client/js/storage/workers/frontmatter.test.ts +0 -479
  330. package/tests/client/js/storage/workers/storage.test.ts +0 -299
  331. package/tests/client/js/storage/workers/toml-parser.test.ts +0 -169
  332. package/tests/client/js/storage/workers/yaml-parser.test.ts +0 -168
  333. package/tests/client/js/utils/file-types.test.ts +0 -268
  334. package/tests/client/js/utils/frontmatter.test.ts +0 -87
  335. package/tests/client/js/utils/schema-utils.test.ts +0 -318
  336. package/tests/client/js/utils/slug.test.ts +0 -58
  337. package/tests/client/js/utils/sort.test.ts +0 -276
  338. package/tests/client/js/utils/stable-stringify.test.ts +0 -68
  339. package/tests/client/js/utils/url-utils.test.ts +0 -70
  340. package/tests/e2e/backend-connection.test.ts +0 -301
  341. package/tests/e2e/draft-lifecycle.test.ts +0 -388
  342. package/tests/e2e/editing.test.ts +0 -355
  343. package/tests/e2e/github-adapter.test.ts +0 -330
  344. package/tests/e2e/helpers/mock-adapter.ts +0 -166
  345. package/tests/e2e/helpers/test-app.ts +0 -155
  346. package/tests/e2e/navigation.test.ts +0 -358
  347. package/tests/e2e/publishing.test.ts +0 -345
  348. package/tests/e2e/unsaved-changes.test.ts +0 -317
  349. package/tests/setup.ts +0 -2
  350. package/tests/stubs/codemirror.ts +0 -197
  351. package/tsconfig.json +0 -19
  352. package/vitest.config.ts +0 -178
  353. /package/{src → dist}/client/components/BackendPicker.svelte +0 -0
  354. /package/{src → dist}/client/components/DraftChip.svelte +0 -0
  355. /package/{src → dist}/client/components/MetadataForm.svelte +0 -0
  356. /package/{src → dist}/client/components/ThemeToggle.svelte +0 -0
  357. /package/{src → dist}/client/components/dialogs/DeleteDraftDialog.svelte +0 -0
  358. /package/{src → dist}/client/components/editor/EditorPane.svelte +0 -0
  359. /package/{src → dist}/client/components/editor/EditorTabs.svelte +0 -0
  360. /package/{src → dist}/client/components/editor/EditorToolbar.svelte +0 -0
  361. /package/{src → dist}/client/components/editor/FormatSelector.svelte +0 -0
  362. /package/{src → dist}/client/components/editor/Toolbar.svelte +0 -0
  363. /package/{src → dist}/client/components/fields/ArrayField.svelte +0 -0
  364. /package/{src → dist}/client/components/fields/ArrayItem.svelte +0 -0
  365. /package/{src → dist}/client/components/fields/BooleanField.svelte +0 -0
  366. /package/{src → dist}/client/components/fields/DateField.svelte +0 -0
  367. /package/{src → dist}/client/components/fields/EnumField.svelte +0 -0
  368. /package/{src → dist}/client/components/fields/FieldWrapper.svelte +0 -0
  369. /package/{src → dist}/client/components/fields/NumberField.svelte +0 -0
  370. /package/{src → dist}/client/components/fields/ObjectField.svelte +0 -0
  371. /package/{src → dist}/client/components/fields/SchemaField.svelte +0 -0
  372. /package/{src → dist}/client/components/fields/StringField.svelte +0 -0
  373. /package/{src → dist}/client/components/sidebar/AdminSidebarSort.svelte +0 -0
  374. /package/{src → dist}/client/css/a11y.css +0 -0
  375. /package/{src → dist}/client/css/btn.css +0 -0
  376. /package/{src → dist}/client/css/dialog.css +0 -0
  377. /package/{src → dist}/client/css/field-input.css +0 -0
  378. /package/{src → dist}/client/css/reset.css +0 -0
  379. /package/{src → dist}/client/css/theme.css +0 -0
  380. /package/{src/client/index.ts → dist/client/index.js} +0 -0
  381. /package/{src → dist}/virtual.d.ts +0 -0
@@ -1,34 +0,0 @@
1
- name: Publish Package
2
-
3
- on:
4
- push:
5
- tags:
6
- - 'v*'
7
-
8
- permissions:
9
- id-token: write # Required for OIDC
10
- contents: read
11
-
12
- jobs:
13
- publish:
14
- runs-on: ubuntu-latest
15
- steps:
16
- - uses: actions/checkout@v6
17
- - uses: pnpm/action-setup@v5
18
- - uses: actions/setup-node@v6
19
- with:
20
- node-version: 24
21
- cache: pnpm
22
- registry-url: https://registry.npmjs.org
23
- - name: Install dependencies
24
- run: pnpm install
25
- - name: Install Playwright browsers
26
- run: pnpm exec playwright install --with-deps chromium
27
- - name: Lint
28
- run: pnpm lint
29
- - name: Test
30
- run: pnpm test
31
- - name: Build
32
- run: pnpm build
33
- - name: Publish
34
- run: pnpm publish --no-git-checks
package/.mcp.json DELETED
@@ -1,12 +0,0 @@
1
- {
2
- "mcpServers": {
3
- "playwright": {
4
- "command": "npx",
5
- "args": [
6
- "@playwright/mcp@latest",
7
- "--cdp-endpoint",
8
- "http://localhost:9222"
9
- ]
10
- }
11
- }
12
- }
package/.prettierignore DELETED
@@ -1,5 +0,0 @@
1
- dist
2
- pnpm-lock.yaml
3
- node_modules
4
- .astro
5
- .coverage
package/.prettierrc.cjs DELETED
@@ -1,22 +0,0 @@
1
- module.exports = {
2
- singleQuote: true,
3
- trailingComma: 'all',
4
- plugins: [
5
- require.resolve('prettier-plugin-astro'),
6
- require.resolve('prettier-plugin-svelte'),
7
- ],
8
- overrides: [
9
- {
10
- files: '*.astro',
11
- options: {
12
- parser: 'astro',
13
- },
14
- },
15
- {
16
- files: '*.svelte',
17
- options: {
18
- parser: 'svelte',
19
- },
20
- },
21
- ],
22
- };
package/AGENTS.md DELETED
@@ -1,183 +0,0 @@
1
- ## Git Commits
2
-
3
- You are STRICTLY FORBIDDEN from co-authoring commits.
4
-
5
- **STRICTLY FORBIDDEN: Committing gitignored files.** You MUST NEVER use `git add -f` or any other mechanism to commit files that are matched by `.gitignore`. If a file is gitignored, it is gitignored — no skill, plugin, or workflow instruction overrides this. If a skill tells you to commit a file and that file is gitignored, skip the commit step for that file. This rule has no exceptions.
6
-
7
- ## Personality
8
-
9
- You are a senior-level, high-standards technical peer. You operate as a rigorous sounding board and code auditor. Your goal is technical precision and architectural integrity, not social validation.
10
-
11
- - **Eliminate Fluff:** Remove all conversational filler, preambles, and post-task pleasantries. Never use: "I understand," "That's a great question," "I'm happy to help," or "I've updated the code for you."
12
- - **Zero Praise:** Do not compliment the user or their code. In a peer-to-peer professional environment, praise is often perceived as condescending or belittling.
13
- - **Directness without Rudeness:** Be blunt but objective. Focus on the code, the logic, and the constraints. Avoid emotive language; rely on technical evidence.
14
- - **Immediate Execution:** If a request is clear, provide the solution or critique immediately without acknowledging the instruction.
15
- - **Collaborative Dissent:** Do not assume you are more experienced than the user. If the user’s approach seems flawed, frame it as a technical trade-off or a potential risk rather than a "mistake."
16
- - **Contextual Deference:** Acknowledge implicitly that the user possesses domain-specific knowledge and project context you lack. Challenge assumptions with "How does this handle X?" rather than "You should do X."
17
- - **Constructive Alternatives:** Suggest alternatives only if they provide tangible improvements in performance, maintainability, or security. Do not suggest "standard" alternatives that are clearly inferior to the user's current direction.
18
- - **Assumption Checking:** If the user's prompt is ambiguous, state your assumption before providing the solution: "Assuming this must scale to X concurrent users, the implementation is as follows..."
19
- - **Requirement Adherence:** Do not suggest patterns or libraries that deviate from the tech stack or constraints already established in the conversation.
20
-
21
- ## Commands
22
-
23
- **CRITICAL: ALWAYS USE `pnpm`, AND ONLY USE THE EXISTING `package.json` SCRIPTS! Never use `npm`, `npx`, or `pnpx`!** If a Node.js based CLI is not already installed and configured to be run through a `package.json` script, it should not be run.
24
-
25
- **STRICTLY FORBIDDEN: Editing `package.json` scripts.** You and your subagents MUST NOT add, modify, or remove entries in the `"scripts"` block of ANY `package.json` file. This has been a recurring violation where agents add wrapper scripts (e.g., `"sync": "astro sync"`) to circumvent the compound command prohibition. The correct approach is simple: `cd` into the directory (as its own Bash tool call), then run the command directly (as a separate Bash tool call). Existing scripts may be _used_ but never _edited_.
26
-
27
- **STRICTLY FORBIDDEN: Directory-changing flags.** Do NOT use `--dir`, `--cwd`, `--prefix`, `-C`, `--root`, `--filter`, `bash -c`, `sh -c`, or any other flag/mechanism that changes the working directory or wraps commands. The ONLY way to run a command in a different directory is to `cd` there first (its own Bash call), then run the command (separate Bash call).
28
-
29
- **ALWAYS RUN `pnpm lint` and `pnpm fix` before committing!** You are FORBIDDEN from finalizing your code until you have no more warnings or errors from either script.
30
-
31
- **IMPORTANT!** Before asking to run the dev server, check to see if it already is (it is often running). Only ask to run the dev server if you've already checked and it's not running, or if you specifically need access to the dev server's output.
32
-
33
- ## Git Worktrees
34
-
35
- Worktree directory: `.worktrees/` (project-local). All feature work must be done in an isolated git worktree, never directly on `main`.
36
-
37
- ## Architecture
38
-
39
- ### File Size and Component Decomposition
40
-
41
- **CRITICAL REQUIREMENT!** FILES MUST NOT BE LARGER THAN 350 LINES OF CODE! IF YOUR CHANGES WOULD VIOLATE THIS, YOU MUST REFACTOR YOUR WORK SO THAT IT DOES NOT. We do this to ensure each individual file is easy to read and maintain (docs, planning files like `.feature` files, tests because they have a lot of boilerplate, and markdown files excluded).
42
-
43
- Files usually balloon larger than this because they're trying to do too much at one. Aim for components and library files to do a SINGLE THING. Compose multiple smaller components together into larger ones **instead of** trying to put everything into a single file.
44
-
45
- ### Semantic HTML
46
-
47
- **CRITICAL REQUIREMENTS!** YOU ARE STRICTLY FORBIDDEN FROM ATTACHING CLICK HANDLERS TO ANYTHING THAT IS NOT A `button` OR `a` ELEMENT! YOU MUST USE THOSE ELEMENTS CORRECTLY, `a` IS FOR LINKING TO RESOURCES (URLs, files with paths, etc…), `button` IS FOR IN-PAGE INTERACTION. FAILURE TO ADHERE TO THIS IS CONSIDERED A CRITICAL FAILURE!
48
-
49
- ### State Management
50
-
51
- **CRITICAL:** Prop drilling architecture patterns for state are STRICTLY FORBIDDEN! They add too much boilerplate and complexity. Use small, reactive state instead.
52
-
53
- **CRITICAL:** Function and callback drilling architecture patterns are STRICTLY FORBIDDEN! Functions and callbacks must ONLY be passed into components if their functionality changes per-instance (like a button). It MUST NOT be used for coordination or managing state! You MUST use reactive state instead.
54
-
55
- ### CSS Rules
56
-
57
- Font sizes MUST follow this scale:
58
-
59
- - **Default** text: `1rem`
60
- - **Smallest non-caption** text: `0.875rem` (for compact UI elements, labels, buttons)
61
- - **Smallest allowed** text: `0.75rem` — ONLY for captions, secondary information (timestamps, placeholders, empty states). Using `0.75rem` for primary or interactive content requires explicit permission.
62
-
63
- Non-standard sizes like `0.8rem`, `0.85rem`, `0.9rem`, `0.95rem` are NOT allowed. Round to the nearest size on this scale. Font sizes can increment above `1rem` in steps of `.25rem`
64
-
65
- All other CSS sizing MUST be in `rem` units, and MUST be written in `.25rem` increments, pixels are FORBIDDEN. The ONLY exceptions are:
66
-
67
- - Border radius, border width, outline, outline-offset, text shadow, or drop shadow <= `5px`
68
- - The visually-hidden/sr-only accessibility pattern (`width: 1px; height: 1px; clip: rect(0,0,0,0)`) — this exception applies ONLY to this specific pattern and MUST NOT be used to justify pixel values in any other context
69
- - The `.chip` class in `DraftChip.svelte` is exempt from the font size scale and the `.25rem` increment rule for `padding-block` — it uses `0.6rem` font size and `0.15rem` block padding to achieve the correct visual weight relative to sidebar item labels
70
-
71
- Other relative units, where applicable, are OK (like `vh`, `vw`, `cqi`, `cqb`, `fr`).
72
-
73
- Prefer CSS Grid to Flexbox unless you need the specific characteristics of flexbox.
74
-
75
- ### `:global` Usage Policy
76
-
77
- `:global` escapes Svelte's scoped CSS. Most uses indicate styles that should be in a global CSS file instead. Only use `:global` when scoped CSS physically cannot reach the target element.
78
-
79
- - **Top-layer rendering** — Elements using the Popover API or `<dialog>` render in the browser's top layer, outside the component DOM where scoped CSS cannot reach
80
- - **Scoped parent + global child** — Combining a scoped parent selector with a `:global` child when the child is library-generated (e.g. `.lexical-editor--readonly :global([contenteditable='false'])`)
81
-
82
- **Not allowed:**
83
-
84
- - **Convenience** — If a style could be a global partial or scoped class, don't use `:global`
85
- - **Shared/reusable styles** — Move to `src/client/css` (e.g. `input.css`, `utilities.css`)
86
- - **Utility classes** — Add to `src/client/css/utilities.css`
87
- - **Portal-rendered content** — Refactor to Svelte-rendered markup with scoped styles instead of imperative DOM + `:global`
88
-
89
- ### Code Comments
90
-
91
- You are REQUIRED to professionally comment your code. Comments should be short and helpful, explaining what something does, but MUST NOT include your dialog or thinking.
92
-
93
- If supported by the language, single line comments MUST ALWAYS use `//`, even when describing types, interfaces, or classes. NEVER use single-line JSDoc (`/** foo */`). If unsuppored, use standard, single asterix comments.
94
-
95
- ```js
96
- // Whether the dialog should be shown
97
- let showDialog = $state(false);
98
- ```
99
-
100
- ```css
101
- /* Reset dialog box-sizing */
102
- dialog {
103
- box-sizing: border-box;
104
- }
105
- ```
106
-
107
- Functions MUST have multi-line JSDoc comments (`/** ... */` with newlines). They MUST include a description of why they've been written, plus `@param` and `@return` with proper TypeScript typing, EVEN IF ITS ALREADY DOCUMENTED WITH TYPESCRIPT TYPES AT THE METHOD LEVEL.
108
-
109
- ```js
110
- /**
111
- * Display the dialog
112
- * @param {string} text - The text to show in the dialog
113
- * @return {void}
114
- */
115
- function showDialog(text: string) {
116
- dialog.textContent = text;
117
- }
118
- ```
119
-
120
- File-level description comments MUST come BEFORE any imports and MUST use standard JavaScript multi-line comment syntax (`/* ... */`). They describe what the file is for and why it exists. Multi-line comments that are not covered by JSDoc comments MUST use this style of comment block, too.
121
-
122
- ```js
123
- /*
124
- * State management for dialog
125
- */
126
- ```
127
-
128
- Comment Blocks that are meant to draw the eye and describe a section of code be written as follows, with each line of the description starting with `//`:
129
-
130
- ```js
131
- /*
132
- //////////////////////////////
133
- // Description
134
- //////////////////////////////
135
- */
136
- ```
137
-
138
- Comments MUST NOT have arbitrary line breaks to conform to an invisible max character count, just write normally and have line wrapping handle comment wrapping.
139
-
140
- It is CRITICAL that you write comments explaining specific items that we've gone back and forth on a number of times to ensure that the reason why it exists the way it does (which likely went against your normal thinking) so that future developers and agents can learn from it and improve.
141
-
142
- ### Naming Conventions
143
-
144
- When writing CamelCase variable, function, type, or class names, abbreviations (like CSS, URL, HTML, API, ID, UUID, IDB, FSA, DOM, BOM, CRLF, SHA, TOML, YAML, JSON, MDX) MUST ALWAYS be all-caps. For example: `parseURL`, `getCSS`, `buildHTML`, `tomlStringifyURL`, `fetchAPIData`. Never `parseUrl`, `getCss`, `buildHtml`.
145
-
146
- ### Component Reuse (CRITICAL)
147
-
148
- Before creating ANY new UI component, pattern, or styling, you MUST search the existing codebase for similar functionality. If a component, pattern, or style already exists, you MUST reuse or extend it — even if it requires refactoring to accept props for configurability. Creating duplicates of existing functionality is FORBIDDEN. Specifically:
149
-
150
- - **Search `src/client/components/`** for existing components that do what you need. If one exists but is hardcoded to one page's state, refactor it to accept optional props (controlled mode) while preserving the original behavior (uncontrolled mode).
151
- - **Search `src/client/css/`** for existing styles before writing new CSS.
152
- - **Match existing layout patterns** — reuse the same components and follow the same structure, not recreate it from scratch.
153
-
154
- ### DOM Manipulation Rules
155
-
156
- Svelte's declarative rendering MUST be used for all UI construction. Direct DOM manipulation (`document.createElement`, `appendChild`, `innerHTML`, `querySelector`, etc.) is FORBIDDEN except in these cases:
157
-
158
- - **Focus and scroll** — `.focus()` and `.scrollIntoView()` are imperative by nature, but the element reference MUST come from `bind:this` (in components) or reactive state signals (in state files). Using `document.getElementById`/`querySelector` to obtain element references is FORBIDDEN.
159
- - **Popover API** — `.showPopover()` / `.hidePopover()` require imperative calls, but the element MUST be obtained via `bind:this`, never DOM queries.
160
- - **Cross-component coordination** — State files MUST NOT query the DOM. Use reactive signals (counter increment pattern) so components react via `$effect` and control their own elements.
161
- - **Positioning** — Use CSS Anchor Positioning (`anchor-name`, `position-anchor`, `position-area`) instead of computing pixel positions with `getBoundingClientRect()` and `style.top`/`style.left`.
162
-
163
- ## Rule Compliance
164
-
165
- The rules in this file are literal requirements, not guidelines. Do not invent exceptions, even if industry convention differs. If a rule doesn't list an exception, there is no exception.
166
-
167
- Before writing or modifying code, re-read this entire file. Do not work from memory of the rules — memory introduces drift and invented exceptions. Do not decide which sections are "relevant" and skip the rest; rules interact and a section you think doesn't apply often does.
168
-
169
- ## Subagent Delegation
170
-
171
- When delegating tasks to subagents, you MUST copy the relevant rules from BOTH this project's CLAUDE.md AND the global CLAUDE.md verbatim into the subagent prompt. Do NOT paraphrase, summarize, or add your own interpretations of the rules. If you need to add task-specific context, keep it clearly separate from the rules themselves. Subagents do not have access to CLAUDE.md files, so they will only follow what you put in their prompt — if you reword, omit, or "helpfully" add exceptions, the subagent will produce work that violates the actual rules.
172
-
173
- ## Mandatory Code Review Before Completion
174
-
175
- After any agent or subagent finishes writing code, you MUST NOT mark the work as done until a compliance review has been performed. This review MUST:
176
-
177
- 1. Load the FULL text of BOTH this project's CLAUDE.md AND the global CLAUDE.md — not just sections you think are relevant, the entire files
178
- 2. Check every line of changed code against those rules verbatim — not from memory, not paraphrased, the actual text of the rules
179
- 3. Flag ANY violation, no matter how minor or how "standard" the alternative practice might be
180
- 4. The reviewer MUST NOT rationalize a violation as acceptable. If the code doesn't match what the rule literally says, it's a violation and must be fixed
181
- 5. All flagged violations must be fixed and re-reviewed before the work can be marked complete
182
-
183
- This review applies to your own direct work as well as work produced by subagents. "It looks right" is not a substitute for checking against the rules.
@@ -1,7 +0,0 @@
1
- import { defineConfig } from 'astro/config';
2
- import svelte from '@astrojs/svelte';
3
- import nebulaCMS from 'nebula-cms';
4
-
5
- export default defineConfig({
6
- integrations: [svelte(), nebulaCMS({ basePath: '/nebula' })],
7
- });
@@ -1,21 +0,0 @@
1
- #!/bin/sh
2
- basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
-
4
- case `uname` in
5
- *CYGWIN*|*MINGW*|*MSYS*)
6
- if command -v cygpath > /dev/null 2>&1; then
7
- basedir=`cygpath -w "$basedir"`
8
- fi
9
- ;;
10
- esac
11
-
12
- if [ -z "$NODE_PATH" ]; then
13
- export NODE_PATH="/home/runner/work/nebula-cms/nebula-cms/node_modules/.pnpm/astro@6.1.0_rollup@4.60.0_typescript@5.9.3/node_modules/astro/bin/node_modules:/home/runner/work/nebula-cms/nebula-cms/node_modules/.pnpm/astro@6.1.0_rollup@4.60.0_typescript@5.9.3/node_modules/astro/node_modules:/home/runner/work/nebula-cms/nebula-cms/node_modules/.pnpm/astro@6.1.0_rollup@4.60.0_typescript@5.9.3/node_modules:/home/runner/work/nebula-cms/nebula-cms/node_modules/.pnpm/node_modules"
14
- else
15
- export NODE_PATH="/home/runner/work/nebula-cms/nebula-cms/node_modules/.pnpm/astro@6.1.0_rollup@4.60.0_typescript@5.9.3/node_modules/astro/bin/node_modules:/home/runner/work/nebula-cms/nebula-cms/node_modules/.pnpm/astro@6.1.0_rollup@4.60.0_typescript@5.9.3/node_modules/astro/node_modules:/home/runner/work/nebula-cms/nebula-cms/node_modules/.pnpm/astro@6.1.0_rollup@4.60.0_typescript@5.9.3/node_modules:/home/runner/work/nebula-cms/nebula-cms/node_modules/.pnpm/node_modules:$NODE_PATH"
16
- fi
17
- if [ -x "$basedir/node" ]; then
18
- exec "$basedir/node" "$basedir/../astro/bin/astro.mjs" "$@"
19
- else
20
- exec node "$basedir/../astro/bin/astro.mjs" "$@"
21
- fi
@@ -1,85 +0,0 @@
1
- import {
2
- createRawSnippet
3
- } from "./chunk-ZOV3DWEJ.js";
4
- import "./chunk-CNYJBM5F.js";
5
- import {
6
- hydrate,
7
- mount,
8
- unmount
9
- } from "./chunk-MHDZ3SK7.js";
10
- import "./chunk-RBDTDTPY.js";
11
- import "./chunk-YL4MIWGJ.js";
12
- import "./chunk-DBPNBGEI.js";
13
- import "./chunk-ZP4UNCSN.js";
14
- import "./chunk-BUSYA2B4.js";
15
-
16
- // ../node_modules/.pnpm/@astrojs+svelte@8.0.3_astro@6.1.0_rollup@4.60.0_typescript@5.9.3__svelte@5.54.1_typescript@5.9.3/node_modules/@astrojs/svelte/dist/client.svelte.js
17
- var existingApplications = /* @__PURE__ */ new WeakMap();
18
- var client_svelte_default = (element) => {
19
- return async (Component, props, slotted, { client }) => {
20
- if (!element.hasAttribute("ssr")) return;
21
- let children = void 0;
22
- let _$$slots = void 0;
23
- let renderFns = {};
24
- for (const [key, value] of Object.entries(slotted)) {
25
- _$$slots ??= {};
26
- if (key === "default") {
27
- _$$slots.default = true;
28
- children = createRawSnippet(() => ({
29
- render: () => `<astro-slot>${value}</astro-slot>`
30
- }));
31
- } else {
32
- _$$slots[key] = createRawSnippet(() => ({
33
- render: () => `<astro-slot name="${key}">${value}</astro-slot>`
34
- }));
35
- }
36
- if (key === "default") {
37
- renderFns.children = createRawSnippet(() => ({
38
- render: () => `<astro-slot>${value}</astro-slot>`
39
- }));
40
- } else {
41
- renderFns[key] = createRawSnippet(() => ({
42
- render: () => `<astro-slot name="${key}">${value}</astro-slot>`
43
- }));
44
- }
45
- }
46
- const resolvedProps = {
47
- ...props,
48
- children,
49
- $$slots: _$$slots,
50
- ...renderFns
51
- };
52
- if (existingApplications.has(element)) {
53
- existingApplications.get(element).setProps(resolvedProps);
54
- } else {
55
- const component = createComponent(Component, element, resolvedProps, client !== "only");
56
- existingApplications.set(element, component);
57
- element.addEventListener("astro:unmount", () => component.destroy(), { once: true });
58
- }
59
- };
60
- };
61
- function createComponent(Component, target, props, shouldHydrate) {
62
- let propsState = $state(props);
63
- const bootstrap = shouldHydrate ? hydrate : mount;
64
- if (!shouldHydrate) {
65
- target.innerHTML = "";
66
- }
67
- const component = bootstrap(Component, { target, props: propsState });
68
- return {
69
- setProps(newProps) {
70
- Object.assign(propsState, newProps);
71
- for (const key in propsState) {
72
- if (!(key in newProps)) {
73
- delete propsState[key];
74
- }
75
- }
76
- },
77
- destroy() {
78
- unmount(component);
79
- }
80
- };
81
- }
82
- export {
83
- client_svelte_default as default
84
- };
85
- //# sourceMappingURL=@astrojs_svelte_client__js.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../node_modules/.pnpm/@astrojs+svelte@8.0.3_astro@6.1.0_rollup@4.60.0_typescript@5.9.3__svelte@5.54.1_typescript@5.9.3/node_modules/@astrojs/svelte/dist/client.svelte.js"],
4
- "sourcesContent": ["import { createRawSnippet, hydrate, mount, unmount } from \"svelte\";\nconst existingApplications = /* @__PURE__ */ new WeakMap();\nvar client_svelte_default = (element) => {\n return async (Component, props, slotted, { client }) => {\n if (!element.hasAttribute(\"ssr\")) return;\n let children = void 0;\n let _$$slots = void 0;\n let renderFns = {};\n for (const [key, value] of Object.entries(slotted)) {\n _$$slots ??= {};\n if (key === \"default\") {\n _$$slots.default = true;\n children = createRawSnippet(() => ({\n render: () => `<astro-slot>${value}</astro-slot>`\n }));\n } else {\n _$$slots[key] = createRawSnippet(() => ({\n render: () => `<astro-slot name=\"${key}\">${value}</astro-slot>`\n }));\n }\n if (key === \"default\") {\n renderFns.children = createRawSnippet(() => ({\n render: () => `<astro-slot>${value}</astro-slot>`\n }));\n } else {\n renderFns[key] = createRawSnippet(() => ({\n render: () => `<astro-slot name=\"${key}\">${value}</astro-slot>`\n }));\n }\n }\n const resolvedProps = {\n ...props,\n children,\n $$slots: _$$slots,\n ...renderFns\n };\n if (existingApplications.has(element)) {\n existingApplications.get(element).setProps(resolvedProps);\n } else {\n const component = createComponent(Component, element, resolvedProps, client !== \"only\");\n existingApplications.set(element, component);\n element.addEventListener(\"astro:unmount\", () => component.destroy(), { once: true });\n }\n };\n};\nfunction createComponent(Component, target, props, shouldHydrate) {\n let propsState = $state(props);\n const bootstrap = shouldHydrate ? hydrate : mount;\n if (!shouldHydrate) {\n target.innerHTML = \"\";\n }\n const component = bootstrap(Component, { target, props: propsState });\n return {\n setProps(newProps) {\n Object.assign(propsState, newProps);\n for (const key in propsState) {\n if (!(key in newProps)) {\n delete propsState[key];\n }\n }\n },\n destroy() {\n unmount(component);\n }\n };\n}\nexport {\n client_svelte_default as default\n};\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;AACA,IAAM,uBAAuC,oBAAI,QAAQ;AACzD,IAAI,wBAAwB,CAAC,YAAY;AACvC,SAAO,OAAO,WAAW,OAAO,SAAS,EAAE,OAAO,MAAM;AACtD,QAAI,CAAC,QAAQ,aAAa,KAAK,EAAG;AAClC,QAAI,WAAW;AACf,QAAI,WAAW;AACf,QAAI,YAAY,CAAC;AACjB,eAAW,CAAC,KAAK,KAAK,KAAK,OAAO,QAAQ,OAAO,GAAG;AAClD,mBAAa,CAAC;AACd,UAAI,QAAQ,WAAW;AACrB,iBAAS,UAAU;AACnB,mBAAW,iBAAiB,OAAO;AAAA,UACjC,QAAQ,MAAM,eAAe,KAAK;AAAA,QACpC,EAAE;AAAA,MACJ,OAAO;AACL,iBAAS,GAAG,IAAI,iBAAiB,OAAO;AAAA,UACtC,QAAQ,MAAM,qBAAqB,GAAG,KAAK,KAAK;AAAA,QAClD,EAAE;AAAA,MACJ;AACA,UAAI,QAAQ,WAAW;AACrB,kBAAU,WAAW,iBAAiB,OAAO;AAAA,UAC3C,QAAQ,MAAM,eAAe,KAAK;AAAA,QACpC,EAAE;AAAA,MACJ,OAAO;AACL,kBAAU,GAAG,IAAI,iBAAiB,OAAO;AAAA,UACvC,QAAQ,MAAM,qBAAqB,GAAG,KAAK,KAAK;AAAA,QAClD,EAAE;AAAA,MACJ;AAAA,IACF;AACA,UAAM,gBAAgB;AAAA,MACpB,GAAG;AAAA,MACH;AAAA,MACA,SAAS;AAAA,MACT,GAAG;AAAA,IACL;AACA,QAAI,qBAAqB,IAAI,OAAO,GAAG;AACrC,2BAAqB,IAAI,OAAO,EAAE,SAAS,aAAa;AAAA,IAC1D,OAAO;AACL,YAAM,YAAY,gBAAgB,WAAW,SAAS,eAAe,WAAW,MAAM;AACtF,2BAAqB,IAAI,SAAS,SAAS;AAC3C,cAAQ,iBAAiB,iBAAiB,MAAM,UAAU,QAAQ,GAAG,EAAE,MAAM,KAAK,CAAC;AAAA,IACrF;AAAA,EACF;AACF;AACA,SAAS,gBAAgB,WAAW,QAAQ,OAAO,eAAe;AAChE,MAAI,aAAa,OAAO,KAAK;AAC7B,QAAM,YAAY,gBAAgB,UAAU;AAC5C,MAAI,CAAC,eAAe;AAClB,WAAO,YAAY;AAAA,EACrB;AACA,QAAM,YAAY,UAAU,WAAW,EAAE,QAAQ,OAAO,WAAW,CAAC;AACpE,SAAO;AAAA,IACL,SAAS,UAAU;AACjB,aAAO,OAAO,YAAY,QAAQ;AAClC,iBAAW,OAAO,YAAY;AAC5B,YAAI,EAAE,OAAO,WAAW;AACtB,iBAAO,WAAW,GAAG;AAAA,QACvB;AAAA,MACF;AAAA,IACF;AAAA,IACA,UAAU;AACR,cAAQ,SAAS;AAAA,IACnB;AAAA,EACF;AACF;",
6
- "names": []
7
- }
@@ -1,184 +0,0 @@
1
- {
2
- "hash": "45948616",
3
- "configHash": "85af5f44",
4
- "lockfileHash": "72ffd4a5",
5
- "browserHash": "f4052818",
6
- "optimized": {
7
- "smol-toml": {
8
- "src": "../../../../node_modules/.pnpm/smol-toml@1.6.1/node_modules/smol-toml/dist/index.js",
9
- "file": "smol-toml.js",
10
- "fileHash": "f9ef84ed",
11
- "needsInterop": false
12
- },
13
- "svelte": {
14
- "src": "../../../../node_modules/.pnpm/svelte@5.54.1/node_modules/svelte/src/index-client.js",
15
- "file": "svelte.js",
16
- "fileHash": "0452368f",
17
- "needsInterop": false
18
- },
19
- "svelte/animate": {
20
- "src": "../../../../node_modules/.pnpm/svelte@5.54.1/node_modules/svelte/src/animate/index.js",
21
- "file": "svelte_animate.js",
22
- "fileHash": "8465cde2",
23
- "needsInterop": false
24
- },
25
- "svelte/attachments": {
26
- "src": "../../../../node_modules/.pnpm/svelte@5.54.1/node_modules/svelte/src/attachments/index.js",
27
- "file": "svelte_attachments.js",
28
- "fileHash": "5e4c4508",
29
- "needsInterop": false
30
- },
31
- "svelte/easing": {
32
- "src": "../../../../node_modules/.pnpm/svelte@5.54.1/node_modules/svelte/src/easing/index.js",
33
- "file": "svelte_easing.js",
34
- "fileHash": "541c855b",
35
- "needsInterop": false
36
- },
37
- "svelte/internal": {
38
- "src": "../../../../node_modules/.pnpm/svelte@5.54.1/node_modules/svelte/src/internal/index.js",
39
- "file": "svelte_internal.js",
40
- "fileHash": "c1211831",
41
- "needsInterop": true
42
- },
43
- "svelte/internal/client": {
44
- "src": "../../../../node_modules/.pnpm/svelte@5.54.1/node_modules/svelte/src/internal/client/index.js",
45
- "file": "svelte_internal_client.js",
46
- "fileHash": "ecd816c2",
47
- "needsInterop": false
48
- },
49
- "svelte/internal/disclose-version": {
50
- "src": "../../../../node_modules/.pnpm/svelte@5.54.1/node_modules/svelte/src/internal/disclose-version.js",
51
- "file": "svelte_internal_disclose-version.js",
52
- "fileHash": "f62a3eb1",
53
- "needsInterop": false
54
- },
55
- "svelte/internal/flags/async": {
56
- "src": "../../../../node_modules/.pnpm/svelte@5.54.1/node_modules/svelte/src/internal/flags/async.js",
57
- "file": "svelte_internal_flags_async.js",
58
- "fileHash": "4b7590f6",
59
- "needsInterop": false
60
- },
61
- "svelte/internal/flags/legacy": {
62
- "src": "../../../../node_modules/.pnpm/svelte@5.54.1/node_modules/svelte/src/internal/flags/legacy.js",
63
- "file": "svelte_internal_flags_legacy.js",
64
- "fileHash": "a4b72000",
65
- "needsInterop": false
66
- },
67
- "svelte/internal/flags/tracing": {
68
- "src": "../../../../node_modules/.pnpm/svelte@5.54.1/node_modules/svelte/src/internal/flags/tracing.js",
69
- "file": "svelte_internal_flags_tracing.js",
70
- "fileHash": "f9114017",
71
- "needsInterop": false
72
- },
73
- "svelte/legacy": {
74
- "src": "../../../../node_modules/.pnpm/svelte@5.54.1/node_modules/svelte/src/legacy/legacy-client.js",
75
- "file": "svelte_legacy.js",
76
- "fileHash": "9ef110c4",
77
- "needsInterop": false
78
- },
79
- "svelte/motion": {
80
- "src": "../../../../node_modules/.pnpm/svelte@5.54.1/node_modules/svelte/src/motion/index.js",
81
- "file": "svelte_motion.js",
82
- "fileHash": "cc1b44ed",
83
- "needsInterop": false
84
- },
85
- "svelte/reactivity": {
86
- "src": "../../../../node_modules/.pnpm/svelte@5.54.1/node_modules/svelte/src/reactivity/index-client.js",
87
- "file": "svelte_reactivity.js",
88
- "fileHash": "f79d2a8a",
89
- "needsInterop": false
90
- },
91
- "svelte/reactivity/window": {
92
- "src": "../../../../node_modules/.pnpm/svelte@5.54.1/node_modules/svelte/src/reactivity/window/index.js",
93
- "file": "svelte_reactivity_window.js",
94
- "fileHash": "f0bbc3aa",
95
- "needsInterop": false
96
- },
97
- "svelte/store": {
98
- "src": "../../../../node_modules/.pnpm/svelte@5.54.1/node_modules/svelte/src/store/index-client.js",
99
- "file": "svelte_store.js",
100
- "fileHash": "06e2fc9f",
101
- "needsInterop": false
102
- },
103
- "svelte/transition": {
104
- "src": "../../../../node_modules/.pnpm/svelte@5.54.1/node_modules/svelte/src/transition/index.js",
105
- "file": "svelte_transition.js",
106
- "fileHash": "7df9eb25",
107
- "needsInterop": false
108
- },
109
- "svelte/events": {
110
- "src": "../../../../node_modules/.pnpm/svelte@5.54.1/node_modules/svelte/src/events/index.js",
111
- "file": "svelte_events.js",
112
- "fileHash": "8eda0439",
113
- "needsInterop": false
114
- },
115
- "svelte > clsx": {
116
- "src": "../../../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs",
117
- "file": "svelte___clsx.js",
118
- "fileHash": "916f89fe",
119
- "needsInterop": false
120
- },
121
- "astro > aria-query": {
122
- "src": "../../../../node_modules/.pnpm/aria-query@5.3.2/node_modules/aria-query/lib/index.js",
123
- "file": "astro___aria-query.js",
124
- "fileHash": "4e5a28d6",
125
- "needsInterop": true
126
- },
127
- "astro > axobject-query": {
128
- "src": "../../../../node_modules/.pnpm/axobject-query@4.1.0/node_modules/axobject-query/lib/index.js",
129
- "file": "astro___axobject-query.js",
130
- "fileHash": "e32b6205",
131
- "needsInterop": true
132
- },
133
- "astro > html-escaper": {
134
- "src": "../../../../node_modules/.pnpm/html-escaper@3.0.3/node_modules/html-escaper/esm/index.js",
135
- "file": "astro___html-escaper.js",
136
- "fileHash": "01cedad3",
137
- "needsInterop": false
138
- },
139
- "@astrojs/svelte/client.js": {
140
- "src": "../../../../node_modules/.pnpm/@astrojs+svelte@8.0.3_astro@6.1.0_rollup@4.60.0_typescript@5.9.3__svelte@5.54.1_typescript@5.9.3/node_modules/@astrojs/svelte/dist/client.svelte.js",
141
- "file": "@astrojs_svelte_client__js.js",
142
- "fileHash": "c45511bb",
143
- "needsInterop": false
144
- }
145
- },
146
- "chunks": {
147
- "chunk-RJGEXL5C": {
148
- "file": "chunk-RJGEXL5C.js"
149
- },
150
- "chunk-FPEUJ7DG": {
151
- "file": "chunk-FPEUJ7DG.js"
152
- },
153
- "chunk-AJXJMYAF": {
154
- "file": "chunk-AJXJMYAF.js"
155
- },
156
- "chunk-ZREFNRZZ": {
157
- "file": "chunk-ZREFNRZZ.js"
158
- },
159
- "chunk-ZOV3DWEJ": {
160
- "file": "chunk-ZOV3DWEJ.js"
161
- },
162
- "chunk-CNYJBM5F": {
163
- "file": "chunk-CNYJBM5F.js"
164
- },
165
- "chunk-MHDZ3SK7": {
166
- "file": "chunk-MHDZ3SK7.js"
167
- },
168
- "chunk-RBDTDTPY": {
169
- "file": "chunk-RBDTDTPY.js"
170
- },
171
- "chunk-YL4MIWGJ": {
172
- "file": "chunk-YL4MIWGJ.js"
173
- },
174
- "chunk-DBPNBGEI": {
175
- "file": "chunk-DBPNBGEI.js"
176
- },
177
- "chunk-ZP4UNCSN": {
178
- "file": "chunk-ZP4UNCSN.js"
179
- },
180
- "chunk-BUSYA2B4": {
181
- "file": "chunk-BUSYA2B4.js"
182
- }
183
- }
184
- }