@conloca/cms-spa 0.2.5 → 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
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"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S,EACT,eAAe,EACf,WAAW,EACX,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,UAAU,EACV,WAAW,EACX,UAAU,EACV,cAAc,EACd,aAAa,EACb,gBAAgB,GACjB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAExF,OAAO,EACL,WAAW,EACX,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,eAAe,EACf,iBAAiB,EACjB,oBAAoB,EACpB,cAAc,EACd,YAAY,EACZ,KAAK,cAAc,EACnB,KAAK,QAAQ,GACd,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EAAE,wBAAwB,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC"}
package/dist/ts/index.js CHANGED
@@ -1,5 +1,9 @@
1
1
  // Export the mount component for embedding cms-spa inside another React app
2
2
  export { CmsSpaApp } from './CmsSpaApp.js';
3
+ // The field conflict picker and list, labelled from the site's Puck config
4
+ export { resolveConflictLabel } from './components/conflicts/conflict-label.js';
5
+ export { FieldConflictList } from './components/conflicts/FieldConflictList.js';
6
+ export { FieldConflictPicker, } from './components/conflicts/FieldConflictPicker.js';
3
7
  export { FolderTreeSidebar } from './components/media/FolderTreeSidebar.js';
4
8
  // Export media components for MDX editor image picker
5
9
  export { MediaLibrary } from './components/media/MediaLibrary.js';
@@ -16,6 +20,16 @@ export { invalidateEditorQueries, registerEditorQueriesForwarder } from './edito
16
20
  export { connectEditorFrame } from './frame/editor-frame.js';
17
21
  export { awaitParentHello } from './frame/parent-hello.js';
18
22
  export { buildUploadFormData } from './hooks/useUpload.js';
23
+ export { createDataBinding, dropHeldDataValues, hasHeldDataValues, readDataValues, useLiveDataValues, writeDataValues, } from './live/data-binding.js';
24
+ // The editor page's side of the co-edited docs, its hooks and per-user undo
25
+ export { createDocChannel, EDIT_ORIGIN, LOCAL_ORIGIN, RELAY_ORIGIN, useDocChannel, } from './live/doc-channel.js';
26
+ export { applyMarkdownEdit, caretAfterRemoteEdit, createEditorReplica, markdownBlockRanges, syncEditorReplica, writeEditorEdit, } from './live/markdown-binding.js';
27
+ export { markdownLivePlugin } from './live/markdown-live-plugin.js';
28
+ // Messages the parent and the editor page exchange while several people edit a page
29
+ export { readLiveHello, readLiveMessage, readLiveStatus, } from './live/messages.js';
30
+ export { createPuckBinding, PuckLiveBridge, readPuckData, usePeerOutlines, writePuckChange, } from './live/puck-binding.js';
31
+ export { createLocalUndo, interceptUndoKeys } from './live/undo.js';
32
+ export { anyHeld, applyDocEdits, flushLive, followHandovers, heldContent, useDocEdit, useDocEdits, useLiveDoc, useLiveMessage, useLiveStatus, usePresencePeers, } from './live/use-live.js';
19
33
  // Shrinks and checks an image before upload; the editor's parent page runs it on every upload it forwards
20
34
  export { prepareImageUpload, prepareUploadForm } from './media/prepare-image-upload.js';
21
35
  // Export configuration function
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAEA,4EAA4E;AAC5E,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAG3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,yCAAyC,CAAC;AAC5E,sDAAsD;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAChE,oBAAoB;AACpB,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,gCAAgC;AAChC,OAAO,EAAoB,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACrE,mEAAmE;AACnE,OAAO,EACL,0BAA0B,EAE1B,eAAe,EACf,iBAAiB,EACjB,wBAAwB,EACxB,0BAA0B,GAC3B,MAAM,mBAAmB,CAAC;AAC3B,mFAAmF;AACnF,OAAO,EAAE,uBA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CAAgC;AAChC,OAAO,EACL,WAAW,EAMX,eAAe,EACf,iBAAiB,EACjB,oBAAoB,EACpB,cAAc,EACd,YAAY,GAGb,MAAM,gBAAgB,CAAC;AACxB,mHAAmH;AACnH,4BAA4B;AAC5B,OAAO,EAAE,wBAAwB,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,67 @@
1
+ /**
2
+ * Binds a data entry's form to its replica: each valid change goes into the doc as it is typed, a value the schema
3
+ * rejects is held in the form unwritten, and changes made elsewhere (a teammate, a restore, undo) come back into the
4
+ * form without touching the held values.
5
+ */
6
+ import type { ContentData } from '@conloca/content-api';
7
+ import { type ItemIds } from '@conloca/content-api/ydoc';
8
+ import type * as Y from 'yjs';
9
+ import { type FrameLiveDoc } from './doc-channel.js';
10
+ /** A data entry's values, as the content API types them. */
11
+ type Values = NonNullable<ContentData['data']>;
12
+ export type ValidateData = (values: Values) => string | null;
13
+ /** What the form binds: its values, their change handler, and the held keys' errors. */
14
+ export interface LiveDataValues {
15
+ values: Values;
16
+ change: (values: Values) => void;
17
+ errors: Record<string, string>;
18
+ }
19
+ export declare function readDataValues(doc: Y.Doc): Values;
20
+ /**
21
+ * Writes what changed from `shadow` (the values last shown, with `shadowIds`, the ids of their list items) to
22
+ * `values` into the doc, over whatever it holds that the form has not been shown yet. Each changed key is validated
23
+ * over the doc's current data with that key set: a valid one is written, an invalid one is not, and comes back in
24
+ * `held` with its error. Lists change item by item, by the ids the form showed; the rest is merged against the doc.
25
+ * Returns `written`, the values the doc now has from the form (`shadow` plus the valid keys), and their ids: the next
26
+ * write's pair. A throw writes nothing (see `writePuckChange`).
27
+ */
28
+ export declare function writeDataValues(doc: Y.Doc, shadow: Values, shadowIds: ItemIds, values: Values, validate: ValidateData, beforeWrite?: (names: string[]) => void): {
29
+ ok: true;
30
+ held: Record<string, string>;
31
+ written: Values;
32
+ ids: ItemIds;
33
+ } | {
34
+ ok: false;
35
+ error: string;
36
+ };
37
+ /** Some entry holds values the schema rejected; a leave guard counts them as unsaved. */
38
+ export declare function hasHeldDataValues(): boolean;
39
+ /** The keys entry `entry` holds unwritten. */
40
+ export declare function heldDataKeys(entry: string): string[];
41
+ /** Lets go of the values `entry` (every entry, without one) holds unwritten, in the doc channel too. */
42
+ export declare function dropHeldDataValues(entry?: string): void;
43
+ /** One form mount's binding to its entry's replica. */
44
+ export interface DataBinding {
45
+ readonly live: FrameLiveDoc;
46
+ /** This user's undo over the entry's data and its lists. */
47
+ readonly undo: Y.UndoManager;
48
+ /** What the form shows: the doc's data with the held values over it. */
49
+ readonly values: Values;
50
+ /** The held keys' errors. */
51
+ readonly errors: Record<string, string>;
52
+ /** The form's onChange. A write that throws holds the replica; from then on the form keeps every change unwritten. */
53
+ change(values: Values): void;
54
+ /** The values to show after a change the form did not make, or null while held (the form stays as the user left it). */
55
+ reseed(): Values | null;
56
+ /** Marks the form mounted; the returned release lets go of the doc once no mount is left (see `ListUndo.retain`). */
57
+ retain(): () => void;
58
+ }
59
+ /** `entry` names the entry and locale, so held values outlive this binding (see `heldByEntry`). */
60
+ export declare function createDataBinding(live: FrameLiveDoc, validate: ValidateData, entry: string): DataBinding;
61
+ /**
62
+ * The form's values over the replica `live` of entry `entry` (id + locale): `change` writes valid keys at once and
63
+ * holds the rest, and a change made elsewhere re-renders with the doc's values, held keys kept.
64
+ */
65
+ export declare function useLiveDataValues(live: FrameLiveDoc, validate: ValidateData, entry: string): LiveDataValues;
66
+ export {};
67
+ //# sourceMappingURL=data-binding.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"data-binding.d.ts","sourceRoot":"","sources":["../../../src/live/data-binding.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAExD,OAAO,EAAsC,KAAK,OAAO,EAA6B,MAAM,2BAA2B,CAAC;AAExH,OAAO,KAAK,KAAK,CAAC,MAAM,KAAK,CAAC;AAE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,WAAW,WAAW;IAC1B,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC;IAC5B,4DAA4D;IAC5D,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC,WAAW,CAAC;IAC7B,wEAAwE;IACxE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,6BAA6B;IAC7B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACxC,sHAAsH;IACtH,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,wHAAwH;IACxH,MAAM,IAAI,MAAM,GAAG,IAAI,CAAC;IACxB,qHAAqH;IACrH,MAAM,IAAI,MAAM,IAAI,CAAC;CACtB;AAED,mGAAmG;AACnG,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,YAAY,EAAE,QAAQ,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,GAAG,WAAW,CA4DxG;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,YAAY,EAAE,QAAQ,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,GAAG,cAAc,CA0B3G"}
@@ -0,0 +1,215 @@
1
+ /**
2
+ * Binds a data entry's form to its replica: each valid change goes into the doc as it is typed, a value the schema
3
+ * rejects is held in the form unwritten, and changes made elsewhere (a teammate, a restore, undo) come back into the
4
+ * form without touching the held values.
5
+ */
6
+ import { mergeContent } from '@conloca/content-api/merge';
7
+ import { applyContentDiff, applyItemChanges, readItemIds, serializeDoc } from '@conloca/content-api/ydoc';
8
+ import { useEffect, useMemo, useReducer, useRef } from 'react';
9
+ import { getUIConfig } from '../ui-config.js';
10
+ import { HELD_WRITE_FAILED, LOCAL_ORIGIN } from './doc-channel.js';
11
+ import { createListUndo, interceptUndoKeys } from './undo.js';
12
+ const same = (a, b) => JSON.stringify(a) === JSON.stringify(b);
13
+ export function readDataValues(doc) {
14
+ return serializeDoc(doc).data ?? {};
15
+ }
16
+ /** `values` with `key` set to `next`'s value, or removed when `next` has none. */
17
+ function withKey(values, key, next) {
18
+ const out = { ...values };
19
+ if (Object.prototype.hasOwnProperty.call(next, key))
20
+ out[key] = next[key];
21
+ else
22
+ Reflect.deleteProperty(out, key);
23
+ return out;
24
+ }
25
+ /**
26
+ * Writes what changed from `shadow` (the values last shown, with `shadowIds`, the ids of their list items) to
27
+ * `values` into the doc, over whatever it holds that the form has not been shown yet. Each changed key is validated
28
+ * over the doc's current data with that key set: a valid one is written, an invalid one is not, and comes back in
29
+ * `held` with its error. Lists change item by item, by the ids the form showed; the rest is merged against the doc.
30
+ * Returns `written`, the values the doc now has from the form (`shadow` plus the valid keys), and their ids: the next
31
+ * write's pair. A throw writes nothing (see `writePuckChange`).
32
+ */
33
+ export function writeDataValues(doc, shadow, shadowIds, values, validate, beforeWrite) {
34
+ try {
35
+ const changed = [...new Set([...Object.keys(shadow), ...Object.keys(values)])].filter((key) => !same(shadow[key], values[key]));
36
+ if (changed.length === 0)
37
+ return { ok: true, held: {}, written: shadow, ids: shadowIds };
38
+ const current = readDataValues(doc);
39
+ const held = {};
40
+ let written = shadow;
41
+ for (const key of changed) {
42
+ const error = validate(withKey(current, key, values));
43
+ if (error === null)
44
+ written = withKey(written, key, values);
45
+ else
46
+ held[key] = error;
47
+ }
48
+ let ids = shadowIds;
49
+ doc.transact(() => {
50
+ const items = applyItemChanges(doc, { data: shadow }, shadowIds, { data: written }, LOCAL_ORIGIN, beforeWrite);
51
+ ids = items.ids;
52
+ const merged = mergeContent({
53
+ kind: 'vxjson',
54
+ base: { type: 'json', data: shadow },
55
+ ours: { type: 'json', data: items.rest.data },
56
+ theirs: { type: 'json', data: readDataValues(doc) },
57
+ }).value;
58
+ const data = typeof merged === 'object' && merged !== null && !Array.isArray(merged) ? merged.data : null;
59
+ // Never reached for a JSON object merge; an empty fallback would wipe the entry.
60
+ if (typeof data !== 'object' || data === null || Array.isArray(data))
61
+ throw new Error('merge lost the data');
62
+ applyContentDiff(doc, { data }, LOCAL_ORIGIN);
63
+ }, LOCAL_ORIGIN);
64
+ return { ok: true, held, written, ids };
65
+ }
66
+ catch (error) {
67
+ return { ok: false, error: error instanceof Error ? error.message : String(error) };
68
+ }
69
+ }
70
+ /**
71
+ * The values a form holds unwritten, with their errors and the doc they belong to, by entry (id + locale): a rebind or
72
+ * remount shows them again.
73
+ */
74
+ const heldByEntry = new Map();
75
+ /** The view of each replica whose write threw: its unwritten changes, which a remount must show again. */
76
+ const heldViews = new WeakMap();
77
+ /** Some entry holds values the schema rejected; a leave guard counts them as unsaved. */
78
+ export function hasHeldDataValues() {
79
+ return heldByEntry.size > 0;
80
+ }
81
+ /** The keys entry `entry` holds unwritten. */
82
+ export function heldDataKeys(entry) {
83
+ return Object.keys(heldByEntry.get(entry)?.errors ?? {});
84
+ }
85
+ /** Lets go of the values `entry` (every entry, without one) holds unwritten, in the doc channel too. */
86
+ export function dropHeldDataValues(entry) {
87
+ const dropped = entry === undefined ? [...heldByEntry.keys()] : [entry];
88
+ for (const key of dropped) {
89
+ const held = heldByEntry.get(key);
90
+ heldByEntry.delete(key);
91
+ if (held)
92
+ getUIConfig().docChannel?.setValuesHeld(held.docKey, null);
93
+ }
94
+ }
95
+ /** The entries of `ids` for the lists inside data keys `keys`, and the item lists nested in their items. */
96
+ function listsUnder(ids, keys) {
97
+ const out = {};
98
+ const owners = new Set();
99
+ // A list name is the JSON of its owner and path: ['d', '', key, …] for data, ['i', itemId, …] inside an item.
100
+ const inside = (name) => {
101
+ const steps = JSON.parse(name);
102
+ if (!Array.isArray(steps))
103
+ return false;
104
+ const [kind, owner, key] = steps;
105
+ return (kind === 'd' && keys.includes(key)) || (kind === 'i' && owners.has(owner));
106
+ };
107
+ for (let size = -1; size !== owners.size;) {
108
+ size = owners.size;
109
+ for (const [name, listIds] of Object.entries(ids)) {
110
+ if (name in out || !inside(name))
111
+ continue;
112
+ out[name] = listIds;
113
+ for (const id of listIds)
114
+ owners.add(id);
115
+ }
116
+ }
117
+ return out;
118
+ }
119
+ /** `entry` names the entry and locale, so held values outlive this binding (see `heldByEntry`). */
120
+ export function createDataBinding(live, validate, entry) {
121
+ let shadow = readDataValues(live.doc);
122
+ let shadowIds = readItemIds(live.doc);
123
+ let view = heldViews.get(live) ?? { ...shadow, ...heldByEntry.get(entry)?.values };
124
+ const listUndo = createListUndo(live.doc, ['data']);
125
+ const report = () => {
126
+ const errors = heldByEntry.get(entry)?.errors;
127
+ const message = errors ? `Not saved, not valid: ${Object.keys(errors).join(', ')}` : null;
128
+ getUIConfig().docChannel?.setValuesHeld(live.docKey, message);
129
+ };
130
+ return {
131
+ live,
132
+ get undo() {
133
+ return listUndo.undo;
134
+ },
135
+ retain: () => listUndo.retain(),
136
+ get values() {
137
+ return view;
138
+ },
139
+ get errors() {
140
+ return heldByEntry.get(entry)?.errors ?? {};
141
+ },
142
+ change(next) {
143
+ view = next;
144
+ if (live.held) {
145
+ heldViews.set(live, next);
146
+ return;
147
+ }
148
+ const written = writeDataValues(live.doc, shadow, shadowIds, next, validate, (names) => listUndo.track(names));
149
+ if (!written.ok) {
150
+ console.error('[live] could not write a data change', written.error);
151
+ heldViews.set(live, next);
152
+ live.hold(HELD_WRITE_FAILED);
153
+ return;
154
+ }
155
+ shadow = written.written;
156
+ shadowIds = written.ids;
157
+ const keys = Object.keys(written.held);
158
+ if (keys.length === 0)
159
+ heldByEntry.delete(entry);
160
+ else
161
+ heldByEntry.set(entry, {
162
+ values: Object.fromEntries(keys.map((key) => [key, next[key]])),
163
+ errors: written.held,
164
+ docKey: live.docKey,
165
+ });
166
+ report();
167
+ },
168
+ reseed() {
169
+ if (live.held)
170
+ return null;
171
+ const doc = readDataValues(live.doc);
172
+ const keys = heldDataKeys(entry);
173
+ // A held key stays at the base it was held over, with its ids: once fixed, its write diffs from what the user
174
+ // was shown, so it keeps whatever a teammate put into it meanwhile.
175
+ const ids = listsUnder(shadowIds, keys);
176
+ shadow = keys.reduce((out, key) => withKey(out, key, shadow), doc);
177
+ shadowIds = { ...readItemIds(live.doc), ...ids };
178
+ view = { ...doc, ...heldByEntry.get(entry)?.values };
179
+ return view;
180
+ },
181
+ };
182
+ }
183
+ /**
184
+ * The form's values over the replica `live` of entry `entry` (id + locale): `change` writes valid keys at once and
185
+ * holds the rest, and a change made elsewhere re-renders with the doc's values, held keys kept.
186
+ */
187
+ export function useLiveDataValues(live, validate, entry) {
188
+ const latest = useRef(validate);
189
+ latest.current = validate;
190
+ const binding = useMemo(() => createDataBinding(live, (values) => latest.current(values), entry), [live, entry]);
191
+ const [, rerender] = useReducer((count) => count + 1, 0);
192
+ useEffect(() => {
193
+ const onTransaction = (transaction) => {
194
+ if (transaction.origin !== LOCAL_ORIGIN && binding.reseed())
195
+ rerender();
196
+ };
197
+ live.doc.on('afterTransaction', onTransaction);
198
+ const stopKeys = interceptUndoKeys([window], binding.undo);
199
+ const release = binding.retain();
200
+ return () => {
201
+ live.doc.off('afterTransaction', onTransaction);
202
+ stopKeys();
203
+ release();
204
+ };
205
+ }, [binding, live]);
206
+ return {
207
+ values: binding.values,
208
+ errors: binding.errors,
209
+ change: (values) => {
210
+ binding.change(values);
211
+ rerender();
212
+ },
213
+ };
214
+ }
215
+ //# sourceMappingURL=data-binding.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"data-binding.js","sourceRoot":"","sources":["../../../src/live/data-binding.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAgB,WAAW,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACxH,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAE/D,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAqB,iBAAiB,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACtF,OAAO,EAAE,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H,MAAM,CAAC,EAAE,QAAQ,CAAC,GAAG,UAAU,CAAC,CAAC,KAAa,EAAE,EAAE,CAAC,KAAK,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;IACjE,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,aAAa,GAAG,CAAC,WAA0B,EAAE,EAAE;YACnD,IAAI,WAAW,CAAC,MAAM,KAAK,YAAY,IAAI,OAAO,CAAC,MAAM,EAAE;gBAAE,QAAQ,EAAE,CAAC;QAC1E,CAAC,CAAC;QACF,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,kBAAkB,EAAE,aAAa,CAAC,CAAC;QAC/C,MAAM,QAAQ,GAAG,iBAAiB,CAAC,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;QAC3D,MAAM,OAAO,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;QACjC,OAAO,GAAG,EAAE;YACV,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,kBAAkB,EAAE,aAAa,CAAC,CAAC;YAChD,QAAQ,EAAE,CAAC;YACX,OAAO,EAAE,CAAC;QACZ,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC;IACpB,OAAO;QACL,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,MAAM,EAAE,CAAC,MAAM,EAAE,EAAE;YACjB,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;YACvB,QAAQ,EAAE,CAAC;QACb,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,74 @@
1
+ /**
2
+ * The editor page's side of the co-edited docs: one replica `Y.Doc` per open doc, kept in step with the parent's over
3
+ * the frame port. Every frame edit is applied to its replica and sent as `doc.update` in the same tick, so the frame
4
+ * owes the parent nothing, except while a replica is held: then its work lives only here, shown with a copy-out notice
5
+ * until the page reloads, and the parent is told through `doc.held`.
6
+ */
7
+ import type { ContentData } from '@conloca/content-api';
8
+ import * as Y from 'yjs';
9
+ import type { EditorFlushResult } from '../editor-flush.js';
10
+ import type { FrameChannel } from '../frame/channel.js';
11
+ import { type DocOpenRequest, type LiveMessage, type LiveStatus, type PresencePeer } from './messages.js';
12
+ /** Edits by this user in this editor. */
13
+ export declare const LOCAL_ORIGIN: unique symbol;
14
+ /** Updates that came from the parent. */
15
+ export declare const RELAY_ORIGIN: unique symbol;
16
+ /** `useDocEdit` writes: sent to the parent, tracked by undo, and re-seeding every binding (unlike LOCAL_ORIGIN). */
17
+ export declare const EDIT_ORIGIN: unique symbol;
18
+ export declare const HELD_TOO_LARGE = "This change is too large to keep. Copy it out before reloading";
19
+ export declare const HELD_WRITE_FAILED = "This change could not be applied. Copy your changes, then reload the page.";
20
+ export interface FrameLiveDoc {
21
+ docKey: string;
22
+ doc: Y.Doc;
23
+ user: {
24
+ id: string;
25
+ name: string;
26
+ };
27
+ /** Its work is not in the parent: kept, read-only, until the page reloads. */
28
+ readonly held: boolean;
29
+ /** A binding whose write threw holds its replica with that notice. */
30
+ hold(message: string): void;
31
+ /** Destroys the replica, then closes its key in the parent; a held replica stays. */
32
+ close(): void;
33
+ }
34
+ export type DocChannelEvents = {
35
+ status: LiveStatus;
36
+ message: LiveMessage;
37
+ peers: {
38
+ docKey: string;
39
+ peers: PresencePeer[];
40
+ };
41
+ /** The parent replaced `docKey` with `live`; the binding moves, then closes the old one. */
42
+ replaced: {
43
+ docKey: string;
44
+ live: FrameLiveDoc;
45
+ };
46
+ };
47
+ export interface DocChannel {
48
+ /** Opens a doc; a held replica of the same page is handed back instead. `signal` closes a result nobody wants. */
49
+ open(req: DocOpenRequest, signal?: AbortSignal): Promise<FrameLiveDoc>;
50
+ /** The parent's answer; never ok on the frame's own say. */
51
+ flush(): Promise<EditorFlushResult>;
52
+ setSelection(docKey: string, blockId: string | null): void;
53
+ /** Null until the first `live.status` event; the parent sends none on subscribe. */
54
+ status(): LiveStatus | null;
55
+ peers(docKey: string): PresencePeer[];
56
+ live(docKey: string): FrameLiveDoc | undefined;
57
+ /** The notice of the first held replica or held values, or null when the frame owes nothing. */
58
+ held(): string | null;
59
+ heldContent(docKey: string): ContentData | null;
60
+ /** Values the editor holds unwritten for `docKey` (invalid data), with their notice; null releases them. */
61
+ setValuesHeld(docKey: string, message: string | null): void;
62
+ on<K extends keyof DocChannelEvents>(type: K, handler: (event: DocChannelEvents[K]) => void): () => void;
63
+ }
64
+ /** The channel plus its event intake, which the frame's port handler feeds. */
65
+ export interface FrameDocChannel extends DocChannel {
66
+ /** Takes a parent event; false when the name is not the doc channel's. */
67
+ receive(name: string, payload: unknown): boolean;
68
+ }
69
+ /** The message `useLiveDoc` shows for a refused open. */
70
+ export declare function openFailureMessage(error: unknown): string;
71
+ export declare function createDocChannel(channel: FrameChannel): FrameDocChannel;
72
+ /** The editor's doc channel, or null when the parent carries none (the editor keeps its save path); set once at mount. */
73
+ export declare function useDocChannel(): DocChannel | null;
74
+ //# sourceMappingURL=doc-channel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"doc-channel.d.ts","sourceRoot":"","sources":["../../../src/live/doc-channel.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAExD,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,EACL,KAAK,cAAc,EAEnB,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,YAAY,EAGlB,MAAM,eAAe,CAAC;AAEvB,yCAAyC;AACzC,eAAO,MAAM,YAAY,EAAE,OAAO,MAA6B,CAAC;AAChE,yCAAyC;AACzC,eAAO,MAAM,YAAY,EAAE,OAAO,MAA6B,CAAC;AAChE,oHAAoH;AACpH,eAAO,M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