canopycms 0.0.0 → 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (430) hide show
  1. package/package.json +2 -3
  2. package/dist/__integration__/fixtures/content-seeds.d.ts +0 -43
  3. package/dist/__integration__/fixtures/content-seeds.d.ts.map +0 -1
  4. package/dist/__integration__/fixtures/content-seeds.js +0 -99
  5. package/dist/__integration__/fixtures/content-seeds.js.map +0 -1
  6. package/dist/__integration__/fixtures/schemas.d.ts +0 -12
  7. package/dist/__integration__/fixtures/schemas.d.ts.map +0 -1
  8. package/dist/__integration__/fixtures/schemas.js +0 -65
  9. package/dist/__integration__/fixtures/schemas.js.map +0 -1
  10. package/dist/__integration__/test-utils/api-client.d.ts +0 -123
  11. package/dist/__integration__/test-utils/api-client.d.ts.map +0 -1
  12. package/dist/__integration__/test-utils/api-client.js +0 -118
  13. package/dist/__integration__/test-utils/api-client.js.map +0 -1
  14. package/dist/__integration__/test-utils/multi-user.d.ts +0 -25
  15. package/dist/__integration__/test-utils/multi-user.d.ts.map +0 -1
  16. package/dist/__integration__/test-utils/multi-user.js +0 -105
  17. package/dist/__integration__/test-utils/multi-user.js.map +0 -1
  18. package/dist/__integration__/test-utils/test-workspace.d.ts +0 -25
  19. package/dist/__integration__/test-utils/test-workspace.d.ts.map +0 -1
  20. package/dist/__integration__/test-utils/test-workspace.js +0 -102
  21. package/dist/__integration__/test-utils/test-workspace.js.map +0 -1
  22. package/dist/editor/BranchManager.stories.d.ts +0 -8
  23. package/dist/editor/BranchManager.stories.d.ts.map +0 -1
  24. package/dist/editor/BranchManager.stories.js +0 -74
  25. package/dist/editor/BranchManager.stories.js.map +0 -1
  26. package/dist/editor/CanopyEditor.stories.d.ts +0 -7
  27. package/dist/editor/CanopyEditor.stories.d.ts.map +0 -1
  28. package/dist/editor/CanopyEditor.stories.js +0 -99
  29. package/dist/editor/CanopyEditor.stories.js.map +0 -1
  30. package/dist/editor/CommentsPanel.stories.d.ts +0 -10
  31. package/dist/editor/CommentsPanel.stories.d.ts.map +0 -1
  32. package/dist/editor/CommentsPanel.stories.js +0 -175
  33. package/dist/editor/CommentsPanel.stories.js.map +0 -1
  34. package/dist/editor/Editor.stories.d.ts +0 -7
  35. package/dist/editor/Editor.stories.d.ts.map +0 -1
  36. package/dist/editor/Editor.stories.js +0 -95
  37. package/dist/editor/Editor.stories.js.map +0 -1
  38. package/dist/editor/EditorPanes.stories.d.ts +0 -7
  39. package/dist/editor/EditorPanes.stories.d.ts.map +0 -1
  40. package/dist/editor/EditorPanes.stories.js +0 -116
  41. package/dist/editor/EditorPanes.stories.js.map +0 -1
  42. package/dist/editor/EntryNavigator.stories.d.ts +0 -8
  43. package/dist/editor/EntryNavigator.stories.d.ts.map +0 -1
  44. package/dist/editor/EntryNavigator.stories.js +0 -42
  45. package/dist/editor/EntryNavigator.stories.js.map +0 -1
  46. package/dist/editor/FormRenderer.stories.d.ts +0 -7
  47. package/dist/editor/FormRenderer.stories.d.ts.map +0 -1
  48. package/dist/editor/FormRenderer.stories.js +0 -115
  49. package/dist/editor/FormRenderer.stories.js.map +0 -1
  50. package/dist/editor/GroupManager.stories.d.ts +0 -19
  51. package/dist/editor/GroupManager.stories.d.ts.map +0 -1
  52. package/dist/editor/GroupManager.stories.js +0 -265
  53. package/dist/editor/GroupManager.stories.js.map +0 -1
  54. package/dist/editor/PermissionManager.stories.d.ts +0 -20
  55. package/dist/editor/PermissionManager.stories.d.ts.map +0 -1
  56. package/dist/editor/PermissionManager.stories.js +0 -506
  57. package/dist/editor/PermissionManager.stories.js.map +0 -1
  58. package/dist/editor/comments/FieldWrapper.stories.d.ts +0 -10
  59. package/dist/editor/comments/FieldWrapper.stories.d.ts.map +0 -1
  60. package/dist/editor/comments/FieldWrapper.stories.js +0 -173
  61. package/dist/editor/comments/FieldWrapper.stories.js.map +0 -1
  62. package/dist/editor/fields/BlockField.stories.d.ts +0 -7
  63. package/dist/editor/fields/BlockField.stories.d.ts.map +0 -1
  64. package/dist/editor/fields/BlockField.stories.js +0 -50
  65. package/dist/editor/fields/BlockField.stories.js.map +0 -1
  66. package/dist/editor/fields/fields.stories.d.ts +0 -8
  67. package/dist/editor/fields/fields.stories.d.ts.map +0 -1
  68. package/dist/editor/fields/fields.stories.js +0 -34
  69. package/dist/editor/fields/fields.stories.js.map +0 -1
  70. package/dist/test-utils/api-test-helpers.d.ts +0 -238
  71. package/dist/test-utils/api-test-helpers.d.ts.map +0 -1
  72. package/dist/test-utils/api-test-helpers.js +0 -347
  73. package/dist/test-utils/api-test-helpers.js.map +0 -1
  74. package/dist/test-utils/console-spy.d.ts +0 -56
  75. package/dist/test-utils/console-spy.d.ts.map +0 -1
  76. package/dist/test-utils/console-spy.js +0 -81
  77. package/dist/test-utils/console-spy.js.map +0 -1
  78. package/dist/test-utils/git-helpers.d.ts +0 -21
  79. package/dist/test-utils/git-helpers.d.ts.map +0 -1
  80. package/dist/test-utils/git-helpers.js +0 -23
  81. package/dist/test-utils/git-helpers.js.map +0 -1
  82. package/dist/test-utils/index.d.ts +0 -5
  83. package/dist/test-utils/index.d.ts.map +0 -1
  84. package/dist/test-utils/index.js +0 -4
  85. package/dist/test-utils/index.js.map +0 -1
  86. package/src/__integration__/errors/invalid-content.test.ts +0 -238
  87. package/src/__integration__/errors/permission-denied.test.ts +0 -220
  88. package/src/__integration__/fixtures/content-seeds.ts +0 -105
  89. package/src/__integration__/fixtures/schemas.ts +0 -67
  90. package/src/__integration__/initialization/prod-sim-init.test.ts +0 -139
  91. package/src/__integration__/permissions/path-permissions.test.ts +0 -314
  92. package/src/__integration__/permissions/role-permissions.test.ts +0 -354
  93. package/src/__integration__/permissions/settings-branch-isolation.test.ts +0 -317
  94. package/src/__integration__/settings/groups-api.test.ts +0 -403
  95. package/src/__integration__/test-utils/api-client.ts +0 -167
  96. package/src/__integration__/test-utils/multi-user.ts +0 -129
  97. package/src/__integration__/test-utils/test-workspace.ts +0 -130
  98. package/src/__integration__/user/user-context.test.ts +0 -174
  99. package/src/__integration__/validation/input-validation.test.ts +0 -166
  100. package/src/__integration__/workflows/api-editing-workflow.test.ts +0 -244
  101. package/src/__integration__/workflows/conflict-resolution.test.ts +0 -259
  102. package/src/__integration__/workflows/editing-workflow.test.ts +0 -205
  103. package/src/__integration__/workflows/review-workflow.test.ts +0 -260
  104. package/src/ai/__tests__/build.integration.test.ts +0 -224
  105. package/src/ai/__tests__/generate.integration.test.ts +0 -495
  106. package/src/ai/__tests__/handler.integration.test.ts +0 -212
  107. package/src/ai/__tests__/json-to-markdown.test.ts +0 -553
  108. package/src/ai/generate.ts +0 -410
  109. package/src/ai/handler.ts +0 -123
  110. package/src/ai/index.ts +0 -26
  111. package/src/ai/json-to-markdown.ts +0 -424
  112. package/src/ai/resolve-branch.ts +0 -34
  113. package/src/ai/types.ts +0 -160
  114. package/src/api/AGENTS.md +0 -81
  115. package/src/api/__test__/mock-client.ts +0 -404
  116. package/src/api/assets.test.ts +0 -140
  117. package/src/api/assets.ts +0 -154
  118. package/src/api/branch-merge.test.ts +0 -163
  119. package/src/api/branch-merge.ts +0 -113
  120. package/src/api/branch-review.test.ts +0 -297
  121. package/src/api/branch-review.ts +0 -136
  122. package/src/api/branch-status.test.ts +0 -85
  123. package/src/api/branch-status.ts +0 -153
  124. package/src/api/branch-withdraw.test.ts +0 -146
  125. package/src/api/branch-withdraw.ts +0 -81
  126. package/src/api/branch-workflow.integration.test.ts +0 -578
  127. package/src/api/branch.test.ts +0 -620
  128. package/src/api/branch.ts +0 -492
  129. package/src/api/client.test.ts +0 -349
  130. package/src/api/client.ts +0 -506
  131. package/src/api/comments.test.ts +0 -285
  132. package/src/api/comments.ts +0 -210
  133. package/src/api/content.test.ts +0 -345
  134. package/src/api/content.ts +0 -454
  135. package/src/api/entries.test.ts +0 -1339
  136. package/src/api/entries.ts +0 -650
  137. package/src/api/github-sync.ts +0 -144
  138. package/src/api/groups.test.ts +0 -1013
  139. package/src/api/groups.ts +0 -375
  140. package/src/api/guards.test.ts +0 -533
  141. package/src/api/guards.ts +0 -271
  142. package/src/api/index.ts +0 -87
  143. package/src/api/permissions.test.ts +0 -766
  144. package/src/api/permissions.ts +0 -334
  145. package/src/api/reference-options.ts +0 -118
  146. package/src/api/resolve-references.ts +0 -107
  147. package/src/api/route-builder.ts +0 -289
  148. package/src/api/schema.test.ts +0 -840
  149. package/src/api/schema.ts +0 -936
  150. package/src/api/security.test.ts +0 -233
  151. package/src/api/settings-helpers.ts +0 -84
  152. package/src/api/types.ts +0 -40
  153. package/src/api/user.test.ts +0 -127
  154. package/src/api/user.ts +0 -42
  155. package/src/api/validators.test.ts +0 -275
  156. package/src/api/validators.ts +0 -176
  157. package/src/asset-store.test.ts +0 -37
  158. package/src/asset-store.ts +0 -110
  159. package/src/auth/cache.ts +0 -7
  160. package/src/auth/caching-auth-plugin.test.ts +0 -154
  161. package/src/auth/caching-auth-plugin.ts +0 -109
  162. package/src/auth/context-helpers.ts +0 -75
  163. package/src/auth/file-based-auth-cache.test.ts +0 -257
  164. package/src/auth/file-based-auth-cache.ts +0 -279
  165. package/src/auth/index.ts +0 -12
  166. package/src/auth/plugin.ts +0 -51
  167. package/src/auth/types.ts +0 -38
  168. package/src/authorization/__tests__/branch.test.ts +0 -260
  169. package/src/authorization/__tests__/content.test.ts +0 -142
  170. package/src/authorization/__tests__/path.test.ts +0 -133
  171. package/src/authorization/__tests__/permissions-loader.test.ts +0 -200
  172. package/src/authorization/branch.ts +0 -94
  173. package/src/authorization/content.ts +0 -93
  174. package/src/authorization/groups/index.ts +0 -11
  175. package/src/authorization/groups/loader.ts +0 -127
  176. package/src/authorization/groups/schema.ts +0 -48
  177. package/src/authorization/helpers.ts +0 -48
  178. package/src/authorization/index.ts +0 -84
  179. package/src/authorization/path.ts +0 -112
  180. package/src/authorization/permissions/index.ts +0 -11
  181. package/src/authorization/permissions/loader.ts +0 -116
  182. package/src/authorization/permissions/schema.ts +0 -66
  183. package/src/authorization/test-utils.ts +0 -15
  184. package/src/authorization/types.ts +0 -66
  185. package/src/authorization/validation.test.ts +0 -100
  186. package/src/authorization/validation.ts +0 -62
  187. package/src/branch-metadata.test.ts +0 -168
  188. package/src/branch-metadata.ts +0 -166
  189. package/src/branch-registry.test.ts +0 -248
  190. package/src/branch-registry.ts +0 -152
  191. package/src/branch-schema-cache.test.ts +0 -275
  192. package/src/branch-schema-cache.ts +0 -189
  193. package/src/branch-workspace.test.ts +0 -183
  194. package/src/branch-workspace.ts +0 -124
  195. package/src/build/generate-ai-content.ts +0 -78
  196. package/src/build/index.ts +0 -8
  197. package/src/build-mode.ts +0 -27
  198. package/src/cli/generate-ai-content.ts +0 -100
  199. package/src/cli/init.test.ts +0 -240
  200. package/src/cli/templates/Dockerfile.cms.template +0 -19
  201. package/src/cli/templates/canopy.ts.template +0 -55
  202. package/src/cli/templates/canopycms.config.ts.template +0 -11
  203. package/src/cli/templates/deploy-cms.yml.template +0 -27
  204. package/src/cli/templates/edit-page.tsx.template +0 -32
  205. package/src/cli/templates/route.ts.template +0 -12
  206. package/src/cli/templates/schemas.ts.template +0 -16
  207. package/src/cli/templates.ts +0 -47
  208. package/src/client.ts +0 -12
  209. package/src/comment-store.test.ts +0 -442
  210. package/src/comment-store.ts +0 -301
  211. package/src/config/__tests__/config.test.ts +0 -513
  212. package/src/config/flatten.ts +0 -174
  213. package/src/config/helpers.ts +0 -167
  214. package/src/config/index.ts +0 -86
  215. package/src/config/schemas/collection.ts +0 -67
  216. package/src/config/schemas/config.ts +0 -77
  217. package/src/config/schemas/field.ts +0 -108
  218. package/src/config/schemas/media.ts +0 -27
  219. package/src/config/schemas/permissions.ts +0 -21
  220. package/src/config/types.ts +0 -321
  221. package/src/config/validation.ts +0 -70
  222. package/src/config-test.ts +0 -65
  223. package/src/config.ts +0 -11
  224. package/src/content-id-index.test.ts +0 -512
  225. package/src/content-id-index.ts +0 -479
  226. package/src/content-reader.test.ts +0 -478
  227. package/src/content-reader.ts +0 -214
  228. package/src/content-store.test.ts +0 -1126
  229. package/src/content-store.ts +0 -793
  230. package/src/context.ts +0 -111
  231. package/src/editor/BranchManager.stories.tsx +0 -80
  232. package/src/editor/BranchManager.test.tsx +0 -324
  233. package/src/editor/BranchManager.tsx +0 -461
  234. package/src/editor/CanopyEditor.stories.tsx +0 -128
  235. package/src/editor/CanopyEditor.test.tsx +0 -81
  236. package/src/editor/CanopyEditor.tsx +0 -73
  237. package/src/editor/CanopyEditorPage.test.tsx +0 -59
  238. package/src/editor/CanopyEditorPage.tsx +0 -25
  239. package/src/editor/CommentsPanel.stories.tsx +0 -184
  240. package/src/editor/CommentsPanel.tsx +0 -338
  241. package/src/editor/Editor.integration.test.tsx +0 -227
  242. package/src/editor/Editor.stories.tsx +0 -119
  243. package/src/editor/Editor.tsx +0 -1221
  244. package/src/editor/EditorPanes.stories.tsx +0 -256
  245. package/src/editor/EditorPanes.test.tsx +0 -77
  246. package/src/editor/EditorPanes.tsx +0 -180
  247. package/src/editor/EntryNavigator.stories.tsx +0 -65
  248. package/src/editor/EntryNavigator.test.tsx +0 -598
  249. package/src/editor/EntryNavigator.tsx +0 -665
  250. package/src/editor/FormRenderer.stories.tsx +0 -212
  251. package/src/editor/FormRenderer.test.tsx +0 -194
  252. package/src/editor/FormRenderer.tsx +0 -432
  253. package/src/editor/GroupManager.stories.tsx +0 -301
  254. package/src/editor/GroupManager.test.tsx +0 -682
  255. package/src/editor/GroupManager.tsx +0 -9
  256. package/src/editor/PermissionManager.stories.tsx +0 -539
  257. package/src/editor/PermissionManager.test.tsx +0 -864
  258. package/src/editor/PermissionManager.tsx +0 -12
  259. package/src/editor/canopy-path.test.ts +0 -23
  260. package/src/editor/canopy-path.ts +0 -52
  261. package/src/editor/client-reference-resolver.ts +0 -118
  262. package/src/editor/comments/BranchComments.tsx +0 -93
  263. package/src/editor/comments/EntryComments.tsx +0 -94
  264. package/src/editor/comments/FieldWrapper.stories.tsx +0 -210
  265. package/src/editor/comments/FieldWrapper.tsx +0 -129
  266. package/src/editor/comments/InlineCommentThread.test.tsx +0 -384
  267. package/src/editor/comments/InlineCommentThread.tsx +0 -246
  268. package/src/editor/comments/ThreadCarousel.test.tsx +0 -393
  269. package/src/editor/comments/ThreadCarousel.tsx +0 -525
  270. package/src/editor/components/ConfirmDeleteModal.tsx +0 -49
  271. package/src/editor/components/EditorContext.tsx +0 -49
  272. package/src/editor/components/EditorFooter.tsx +0 -47
  273. package/src/editor/components/EditorHeader.tsx +0 -492
  274. package/src/editor/components/EditorSidebar.tsx +0 -193
  275. package/src/editor/components/EntryCreateModal.tsx +0 -193
  276. package/src/editor/components/RenameEntryModal.tsx +0 -152
  277. package/src/editor/components/UserBadge.test.tsx +0 -274
  278. package/src/editor/components/UserBadge.tsx +0 -240
  279. package/src/editor/components/index.ts +0 -6
  280. package/src/editor/context/ApiClientContext.tsx +0 -56
  281. package/src/editor/context/EditorStateContext.tsx +0 -221
  282. package/src/editor/context/index.ts +0 -40
  283. package/src/editor/editor-config.test.ts +0 -385
  284. package/src/editor/editor-config.ts +0 -94
  285. package/src/editor/editor-utils.test.ts +0 -772
  286. package/src/editor/editor-utils.ts +0 -303
  287. package/src/editor/env.ts +0 -4
  288. package/src/editor/fields/BlockField.stories.tsx +0 -79
  289. package/src/editor/fields/BlockField.tsx +0 -267
  290. package/src/editor/fields/CodeField.tsx +0 -41
  291. package/src/editor/fields/MarkdownField.tsx +0 -205
  292. package/src/editor/fields/ObjectField.tsx +0 -71
  293. package/src/editor/fields/ReferenceField.tsx +0 -138
  294. package/src/editor/fields/SelectField.tsx +0 -76
  295. package/src/editor/fields/TextField.tsx +0 -35
  296. package/src/editor/fields/ToggleField.tsx +0 -37
  297. package/src/editor/fields/fields.stories.tsx +0 -40
  298. package/src/editor/group-manager/ExternalGroupsTab.tsx +0 -114
  299. package/src/editor/group-manager/GroupCard.tsx +0 -102
  300. package/src/editor/group-manager/GroupForm.tsx +0 -66
  301. package/src/editor/group-manager/InternalGroupsTab.tsx +0 -147
  302. package/src/editor/group-manager/MemberList.tsx +0 -184
  303. package/src/editor/group-manager/hooks/useExternalGroupSearch.ts +0 -63
  304. package/src/editor/group-manager/hooks/useGroupState.ts +0 -134
  305. package/src/editor/group-manager/hooks/useUserSearch.ts +0 -84
  306. package/src/editor/group-manager/index.tsx +0 -210
  307. package/src/editor/group-manager/types.ts +0 -28
  308. package/src/editor/hooks/README.md +0 -26
  309. package/src/editor/hooks/__test__/test-utils.tsx +0 -183
  310. package/src/editor/hooks/index.ts +0 -23
  311. package/src/editor/hooks/useBranchActions.test.tsx +0 -267
  312. package/src/editor/hooks/useBranchActions.tsx +0 -121
  313. package/src/editor/hooks/useBranchManager.test.tsx +0 -391
  314. package/src/editor/hooks/useBranchManager.tsx +0 -326
  315. package/src/editor/hooks/useCommentSystem.test.ts +0 -615
  316. package/src/editor/hooks/useCommentSystem.ts +0 -347
  317. package/src/editor/hooks/useDraftManager.test.ts +0 -375
  318. package/src/editor/hooks/useDraftManager.ts +0 -259
  319. package/src/editor/hooks/useEditorLayout.test.ts +0 -147
  320. package/src/editor/hooks/useEditorLayout.ts +0 -67
  321. package/src/editor/hooks/useEntryManager.test.ts +0 -588
  322. package/src/editor/hooks/useEntryManager.ts +0 -387
  323. package/src/editor/hooks/useGroupManager.test.ts +0 -277
  324. package/src/editor/hooks/useGroupManager.ts +0 -139
  325. package/src/editor/hooks/usePermissionManager.test.ts +0 -211
  326. package/src/editor/hooks/usePermissionManager.ts +0 -113
  327. package/src/editor/hooks/useReferenceResolution.ts +0 -248
  328. package/src/editor/hooks/useSchemaManager.test.ts +0 -370
  329. package/src/editor/hooks/useSchemaManager.ts +0 -310
  330. package/src/editor/hooks/useUserContext.tsx +0 -57
  331. package/src/editor/hooks/useUserMetadata.test.ts +0 -191
  332. package/src/editor/hooks/useUserMetadata.ts +0 -71
  333. package/src/editor/permission-manager/GroupSelector.tsx +0 -73
  334. package/src/editor/permission-manager/PermissionEditor.tsx +0 -321
  335. package/src/editor/permission-manager/PermissionLevelBadge.tsx +0 -53
  336. package/src/editor/permission-manager/PermissionTree.tsx +0 -237
  337. package/src/editor/permission-manager/UserSelector.tsx +0 -95
  338. package/src/editor/permission-manager/constants.tsx +0 -18
  339. package/src/editor/permission-manager/hooks/useGroupsAndUsers.ts +0 -153
  340. package/src/editor/permission-manager/hooks/usePermissionTree.ts +0 -200
  341. package/src/editor/permission-manager/index.tsx +0 -294
  342. package/src/editor/permission-manager/types.ts +0 -58
  343. package/src/editor/permission-manager/utils.ts +0 -179
  344. package/src/editor/preview-bridge.test.tsx +0 -50
  345. package/src/editor/preview-bridge.tsx +0 -294
  346. package/src/editor/schema-editor/CollectionEditor.test.tsx +0 -238
  347. package/src/editor/schema-editor/CollectionEditor.tsx +0 -520
  348. package/src/editor/schema-editor/EntryTypeEditor.test.tsx +0 -215
  349. package/src/editor/schema-editor/EntryTypeEditor.tsx +0 -367
  350. package/src/editor/schema-editor/index.ts +0 -19
  351. package/src/editor/setup-test-dom.ts +0 -10
  352. package/src/editor/test-setup.ts +0 -33
  353. package/src/editor/theme.tsx +0 -119
  354. package/src/editor/utils/env.ts +0 -39
  355. package/src/entry-schema-registry.test.ts +0 -281
  356. package/src/entry-schema-registry.ts +0 -121
  357. package/src/entry-schema.ts +0 -84
  358. package/src/git-manager.test.ts +0 -552
  359. package/src/git-manager.ts +0 -667
  360. package/src/github-service.test.ts +0 -312
  361. package/src/github-service.ts +0 -295
  362. package/src/http/handler.test.ts +0 -275
  363. package/src/http/handler.ts +0 -280
  364. package/src/http/index.ts +0 -11
  365. package/src/http/router.ts +0 -164
  366. package/src/http/types.ts +0 -44
  367. package/src/id.test.ts +0 -48
  368. package/src/id.ts +0 -22
  369. package/src/index.ts +0 -26
  370. package/src/operating-mode/__tests__/strategies.test.ts +0 -511
  371. package/src/operating-mode/client-safe-strategy.ts +0 -184
  372. package/src/operating-mode/client-unsafe-strategy.ts +0 -303
  373. package/src/operating-mode/client.ts +0 -13
  374. package/src/operating-mode/index.ts +0 -34
  375. package/src/operating-mode/types.ts +0 -186
  376. package/src/paths/__tests__/branch.test.ts +0 -53
  377. package/src/paths/__tests__/normalize.test.ts +0 -141
  378. package/src/paths/__tests__/resolve.test.ts +0 -207
  379. package/src/paths/__tests__/validation.test.ts +0 -61
  380. package/src/paths/branch.ts +0 -115
  381. package/src/paths/index.ts +0 -73
  382. package/src/paths/normalize-server.ts +0 -40
  383. package/src/paths/normalize.ts +0 -107
  384. package/src/paths/resolve.ts +0 -61
  385. package/src/paths/test-utils.ts +0 -37
  386. package/src/paths/types.ts +0 -68
  387. package/src/paths/validation.test.ts +0 -480
  388. package/src/paths/validation.ts +0 -391
  389. package/src/reference-resolver.test.ts +0 -107
  390. package/src/reference-resolver.ts +0 -157
  391. package/src/schema/index.ts +0 -29
  392. package/src/schema/meta-loader.ts +0 -366
  393. package/src/schema/resolver.ts +0 -83
  394. package/src/schema/schema-store-types.ts +0 -56
  395. package/src/schema/schema-store.test.ts +0 -816
  396. package/src/schema/schema-store.ts +0 -795
  397. package/src/schema/types.ts +0 -33
  398. package/src/schema-meta-loader.test.ts +0 -447
  399. package/src/server.ts +0 -15
  400. package/src/services.test.ts +0 -559
  401. package/src/services.ts +0 -373
  402. package/src/settings-branch-utils.ts +0 -53
  403. package/src/settings-workspace.ts +0 -156
  404. package/src/task-queue/README.md +0 -144
  405. package/src/task-queue/index.ts +0 -14
  406. package/src/task-queue/task-queue.test.ts +0 -524
  407. package/src/task-queue/task-queue.ts +0 -514
  408. package/src/task-queue/types.ts +0 -41
  409. package/src/test-utils/api-test-helpers.ts +0 -445
  410. package/src/test-utils/console-spy.test.ts +0 -14
  411. package/src/test-utils/console-spy.ts +0 -125
  412. package/src/test-utils/git-helpers.ts +0 -31
  413. package/src/test-utils/index.ts +0 -4
  414. package/src/types.ts +0 -54
  415. package/src/user.ts +0 -118
  416. package/src/utils/debug.test.ts +0 -114
  417. package/src/utils/debug.ts +0 -127
  418. package/src/utils/error.test.ts +0 -92
  419. package/src/utils/error.ts +0 -83
  420. package/src/utils/format.ts +0 -12
  421. package/src/validation/__tests__/field-traversal.test.ts +0 -263
  422. package/src/validation/deletion-checker.ts +0 -234
  423. package/src/validation/field-traversal.ts +0 -146
  424. package/src/validation/reference-validator.ts +0 -168
  425. package/src/worker/cms-worker-rebase.test.ts +0 -473
  426. package/src/worker/cms-worker.ts +0 -777
  427. package/src/worker/integration.test.ts +0 -289
  428. package/src/worker/task-queue-config.ts +0 -25
  429. package/src/worker/task-queue.test.ts +0 -452
  430. package/src/worker/task-queue.ts +0 -58
