@riverbankcms/sdk 0.80.0 → 0.81.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 (265) hide show
  1. package/dist/{PreviewEditorSidebar-QZG37QIF.mjs → PreviewEditorSidebar-RDCMEXIJ.mjs} +763 -255
  2. package/dist/{PreviewEditorUI-AXIKSMZA.mjs → PreviewEditorUI-NYGQ6K7B.mjs} +170 -29
  3. package/dist/SdkPreviewModeRuntime-AKCSCZEC.mjs +8 -0
  4. package/dist/_dts/api/src/contentRuntime.d.ts +12 -0
  5. package/dist/_dts/api/src/contentTypes.d.ts +6 -0
  6. package/dist/_dts/api/src/index.d.ts +2 -2
  7. package/dist/_dts/api/src/publicExperienceEndpoints.d.ts +53 -0
  8. package/dist/_dts/block-form/src/backend/store-backend.d.ts +3 -1
  9. package/dist/_dts/block-form/src/backend/types.d.ts +3 -3
  10. package/dist/_dts/blocks/src/PageRenderer.d.ts +3 -0
  11. package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +20 -28
  12. package/dist/_dts/blocks/src/index.d.ts +6 -4
  13. package/dist/_dts/blocks/src/primitives/content/components/Text.d.ts +1 -1
  14. package/dist/_dts/blocks/src/primitives/content/primitives.d.ts +1 -0
  15. package/dist/_dts/blocks/src/server.d.ts +1 -1
  16. package/dist/_dts/blocks/src/system/blocks/events/event-calendar.d.ts +3 -2
  17. package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +135 -0
  18. package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +5 -0
  19. package/dist/_dts/blocks/src/system/blocks/feature-cards.d.ts +2 -0
  20. package/dist/_dts/blocks/src/system/blocks/form.d.ts +20 -1
  21. package/dist/_dts/blocks/src/system/blocks/hero.d.ts +2 -0
  22. package/dist/_dts/blocks/src/system/blocks/offerings-preview/index.d.ts +19 -0
  23. package/dist/_dts/blocks/src/system/blocks/offerings-preview/model.d.ts +134 -0
  24. package/dist/_dts/blocks/src/system/componentFactory.d.ts +1 -0
  25. package/dist/_dts/blocks/src/system/constants/background.d.ts +1 -1
  26. package/dist/_dts/blocks/src/system/constants/blockKinds.d.ts +1 -1
  27. package/dist/_dts/blocks/src/system/customize/backgrounds.d.ts +13 -3
  28. package/dist/_dts/blocks/src/system/data/index.d.ts +2 -0
  29. package/dist/_dts/blocks/src/system/data/linkedContentEntries.d.ts +64 -0
  30. package/dist/_dts/blocks/src/system/data/loaderEndpoints.d.ts +1 -1
  31. package/dist/_dts/blocks/src/system/designCapabilities.d.ts +2 -2
  32. package/dist/_dts/blocks/src/system/fields/boxStyles.d.ts +6 -1
  33. package/dist/_dts/blocks/src/system/fragments/library/faqHeading.d.ts +0 -1
  34. package/dist/_dts/blocks/src/system/media/slotContracts.d.ts +2 -0
  35. package/dist/_dts/blocks/src/system/node/types.d.ts +8 -1
  36. package/dist/_dts/blocks/src/system/node/validation-constants.d.ts +1 -1
  37. package/dist/_dts/blocks/src/system/registry.d.ts +1 -0
  38. package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +44 -50
  39. package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +21 -24
  40. package/dist/_dts/blocks/src/system/runtime/headingDecoration.d.ts +21 -0
  41. package/dist/_dts/blocks/src/system/runtime/hooks/useCalendarEvents.d.ts +45 -14
  42. package/dist/_dts/blocks/src/system/runtime/hooks/useEventFilters.d.ts +2 -9
  43. package/dist/_dts/blocks/src/system/runtime/hooks/useEventPagination.d.ts +1 -10
  44. package/dist/_dts/blocks/src/system/runtime/nodes/basic.d.ts +1 -0
  45. package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCalendar.interactive.d.ts +21 -16
  46. package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCombined.client.d.ts +3 -2
  47. package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCombined.interactive.d.ts +21 -16
  48. package/dist/_dts/blocks/src/system/runtime/nodes/events/EventListing.interactive.d.ts +17 -28
  49. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/EventPaginatedListView.client.d.ts +2 -3
  50. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/WeekAgendaView.d.ts +3 -3
  51. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/listOptions.d.ts +50 -0
  52. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/utils.d.ts +2 -1
  53. package/dist/_dts/blocks/src/system/runtime/nodes/media.d.ts +29 -14
  54. package/dist/_dts/blocks/src/system/runtime/nodes/offerings-preview.d.ts +21 -0
  55. package/dist/_dts/blocks/src/system/runtime/resolver.d.ts +7 -0
  56. package/dist/_dts/blocks/src/system/transforms/registry/_utils/sectionForegroundStyles.d.ts +2 -0
  57. package/dist/_dts/blocks/src/system/transforms/registry/boxStyles.d.ts +4 -2
  58. package/dist/_dts/calendar/src/grid.d.ts +27 -0
  59. package/dist/_dts/calendar/src/index.d.ts +2 -2
  60. package/dist/_dts/content-editor/src/controller/useAutosaveTriggers.d.ts +3 -1
  61. package/dist/_dts/content-editor/src/editorTransactionState.d.ts +1 -0
  62. package/dist/_dts/content-editor/src/hooks/autosaveScopePlanning.d.ts +26 -0
  63. package/dist/_dts/content-editor/src/hooks/publishability.d.ts +1 -0
  64. package/dist/_dts/content-editor/src/hooks/useLinkedEntryAutosave.d.ts +23 -0
  65. package/dist/_dts/content-editor/src/hooks/useReactiveToolbar.d.ts +1 -1
  66. package/dist/_dts/content-editor/src/hooks/useSimpleAutosave.d.ts +2 -2
  67. package/dist/_dts/content-editor/src/index.d.ts +3 -1
  68. package/dist/_dts/content-editor/src/lib/json.d.ts +2 -0
  69. package/dist/_dts/content-editor/src/linkedEntries/domain.d.ts +8 -0
  70. package/dist/_dts/content-editor/src/ui/editorSnapshot.d.ts +58 -0
  71. package/dist/_dts/content-editor/src/ui/editorTransactionState.d.ts +93 -0
  72. package/dist/_dts/content-editor/src/ui/editorUiStore.d.ts +60 -3
  73. package/dist/_dts/content-editor/src/ui/stores/autosaveStore.d.ts +2 -0
  74. package/dist/_dts/content-editor/src/ui/stores/types.d.ts +1 -1
  75. package/dist/_dts/content-model/src/content-types/builtins.d.ts +43 -0
  76. package/dist/_dts/content-model/src/metadataConfig.d.ts +87 -47
  77. package/dist/_dts/core/src/branded.d.ts +5 -0
  78. package/dist/_dts/core/src/index.d.ts +1 -0
  79. package/dist/_dts/core/src/stable-json.d.ts +1 -0
  80. package/dist/_dts/editor/src/EditorProvider.d.ts +26 -0
  81. package/dist/_dts/editor/src/chrome/EditorChrome.d.ts +26 -0
  82. package/dist/_dts/editor/src/chrome/EditorStatusBar.d.ts +45 -0
  83. package/dist/_dts/editor/src/chrome/statusBarPresentation.d.ts +25 -0
  84. package/dist/_dts/editor/src/components/EditingToggle.d.ts +9 -0
  85. package/dist/_dts/editor/src/hooks/useEditableElement.d.ts +18 -0
  86. package/dist/_dts/editor/src/index.d.ts +29 -0
  87. package/dist/_dts/editor/src/inline/InlineTextEditor.d.ts +1 -0
  88. package/dist/_dts/editor/src/lib/utils.d.ts +1 -0
  89. package/dist/_dts/editor/src/primitives/EditorPrimitivesProvider.d.ts +20 -0
  90. package/dist/_dts/editor/src/primitives/InlineFieldContext.d.ts +11 -0
  91. package/dist/_dts/editor/src/primitives/SaveContext.d.ts +12 -0
  92. package/dist/_dts/editor/src/primitives/helpers.d.ts +1 -0
  93. package/dist/_dts/editor/src/primitives/rich-text/RichTextEditorSurface.d.ts +26 -0
  94. package/dist/_dts/editor/src/primitives/rich-text/RichTextToolbar.d.ts +16 -0
  95. package/dist/_dts/editor/src/primitives/rich-text/config.d.ts +23 -0
  96. package/dist/_dts/editor/src/primitives/rich-text/extensions/RichTextImage.d.ts +2 -0
  97. package/dist/_dts/editor/src/primitives/rich-text/extensions/RichTextLink.d.ts +1 -0
  98. package/dist/_dts/editor/src/primitives/rich-text/imageActions.d.ts +22 -0
  99. package/dist/_dts/editor/src/primitives/rich-text/sanitize.d.ts +23 -0
  100. package/dist/_dts/editor/src/primitives/rich-text/toolbar/BlockTypeDropdown.d.ts +6 -0
  101. package/dist/_dts/editor/src/primitives/rich-text/toolbar/LinkPopover.d.ts +10 -0
  102. package/dist/_dts/editor/src/primitives/rich-text/toolbar/ToolbarIconButton.d.ts +11 -0
  103. package/dist/_dts/editor/src/primitives/rich-text/toolbar/linkPopoverUtils.d.ts +58 -0
  104. package/dist/_dts/editor/src/primitives/rich-text/useRichTextEditor.d.ts +19 -0
  105. package/dist/_dts/editor/src/primitives/rich-text/utils.d.ts +20 -0
  106. package/dist/_dts/editor/src/utils/optimisticTokens.d.ts +27 -0
  107. package/dist/_dts/editor-blocks/src/BlockEditor.d.ts +2 -2
  108. package/dist/_dts/editor-blocks/src/block-editor/BlockCard.d.ts +3 -3
  109. package/dist/_dts/editor-blocks/src/block-editor/BlockCardHeader.d.ts +4 -4
  110. package/dist/_dts/editor-blocks/src/block-editor/SortableBlockItem.d.ts +2 -2
  111. package/dist/_dts/editor-blocks/src/block-editor/actionPresentation.d.ts +15 -0
  112. package/dist/_dts/editor-blocks/src/block-editor/blockHeaderActionPlan.d.ts +49 -0
  113. package/dist/_dts/editor-blocks/src/widgets/index.d.ts +1 -0
  114. package/dist/_dts/editor-blocks/src/widgets/rich-text/RichTextWidgetProvider.d.ts +1 -1
  115. package/dist/_dts/editor-blocks/src/widgets/rich-text/useImagePicker.d.ts +1 -1
  116. package/dist/_dts/editor-blocks/src/widgets/site-option-picker/SiteOptionPickerField.d.ts +3 -0
  117. package/dist/_dts/editor-blocks/src/widgets/site-option-picker/SiteOptionWidgetProvider.d.ts +14 -0
  118. package/dist/_dts/editor-blocks/src/widgets/site-option-picker/index.d.ts +6 -0
  119. package/dist/_dts/editor-blocks/src/widgets/site-option-picker/loaders.d.ts +51 -0
  120. package/dist/_dts/editor-blocks/src/widgets/site-option-picker/types.d.ts +20 -0
  121. package/dist/_dts/editor-blocks/src/widgets/site-option-picker/utils.d.ts +5 -0
  122. package/dist/_dts/media-core/src/index.d.ts +1 -0
  123. package/dist/_dts/media-core/src/renderableMediaAsset.d.ts +18 -0
  124. package/dist/_dts/media-editor/src/MediaEditor.d.ts +4 -1
  125. package/dist/_dts/media-editor/src/MediaPickerDialog.d.ts +2 -1
  126. package/dist/_dts/media-editor/src/index.d.ts +1 -1
  127. package/dist/_dts/preview-next/src/client/blocks/BlockToolbar.d.ts +3 -2
  128. package/dist/_dts/preview-next/src/client/blocks/EditablePageRenderer.d.ts +5 -1
  129. package/dist/_dts/preview-next/src/client/blocks/blockCustomizePopoverRows.d.ts +25 -0
  130. package/dist/_dts/preview-next/src/client/blocks/composer/mergeDrafts.d.ts +2 -1
  131. package/dist/_dts/preview-next/src/client/blocks/composer/types.d.ts +4 -30
  132. package/dist/_dts/preview-next/src/client/blocks/linkedEntryRenderOverlay.d.ts +11 -0
  133. package/dist/_dts/preview-next/src/client/blocks/previewCustomizeActions.d.ts +3 -9
  134. package/dist/_dts/preview-next/src/client/blocks/useBlockCustomizeControls.d.ts +2 -1
  135. package/dist/_dts/preview-next/src/client/index.d.ts +0 -1
  136. package/dist/_dts/preview-next/src/client/preview/EntryEditorPanel.d.ts +3 -1
  137. package/dist/_dts/preview-next/src/client/preview/LinkedEntryEditEventBridge.d.ts +1 -0
  138. package/dist/_dts/preview-next/src/client/preview/PageBlockEditorPanel.d.ts +3 -1
  139. package/dist/_dts/preview-next/src/client/preview/PreviewChromeLayer.d.ts +20 -0
  140. package/dist/_dts/preview-next/src/client/preview/PreviewDesignHistoryOrderContext.d.ts +13 -0
  141. package/dist/_dts/preview-next/src/client/preview/PreviewOpenEditorButton.d.ts +1 -1
  142. package/dist/_dts/preview-next/src/client/preview/PreviewShell.d.ts +19 -19
  143. package/dist/_dts/preview-next/src/client/preview/PreviewSidebarSection.d.ts +13 -0
  144. package/dist/_dts/preview-next/src/client/preview/SiteChromeCustomizeContext.d.ts +47 -4
  145. package/dist/_dts/preview-next/src/client/preview/StyleConfigurator.state.d.ts +14 -1
  146. package/dist/_dts/preview-next/src/client/preview/linkedEntryEditEvents.d.ts +5 -0
  147. package/dist/_dts/preview-next/src/client/preview/previewChromePlacement.d.ts +46 -0
  148. package/dist/_dts/preview-next/src/client/preview/previewCustomizeControls.d.ts +68 -0
  149. package/dist/_dts/preview-next/src/client/preview/previewCustomizeHistory.d.ts +8 -1
  150. package/dist/_dts/preview-next/src/client/preview/previewCustomizeWorkflowState.d.ts +11 -9
  151. package/dist/_dts/preview-next/src/client/preview/previewDesignHistoryOrder.d.ts +18 -0
  152. package/dist/_dts/preview-next/src/client/preview/previewUndoDomains.d.ts +1 -1
  153. package/dist/_dts/preview-next/src/client/preview/siteChromeBrandPreferences.d.ts +41 -0
  154. package/dist/_dts/preview-next/src/client/preview/siteChromeQuickControlHistoryState.d.ts +101 -0
  155. package/dist/_dts/preview-next/src/client/preview/siteChromeSavePlan.d.ts +29 -0
  156. package/dist/_dts/preview-next/src/client/preview/siteStyleHistoryState.d.ts +55 -0
  157. package/dist/_dts/preview-next/src/client/preview/styleConfiguratorApplyPayload.d.ts +1 -0
  158. package/dist/_dts/preview-next/src/client/widgets/widgetAdapters.d.ts +2 -1
  159. package/dist/_dts/preview-next/src/client/widgets/widgetOverrides.d.ts +3 -2
  160. package/dist/_dts/preview-next/src/constants.d.ts +0 -1
  161. package/dist/_dts/sdk/src/cli/config-loader.d.ts +3 -1
  162. package/dist/_dts/sdk/src/cli/content/reader.d.ts +5 -3
  163. package/dist/_dts/sdk/src/cli/site-commands/commandSurfaceDispatch.d.ts +1 -0
  164. package/dist/_dts/sdk/src/cli/site-commands/pageCommands.d.ts +3 -1
  165. package/dist/_dts/sdk/src/cli/site-commands/pushExecution.d.ts +1 -0
  166. package/dist/_dts/sdk/src/config/types.d.ts +1 -1
  167. package/dist/_dts/sdk/src/config/validation.d.ts +3 -3
  168. package/dist/_dts/sdk/src/contracts/system-block-content.d.ts +28 -2
  169. package/dist/_dts/sdk/src/public-api/contracts.d.ts +10 -0
  170. package/dist/_dts/sdk/src/rendering/islands/types.d.ts +42 -0
  171. package/dist/_dts/sdk/src/rendering/mediaAssets.d.ts +4 -0
  172. package/dist/_dts/sdk/src/types/block-kinds.d.ts +1 -1
  173. package/dist/_dts/sdk/src/version.d.ts +1 -1
  174. package/dist/_dts/theme-core/src/buttons/constants.d.ts +26 -1
  175. package/dist/_dts/theme-core/src/buttons/personalities/index.d.ts +11 -0
  176. package/dist/_dts/theme-core/src/buttons/personalities/joy-stamp.d.ts +22 -0
  177. package/dist/_dts/theme-core/src/buttons/personalities/types.d.ts +1 -0
  178. package/dist/_dts/theme-core/src/buttons/types.d.ts +9 -0
  179. package/dist/_dts/theme-core/src/cards/siteStyleDefaults.d.ts +44 -0
  180. package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
  181. package/dist/_dts/theme-core/src/interactive/types.d.ts +10 -0
  182. package/dist/_dts/theme-core/src/mock-themes/all.d.ts +27 -6
  183. package/dist/_dts/theme-core/src/palette/variants/index.d.ts +15 -0
  184. package/dist/_dts/theme-core/src/palette/variants/warm-dark.d.ts +27 -0
  185. package/dist/_dts/theme-core/src/schema.d.ts +40 -3
  186. package/dist/_dts/theme-core/src/site-styles/accessibleSurfaces.d.ts +4 -1
  187. package/dist/_dts/theme-core/src/site-styles/appearancePresetCatalog.d.ts +87 -31
  188. package/dist/_dts/theme-core/src/site-styles/appearancePresetResolution.d.ts +6 -2
  189. package/dist/_dts/theme-core/src/site-styles/blockAppearancePresets.d.ts +87 -31
  190. package/dist/_dts/theme-core/src/site-styles/curatedSiteStyles.d.ts +30 -1
  191. package/dist/_dts/theme-core/src/site-styles/designState.d.ts +18 -2
  192. package/dist/_dts/theme-core/src/site-styles/generatedSchemas.d.ts +6 -2
  193. package/dist/_dts/theme-core/src/site-styles/headerLooks.d.ts +5 -0
  194. package/dist/_dts/theme-core/src/site-styles/index.d.ts +1 -0
  195. package/dist/_dts/theme-core/src/site-styles/pageDesignEditorModel.d.ts +3 -23
  196. package/dist/_dts/theme-core/src/site-styles/pageDesignIntent.d.ts +276 -4
  197. package/dist/_dts/theme-core/src/site-styles/runtimeCompiler.d.ts +33 -3
  198. package/dist/_dts/theme-core/src/site-styles/sectionTransitions.d.ts +508 -0
  199. package/dist/_dts/theme-core/src/site-styles/sourceCatalogs.d.ts +10 -10
  200. package/dist/_dts/theme-core/src/site-styles/types.d.ts +24 -6
  201. package/dist/_dts/theme-core/src/site-styles/typographyPresets.d.ts +16 -1
  202. package/dist/{chunk-7PCYG6YV.mjs → chunk-3PTVPAT4.mjs} +1863 -1099
  203. package/dist/{chunk-5NZGBSJF.mjs → chunk-3QWQ2MUQ.mjs} +469 -1000
  204. package/dist/{chunk-HTB4BMKD.mjs → chunk-3VT7LZY2.mjs} +321 -113
  205. package/dist/{chunk-MPBNEVPB.mjs → chunk-4T5JIPWY.mjs} +1 -1
  206. package/dist/{chunk-BBLZSQEY.mjs → chunk-E3NZYEKF.mjs} +1 -7
  207. package/dist/{chunk-GYXKAUFV.mjs → chunk-WUHKQBB6.mjs} +9509 -2658
  208. package/dist/cli/index.mjs +1347 -324
  209. package/dist/client/{accordion-QFZMNB7O.mjs → accordion-SFIIZWNH.mjs} +2 -2
  210. package/dist/client/{bookingForm-NCIXFWIG.mjs → bookingForm-CFKZVWGA.mjs} +5 -5
  211. package/dist/client/bookings.mjs +281 -19
  212. package/dist/client/{carousel-EO4BJMWD.mjs → carousel-ELXWSBLA.mjs} +3 -3
  213. package/dist/client/{cart-FTYCLYUW.mjs → cart-6SSCPYY5.mjs} +6 -6
  214. package/dist/client/{checkout-NFGLVCOX.mjs → checkout-UFQ34HPV.mjs} +6 -6
  215. package/dist/client/{chunk-6GVVWSPU.mjs → chunk-76JUETXQ.mjs} +139 -186
  216. package/dist/client/{chunk-AUJ5DBZJ.mjs → chunk-7BXX7WXH.mjs} +112 -28
  217. package/dist/client/{chunk-IWFZSQNZ.mjs → chunk-G56BSZAM.mjs} +2 -2
  218. package/dist/client/{chunk-VDS5YFLX.mjs → chunk-IUEDYLFJ.mjs} +1 -1
  219. package/dist/client/{chunk-PYRBIURC.mjs → chunk-NP47RHIX.mjs} +5 -5
  220. package/dist/client/{chunk-PUOELU4O.mjs → chunk-NX6X3GRF.mjs} +330 -80
  221. package/dist/client/{chunk-Y37KDO7P.mjs → chunk-PA2LJH2M.mjs} +2 -2
  222. package/dist/client/{chunk-CE7IBGVW.mjs → chunk-RMWMT3ZD.mjs} +1 -1
  223. package/dist/client/{chunk-4W66ALYT.mjs → chunk-TCJS3NY5.mjs} +1 -1
  224. package/dist/client/{chunk-T6UIP6UZ.mjs → chunk-V6XI4M2Q.mjs} +1 -1
  225. package/dist/client/client.mjs +5924 -3138
  226. package/dist/client/{courseRegistration-2EORROPS.mjs → courseRegistration-HJIISAAG.mjs} +5 -5
  227. package/dist/client/{eventCalendar-WZI4VL6N.mjs → eventCalendar-F6YVUCZR.mjs} +7 -7
  228. package/dist/client/{eventCombined-QCB2TCNL.mjs → eventCombined-B5DSTIOK.mjs} +7 -7
  229. package/dist/client/{eventDetails-TFTATAPH.mjs → eventDetails-SEJDDHQC.mjs} +7 -7
  230. package/dist/client/{eventListing-A2CQEHEQ.mjs → eventListing-TPMWIIBO.mjs} +7 -7
  231. package/dist/client/{eventRegistration-OELPVLUY.mjs → eventRegistration-QU6W2PV6.mjs} +7 -7
  232. package/dist/client/{form-NTIFD6WQ.mjs → form-LVTYNTDE.mjs} +2 -2
  233. package/dist/client/{headerSection-7TBNKCLA.mjs → headerSection-SO3MFC4U.mjs} +54 -13
  234. package/dist/client/hooks.mjs +2266 -1179
  235. package/dist/client/{locationMap-LRLB5A3H.mjs → locationMap-5E5FLAKO.mjs} +2 -2
  236. package/dist/client/{newsletterForm-XI52RZSN.mjs → newsletterForm-GN32JEBQ.mjs} +2 -2
  237. package/dist/client/{productDetail-GSNKBFLY.mjs → productDetail-Q346KSVR.mjs} +6 -6
  238. package/dist/client/{productList-BGCGT4KZ.mjs → productList-DTDMQYGZ.mjs} +6 -6
  239. package/dist/client/rendering/client.mjs +4618 -3318
  240. package/dist/client/rendering/islands.mjs +32 -20
  241. package/dist/client/rendering.mjs +4898 -2108
  242. package/dist/client/{shop-RQHUCLNY.mjs → shop-OFUW7KPN.mjs} +6 -6
  243. package/dist/preview-next/client/runtime.mjs +5 -5
  244. package/dist/preview-next/constants.mjs +0 -2
  245. package/dist/preview-next/index.mjs +0 -2
  246. package/dist/{sdk-runtime-A4LHT2RS.mjs → sdk-runtime-2GIX6I7X.mjs} +6 -6
  247. package/dist/server/components.mjs +4377 -1852
  248. package/dist/server/config-validation.mjs +2283 -1303
  249. package/dist/server/config.mjs +2283 -1303
  250. package/dist/server/data.mjs +2267 -1180
  251. package/dist/server/index.mjs +2 -1
  252. package/dist/server/next.mjs +4394 -1773
  253. package/dist/server/page-converter.mjs +1999 -1015
  254. package/dist/server/prebuild.mjs +1 -1
  255. package/dist/server/rendering/server.mjs +4482 -1857
  256. package/dist/server/rendering.mjs +4484 -1859
  257. package/dist/server/routing.mjs +2302 -1120
  258. package/dist/server/server.mjs +2284 -1197
  259. package/dist/server/theme-bridge.mjs +757 -85
  260. package/dist/server/theme.mjs +69 -4
  261. package/dist/styles/index.css +474 -65
  262. package/package.json +1 -1
  263. package/dist/SdkPreviewModeRuntime-XE5M4UKM.mjs +0 -8
  264. package/dist/_dts/editor-blocks/src/block-editor/actionControlMode.d.ts +0 -2
  265. package/dist/_dts/preview-next/src/client/preview/previewSurface.d.ts +0 -3
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { type ResolvedMediaTransform, type DirectImageUrlOptions } from '../../../../../media-core/src/index';
2
+ import { type ResolvedMediaTransform, type DirectImageUrlOptions, type RenderableMediaAsset, type RenderableMediaAssetIndex } from '../../../../../media-core/src/index';
3
3
  import type { Media } from '../../../lib/media';
4
4
  /**
5
5
  * Options for image URL resolution.
@@ -33,19 +33,8 @@ export type ResolveImageUrlContextInput = Readonly<{
33
33
  mediaAssetIndex?: MediaAssetIndex;
34
34
  mediaAssets?: readonly MediaAssetIndexItem[];
35
35
  }>;
36
- export type MediaAssetIndexItem = Readonly<{
37
- id: string;
38
- identifier?: string | null;
39
- storageBucket?: string;
40
- storagePath?: string;
41
- width?: number | null;
42
- height?: number | null;
43
- mimeType?: string;
44
- }>;
45
- export type MediaAssetIndex = Readonly<{
46
- byId: ReadonlyMap<string, MediaAssetIndexItem>;
47
- byIdentifier: ReadonlyMap<string, MediaAssetIndexItem>;
48
- }>;
36
+ export type MediaAssetIndexItem = RenderableMediaAsset;
37
+ export type MediaAssetIndex = RenderableMediaAssetIndex;
49
38
  export declare function buildMediaAssetIndex(assets: readonly MediaAssetIndexItem[] | undefined): MediaAssetIndex | undefined;
50
39
  export type ResolveImageSourceSetOptions = {
51
40
  widthCandidates?: readonly number[];
@@ -65,8 +54,30 @@ export type ResolvedImageSourceSet = {
65
54
  */
