nebula-cms 0.1.3 → 0.1.4

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 (380) hide show
  1. package/README.md +2 -0
  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/dist/client/Admin.svelte.d.ts +11 -0
  6. package/dist/client/Admin.svelte.d.ts.map +1 -0
  7. package/dist/client/components/BackendPicker.svelte.d.ts +4 -0
  8. package/dist/client/components/BackendPicker.svelte.d.ts.map +1 -0
  9. package/dist/client/components/DraftChip.svelte.d.ts +10 -0
  10. package/dist/client/components/DraftChip.svelte.d.ts.map +1 -0
  11. package/dist/client/components/MetadataForm.svelte.d.ts +12 -0
  12. package/dist/client/components/MetadataForm.svelte.d.ts.map +1 -0
  13. package/dist/client/components/ThemeToggle.svelte.d.ts +19 -0
  14. package/dist/client/components/ThemeToggle.svelte.d.ts.map +1 -0
  15. package/dist/client/components/dialogs/DeleteDraftDialog.svelte.d.ts +11 -0
  16. package/dist/client/components/dialogs/DeleteDraftDialog.svelte.d.ts.map +1 -0
  17. package/dist/client/components/dialogs/FilenameDialog.svelte.d.ts +13 -0
  18. package/dist/client/components/dialogs/FilenameDialog.svelte.d.ts.map +1 -0
  19. package/dist/client/components/editor/EditorPane.svelte.d.ts +4 -0
  20. package/dist/client/components/editor/EditorPane.svelte.d.ts.map +1 -0
  21. package/dist/client/components/editor/EditorTabs.svelte.d.ts +8 -0
  22. package/dist/client/components/editor/EditorTabs.svelte.d.ts.map +1 -0
  23. package/dist/client/components/editor/EditorToolbar.svelte.d.ts +4 -0
  24. package/dist/client/components/editor/EditorToolbar.svelte.d.ts.map +1 -0
  25. package/dist/client/components/editor/FormatSelector.svelte.d.ts +4 -0
  26. package/dist/client/components/editor/FormatSelector.svelte.d.ts.map +1 -0
  27. package/dist/client/components/editor/Toolbar.svelte.d.ts +19 -0
  28. package/dist/client/components/editor/Toolbar.svelte.d.ts.map +1 -0
  29. package/dist/client/components/fields/ArrayField.svelte.d.ts +15 -0
  30. package/dist/client/components/fields/ArrayField.svelte.d.ts.map +1 -0
  31. package/dist/client/components/fields/ArrayItem.svelte.d.ts +28 -0
  32. package/dist/client/components/fields/ArrayItem.svelte.d.ts.map +1 -0
  33. package/dist/client/components/fields/BooleanField.svelte.d.ts +16 -0
  34. package/dist/client/components/fields/BooleanField.svelte.d.ts.map +1 -0
  35. package/dist/client/components/fields/DateField.svelte.d.ts +16 -0
  36. package/dist/client/components/fields/DateField.svelte.d.ts.map +1 -0
  37. package/dist/client/components/fields/EnumField.svelte.d.ts +17 -0
  38. package/dist/client/components/fields/EnumField.svelte.d.ts.map +1 -0
  39. package/dist/client/components/fields/FieldWrapper.svelte.d.ts +18 -0
  40. package/dist/client/components/fields/FieldWrapper.svelte.d.ts.map +1 -0
  41. package/dist/client/components/fields/NumberField.svelte.d.ts +16 -0
  42. package/dist/client/components/fields/NumberField.svelte.d.ts.map +1 -0
  43. package/dist/client/components/fields/ObjectField.svelte.d.ts +16 -0
  44. package/dist/client/components/fields/ObjectField.svelte.d.ts.map +1 -0
  45. package/dist/client/components/fields/SchemaField.svelte.d.ts +16 -0
  46. package/dist/client/components/fields/SchemaField.svelte.d.ts.map +1 -0
  47. package/dist/client/components/fields/StringField.svelte.d.ts +16 -0
  48. package/dist/client/components/fields/StringField.svelte.d.ts.map +1 -0
  49. package/dist/client/components/sidebar/AdminSidebar.svelte.d.ts +19 -0
  50. package/dist/client/components/sidebar/AdminSidebar.svelte.d.ts.map +1 -0
  51. package/dist/client/components/sidebar/AdminSidebarSort.svelte.d.ts +12 -0
  52. package/dist/client/components/sidebar/AdminSidebarSort.svelte.d.ts.map +1 -0
  53. package/dist/client/css/icons.css +29 -0
  54. package/dist/client/index.d.ts +2 -0
  55. package/dist/client/index.d.ts.map +1 -0
  56. package/dist/client/js/drafts/merge.svelte.d.ts +24 -0
  57. package/dist/client/js/drafts/merge.svelte.d.ts.map +1 -0
  58. package/dist/client/js/drafts/merge.svelte.js +106 -0
  59. package/dist/client/js/drafts/ops.svelte.d.ts +31 -0
  60. package/dist/client/js/drafts/ops.svelte.d.ts.map +1 -0
  61. package/dist/client/js/drafts/ops.svelte.js +182 -0
  62. package/dist/client/js/drafts/storage.d.ts +45 -0
  63. package/dist/client/js/drafts/storage.d.ts.map +1 -0
  64. package/dist/client/js/drafts/storage.js +76 -0
  65. package/dist/client/js/drafts/workers/diff.d.ts +2 -0
  66. package/dist/client/js/drafts/workers/diff.d.ts.map +1 -0
  67. package/dist/client/js/drafts/workers/diff.js +20 -0
  68. package/dist/client/js/editor/editor.svelte.d.ts +124 -0
  69. package/dist/client/js/editor/editor.svelte.d.ts.map +1 -0
  70. package/dist/client/js/editor/editor.svelte.js +294 -0
  71. package/dist/client/js/editor/languages.d.ts +11 -0
  72. package/dist/client/js/editor/languages.d.ts.map +1 -0
  73. package/dist/client/js/editor/languages.js +93 -0
  74. package/dist/client/js/editor/link-wrap.d.ts +6 -0
  75. package/dist/client/js/editor/link-wrap.d.ts.map +1 -0
  76. package/{src/client/js/editor/link-wrap.ts → dist/client/js/editor/link-wrap.js} +17 -24
  77. package/dist/client/js/editor/markdown-shortcuts.d.ts +4 -0
  78. package/dist/client/js/editor/markdown-shortcuts.d.ts.map +1 -0
  79. package/dist/client/js/editor/markdown-shortcuts.js +219 -0
  80. package/dist/client/js/handlers/admin.d.ts +64 -0
  81. package/dist/client/js/handlers/admin.d.ts.map +1 -0
  82. package/dist/client/js/handlers/admin.js +186 -0
  83. package/dist/client/js/state/dialogs.svelte.d.ts +16 -0
  84. package/dist/client/js/state/dialogs.svelte.d.ts.map +1 -0
  85. package/dist/client/js/state/dialogs.svelte.js +28 -0
  86. package/dist/client/js/state/router.svelte.d.ts +44 -0
  87. package/dist/client/js/state/router.svelte.d.ts.map +1 -0
  88. package/dist/client/js/state/router.svelte.js +135 -0
  89. package/dist/client/js/state/schema.svelte.d.ts +51 -0
  90. package/dist/client/js/state/schema.svelte.d.ts.map +1 -0
  91. package/{src/client/js/state/schema.svelte.ts → dist/client/js/state/schema.svelte.js} +55 -70
  92. package/dist/client/js/state/state.svelte.d.ts +68 -0
  93. package/dist/client/js/state/state.svelte.d.ts.map +1 -0
  94. package/dist/client/js/state/state.svelte.js +291 -0
  95. package/dist/client/js/state/theme.svelte.d.ts +24 -0
  96. package/dist/client/js/state/theme.svelte.d.ts.map +1 -0
  97. package/{src/client/js/state/theme.svelte.ts → dist/client/js/state/theme.svelte.js} +54 -91
  98. package/dist/client/js/storage/adapter.d.ts +130 -0
  99. package/dist/client/js/storage/adapter.d.ts.map +1 -0
  100. package/dist/client/js/storage/adapter.js +5 -0
  101. package/dist/client/js/storage/client.d.ts +72 -0
  102. package/dist/client/js/storage/client.d.ts.map +1 -0
  103. package/dist/client/js/storage/client.js +121 -0
  104. package/dist/client/js/storage/db.d.ts +8 -0
  105. package/dist/client/js/storage/db.d.ts.map +1 -0
  106. package/dist/client/js/storage/db.js +35 -0
  107. package/dist/client/js/storage/fsa.d.ts +51 -0
  108. package/dist/client/js/storage/fsa.d.ts.map +1 -0
  109. package/dist/client/js/storage/fsa.js +91 -0
  110. package/dist/client/js/storage/github.d.ts +62 -0
  111. package/dist/client/js/storage/github.d.ts.map +1 -0
  112. package/dist/client/js/storage/github.js +216 -0
  113. package/dist/client/js/storage/storage.d.ts +32 -0
  114. package/dist/client/js/storage/storage.d.ts.map +1 -0
  115. package/dist/client/js/storage/storage.js +68 -0
  116. package/dist/client/js/storage/workers/frontmatter.d.ts +2 -0
  117. package/dist/client/js/storage/workers/frontmatter.d.ts.map +1 -0
  118. package/dist/client/js/storage/workers/frontmatter.js +253 -0
  119. package/dist/client/js/storage/workers/storage.d.ts +2 -0
  120. package/dist/client/js/storage/workers/storage.d.ts.map +1 -0
  121. package/dist/client/js/storage/workers/storage.js +167 -0
  122. package/dist/client/js/storage/workers/toml-parser.d.ts +2 -0
  123. package/dist/client/js/storage/workers/toml-parser.d.ts.map +1 -0
  124. package/dist/client/js/storage/workers/toml-parser.js +75 -0
  125. package/dist/client/js/storage/workers/yaml-parser.d.ts +2 -0
  126. package/dist/client/js/storage/workers/yaml-parser.d.ts.map +1 -0
  127. package/dist/client/js/storage/workers/yaml-parser.js +100 -0
  128. package/dist/client/js/utils/file-types.d.ts +58 -0
  129. package/dist/client/js/utils/file-types.d.ts.map +1 -0
  130. package/{src/client/js/utils/file-types.ts → dist/client/js/utils/file-types.js} +75 -107
  131. package/dist/client/js/utils/format.d.ts +8 -0
  132. package/dist/client/js/utils/format.d.ts.map +1 -0
  133. package/{src/client/js/utils/format.ts → dist/client/js/utils/format.js} +5 -6
  134. package/dist/client/js/utils/frontmatter.d.ts +12 -0
  135. package/dist/client/js/utils/frontmatter.d.ts.map +1 -0
  136. package/dist/client/js/utils/frontmatter.js +29 -0
  137. package/dist/client/js/utils/schema-utils.d.ts +110 -0
  138. package/dist/client/js/utils/schema-utils.d.ts.map +1 -0
  139. package/dist/client/js/utils/schema-utils.js +242 -0
  140. package/dist/client/js/utils/slug.d.ts +8 -0
  141. package/dist/client/js/utils/slug.d.ts.map +1 -0
  142. package/{src/client/js/utils/slug.ts → dist/client/js/utils/slug.js} +6 -7
  143. package/dist/client/js/utils/sort.d.ts +41 -0
  144. package/dist/client/js/utils/sort.d.ts.map +1 -0
  145. package/dist/client/js/utils/sort.js +65 -0
  146. package/dist/client/js/utils/stable-stringify.d.ts +8 -0
  147. package/dist/client/js/utils/stable-stringify.d.ts.map +1 -0
  148. package/dist/client/js/utils/stable-stringify.js +23 -0
  149. package/dist/client/js/utils/url-utils.d.ts +11 -0
  150. package/dist/client/js/utils/url-utils.d.ts.map +1 -0
  151. package/{src/client/js/utils/url-utils.ts → dist/client/js/utils/url-utils.js} +22 -23
  152. package/dist/types.d.ts +22 -0
  153. package/dist/types.d.ts.map +1 -0
  154. package/dist/types.js +1 -0
  155. package/package.json +4 -1
  156. package/.github/workflows/ci.yml +0 -27
  157. package/.github/workflows/publish.yml +0 -34
  158. package/.mcp.json +0 -12
  159. package/.prettierignore +0 -5
  160. package/.prettierrc.cjs +0 -22
  161. package/AGENTS.md +0 -183
  162. package/playground/astro.config.mjs +0 -7
  163. package/playground/node_modules/.bin/astro +0 -21
  164. package/playground/node_modules/.vite/deps/@astrojs_svelte_client__js.js +0 -85
  165. package/playground/node_modules/.vite/deps/@astrojs_svelte_client__js.js.map +0 -7
  166. package/playground/node_modules/.vite/deps/_metadata.json +0 -184
  167. package/playground/node_modules/.vite/deps/astro___aria-query.js +0 -6776
  168. package/playground/node_modules/.vite/deps/astro___aria-query.js.map +0 -7
  169. package/playground/node_modules/.vite/deps/astro___axobject-query.js +0 -3754
  170. package/playground/node_modules/.vite/deps/astro___axobject-query.js.map +0 -7
  171. package/playground/node_modules/.vite/deps/astro___html-escaper.js +0 -34
  172. package/playground/node_modules/.vite/deps/astro___html-escaper.js.map +0 -7
  173. package/playground/node_modules/.vite/deps/chunk-AJXJMYAF.js +0 -0
  174. package/playground/node_modules/.vite/deps/chunk-AJXJMYAF.js.map +0 -7
  175. package/playground/node_modules/.vite/deps/chunk-BUSYA2B4.js +0 -8
  176. package/playground/node_modules/.vite/deps/chunk-BUSYA2B4.js.map +0 -7
  177. package/playground/node_modules/.vite/deps/chunk-CNYJBM5F.js +0 -21
  178. package/playground/node_modules/.vite/deps/chunk-CNYJBM5F.js.map +0 -7
  179. package/playground/node_modules/.vite/deps/chunk-DBPNBGEI.js +0 -223
  180. package/playground/node_modules/.vite/deps/chunk-DBPNBGEI.js.map +0 -7
  181. package/playground/node_modules/.vite/deps/chunk-FPEUJ7DG.js +0 -27
  182. package/playground/node_modules/.vite/deps/chunk-FPEUJ7DG.js.map +0 -7
  183. package/playground/node_modules/.vite/deps/chunk-MHDZ3SK7.js +0 -1005
  184. package/playground/node_modules/.vite/deps/chunk-MHDZ3SK7.js.map +0 -7
  185. package/playground/node_modules/.vite/deps/chunk-RBDTDTPY.js +0 -204
  186. package/playground/node_modules/.vite/deps/chunk-RBDTDTPY.js.map +0 -7
  187. package/playground/node_modules/.vite/deps/chunk-RJGEXL5C.js +0 -688
  188. package/playground/node_modules/.vite/deps/chunk-RJGEXL5C.js.map +0 -7
  189. package/playground/node_modules/.vite/deps/chunk-YL4MIWGJ.js +0 -5099
  190. package/playground/node_modules/.vite/deps/chunk-YL4MIWGJ.js.map +0 -7
  191. package/playground/node_modules/.vite/deps/chunk-ZOV3DWEJ.js +0 -4376
  192. package/playground/node_modules/.vite/deps/chunk-ZOV3DWEJ.js.map +0 -7
  193. package/playground/node_modules/.vite/deps/chunk-ZP4UNCSN.js +0 -23
  194. package/playground/node_modules/.vite/deps/chunk-ZP4UNCSN.js.map +0 -7
  195. package/playground/node_modules/.vite/deps/chunk-ZREFNRZZ.js +0 -148
  196. package/playground/node_modules/.vite/deps/chunk-ZREFNRZZ.js.map +0 -7
  197. package/playground/node_modules/.vite/deps/package.json +0 -3
  198. package/playground/node_modules/.vite/deps/smol-toml.js +0 -843
  199. package/playground/node_modules/.vite/deps/smol-toml.js.map +0 -7
  200. package/playground/node_modules/.vite/deps/svelte.js +0 -55
  201. package/playground/node_modules/.vite/deps/svelte.js.map +0 -7
  202. package/playground/node_modules/.vite/deps/svelte___clsx.js +0 -9
  203. package/playground/node_modules/.vite/deps/svelte___clsx.js.map +0 -7
  204. package/playground/node_modules/.vite/deps/svelte_animate.js +0 -57
  205. package/playground/node_modules/.vite/deps/svelte_animate.js.map +0 -7
  206. package/playground/node_modules/.vite/deps/svelte_attachments.js +0 -15
  207. package/playground/node_modules/.vite/deps/svelte_attachments.js.map +0 -7
  208. package/playground/node_modules/.vite/deps/svelte_easing.js +0 -67
  209. package/playground/node_modules/.vite/deps/svelte_easing.js.map +0 -7
  210. package/playground/node_modules/.vite/deps/svelte_events.js +0 -11
  211. package/playground/node_modules/.vite/deps/svelte_events.js.map +0 -7
  212. package/playground/node_modules/.vite/deps/svelte_internal.js +0 -5
  213. package/playground/node_modules/.vite/deps/svelte_internal.js.map +0 -7
  214. package/playground/node_modules/.vite/deps/svelte_internal_client.js +0 -402
  215. package/playground/node_modules/.vite/deps/svelte_internal_client.js.map +0 -7
  216. package/playground/node_modules/.vite/deps/svelte_internal_disclose-version.js +0 -10
  217. package/playground/node_modules/.vite/deps/svelte_internal_disclose-version.js.map +0 -7
  218. package/playground/node_modules/.vite/deps/svelte_internal_flags_async.js +0 -8
  219. package/playground/node_modules/.vite/deps/svelte_internal_flags_async.js.map +0 -7
  220. package/playground/node_modules/.vite/deps/svelte_internal_flags_legacy.js +0 -8
  221. package/playground/node_modules/.vite/deps/svelte_internal_flags_legacy.js.map +0 -7
  222. package/playground/node_modules/.vite/deps/svelte_internal_flags_tracing.js +0 -8
  223. package/playground/node_modules/.vite/deps/svelte_internal_flags_tracing.js.map +0 -7
  224. package/playground/node_modules/.vite/deps/svelte_legacy.js +0 -35
  225. package/playground/node_modules/.vite/deps/svelte_legacy.js.map +0 -7
  226. package/playground/node_modules/.vite/deps/svelte_motion.js +0 -545
  227. package/playground/node_modules/.vite/deps/svelte_motion.js.map +0 -7
  228. package/playground/node_modules/.vite/deps/svelte_reactivity.js +0 -29
  229. package/playground/node_modules/.vite/deps/svelte_reactivity.js.map +0 -7
  230. package/playground/node_modules/.vite/deps/svelte_reactivity_window.js +0 -127
  231. package/playground/node_modules/.vite/deps/svelte_reactivity_window.js.map +0 -7
  232. package/playground/node_modules/.vite/deps/svelte_store.js +0 -103
  233. package/playground/node_modules/.vite/deps/svelte_store.js.map +0 -7
  234. package/playground/node_modules/.vite/deps/svelte_transition.js +0 -208
  235. package/playground/node_modules/.vite/deps/svelte_transition.js.map +0 -7
  236. package/playground/package.json +0 -16
  237. package/playground/pnpm-lock.yaml +0 -3167
  238. package/playground/src/content/authors/jane-doe.json +0 -8
  239. package/playground/src/content/config/build.toml +0 -2
  240. package/playground/src/content/courses/web-fundamentals.json +0 -29
  241. package/playground/src/content/docs/advanced.mdx +0 -6
  242. package/playground/src/content/docs/intro.md +0 -6
  243. package/playground/src/content/guides/getting-started.mdx +0 -6
  244. package/playground/src/content/posts/hello-world.md +0 -7
  245. package/playground/src/content/products/t-shirt.json +0 -16
  246. package/playground/src/content/recipes/pancakes.mdoc +0 -8
  247. package/playground/src/content/settings/site.yml +0 -2
  248. package/playground/src/content.config.ts +0 -198
  249. package/playground/src/env.d.ts +0 -1
  250. package/playground/src/pages/index.astro +0 -11
  251. package/playground/src/pages/nebula.astro +0 -14
  252. package/pnpm-workspace.yaml +0 -2
  253. package/scripts/subset-icons.mjs +0 -178
  254. package/src/astro/index.ts +0 -295
  255. package/src/client/js/drafts/merge.svelte.ts +0 -121
  256. package/src/client/js/drafts/ops.svelte.ts +0 -227
  257. package/src/client/js/drafts/storage.ts +0 -108
  258. package/src/client/js/drafts/workers/diff.ts +0 -40
  259. package/src/client/js/editor/editor.svelte.ts +0 -343
  260. package/src/client/js/editor/languages.ts +0 -98
  261. package/src/client/js/editor/markdown-shortcuts.ts +0 -261
  262. package/src/client/js/handlers/admin.ts +0 -246
  263. package/src/client/js/state/dialogs.svelte.ts +0 -35
  264. package/src/client/js/state/router.svelte.ts +0 -156
  265. package/src/client/js/state/state.svelte.ts +0 -334
  266. package/src/client/js/storage/adapter.ts +0 -102
  267. package/src/client/js/storage/client.ts +0 -150
  268. package/src/client/js/storage/db.ts +0 -36
  269. package/src/client/js/storage/fsa.ts +0 -110
  270. package/src/client/js/storage/github.ts +0 -297
  271. package/src/client/js/storage/storage.ts +0 -83
  272. package/src/client/js/storage/workers/frontmatter.ts +0 -320
  273. package/src/client/js/storage/workers/storage.ts +0 -177
  274. package/src/client/js/storage/workers/toml-parser.ts +0 -106
  275. package/src/client/js/storage/workers/yaml-parser.ts +0 -132
  276. package/src/client/js/utils/frontmatter.ts +0 -38
  277. package/src/client/js/utils/schema-utils.ts +0 -295
  278. package/src/client/js/utils/sort.ts +0 -84
  279. package/src/client/js/utils/stable-stringify.ts +0 -27
  280. package/src/types.ts +0 -25
  281. package/svelte.config.js +0 -4
  282. package/tests/astro/build.test.ts +0 -63
  283. package/tests/astro/index.test.ts +0 -689
  284. package/tests/client/components/Admin.test.ts +0 -446
  285. package/tests/client/components/BackendPicker.test.ts +0 -239
  286. package/tests/client/components/DraftChip.test.ts +0 -53
  287. package/tests/client/components/MetadataForm.test.ts +0 -164
  288. package/tests/client/components/dialogs/DeleteDraftDialog.test.ts +0 -91
  289. package/tests/client/components/dialogs/FilenameDialog.test.ts +0 -209
  290. package/tests/client/components/dialogs/dialog-stubs.ts +0 -19
  291. package/tests/client/components/editor/EditorPane.test.ts +0 -100
  292. package/tests/client/components/editor/EditorTabs.test.ts +0 -253
  293. package/tests/client/components/editor/EditorToolbar.test.ts +0 -252
  294. package/tests/client/components/editor/fixtures.ts +0 -31
  295. package/tests/client/components/fields/ArrayField.test.ts +0 -197
  296. package/tests/client/components/fields/BooleanField.test.ts +0 -206
  297. package/tests/client/components/fields/DateField.test.ts +0 -210
  298. package/tests/client/components/fields/EnumField.test.ts +0 -246
  299. package/tests/client/components/fields/NumberField.test.ts +0 -240
  300. package/tests/client/components/fields/ObjectField.test.ts +0 -157
  301. package/tests/client/components/fields/SchemaField.test.ts +0 -190
  302. package/tests/client/components/fields/StringField.test.ts +0 -223
  303. package/tests/client/components/sidebar/AdminSidebar.test.ts +0 -285
  304. package/tests/client/components/sidebar/AdminSidebarSort.test.ts +0 -135
  305. package/tests/client/components/sidebar/sort-mock.ts +0 -23
  306. package/tests/client/js/drafts/fixtures.ts +0 -22
  307. package/tests/client/js/drafts/merge.test.ts +0 -282
  308. package/tests/client/js/drafts/ops.test.ts +0 -658
  309. package/tests/client/js/drafts/storage.test.ts +0 -200
  310. package/tests/client/js/drafts/workers/diff.test.ts +0 -165
  311. package/tests/client/js/editor/editor.test.ts +0 -616
  312. package/tests/client/js/editor/link-wrap.test.ts +0 -225
  313. package/tests/client/js/editor/markdown-shortcuts.test.ts +0 -370
  314. package/tests/client/js/handlers/admin.test.ts +0 -467
  315. package/tests/client/js/state/router.test.ts +0 -619
  316. package/tests/client/js/state/schema.test.ts +0 -266
  317. package/tests/client/js/state/state.test.ts +0 -328
  318. package/tests/client/js/storage/adapter.test.ts +0 -115
  319. package/tests/client/js/storage/client.test.ts +0 -250
  320. package/tests/client/js/storage/db.test.ts +0 -59
  321. package/tests/client/js/storage/fsa.test.ts +0 -284
  322. package/tests/client/js/storage/github.test.ts +0 -349
  323. package/tests/client/js/storage/mock-port.ts +0 -95
  324. package/tests/client/js/storage/storage.test.ts +0 -77
  325. package/tests/client/js/storage/workers/frontmatter.test.ts +0 -479
  326. package/tests/client/js/storage/workers/storage.test.ts +0 -299
  327. package/tests/client/js/storage/workers/toml-parser.test.ts +0 -169
  328. package/tests/client/js/storage/workers/yaml-parser.test.ts +0 -168
  329. package/tests/client/js/utils/file-types.test.ts +0 -268
  330. package/tests/client/js/utils/frontmatter.test.ts +0 -87
  331. package/tests/client/js/utils/schema-utils.test.ts +0 -318
  332. package/tests/client/js/utils/slug.test.ts +0 -58
  333. package/tests/client/js/utils/sort.test.ts +0 -276
  334. package/tests/client/js/utils/stable-stringify.test.ts +0 -68
  335. package/tests/client/js/utils/url-utils.test.ts +0 -70
  336. package/tests/e2e/backend-connection.test.ts +0 -301
  337. package/tests/e2e/draft-lifecycle.test.ts +0 -388
  338. package/tests/e2e/editing.test.ts +0 -355
  339. package/tests/e2e/github-adapter.test.ts +0 -330
  340. package/tests/e2e/helpers/mock-adapter.ts +0 -166
  341. package/tests/e2e/helpers/test-app.ts +0 -155
  342. package/tests/e2e/navigation.test.ts +0 -358
  343. package/tests/e2e/publishing.test.ts +0 -345
  344. package/tests/e2e/unsaved-changes.test.ts +0 -317
  345. package/tests/setup.ts +0 -2
  346. package/tests/stubs/codemirror.ts +0 -197
  347. package/tsconfig.json +0 -19
  348. package/vitest.config.ts +0 -178
  349. /package/{src → dist}/client/Admin.svelte +0 -0
  350. /package/{src → dist}/client/components/BackendPicker.svelte +0 -0
  351. /package/{src → dist}/client/components/DraftChip.svelte +0 -0
  352. /package/{src → dist}/client/components/MetadataForm.svelte +0 -0
  353. /package/{src → dist}/client/components/ThemeToggle.svelte +0 -0
  354. /package/{src → dist}/client/components/dialogs/DeleteDraftDialog.svelte +0 -0
  355. /package/{src → dist}/client/components/dialogs/FilenameDialog.svelte +0 -0
  356. /package/{src → dist}/client/components/editor/EditorPane.svelte +0 -0
  357. /package/{src → dist}/client/components/editor/EditorTabs.svelte +0 -0
  358. /package/{src → dist}/client/components/editor/EditorToolbar.svelte +0 -0
  359. /package/{src → dist}/client/components/editor/FormatSelector.svelte +0 -0
  360. /package/{src → dist}/client/components/editor/Toolbar.svelte +0 -0
  361. /package/{src → dist}/client/components/fields/ArrayField.svelte +0 -0
  362. /package/{src → dist}/client/components/fields/ArrayItem.svelte +0 -0
  363. /package/{src → dist}/client/components/fields/BooleanField.svelte +0 -0
  364. /package/{src → dist}/client/components/fields/DateField.svelte +0 -0
  365. /package/{src → dist}/client/components/fields/EnumField.svelte +0 -0
  366. /package/{src → dist}/client/components/fields/FieldWrapper.svelte +0 -0
  367. /package/{src → dist}/client/components/fields/NumberField.svelte +0 -0
  368. /package/{src → dist}/client/components/fields/ObjectField.svelte +0 -0
  369. /package/{src → dist}/client/components/fields/SchemaField.svelte +0 -0
  370. /package/{src → dist}/client/components/fields/StringField.svelte +0 -0
  371. /package/{src → dist}/client/components/sidebar/AdminSidebar.svelte +0 -0
  372. /package/{src → dist}/client/components/sidebar/AdminSidebarSort.svelte +0 -0
  373. /package/{src → dist}/client/css/a11y.css +0 -0
  374. /package/{src → dist}/client/css/btn.css +0 -0
  375. /package/{src → dist}/client/css/dialog.css +0 -0
  376. /package/{src → dist}/client/css/field-input.css +0 -0
  377. /package/{src → dist}/client/css/reset.css +0 -0
  378. /package/{src → dist}/client/css/theme.css +0 -0
  379. /package/{src/client/index.ts → dist/client/index.js} +0 -0
  380. /package/{src → dist}/virtual.d.ts +0 -0
