@riverbankcms/sdk 0.111.0 → 0.119.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 (196) hide show
  1. package/dist/{PreviewEditorSidebar-CTR6LUhN.mjs → PreviewEditorSidebar-C7TXFitV.mjs} +4 -4
  2. package/dist/{PreviewEditorUI-DZg15Zip.mjs → PreviewEditorUI-_1JIHTXS.mjs} +3 -3
  3. package/dist/{PreviewQueryProvider-kkmjklLG.mjs → PreviewQueryProvider-nKUT4TL-.mjs} +1 -1
  4. package/dist/{SdkPreviewModeRuntime-DeOTAFvR.mjs → SdkPreviewModeRuntime-CvJTVgWa.mjs} +2579 -34325
  5. package/dist/{SiteChromeCustomizeContext-DOSDLCiJ.mjs → SiteChromeCustomizeContext-66QfCbAS.mjs} +64625 -32791
  6. package/dist/_dts/ai/src/contracts/proposals.d.ts +5211 -639
  7. package/dist/_dts/ai/src/designer/themePatch.d.ts +1 -1
  8. package/dist/_dts/api/src/bookingAdjustments.d.ts +30 -36
  9. package/dist/_dts/api/src/bookingConfig.d.ts +26 -1
  10. package/dist/_dts/api/src/bookingRecords.d.ts +6 -74
  11. package/dist/_dts/api/src/bookingRefundOutcomes.d.ts +3 -3
  12. package/dist/_dts/api/src/contentRuntime.d.ts +5 -1
  13. package/dist/_dts/api/src/customerMembershipOutcomes.d.ts +4 -4
  14. package/dist/_dts/api/src/endpoints.d.ts +35 -0
  15. package/dist/_dts/api/src/event-presentation.d.ts +4 -0
  16. package/dist/_dts/api/src/index.d.ts +4 -4
  17. package/dist/_dts/api/src/navigation/dashboardBookingsNav.d.ts +4 -1
  18. package/dist/_dts/api/src/navigation/dashboardSettingsNav.d.ts +2 -2
  19. package/dist/_dts/api/src/sdk-event-upsert.d.ts +2 -2
  20. package/dist/_dts/api/src/sdkContracts.d.ts +85 -7
  21. package/dist/_dts/api/src/siteBanner.d.ts +8 -8
  22. package/dist/_dts/api/src/siteOperations.d.ts +1 -1
  23. package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +32 -4
  24. package/dist/_dts/block-form/src/widgets/RichTextField/richTextFieldDefaults.d.ts +3 -12
  25. package/dist/_dts/block-form/src/widgets/RichTextField/richTextFieldSchema.d.ts +1 -5
  26. package/dist/_dts/blocks/src/bindings/index.d.ts +1 -10
  27. package/dist/_dts/blocks/src/index.d.ts +3 -6
  28. package/dist/_dts/blocks/src/primitives/content/primitives.d.ts +2 -2
  29. package/dist/_dts/blocks/src/system/blocks/body-text.d.ts +2 -2
  30. package/dist/_dts/blocks/src/system/blocks/events/recurring-schedule.d.ts +2 -2
  31. package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +2 -8
  32. package/dist/_dts/blocks/src/system/blocks/feature-card-icons.d.ts +2 -2
  33. package/dist/_dts/blocks/src/system/blocks/feature-cards.d.ts +3 -3
  34. package/dist/_dts/blocks/src/system/blocks/form.d.ts +2 -15
  35. package/dist/_dts/blocks/src/system/blocks/intro.d.ts +2 -2
  36. package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +66 -66
  37. package/dist/_dts/blocks/src/system/blocks/newsletter-signup.d.ts +2 -16
  38. package/dist/_dts/blocks/src/system/blocks/site-footer.d.ts +0 -3
  39. package/dist/_dts/blocks/src/system/fragments/index.d.ts +0 -1
  40. package/dist/_dts/blocks/src/system/manifest/fieldValidation/index.d.ts +19 -2
  41. package/dist/_dts/blocks/src/system/manifest/richTextSchema.d.ts +8 -70
  42. package/dist/_dts/blocks/src/system/manifest/schema.d.ts +1 -0
  43. package/dist/_dts/blocks/src/system/manifest/validation.d.ts +6 -0
  44. package/dist/_dts/blocks/src/system/node/schema.d.ts +4 -4
  45. package/dist/_dts/blocks/src/system/runtime/nodes/basic.d.ts +1 -10
  46. package/dist/_dts/blocks/src/system/runtime/nodes/buttonAffordance.d.ts +5 -21
  47. package/dist/_dts/blocks/src/system/runtime/nodes/richText-coerce.d.ts +14 -2
  48. package/dist/_dts/blocks/src/system/transforms/typed.d.ts +1 -1
  49. package/dist/_dts/content-editor/src/controller/seedDraftBaselinesFromBlocks.d.ts +1 -1
  50. package/dist/_dts/content-editor/src/hooks/useBlockAutosave.d.ts +17 -1
  51. package/dist/_dts/content-editor/src/hooks/useDebouncedLatestSave.d.ts +1 -1
  52. package/dist/_dts/content-editor/src/hooks/useSimpleAutosave.d.ts +1 -1
  53. package/dist/_dts/content-editor/src/ui/editorSnapshot.d.ts +3 -2
  54. package/dist/_dts/content-editor/src/ui/editorUiStore.d.ts +2 -2
  55. package/dist/_dts/content-editor/src/ui/stores/autosaveStore.d.ts +1 -1
  56. package/dist/_dts/content-editor/src/ui/stores/types.d.ts +1 -1
  57. package/dist/_dts/content-model/src/content-types/builtins.d.ts +3 -15
  58. package/dist/_dts/content-model/src/content-types/entryValidation.d.ts +2 -0
  59. package/dist/_dts/content-model/src/content-types/schema.d.ts +1 -1
  60. package/dist/_dts/content-model/src/templates/defaults.d.ts +1 -21
  61. package/dist/_dts/core/src/editor-state.d.ts +14 -1
  62. package/dist/_dts/core/src/footer-composition.d.ts +2 -1
  63. package/dist/_dts/core/src/index.d.ts +1 -0
  64. package/dist/_dts/core/src/rich-text.d.ts +16 -0
  65. package/dist/_dts/db/src/generated/supabase/database.types.d.ts +189 -86
  66. package/dist/_dts/editor/src/index.d.ts +1 -1
  67. package/dist/_dts/editor/src/primitives/rich-text/utils.d.ts +3 -5
  68. package/dist/_dts/editor-blocks/src/BlockEditor.d.ts +1 -1
  69. package/dist/_dts/editor-blocks/src/block-editor/BlockCard.d.ts +2 -1
  70. package/dist/_dts/editor-blocks/src/block-editor/BlockCardHeader.d.ts +2 -1
  71. package/dist/_dts/editor-blocks/src/block-editor/blockDraftBaselineSeed.d.ts +15 -0
  72. package/dist/_dts/editor-blocks/src/block-editor/hooks/useBlockBaselineSync.d.ts +3 -7
  73. package/dist/_dts/editor-blocks/src/block-editor/hooks/useBlockDuplication.d.ts +12 -0
  74. package/dist/_dts/editor-blocks/src/block-editor/types.d.ts +1 -0
  75. package/dist/_dts/editor-blocks/src/block-editor/utils.d.ts +1 -1
  76. package/dist/_dts/editor-blocks/src/index.d.ts +6 -5
  77. package/dist/_dts/editor-blocks/src/widgets/rich-text/RichTextField.d.ts +2 -2
  78. package/dist/_dts/media-core/src/contentMediaAudit.d.ts +104 -0
  79. package/dist/_dts/media-core/src/contentMediaAuditFieldAdapter.d.ts +8 -0
  80. package/dist/_dts/media-core/src/contentMediaSnapshotAudit.d.ts +22 -0
  81. package/dist/_dts/media-core/src/index.d.ts +3 -1
  82. package/dist/_dts/sdk/src/cli/commands/event.d.ts +18 -1
  83. package/dist/_dts/sdk/src/cli/commands/push/execute/theme.d.ts +2 -16
  84. package/dist/_dts/sdk/src/cli/content/reader.d.ts +8 -5
  85. package/dist/_dts/sdk/src/client/management/events.d.ts +2 -1
  86. package/dist/_dts/sdk/src/client/management/index.d.ts +1 -1
  87. package/dist/_dts/sdk/src/client/management/types.d.ts +36 -9
  88. package/dist/_dts/sdk/src/config/typed-entries.d.ts +7 -7
  89. package/dist/_dts/sdk/src/config/validation.d.ts +7 -7
  90. package/dist/_dts/sdk/src/contracts/content.d.ts +5 -15
  91. package/dist/_dts/sdk/src/contracts/index.d.ts +1 -1
  92. package/dist/_dts/sdk/src/contracts/system-block-content.d.ts +12 -25
  93. package/dist/_dts/sdk/src/contracts/theme.d.ts +2 -18
  94. package/dist/_dts/sdk/src/manifest/passes/pass1-fields.d.ts +1 -1
  95. package/dist/_dts/sdk/src/manifest/three-pass-converter.d.ts +4 -4
  96. package/dist/_dts/sdk/src/rendering/helpers/bindings.d.ts +1 -2
  97. package/dist/_dts/sdk/src/rendering/helpers/index.d.ts +1 -1
  98. package/dist/_dts/sdk/src/rendering/islands/types.d.ts +2 -13
  99. package/dist/_dts/sdk/src/theme/index.d.ts +0 -29
  100. package/dist/_dts/sdk/src/version.d.ts +1 -1
  101. package/dist/_dts/site-commands/src/commands.d.ts +31 -18
  102. package/dist/_dts/theme-core/src/buttons/affordanceIcons.d.ts +2 -2
  103. package/dist/_dts/theme-core/src/buttons/core.d.ts +0 -1
  104. package/dist/_dts/theme-core/src/buttons/effectClassification.d.ts +22 -9
  105. package/dist/_dts/theme-core/src/buttons/effects/presets/background.d.ts +1 -2
  106. package/dist/_dts/theme-core/src/buttons/effects/presets/border.d.ts +1 -2
  107. package/dist/_dts/theme-core/src/buttons/effects/presets/overlay.d.ts +3 -1
  108. package/dist/_dts/theme-core/src/buttons/effects/presets/shadow.d.ts +2 -2
  109. package/dist/_dts/theme-core/src/buttons/effects/types.d.ts +8 -18
  110. package/dist/_dts/theme-core/src/buttons/generateButtonCss.d.ts +2 -2
  111. package/dist/_dts/theme-core/src/buttons/generateDefaultButtonSystem.d.ts +5 -5
  112. package/dist/_dts/theme-core/src/buttons/index.d.ts +1 -4
  113. package/dist/_dts/theme-core/src/buttons/parseThemeForPersistence.d.ts +36 -0
  114. package/dist/_dts/theme-core/src/buttons/types.d.ts +1638 -93
  115. package/dist/_dts/theme-core/src/cards/types.d.ts +13 -13
  116. package/dist/_dts/theme-core/src/mock-themes/all.d.ts +969 -69
  117. package/dist/_dts/theme-core/src/navigation/types.d.ts +2 -2
  118. package/dist/_dts/theme-core/src/recommend/generateThemes.d.ts +0 -1
  119. package/dist/_dts/theme-core/src/schema.d.ts +1100 -116
  120. package/dist/_dts/theme-core/src/site-styles/backgroundAppearance.d.ts +2 -2
  121. package/dist/_dts/theme-core/src/site-styles/designState.d.ts +14 -14
  122. package/dist/_dts/theme-core/src/site-styles/generatedSchemas.d.ts +2 -2
  123. package/dist/_dts/theme-core/src/site-styles/pageDesignIntent.d.ts +4 -4
  124. package/dist/_dts/theme-core/src/site-styles/previewCompiler.d.ts +6 -0
  125. package/dist/cli/index.mjs +5706 -4852
  126. package/dist/cli/init-docs/content/cli-reference.md +40 -1
  127. package/dist/cli/init-docs/content/content-management.md +6 -0
  128. package/dist/client/{DiscountCodeDisclosure-C4xvTBux.mjs → DiscountCodeDisclosure-DIWj-P9v.mjs} +1 -1
  129. package/dist/client/{EventCombined.client-Cr7G131j.mjs → EventCombined.client-De8YWBSr.mjs} +2 -2
  130. package/dist/client/{EventListing.client-CAjbseNy.mjs → EventListing.client-seHTjimY.mjs} +2 -2
  131. package/dist/client/{LeafletStaticMap-BMlWfwz3.mjs → LeafletStaticMap-BmQxFcJW.mjs} +1 -1
  132. package/dist/client/{MagicLinkForm-ChdFz96y.mjs → MagicLinkForm-OoJAIUIj.mjs} +1 -1
  133. package/dist/client/{StepIndicator-7D3GaBeM.mjs → StepIndicator-CiZ8kdPk.mjs} +2 -2
  134. package/dist/client/{accordion-D8JTs2Si.mjs → accordion-6lnN__XJ.mjs} +1 -1
  135. package/dist/client/{bookingForm-H3DCRBHs.mjs → bookingForm-5uyqhONU.mjs} +6 -6
  136. package/dist/client/bookings.mjs +2219 -527
  137. package/dist/client/{carousel-DMr_QWlz.mjs → carousel-Dtnifil_.mjs} +1 -1
  138. package/dist/client/{cart-DWMbfBdR.mjs → cart-5Tc5S7NV.mjs} +3 -3
  139. package/dist/client/{checkout-zmfdkXLx.mjs → checkout-CYKKN5Hr.mjs} +3 -3
  140. package/dist/client/client.mjs +2498 -2384
  141. package/dist/client/{colorTokenParts-FSS3al6l.mjs → colorStyles-BWpj_h4C.mjs} +88 -1
  142. package/dist/client/{courseRegistration-Z_mn18jy.mjs → courseRegistration-CxCBybB4.mjs} +6 -6
  143. package/dist/client/{eventCalendar-CYp0YJGF.mjs → eventCalendar-Xj2jZS9X.mjs} +4 -4
  144. package/dist/client/{eventCombined-rKyYZUa9.mjs → eventCombined-CgcMoOgM.mjs} +2 -2
  145. package/dist/client/{eventDetails-X0ZaUuMj.mjs → eventDetails-CEAH8Edc.mjs} +3 -3
  146. package/dist/client/{eventListing-W1SuL7EP.mjs → eventListing-qyPVQ0wP.mjs} +2 -2
  147. package/dist/client/{eventRegistration-ClWricui.mjs → eventRegistration-DDu79CtL.mjs} +6 -6
  148. package/dist/client/{form--eKPwAAD.mjs → form-Bc7JKI7I.mjs} +1 -1
  149. package/dist/client/{headerSection-BSeGr-FS.mjs → headerSection-vTku_LEl.mjs} +2 -2
  150. package/dist/client/hooks.mjs +373 -555
  151. package/dist/client/{locationMap-BpOrtNYn.mjs → locationMap-Bg7X4Jna.mjs} +3 -3
  152. package/dist/client/{media-DoF0dcVx.mjs → media-CNE1Z-wb.mjs} +1 -2
  153. package/dist/client/{newsletterForm-Bt7it7Dy.mjs → newsletterForm-lpylVdp5.mjs} +1 -1
  154. package/dist/client/{pricing-BTjSDDr4.mjs → pricing-DE8fjJiT.mjs} +1 -1
  155. package/dist/client/{productDetail-ICnVTcCg.mjs → productDetail-D7Bo2RMH.mjs} +3 -3
  156. package/dist/client/{productList-ZHr6D604.mjs → productList-VjnZqiqN.mjs} +3 -3
  157. package/dist/client/{propsDecoder-wWN0tBDF.mjs → propsDecoder-DreFXjNP.mjs} +2212 -621
  158. package/dist/client/rendering/client.mjs +21612 -21646
  159. package/dist/client/rendering/islands.mjs +20 -20
  160. package/dist/client/rendering.mjs +1571 -1547
  161. package/dist/client/{shop-C1u_BUn0.mjs → shop-IRsHHbf7.mjs} +5 -5
  162. package/dist/client/{shop-commerce-CleZdRha.mjs → shop-commerce-gnI8PieZ.mjs} +27 -10
  163. package/dist/client/{shop-commerce-store-ycnoB2Ce.mjs → shop-commerce-store-BTbrhObn.mjs} +1 -1
  164. package/dist/client/{shopShared-CPhByt2a.mjs → shopShared-D6KS2_qk.mjs} +3 -3
  165. package/dist/client/{useDiscountCodeUi-cStSQI6C.mjs → useDiscountCodeUi-DCccGCxV.mjs} +1 -1
  166. package/dist/client/{useEventFilters-DKPN7hSY.mjs → useEventFilters-eGs3rPZQ.mjs} +3 -104
  167. package/dist/client/{usePolling-BKAd6pkZ.mjs → usePolling-CvSU2sur.mjs} +2 -2
  168. package/dist/preview-next/before-render.mjs +57 -0
  169. package/dist/preview-next/client/runtime.mjs +4 -4
  170. package/dist/preview-next/middleware.mjs +57 -0
  171. package/dist/{previewAuthStore-BkT1D06A.mjs → previewAuthStore-DN7vcRsv.mjs} +57 -0
  172. package/dist/{sdk-runtime-hu3wr3ng.mjs → sdk-runtime-DaOiA7ct.mjs} +2 -2
  173. package/dist/{separator-Bln8izQ9.mjs → separator-CqRhcCxD.mjs} +1 -1
  174. package/dist/server/components.mjs +4092 -4108
  175. package/dist/server/config-template-validation.mjs +4 -23
  176. package/dist/server/config-validation.mjs +373 -555
  177. package/dist/server/config.mjs +410 -558
  178. package/dist/server/data.mjs +373 -555
  179. package/dist/server/index.mjs +58 -1
  180. package/dist/server/next.mjs +32958 -32926
  181. package/dist/server/page-converter.mjs +369 -526
  182. package/dist/server/prebuild.mjs +1 -1
  183. package/dist/server/rendering/server.mjs +5371 -3174
  184. package/dist/server/rendering.mjs +4099 -4124
  185. package/dist/server/routing.mjs +758 -966
  186. package/dist/server/server.mjs +448 -632
  187. package/dist/server/theme-bridge.mjs +472 -525
  188. package/dist/server/theme.mjs +1074 -392
  189. package/package.json +1 -1
  190. package/dist/_dts/blocks/src/primitives/content/components/Button.d.ts +0 -40
  191. package/dist/_dts/blocks/src/system/fragments/library/footerBottomText.d.ts +0 -19
  192. package/dist/_dts/media-core/src/legacyMediaValue.d.ts +0 -11
  193. package/dist/_dts/theme-core/src/styles/buttons.d.ts +0 -27
  194. package/dist/_dts/theme-core/src/styles/buttonsLibrary.d.ts +0 -2
  195. package/dist/_dts/theme-core/src/styles/glow.d.ts +0 -3
  196. package/dist/client/colorStyles-gcTh5yZT.mjs +0 -89