66
55
  fallbackSrc?: string;
67
56
  };
57
+ export type MediaUrlResolution = Readonly<{
58
+ kind: 'resolved';
59
+ url: string;
60
+ }> | Readonly<{
61
+ kind: 'unsupported-media-type';
62
+ mediaType: string | undefined;
63
+ }> | Readonly<{
64
+ kind: 'missing-storage-path';
65
+ assetId?: string;
66
+ identifier?: string | null;
67
+ }> | Readonly<{
68
+ kind: 'missing-site-context';
69
+ storagePath: string;
70
+ }> | Readonly<{
71
+ kind: 'missing-supabase-url';
72
+ message: string;
73
+ }> | Readonly<{
74
+ kind: 'missing-image-url';
75
+ assetId?: string;
76
+ identifier?: string | null;
77
+ }>;
68
78
  export declare function buildResolveImageUrlContext(input: ResolveImageUrlContextInput | undefined): ResolveImageUrlContext;
69
79
  export declare function resolveMediaStorageUrl(value: Media, context?: ResolveImageUrlContext | null, transformOptions?: DirectImageUrlOptions): string | undefined;
80
+ export declare function resolveMediaStorageUrlResult(value: Media, context?: ResolveImageUrlContext | null, transformOptions?: DirectImageUrlOptions): MediaUrlResolution;
70
81
  /**
71
82
  * Common image size presets.
72
83
  * Use these for consistent sizing across the application.
@@ -176,6 +187,8 @@ export type MediaNodeProps = {
176
187
  /** Optional block metadata injected by the runtime resolver */