@@ -1,197 +0,0 @@
1
- /**
2
- * Stub module for all @codemirror/* and @lezer/* imports used in the component test environment.
3
- * These packages are runtime-only dependencies not installed as devDependencies.
4
- * The vitest.config.ts components project redirects every @codemirror/* and @lezer/*
5
- * specifier here so EditorPane can be imported without resolution failures.
6
- */
7
-
8
- /**
9
- * Noop class standing in for CodeMirror's EditorView.
10
- * Static members cover all call sites in EditorPane, link-wrap, and markdown-shortcuts.
11
- */
12
- export class EditorView {
13
- static theme = () => ({});
14
- static lineWrapping = {};
15
- static updateListener = { of: () => ({}) };
16
- static contentAttributes = { of: () => ({}) };
17
- // Used by markdown-shortcuts to register a paste event handler
18
- static domEventHandlers = () => ({});
19
- // Used by markdown-shortcuts for bracket/quote wrapping
20
- static inputHandler = { of: () => ({}) };
21
-
22
- /**
23
- * Noop replacement for EditorView.destroy().
24
- * @return {void}
25
- */
26
- destroy() {}
27
-
28
- /**
29
- * Noop replacement for EditorView.setState().
30
- * @param {unknown} _state - Ignored
31
- * @return {void}
32
- */
33
- setState(_state?: unknown) {}
34
-
35
- /**
36
- * Noop replacement for EditorView.dispatch().
37
- * @param {unknown} _tr - Ignored
38
- * @return {void}
39
- */
40
- dispatch(_tr?: unknown) {}
41
-
42
- /**
43
- * Stub getter returning a minimal EditorState-like shape.
44
- * @return {{ selection: { main: { from: number, to: number, empty: boolean } }, changeByRange: Function, sliceDoc: Function }}
45
- */
46
- get state() {
47
- return {
48
- selection: { main: { from: 0, to: 0, empty: true } },
49
- changeByRange: () => ({ changes: [], selection: {} }),
50
- sliceDoc: () => '',
51
- };
52
- }
53
- }
54
-
55
- // Noop standing in for EditorState
56
- export const EditorState = {
57
- create: () => ({}),
58
- };
59
-
60
- /**
61
- * Noop class standing in for CodeMirror's Compartment.
62
- * Used by EditorPane to isolate the language extension for runtime reconfiguration.
63
- */
64
- export class Compartment {
65
- /**
66
- * Wraps an extension value for initial configuration.
67
- * @param {unknown} _ext - Ignored
68
- * @return {Record<string, never>} Empty object
69
- */
70
- of(_ext?: unknown) {
71
- return {};
72
- }
73
-
74
- /**
75
- * Returns a StateEffect for reconfiguring this compartment.
76
- * @param {unknown} _ext - Ignored
77
- * @return {Record<string, never>} Empty object standing in for a StateEffect
78
- */
79
- reconfigure(_ext?: unknown) {
80
- return {};
81
- }
82
- }
83
-
84
- // Minimal keymap stub
85
- export const keymap = { of: () => ({}) };
86
-
87
- // Command stubs
88
- export const defaultKeymap: unknown[] = [];
89
-
90
- /**
91
- * Noop replacement for CodeMirror's history extension.
92
- * @return {Record<string, never>} Empty object
93
- */
94
- export function history() {
95
- return {};
96
- }
97
- export const historyKeymap: unknown[] = [];
98
-
99
- /**
100
- * Noop replacement for CodeMirror's markdown language extension.
101
- * @return {Record<string, never>} Empty object
102
- */
103
- export function markdown() {
104
- return {};
105
- }
106
- export const markdownLanguage = {};
107
-
108
- // Language data stub
109
- export const languages: unknown[] = [];
110
-
111
- /**
112
- * Noop replacement for CodeMirror's syntaxHighlighting extension.
113
- * @return {Record<string, never>} Empty object
114
- */
115
- export function syntaxHighlighting() {
116
- return {};
117
- }
118
- export const HighlightStyle = {
119
- define: () => ({}),
120
- };
121
-
122
- // ViewPlugin stub (used by link-wrap and markdown-shortcuts)
123
- // Both .define() and .fromClass() are used across the editor modules.
124
- export const ViewPlugin = {
125
- define: () => ({}),
126
- fromClass: () => ({}),
127
- };
128
-
129
- // Decoration stub (used by link-wrap)
130
- export const Decoration = {
131
- mark: () => ({}),
132
- none: {},
133
- set: () => ({}),
134
- };
135
-
136
- /**
137
- * Noop replacement for CodeMirror's RangeSetBuilder.
138
- * Used by link-wrap to build decoration sets.
139
- */
140
- export class RangeSetBuilder {
141
- /**
142
- * Noop replacement for RangeSetBuilder.add().
143
- * @param {unknown} _from - Ignored
144
- * @param {unknown} _to - Ignored
145
- * @param {unknown} _value - Ignored
146
- * @return {void}
147
- */
148
- add(_from?: unknown, _to?: unknown, _value?: unknown) {}
149
-
150
- /**
151
- * Noop replacement for RangeSetBuilder.finish().
152
- * @return {Record<string, never>} Empty object standing in for a DecorationSet
153
- */
154
- finish() {
155
- return {};
156
- }
157
- }
158
-
159
- // EditorSelection stub (used by markdown-shortcuts)
160
- export const EditorSelection = {
161
- cursor: () => ({}),
162
- range: () => ({}),
163
- };
164
-
165
- // Tags stub — returns a proxy so any tag property access is valid
166
- export const tags = new Proxy(
167
- {},
168
- {
169
- get: () =>
170
- new Proxy(() => ({}), {
171
- get: () => () => ({}),
172
- apply: () => ({}),
173
- }),
174
- },
175
- );
176
-
177
- /**
178
- * Noop replacement for CodeMirror's syntaxTree function.
179
- * Used by link-wrap and markdown-shortcuts for AST traversal.
180
- * @return {{ cursor: Function }} Minimal tree stub
181
- */
182
- export function syntaxTree() {
183
- return { cursor: () => ({ next: () => false }) };
184
- }
185
-
186
- /**
187
- * Stub for url-utils isURL. Always returns false in the test environment.
188
- * @return {boolean} Always false
189
- */
190
- export function isURL() {
191
- return false;
192
- }
193
-
194
- /**
195
- * Stub type standing in for CodeMirror's KeyBinding interface.
196
- */
197
- export type KeyBinding = unknown;
package/tsconfig.json DELETED
@@ -1,19 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "strict": true,
4
- "target": "ESNext",
5
- "module": "ESNext",
6
- "moduleResolution": "bundler",
7
- "esModuleInterop": true,
8
- "resolveJsonModule": true,
9
- "isolatedModules": true,
10
- "declaration": true,
11
- "declarationMap": true,
12
- "sourceMap": true,
13
- "outDir": "dist",
14
- "rootDir": "src",
15
- "types": ["svelte", "vitest/globals"]
16
- },
17
- "include": ["src/**/*"],
18
- "exclude": ["node_modules", "dist", "playground", "tests"]
19
- }
package/vitest.config.ts DELETED
@@ -1,178 +0,0 @@
1
- import { existsSync } from 'fs';
2
- import { defineConfig } from 'vitest/config';
3
- import { svelte } from '@sveltejs/vite-plugin-svelte';
4
- import { playwright } from '@vitest/browser-playwright';
5
-
6
- // icons.css is generated by scripts/subset-icons.mjs and gitignored.
7
- // Stub it to an empty string in tests so they pass without generating the font.
8
- const iconsPath = new URL('src/client/css/icons.css', import.meta.url).pathname;
9
-
10
- /**
11
- * Vite plugin that stubs the generated icons.css import when the file doesn't exist.
12
- * This allows tests to run in CI or fresh clones without first running the subset script.
13
- * @return {import('vite').Plugin} The Vite plugin
14
- */
15
- function stubIconsCSS(): import('vite').Plugin {
16
- return {
17
- name: 'stub-icons-css',
18
- resolveId(id: string) {
19
- if (id.endsWith('css/icons.css') && !existsSync(iconsPath)) {
20
- return '\0stub-icons-css';
21
- }
22
- },
23
- load(id: string) {
24
- if (id === '\0stub-icons-css') return '';
25
- },
26
- };
27
- }
28
-
29
- export default defineConfig({
30
- test: {
31
- // Inline project definitions replace the separate vitest.workspace.ts file.
32
- // This keeps the config co-located with package.json so Vite's config
33
- // search stops here rather than walking up to the parent repo root.
34
- projects: [
35
- //////////////////////////////
36
- // Unit tests — Node.js environment (pure JS/TS, no DOM)
37
- //////////////////////////////
38
- {
39
- plugins: [svelte(), stubIconsCSS()],
40
- test: {
41
- name: 'unit',
42
- include: [
43
- 'tests/**/*.test.ts',
44
- '!tests/e2e/**',
45
- '!tests/**/*components*/**',
46
- ],
47
- setupFiles: ['tests/setup.ts'],
48
- coverage: {
49
- provider: 'v8',
50
- reportsDirectory: '.coverage',
51
- },
52
- },
53
- },
54
-
55
- //////////////////////////////
56
- // Component tests — jsdom environment (Svelte components via @testing-library/svelte)
57
- //////////////////////////////
58
- {
59
- plugins: [svelte(), stubIconsCSS()],
60
- // browser condition is required so Vite resolves Svelte's client-side
61
- // entry point instead of the SSR server entry, which does not have `mount`
62
- resolve: {
63
- conditions: ['browser'],
64
- // @codemirror/* and @lezer/* require a real browser DOM that jsdom cannot
65
- // provide. Redirect them to a stub so EditorPane (and its transitive
66
- // imports) can be loaded in the jsdom test environment.
67
- alias: [
68
- {
69
- find: /^@codemirror\/.+/,
70
- replacement: new URL('tests/stubs/codemirror.ts', import.meta.url)
71
- .pathname,
72
- },
73
- {
74
- find: /^@lezer\/.+/,
75
- replacement: new URL('tests/stubs/codemirror.ts', import.meta.url)
76
- .pathname,
77
- },
78
- ],
79
- },
80
- test: {
81
- name: 'components',
82
- environment: 'jsdom',
83
- include: ['tests/**/components/**/*.test.ts'],
84
- setupFiles: ['tests/setup.ts'],
85
- },
86
- },
87
-
88
- //////////////////////////////
89
- // Browser tests — Playwright via system Chrome
90
- //////////////////////////////
91
- {
92
- plugins: [
93
- svelte(),
94
- stubIconsCSS(),
95
- /*
96
- * Stub plugin that resolves virtual:nebula/* for the browser test
97
- * environment. The real virtual:nebula/* plugins are injected by the
98
- * Astro integration, which is not running during Vitest browser tests.
99
- * They are mocked in tests, but Vite's dependency scanner runs before
100
- * mocks are applied and would fail without a resolver.
101
- */
102
- {
103
- name: 'stub-virtual-modules',
104
- /**
105
- * Resolves virtual:nebula/* to internal stubs so Vite's dependency scanner doesn't fail before mocks apply.
106
- * @param {string} id - The module specifier to resolve
107
- * @return {string | undefined} The resolved internal ID, or undefined to skip
108
- */
109
- resolveId(id: string) {
110
- if (id === 'virtual:nebula/collections')
111
- return '\0virtual:nebula/collections';
112
- if (id === 'virtual:nebula/config')
113
- return '\0virtual:nebula/config';
114
- },
115
- /**
116
- * Provides stub module source for virtual:nebula/* modules.
117
- * @param {string} id - The internal module ID to load
118
- * @return {string | undefined} The module source code, or undefined to skip
119
- */
120
- load(id: string) {
121
- if (id === '\0virtual:nebula/collections')
122
- return 'export default {};';
123
- if (id === '\0virtual:nebula/config') {
124
- return 'export default { basePath: "/admin", collectionsPath: "/collections" };';
125
- }
126
- },
127
- },
128
- ],
129
- // Exclude @testing-library/svelte-core from pre-bundling so its
130
- // .svelte.js files go through the Svelte plugin's transform pipeline
131
- // (Vite pre-bundling skips plugin transforms, which leaves $state
132
- // runes uncompiled and causes ReferenceError at runtime).
133
- optimizeDeps: {
134
- exclude: ['@testing-library/svelte-core'],
135
- },
136
- // browser condition ensures Vite resolves Svelte's client-side entry
137
- // instead of the SSR server entry. @codemirror/* and @lezer/* are
138
- // stubbed because browser tests mock the editor — the same stub used
139
- // by component tests is reused here.
140
- resolve: {
141
- conditions: ['browser'],
142
- alias: [
143
- {
144
- find: /^@codemirror\/.+/,
145
- replacement: new URL('tests/stubs/codemirror.ts', import.meta.url)
146
- .pathname,
147
- },
148
- {
149
- find: /^@lezer\/.+/,
150
- replacement: new URL('tests/stubs/codemirror.ts', import.meta.url)
151
- .pathname,
152
- },
153
- ],
154
- },
155
- test: {
156
- name: 'browser',
157
- include: ['tests/e2e/**/*.test.ts'],
158
- browser: {
159
- enabled: true,
160
- headless: true,
161
- // Uses system Chrome via the 'chrome' channel to avoid downloading
162
- // a separate Chromium binary. CI adds --no-sandbox because most CI
163
- // containers lack the kernel namespace support sandboxing requires.
164
- provider: playwright({
165
- launchOptions: {
166
- channel: 'chrome',
167
- ...(process.env.CI
168
- ? { args: ['--no-sandbox', '--disable-setuid-sandbox'] }
169
- : {}),
170
- },
171
- }),
172
- instances: [{ browser: 'chromium' }],
173
- },
174
- },
175
- },
176
- ],
177
- },
178
- });
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes