@conloca/cms-spa 0.2.6 → 0.3.0

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 (483) hide show
  1. package/dist/spa/main.css +262 -21
  2. package/dist/ts/.build-inputs.json +99 -57
  3. package/dist/ts/CmsSpaApp.d.ts +4 -6
  4. package/dist/ts/CmsSpaApp.d.ts.map +1 -1
  5. package/dist/ts/CmsSpaApp.js +19 -8
  6. package/dist/ts/CmsSpaApp.js.map +1 -1
  7. package/dist/ts/components/conflicts/EditorNoticeStrip.d.ts +44 -0
  8. package/dist/ts/components/conflicts/EditorNoticeStrip.d.ts.map +1 -0
  9. package/dist/ts/components/conflicts/EditorNoticeStrip.js +55 -0
  10. package/dist/ts/components/conflicts/EditorNoticeStrip.js.map +1 -0
  11. package/dist/ts/components/conflicts/FieldConflictList.d.ts +20 -0
  12. package/dist/ts/components/conflicts/FieldConflictList.d.ts.map +1 -0
  13. package/dist/ts/components/conflicts/FieldConflictList.js +14 -0
  14. package/dist/ts/components/conflicts/FieldConflictList.js.map +1 -0
  15. package/dist/ts/components/conflicts/FieldConflictPicker.d.ts +28 -0
  16. package/dist/ts/components/conflicts/FieldConflictPicker.d.ts.map +1 -0
  17. package/dist/ts/components/conflicts/FieldConflictPicker.js +52 -0
  18. package/dist/ts/components/conflicts/FieldConflictPicker.js.map +1 -0
  19. package/dist/ts/components/conflicts/OverwriteNotice.d.ts +11 -0
  20. package/dist/ts/components/conflicts/OverwriteNotice.d.ts.map +1 -0
  21. package/dist/ts/components/conflicts/OverwriteNotice.js +8 -0
  22. package/dist/ts/components/conflicts/OverwriteNotice.js.map +1 -0
  23. package/dist/ts/components/conflicts/PageDraftMenu.d.ts +11 -0
  24. package/dist/ts/components/conflicts/PageDraftMenu.d.ts.map +1 -0
  25. package/dist/ts/components/conflicts/PageDraftMenu.js +20 -0
  26. package/dist/ts/components/conflicts/PageDraftMenu.js.map +1 -0
  27. package/dist/ts/components/conflicts/PeerAvatars.d.ts +9 -0
  28. package/dist/ts/components/conflicts/PeerAvatars.d.ts.map +1 -0
  29. package/dist/ts/components/conflicts/PeerAvatars.js +29 -0
  30. package/dist/ts/components/conflicts/PeerAvatars.js.map +1 -0
  31. package/dist/ts/components/conflicts/PuckConflicts.d.ts +13 -0
  32. package/dist/ts/components/conflicts/PuckConflicts.d.ts.map +1 -0
  33. package/dist/ts/components/conflicts/PuckConflicts.js +59 -0
  34. package/dist/ts/components/conflicts/PuckConflicts.js.map +1 -0
  35. package/dist/ts/components/conflicts/RecentVersionsDialog.d.ts +15 -0
  36. package/dist/ts/components/conflicts/RecentVersionsDialog.d.ts.map +1 -0
  37. package/dist/ts/components/conflicts/RecentVersionsDialog.js +94 -0
  38. package/dist/ts/components/conflicts/RecentVersionsDialog.js.map +1 -0
  39. package/dist/ts/components/conflicts/conflict-label.d.ts +12 -0
  40. package/dist/ts/components/conflicts/conflict-label.d.ts.map +1 -0
  41. package/dist/ts/components/conflicts/conflict-label.js +120 -0
  42. package/dist/ts/components/conflicts/conflict-label.js.map +1 -0
  43. package/dist/ts/components/conflicts/use-page-conflicts.d.ts +26 -0
  44. package/dist/ts/components/conflicts/use-page-conflicts.d.ts.map +1 -0
  45. package/dist/ts/components/conflicts/use-page-conflicts.js +93 -0
  46. package/dist/ts/components/conflicts/use-page-conflicts.js.map +1 -0
  47. package/dist/ts/components/conflicts/version-copy.d.ts +7 -0
  48. package/dist/ts/components/conflicts/version-copy.d.ts.map +1 -0
  49. package/dist/ts/components/conflicts/version-copy.js +31 -0
  50. package/dist/ts/components/conflicts/version-copy.js.map +1 -0
  51. package/dist/ts/components/dashboard/RecentActivity.d.ts.map +1 -1
  52. package/dist/ts/components/dashboard/RecentActivity.js +2 -1
  53. package/dist/ts/components/dashboard/RecentActivity.js.map +1 -1
  54. package/dist/ts/components/dialogs/CreatePageDialog.js +1 -1
  55. package/dist/ts/components/dialogs/CreatePageDialog.js.map +1 -1
  56. package/dist/ts/components/dialogs/DataPropertiesDialog.d.ts +2 -1
  57. package/dist/ts/components/dialogs/DataPropertiesDialog.d.ts.map +1 -1
  58. package/dist/ts/components/dialogs/DataPropertiesDialog.js +15 -3
  59. package/dist/ts/components/dialogs/DataPropertiesDialog.js.map +1 -1
  60. package/dist/ts/components/dialogs/FragmentPropertiesDialog.d.ts +2 -1
  61. package/dist/ts/components/dialogs/FragmentPropertiesDialog.d.ts.map +1 -1
  62. package/dist/ts/components/dialogs/FragmentPropertiesDialog.js +16 -3
  63. package/dist/ts/components/dialogs/FragmentPropertiesDialog.js.map +1 -1
  64. package/dist/ts/components/dialogs/PageMetadataDialog.d.ts +9 -2
  65. package/dist/ts/components/dialogs/PageMetadataDialog.d.ts.map +1 -1
  66. package/dist/ts/components/dialogs/PageMetadataDialog.js +63 -16
  67. package/dist/ts/components/dialogs/PageMetadataDialog.js.map +1 -1
  68. package/dist/ts/components/dialogs/UnsavedChangesDialog.d.ts +16 -1
  69. package/dist/ts/components/dialogs/UnsavedChangesDialog.d.ts.map +1 -1
  70. package/dist/ts/components/dialogs/UnsavedChangesDialog.js +90 -2
  71. package/dist/ts/components/dialogs/UnsavedChangesDialog.js.map +1 -1
  72. package/dist/ts/components/dialogs/unsaved-guard.d.ts +9 -0
  73. package/dist/ts/components/dialogs/unsaved-guard.d.ts.map +1 -0
  74. package/dist/ts/components/dialogs/unsaved-guard.js +14 -0
  75. package/dist/ts/components/dialogs/unsaved-guard.js.map +1 -0
  76. package/dist/ts/components/editor/CMSMDXEditor.d.ts +6 -1
  77. package/dist/ts/components/editor/CMSMDXEditor.d.ts.map +1 -1
  78. package/dist/ts/components/editor/CMSMDXEditor.js +32 -15
  79. package/dist/ts/components/editor/CMSMDXEditor.js.map +1 -1
  80. package/dist/ts/components/editor/EditorFrame.d.ts +22 -0
  81. package/dist/ts/components/editor/EditorFrame.d.ts.map +1 -0
  82. package/dist/ts/components/editor/EditorFrame.js +72 -0
  83. package/dist/ts/components/editor/EditorFrame.js.map +1 -0
  84. package/dist/ts/components/editor/FragmentBlockTypeSelect.d.ts +10 -0
  85. package/dist/ts/components/editor/FragmentBlockTypeSelect.d.ts.map +1 -0
  86. package/dist/ts/components/editor/FragmentBlockTypeSelect.js +187 -0
  87. package/dist/ts/components/editor/FragmentBlockTypeSelect.js.map +1 -0
  88. package/dist/ts/components/editor/FragmentComponentBlock.d.ts +7 -0
  89. package/dist/ts/components/editor/FragmentComponentBlock.d.ts.map +1 -0
  90. package/dist/ts/components/editor/FragmentComponentBlock.js +180 -0
  91. package/dist/ts/components/editor/FragmentComponentBlock.js.map +1 -0
  92. package/dist/ts/components/editor/FragmentEditor.d.ts +3 -1
  93. package/dist/ts/components/editor/FragmentEditor.d.ts.map +1 -1
  94. package/dist/ts/components/editor/FragmentEditor.js +545 -130
  95. package/dist/ts/components/editor/FragmentEditor.js.map +1 -1
  96. package/dist/ts/components/editor/FragmentEditorHeaderActions.d.ts +20 -0
  97. package/dist/ts/components/editor/FragmentEditorHeaderActions.d.ts.map +1 -0
  98. package/dist/ts/components/editor/FragmentEditorHeaderActions.js +49 -0
  99. package/dist/ts/components/editor/FragmentEditorHeaderActions.js.map +1 -0
  100. package/dist/ts/components/editor/GenericBlock.d.ts.map +1 -1
  101. package/dist/ts/components/editor/GenericBlock.js +109 -12
  102. package/dist/ts/components/editor/GenericBlock.js.map +1 -1
  103. package/dist/ts/components/editor/InlinePreviewFrame.d.ts +19 -0
  104. package/dist/ts/components/editor/InlinePreviewFrame.d.ts.map +1 -0
  105. package/dist/ts/components/editor/InlinePreviewFrame.js +65 -0
  106. package/dist/ts/components/editor/InlinePreviewFrame.js.map +1 -0
  107. package/dist/ts/components/editor/JsxPropsPanel.d.ts.map +1 -1
  108. package/dist/ts/components/editor/JsxPropsPanel.js +62 -2
  109. package/dist/ts/components/editor/JsxPropsPanel.js.map +1 -1
  110. package/dist/ts/components/editor/LocaleSelector.d.ts +2 -1
  111. package/dist/ts/components/editor/LocaleSelector.d.ts.map +1 -1
  112. package/dist/ts/components/editor/LocaleSelector.js +2 -2
  113. package/dist/ts/components/editor/LocaleSelector.js.map +1 -1
  114. package/dist/ts/components/editor/MDXLivePreview.d.ts +2 -0
  115. package/dist/ts/components/editor/MDXLivePreview.d.ts.map +1 -1
  116. package/dist/ts/components/editor/MDXLivePreview.js +30 -38
  117. package/dist/ts/components/editor/MDXLivePreview.js.map +1 -1
  118. package/dist/ts/components/editor/MdxPageEditor.d.ts +7 -2
  119. package/dist/ts/components/editor/MdxPageEditor.d.ts.map +1 -1
  120. package/dist/ts/components/editor/MdxPageEditor.js +136 -10
  121. package/dist/ts/components/editor/MdxPageEditor.js.map +1 -1
  122. package/dist/ts/components/editor/PageEditor.d.ts +4 -1
  123. package/dist/ts/components/editor/PageEditor.d.ts.map +1 -1
  124. package/dist/ts/components/editor/PageEditor.js +78 -100
  125. package/dist/ts/components/editor/PageEditor.js.map +1 -1
  126. package/dist/ts/components/editor/PageEditorHeaderActions.d.ts +15 -4
  127. package/dist/ts/components/editor/PageEditorHeaderActions.d.ts.map +1 -1
  128. package/dist/ts/components/editor/PageEditorHeaderActions.js +13 -7
  129. package/dist/ts/components/editor/PageEditorHeaderActions.js.map +1 -1
  130. package/dist/ts/components/editor/PageEditorWrapper.d.ts +8 -2
  131. package/dist/ts/components/editor/PageEditorWrapper.d.ts.map +1 -1
  132. package/dist/ts/components/editor/PageEditorWrapper.js +99 -41
  133. package/dist/ts/components/editor/PageEditorWrapper.js.map +1 -1
  134. package/dist/ts/components/editor/body-sync-plugin.d.ts +2 -0
  135. package/dist/ts/components/editor/body-sync-plugin.d.ts.map +1 -0
  136. package/dist/ts/components/editor/body-sync-plugin.js +32 -0
  137. package/dist/ts/components/editor/body-sync-plugin.js.map +1 -0
  138. package/dist/ts/components/editor/draft-media-config.d.ts +6 -0
  139. package/dist/ts/components/editor/draft-media-config.d.ts.map +1 -1
  140. package/dist/ts/components/editor/draft-media-config.js +21 -0
  141. package/dist/ts/components/editor/draft-media-config.js.map +1 -1
  142. package/dist/ts/components/editor/fragment-save-check.d.ts +7 -0
  143. package/dist/ts/components/editor/fragment-save-check.d.ts.map +1 -0
  144. package/dist/ts/components/editor/fragment-save-check.js +13 -0
  145. package/dist/ts/components/editor/fragment-save-check.js.map +1 -0
  146. package/dist/ts/components/editor/fragment-save-lifetime.d.ts +18 -0
  147. package/dist/ts/components/editor/fragment-save-lifetime.d.ts.map +1 -0
  148. package/dist/ts/components/editor/fragment-save-lifetime.js +115 -0
  149. package/dist/ts/components/editor/fragment-save-lifetime.js.map +1 -0
  150. package/dist/ts/components/editor/host-wrapper-plugin.d.ts.map +1 -1
  151. package/dist/ts/components/editor/host-wrapper-plugin.js +20 -7
  152. package/dist/ts/components/editor/host-wrapper-plugin.js.map +1 -1
  153. package/dist/ts/components/editor/index.d.ts +0 -1
  154. package/dist/ts/components/editor/index.d.ts.map +1 -1
  155. package/dist/ts/components/editor/index.js +0 -1
  156. package/dist/ts/components/editor/index.js.map +1 -1
  157. package/dist/ts/components/editor/insert-menu/InsertMdxComponentButton.d.ts.map +1 -1
  158. package/dist/ts/components/editor/insert-menu/InsertMdxComponentButton.js +6 -11
  159. package/dist/ts/components/editor/insert-menu/InsertMdxComponentButton.js.map +1 -1
  160. package/dist/ts/components/editor/insert-menu/SlashMenuPlugin.d.ts.map +1 -1
  161. package/dist/ts/components/editor/insert-menu/SlashMenuPlugin.js +66 -12
  162. package/dist/ts/components/editor/insert-menu/SlashMenuPlugin.js.map +1 -1
  163. package/dist/ts/components/editor/insert-menu/insert-payload.d.ts +16 -21
  164. package/dist/ts/components/editor/insert-menu/insert-payload.d.ts.map +1 -1
  165. package/dist/ts/components/editor/insert-menu/insert-payload.js +75 -22
  166. package/dist/ts/components/editor/insert-menu/insert-payload.js.map +1 -1
  167. package/dist/ts/components/editor/insert-menu/mdx-components-plugin.d.ts +3 -1
  168. package/dist/ts/components/editor/insert-menu/mdx-components-plugin.d.ts.map +1 -1
  169. package/dist/ts/components/editor/insert-menu/mdx-components-plugin.js +5 -3
  170. package/dist/ts/components/editor/insert-menu/mdx-components-plugin.js.map +1 -1
  171. package/dist/ts/components/editor/jsx-layout-plugin.d.ts +25 -0
  172. package/dist/ts/components/editor/jsx-layout-plugin.d.ts.map +1 -0
  173. package/dist/ts/components/editor/jsx-layout-plugin.js +77 -0
  174. package/dist/ts/components/editor/jsx-layout-plugin.js.map +1 -0
  175. package/dist/ts/components/editor/offered-mdx-components.d.ts +11 -0
  176. package/dist/ts/components/editor/offered-mdx-components.d.ts.map +1 -0
  177. package/dist/ts/components/editor/offered-mdx-components.js +27 -0
  178. package/dist/ts/components/editor/offered-mdx-components.js.map +1 -0
  179. package/dist/ts/components/editor/page-setting-targets.d.ts.map +1 -1
  180. package/dist/ts/components/editor/page-setting-targets.js +2 -1
  181. package/dist/ts/components/editor/page-setting-targets.js.map +1 -1
  182. package/dist/ts/components/editor/preview-availability.d.ts +16 -1
  183. package/dist/ts/components/editor/preview-availability.d.ts.map +1 -1
  184. package/dist/ts/components/editor/preview-availability.js +16 -1
  185. package/dist/ts/components/editor/preview-availability.js.map +1 -1
  186. package/dist/ts/components/editor/prop-field-hint.d.ts +13 -0
  187. package/dist/ts/components/editor/prop-field-hint.d.ts.map +1 -0
  188. package/dist/ts/components/editor/prop-field-hint.js +70 -0
  189. package/dist/ts/components/editor/prop-field-hint.js.map +1 -0
  190. package/dist/ts/components/editor/soft-break-plugin.d.ts +21 -0
  191. package/dist/ts/components/editor/soft-break-plugin.d.ts.map +1 -0
  192. package/dist/ts/components/editor/soft-break-plugin.js +52 -0
  193. package/dist/ts/components/editor/soft-break-plugin.js.map +1 -0
  194. package/dist/ts/components/editor/use-live-page-settings.d.ts +13 -0
  195. package/dist/ts/components/editor/use-live-page-settings.d.ts.map +1 -0
  196. package/dist/ts/components/editor/use-live-page-settings.js +76 -0
  197. package/dist/ts/components/editor/use-live-page-settings.js.map +1 -0
  198. package/dist/ts/components/editor/usePagePreview.d.ts +32 -0
  199. package/dist/ts/components/editor/usePagePreview.d.ts.map +1 -0
  200. package/dist/ts/components/editor/usePagePreview.js +252 -0
  201. package/dist/ts/components/editor/usePagePreview.js.map +1 -0
  202. package/dist/ts/components/editors/DataEditor.d.ts +6 -3
  203. package/dist/ts/components/editors/DataEditor.d.ts.map +1 -1
  204. package/dist/ts/components/editors/DataEditor.js +153 -19
  205. package/dist/ts/components/editors/DataEditor.js.map +1 -1
  206. package/dist/ts/components/fields/MDXEditField.d.ts +1 -1
  207. package/dist/ts/components/fields/MDXEditField.js +2 -2
  208. package/dist/ts/components/fields/MDXEditField.js.map +1 -1
  209. package/dist/ts/components/forms/SchemaForm.d.ts.map +1 -1
  210. package/dist/ts/components/forms/SchemaForm.js +1 -9
  211. package/dist/ts/components/forms/SchemaForm.js.map +1 -1
  212. package/dist/ts/components/media/AssetDetailSidebar.d.ts.map +1 -1
  213. package/dist/ts/components/media/AssetDetailSidebar.js +43 -5
  214. package/dist/ts/components/media/AssetDetailSidebar.js.map +1 -1
  215. package/dist/ts/components/pages/DataList.d.ts.map +1 -1
  216. package/dist/ts/components/pages/DataList.js +16 -4
  217. package/dist/ts/components/pages/DataList.js.map +1 -1
  218. package/dist/ts/components/pages/FragmentList.d.ts.map +1 -1
  219. package/dist/ts/components/pages/FragmentList.js +10 -0
  220. package/dist/ts/components/pages/FragmentList.js.map +1 -1
  221. package/dist/ts/components/pages/PageList.d.ts.map +1 -1
  222. package/dist/ts/components/pages/PageList.js +54 -118
  223. package/dist/ts/components/pages/PageList.js.map +1 -1
  224. package/dist/ts/components/pages/PageRow.d.ts +21 -0
  225. package/dist/ts/components/pages/PageRow.d.ts.map +1 -0
  226. package/dist/ts/components/pages/PageRow.js +70 -0
  227. package/dist/ts/components/pages/PageRow.js.map +1 -0
  228. package/dist/ts/components/pages/PageTable.d.ts +21 -0
  229. package/dist/ts/components/pages/PageTable.d.ts.map +1 -0
  230. package/dist/ts/components/pages/PageTable.js +12 -0
  231. package/dist/ts/components/pages/PageTable.js.map +1 -0
  232. package/dist/ts/components/pages/page-list-model.d.ts +20 -0
  233. package/dist/ts/components/pages/page-list-model.d.ts.map +1 -0
  234. package/dist/ts/components/pages/page-list-model.js +78 -0
  235. package/dist/ts/components/pages/page-list-model.js.map +1 -0
  236. package/dist/ts/components/puck/MDXContent.d.ts +3 -3
  237. package/dist/ts/components/puck/MDXContent.d.ts.map +1 -1
  238. package/dist/ts/components/puck/MDXContent.js +24 -72
  239. package/dist/ts/components/puck/MDXContent.js.map +1 -1
  240. package/dist/ts/components/puck/csp-frame-harness.d.ts +14 -0
  241. package/dist/ts/components/puck/csp-frame-harness.d.ts.map +1 -0
  242. package/dist/ts/components/puck/csp-frame-harness.js +85 -0
  243. package/dist/ts/components/puck/csp-frame-harness.js.map +1 -0
  244. package/dist/ts/components/puck/use-fragment-render.d.ts +9 -0
  245. package/dist/ts/components/puck/use-fragment-render.d.ts.map +1 -0
  246. package/dist/ts/components/puck/use-fragment-render.js +70 -0
  247. package/dist/ts/components/puck/use-fragment-render.js.map +1 -0
  248. package/dist/ts/components/sandbox/ContentSandbox.d.ts +3 -5
  249. package/dist/ts/components/sandbox/ContentSandbox.d.ts.map +1 -1
  250. package/dist/ts/components/sandbox/ContentSandbox.js +6 -8
  251. package/dist/ts/components/sandbox/ContentSandbox.js.map +1 -1
  252. package/dist/ts/components/sandbox/frame-runtime.d.ts +1 -1
  253. package/dist/ts/components/sandbox/frame-runtime.d.ts.map +1 -1
  254. package/dist/ts/components/sandbox/frame-runtime.js +1 -1
  255. package/dist/ts/components/sandbox/frame-runtime.js.map +1 -1
  256. package/dist/ts/components/toast.d.ts +8 -4
  257. package/dist/ts/components/toast.d.ts.map +1 -1
  258. package/dist/ts/components/toast.js +6 -1
  259. package/dist/ts/components/toast.js.map +1 -1
  260. package/dist/ts/components/ui/Card.d.ts +3 -5
  261. package/dist/ts/components/ui/Card.d.ts.map +1 -1
  262. package/dist/ts/components/ui/Card.js +3 -5
  263. package/dist/ts/components/ui/Card.js.map +1 -1
  264. package/dist/ts/components/ui/Select.d.ts.map +1 -1
  265. package/dist/ts/components/ui/Select.js +12 -3
  266. package/dist/ts/components/ui/Select.js.map +1 -1
  267. package/dist/ts/draft-tools.d.ts +76 -0
  268. package/dist/ts/draft-tools.d.ts.map +1 -0
  269. package/dist/ts/draft-tools.js +2 -0
  270. package/dist/ts/draft-tools.js.map +1 -0
  271. package/dist/ts/frame/channel.d.ts +1 -1
  272. package/dist/ts/frame/channel.d.ts.map +1 -1
  273. package/dist/ts/frame/channel.js +3 -0
  274. package/dist/ts/frame/channel.js.map +1 -1
  275. package/dist/ts/frame/editor-frame.d.ts.map +1 -1
  276. package/dist/ts/frame/editor-frame.js +188 -30
  277. package/dist/ts/frame/editor-frame.js.map +1 -1
  278. package/dist/ts/frame/protocol.d.ts +73 -4
  279. package/dist/ts/frame/protocol.d.ts.map +1 -1
  280. package/dist/ts/frame/protocol.js +54 -16
  281. package/dist/ts/frame/protocol.js.map +1 -1
  282. package/dist/ts/hooks/useUnsavedChangesGuard.d.ts +5 -3
  283. package/dist/ts/hooks/useUnsavedChangesGuard.d.ts.map +1 -1
  284. package/dist/ts/hooks/useUnsavedChangesGuard.js +17 -7
  285. package/dist/ts/hooks/useUnsavedChangesGuard.js.map +1 -1
  286. package/dist/ts/host-style-probe.d.ts.map +1 -1
  287. package/dist/ts/host-style-probe.js +160 -40
  288. package/dist/ts/host-style-probe.js.map +1 -1
  289. package/dist/ts/index.d.ts +13 -0
  290. package/dist/ts/index.d.ts.map +1 -1
  291. package/dist/ts/index.js +14 -0
  292. package/dist/ts/index.js.map +1 -1
  293. package/dist/ts/live/data-binding.d.ts +67 -0
  294. package/dist/ts/live/data-binding.d.ts.map +1 -0
  295. package/dist/ts/live/data-binding.js +215 -0
  296. package/dist/ts/live/data-binding.js.map +1 -0
  297. package/dist/ts/live/doc-channel.d.ts +74 -0
  298. package/dist/ts/live/doc-channel.d.ts.map +1 -0
  299. package/dist/ts/live/doc-channel.js +293 -0
  300. package/dist/ts/live/doc-channel.js.map +1 -0
  301. package/dist/ts/live/held-fragment-edits.d.ts +15 -0
  302. package/dist/ts/live/held-fragment-edits.d.ts.map +1 -0
  303. package/dist/ts/live/held-fragment-edits.js +47 -0
  304. package/dist/ts/live/held-fragment-edits.js.map +1 -0
  305. package/dist/ts/live/markdown-binding.d.ts +54 -0
  306. package/dist/ts/live/markdown-binding.d.ts.map +1 -0
  307. package/dist/ts/live/markdown-binding.js +618 -0
  308. package/dist/ts/live/markdown-binding.js.map +1 -0
  309. package/dist/ts/live/markdown-live-plugin.d.ts +42 -0
  310. package/dist/ts/live/markdown-live-plugin.d.ts.map +1 -0
  311. package/dist/ts/live/markdown-live-plugin.js +918 -0
  312. package/dist/ts/live/markdown-live-plugin.js.map +1 -0
  313. package/dist/ts/live/messages.d.ts +142 -0
  314. package/dist/ts/live/messages.d.ts.map +1 -0
  315. package/dist/ts/live/messages.js +266 -0
  316. package/dist/ts/live/messages.js.map +1 -0
  317. package/dist/ts/live/puck-binding.d.ts +88 -0
  318. package/dist/ts/live/puck-binding.d.ts.map +1 -0
  319. package/dist/ts/live/puck-binding.js +467 -0
  320. package/dist/ts/live/puck-binding.js.map +1 -0
  321. package/dist/ts/live/undo.d.ts +29 -0
  322. package/dist/ts/live/undo.d.ts.map +1 -0
  323. package/dist/ts/live/undo.js +104 -0
  324. package/dist/ts/live/undo.js.map +1 -0
  325. package/dist/ts/live/use-live.d.ts +77 -0
  326. package/dist/ts/live/use-live.d.ts.map +1 -0
  327. package/dist/ts/live/use-live.js +207 -0
  328. package/dist/ts/live/use-live.js.map +1 -0
  329. package/dist/ts/mdx-components-define.d.ts +52 -15
  330. package/dist/ts/mdx-components-define.d.ts.map +1 -1
  331. package/dist/ts/mdx-components-define.js +136 -0
  332. package/dist/ts/mdx-components-define.js.map +1 -1
  333. package/dist/ts/mdx-components.d.ts +11 -19
  334. package/dist/ts/mdx-components.d.ts.map +1 -1
  335. package/dist/ts/mdx-components.js +23 -32
  336. package/dist/ts/mdx-components.js.map +1 -1
  337. package/dist/ts/media/AssetScopePill.d.ts.map +1 -1
  338. package/dist/ts/media/AssetScopePill.js +2 -1
  339. package/dist/ts/media/AssetScopePill.js.map +1 -1
  340. package/dist/ts/merge-default-props.d.ts.map +1 -1
  341. package/dist/ts/merge-default-props.js +3 -0
  342. package/dist/ts/merge-default-props.js.map +1 -1
  343. package/dist/ts/selected-block.d.ts +27 -2
  344. package/dist/ts/selected-block.d.ts.map +1 -1
  345. package/dist/ts/selected-block.js +43 -1
  346. package/dist/ts/selected-block.js.map +1 -1
  347. package/dist/ts/site-render.d.ts +60 -0
  348. package/dist/ts/site-render.d.ts.map +1 -0
  349. package/dist/ts/site-render.js +87 -0
  350. package/dist/ts/site-render.js.map +1 -0
  351. package/dist/ts/types.d.ts +3 -0
  352. package/dist/ts/types.d.ts.map +1 -1
  353. package/dist/ts/ui-config.d.ts +29 -13
  354. package/dist/ts/ui-config.d.ts.map +1 -1
  355. package/dist/ts/ui-config.js +14 -3
  356. package/dist/ts/ui-config.js.map +1 -1
  357. package/dist/ts/utils/apply-clash.d.ts +44 -0
  358. package/dist/ts/utils/apply-clash.d.ts.map +1 -0
  359. package/dist/ts/utils/apply-clash.js +102 -0
  360. package/dist/ts/utils/apply-clash.js.map +1 -0
  361. package/dist/ts/utils/mdast-tree.d.ts +5 -7
  362. package/dist/ts/utils/mdast-tree.d.ts.map +1 -1
  363. package/dist/ts/utils/mdast-tree.js +8 -13
  364. package/dist/ts/utils/mdast-tree.js.map +1 -1
  365. package/dist/ts/utils/pageMetadata.d.ts +6 -2
  366. package/dist/ts/utils/pageMetadata.d.ts.map +1 -1
  367. package/dist/ts/utils/pageMetadata.js +25 -7
  368. package/dist/ts/utils/pageMetadata.js.map +1 -1
  369. package/dist/ts/utils/schema-fields.d.ts +2 -0
  370. package/dist/ts/utils/schema-fields.d.ts.map +1 -1
  371. package/dist/ts/utils/schema-fields.js +8 -0
  372. package/dist/ts/utils/schema-fields.js.map +1 -1
  373. package/dist/ts/write-access.d.ts +2 -0
  374. package/dist/ts/write-access.d.ts.map +1 -1
  375. package/dist/ts/write-access.js +9 -4
  376. package/dist/ts/write-access.js.map +1 -1
  377. package/package.json +18 -7
  378. package/src/CmsSpaApp.tsx +20 -11
  379. package/src/components/conflicts/EditorNoticeStrip.tsx +135 -0
  380. package/src/components/conflicts/FieldConflictList.tsx +59 -0
  381. package/src/components/conflicts/FieldConflictPicker.tsx +158 -0
  382. package/src/components/conflicts/OverwriteNotice.tsx +30 -0
  383. package/src/components/conflicts/PageDraftMenu.tsx +51 -0
  384. package/src/components/conflicts/PeerAvatars.tsx +51 -0
  385. package/src/components/conflicts/PuckConflicts.tsx +92 -0
  386. package/src/components/conflicts/RecentVersionsDialog.tsx +154 -0
  387. package/src/components/conflicts/conflict-label.ts +124 -0
  388. package/src/components/conflicts/use-page-conflicts.ts +112 -0
  389. package/src/components/conflicts/version-copy.ts +33 -0
  390. package/src/components/dashboard/RecentActivity.tsx +3 -2
  391. package/src/components/dialogs/CreatePageDialog.tsx +1 -1
  392. package/src/components/dialogs/DataPropertiesDialog.tsx +22 -4
  393. package/src/components/dialogs/FragmentPropertiesDialog.tsx +23 -4
  394. package/src/components/dialogs/PageMetadataDialog.tsx +157 -65
  395. package/src/components/dialogs/UnsavedChangesDialog.tsx +171 -21
  396. package/src/components/dialogs/unsaved-guard.ts +15 -0
  397. package/src/components/editor/CMSMDXEditor.tsx +238 -198
  398. package/src/components/editor/EditorFrame.tsx +116 -0
  399. package/src/components/editor/FragmentBlockTypeSelect.tsx +245 -0
  400. package/src/components/editor/FragmentComponentBlock.tsx +257 -0
  401. package/src/components/editor/FragmentEditor.tsx +899 -213
  402. package/src/components/editor/FragmentEditorHeaderActions.tsx +77 -0
  403. package/src/components/editor/GenericBlock.tsx +127 -16
  404. package/src/components/editor/InlinePreviewFrame.tsx +78 -0
  405. package/src/components/editor/JsxPropsPanel.tsx +90 -6
  406. package/src/components/editor/LocaleSelector.tsx +4 -2
  407. package/src/components/editor/MDXLivePreview.tsx +44 -46
  408. package/src/components/editor/MdxPageEditor.tsx +247 -7
  409. package/src/components/editor/PageEditor.tsx +154 -121
  410. package/src/components/editor/PageEditorHeaderActions.tsx +65 -27
  411. package/src/components/editor/PageEditorWrapper.tsx +122 -45
  412. package/src/components/editor/body-sync-plugin.ts +44 -0
  413. package/src/components/editor/draft-media-config.ts +22 -0
  414. package/src/components/editor/fragment-save-check.ts +26 -0
  415. package/src/components/editor/fragment-save-lifetime.ts +142 -0
  416. package/src/components/editor/host-wrapper-plugin.ts +28 -7
  417. package/src/components/editor/index.ts +0 -1
  418. package/src/components/editor/insert-menu/InsertMdxComponentButton.tsx +7 -11
  419. package/src/components/editor/insert-menu/SlashMenuPlugin.tsx +95 -18
  420. package/src/components/editor/insert-menu/insert-payload.ts +79 -30
  421. package/src/components/editor/insert-menu/mdx-components-plugin.ts +5 -3
  422. package/src/components/editor/jsx-layout-plugin.ts +103 -0
  423. package/src/components/editor/offered-mdx-components.ts +35 -0
  424. package/src/components/editor/page-setting-targets.tsx +2 -0
  425. package/src/components/editor/preview-availability.ts +21 -1
  426. package/src/components/editor/prop-field-hint.ts +75 -0
  427. package/src/components/editor/soft-break-plugin.ts +55 -0
  428. package/src/components/editor/use-live-page-settings.ts +80 -0
  429. package/src/components/editor/usePagePreview.ts +291 -0
  430. package/src/components/editors/DataEditor.tsx +257 -22
  431. package/src/components/fields/MDXEditField.tsx +2 -2
  432. package/src/components/forms/SchemaForm.tsx +1 -10
  433. package/src/components/media/AssetDetailSidebar.tsx +47 -6
  434. package/src/components/pages/DataList.tsx +14 -4
  435. package/src/components/pages/FragmentList.tsx +8 -0
  436. package/src/components/pages/PageList.tsx +90 -337
  437. package/src/components/pages/PageRow.tsx +290 -0
  438. package/src/components/pages/PageTable.tsx +71 -0
  439. package/src/components/pages/page-list-model.ts +98 -0
  440. package/src/components/puck/MDXContent.tsx +37 -113
  441. package/src/components/puck/csp-frame-harness.tsx +99 -0
  442. package/src/components/puck/use-fragment-render.ts +82 -0
  443. package/src/components/sandbox/ContentSandbox.tsx +6 -11
  444. package/src/components/sandbox/frame-runtime.ts +0 -2
  445. package/src/components/toast.tsx +23 -5
  446. package/src/components/ui/Card.tsx +3 -5
  447. package/src/components/ui/Select.tsx +14 -6
  448. package/src/draft-tools.ts +77 -0
  449. package/src/frame/channel.ts +3 -1
  450. package/src/frame/editor-frame.ts +210 -30
  451. package/src/frame/protocol.ts +98 -15
  452. package/src/hooks/useUnsavedChangesGuard.ts +17 -6
  453. package/src/host-style-probe.ts +157 -37
  454. package/src/index.ts +90 -0
  455. package/src/live/data-binding.ts +252 -0
  456. package/src/live/doc-channel.ts +343 -0
  457. package/src/live/held-fragment-edits.ts +47 -0
  458. package/src/live/markdown-binding.ts +630 -0
  459. package/src/live/markdown-live-plugin.tsx +1037 -0
  460. package/src/live/messages.ts +370 -0
  461. package/src/live/puck-binding.tsx +579 -0
  462. package/src/live/undo.ts +112 -0
  463. package/src/live/use-live.ts +264 -0
  464. package/src/main.css +184 -4
  465. package/src/mdx-components-define.ts +170 -24
  466. package/src/mdx-components.ts +29 -30
  467. package/src/media/AssetScopePill.tsx +2 -1
  468. package/src/merge-default-props.ts +4 -0
  469. package/src/selected-block.ts +55 -3
  470. package/src/site-render.ts +146 -0
  471. package/src/types.ts +3 -0
  472. package/src/ui-config.ts +51 -15
  473. package/src/utils/apply-clash.ts +113 -0
  474. package/src/utils/mdast-tree.ts +8 -12
  475. package/src/utils/pageMetadata.ts +25 -7
  476. package/src/utils/schema-fields.ts +9 -0
  477. package/src/write-access.ts +10 -4
  478. package/styles/tailwind-theme.css +11 -0
  479. package/dist/ts/components/editor/ContentDiff.d.ts +0 -10
  480. package/dist/ts/components/editor/ContentDiff.d.ts.map +0 -1
  481. package/dist/ts/components/editor/ContentDiff.js +0 -52
  482. package/dist/ts/components/editor/ContentDiff.js.map +0 -1
  483. package/src/components/editor/ContentDiff.tsx +0 -251