177
188
  blockKind?: string | null;
178
189
  blockContent?: unknown;
190
+ /** Render-scoped media sidecar/context injected by PageRenderer. */
191
+ imageResolveContext?: ResolveImageUrlContext | null;
179
192
  };
180
193
  export type VideoPlaybackMode = 'inline' | 'background';
181
194
  export declare function resolveMediaNodeResponsiveImage(value: Media, size: ImageOptions, style: React.CSSProperties | undefined, slot: {
@@ -227,6 +240,8 @@ export declare const MediaNode: React.FC<MediaNodeProps>;
227
240
  * ```
228
241
  */
229
242
  export declare function resolveImageUrl(value: Media, options: ImageOptions, context?: ResolveImageUrlContext | null): string | undefined;
243
+ export declare function resolveImageUrlResult(value: Media, options: ImageOptions, context?: ResolveImageUrlContext | null): MediaUrlResolution;
230
244
  export declare function resolveImageUrlWithContext(value: Media, options: ImageOptions, context?: ResolveImageUrlContext | null, transformAspectRatio?: number | string): string | undefined;
245
+ export declare function resolveImageUrlWithContextResult(value: Media, options: ImageOptions, context?: ResolveImageUrlContext | null, transformAspectRatio?: number | string): MediaUrlResolution;
231
246
  export declare function resolveImageSourceSetWithContext(value: Media, options: ResolveImageSourceSetOptions, context?: ResolveImageUrlContext | null): ResolvedImageSourceSet | undefined;
232
247
  export {};
@@ -0,0 +1,21 @@
1
+ import type { PublicCourse } from "../../blocks/courses/shared/types";
2
+ import type { ButtonVariant, PublicEvent } from "../../blocks/events/shared/types";
3
+ import type { CardStylesContent } from "../../fields/boxStyles";
4
+ import { type BookingOfferingPresetSummary, type OfferingsPreviewEventDataKey, type OfferingsPreviewGroupOverride, type OfferingsPreviewRouteCandidate } from "../../blocks/offerings-preview/model";
5
+ type OfferingsPreviewProps = Readonly<{
6
+ bookingOfferingPresets?: readonly BookingOfferingPresetSummary[] | null;
7
+ groupOverrides?: readonly OfferingsPreviewGroupOverride[] | null;
8
+ cardStyles?: CardStylesContent;
9
+ itemLimit?: string | null;
10
+ buttonVariant?: ButtonVariant | null;
11
+ buttonText?: string | null;
12
+ emptyMessage?: string | null;
13
+ failedMessage?: string | null;
14
+ previewStage?: "published" | "preview" | null;
15
+ routeCandidates?: Readonly<{
16
+ routes?: readonly OfferingsPreviewRouteCandidate[] | null;
17
+ }> | null;
18
+ courses?: readonly PublicCourse[] | null;
19
+ }> & Partial<Record<OfferingsPreviewEventDataKey, readonly PublicEvent[] | null>>;
20
+ export declare function OfferingsPreviewNode(props: OfferingsPreviewProps): import("react/jsx-runtime").JSX.Element | null;
21
+ export default OfferingsPreviewNode;
@@ -3,8 +3,13 @@ import type { NodeDefinition } from "../node";
3
3
  import { bindingSchema } from "../node";
4
4
  import { type ThemeTokens } from "../theme";
5
5
  import type { TransformRegistry, RouteMap, PageIdentifierMap, EntryIdentifierMap } from "../transforms";
6
+ import type { ResolveImageUrlContext } from "./nodes/media";
6
7
  export type ViewModel = Record<string, unknown>;
7
8
  export type ComponentRegistry = Record<string, React.ElementType>;
9
+ export type PreviewTextFieldConstraints = Readonly<{
10
+ maxLength?: number;
11
+ }>;
12
+ export type PreviewFieldConstraintsMap = Readonly<Record<string, PreviewTextFieldConstraints | undefined>>;
8
13
  export type ResolverContext = {
9
14
  viewModel: ViewModel;
10
15
  registry: ComponentRegistry;
@@ -22,6 +27,8 @@ export type ResolverContext = {
22
27
  blockBindings?: Record<string, unknown>;
23
28
  editableRouteMetadataFieldIds?: ReadonlyArray<string>;
24
29
  fragmentRegistry?: Record<string, unknown>;
30
+ fieldConstraints?: PreviewFieldConstraintsMap;
31
+ imageResolveContext?: ResolveImageUrlContext;
25
32
  };
26
33
  /** @internal Exported for testing */
27
34
  export type ScopeEntry = {
@@ -0,0 +1,2 @@
1
+ import type { TransformContext } from "../core";
2
+ export declare function resolveSectionForegroundStyles(value: unknown, context: TransformContext): Record<string, string>;
@@ -147,14 +147,16 @@ type SectionHeadingColorOptions = {
147
147
  */
148
148
  export declare const sectionHeadingColorStyleTransform: TransformDefinition<SectionHeadingColorOptions>;
149
149
  /**
150
- * Resolves section text and heading colors from the background object.
150
+ * Resolves section foreground colors from the background object.
151
151
  *
152
152
  * The value should be the full `_sectionStyles.background` object.
153
153
  * Outputs:
154
154
  * - `color` and `--section-text-color` from background.textColor
155
155
  * - `--section-heading-color` from background.headingColor (falls back to textColor if not set)
156
+ * - `--section-link-color` from background.linkColor (falls back to textColor if not set)
157
+ * - `--section-supporting-color` from background.supportingColor (falls back to textColor if not set)
156
158
  *
157
- * This combined transform replaces separate textColor/headingColor transforms
159
+ * This combined transform replaces separate foreground color transforms
158
160
  * when both need to be applied to the same style prop.
159
161
  */
160
162
  export declare const sectionColorsStyleTransform: TransformDefinition<Record<string, never>>;
@@ -6,6 +6,21 @@
6
6
  * cells with `groupItemsByDate` from `./group`.
7
7
  */
8
8
  export type WeekStart = 'sunday' | 'monday';
9
+ export type CalendarViewportKind = 'month' | 'week';
10
+ export type WeekCalendarDays = readonly [Date, Date, Date, Date, Date, Date, Date];
11
+ export type MonthCalendarViewport = Readonly<{
12
+ kind: 'month';
13
+ anchorDate: Date;
14
+ days: readonly Date[];
15
+ title: string;
16
+ }>;
17
+ export type WeekCalendarViewport = Readonly<{
18
+ kind: 'week';
19
+ anchorDate: Date;
20
+ days: WeekCalendarDays;
21
+ title: string;
22
+ }>;
23
+ export type CalendarViewport = MonthCalendarViewport | WeekCalendarViewport;
9
24
  export declare const DAY_NAMES: readonly ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];
10
25
  export declare const MONTH_NAMES: readonly ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
11
26
  /**
@@ -31,6 +46,10 @@ export declare function getEndOfMonth(date: Date): Date;
31
46
  * in non-leap years).
32
47
  */
33
48
  export declare function addMonths(date: Date, months: number): Date;
49
+ /** Add (or subtract) days while preserving local time-of-day fields. */
50
+ export declare function addDays(date: Date, days: number): Date;
51
+ /** Shift a calendar anchor by the natural unit for a viewport kind. */
52
+ export declare function shiftCalendarAnchorDate(date: Date, view: CalendarViewportKind, steps: number): Date;
34
53
  /**
35
54
  * Get an inclusive 3-month window around `date`, returned as ISO strings
36
55
  * with UTC midnight bounds. Suitable for prefetching event windows when
@@ -47,6 +66,8 @@ export declare function getThreeMonthRange(date: Date): {
47
66
  export declare function getMonthCalendarDays(year: number, month: number, startOfWeek: WeekStart): Date[];
48
67
  /** Build the 7 dates of the week containing `baseDate`. */
49
68
  export declare function getWeekCalendarDays(baseDate: Date, startOfWeek: WeekStart): Date[];
69
+ /** Build the 7 dates of the week containing `baseDate` as a fixed-width tuple. */
70
+ export declare function getWeekCalendarDayTuple(baseDate: Date, startOfWeek: WeekStart): WeekCalendarDays;
50
71
  /**
51
72
  * Day-name labels reordered for the chosen week start. Pass a custom
52
73
  * `dayNames` array (length 7, Sunday-first) to localize.
@@ -58,3 +79,9 @@ export declare function getOrderedDayNames(startOfWeek: WeekStart, dayNames?: re
58
79
  * - week: "January 5 - 11, 2025" or "December 30 - January 5, 2025"
59
80
  */
60
81
  export declare function formatCalendarTitle(viewDate: Date, view: 'month' | 'week', days: Date[], monthNames?: readonly string[]): string;
82
+ export declare function buildCalendarViewport(input: Readonly<{
83
+ view: CalendarViewportKind;
84
+ anchorDate: Date;
85
+ startOfWeek: WeekStart;
86
+ monthNames?: readonly string[];
87
+ }>): CalendarViewport;
@@ -1,5 +1,5 @@
1
- export type { WeekStart } from './grid';
2
- export { getMonthCalendarDays, getWeekCalendarDays, getOrderedDayNames, formatCalendarTitle, formatDateKey, isToday, isSameLocalDay, addMonths, getStartOfMonth, getEndOfMonth, getThreeMonthRange, DAY_NAMES, MONTH_NAMES, MAX_EVENTS_PER_DAY, } from './grid';
1
+ export type { CalendarViewport, CalendarViewportKind, MonthCalendarViewport, WeekCalendarDays, WeekCalendarViewport, WeekStart, } from './grid';
2
+ export { addDays, buildCalendarViewport, getMonthCalendarDays, getWeekCalendarDays, getWeekCalendarDayTuple, getOrderedDayNames, formatCalendarTitle, formatDateKey, isToday, isSameLocalDay, addMonths, shiftCalendarAnchorDate, getStartOfMonth, getEndOfMonth, getThreeMonthRange, DAY_NAMES, MONTH_NAMES, MAX_EVENTS_PER_DAY, } from './grid';
3
3
  export type { TimetableInput, TimetableModel, TimetableDay, TimetableCell, TimetableBounds, TimetableDiagnostic, InvalidItemReason, TimetableView, } from './timetable';
4
4
  export { buildTimetableModel } from './timetable';
5
5
  export type { GroupItemsByDateAccessors } from './group';
@@ -1,10 +1,12 @@
1
1
  import type { useStoreAutosave } from '../hooks/useStoreAutosave';
2
2
  import type { useBlockAutosave } from '../hooks/useBlockAutosave';
3
+ import type { AutosaveHandle } from '../hooks/useSimpleAutosave';
3
4
  import type { createEditorUiStore } from '../ui/editorUiStore';
4
5
  type UseAutosaveTriggersProps = {
5
6
  uiStore: ReturnType<typeof createEditorUiStore>;
6
7
  metadataAutosave: ReturnType<typeof useStoreAutosave>;
7
8
  blockAutosave: ReturnType<typeof useBlockAutosave>;
9
+ linkedEntryAutosave?: AutosaveHandle | null;
8
10
  /** Content autosave - only provided for content entries (not pages) */
9
11
  contentAutosave?: ReturnType<typeof useStoreAutosave> | null;
10
12
  hasRoute: boolean;
@@ -23,5 +25,5 @@ type UseAutosaveTriggersProps = {
23
25
  * transition tracking. When a user continues editing during/after save,
24
26
  * status stays 'pending' but version increments, so we still trigger.
25
27
  */
26
- export declare function useAutosaveTriggers({ uiStore, metadataAutosave, blockAutosave, contentAutosave, hasRoute, enableTriggers, }: UseAutosaveTriggersProps): void;
28
+ export declare function useAutosaveTriggers({ uiStore, metadataAutosave, blockAutosave, linkedEntryAutosave, contentAutosave, hasRoute, enableTriggers, }: UseAutosaveTriggersProps): void;
27
29
  export {};
@@ -0,0 +1 @@
1
+ export * from './ui/editorTransactionState';
@@ -0,0 +1,26 @@
1
+ import type { EditorSyncState } from '../../../core/src/index';
2
+ import type { LinkedContentEntryId } from '../linkedEntries/domain';
3
+ import type { AutosaveStatus } from '../ui/stores/types';
4
+ export { unsafeAsLinkedContentEntryId, type LinkedContentEntryId, } from '../linkedEntries/domain';
5
+ export type EditorAutosaveScope = Readonly<{
6
+ kind: 'metadata';
7
+ }> | Readonly<{
8
+ kind: 'content';
9
+ }> | Readonly<{
10
+ kind: 'blocks';
11
+ }> | Readonly<{
12
+ kind: 'linkedEntry';
13
+ entryId: LinkedContentEntryId;
14
+ }>;
15
+ export type EditorAutosaveSchedulerKey = 'metadata' | 'content' | 'blocks' | 'linkedEntries';
16
+ export type AutosaveScopeSnapshot = Readonly<{
17
+ scope: EditorAutosaveScope;
18
+ syncState: EditorSyncState;
19
+ }>;
20
+ export type AutosaveStatusByScheduler = Readonly<Record<EditorAutosaveSchedulerKey, AutosaveStatus>>;
21
+ export declare function autosaveScopeKey(scope: EditorAutosaveScope): string;
22
+ export declare function autosaveSchedulerKey(scope: EditorAutosaveScope): EditorAutosaveSchedulerKey;
23
+ export declare function uniqueAutosaveSchedulerKeys(scopes: readonly EditorAutosaveScope[]): EditorAutosaveSchedulerKey[];
24
+ export declare function deriveDirtyAutosaveScopes(snapshots: readonly AutosaveScopeSnapshot[]): EditorAutosaveScope[];
25
+ export declare function hasAutosaveStatusFailure(statuses: AutosaveStatusByScheduler): boolean;
26
+ export declare function allAutosaveStatusesComplete(statuses: AutosaveStatusByScheduler): boolean;
@@ -31,6 +31,7 @@ export type PublishabilityAutosaveState = Readonly<{
31
31
  metadata: AutosaveStatus;
32
32
  content: AutosaveStatus;
33
33
  blocks: AutosaveStatus;
34
+ linkedEntries: AutosaveStatus;
34
35
  }>;
35
36
  export type DerivePublishabilityInput = Readonly<{
36
37
  unpublishedState: EditorUnpublishedState;
@@ -0,0 +1,23 @@
1
+ import type { ApiClient } from '../services';
2
+ import type { LinkedContentEntryId, LinkedContentTypeKey } from '../linkedEntries/domain';
3
+ import type { EditorUiStoreInstance } from '../ui/editorUiStore';
4
+ export type PendingLinkedEntrySave = Readonly<{
5
+ entryId: LinkedContentEntryId;
6
+ contentTypeKey: LinkedContentTypeKey;
7
+ content: Record<string, unknown>;
8
+ optimisticHash: string | null;
9
+ acknowledgedVersion: number;
10
+ }>;
11
+ export type LinkedEntrySaveResult = Readonly<{
12
+ entryId: LinkedContentEntryId;
13
+ content: Record<string, unknown>;
14
+ optimisticHash: string | null;
15
+ }>;
16
+ export type LinkedEntryAutosaveOptions = Readonly<{
17
+ uiStore: EditorUiStoreInstance;
18
+ apiClient: ApiClient;
19
+ siteId: string;
20
+ saveLinkedEntry?: (save: PendingLinkedEntrySave) => Promise<LinkedEntrySaveResult>;
21
+ }>;
22
+ export declare function collectPendingLinkedEntrySaves(uiStore: EditorUiStoreInstance): PendingLinkedEntrySave[];
23
+ export declare function useLinkedEntryAutosave({ uiStore, apiClient, siteId, saveLinkedEntry, }: LinkedEntryAutosaveOptions): import("./useSimpleAutosave").AutosaveHandle;
@@ -1,4 +1,4 @@
1
- import type { EditorStatusBarToolbar } from "@riverbankcms/editor";
1
+ import type { EditorStatusBarToolbar } from "../../../editor/src/index";
2
2
  /**
3
3
  * Builds a reactive toolbar for the editor status bar.
4
4
  *
@@ -23,8 +23,8 @@ type AutosaveConfig<TValues, TPayload> = {
23
23
  enabled?: boolean;
24
24
  /** UI store instance for updating autosave status */
25
25
  uiStore: EditorUiStoreInstance;
26
- /** Which autosave type: 'metadata', 'blocks', or 'content' */
27
- type: 'metadata' | 'blocks' | 'content';
26
+ /** Which autosave scheduler this hook updates */
27
+ type: 'metadata' | 'blocks' | 'content' | 'linkedEntries';
28
28
  };
29
29
  export type AutosaveHandle = {
30
30
  trigger: () => void;
@@ -4,6 +4,8 @@ export { useDebouncedLatestSave, type DebouncedLatestSaveConfig, type DebouncedL
4
4
  export { useSimpleAutosave, useMultiAutosave } from './hooks/useSimpleAutosave';
5
5
  export { useStoreAutosave, type StoreAutosaveConfig, type AutosaveScope } from './hooks/useStoreAutosave';
6
6
  export { useBlockAutosave, type BlockAutosaveOptions } from './hooks/useBlockAutosave';
7
+ export { collectPendingLinkedEntrySaves, useLinkedEntryAutosave, type LinkedEntryAutosaveOptions, type LinkedEntrySaveResult, type PendingLinkedEntrySave, } from './hooks/useLinkedEntryAutosave';
8
+ export { unsafeAsLinkedContentEntryId, unsafeAsLinkedContentTypeKey, type LinkedContentEntryId, type LinkedContentTypeKey, } from './linkedEntries/domain';
7
9
  export { useEntryActions, type EntryActionsOptions } from './hooks/useEntryActions';
8
10
  export { useReactiveToolbar } from './hooks/useReactiveToolbar';
9
11
  export { isInvalidSaveability, selectHasInvalidBlocks } from './hooks/invalidBlockSelectors';
@@ -16,7 +18,7 @@ export { EditableBlockProvider, useBlockData } from './components/EditableBlockP
16
18
  export { ContentFieldsForm, type ContentFieldsFormProps } from './components/ContentFieldsForm';
17
19
  export { useUISelector } from './ui/useUISelector';
18
20
  export { EditorUiStoreProvider, useEditorUiStore, useEditorUiStoreInstance, useOptionalEditorUiStoreInstance, createEditorUiStore } from './ui/editorUiStore';
19
- export type { ActivePreviewField, EditorUiStoreInstance, EditorUiState, PreviewSidebarTab, ViewportMode, ViewportWidth, ViewportState, ZoomLevel, } from './ui/editorUiStore';
21
+ export type { ActivePreviewField, EditorUiStoreInstance, EditorUiState, EditorPreviewInspectorStore, EditorLinkedEntrySnapshot, PreviewInspection, PreviewSidebarTab, ViewportMode, ViewportWidth, ViewportState, ZoomLevel, } from './ui/editorUiStore';
20
22
  export { PreviewTextEditor } from './primitives/PreviewTextEditor';
21
23
  export { PreviewRichTextEditor } from './primitives/PreviewRichTextEditor';
22
24
  export { useStoreBinding, parseEditorPath } from './primitives/shared';
@@ -0,0 +1,2 @@
1
+ import type { JsonValue } from '../../../api/src/content-editor';
2
+ export declare function toJsonObject(value: Record<string, unknown>): Record<string, JsonValue>;
@@ -0,0 +1,8 @@
1
+ export type LinkedContentEntryId = string & {
2
+ readonly __linkedContentEntryId: unique symbol;
3
+ };
4
+ export type LinkedContentTypeKey = string & {
5
+ readonly __linkedContentTypeKey: unique symbol;
6
+ };
7
+ export declare function unsafeAsLinkedContentEntryId(value: string): LinkedContentEntryId;
8
+ export declare function unsafeAsLinkedContentTypeKey(value: string): LinkedContentTypeKey;
@@ -1,4 +1,5 @@
1
1
  import { unsafeAsEditorBlockId, unsafeAsEditorBlockValues, unsafeAsEditorContentValues, unsafeAsEditorEntryId, unsafeAsEditorMetadataValues, unsafeAsEditorPageId, unsafeAsEditorSiteId, type EditorBlockBaselineInput, type EditorBlockId, type EditorBlockPublishedBaselineInput, type EditorDraftBlockBaselineUpdateMetaInput, type EditorDraftBlockInitMetaInput, type EditorBlockValues, type EditorContentValues, type EditorEntryId, type EditorMetadataValues, type EditorPageId, type EditorPersistedBlock, type EditorSiteId, type EditorStructuralCommand, type EditorStructuralDraftSnapshot, type EditorSyncState, type EditorValueRecord } from '../../../core/src/index';
2
+ import { type LinkedContentEntryId, type LinkedContentTypeKey } from '../linkedEntries/domain';
2
3
  export { unsafeAsEditorBlockId, unsafeAsEditorBlockValues, unsafeAsEditorContentValues, unsafeAsEditorEntryId, unsafeAsEditorMetadataValues, unsafeAsEditorPageId, unsafeAsEditorSiteId, type EditorBlockId, type EditorBlockValues, type EditorContentValues, type EditorEntryId, type EditorMetadataValues, type EditorPageId, type EditorSiteId, };
3
4
  export type EditorCommand = {
4
5
  type: 'set-metadata-value';
@@ -23,6 +24,15 @@ export type EditorCommand = {
23
24
  type: 'replace-block';
24
25
  blockId: EditorBlockId;
25
26
  value: EditorBlockValues | null;
27
+ } | {
28
+ type: 'set-linked-entry-value';
29
+ entryId: string;
30
+ path: string;
31
+ value: unknown;
32
+ } | {
33
+ type: 'replace-linked-entry';
34
+ entryId: string;
35
+ value: EditorContentValues | null;
26
36
  } | EditorStructuralCommand | {
27
37
  type: 'batch';
28
38
  changes: readonly EditorCommand[];
@@ -51,6 +61,18 @@ export type EditorValueSnapshot<TValue extends EditorValueRecord | null> = Reado
51
61
  }>;
52
62
  type EditorMetadataSnapshot = EditorValueSnapshot<EditorMetadataValues | null>;
53
63
  type EditorContentSnapshot = EditorValueSnapshot<EditorContentValues | null>;
64
+ export type EditorLinkedEntryMeta = Readonly<{
65
+ entryId: LinkedContentEntryId;
66
+ contentTypeKey: LinkedContentTypeKey;
67
+ contentTypeLabel: string;
68
+ title: string;
69
+ titleField: string | null;
70
+ optimisticHash: string | null;
71
+ fields: readonly EditorValueRecord[];
72
+ }>;
73
+ export type EditorLinkedEntrySnapshot = EditorValueSnapshot<EditorContentValues | null> & Readonly<{
74
+ meta: EditorLinkedEntryMeta;
75
+ }>;
54
76
  export type EditorBlockMeta = Readonly<{
55
77
  kind: string;
56
78
  purpose: string | null;
@@ -96,6 +118,7 @@ export type EditorHistorySnapshot = Readonly<{
96
118
  */
97
119
  blockList: readonly NormalizedEditorBlockItem[];
98
120
  drafts: Readonly<Record<EditorBlockId, EditorDraftSnapshot>>;
121
+ linkedEntries: Readonly<Record<string, EditorLinkedEntrySnapshot>>;
99
122
  }>;
100
123
  export declare function requirePersistedEditorBlock(block: EditorBlockItem | NormalizedEditorBlockItem): PersistedEditorBlockItem;
101
124
  export declare function createEditorDraftSnapshotFromBlock(block: PersistedEditorBlockItem): EditorDraftSnapshot;
@@ -179,6 +202,33 @@ export type EditorSystemOperation = {
179
202
  } | {
180
203
  type: 'clear-draft-pending';
181
204
  blockId: EditorBlockId;
205
+ } | {
206
+ type: 'hydrate-linked-entry';
207
+ entryId: string;
208
+ contentTypeKey: string;
209
+ contentTypeLabel: string;
210
+ title: string;
211
+ titleField?: string | null;
212
+ optimisticHash?: string | null;
213
+ fields: readonly EditorValueRecord[];
214
+ baseline: EditorContentValues | null;
215
+ current?: EditorContentValues | null;
216
+ } | {
217
+ type: 'discard-linked-entry';
218
+ entryId: string;
219
+ } | {
220
+ type: 'save-linked-entry-succeeded';
221
+ entryId: string;
222
+ savedValues: EditorContentValues | null;
223
+ acknowledgedVersion: number;
224
+ optimisticHash?: string | null;
225
+ } | {
226
+ type: 'save-linked-entry-failed';
227
+ entryId: string;
228
+ message?: string;
229
+ } | {
230
+ type: 'clear-linked-entry-error';
231
+ entryId: string;
182
232
  } | {
183
233
  type: 'replace-block-list';
184
234
  next: readonly EditorBlockItem[];
@@ -210,7 +260,15 @@ export declare function autosaveDraftFailed(snapshot: EditorHistorySnapshot, blo
210
260
  export declare function clearDraftError(snapshot: EditorHistorySnapshot, blockId: EditorBlockId): EditorHistorySnapshot;
211
261
  export declare function setDraftPending(snapshot: EditorHistorySnapshot, blockId: EditorBlockId): EditorHistorySnapshot;
212
262
  export declare function clearDraftPending(snapshot: EditorHistorySnapshot, blockId: EditorBlockId): EditorHistorySnapshot;
263
+ export declare function hydrateLinkedEntrySnapshot(snapshot: EditorHistorySnapshot, input: Extract<EditorSystemOperation, {
264
+ type: 'hydrate-linked-entry';
265
+ }>): EditorHistorySnapshot;
266
+ export declare function discardLinkedEntrySnapshot(snapshot: EditorHistorySnapshot, entryId: string): EditorHistorySnapshot;
267
+ export declare function saveLinkedEntrySucceeded(snapshot: EditorHistorySnapshot, entryId: string, savedValues: EditorContentValues | null, acknowledgedVersion: number, optimisticHash?: string | null): EditorHistorySnapshot;
268
+ export declare function saveLinkedEntryFailed(snapshot: EditorHistorySnapshot, entryId: string, message?: string): EditorHistorySnapshot;
269
+ export declare function clearLinkedEntryError(snapshot: EditorHistorySnapshot, entryId: string): EditorHistorySnapshot;
213
270
  export declare function replaceEditorBlockList(snapshot: EditorHistorySnapshot, blockList: readonly EditorBlockItem[]): EditorHistorySnapshot;
214
271
  export declare function getDraftSnapshot(snapshot: EditorHistorySnapshot, blockId: string): EditorDraftSnapshot | null;
215
272
  export declare function inspectDrafts(snapshot: EditorHistorySnapshot): EditorDraftSnapshot[];
273
+ export declare function getLinkedEntrySnapshot(snapshot: EditorHistorySnapshot, entryId: string): EditorLinkedEntrySnapshot | null;
216
274
  export declare function hasUnpublishedDraftChanges(snapshot: EditorHistorySnapshot): boolean;
@@ -0,0 +1,93 @@
1
+ export type EditorTransaction<TAction, THistoryEntry, TTargetKey extends string = string> = Readonly<{
2
+ targetKey: TTargetKey;
3
+ action: TAction;
4
+ historyEntry: THistoryEntry | null;
5
+ }>;
6
+ export type EditorCommitPolicy = Readonly<{
7
+ kind: 'autosave-latest';
8
+ }> | Readonly<{
9
+ kind: 'staged';
10
+ }> | Readonly<{
11
+ kind: 'manual-flush';
12
+ }>;
13
+ export type EditorSaveBatch<TAction, THistoryEntry, TTargetKey extends string = string> = Readonly<{
14
+ transactions: readonly EditorTransaction<TAction, THistoryEntry, TTargetKey>[];
15
+ }>;
16
+ export type EditorTransactionFailure = Readonly<{
17
+ kind: 'retryable';
18
+ message: string;
19
+ } | {
20
+ kind: 'stale';
21
+ message: string;
22
+ }>;
23
+ export type EditorTransactionQueueState<TAction, THistoryEntry, TTargetKey extends string = string> = Readonly<{
24
+ kind: 'idle';
25
+ }> | Readonly<{
26
+ kind: 'dirty';
27
+ transactions: readonly EditorTransaction<TAction, THistoryEntry, TTargetKey>[];
28
+ }> | Readonly<{
29
+ kind: 'saving';
30
+ batch: EditorSaveBatch<TAction, THistoryEntry, TTargetKey>;
31
+ followUpTransactions: readonly EditorTransaction<TAction, THistoryEntry, TTargetKey>[];
32
+ }> | Readonly<{
33
+ kind: 'failed';
34
+ message: string;
35
+ transactions: readonly EditorTransaction<TAction, THistoryEntry, TTargetKey>[];
36
+ }> | Readonly<{
37
+ kind: 'stale';
38
+ message: string;
39
+ transactions: readonly EditorTransaction<TAction, THistoryEntry, TTargetKey>[];
40
+ }>;
41
+ export type EditorTransactionCapabilities = Readonly<{
42
+ canApplyTransaction: boolean;
43
+ canStartAutosave: boolean;
44
+ canUseHistory: boolean;
45
+ requiresReload: boolean;
46
+ }>;
47
+ export type EditorStagedTransaction<TSnapshot, THistoryEntry, TTargetKey extends string = string> = Readonly<{
48
+ commitPolicy: Extract<EditorCommitPolicy, {
49
+ kind: 'staged';
50
+ }>;
51
+ targetKey: TTargetKey;
52
+ base: TSnapshot;
53
+ preview: TSnapshot;
54
+ historyEntry: THistoryEntry | null;
55
+ }>;
56
+ export type EditorStagedSessionState<TSnapshot, THistoryEntry, TTargetKey extends string = string> = Readonly<{
57
+ kind: 'idle';
58
+ }> | Readonly<{
59
+ kind: 'active';
60
+ transaction: EditorStagedTransaction<TSnapshot, THistoryEntry, TTargetKey>;
61
+ }> | Readonly<{
62
+ kind: 'applying';
63
+ transaction: EditorStagedTransaction<TSnapshot, THistoryEntry, TTargetKey>;
64
+ }> | Readonly<{
65
+ kind: 'failed';
66
+ message: string;
67
+ transaction: EditorStagedTransaction<TSnapshot, THistoryEntry, TTargetKey>;
68
+ }> | Readonly<{
69
+ kind: 'stale';
70
+ message: string;
71
+ transaction: EditorStagedTransaction<TSnapshot, THistoryEntry, TTargetKey>;
72
+ }>;
73
+ export type EditorStagedSessionCapabilities = Readonly<{
74
+ canPreviewStaged: boolean;
75
+ canApplyStaged: boolean;
76
+ canCancelStaged: boolean;
77
+ isApplyingStaged: boolean;
78
+ requiresReload: boolean;
79
+ }>;
80
+ export declare function idleEditorTransactionQueueState<TAction, THistoryEntry, TTargetKey extends string = string>(): EditorTransactionQueueState<TAction, THistoryEntry, TTargetKey>;
81
+ export declare function idleEditorStagedSessionState<TSnapshot, THistoryEntry, TTargetKey extends string = string>(): EditorStagedSessionState<TSnapshot, THistoryEntry, TTargetKey>;
82
+ export declare function deriveTransactionCapabilities(state: EditorTransactionQueueState<unknown, unknown>): EditorTransactionCapabilities;
83
+ export declare function deriveStagedSessionCapabilities(state: EditorStagedSessionState<unknown, unknown>): EditorStagedSessionCapabilities;
84
+ export declare function beginStagedSession<TSnapshot, THistoryEntry, TTargetKey extends string = string>(state: EditorStagedSessionState<TSnapshot, THistoryEntry, TTargetKey>, transaction: EditorStagedTransaction<TSnapshot, THistoryEntry, TTargetKey>): EditorStagedSessionState<TSnapshot, THistoryEntry, TTargetKey>;
85
+ export declare function applyStagedSession<TSnapshot, THistoryEntry, TTargetKey extends string = string>(state: EditorStagedSessionState<TSnapshot, THistoryEntry, TTargetKey>): EditorStagedSessionState<TSnapshot, THistoryEntry, TTargetKey>;
86
+ export declare function confirmStagedSession<TSnapshot, THistoryEntry, TTargetKey extends string = string>(state: EditorStagedSessionState<TSnapshot, THistoryEntry, TTargetKey>): EditorStagedSessionState<TSnapshot, THistoryEntry, TTargetKey>;
87
+ export declare function rejectStagedSession<TSnapshot, THistoryEntry, TTargetKey extends string = string>(state: EditorStagedSessionState<TSnapshot, THistoryEntry, TTargetKey>, failure: EditorTransactionFailure): EditorStagedSessionState<TSnapshot, THistoryEntry, TTargetKey>;
88
+ export declare function cancelStagedSession<TSnapshot, THistoryEntry, TTargetKey extends string = string>(state: EditorStagedSessionState<TSnapshot, THistoryEntry, TTargetKey>): EditorStagedSessionState<TSnapshot, THistoryEntry, TTargetKey>;
89
+ export declare function enqueueTransaction<TAction, THistoryEntry, TTargetKey extends string = string>(state: EditorTransactionQueueState<TAction, THistoryEntry, TTargetKey>, transaction: EditorTransaction<TAction, THistoryEntry, TTargetKey>): EditorTransactionQueueState<TAction, THistoryEntry, TTargetKey>;
90
+ export declare function beginAutosaveBatch<TAction, THistoryEntry, TTargetKey extends string = string>(state: EditorTransactionQueueState<TAction, THistoryEntry, TTargetKey>): EditorTransactionQueueState<TAction, THistoryEntry, TTargetKey>;
91
+ export declare function confirmAutosaveBatch<TAction, THistoryEntry, TTargetKey extends string = string>(state: EditorTransactionQueueState<TAction, THistoryEntry, TTargetKey>): EditorTransactionQueueState<TAction, THistoryEntry, TTargetKey>;
92
+ export declare function rejectAutosaveBatch<TAction, THistoryEntry, TTargetKey extends string = string>(state: EditorTransactionQueueState<TAction, THistoryEntry, TTargetKey>, failure: EditorTransactionFailure): EditorTransactionQueueState<TAction, THistoryEntry, TTargetKey>;
93
+ export declare function coalesceQueuedTransactions<TAction, THistoryEntry, TTargetKey extends string = string>(queue: readonly EditorTransaction<TAction, THistoryEntry, TTargetKey>[], transaction: EditorTransaction<TAction, THistoryEntry, TTargetKey>): readonly EditorTransaction<TAction, THistoryEntry, TTargetKey>[];
@@ -3,15 +3,16 @@ import { type AutosaveState } from "./stores/autosaveStore";
3
3
  import { type ArrayKeysState } from "./stores/arrayKeysStore";
4
4
  import { type ViewportState } from "./stores/viewportStore";
5
5
  import { type AiOverlaysState } from "./stores/aiOverlaysSlice";
6
- import { type EditorValueSnapshot, type EditorBlockItem, type EditorBlockId, type NormalizedEditorBlockItem, type DraftBlockBaselineInput, type DraftBlockBaselineUpdateMetaInput, type DraftBlockInitMetaInput, type EditorCommand, type EditorContentValues, type EditorDraftSnapshot, type EditorEffect, type EditorHistorySnapshot, type EditorMetadataValues, type BlockPublishedBaselineInput } from "./editorHistory";
6
+ import { type EditorValueSnapshot, type EditorBlockItem, type EditorBlockId, type NormalizedEditorBlockItem, type DraftBlockBaselineInput, type DraftBlockBaselineUpdateMetaInput, type DraftBlockInitMetaInput, type EditorCommand, type EditorContentValues, type EditorDraftSnapshot, type EditorEffect, type EditorHistorySnapshot, type EditorLinkedEntrySnapshot, type EditorMetadataValues, type BlockPublishedBaselineInput } from "./editorHistory";
7
7
  import { type HistoryState } from "./editorHistory";
8
8
  import type { FocusRequest } from "./stores/types";
9
+ import { type LinkedContentEntryId } from "../linkedEntries/domain";
9
10
  import { type BlockDraftSaveability, type BlockDraftValidationIssue, type ResolveBlockManifest } from "./blockValidationView";
10
- export type { AutosaveStatusValue, AutosaveStatus, AutosaveHandle, AutosaveType, FocusRequest, ViewportMode, ViewportWidth, ZoomLevel, } from "./stores/types";
11
+ export type { AutosaveStatusValue, AutosaveStatus, AutosaveHandle, AutosaveType, AutosaveType as AutosaveSchedulerKey, FocusRequest, ViewportMode, ViewportWidth, ZoomLevel, } from "./stores/types";
11
12
  export type { AutosaveState } from "./stores/autosaveStore";
12
13
  export type { ArrayKeysState } from "./stores/arrayKeysStore";
13
14
  export type { ViewportState } from "./stores/viewportStore";
14
- export type { EditorCommand, EditorBlockItem, EditorDraftSnapshot, EditorHistorySnapshot, EditorEffect, } from "./editorHistory";
15
+ export type { EditorCommand, EditorBlockItem, EditorDraftSnapshot, EditorHistorySnapshot, EditorEffect, EditorLinkedEntrySnapshot, } from "./editorHistory";
15
16
  export type MetadataSnapshot = EditorValueSnapshot<EditorMetadataValues | null>;
16
17
  export type ContentSnapshot = EditorValueSnapshot<EditorContentValues | null>;
17
18
  export type PreviewSidebarTab = "editor" | "assistant";
@@ -48,6 +49,57 @@ export type MetadataState = {
48
49
  export type ContentState = Omit<MetadataState, "getSnapshot"> & {
49
50
  getSnapshot: () => ContentSnapshot;
50
51
  };
52
+ export type PreviewInspection = Readonly<{
53
+ kind: "none";
54
+ }> | Readonly<{
55
+ kind: "block-customize";
56
+ blockId: EditorBlockId;
57
+ requestId: number;
58
+ }> | Readonly<{
59
+ kind: "linked-entry";
60
+ entryId: LinkedContentEntryId;
61
+ requestId: number;
62
+ }>;
63
+ export type LinkedEntryState = {
64
+ getSelectedEntryId: () => LinkedContentEntryId | null;
65
+ open: (target: {
66
+ entryId: string;
67
+ contentTypeKey: string;
68
+ contentTypeLabel: string;
69
+ title: string;
70
+ optimisticHash?: string | null;
71
+ content: Record<string, unknown>;
72
+ contentType: {
73
+ titleField?: string | null;
74
+ fields: readonly Record<string, unknown>[];
75
+ };
76
+ }) => void;
77
+ close: () => void;
78
+ discard: (entryId?: string) => void;
79
+ getSelectedSnapshot: () => EditorLinkedEntrySnapshot | null;
80
+ getSnapshot: (entryId?: string) => EditorLinkedEntrySnapshot | null;
81
+ inspect: () => readonly EditorLinkedEntrySnapshot[];
82
+ getCurrentValues: (entryId?: string) => Record<string, unknown> | null;
83
+ setCurrentValues: (values: Record<string, unknown> | null, entryId?: string) => void;
84
+ setAtPath: (path: string, value: unknown, entryId?: string) => void;
85
+ getAtPath: <R = unknown>(path: string, entryId?: string) => R | undefined;
86
+ saveSucceeded: (entryId: string, content: Record<string, unknown> | null, acknowledgement?: AutosaveAcknowledgement & {
87
+ optimisticHash?: string | null;
88
+ }) => void;
89
+ saveFailed: (entryId: string, message?: string) => void;
90
+ clearError: (entryId?: string) => void;
91
+ };
92
+ export type EditorPreviewInspectorStore = {
93
+ getState: () => {
94
+ drafts: Pick<DraftsState, "inspect">;
95
+ aiOverlays?: Readonly<{
96
+ viewMode: AiOverlaysState["viewMode"];
97
+ overrides: AiOverlaysState["overrides"];
98
+ structure?: AiOverlaysState["structure"];
99
+ }>;
100
+ linkedEntries: Pick<LinkedEntryState, "inspect">;
101
+ };
102
+ };
51
103
  export type EditorHistoryState = HistoryState<EditorHistorySnapshot>;
52
104
  export type BlockValidationState = {
53
105
  markPathEdited: (blockId: EditorBlockId, path: string) => void;
@@ -112,11 +164,15 @@ type RestoreListener = (transition: {
112
164
  export type EditorUiState = {
113
165
  drawerOpen: boolean;
114
166
  previewSidebarTab: PreviewSidebarTab;
167
+ previewInspection: PreviewInspection;
115
168
  activePreviewField: ActivePreviewField;
116
169
  focusRequest: FocusRequest;
117
170
  activeBlockId: EditorBlockId | null;
118
171
  setDrawerOpen: (open: boolean) => void;
119
172
  setPreviewSidebarTab: (tab: PreviewSidebarTab) => void;
173
+ inspectBlock: (blockId: EditorBlockId) => void;
174
+ inspectLinkedEntry: (entryId: string) => void;
175
+ clearPreviewInspection: () => void;
120
176
  setActivePreviewField: (field: ActivePreviewField) => void;
121
177
  requestFocus: (payload: Omit<NonNullable<FocusRequest>, "requestId">) => void;
122
178
  clearFocus: () => void;
@@ -146,6 +202,7 @@ export type EditorUiState = {
146
202
  drafts: DraftsState;
147
203
  metadata: MetadataState;
148
204
  content: ContentState;
205
+ linkedEntries: LinkedEntryState;
149
206
  autosave: AutosaveState;
150
207
  arrayKeys: ArrayKeysState;
151
208
  viewport: ViewportState;