@@ -1,95 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { useState } from 'react';
3
- import { Editor } from './Editor';
4
- import { unsafeAsLogicalPath, unsafeAsContentId } from '../paths/test-utils';
5
- const meta = {
6
- title: 'Editor/Editor',
7
- component: Editor,
8
- };
9
- export default meta;
10
- const homeFields = [
11
- {
12
- name: 'hero',
13
- type: 'object',
14
- label: 'Hero',
15
- fields: [
16
- { name: 'title', type: 'string', label: 'Title' },
17
- { name: 'body', type: 'markdown', label: 'Body' },
18
- ],
19
- },
20
- ];
21
- const postFields = [
22
- { name: 'title', type: 'string', label: 'Title' },
23
- { name: 'body', type: 'markdown', label: 'Body' },
24
- ];
25
- const baseEntries = [
26
- {
27
- path: unsafeAsLogicalPath('home'),
28
- label: 'Home',
29
- status: 'page',
30
- schema: homeFields,
31
- apiPath: '/api/canopycms/main/content/home',
32
- previewSrc: '/',
33
- collectionPath: unsafeAsLogicalPath('home'),
34
- collectionName: 'home',
35
- format: 'json',
36
- type: 'entry',
37
- contentId: unsafeAsContentId('test123456789'),
38
- },
39
- {
40
- path: unsafeAsLogicalPath('posts/hello-world'),
41
- label: 'Hello World',
42
- status: 'draft',
43
- schema: postFields,
44
- apiPath: '/api/canopycms/main/content/posts/hello-world',
45
- previewSrc: '/posts/hello-world',
46
- collectionPath: unsafeAsLogicalPath('posts'),
47
- collectionName: 'posts',
48
- format: 'json',
49
- type: 'entry',
50
- contentId: unsafeAsContentId('abc987XYZ654'),
51
- },
52
- ];
53
- export const WithCollections = {
54
- render: () => {
55
- const [entries, setEntries] = useState(baseEntries);
56
- const collections = [
57
- {
58
- path: unsafeAsLogicalPath('home'),
59
- name: 'home',
60
- label: 'Home',
61
- format: 'json',
62
- type: 'entry',
63
- },
64
- {
65
- path: unsafeAsLogicalPath('posts'),
66
- name: 'posts',
67
- label: 'Posts',
68
- format: 'json',
69
- type: 'collection',
70
- },
71
- ];
72
- const handleCreateEntry = (collectionPath) => {
73
- const slug = window.prompt(`New ${collectionPath} slug?`, 'new-post');
74
- if (!slug)
75
- return;
76
- const newEntry = {
77
- path: unsafeAsLogicalPath(`${collectionPath}/${slug}`),
78
- label: slug,
79
- status: 'draft',
80
- schema: collectionPath === 'home' ? homeFields : postFields,
81
- apiPath: `/api/canopycms/main/content/${collectionPath}/${slug}`,
82
- previewSrc: collectionPath === 'posts' ? `/posts/${slug}` : '/',
83
- collectionPath,
84
- collectionName: collectionPath,
85
- slug,
86
- format: 'json',
87
- type: collectionPath === 'home' ? 'entry' : 'entry',
88
- contentId: unsafeAsContentId(`new${Date.now()}`),
89
- };
90
- setEntries((prev) => [...prev, newEntry]);
91
- };
92
- return (_jsx("div", { className: "h-[90vh] bg-gray-50", children: _jsx(Editor, { entries: entries, title: "CanopyCMS Editor", subtitle: "Schema-driven editing with preview", branchName: "story/branch", collections: collections, initialSelectedId: entries[0]?.path, onCreateEntry: handleCreateEntry, operatingMode: "dev" }) }));
93
- },
94
- };
95
- //# sourceMappingURL=Editor.stories.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Editor.stories.js","sourceRoot":"","sources":["../../src/editor/Editor.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAKhC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAE5E,MAAM,IAAI,GAAwB;IAChC,KAAK,EAAE,eAA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C,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO;gBACnD,SAAS,EAAE,iBAAiB,CAAC,MAAM,IAAI,CAAC,GAAG,EAAE,EAAE,CAAC;aACjD,CAAA;YACD,UAAU,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,GAAG,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAA;QAC3C,CAAC,CAAA;QAED,OAAO,CACL,cAAK,SAAS,EAAC,qBAAqB,YAClC,KAAC,MAAM,IACL,OAAO,EAAE,OAAO,EAChB,KAAK,EAAC,kBAAkB,EACxB,QAAQ,EAAC,oCAAoC,EAC7C,UAAU,EAAC,cAAc,EACzB,WAAW,EAAE,WAAW,EACxB,iBAAiB,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,IAAI,EACnC,aAAa,EAAE,iBAAiB,EAChC,aAAa,EAAC,KAAK,GACnB,GACE,CACP,CAAA;IACH,CAAC;CACF,CAAA"}
@@ -1,7 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
- import { EditorPanes } from './EditorPanes';
3
- declare const meta: Meta<typeof EditorPanes>;
4
- export default meta;
5
- type Story = StoryObj<typeof EditorPanes>;
6
- export declare const Default: Story;
7
- //# sourceMappingURL=EditorPanes.stories.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"EditorPanes.stories.d.ts","sourceRoot":"","sources":["../../src/editor/EditorPanes.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAMtD,OAAO,EAAE,WAAW,EAAmB,MAAM,eAAe,CAAA;AAG5D,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,WAAW,CAMlC,CAAA;AAED,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,WAAW,CAAC,CAAA;AAyLzC,eAAO,MAAM,OAAO,EAAE,KAoDrB,CAAA"}
@@ -1,116 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useMemo, useState } from 'react';
3
- import { Badge, Box, Group, Paper, SegmentedControl, Stack, Text, Title } from '@mantine/core';
4
- import { EditorPanes } from './EditorPanes';
5
- import { FormRenderer } from './FormRenderer';
6
- const meta = {
7
- title: 'Editor/EditorPanes',
8
- component: EditorPanes,
9
- parameters: {
10
- layout: 'fullscreen',
11
- },
12
- };
13
- export default meta;
14
- const authors = [
15
- { id: 'authors/alice', name: 'Alice' },
16
- { id: 'authors/bob', name: 'Bob' },
17
- ];
18
- const postSchema = [
19
- { name: 'title', type: 'string', label: 'Title' },
20
- {
21
- name: 'author',
22
- type: 'reference',
23
- label: 'Author',
24
- options: authors.map((a) => ({ label: a.name, value: a.id })),
25
- required: true,
26
- },
27
- {
28
- name: 'tags',
29
- type: 'select',
30
- label: 'Tags',
31
- list: true,
32
- options: ['typed', 'fast', 'lambda-friendly'],
33
- },
34
- { name: 'published', type: 'boolean', label: 'Published' },
35
- { name: 'body', type: 'mdx', label: 'Body' },
36
- {
37
- name: 'seo',
38
- type: 'object',
39
- label: 'SEO',
40
- fields: [
41
- { name: 'title', type: 'string', label: 'Meta title' },
42
- { name: 'description', type: 'string', label: 'Meta description' },
43
- ],
44
- },
45
- {
46
- name: 'features',
47
- type: 'object',
48
- label: 'Key features',
49
- list: true,
50
- fields: [
51
- { name: 'title', type: 'string' },
52
- { name: 'description', type: 'string' },
53
- ],
54
- },
55
- {
56
- name: 'blocks',
57
- type: 'block',
58
- templates: [
59
- {
60
- name: 'hero',
61
- label: 'Hero',
62
- fields: [
63
- { name: 'headline', type: 'string' },
64
- { name: 'body', type: 'markdown' },
65
- ],
66
- },
67
- {
68
- name: 'cta',
69
- label: 'CTA',
70
- fields: [
71
- { name: 'title', type: 'string' },
72
- { name: 'ctaText', type: 'string' },
73
- ],
74
- },
75
- ],
76
- },
77
- ];
78
- const initialPost = {
79
- slug: 'hello-world',
80
- title: 'Hello World',
81
- author: 'authors/alice',
82
- tags: ['typed', 'fast'],
83
- published: false,
84
- body: 'Some **MDX** content that mirrors another example.',
85
- seo: {
86
- title: 'Hello World | CanopyCMS',
87
- description: 'Welcome to the demo story.',
88
- },
89
- features: [
90
- { title: 'Fast', description: 'Built for speed' },
91
- { title: 'Typed', description: 'Type-safe content' },
92
- ],
93
- blocks: [
94
- { template: 'hero', value: { headline: 'Hero block', body: 'Hero copy' } },
95
- { template: 'cta', value: { title: 'Try CanopyCMS', ctaText: 'Click me' } },
96
- ],
97
- };
98
- const PostPreview = ({ post, authorName }) => (_jsxs(Stack, { gap: "sm", children: [_jsxs(Group, { gap: "xs", align: "center", children: [_jsx(Title, { order: 3, fw: 700, children: post.title }), _jsx(Badge, { color: post.published ? 'green' : 'yellow', variant: "light", children: post.published ? 'Published' : 'Draft' })] }), _jsxs(Group, { gap: "xs", children: [_jsxs(Text, { size: "sm", c: "dimmed", children: ["Author: ", authorName ?? 'Unknown'] }), post.tags.map((tag) => (_jsx(Badge, { color: "brand", variant: "outline", children: tag }, tag)))] }), _jsx(Text, { size: "sm", style: { whiteSpace: 'pre-wrap' }, children: post.body || 'Body will render here.' }), post.blocks.length > 0 && (_jsx(Stack, { gap: "sm", children: post.blocks.map((block, idx) => {
99
- if (block.template === 'hero') {
100
- return (_jsxs(Paper, { withBorder: true, radius: "md", p: "md", shadow: "xs", children: [_jsx(Text, { fw: 600, size: "sm", c: "dimmed", children: "Hero block" }), _jsx(Text, { fw: 600, children: block.value.headline }), _jsx(Text, { size: "sm", c: "dimmed", children: block.value.body ?? 'Hero body copy' })] }, `${block.template}-${idx}`));
101
- }
102
- const cta = block.value;
103
- return (_jsxs(Paper, { withBorder: true, radius: "md", p: "md", shadow: "xs", children: [_jsx(Text, { fw: 600, size: "sm", c: "dimmed", children: "Call to action" }), _jsx(Text, { fw: 600, children: cta.title }), _jsx(Text, { size: "sm", c: "dimmed", children: cta.ctaText ?? 'CTA copy' })] }, `${block.template}-${idx}`));
104
- }) })), post.features.length > 0 && (_jsxs(Stack, { gap: 6, children: [_jsx(Text, { size: "xs", fw: 600, c: "dimmed", children: "Features" }), _jsx(Stack, { gap: 6, children: post.features.map((feat, idx) => (_jsxs(Paper, { withBorder: true, radius: "md", p: "sm", children: [_jsx(Text, { size: "sm", fw: 600, children: feat.title }), _jsx(Text, { size: "sm", c: "dimmed", children: feat.description })] }, `${feat.title}-${idx}`))) })] }))] }));
105
- export const Default = {
106
- render: () => {
107
- const [layout, setLayout] = useState('side');
108
- const [post, setPost] = useState(initialPost);
109
- const authorMap = useMemo(() => Object.fromEntries(authors.map((a) => [a.id, a.name])), []);
110
- return (_jsx(Box, { style: { height: '90vh' }, children: _jsxs(Stack, { gap: "sm", h: "100%", children: [_jsxs(Group, { justify: "space-between", align: "center", children: [_jsx(Stack, { gap: 2, children: _jsx(Text, { size: "xs", c: "dimmed", children: "Form fields on the right mirror what CanopyCMS renders in apps. Toggle layout to simulate responsive editor panes." }) }), _jsx(SegmentedControl, { size: "xs", radius: "md", data: [
111
- { value: 'side', label: 'Side by side' },
112
- { value: 'stacked', label: 'Stacked' },
113
- ], value: layout, onChange: (value) => setLayout(value) })] }), _jsx(EditorPanes, { onLayoutChange: setLayout, layout: layout, preview: _jsx(Box, { p: "lg", bg: "gray.0", h: "100%", children: _jsx(PostPreview, { post: post, authorName: authorMap[post.author] }) }), form: _jsx(Box, { p: "lg", children: _jsx(FormRenderer, { fields: postSchema, value: post, onChange: (value) => setPost(value) }) }) })] }) }));
114
- },
115
- };
116
- //# sourceMappingURL=EditorPanes.stories.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"EditorPanes.stories.js","sourceRoot":"","sources":["../../src/editor/EditorPanes.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAEzC,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAE,IAAI,EAA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,CACP,CAAA;IACH,CAAC;CACF,CAAA"}
@@ -1,8 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
- import { EntryNavigator } from './EntryNavigator';
3
- declare const meta: Meta<typeof EntryNavigator>;
4
- export default meta;
5
- type Story = StoryObj<typeof EntryNavigator>;
6
- export declare const Grouped: Story;
7
- export declare const FlatList: Story;
8
- //# sourceMappingURL=EntryNavigator.stories.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"EntryNavigator.stories.d.ts","sourceRoot":"","sources":["../../src/editor/EntryNavigator.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAEtD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAGjD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,cAAc,CAGrC,CAAA;AAED,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,cAAc,CAAC,CAAA;AAiB5C,eAAO,MAAM,OAAO,EAAE,KAwBrB,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,KAUtB,CAAA"}
@@ -1,42 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { EntryNavigator } from './EntryNavigator';
3
- import { unsafeAsLogicalPath } from '../paths/test-utils';
4
- const meta = {
5
- title: 'Editor/EntryNavigator',
6
- component: EntryNavigator,
7
- };
8
- export default meta;
9
- const posts = [
10
- {
11
- path: unsafeAsLogicalPath('posts/hello-world'),
12
- label: 'Hello World',
13
- collection: 'posts',
14
- },
15
- {
16
- path: unsafeAsLogicalPath('posts/mermaid-demo'),
17
- label: 'Mermaid Demo',
18
- collection: 'posts',
19
- },
20
- ];
21
- const entries = [{ path: unsafeAsLogicalPath('home'), label: 'Home', collection: 'home' }];
22
- export const Grouped = {
23
- render: () => (_jsx("div", { className: "w-80", children: _jsx(EntryNavigator, { selectedPath: "posts/hello-world", onSelect: (id) => alert(`Select ${id}`), collections: [
24
- {
25
- path: unsafeAsLogicalPath('home'),
26
- label: 'Home',
27
- type: 'entry',
28
- entries: entries,
29
- },
30
- {
31
- path: unsafeAsLogicalPath('posts'),
32
- label: 'Posts',
33
- type: 'collection',
34
- entries: posts,
35
- onAdd: () => alert('Add post'),
36
- },
37
- ] }) })),
38
- };
39
- export const FlatList = {
40
- render: () => (_jsx("div", { className: "w-80", children: _jsx(EntryNavigator, { items: [...entries, ...posts], selectedPath: "home", onSelect: (id) => alert(`Select ${id}`) }) })),
41
- };
42
- //# sourceMappingURL=EntryNavigator.stories.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"EntryNavigator.stories.js","sourceRoot":"","sources":["../../src/editor/EntryNavigator.stories.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAEzD,MAAM,IAAI,GAAgC;IACxC,KAAK,EAAE,uBAAuB;IAC9B,SAAS,EAAE,cAAc;CAC1B,CAAA;AAED,eAAe,IAAI,CAAA;AAGnB,MAAM,KAAK,GAAG;IACZ;QACE,IAAI,EAAE,mBAAmB,CAAC,mBAAmB,CAAC;QAC9C,KAAK,EAAE,aAAa;QACpB,UAAU,EAAE,OAAO;KACpB;IACD;QACE,IAAI,EAAE,mBAAmB,CAAC,oBAAoB,CAAC;QAC/C,KAAK,EAAE,cAAc;QACrB,UAAU,EAAE,OAAO;KACpB;CACF,CAAA;AAED,MAAM,OAAO,GAAG,CAAC,EAAE,IAAI,EAAE,mBAAmB,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC,CAAA;AAE1F,MAAM,CAAC,MAAM,OAAO,GAAU;IAC5B,MAAM,EAAE,GAAG,EAAE,CAAC,CACZ,cAAK,SAAS,EAAC,MAAM,YACnB,KAAC,cAAc,IACb,YAAY,EAAC,mBAAmB,EAChC,QAAQ,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,KAAK,CAAC,UAAU,EAAE,EAAE,CAAC,EACvC,WAAW,EAAE;gBACX;oBACE,IAAI,EAAE,mBAAmB,CAAC,MAAM,CAAC;oBACjC,KAAK,EAAE,MAAM;oBACb,IAAI,EAAE,OAAO;oBACb,OAAO,EAAE,OAAO;iBACjB;gBACD;oBACE,IAAI,EAAE,mBAAmB,CAAC,OAAO,CAAC;oBAClC,KAAK,EAAE,OAAO;oBACd,IAAI,EAAE,YAAY;oBAClB,OAAO,EAAE,KAAK;oBACd,KAAK,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC;iBAC/B;aACF,GACD,GACE,CACP;CACF,CAAA;AAED,MAAM,CAAC,MAAM,QAAQ,GAAU;IAC7B,MAAM,EAAE,GAAG,EAAE,CAAC,CACZ,cAAK,SAAS,EAAC,MAAM,YACnB,KAAC,cAAc,IACb,KAAK,EAAE,CAAC,GAAG,OAAO,EAAE,GAAG,KAAK,CAAC,EAC7B,YAAY,EAAC,MAAM,EACnB,QAAQ,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,KAAK,CAAC,UAAU,EAAE,EAAE,CAAC,GACvC,GACE,CACP;CACF,CAAA"}
@@ -1,7 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
- import { FormRenderer } from './FormRenderer';
3
- declare const meta: Meta<typeof FormRenderer>;
4
- export default meta;
5
- type Story = StoryObj<typeof FormRenderer>;
6
- export declare const Default: Story;
7
- //# sourceMappingURL=FormRenderer.stories.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FormRenderer.stories.d.ts","sourceRoot":"","sources":["../../src/editor/FormRenderer.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAItD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAqB7C,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,YAAY,CAGnC,CAAA;AAED,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,YAAY,CAAC,CAAA;AA6I1C,eAAO,MAAM,OAAO,EAAE,KAuCrB,CAAA"}
@@ -1,115 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useMemo, useState } from 'react';
3
- import { FormRenderer } from './FormRenderer';
4
- const meta = {
5
- title: 'Editor/FormRenderer',
6
- component: FormRenderer,
7
- };
8
- export default meta;
9
- const authors = [
10
- { id: 'authors/alice', name: 'Alice' },
11
- { id: 'authors/bob', name: 'Bob' },
12
- ];
13
- const postSchema = [
14
- { name: 'title', type: 'string', label: 'Title' },
15
- {
16
- name: 'author',
17
- type: 'reference',
18
- label: 'Author',
19
- options: authors.map((a) => ({ label: a.name, value: a.id })),
20
- required: true,
21
- },
22
- {
23
- name: 'tags',
24
- type: 'select',
25
- label: 'Tags',
26
- list: true,
27
- options: ['typed', 'fast', 'lambda-friendly'],
28
- },
29
- { name: 'published', type: 'boolean', label: 'Published' },
30
- { name: 'body', type: 'mdx', label: 'Body' },
31
- {
32
- name: 'seo',
33
- type: 'object',
34
- label: 'SEO',
35
- fields: [
36
- { name: 'title', type: 'string', label: 'Meta title' },
37
- { name: 'description', type: 'string', label: 'Meta description' },
38
- ],
39
- },
40
- {
41
- name: 'features',
42
- type: 'object',
43
- label: 'Key features',
44
- list: true,
45
- fields: [
46
- { name: 'title', type: 'string' },
47
- { name: 'description', type: 'string' },
48
- ],
49
- },
50
- {
51
- name: 'blocks',
52
- type: 'block',
53
- templates: [
54
- {
55
- name: 'hero',
56
- label: 'Hero',
57
- fields: [
58
- { name: 'headline', type: 'string' },
59
- { name: 'body', type: 'markdown' },
60
- ],
61
- },
62
- {
63
- name: 'cta',
64
- label: 'CTA',
65
- fields: [
66
- { name: 'title', type: 'string' },
67
- { name: 'ctaText', type: 'string' },
68
- ],
69
- },
70
- ],
71
- },
72
- ];
73
- const Preview = ({ value }) => {
74
- const authorMap = useMemo(() => Object.fromEntries(authors.map((a) => [a.id, a.name])), []);
75
- return (_jsxs("div", { className: "flex flex-col gap-3 rounded border border-gray-200 p-4", children: [_jsxs("div", { children: [_jsx("div", { className: "text-sm font-semibold text-gray-800", children: value.title }), _jsxs("div", { className: "text-xs text-gray-600", children: ["Author: ", authorMap[value.author] ?? 'Unknown', " \u00B7 ", value.published ? 'Published' : 'Draft'] })] }), _jsx("div", { className: "text-sm text-gray-700 whitespace-pre-wrap", children: value.body }), _jsx("div", { className: "flex flex-wrap gap-2", children: (value.tags ?? []).map((tag) => (_jsx("span", { className: "rounded bg-blue-50 px-2 py-1 text-[11px] text-blue-700", children: tag }, tag))) }), value.seo && (_jsxs("div", { className: "rounded bg-gray-50 p-2 text-xs text-gray-700", children: [_jsx("div", { className: "font-semibold", children: "SEO" }), _jsxs("div", { children: ["Title: ", value.seo.title] }), _jsxs("div", { children: ["Description: ", value.seo.description] })] })), Array.isArray(value.features) && value.features.length > 0 && (_jsxs("div", { className: "flex flex-col gap-1", children: [_jsx("div", { className: "text-xs font-semibold text-gray-700", children: "Features" }), value.features.map((feat, idx) => (_jsxs("div", { className: "rounded border border-gray-200 p-2 text-xs", children: [_jsx("div", { className: "font-semibold", children: feat.title }), _jsx("div", { className: "text-gray-700", children: feat.description })] }, `${feat.title}-${idx}`)))] })), Array.isArray(value.blocks) && value.blocks.length > 0 && (_jsxs("div", { className: "flex flex-col gap-2", children: [_jsx("div", { className: "text-xs font-semibold text-gray-700", children: "Blocks" }), value.blocks.map((block, idx) => {
76
- if (block.template === 'hero') {
77
- return (_jsxs("div", { className: "rounded bg-indigo-50 p-3", children: [_jsx("div", { className: "text-sm font-semibold", children: block.value.headline }), _jsx("div", { className: "text-gray-700", children: block.value.body })] }, `hero-${idx}`));
78
- }
79
- if (block.template === 'cta') {
80
- return (_jsxs("div", { className: "rounded bg-emerald-50 p-3", children: [_jsx("div", { className: "text-sm font-semibold", children: block.value.title }), _jsx("button", { className: "mt-1 rounded bg-emerald-600 px-3 py-1 text-xs text-white", children: block.value.ctaText })] }, `cta-${idx}`));
81
- }
82
- return (_jsx("div", { className: "text-xs text-gray-500", children: "Unknown block" }, `unknown-${idx}`));
83
- })] }))] }));
84
- };
85
- export const Default = {
86
- render: () => {
87
- const [value, setValue] = useState({
88
- title: 'Hello World',
89
- author: 'authors/alice',
90
- tags: ['typed', 'fast'],
91
- published: false,
92
- body: 'Some **MDX** content that mirrors another example.',
93
- seo: {
94
- title: 'Hello World | CanopyCMS',
95
- description: 'Welcome to the demo story.',
96
- },
97
- features: [
98
- { title: 'Fast', description: 'Built for speed' },
99
- { title: 'Typed', description: 'Type-safe content' },
100
- ],
101
- blocks: [
102
- {
103
- template: 'hero',
104
- value: { headline: 'Hero block', body: 'Hero copy' },
105
- },
106
- {
107
- template: 'cta',
108
- value: { title: 'Try CanopyCMS', ctaText: 'Click me' },
109
- },
110
- ],
111
- });
112
- return (_jsxs("div", { className: "grid grid-cols-2 gap-4", children: [_jsx(FormRenderer, { fields: postSchema, value: value, onChange: (next) => setValue(next) }), _jsx(Preview, { value: value })] }));
113
- },
114
- };
115
- //# sourceMappingURL=FormRenderer.stories.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FormRenderer.stories.js","sourceRoot":"","sources":["../../src/editor/FormRenderer.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAGzC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAqB7C,MAAM,IAAI,GAA8B;IACtC,KAAK,EAAE,qBAAqB;IAC5B,SAAS,EAAE,YAAY;CACxB,CAAA;AAED,eAAe,IAAI,CAAA;AAGnB,MAAM,OAAO,GAAG;IACd,EAAE,EAAE,EAAE,eAAe,EAAE,IAAI,EAAE,OAAO,EAAE;IACtC,EAAE,EAAE,EAAE,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AAM;oBAChB,KAAK,EAAE,EAAE,QAAQ,EAAE,YAAY,EAAE,IAAI,EAAE,WAAW,EAAE;iBACrD;gBACD;oBACE,QAAQ,EAAE,KAAK;oBACf,KAAK,EAAE,EAAE,KAAK,EAAE,eAAe,EAAE,OAAO,EAAE,UAAU,EAAE;iBACvD;aACF;SACF,CAAC,CAAA;QAEF,OAAO,CACL,eAAK,SAAS,EAAC,wBAAwB,aACrC,KAAC,YAAY,IACX,MAAM,EAAE,UAAU,EAClB,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,QAAQ,CAAC,IAA4B,CAAC,GAC1D,EACF,KAAC,OAAO,IAAC,KAAK,EAAE,KAAK,GAAI,IACrB,CACP,CAAA;IACH,CAAC;CACF,CAAA"}
@@ -1,19 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
- import { GroupManager } from './GroupManager';
3
- declare const meta: Meta<typeof GroupManager>;
4
- export default meta;
5
- type Story = StoryObj<typeof GroupManager>;
6
- export declare const Default: Story;
7
- export declare const InternalGroupsOnly: Story;
8
- export declare const Empty: Story;
9
- export declare const ReadOnly: Story;
10
- export declare const Loading: Story;
11
- export declare const SaveError: Story;
12
- export declare const UserSearchError: Story;
13
- export declare const ExternalSearchError: Story;
14
- export declare const NoSearchUsers: Story;
15
- export declare const NoExternalSearch: Story;
16
- export declare const ManyMembers: Story;
17
- export declare const LongNames: Story;
18
- export declare const MixedScenario: Story;
19
- //# sourceMappingURL=GroupManager.stories.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"GroupManager.stories.d.ts","sourceRoot":"","sources":["../../src/editor/GroupManager.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAK7C,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,YAAY,CAGnC,CAAA;AAED,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,YAAY,CAAC,CAAA;AAkF1C,eAAO,MAAM,OAAO,EAAE,KASrB,CAAA;AAED,eAAO,MAAM,kBAAkB,EAAE,KAShC,CAAA;AAED,eAAO,MAAM,KAAK,EAAE,KASnB,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,KAQtB,CAAA;AAED,eAAO,MAAM,OAAO,EAAE,KAUrB,CAAA;AAED,eAAO,MAAM,SAAS,EAAE,KAYvB,CAAA;AAED,eAAO,MAAM,eAAe,EAAE,KAY7B,CAAA;AAED,eAAO,MAAM,mBAAmB,EAAE,KAYjC,CAAA;AAED,eAAO,MAAM,aAAa,EAAE,KAS3B,CAAA;AAED,eAAO,MAAM,gBAAgB,EAAE,KAS9B,CAAA;AAED,eAAO,MAAM,WAAW,EAAE,KAgCzB,CAAA;AAED,eAAO,MAAM,SAAS,EAAE,KAwBvB,CAAA;AAED,eAAO,MAAM,aAAa,EAAE,KA2B3B,CAAA"}