package/src/ui-config.ts CHANGED
@@ -1,8 +1,10 @@
1
1
  /* oxlint-disable no-underscore-dangle -- __UI_CONFIG__ is the existing browser-global compatibility contract read by embedded hosts. */
2
- import type { ContentAPIClient, EditorDataBindings } from '@conloca/content-api-client';
2
+ import type { ContentAPIClient, EditorDataBindings, PageStatus } from '@conloca/content-api-client';
3
3
  import type { QueryClientConfig } from '@tanstack/react-query';
4
4
  import type { PageConversionFacts } from './convert-pages.js';
5
+ import type { DraftToolsHost } from './draft-tools.js';
5
6
  import type { MediaLoadInput, PreviewOpenResult } from './frame/protocol.js';
7
+ import type { DocChannel } from './live/doc-channel.js';
6
8
  import type { MediaBridge } from './media/types.js';
7
9
 
8
10
  export interface TemplateConfig {
@@ -21,14 +23,29 @@ export interface TemplateConfig {
21
23
  */
22
24
  export type PreviewCapability = 'available' | 'unavailable' | 'unknown';
23
25
 
24
- /** Outcome of `openPreview`: a draft-preview URL, or why the site has none. */
26
+ /** A preview URL or a request refusal. Only explicit capability values establish a site verdict. */
25
27
  export type OpenPreviewResult =
26
- | { ok: true; url: string }
27
- /**
28
- * The site does not serve draft preview, so no URL exists that could work.
29
- * `message` is written for the person editing the page, not for a log.
30
- */
31
- | { ok: false; reason: 'not-deployed'; message: string };
28
+ | {
29
+ ok: true;
30
+ url: string;
31
+ /** Missing or undefined means unknown, including legacy custom adapters. */
32
+ previewCapability?: Exclude<PreviewCapability, 'unavailable'>;
33
+ }
34
+ | {
35
+ ok: false;
36
+ reason: 'not-deployed';
37
+ /** A request explanation for the caller, including inconclusive address or probe failures. */
38
+ message: string;
39
+ /** Only unavailable is definitive; omitted, undefined and unknown preserve the previous verdict. */
40
+ previewCapability?: Exclude<PreviewCapability, 'available'>;
41
+ }
42
+ | {
43
+ ok: false;
44
+ reason: 'not-allowed';
45
+ /** The request is restricted in this session; retrying cannot establish a different site verdict. */
46
+ message: string;
47
+ previewCapability?: 'unknown';
48
+ };
32
49
 
33
50
  /**
34
51
  * Why the editor refuses to write, in the words of the person editing.
@@ -72,6 +89,8 @@ export interface UIConfig {
72
89
  schemasPath?: string;
73
90
  /** Page creation templates */
74
91
  templates?: Record<string, TemplateConfig>;
92
+ /** Optional display labels for page statuses; domain values and filtering stay unchanged. */
93
+ pageStatusLabels?: Partial<Record<PageStatus, string>>;
75
94
  /**
76
95
  * True when at least one site in `sites.json` declares an `mdxPages`
77
96
  * path. Drives whether the create-page dialog exposes the "Document
@@ -156,10 +175,9 @@ export interface UIConfig {
156
175
  * When set, the editor Preview button calls this instead of bare `buildUrl`
157
176
  * (live site). The standalone astro-cms editor leaves it unset.
158
177
  *
159
- * Returns a RESULT rather than throwing for `not-deployed`, because a site
160
- * that does not serve draft preview is an ordinary, expected answer — a fact
161
- * about that site — not a failure of the call. The two must
162
- * stay distinguishable: one is the site's setup, the other is a fault.
178
+ * Returns a result for an explained request refusal, including pending address confirmation.
179
+ * Only explicit previewCapability establishes a site verdict; legacy missing proof is unknown.
180
+ * Unexpected transport or protocol failures still throw.
163
181
  */
164
182
  openPreview?: (input: { path: string }) => Promise<OpenPreviewResult | PreviewOpenResult>;
165
183
  /**
@@ -223,6 +241,12 @@ export interface UIConfig {
223
241
  * integration; absent means the editor does not offer page conversion.
224
242
  */
225
243
  pageConversion?: PageConversionFacts;
244
+ /** The parent carries co-edited docs; absent, the editors keep their save path. */
245
+ docChannel?: DocChannel;
246
+ /** Set by a host that serves draft tools (conflicts, discard, earlier versions); absent, the editor offers none. */
247
+ draftTools?: DraftToolsHost;
248
+ /** The site the editor's pages belong to, which the draft tools' page refs name; without it they offer nothing. */
249
+ siteId?: string;
226
250
  }
227
251
 
228
252
  /** How the editor routes when a parent frame owns the address bar. */
@@ -262,11 +286,14 @@ declare global {
262
286
  }
263
287
 
264
288
  let config: UIConfig = { ...defaultConfig };
289
+ const developmentConfigs = new WeakMap<UIConfig, UIConfig>();
265
290
 
266
- /** Fired on window when a parent frame changes `readOnly` or `pageConversion` after `configureUI`. */
291
+ /** Fired on window when configuration is installed or a live editor setting changes. */
267
292
  export const EDITOR_CONFIG_CHANGED_EVENT = 'conloca:editor-config-changed';
268
293
 
269
294
  export function configureUI(options: Partial<UIConfig>) {
295
+ if (options.draftTools && !options.siteId)
296
+ throw new Error('configureUI: draftTools needs siteId, the site its pages are in.');
270
297
  // `readOnly` survives a reinstall unless the caller states a new answer.
271
298
  //
272
299
  // Every other field here describes ONE workspace, and a host app runs
@@ -282,6 +309,7 @@ export function configureUI(options: Partial<UIConfig>) {
282
309
  // Make it available globally for the runtime
283
310
  if (typeof window !== 'undefined') {
284
311
  window.__UI_CONFIG__ = config;
312
+ window.dispatchEvent(new Event(EDITOR_CONFIG_CHANGED_EVENT));
285
313
  }
286
314
  }
287
315
 
@@ -347,6 +375,7 @@ export function setPreviewCapability(previewCapability: PreviewCapability) {
347
375
  // The runtime mirror `getUIConfig` reads from.
348
376
  const runtimeConfig = window.__UI_CONFIG__;
349
377
  if (runtimeConfig) runtimeConfig.previewCapability = previewCapability;
378
+ window.dispatchEvent(new Event(EDITOR_CONFIG_CHANGED_EVENT));
350
379
  }
351
380
 
352
381
  /**
@@ -381,6 +410,10 @@ export function setDataBindings(dataBindings?: EditorDataBindings) {
381
410
  if (runtimeConfig) runtimeConfig.dataBindings = dataBindings;
382
411
  }
383
412
 
413
+ export function pageStatusLabel(status: PageStatus, fallback: string = status): string {
414
+ return getUIConfig().pageStatusLabels?.[status] ?? fallback;
415
+ }
416
+
384
417
  export function getUIConfig(): UIConfig {
385
418
  if (typeof window === 'undefined') {
386
419
  return config;
@@ -395,12 +428,15 @@ export function getUIConfig(): UIConfig {
395
428
  // because it is the one field here that is NOT a property of this page's
396
429
  // workspace: dropping it would re-grant writes to a refused account.
397
430
  if (window.location.pathname === '/') {
398
- return {
431
+ // Keep this derived config's client lifetime stable across parent renders, and isolate every reinstall.
432
+ const developmentConfig = developmentConfigs.get(config) ?? {
399
433
  ...defaultConfig,
400
434
  basename: undefined,
401
435
  enableDevtools: true,
402
- readOnly: config.readOnly,
403
436
  };
437
+ developmentConfig.readOnly = config.readOnly;
438
+ developmentConfigs.set(config, developmentConfig);
439
+ return developmentConfig;
404
440
  }
405
441
 
406
442
  return config;
@@ -0,0 +1,113 @@
1
+ import type { FieldConflict, JsonObject, JsonValue } from '@conloca/content-api';
2
+ import type { PageMetadata } from '../types.js';
3
+ import { formatFieldLabel } from './schema-fields.js';
4
+
5
+ /** A clashing field's value; `undefined` where that side deleted it. */
6
+ type Field = JsonValue | undefined;
7
+
8
+ /** The field path a clash anchor names: `meta.title`, `frontmatter.title` and `title` are all `title`. */
9
+ export function clashPath(anchor: string): string {
10
+ return anchor.replace(/^(meta|frontmatter)\./, '');
11
+ }
12
+
13
+ /** A path of plain keys only; a step into a list (`[id=…]`, `#order`) or a quoted key names no form value. */
14
+ const PLAIN_PATH = /^[A-Za-z0-9_$:-]+(\.[A-Za-z0-9_$:-]+)*$/;
15
+
16
+ /** A value that is a branch of nested fields; the forms hold JSON, as they were read from and write JSON. */
17
+ function isBranch(value: unknown): value is JsonObject {
18
+ return typeof value === 'object' && value !== null && !Array.isArray(value);
19
+ }
20
+
21
+ /** `branch` with `theirs` at `keys` (removed when they deleted it), copied so the form's own objects stay untouched. */
22
+ function setIn(branch: Field, keys: string[], theirs: Field): Field {
23
+ const [key, ...rest] = keys;
24
+ if (key === undefined) return theirs;
25
+ const copy: JsonObject = isBranch(branch) ? { ...branch } : {};
26
+ const own = Object.keys(copy).includes(key) ? copy[key] : undefined;
27
+ const leaf = setIn(own, rest, theirs);
28
+ if (leaf === undefined) delete copy[key];
29
+ // defineProperty: a `__proto__` key must stay a field, not swap the prototype.
30
+ else Object.defineProperty(copy, key, { value: leaf, enumerable: true, configurable: true, writable: true });
31
+ return copy;
32
+ }
33
+
34
+ /**
35
+ * `values` with each clashing field set to their value, where the form keeps it: under a dotted key the form shows
36
+ * (`hintKeys`, e.g. `seo.robots`), else at its path inside the top-level value. A field inside a list has no form key;
37
+ * it keeps the person's value, and the clash message still names it.
38
+ */
39
+ export function withTheirs<V>(
40
+ values: Readonly<Record<string, V>>,
41
+ fields: FieldConflict[],
42
+ hintKeys: ReadonlySet<string> = new Set(),
43
+ ) {
44
+ const loaded = new Map<string, Field>();
45
+ for (const field of fields) {
46
+ const path = clashPath(field.anchor);
47
+ if (hintKeys.has(path)) loaded.set(path, field.theirs);
48
+ else if (PLAIN_PATH.test(path)) {
49
+ const [head = path, ...rest] = path.split('.');
50
+ const current = loaded.has(head) ? loaded.get(head) : values[head];
51
+ loaded.set(head, setIn(isBranch(current) ? current : undefined, rest, field.theirs));
52
+ }
53
+ }
54
+ return { ...values, ...Object.fromEntries(loaded) };
55
+ }
56
+
57
+ /** A value as the alert quotes it: text in quotes, a cleared value as empty, anything else as JSON. */
58
+ function shownValue(value: unknown): string {
59
+ if (value === undefined || value === null || value === '') return 'empty';
60
+ return typeof value === 'string' ? `“${value}”` : JSON.stringify(value);
61
+ }
62
+
63
+ /** `Title`, `Title and Tags`, `Title, Tags and Category`. */
64
+ function listLabels(labels: string[]): string {
65
+ if (labels.length <= 1) return labels[0] ?? '';
66
+ return `${labels.slice(0, -1).join(', ')} and ${labels[labels.length - 1]}`;
67
+ }
68
+
69
+ /**
70
+ * An Apply refused because someone else changed the same fields meanwhile; `fields` hold their values (`theirs`), which
71
+ * the dialog loads before the person applies again. `changedBy` names the page's last other editor, not who changed
72
+ * these fields, so the copy never says that person changed them.
73
+ */
74
+ export class ApplyClashError extends Error {
75
+ readonly fields: FieldConflict[];
76
+ readonly changedBy: string | undefined;
77
+ /** The page read again after the clash and its version, which the dialog moves to; none where it was not read. */
78
+ readonly latest: { page: PageMetadata; etag?: string } | undefined;
79
+
80
+ constructor(fields: FieldConflict[], changedBy?: string, latest?: { page: PageMetadata; etag?: string }) {
81
+ super();
82
+ this.name = 'ApplyClashError';
83
+ this.fields = fields;
84
+ this.changedBy = changedBy;
85
+ this.latest = latest;
86
+ this.message = this.describe(() => undefined);
87
+ }
88
+
89
+ /**
90
+ * The message with each field named by `labelOf(path)`, the label its form shows, or else by its last plain key: a
91
+ * field inside a list (`tags[id=x]`) is named by the list. `changed`, for a form that reloads every field and so no
92
+ * longer shows what the person typed, lists each field they had changed with their value; the alert repeats those and
93
+ * every clashing field not among them.
94
+ */
95
+ describe(labelOf: (path: string) => string | undefined, changed?: { path: string; value: unknown }[]): string {
96
+ const label = (path: string) => {
97
+ const plain = /^[A-Za-z0-9_$:.-]+/.exec(path)?.[0] ?? path;
98
+ return labelOf(path) ?? formatFieldLabel(plain.split('.').pop() ?? plain);
99
+ };
100
+ const labels = [...new Set(this.fields.map((field) => label(clashPath(field.anchor))))];
101
+ const by = this.changedBy ? ` (last edited by ${this.changedBy})` : '';
102
+ const message = `${listLabels(labels)} changed while you were editing${by}. Check ${labels.length === 1 ? 'it' : 'them'} and apply again.`;
103
+ if (!changed) return message;
104
+ const paths = new Set(changed.map((field) => field.path));
105
+ const ours = [
106
+ ...this.fields
107
+ .filter((field) => !paths.has(clashPath(field.anchor)))
108
+ .map((field) => ({ path: clashPath(field.anchor), value: field.ours })),
109
+ ...changed,
110
+ ].map((field) => `${label(field.path)}: ${shownValue(field.value)}`);
111
+ return ours.length ? `${message} You had set ${listLabels(ours)}.` : message;
112
+ }
113
+ }
@@ -1,3 +1,4 @@
1
+ import { staticDataValue } from '@conloca/mdx/render';
1
2
  import type { MdxJsxFlowElement } from 'mdast-util-mdx-jsx';
2
3
 
3
4
  /**
@@ -46,13 +47,11 @@ export function stripBodyFields(node: unknown): unknown {
46
47
  * - `prop={expression}` → object `{ type: 'mdxJsxAttributeValueExpression', value: '<src>' }`
47
48
  * - `prop` → `value: null` (shorthand boolean true)
48
49
  *
49
- * Expression values are parsed as JSON so numeric / boolean / array /
50
- * object literals (`<Box columns={3}>`, `<Card featured={true}>`,
51
- * `<Grid sizes={[1,2,3]}>`) reach the Astro component as real values
52
- * instead of being dropped. Non-JSON expressions (variable refs,
53
- * function calls) fall through as their literal source string — not
54
- * ideal but no worse than the previous "drop entirely" behavior, and
55
- * supporting JS evaluation properly needs a real parser.
50
+ * Expression values are read as static data the way publish reads them
51
+ * (`staticDataValue`), so JSON and the object-literal form formatters write
52
+ * (`<Box columns={3}>`, `<Grid sizes={[1, 2, 3,]}>`, `<Card cta={{ href: '/a' }}>`)
53
+ * reach the component as real values. Code (variable refs, function calls)
54
+ * falls through as its source string, which publish drops.
56
55
  */
57
56
  export function readAttrs(node: MdxJsxFlowElement): Record<string, unknown> {
58
57
  const out: Record<string, unknown> = {};
@@ -66,11 +65,8 @@ export function readAttrs(node: MdxJsxFlowElement): Record<string, unknown> {
66
65
  out[a.name] = true;
67
66
  } else if (typeof v === 'object' && 'value' in v && typeof v.value === 'string') {
68
67
  const src = v.value.trim();
69
- try {
70
- out[a.name] = JSON.parse(src);
71
- } catch {
72
- out[a.name] = src;
73
- }
68
+ const value = staticDataValue(src);
69
+ out[a.name] = value === undefined ? src : value;
74
70
  }
75
71
  }
76
72
  return out;
@@ -1,6 +1,7 @@
1
1
  import { type ContentMeta, type ContentMetaPatch, metaString, type UpdateResult } from '@conloca/content-api-client';
2
2
  import { getPageSchemas, type PageSchemaDescriptor, resolvePageSchemaEntry } from '../page-schemas.js';
3
3
  import type { PageMetadata } from '../types.js';
4
+ import { ApplyClashError } from './apply-clash.js';
4
5
  import { contentFailureMessage } from './content-failure.js';
5
6
 
6
7
  interface LocaleVersionMetaSource {
@@ -112,6 +113,8 @@ export function extractPageMetadata(
112
113
  pathname: localized.pathname || '/',
113
114
  publishDate: localized.publishAt ? new Date(localized.publishAt) : null,
114
115
  unpublishDate: localized.unpublishAt ? new Date(localized.unpublishAt) : null,
116
+ publishAtText: localized.publishAt,
117
+ unpublishAtText: localized.unpublishAt,
115
118
  robots: metaString(localized.meta.robots),
116
119
  canonical: metaString(localized.meta.canonical),
117
120
  customMeta,
@@ -161,16 +164,32 @@ export function buildMetadataUpdate(metadata: PageMetadata): MetadataUpdatePaylo
161
164
  ...custom,
162
165
  } as ContentMetaPatch,
163
166
  pathname: metadata.pathname,
164
- publishAt: metadata.publishDate?.toISOString() || null,
165
- unpublishAt: metadata.unpublishDate?.toISOString() || null,
167
+ publishAt: scheduleText(metadata.publishDate, metadata.publishAtText),
168
+ unpublishAt: scheduleText(metadata.unpublishDate, metadata.unpublishAtText),
166
169
  };
167
170
  }
168
171
 
172
+ /**
173
+ * The schedule text a save sends: the text the page was read with while `date` still falls in its minute (the form edits
174
+ * whole minutes), so an untouched `publishAt: 2024-01-01` is written back as it was; else the new instant.
175
+ */
176
+ function scheduleText(date: Date | null, stored: string | undefined): string | null {
177
+ if (!date) return null;
178
+ const sameMinute =
179
+ stored !== undefined && Math.floor(Date.parse(stored) / 60_000) === Math.floor(date.getTime() / 60_000);
180
+ if (sameMinute) return stored;
181
+ return date.toISOString();
182
+ }
183
+
169
184
  /**
170
185
  * What a page-settings save throws when the write failed, including one that resolved `{ success: false }`
171
- * instead of rejecting: the dialog then stays open with the author's edits and shows this message.
186
+ * instead of rejecting: the dialog then stays open with the author's edits and shows this message. A clash on
187
+ * the same fields is an {@link ApplyClashError}, whose fields the dialog reloads, or with `latest`, the page read again.
172
188
  */
173
- export function pageSettingsSaveError(result: UpdateResult): Error {
189
+ export function pageSettingsSaveError(result: UpdateResult, latest?: { page: PageMetadata; etag?: string }): Error {
190
+ const conflicts = result.conflictDetails?.conflicts;
191
+ if (conflicts && conflicts.length > 0)
192
+ return new ApplyClashError(conflicts, result.conflictDetails?.changedBy, latest);
174
193
  return new Error(
175
194
  result.reason === 'stale_write'
176
195
  ? 'Someone else saved this page first. Close the dialog, reload to pick up their changes, then try again.'
@@ -291,9 +310,8 @@ export function unflattenFromHints(value: Record<string, unknown>): Record<strin
291
310
  for (let i = 0; i < segments.length - 1; i++) {
292
311
  const seg = segments[i];
293
312
  const existing = Object.getOwnPropertyDescriptor(cursor, seg)?.value;
294
- if (!existing || typeof existing !== 'object') {
295
- setDataKey(cursor, seg, {});
296
- }
313
+ // A copy: the branch may be the form's own object, which a leaf written into it would change too.
314
+ setDataKey(cursor, seg, existing && typeof existing === 'object' ? { ...existing } : {});
297
315
  cursor = cursor[seg] as Record<string, unknown>;
298
316
  }
299
317
  setDataKey(cursor, segments[segments.length - 1], val);
@@ -104,3 +104,12 @@ export function fieldsOfMetadata(metadata: HostSchemaMetadata): FormFields {
104
104
  export function fieldsOfHostSchema(schema: HostSchema): FormFields {
105
105
  return fieldsOfMetadata(schema.metadata);
106
106
  }
107
+
108
+ /** The label a form shows for field `name`: camelCase and snake_case in Title Case. */
109
+ export function formatFieldLabel(name: string): string {
110
+ return name
111
+ .replace(/([A-Z])/g, ' $1')
112
+ .replace(/_/g, ' ')
113
+ .replace(/^\w/, (c) => c.toUpperCase())
114
+ .trim();
115
+ }
@@ -16,15 +16,15 @@ export type ContentMethodAccess = 'read' | 'write';
16
16
  * Removed client methods must also be removed from this classification;
17
17
  * browser-side helpers are not part of the content API's access boundary.
18
18
  *
19
- * `compileMDX` is a POST and still a read: it renders a preview of content
20
- * the caller already holds and persists nothing.
21
- *
22
19
  * `pullChanges` is a write. It rewrites the workspace tree from the remote;
23
20
  * that it destroys rather than creates does not make it an observation.
24
21
  */
25
22
  const CONTENT_METHOD_ACCESS = {
26
23
  getContent: 'read',
27
24
  getLocalized: 'read',
25
+ getClobbered: 'read',
26
+ // Dismissing deletes the record of a clobbered save.
27
+ dismissClobbered: 'write',
28
28
  createContent: 'write',
29
29
  updateLocalized: 'write',
30
30
  deleteContent: 'write',
@@ -35,7 +35,6 @@ const CONTENT_METHOD_ACCESS = {
35
35
  movePage: 'write',
36
36
  getFragments: 'read',
37
37
  getFragmentByName: 'read',
38
- compileMDX: 'read',
39
38
  getData: 'read',
40
39
  getDataByName: 'read',
41
40
  isDataNameAvailable: 'read',
@@ -86,6 +85,12 @@ export class ContentWriteRefusedError extends Error {
86
85
  }
87
86
 
88
87
  const WRITABLE: EditorWriteAccess = Object.freeze({ writable: true });
88
+ const writeOwners = new WeakMap<ContentAPIClient, ContentAPIClient>();
89
+
90
+ /** Access wrappers preserve the backend client's request lifetime without merging unrelated clients. */
91
+ export function contentWriteOwner(client: ContentAPIClient): ContentAPIClient {
92
+ return writeOwners.get(client) ?? client;
93
+ }
89
94
 
90
95
  /**
91
96
  * What the editor may do to content right now.
@@ -143,5 +148,6 @@ export function guardContentWrites(client: ContentAPIClient): ContentAPIClient {
143
148
  configurable: false,
144
149
  });
145
150
  }
151
+ writeOwners.set(guarded, contentWriteOwner(client));
146
152
  return guarded;
147
153
  }
@@ -106,6 +106,17 @@
106
106
  @utility border-line {
107
107
  border-color: var(--color-line);
108
108
  }
109
+ /* The dropdown chevron of `Select`. Here, in the public theme, so consumers of `@conloca/cms-spa/ui` get
110
+ * it too. A background image cannot use `currentColor`, so each theme has its own stroke (grey-04 on
111
+ * light, grey-08 on dark). A utility, not an arbitrary class: the data URI has spaces,
112
+ * which would split a class attribute into tokens. Not named bg-*: tailwind-merge would read that as a
113
+ * background colour and drop `bg-panel` or the position next to it. */
114
+ @utility select-chevron {
115
+ background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' viewBox='0 0 20 20'><path stroke='%235a5a5a' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m5 7.5 5 5 5-5'/></svg>");
116
+ }
117
+ @utility select-chevron-dark {
118
+ background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' viewBox='0 0 20 20'><path stroke='%23c3c3c3' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m5 7.5 5 5 5-5'/></svg>");
119
+ }
109
120
 
110
121
  /* Dark mode: selector strategy for manual toggle + system preference.
111
122
  * Uses :is() (not :where()) so dark variants beat any host site's
@@ -1,10 +0,0 @@
1
- import type { ContentData } from '@conloca/content-api-client';
2
- interface ContentDiffProps {
3
- localContent: ContentData;
4
- serverContent: ContentData;
5
- onResolve?: (resolvedContent: ContentData) => void;
6
- editable?: boolean;
7
- }
8
- export declare function ContentDiff({ localContent, serverContent, onResolve, editable }: ContentDiffProps): import("react").JSX.Element;
9
- export {};
10
- //# sourceMappingURL=ContentDiff.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ContentDiff.d.ts","sourceRoot":"","sources":["../../../../src/components/editor/ContentDiff.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAI/D,UAAU,gBAAgB;IACxB,YAAY,EAAE,WAAW,CAAC;IAC1B,aAAa,EAAE,WAAW,CAAC;IAC3B,SAAS,CAAC,EAAE,CAAC,eAAe,EAAE,WAAW,KAAK,IAAI,CAAC;IACnD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,wBAAgB,WAAW,CAAC,EAAE,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,QAAgB,EAAE,EAAE,gBAAgB,+BA0BzG"}
@@ -1,52 +0,0 @@
1
- import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useState } from 'react';
3
- import { Textarea } from '../ui/index.js';
4
- export function ContentDiff({ localContent, serverContent, onResolve, editable = false }) {
5
- // Determine content type
6
- const isMDX = localContent.mdx !== undefined || serverContent.mdx !== undefined;
7
- const isPuck = localContent.puckData !== undefined || serverContent.puckData !== undefined;
8
- if (isMDX) {
9
- return (_jsx(MDXDiff, { localMdx: localContent.mdx || '', serverMdx: serverContent.mdx || '', onResolve: editable ? (resolved) => onResolve?.({ mdx: resolved }) : undefined }));
10
- }
11
- if (isPuck) {
12
- return (_jsx(PuckDiff, { localPuck: localContent.puckData, serverPuck: serverContent.puckData, onResolve: editable ? (resolved) => onResolve?.({ puckData: resolved }) : undefined }));
13
- }
14
- return _jsx("div", { className: "text-grey-05 dark:text-grey-06", children: "No content to diff" });
15
- }
16
- function MDXDiff({ localMdx, serverMdx, onResolve }) {
17
- const [editableContent, setEditableContent] = useState(null);
18
- // Create git-style conflict markers
19
- const conflictContent = createMDXConflictMarkers(localMdx, serverMdx);
20
- const displayContent = editableContent ?? conflictContent;
21
- const isEditing = editableContent !== null;
22
- return (_jsxs("div", { className: "space-y-4", children: [_jsxs("div", { className: "flex justify-between items-center", children: [_jsx("h3", { className: "font-semibold", children: "MDX Content Conflict" }), _jsxs("div", { className: "flex gap-2", children: [!isEditing && onResolve && (_jsx("button", { type: "button", onClick: () => setEditableContent(conflictContent), className: "px-3 py-1 text-sm bg-azure-04 text-white rounded-md hover:bg-azure-03", children: "Edit to Resolve" })), isEditing && (_jsxs(_Fragment, { children: [_jsx("button", { type: "button", onClick: () => {
23
- onResolve?.(displayContent);
24
- setEditableContent(null);
25
- }, className: "px-3 py-1 text-sm bg-green-05 text-white rounded-md hover:bg-green-04", children: "Accept Resolution" }), _jsx("button", { type: "button", onClick: () => setEditableContent(null), className: "px-3 py-1 text-sm bg-grey-05 text-white rounded-md hover:bg-grey-04", children: "Cancel" })] }))] })] }), isEditing ? (_jsx(Textarea, { value: displayContent, onChange: (e) => setEditableContent(e.target.value), className: "h-96 p-4 font-mono text-sm", placeholder: "Resolve the conflict by editing the content..." })) : (_jsx("pre", { className: "p-4 bg-grey-12 dark:bg-grey-02 rounded-md border overflow-x-auto text-sm font-mono whitespace-pre-wrap", children: displayContent })), _jsxs("div", { className: "text-sm text-grey-04 dark:text-grey-07", children: [_jsxs("p", { children: [_jsx("strong", { children: "Instructions:" }), " Resolve conflicts by:"] }), _jsxs("ul", { className: "list-disc list-inside space-y-1", children: [_jsxs("li", { children: ["Remove the conflict markers (", _jsx("code", { children: "<<<<<<<" }), ", ", _jsx("code", { children: "=======" }), ",", ' ', _jsx("code", { children: ">>>>>>>" }), ")"] }), _jsx("li", { children: "Keep the content you want from either version" }), _jsx("li", { children: "Edit as needed to create the final version" })] })] })] }));
26
- }
27
- function PuckDiff({ localPuck, serverPuck, onResolve }) {
28
- const [selectedVersion, setSelectedVersion] = useState(null);
29
- return (_jsxs("div", { className: "space-y-4", children: [_jsxs("div", { className: "flex justify-between items-center", children: [_jsx("h3", { className: "font-semibold", children: "Puck Content Conflict" }), onResolve && selectedVersion && (_jsxs("button", { type: "button", onClick: () => onResolve(selectedVersion === 'local' ? localPuck : serverPuck), className: "px-3 py-1 text-sm bg-green-05 text-white rounded-md hover:bg-green-04", children: ["Use ", selectedVersion === 'local' ? 'Your' : 'Server', " Version"] }))] }), _jsxs("div", { className: "grid grid-cols-2 gap-4", children: [_jsxs("label", { className: `p-4 rounded-md border-2 cursor-pointer transition-colors ${selectedVersion === 'local'
30
- ? 'border-green-05 bg-green-11 dark:bg-green-02'
31
- : 'border-line bg-grey-12 dark:bg-grey-02 hover:border-grey-08 dark:hover:border-grey-06'}`, children: [_jsxs("h4", { className: "font-semibold mb-2 flex items-center gap-2", children: [_jsx("input", { type: "radio", name: "conflict-version", checked: selectedVersion === 'local', onChange: () => setSelectedVersion('local') }), _jsx("span", { "data-testid": "conflict-comparison-yours", children: "Your Version" })] }), _jsx("div", { className: "text-sm", children: _jsx(ComponentStructure, { data: localPuck }) })] }), _jsxs("label", { className: `p-4 rounded-md border-2 cursor-pointer transition-colors ${selectedVersion === 'server'
32
- ? 'border-red-04 bg-red-11 dark:bg-red-02'
33
- : 'border-line bg-grey-12 dark:bg-grey-02 hover:border-grey-08 dark:hover:border-grey-06'}`, children: [_jsxs("h4", { className: "font-semibold mb-2 flex items-center gap-2", children: [_jsx("input", { type: "radio", name: "conflict-version", checked: selectedVersion === 'server', onChange: () => setSelectedVersion('server') }), _jsx("span", { "data-testid": "conflict-comparison-server", children: "Server Version" })] }), _jsx("div", { className: "text-sm", children: _jsx(ComponentStructure, { data: serverPuck }) })] })] }), _jsx("div", { className: "text-sm text-grey-04 dark:text-grey-07", children: _jsxs("p", { children: [_jsx("strong", { children: "Instructions:" }), " Select the version you want to keep. For Puck content, you typically need to choose one complete version rather than merging."] }) })] }));
34
- }
35
- // Helper component to show Puck component structure
36
- function ComponentStructure({ data }) {
37
- if (!data?.content) {
38
- return _jsx("div", { className: "text-grey-06 dark:text-grey-05", children: "No content" });
39
- }
40
- const componentCount = data.content?.length || 0;
41
- const rootProps = data.root || {};
42
- return (_jsxs("div", { className: "space-y-2", children: [_jsxs("div", { children: [_jsx("strong", { children: "Components:" }), " ", componentCount] }), data.root?.title && (_jsxs("div", { children: [_jsx("strong", { children: "Page Title:" }), " ", data.root.title] })), Object.keys(rootProps).length > 0 && (_jsxs("details", { className: "cursor-pointer", children: [_jsx("summary", { className: "font-medium", children: "Root Properties" }), _jsx("pre", { className: "mt-1 text-xs overflow-x-auto", children: JSON.stringify(rootProps, null, 2) })] })), componentCount > 0 && (_jsxs("details", { className: "cursor-pointer", children: [_jsx("summary", { className: "font-medium", children: "Components" }), _jsx("div", { className: "mt-1 space-y-1", children: data.content.map((component) => (_jsxs("div", { className: "text-xs p-2 bg-white dark:bg-grey-02 rounded-md", children: [_jsx("strong", { children: component.type || 'Unknown' }), component.props?.title && ` - ${component.props.title}`] }, component.props.id))) })] }))] }));
43
- }
44
- // Create git-style conflict markers for MDX content
45
- function createMDXConflictMarkers(localMdx, serverMdx) {
46
- // For now, if content differs, show full conflict
47
- if (localMdx.trim() === serverMdx.trim()) {
48
- return localMdx; // No conflict
49
- }
50
- return ['<<<<<<< Your changes', localMdx, '=======', serverMdx, '>>>>>>> Server changes'].join('\n');
51
- }
52
- //# sourceMappingURL=ContentDiff.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ContentDiff.js","sourceRoot":"","sources":["../../../../src/components/editor/ContentDiff.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAS1C,MAAM,UAAU,WAAW,CAAC,EAAE,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,QAAQ,GAAG,KAAK,EAAoB;IACxG,yBAAyB;IACzB,MAAM,KAAK,GAAG,YAAY,CAAC,GAAG,KAAK,SAAS,IAAI,aAAa,CAAC,GAAG,KAAK,SAAS,CAAC;IAChF,MAAM,MAAM,GAAG,YAAY,CAAC,QAAQ,KAAK,SAAS,IAAI,aAAa,CAAC,QAAQ,KAAK,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