@@ -1,2 +1,14 @@
1
- import { type TipTapNode } from '../../manifest/richTextSchema';
2
- export declare function coerceRichTextDoc(value: unknown): TipTapNode | null;
1
+ import { type RichTextDoc } from '../../manifest/richTextSchema';
2
+ export type RichTextDocParseIssue = Readonly<{
3
+ path: readonly (string | number)[];
4
+ message: string;
5
+ }>;
6
+ export type RichTextDocParseResult = Readonly<{
7
+ kind: 'valid';
8
+ doc: RichTextDoc;
9
+ }> | Readonly<{
10
+ kind: 'invalid';
11
+ issues: readonly RichTextDocParseIssue[];
12
+ }>;
13
+ export declare function parseRichTextDoc(value: unknown): RichTextDocParseResult;
14
+ export declare function coerceRichTextDoc(value: unknown, source: string): RichTextDoc | null;
@@ -123,7 +123,7 @@ export declare function bindProp(from: string, opts?: {
123
123
  pick?: "value" | "collection" | "context";
124
124
  }): {
125
125
  readonly $bind: {
126
- readonly pick?: "value" | "collection" | "context" | undefined;
126
+ readonly pick?: "value" | "context" | "collection" | undefined;
127
127
  readonly fallback?: {} | null | undefined;
128
128
  readonly transforms?: TransformStep<"string.uppercase" | "value.fallback" | "date.formatShort" | "value.csv" | "layout.maxWidthClass" | "layout.headerRootClass" | "layout.footerRootClass" | "layout.headerRootStyle" | "layout.headerSectionBackground" | "layout.footerRootStyle" | "ui.headerNavLinkClass" | "ui.headingClassFromAlignment" | "ui.bodyClassFromAlignment" | "ui.stackAlignFromAlignment" | "ui.sectionStateTone" | "ui.heroContentWrapperClass" | "ui.heroCtaJustify" | "ui.heroStackJustifyFromVerticalAlignment" | "ui.heroGridClassFromVerticalAlignment" | "ui.conditionalClass" | "ui.twoColumnContainerClass" | "ui.twoColumnFlexBasis" | "media.fromUrl" | "content.interpolateRichTextTokens" | "boxStyles.semanticGap" | "boxStyles.semanticGapValue" | "boxStyles.cardVariantClass" | "layout.headerLogoClass" | "layout.headerLogoMediaClass" | "layout.headerLogoTextVisible" | "layout.footerBottomBarClass" | "layout.footerBottomBarContainerClass" | "layout.footerBottomBarStyle" | "layout.footerSplitNavSingleClass" | "layout.footerSimpleRootClass" | "layout.footerSimpleNavClass" | "layout.footerSplitMainClass" | "layout.footerLogoClass" | "layout.footerLogoMediaClass" | "layout.footerLogoTextVisible">[] | undefined;
129
129
  readonly from: string;
@@ -1,4 +1,4 @@
1
- import type { BlockItem } from '../../../editor-blocks/src/block-editor/types';
1
+ import { type BlockItem } from '../../../editor-blocks/src/index';
2
2
  import type { EditorUiState } from '../ui/editorUiStore';
3
3
  type StoreApi<T> = {
4
4
  getState: () => T;
@@ -9,11 +9,27 @@ export type BlockAutosaveOptions = {
9
9
  siteId: string;
10
10
  /** Whether this entry has a route (pages have blocks, content entries don't) */
11
11
  hasRoute: boolean;
12
+ owner: BlockAutosaveOwner;
12
13
  };
14
+ export type BlockAutosaveOwner = Readonly<{
15
+ kind: 'contentEntry';
16
+ }> | Readonly<{
17
+ kind: 'pageSurface';
18
+ }>;
19
+ export type BlockSaveRevisionPlan = Readonly<{
20
+ kind: 'bestEffort';
21
+ optimisticHash: string | null;
22
+ }> | Readonly<{
23
+ kind: 'compareAndSet';
24
+ optimisticHash: string;
25
+ }> | Readonly<{
26
+ kind: 'missingRequiredRevision';
27
+ }>;
28
+ export declare function planBlockSaveRevisionForOwner(owner: BlockAutosaveOwner, optimisticHash: string | null): BlockSaveRevisionPlan;
13
29
  /**
14
30
  * Hook to handle block autosave for pages.
15
31
  * Watches for pending block changes and debounces saves to the server.
16
32
  *
17
33
  * Only enabled for pages (hasRoute=true), as content entries don't have blocks.
18
34
  */
19
- export declare function useBlockAutosave({ uiStore, apiClient, siteId, hasRoute, }: BlockAutosaveOptions): import("./useSimpleAutosave").AutosaveHandle;
35
+ export declare function useBlockAutosave({ uiStore, apiClient, siteId, hasRoute, owner, }: BlockAutosaveOptions): import("./useSimpleAutosave").AutosaveHandle;
@@ -1,7 +1,7 @@
1
1
  export type DebouncedLatestSaveHandle = {
2
2
  trigger: () => void;
3
3
  cancel: () => void;
4
- flush: () => void;
4
+ flush: () => Promise<void>;
5
5
  isPending: () => boolean;
6
6
  };
7
7
  export type DebouncedLatestSaveConfig<TSnapshot, TPayload, TResult> = {
@@ -37,7 +37,7 @@ type AutosaveConfig<TValues, TPayload> = {
37
37
  export type AutosaveHandle = {
38
38
  trigger: () => void;
39
39
  cancel: () => void;
40
- flush: () => void;
40
+ flush: () => void | Promise<void>;
41
41
  isPending: () => boolean;
42
42
  };
43
43
  export declare function useSimpleAutosave<TValues = Record<string, unknown>, TPayload = unknown>(config: AutosaveConfig<TValues, TPayload>): AutosaveHandle;
@@ -1,4 +1,4 @@
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';
1
+ import { unsafeAsEditorBlockId, unsafeAsEditorBlockValues, unsafeAsEditorContentValues, unsafeAsEditorEntryId, unsafeAsEditorMetadataValues, unsafeAsEditorPageId, unsafeAsEditorSiteId, type EditorBlockBaselineInput, type EditorBlockId, type EditorBlockPublishedBaselineInput, type EditorDraftBlockBaselineUpdateMetaInput, type EditorDraftBlockInitMetaInput, type EditorDraftSaveFailureRecovery, 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
2
  import { type LinkedContentEntryId, type LinkedContentTypeKey } from '../linkedEntries/domain';
3
3
  export { unsafeAsEditorBlockId, unsafeAsEditorBlockValues, unsafeAsEditorContentValues, unsafeAsEditorEntryId, unsafeAsEditorMetadataValues, unsafeAsEditorPageId, unsafeAsEditorSiteId, type EditorBlockId, type EditorBlockValues, type EditorContentValues, type EditorEntryId, type EditorMetadataValues, type EditorPageId, type EditorSiteId, };
4
4
  export type EditorCommand = {
@@ -234,6 +234,7 @@ export type EditorSystemOperation = {
234
234
  type: 'autosave-draft-failed';
235
235
  blockId: EditorBlockId;
236
236
  message?: string;
237
+ recovery?: EditorDraftSaveFailureRecovery;
237
238
  } | {
238
239
  type: 'clear-draft-error';
239
240
  blockId: EditorBlockId;
@@ -298,7 +299,7 @@ export declare function updateDraftBlockBaseline(snapshot: EditorHistorySnapshot
298
299
  export declare function removeDraftBlock(snapshot: EditorHistorySnapshot, blockId: EditorBlockId): EditorHistorySnapshot;
299
300
  export declare function setDraftPublishedBaselines(snapshot: EditorHistorySnapshot, blocks: readonly BlockPublishedBaselineInput[]): EditorHistorySnapshot;
300
301
  export declare function autosaveDraftSucceeded(snapshot: EditorHistorySnapshot, blockId: EditorBlockId, savedValues: EditorBlockValues | null, acknowledgedVersion: number, optimisticHash: string | null): EditorHistorySnapshot;
301
- export declare function autosaveDraftFailed(snapshot: EditorHistorySnapshot, blockId: EditorBlockId, message?: string): EditorHistorySnapshot;
302
+ export declare function autosaveDraftFailed(snapshot: EditorHistorySnapshot, blockId: EditorBlockId, message?: string, recovery?: EditorDraftSaveFailureRecovery): EditorHistorySnapshot;
302
303
  export declare function clearDraftError(snapshot: EditorHistorySnapshot, blockId: EditorBlockId): EditorHistorySnapshot;
303
304
  export declare function setDraftPending(snapshot: EditorHistorySnapshot, blockId: EditorBlockId): EditorHistorySnapshot;
304
305
  export declare function clearDraftPending(snapshot: EditorHistorySnapshot, blockId: EditorBlockId): EditorHistorySnapshot;
@@ -1,4 +1,4 @@
1
- import type { FooterModuleId } from '../../../core/src/index';
1
+ import type { EditorDraftSaveFailureRecovery, FooterModuleId } from '../../../core/src/index';
2
2
  import { type EditorUnpublishedState } from '../controller/deriveEditorUnpublishedState';
3
3
  import { type AutosaveState } from './stores/autosaveStore';
4
4
  import { type GeneratedIconAssetsState } from './stores/generatedIconAssetsStore';
@@ -167,7 +167,7 @@ export type DraftsState = {
167
167
  clearPending: (blockId: EditorBlockId) => void;
168
168
  setFailed: (blockId: EditorBlockId, message?: string) => void;
169
169
  autosaveSucceeded: (blockId: EditorBlockId, content: Record<string, unknown> | null, acknowledgement?: AutosaveAcknowledgement) => void;
170
- autosaveFailed: (blockId: EditorBlockId, message?: string) => void;
170
+ autosaveFailed: (blockId: EditorBlockId, message?: string, recovery?: EditorDraftSaveFailureRecovery) => void;
171
171
  setAtPath: (blockId: EditorBlockId, path: string, value: unknown) => void;
172
172
  getAtPath: <T = unknown>(blockId: EditorBlockId, path: string) => T | undefined;
173
173
  updateBlockOrder: (blockIds: EditorBlockId[]) => void;
@@ -24,7 +24,7 @@ export type AutosaveState = {
24
24
  * Unlike flushAllPending(), this does not rely on a debounced callback being pending, so it
25
25
  * works for manual-save mode where background triggers are disabled.
26
26
  */
27
- saveNow: (types: AutosaveType[]) => void;
27
+ saveNow: (types: AutosaveType[]) => Promise<void>;
28
28
  flushAllPending: () => void;
29
29
  cancelAllPending: () => void;
30
30
  };
@@ -8,7 +8,7 @@ export type AutosaveStatus = {
8
8
  export type AutosaveHandle = {
9
9
  trigger: () => void;
10
10
  cancel?: () => void;
11
- flush: () => void;
11
+ flush: () => void | Promise<void>;
12
12
  isPending: () => boolean;
13
13
  };
14
14
  export type AutosaveType = 'metadata' | 'content' | 'blocks' | 'linkedEntries';
@@ -13,29 +13,17 @@
13
13
  * together. A schema edit updates the binding type surface without a
14
14
  * parallel hand-maintained interface.
15
15
  */
16
+ import type { RichTextDoc } from '../../../blocks/src/system/manifest/richTextSchema';
16
17
  import { COURSE_CONTENT_TYPE_SCHEMA, EVENT_CONTENT_TYPE_SCHEMA, POST_CONTENT_TYPE_SCHEMA, PRODUCT_CATEGORY_CONTENT_TYPE_SCHEMA, PRODUCT_CONTENT_TYPE_SCHEMA, TEAM_MEMBER_CONTENT_TYPE_SCHEMA, TESTIMONIAL_CONTENT_TYPE_SCHEMA } from './builtin-schemas';
17
18
  export interface ContentMediaValue {
19
+ identifier: string;
18
20
  url?: string;
19
21
  alt?: string;
20
22
  width?: number;
21
23
  height?: number;
22
24
  readonly [key: string]: unknown;
23
25
  }
24
- /**
25
- * Canonical rich-text content shape stored on entries. Same structural shape
26
- * as `TipTapNode` from `@riverbankcms/blocks/system/manifest/richTextSchema`;
27
- * any value validated through {@link RichTextValueSchema} satisfies this.
28
- */
29
- export interface ContentRichText {
30
- type: string;
31
- content?: ContentRichText[];
32
- text?: string;
33
- attrs?: Record<string, unknown>;
34
- marks?: Array<{
35
- type: string;
36
- attrs?: Record<string, unknown>;
37
- }>;
38
- }
26
+ export type ContentRichText = RichTextDoc;
39
27
  type DerivableContentField = Readonly<{
40
28
  id: string;
41
29
  type: string;
@@ -28,4 +28,6 @@ export interface EntryValidationResult {
28
28
  export declare function validateEntryInstance(input: {
29
29
  schema: ContentTypeSchema;
30
30
  data: Record<string, unknown>;
31
+ /** Validate present values while permitting required fields to remain unset in drafts. */
32
+ allowIncomplete?: boolean;
31
33
  }): EntryValidationResult;
@@ -16,11 +16,11 @@ declare const BaseContentFieldSchema: z.ZodObject<{
16
16
  file: "file";
17
17
  media: "media";
18
18
  reference: "reference";
19
+ repeater: "repeater";
19
20
  group: "group";
20
21
  datetime: "datetime";
21
22
  button: "button";
22
23
  richText: "richText";
23
- repeater: "repeater";
24
24
  }>;
25
25
  label: z.ZodOptional<z.ZodString>;
26
26
  description: z.ZodOptional<z.ZodString>;
@@ -1,25 +1,5 @@
1
1
  import { type TemplateDefinition } from './types';
2
2
  import type { BuiltinContentTypeKey } from '../content-types/builtins';
3
- /**
4
- * Build a canonical TipTap doc from plain-text paragraphs.
5
- *
6
- * Local mirror of `createRichTextDoc` from
7
- * `@riverbankcms/blocks/system/manifest/richTextSchema` — content-model
8
- * doesn't depend on blocks (blocks sits downstream), but the shape both
9
- * functions produce is governed by the same Zod schema in blocks.
10
- *
11
- * Exported with `@internal` so the cross-package parity test
12
- * (`packages/dummy-content/src/richTextDoc-parity.test.ts`) can import
13
- * the *real* implementation rather than reimplement it — eliminates the
14
- * "test verifies two copies of itself" failure mode.
15
- *
16
- * Returns `Record<string, unknown>` rather than the canonical
17
- * `RichTextDoc` type because that type lives in blocks; downstream
18
- * consumers narrow it via the canonical schema.
19
- *
20
- * @internal
21
- */
22
- export declare function createRichTextDocInternal(paragraphs: ReadonlyArray<string>): Record<string, unknown>;
23
3
  /**
24
4
  * Built-in content type keys that intentionally ship without a default
25
5
  * template — they use the block editor directly rather than a templated
@@ -79,7 +59,7 @@ export declare const DEFAULT_TEMPLATE_DEFINITIONS: {
79
59
  readonly content: {
80
60
  readonly eyebrow: "Stay in the loop";
81
61
  readonly title: "Get the latest updates";
82
- readonly content: Record<string, unknown>;
62
+ readonly content: import("../../../core/src/index").RichTextDoc;
83
63
  readonly ctas: readonly [{
84
64
  readonly label: "Subscribe now";
85
65
  readonly link: {
@@ -22,6 +22,19 @@ export type EditorSyncState = {
22
22
  kind: 'failed';
23
23
  error: string;
24
24
  };
25
+ export type EditorDraftSaveFailureRecovery = Readonly<{
26
+ kind: 'manualRetry';
27
+ }> | Readonly<{
28
+ kind: 'rebaseOnNewRevision';
29
+ failedOptimisticHash: string | null;
30
+ }>;
31
+ export type EditorDraftSyncState = Exclude<EditorSyncState, {
32
+ kind: 'failed';
33
+ }> | Readonly<{
34
+ kind: 'failed';
35
+ error: string;
36
+ recovery: EditorDraftSaveFailureRecovery;
37
+ }>;
25
38
  export type EditorStructuralDraftMeta = Readonly<{
26
39
  kind: string;
27
40
  purpose: string | null;
@@ -34,7 +47,7 @@ export type EditorStructuralDraftSnapshot = Readonly<{
34
47
  version: number;
35
48
  baseline: EditorBlockValues | null;
36
49
  current: EditorBlockValues | null;
37
- syncState: EditorSyncState;
50
+ syncState: EditorDraftSyncState;
38
51
  meta: EditorStructuralDraftMeta;
39
52
  }>;
40
53
  export type EditorBlockDataRowInput = Readonly<{
@@ -1,8 +1,9 @@
1
1
  import type { Brand } from './branded';
2
+ import { type RichTextDoc } from './rich-text';
2
3
  import { type Result } from './result';
3
4
  export type FooterModuleId = Brand<string, 'FooterModuleId'>;
4
5
  export type FooterMembershipKey = Brand<string, 'FooterMembershipKey'>;
5
- export type FooterRichText = Readonly<Record<string, unknown>>;
6
+ export type FooterRichText = RichTextDoc;
6
7
  export type FooterNavigationRole = 'main' | 'legal-policy';
7
8
  type FooterSectionBase<TKind extends string> = Readonly<{
8
9
  id: FooterModuleId;
@@ -30,6 +30,7 @@ export * from './participants';
30
30
  export * from './participant-identity';
31
31
  export * from './public-url-validation';
32
32
  export * from './public-profile';
33
+ export * from './rich-text';
33
34
  export * from './footer-composition';
34
35
  export * from './number-input';
35
36
  export * from './field-errors';
@@ -0,0 +1,16 @@
1
+ export type TipTapMark = {
2
+ type: string;
3
+ attrs?: Record<string, unknown>;
4
+ };
5
+ export type TipTapNode = {
6
+ type: string;
7
+ content?: TipTapNode[];
8
+ text?: string;
9
+ attrs?: Record<string, unknown>;
10
+ marks?: TipTapMark[];
11
+ };
12
+ export type RichTextDoc = {
13
+ type: 'doc';
14
+ content: TipTapNode[];
15
+ };
16
+ export declare function isCanonicalRichTextDoc(value: unknown): value is RichTextDoc;