@riverbankcms/sdk 0.82.0 → 0.84.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (206) hide show
  1. package/README.md +16 -0
  2. package/dist/{PreviewEditorSidebar-LHGK6RIO.mjs → PreviewEditorSidebar-X7RLMEI6.mjs} +330 -11
  3. package/dist/{PreviewEditorUI-AXZG2SDC.mjs → PreviewEditorUI-CT67N4O3.mjs} +3 -3
  4. package/dist/SdkPreviewModeRuntime-EIMQ3S2V.mjs +8 -0
  5. package/dist/_dts/ai/src/contracts/proposals.d.ts +200 -0
  6. package/dist/_dts/api/src/blocks.d.ts +36 -0
  7. package/dist/_dts/api/src/contentRuntime.d.ts +46 -0
  8. package/dist/_dts/api/src/endpoints.d.ts +40 -0
  9. package/dist/_dts/api/src/index.d.ts +2 -2
  10. package/dist/_dts/api/src/sdk-event-pricing.d.ts +61 -0
  11. package/dist/_dts/api/src/sdk-event-schedule.d.ts +52 -0
  12. package/dist/_dts/api/src/sdk-event-upsert.d.ts +50 -0
  13. package/dist/_dts/api/src/sdkContracts.d.ts +67 -33
  14. package/dist/_dts/api/src/shared-contracts.d.ts +13 -0
  15. package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +22 -36
  16. package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +46 -1
  17. package/dist/_dts/block-form/src/backend/useBackendWatch.d.ts +6 -1
  18. package/dist/_dts/block-form/src/utils/evaluateVisibility.d.ts +3 -2
  19. package/dist/_dts/block-form/src/utils/visibleWhen.d.ts +7 -0
  20. package/dist/_dts/blocks/src/PageRenderer.d.ts +11 -0
  21. package/dist/_dts/blocks/src/bindings/index.d.ts +1 -1
  22. package/dist/_dts/blocks/src/client/site-chrome.d.ts +1 -1
  23. package/dist/_dts/blocks/src/client.d.ts +4 -0
  24. package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +16 -4
  25. package/dist/_dts/blocks/src/system/blocks/appointment-booking.d.ts +288 -2016
  26. package/dist/_dts/blocks/src/system/blocks/blog-listing.d.ts +288 -2016
  27. package/dist/_dts/blocks/src/system/blocks/cart.d.ts +288 -2016
  28. package/dist/_dts/blocks/src/system/blocks/checkout.d.ts +288 -2016
  29. package/dist/_dts/blocks/src/system/blocks/collection.d.ts +288 -2016
  30. package/dist/_dts/blocks/src/system/blocks/contact-newsletter.d.ts +171 -0
  31. package/dist/_dts/blocks/src/system/blocks/faq.d.ts +288 -2016
  32. package/dist/_dts/blocks/src/system/blocks/gifting.d.ts +288 -2016
  33. package/dist/_dts/blocks/src/system/blocks/hero.d.ts +3 -2
  34. package/dist/_dts/blocks/src/system/blocks/index.d.ts +1 -0
  35. package/dist/_dts/blocks/src/system/blocks/location-map.d.ts +1 -7
  36. package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +2534 -151
  37. package/dist/_dts/blocks/src/system/blocks/product-detail.d.ts +288 -2016
  38. package/dist/_dts/blocks/src/system/blocks/product-list.d.ts +288 -2016
  39. package/dist/_dts/blocks/src/system/blocks/shop.d.ts +288 -2016
  40. package/dist/_dts/blocks/src/system/blocks/site-header.d.ts +36 -3
  41. package/dist/_dts/blocks/src/system/blocks/team-members.d.ts +2 -2
  42. package/dist/_dts/blocks/src/system/constants/blockKinds.d.ts +1 -1
  43. package/dist/_dts/blocks/src/system/fields/aspectRatio.d.ts +4 -1
  44. package/dist/_dts/blocks/src/system/fields/imageShape.d.ts +30 -0
  45. package/dist/_dts/blocks/src/system/fragments/library/heroLayoutControls.d.ts +25 -0
  46. package/dist/_dts/blocks/src/system/manifest/schema.d.ts +35 -161
  47. package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +24 -6
  48. package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +12 -3
  49. package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessEventRegistrationFlow.d.ts +33 -0
  50. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/EventRegistrationWizard.d.ts +0 -2
  51. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/constants.d.ts +1 -0
  52. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/event-registration.headless.contract.d.ts +275 -0
  53. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/event-registration.headless.override.d.ts +10 -0
  54. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/event-registration.headless.planning.d.ts +22 -0
  55. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/event-registration.headless.state.d.ts +3 -0
  56. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationSubmit.d.ts +20 -1
  57. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts +13 -4
  58. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/utils.d.ts +1 -1
  59. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.interactive.d.ts +28 -6
  60. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/pricing.d.ts +14 -0
  61. package/dist/_dts/content-editor/src/controller/EntryControllerProvider.d.ts +1 -1
  62. package/dist/_dts/content-editor/src/controller/buildBlockPublishedBaselines.d.ts +1 -1
  63. package/dist/_dts/content-editor/src/controller/seedDraftBaselinesFromBlocks.d.ts +1 -1
  64. package/dist/_dts/content-editor/src/controller/useBlocksList.d.ts +1 -1
  65. package/dist/_dts/content-editor/src/controller/useInvalidBlockRecovery.d.ts +1 -1
  66. package/dist/_dts/content-editor/src/primitives/PreviewRichTextEditor.d.ts +2 -1
  67. package/dist/_dts/content-editor/src/primitives/PreviewTextEditor.d.ts +1 -0
  68. package/dist/_dts/content-model/src/entry-slots/index.d.ts +1 -0
  69. package/dist/_dts/content-model/src/entry-slots/types.d.ts +356 -0
  70. package/dist/_dts/content-model/src/index.d.ts +1 -0
  71. package/dist/_dts/content-model/src/templates/defaults.d.ts +7 -0
  72. package/dist/_dts/db/src/generated/supabase/database.types.d.ts +100 -5
  73. package/dist/_dts/editor-blocks/src/BlockEditor.d.ts +6 -1
  74. package/dist/_dts/editor-blocks/src/BlockForm.d.ts +7 -5
  75. package/dist/_dts/editor-blocks/src/block-editor/hooks/useBlockCreation.d.ts +3 -2
  76. package/dist/_dts/editor-blocks/src/block-editor/hooks/useBlockDuplication.d.ts +3 -2
  77. package/dist/_dts/editor-blocks/src/block-editor/hooks/useBlockReorder.d.ts +3 -2
  78. package/dist/_dts/editor-blocks/src/block-editor/owner.d.ts +27 -0
  79. package/dist/_dts/editor-blocks/src/index.d.ts +1 -0
  80. package/dist/_dts/media-core/src/assetsInUseSummary.d.ts +8 -0
  81. package/dist/_dts/media-core/src/mediaUsageProjection.d.ts +37 -3
  82. package/dist/_dts/preview-next/src/client/blocks/pageDesignRuntimePreview.d.ts +4 -2
  83. package/dist/_dts/preview-next/src/client/blocks/previewProjection/runtimeContentDecoration.d.ts +2 -2
  84. package/dist/_dts/preview-next/src/client/preview/EntryEditorPanel.d.ts +3 -1
  85. package/dist/_dts/preview-next/src/client/preview/EntrySlotBlockEditorPanel.d.ts +19 -0
  86. package/dist/_dts/preview-next/src/client/preview/SiteChromeCustomizeButton.d.ts +8 -0
  87. package/dist/_dts/preview-next/src/client/preview/SiteChromeCustomizeContext.d.ts +4 -1
  88. package/dist/_dts/preview-next/src/client/preview/StyleConfigurator.state.d.ts +1 -1
  89. package/dist/_dts/preview-next/src/client/preview/linkedEntryEditEvents.d.ts +9 -0
  90. package/dist/_dts/preview-next/src/client/preview/previewCustomizeControls.d.ts +9 -8
  91. package/dist/_dts/preview-next/src/client/preview/siteChromeLookRows.d.ts +10 -1
  92. package/dist/_dts/preview-next/src/client/preview/siteChromeQuickControlHistoryState.d.ts +5 -1
  93. package/dist/_dts/sdk/src/bookings/index.d.ts +5 -4
  94. package/dist/_dts/sdk/src/bookings/types.d.ts +2 -2
  95. package/dist/_dts/sdk/src/cli/content/reader.d.ts +9 -8
  96. package/dist/_dts/sdk/src/cli/content/writer.d.ts +6 -1
  97. package/dist/_dts/sdk/src/cli/helpers.d.ts +10 -5
  98. package/dist/_dts/sdk/src/cli/merge-remote/entryLocal.d.ts +2 -2
  99. package/dist/_dts/sdk/src/cli/merge-remote/entryMerge.d.ts +2 -1
  100. package/dist/_dts/sdk/src/cli/merge-remote/entrySnapshots.d.ts +2 -2
  101. package/dist/_dts/sdk/src/client/management/index.d.ts +1 -1
  102. package/dist/_dts/sdk/src/client/management/types.d.ts +40 -10
  103. package/dist/_dts/sdk/src/config/field-definitions.d.ts +13 -7
  104. package/dist/_dts/sdk/src/contracts/system-block-content.d.ts +26 -3
  105. package/dist/_dts/sdk/src/public-api/contracts.d.ts +13 -0
  106. package/dist/_dts/sdk/src/rendering/blocks-page-renderer.d.ts +1 -0
  107. package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +6 -1
  108. package/dist/_dts/sdk/src/rendering/overrides.d.ts +6 -1
  109. package/dist/_dts/sdk/src/types/block-kinds.d.ts +1 -1
  110. package/dist/_dts/sdk/src/version.d.ts +1 -1
  111. package/dist/_dts/site-commands/src/commands.d.ts +15 -0
  112. package/dist/_dts/theme-core/src/accordions/types.d.ts +1 -1
  113. package/dist/_dts/theme-core/src/buttons/personalities/index.d.ts +11 -0
  114. package/dist/_dts/theme-core/src/buttons/personalities/ornate-ritual.d.ts +16 -0
  115. package/dist/_dts/theme-core/src/buttons/personalities/types.d.ts +1 -1
  116. package/dist/_dts/theme-core/src/buttons/types.d.ts +3 -3
  117. package/dist/_dts/theme-core/src/cards/types.d.ts +15 -15
  118. package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
  119. package/dist/_dts/theme-core/src/inputs/types.d.ts +1 -1
  120. package/dist/_dts/theme-core/src/mock-themes/all.d.ts +33 -33
  121. package/dist/_dts/theme-core/src/palette/variants/index.d.ts +15 -0
  122. package/dist/_dts/theme-core/src/palette/variants/warm-dark.d.ts +16 -0
  123. package/dist/_dts/theme-core/src/schema.d.ts +30 -25
  124. package/dist/_dts/theme-core/src/site-styles/backgroundAppearance.d.ts +2 -2
  125. package/dist/_dts/theme-core/src/site-styles/curatedSiteStyles.d.ts +141 -1
  126. package/dist/_dts/theme-core/src/site-styles/designState.d.ts +2 -0
  127. package/dist/_dts/theme-core/src/site-styles/footerLooks.d.ts +110 -5
  128. package/dist/_dts/theme-core/src/site-styles/generatedSchemas.d.ts +4 -2
  129. package/dist/_dts/theme-core/src/site-styles/previewCompiler.d.ts +1 -1
  130. package/dist/_dts/theme-core/src/site-styles/runtimeCompiler.d.ts +5 -1
  131. package/dist/_dts/theme-core/src/site-styles/tokenRecipes.d.ts +1 -1
  132. package/dist/_dts/theme-core/src/site-styles/types.d.ts +1 -1
  133. package/dist/_dts/theme-core/src/site-styles/typographyPresets.d.ts +16 -1
  134. package/dist/_dts/theme-core/src/siteChromePlanning.d.ts +1 -0
  135. package/dist/_dts/theme-core/src/utils/colorStyles.d.ts +6 -6
  136. package/dist/{chunk-2BUMISSH.mjs → chunk-3LXFQS7T.mjs} +1 -1
  137. package/dist/{chunk-FIREV57T.mjs → chunk-LBBPD2IW.mjs} +40 -0
  138. package/dist/{chunk-XQR6THQJ.mjs → chunk-O62NDCTI.mjs} +3390 -1331
  139. package/dist/{chunk-6FWNF3DJ.mjs → chunk-QRKJDWT7.mjs} +158 -20
  140. package/dist/{chunk-HKB6XVIP.mjs → chunk-RCTJAZSK.mjs} +2 -2
  141. package/dist/{chunk-G35HOQEN.mjs → chunk-X5ZCSU6F.mjs} +132 -46
  142. package/dist/cli/index.mjs +2925 -577
  143. package/dist/cli/init-docs/content/agents-section.md +5 -0
  144. package/dist/cli/init-docs/content/cli-reference.md +13 -0
  145. package/dist/cli/init-docs/content/content-management.md +31 -0
  146. package/dist/cli/init-docs/content/getting-started.md +14 -0
  147. package/dist/cli/init-docs/content/workflow-add-block.md +3 -1
  148. package/dist/cli/init-docs/content/workflow-agent-safe-sync.md +81 -0
  149. package/dist/cli/init-docs/content/workflow-create-page.md +13 -3
  150. package/dist/cli/init-docs/content/workflow-custom-block.md +9 -0
  151. package/dist/cli/init-docs/content/workflow-templates.md +107 -2
  152. package/dist/client/{accordion-G34C45TW.mjs → accordion-2UZPBMYM.mjs} +2 -2
  153. package/dist/client/{bookingForm-BLBVKSAQ.mjs → bookingForm-DYXT6YB6.mjs} +5 -5
  154. package/dist/client/bookings.mjs +3477 -186
  155. package/dist/client/{carousel-7ZVTBRMD.mjs → carousel-QH77HR6X.mjs} +3 -3
  156. package/dist/client/{cart-Q6S6LZUO.mjs → cart-X4YK4FTW.mjs} +6 -6
  157. package/dist/client/{checkout-5QJLDE4I.mjs → checkout-OM2BEPWD.mjs} +6 -6
  158. package/dist/client/{chunk-ZF4XEWDM.mjs → chunk-3DTWLTXM.mjs} +1 -1
  159. package/dist/client/{chunk-5PQH4Y75.mjs → chunk-4OXKTA3D.mjs} +2 -2
  160. package/dist/client/{chunk-WJFHDTYF.mjs → chunk-52CGCQ7B.mjs} +5 -5
  161. package/dist/client/{chunk-CHAB5ACD.mjs → chunk-7UCLJ5SP.mjs} +2 -2
  162. package/dist/client/{chunk-U2EW7RSR.mjs → chunk-F5VRX5Y6.mjs} +1 -1
  163. package/dist/client/{chunk-SBBSMFFG.mjs → chunk-SYIJ5JO2.mjs} +1 -1
  164. package/dist/client/{chunk-EQKYMX4N.mjs → chunk-UHDWIXVR.mjs} +180 -157
  165. package/dist/client/{chunk-RJHTCTCZ.mjs → chunk-VGDBVNOO.mjs} +429 -15
  166. package/dist/client/{chunk-S3MKFGOG.mjs → chunk-ZE5G642V.mjs} +1 -1
  167. package/dist/client/{chunk-CSZGLBYR.mjs → chunk-ZKUO52W3.mjs} +1 -1
  168. package/dist/client/client.mjs +2685 -847
  169. package/dist/client/{courseRegistration-VUG2JJDB.mjs → courseRegistration-YBOGURTA.mjs} +5 -5
  170. package/dist/client/{eventCalendar-E7D2LD4N.mjs → eventCalendar-K4QJVCMD.mjs} +7 -7
  171. package/dist/client/{eventCombined-FUZ2Z3CS.mjs → eventCombined-MTXGMTCZ.mjs} +7 -7
  172. package/dist/client/{eventDetails-QRITJAOW.mjs → eventDetails-3PC4NL3U.mjs} +7 -7
  173. package/dist/client/{eventListing-INMQMJZ5.mjs → eventListing-TFJET6DN.mjs} +7 -7
  174. package/dist/client/{eventRegistration-TOOJD4WU.mjs → eventRegistration-QGPBGJTW.mjs} +7 -7
  175. package/dist/client/{form-BOWN7ZNQ.mjs → form-MDKR4FNB.mjs} +2 -2
  176. package/dist/client/{headerSection-HFQNZOUU.mjs → headerSection-Y5TMR3TW.mjs} +3 -3
  177. package/dist/client/hooks.mjs +2077 -546
  178. package/dist/client/{locationMap-VUZGC7Y5.mjs → locationMap-RH2LG7FZ.mjs} +2 -2
  179. package/dist/client/{newsletterForm-X2XQTPCB.mjs → newsletterForm-ZR5UDGBT.mjs} +2 -2
  180. package/dist/client/{productDetail-TA7D2G2B.mjs → productDetail-OIGDR4YE.mjs} +6 -6
  181. package/dist/client/{productList-AZOLOZKM.mjs → productList-4MA5S2CX.mjs} +6 -6
  182. package/dist/client/rendering/client.mjs +2560 -1205
  183. package/dist/client/rendering/islands.mjs +19 -19
  184. package/dist/client/rendering.mjs +2932 -1021
  185. package/dist/client/{shop-ZDLO7IIG.mjs → shop-WXSYV5QO.mjs} +6 -6
  186. package/dist/preview-next/before-render.mjs +40 -0
  187. package/dist/preview-next/client/runtime.mjs +5 -5
  188. package/dist/preview-next/middleware.mjs +40 -0
  189. package/dist/{sdk-runtime-CTWKNBDQ.mjs → sdk-runtime-7HJYPRWQ.mjs} +6 -6
  190. package/dist/server/components.mjs +2232 -534
  191. package/dist/server/config-validation.mjs +2068 -536
  192. package/dist/server/config.mjs +2068 -536
  193. package/dist/server/data.mjs +2077 -546
  194. package/dist/server/index.mjs +42 -1
  195. package/dist/server/next.mjs +2345 -574
  196. package/dist/server/page-converter.mjs +2684 -1220
  197. package/dist/server/prebuild.mjs +1 -1
  198. package/dist/server/rendering/server.mjs +2244 -546
  199. package/dist/server/rendering.mjs +2323 -552
  200. package/dist/server/routing.mjs +2012 -420
  201. package/dist/server/server.mjs +2153 -549
  202. package/dist/server/theme-bridge.mjs +1180 -101
  203. package/dist/server/theme.mjs +92 -1
  204. package/dist/styles/index.css +292 -36
  205. package/package.json +1 -1
  206. package/dist/SdkPreviewModeRuntime-RNVRHFFR.mjs +0 -8
@@ -0,0 +1,356 @@
1
+ import type { TemplateBlockDefinition, TemplateDefinition } from '../templates/types';
2
+ declare const __entrySlotBrand: unique symbol;
3
+ type Brand<TValue, TBrand extends string> = TValue & {
4
+ readonly [__entrySlotBrand]: TBrand;
5
+ };
6
+ export type SlotKey = Brand<string, 'SlotKey'>;
7
+ export type EntryBlockSlotId = Brand<string, 'EntryBlockSlotId'>;
8
+ export type EntrySlotContentEntryId = Brand<string, 'EntrySlotContentEntryId'>;
9
+ export type EntrySlotPageId = Brand<string, 'EntrySlotPageId'>;
10
+ export type EntrySlotBlockId = Brand<string, 'EntrySlotBlockId'>;
11
+ export type EntrySlotContentVersionId = Brand<string, 'EntrySlotContentVersionId'>;
12
+ export type EntrySlotBlockOrderIndex = Brand<number, 'EntrySlotBlockOrderIndex'>;
13
+ export type EntrySlotResult<TValue, TError> = Readonly<{
14
+ ok: true;
15
+ value: TValue;
16
+ }> | Readonly<{
17
+ ok: false;
18
+ error: TError;
19
+ }>;
20
+ export type SlotKeyParseError = Readonly<{
21
+ kind: 'not-string';
22
+ }> | Readonly<{
23
+ kind: 'empty';
24
+ }> | Readonly<{
25
+ kind: 'invalid-format';
26
+ value: string;
27
+ }>;
28
+ export type BrandedUuidParseError = Readonly<{
29
+ kind: 'not-string';
30
+ }> | Readonly<{
31
+ kind: 'empty';
32
+ }> | Readonly<{
33
+ kind: 'invalid-uuid';
34
+ value: string;
35
+ }>;
36
+ export type NonEmptyStringParseError = Readonly<{
37
+ kind: 'not-string';
38
+ }> | Readonly<{
39
+ kind: 'empty';
40
+ }>;
41
+ export declare function unsafeAsSlotKey(value: string): SlotKey;
42
+ export declare function unsafeAsEntryBlockSlotId(value: string): EntryBlockSlotId;
43
+ export declare function unsafeAsEntrySlotContentEntryId(value: string): EntrySlotContentEntryId;
44
+ export declare function unsafeAsEntrySlotPageId(value: string): EntrySlotPageId;
45
+ export declare function unsafeAsEntrySlotBlockId(value: string): EntrySlotBlockId;
46
+ export declare function unsafeAsEntrySlotContentVersionId(value: string): EntrySlotContentVersionId;
47
+ export declare function unsafeAsEntrySlotBlockOrderIndex(value: number): EntrySlotBlockOrderIndex;
48
+ export declare function parseSlotKey(value: unknown): EntrySlotResult<SlotKey, SlotKeyParseError>;
49
+ export declare function parseEntryBlockSlotId(value: unknown): EntrySlotResult<EntryBlockSlotId, BrandedUuidParseError>;
50
+ export declare const SYSTEM_ENTRY_SLOT_BLOCK_KIND: "system.entry-slot";
51
+ export declare const DEFAULT_ENTRY_SLOT_ALLOWED_BLOCKS: readonly ["block.body-text", "block.rich-text", "block.image-gallery", "block.cta-full"];
52
+ export type DefaultEntrySlotBlockKind = (typeof DEFAULT_ENTRY_SLOT_ALLOWED_BLOCKS)[number];
53
+ export type EntrySlotAllowedBlocks = Readonly<{
54
+ kind: 'default';
55
+ blockKinds: readonly DefaultEntrySlotBlockKind[];
56
+ }> | Readonly<{
57
+ kind: 'restricted';
58
+ blockKinds: readonly string[];
59
+ }> | Readonly<{
60
+ kind: 'none';
61
+ blockKinds: readonly [];
62
+ }>;
63
+ export type EntrySlotDefinition = Readonly<{
64
+ slotKey: SlotKey;
65
+ label: string;
66
+ allowedBlocks: EntrySlotAllowedBlocks;
67
+ }>;
68
+ export type EntrySlotDefinitionParseError = Readonly<{
69
+ kind: 'invalid-slot-scope';
70
+ blockIndex: number;
71
+ scope: TemplateBlockDefinition['scope'];
72
+ }> | Readonly<{
73
+ kind: 'invalid-slot-content';
74
+ blockIndex: number;
75
+ }> | Readonly<{
76
+ kind: 'invalid-slot-key';
77
+ blockIndex: number;
78
+ error: SlotKeyParseError;
79
+ }> | Readonly<{
80
+ kind: 'missing-label';
81
+ blockIndex: number;
82
+ slotKey: SlotKey;
83
+ }> | Readonly<{
84
+ kind: 'invalid-allowed-blocks';
85
+ blockIndex: number;
86
+ slotKey: SlotKey;
87
+ }> | Readonly<{
88
+ kind: 'invalid-allowed-block-kind';
89
+ blockIndex: number;
90
+ slotKey: SlotKey;
91
+ value: unknown;
92
+ }> | Readonly<{
93
+ kind: 'template-only-block-kind';
94
+ blockIndex: number;
95
+ slotKey: SlotKey;
96
+ blockKind: string;
97
+ }> | Readonly<{
98
+ kind: 'duplicate-allowed-block-kind';
99
+ blockIndex: number;
100
+ slotKey: SlotKey;
101
+ blockKind: string;
102
+ }> | Readonly<{
103
+ kind: 'duplicate-slot-key';
104
+ slotKey: SlotKey;
105
+ firstBlockIndex: number;
106
+ blockIndex: number;
107
+ }>;
108
+ export declare function parseEntrySlotDefinitions(template: Pick<TemplateDefinition, 'blocks'>): EntrySlotResult<readonly EntrySlotDefinition[], EntrySlotDefinitionParseError>;
109
+ export declare function isEntrySlotTemplateBlock(block: TemplateBlockDefinition): block is TemplateBlockDefinition & Readonly<{
110
+ blockKind: typeof SYSTEM_ENTRY_SLOT_BLOCK_KIND;
111
+ }>;
112
+ export type EntrySlotBlockKindValidationError = Readonly<{
113
+ kind: 'template-only-block-kind';
114
+ blockKind: string;
115
+ }> | Readonly<{
116
+ kind: 'block-kind-not-allowed';
117
+ blockKind: string;
118
+ slotKey: SlotKey;
119
+ }>;
120
+ export declare function validateBlockKindForEntrySlot(definition: EntrySlotDefinition, blockKind: string): EntrySlotResult<string, EntrySlotBlockKindValidationError>;
121
+ export type StoredEntrySlotSummary = Readonly<{
122
+ entrySlotId: EntryBlockSlotId;
123
+ slotKey: SlotKey;
124
+ draftCompositionVersionId: EntrySlotContentVersionId | null;
125
+ publishedCompositionVersionId: EntrySlotContentVersionId | null;
126
+ }>;
127
+ export type DefinedEntrySlot = Readonly<{
128
+ kind: 'defined';
129
+ definition: EntrySlotDefinition;
130
+ entrySlot: StoredEntrySlotSummary | null;
131
+ }>;
132
+ export type OrphanedEntrySlot = Readonly<{
133
+ kind: 'orphaned';
134
+ slotKey: SlotKey;
135
+ entrySlot: StoredEntrySlotSummary;
136
+ }>;
137
+ export type VisibleEntrySlot = DefinedEntrySlot | OrphanedEntrySlot;
138
+ export type EntryPageCompositionState = Readonly<{
139
+ kind: 'absent';
140
+ }> | Readonly<{
141
+ kind: 'draft-only';
142
+ draftCompositionVersionId: EntrySlotContentVersionId;
143
+ }> | Readonly<{
144
+ kind: 'published-only';
145
+ publishedCompositionVersionId: EntrySlotContentVersionId;
146
+ }> | Readonly<{
147
+ kind: 'draft-and-published';
148
+ draftCompositionVersionId: EntrySlotContentVersionId;
149
+ publishedCompositionVersionId: EntrySlotContentVersionId;
150
+ }> | Readonly<{
151
+ kind: 'invalid';
152
+ reason: 'orphaned-slot' | 'missing-slot-definition';
153
+ }>;
154
+ export declare function resolveEntrySlotVisibility(input: {
155
+ definitions: readonly EntrySlotDefinition[];
156
+ storedSlots: readonly StoredEntrySlotSummary[];
157
+ }): readonly VisibleEntrySlot[];
158
+ export declare function resolveEntryPageCompositionState(slot: VisibleEntrySlot): EntryPageCompositionState;
159
+ export type EntrySlotBlockSource<TBlock> = Readonly<{
160
+ slotKey: SlotKey | string;
161
+ blocks: readonly TBlock[];
162
+ }>;
163
+ export declare function selectBlocksForDeclaredEntrySlot<TBlock>(input: {
164
+ declaredSlotKey: SlotKey;
165
+ entrySlots: readonly EntrySlotBlockSource<TBlock>[];
166
+ }): readonly TBlock[];
167
+ export type MissingEntrySlotBlockContentReason = 'new-block' | 'deleted-content-version' | 'unpublished-block';
168
+ export type PublishedEntrySlotBlockSnapshot = Readonly<{
169
+ kind: 'published-block-content';
170
+ blockId: EntrySlotBlockId;
171
+ contentVersionId: EntrySlotContentVersionId;
172
+ identifier: string | null;
173
+ blockKind: string;
174
+ purpose: string;
175
+ orderIndex: EntrySlotBlockOrderIndex;
176
+ }>;
177
+ export type DraftEntrySlotBlockSnapshot = Readonly<{
178
+ kind: 'draft-block-content';
179
+ blockId: EntrySlotBlockId;
180
+ contentVersionId: EntrySlotContentVersionId | null;
181
+ identifier: string | null;
182
+ blockKind: string;
183
+ purpose: string;
184
+ orderIndex: EntrySlotBlockOrderIndex;
185
+ }>;
186
+ export type MissingEntrySlotBlockSnapshot = Readonly<{
187
+ kind: 'missing-block-content';
188
+ blockId: EntrySlotBlockId;
189
+ identifier: string | null;
190
+ blockKind: string;
191
+ purpose: string;
192
+ orderIndex: EntrySlotBlockOrderIndex;
193
+ reason: MissingEntrySlotBlockContentReason;
194
+ }>;
195
+ export type EntrySlotBlockSnapshot = PublishedEntrySlotBlockSnapshot | DraftEntrySlotBlockSnapshot | MissingEntrySlotBlockSnapshot;
196
+ export type DraftEntrySlotCompositionVersionDataV1 = Readonly<{
197
+ schemaVersion: 1;
198
+ stage: 'draft';
199
+ entrySlotId: EntryBlockSlotId;
200
+ contentEntryId: EntrySlotContentEntryId;
201
+ slotKey: SlotKey;
202
+ blockSequence: readonly EntrySlotBlockSnapshot[];
203
+ }>;
204
+ export type PublishedEntrySlotCompositionVersionDataV1 = Readonly<{
205
+ schemaVersion: 1;
206
+ stage: 'published';
207
+ entrySlotId: EntryBlockSlotId;
208
+ contentEntryId: EntrySlotContentEntryId;
209
+ slotKey: SlotKey;
210
+ blockSequence: readonly PublishedEntrySlotBlockSnapshot[];
211
+ }>;
212
+ export type EntrySlotCompositionVersionDataV1 = DraftEntrySlotCompositionVersionDataV1 | PublishedEntrySlotCompositionVersionDataV1;
213
+ export type PublishedEntrySlotCompositionBuildError = Readonly<{
214
+ kind: 'published-composition-contains-unpublished-block';
215
+ blockId: EntrySlotBlockId;
216
+ snapshotKind: Exclude<EntrySlotBlockSnapshot['kind'], 'published-block-content'>;
217
+ }>;
218
+ export declare function buildDraftEntrySlotCompositionVersionData(input: {
219
+ entrySlotId: EntryBlockSlotId;
220
+ contentEntryId: EntrySlotContentEntryId;
221
+ slotKey: SlotKey;
222
+ blockSequence: readonly EntrySlotBlockSnapshot[];
223
+ }): DraftEntrySlotCompositionVersionDataV1;
224
+ export declare function buildPublishedEntrySlotCompositionVersionData(input: {
225
+ entrySlotId: EntryBlockSlotId;
226
+ contentEntryId: EntrySlotContentEntryId;
227
+ slotKey: SlotKey;
228
+ blockSequence: readonly EntrySlotBlockSnapshot[];
229
+ }): EntrySlotResult<PublishedEntrySlotCompositionVersionDataV1, PublishedEntrySlotCompositionBuildError>;
230
+ export type EntrySlotCompositionParseError = Readonly<{
231
+ kind: 'not-object';
232
+ }> | Readonly<{
233
+ kind: 'unsupported-schema-version';
234
+ schemaVersion: unknown;
235
+ }> | Readonly<{
236
+ kind: 'invalid-stage';
237
+ stage: unknown;
238
+ }> | Readonly<{
239
+ kind: 'invalid-entry-slot-id';
240
+ error: BrandedUuidParseError | NonEmptyStringParseError;
241
+ }> | Readonly<{
242
+ kind: 'invalid-content-entry-id';
243
+ error: NonEmptyStringParseError;
244
+ }> | Readonly<{
245
+ kind: 'invalid-slot-key';
246
+ error: SlotKeyParseError;
247
+ }> | Readonly<{
248
+ kind: 'invalid-block-sequence';
249
+ }> | Readonly<{
250
+ kind: 'invalid-block-snapshot';
251
+ index: number;
252
+ }> | Readonly<{
253
+ kind: 'published-composition-contains-unpublished-block';
254
+ index: number;
255
+ }>;
256
+ export declare function parseEntrySlotCompositionVersionData(input: unknown): EntrySlotResult<EntrySlotCompositionVersionDataV1, EntrySlotCompositionParseError>;
257
+ export declare function blockContentVersionIdsForEntrySlotCompositionVersionData(versionData: EntrySlotCompositionVersionDataV1): readonly EntrySlotContentVersionId[];
258
+ export type SlotPublishPlan = Readonly<{
259
+ kind: 'publishable';
260
+ slotKey: SlotKey;
261
+ needsBlockContentPublish: boolean;
262
+ }> | Readonly<{
263
+ kind: 'blocked';
264
+ slotKey: SlotKey;
265
+ reason: 'missing-block-content';
266
+ blockIds: readonly EntrySlotBlockId[];
267
+ }> | Readonly<{
268
+ kind: 'warning-only';
269
+ slotKey: SlotKey;
270
+ warning: 'orphaned-slot-hidden';
271
+ }>;
272
+ export declare function planEntrySlotPublish(input: {
273
+ slot: VisibleEntrySlot;
274
+ draftBlockSequence: readonly EntrySlotBlockSnapshot[];
275
+ }): SlotPublishPlan;
276
+ export type SlotDiscardPlan = Readonly<{
277
+ kind: 'discardable';
278
+ slotKey: SlotKey;
279
+ }> | Readonly<{
280
+ kind: 'skip-hidden-orphan';
281
+ slotKey: SlotKey;
282
+ }>;
283
+ export declare function planEntrySlotDiscard(slot: VisibleEntrySlot): SlotDiscardPlan;
284
+ export type SdkEntryBlocksPatch = Readonly<{
285
+ kind: 'leave-unchanged';
286
+ }> | Readonly<{
287
+ kind: 'patch-slots';
288
+ slots: readonly SdkEntrySlotBlocksPatch[];
289
+ }>;
290
+ export type SdkEntrySlotBlocksPatch = Readonly<{
291
+ kind: 'clear-slot';
292
+ slotKey: SlotKey;
293
+ }> | Readonly<{
294
+ kind: 'replace-slot';
295
+ slotKey: SlotKey;
296
+ blocks: readonly SdkEntrySlotBlockInput[];
297
+ }>;
298
+ export type SdkEntrySlotBlockInput = Readonly<{
299
+ identifier: string | null;
300
+ kind: string;
301
+ content: Record<string, unknown>;
302
+ }>;
303
+ export type SdkEntryBlocksPatchParseError = Readonly<{
304
+ kind: 'invalid-blocks-object';
305
+ }> | Readonly<{
306
+ kind: 'invalid-slot-key';
307
+ key: string;
308
+ error: SlotKeyParseError;
309
+ }> | Readonly<{
310
+ kind: 'invalid-slot-blocks';
311
+ slotKey: SlotKey;
312
+ }> | Readonly<{
313
+ kind: 'invalid-block';
314
+ slotKey: SlotKey;
315
+ blockIndex: number;
316
+ }> | Readonly<{
317
+ kind: 'template-only-block-kind';
318
+ slotKey: SlotKey;
319
+ blockIndex: number;
320
+ blockKind: string;
321
+ }>;
322
+ export declare function parseSdkEntryBlocksPatch(blocks: unknown): EntrySlotResult<SdkEntryBlocksPatch, SdkEntryBlocksPatchParseError>;
323
+ export type ContentVersionOwner = Readonly<{
324
+ kind: 'block';
325
+ blockId: EntrySlotBlockId;
326
+ }> | Readonly<{
327
+ kind: 'entry';
328
+ contentEntryId: EntrySlotContentEntryId;
329
+ }> | Readonly<{
330
+ kind: 'page';
331
+ pageId: EntrySlotPageId;
332
+ }> | Readonly<{
333
+ kind: 'entry-slot';
334
+ entrySlotId: EntryBlockSlotId;
335
+ }>;
336
+ export type EditableBlockOwner = Readonly<{
337
+ kind: 'page';
338
+ pageId: EntrySlotPageId;
339
+ }> | Readonly<{
340
+ kind: 'entry-slot';
341
+ entrySlotId: EntryBlockSlotId;
342
+ }>;
343
+ export type EntryLifecycleRecoveryCheckpoint = 'entry-fields' | 'route-metadata' | 'slot-composition' | 'block-published-refs' | 'cache-revalidation';
344
+ export type EntryLifecycleCommitPlan = Readonly<{
345
+ kind: 'transactional-commit';
346
+ }> | Readonly<{
347
+ kind: 'sequential-commit-with-recovery';
348
+ checkpoints: readonly EntryLifecycleRecoveryCheckpoint[];
349
+ }>;
350
+ export type EntrySlotTemplateLifecycleDecision = Readonly<{
351
+ publicTemplateDefinitions: 'effective-current';
352
+ previewTemplateDefinitions: 'draft-current';
353
+ removedSlotData: 'retained-hidden-until-slot-reintroduced';
354
+ }>;
355
+ export declare const ENTRY_SLOT_TEMPLATE_LIFECYCLE_DECISION: EntrySlotTemplateLifecycleDecision;
356
+ export {};
@@ -19,3 +19,4 @@ export * from './templates/bindingValidation';
19
19
  export * from './templates/manifestAdapter';
20
20
  export * from './templates/auditBindings';
21
21
  export * from './templates/editorState';
22
+ export * from './entry-slots';
@@ -126,6 +126,13 @@ export declare const DEFAULT_TEMPLATE_DEFINITIONS: {
126
126
  readonly blockKind: "block.body-text";
127
127
  readonly scope: "entry";
128
128
  readonly bindings: import("./types").TemplateBindingRecord;
129
+ }, {
130
+ readonly blockKind: "system.entry-slot";
131
+ readonly scope: "template";
132
+ readonly content: {
133
+ readonly slotKey: "main";
134
+ readonly label: "Page content";
135
+ };
129
136
  }, {
130
137
  readonly blockKind: "block.event-registration";
131
138
  readonly scope: "entry";
@@ -1463,11 +1463,12 @@ export type Database = {
1463
1463
  block_id: string | null;
1464
1464
  created_at: string;
1465
1465
  draft_content_id: string | null;
1466
+ entry_slot_id: string | null;
1466
1467
  id: string;
1467
1468
  identifier: string;
1468
1469
  kind: string;
1469
1470
  order_index: number;
1470
- page_id: string;
1471
+ page_id: string | null;
1471
1472
  published_content_id: string | null;
1472
1473
  purpose: string;
1473
1474
  site_id: string;
@@ -1478,11 +1479,12 @@ export type Database = {
1478
1479
  block_id?: string | null;
1479
1480
  created_at?: string;
1480
1481
  draft_content_id?: string | null;
1482
+ entry_slot_id?: string | null;
1481
1483
  id?: string;
1482
1484
  identifier: string;
1483
1485
  kind: string;
1484
1486
  order_index?: number;
1485
- page_id: string;
1487
+ page_id?: string | null;
1486
1488
  published_content_id?: string | null;
1487
1489
  purpose: string;
1488
1490
  site_id: string;
@@ -1493,11 +1495,12 @@ export type Database = {
1493
1495
  block_id?: string | null;
1494
1496
  created_at?: string;
1495
1497
  draft_content_id?: string | null;
1498
+ entry_slot_id?: string | null;
1496
1499
  id?: string;
1497
1500
  identifier?: string;
1498
1501
  kind?: string;
1499
1502
  order_index?: number;
1500
- page_id?: string;
1503
+ page_id?: string | null;
1501
1504
  published_content_id?: string | null;
1502
1505
  purpose?: string;
1503
1506
  site_id?: string;
@@ -1512,6 +1515,13 @@ export type Database = {
1512
1515
  referencedRelation: "content_versions";
1513
1516
  referencedColumns: ["id"];
1514
1517
  },
1518
+ {
1519
+ foreignKeyName: "blocks_entry_slot_id_fkey";
1520
+ columns: ["entry_slot_id"];
1521
+ isOneToOne: false;
1522
+ referencedRelation: "entry_block_slots";
1523
+ referencedColumns: ["id"];
1524
+ },
1515
1525
  {
1516
1526
  foreignKeyName: "blocks_page_id_fkey";
1517
1527
  columns: ["page_id"];
@@ -4519,6 +4529,7 @@ export type Database = {
4519
4529
  deleted_at: string | null;
4520
4530
  deleted_by: string | null;
4521
4531
  design_state: Json | null;
4532
+ entry_slot_id: string | null;
4522
4533
  id: string;
4523
4534
  owner_kind: Database["public"]["Enums"]["content_owner_kind"];
4524
4535
  page_id: string | null;
@@ -4536,6 +4547,7 @@ export type Database = {
4536
4547
  deleted_at?: string | null;
4537
4548
  deleted_by?: string | null;
4538
4549
  design_state?: Json | null;
4550
+ entry_slot_id?: string | null;
4539
4551
  id?: string;
4540
4552
  owner_kind?: Database["public"]["Enums"]["content_owner_kind"];
4541
4553
  page_id?: string | null;
@@ -4553,6 +4565,7 @@ export type Database = {
4553
4565
  deleted_at?: string | null;
4554
4566
  deleted_by?: string | null;
4555
4567
  design_state?: Json | null;
4568
+ entry_slot_id?: string | null;
4556
4569
  id?: string;
4557
4570
  owner_kind?: Database["public"]["Enums"]["content_owner_kind"];
4558
4571
  page_id?: string | null;
@@ -4584,6 +4597,13 @@ export type Database = {
4584
4597
  referencedRelation: "content_entries";
4585
4598
  referencedColumns: ["id"];
4586
4599
  },
4600
+ {
4601
+ foreignKeyName: "content_versions_entry_slot_id_fkey";
4602
+ columns: ["entry_slot_id"];
4603
+ isOneToOne: false;
4604
+ referencedRelation: "entry_block_slots";
4605
+ referencedColumns: ["id"];
4606
+ },
4587
4607
  {
4588
4608
  foreignKeyName: "content_versions_page_id_fkey";
4589
4609
  columns: ["page_id"];
@@ -6722,6 +6742,80 @@ export type Database = {
6722
6742
  }
6723
6743
  ];
6724
6744
  };
6745
+ entry_block_slots: {
6746
+ Row: {
6747
+ content_entry_id: string;
6748
+ created_at: string;
6749
+ created_by: string | null;
6750
+ deleted_at: string | null;
6751
+ deleted_by: string | null;
6752
+ draft_composition_version_id: string | null;
6753
+ id: string;
6754
+ published_composition_version_id: string | null;
6755
+ site_id: string;
6756
+ slot_key: string;
6757
+ updated_at: string;
6758
+ updated_by: string | null;
6759
+ };
6760
+ Insert: {
6761
+ content_entry_id: string;
6762
+ created_at?: string;
6763
+ created_by?: string | null;
6764
+ deleted_at?: string | null;
6765
+ deleted_by?: string | null;
6766
+ draft_composition_version_id?: string | null;
6767
+ id?: string;
6768
+ published_composition_version_id?: string | null;
6769
+ site_id: string;
6770
+ slot_key: string;
6771
+ updated_at?: string;
6772
+ updated_by?: string | null;
6773
+ };
6774
+ Update: {
6775
+ content_entry_id?: string;
6776
+ created_at?: string;
6777
+ created_by?: string | null;
6778
+ deleted_at?: string | null;
6779
+ deleted_by?: string | null;
6780
+ draft_composition_version_id?: string | null;
6781
+ id?: string;
6782
+ published_composition_version_id?: string | null;
6783
+ site_id?: string;
6784
+ slot_key?: string;
6785
+ updated_at?: string;
6786
+ updated_by?: string | null;
6787
+ };
6788
+ Relationships: [
6789
+ {
6790
+ foreignKeyName: "entry_block_slots_content_entry_id_fkey";
6791
+ columns: ["content_entry_id"];
6792
+ isOneToOne: false;
6793
+ referencedRelation: "content_entries";
6794
+ referencedColumns: ["id"];
6795
+ },
6796
+ {
6797
+ foreignKeyName: "entry_block_slots_draft_composition_version_id_fkey";
6798
+ columns: ["draft_composition_version_id"];
6799
+ isOneToOne: false;
6800
+ referencedRelation: "content_versions";
6801
+ referencedColumns: ["id"];
6802
+ },
6803
+ {
6804
+ foreignKeyName: "entry_block_slots_published_composition_version_id_fkey";
6805
+ columns: ["published_composition_version_id"];
6806
+ isOneToOne: false;
6807
+ referencedRelation: "content_versions";
6808
+ referencedColumns: ["id"];
6809
+ },
6810
+ {
6811
+ foreignKeyName: "entry_block_slots_site_id_fkey";
6812
+ columns: ["site_id"];
6813
+ isOneToOne: false;
6814
+ referencedRelation: "sites";
6815
+ referencedColumns: ["id"];
6816
+ }
6817
+ ];
6818
+ };
6725
6819
  event_attendee_guests: {
6726
6820
  Row: {
6727
6821
  attendee_id: string;
@@ -15551,6 +15645,7 @@ export type Database = {
15551
15645
  content_entry_id: string;
15552
15646
  data: Json;
15553
15647
  design_state: Json;
15648
+ entry_slot_id: string;
15554
15649
  id: string;
15555
15650
  owner_kind: Database["public"]["Enums"]["content_owner_kind"];
15556
15651
  page_id: string;
@@ -16556,7 +16651,7 @@ export type Database = {
16556
16651
  billing_interval: "monthly" | "annual";
16557
16652
  cancellation_context_category: "customer_requested" | "schedule_conflict" | "duplicate_or_admin_error" | "non_payment" | "policy_or_eligibility" | "other" | "legacy_client_unspecified";
16558
16653
  content_entry_status: "draft" | "scheduled" | "published" | "archived";
16559
- content_owner_kind: "block" | "entry" | "page";
16654
+ content_owner_kind: "block" | "entry" | "page" | "entry_slot";
16560
16655
  content_stage: "draft" | "published";
16561
16656
  gsc_property_type: "domain" | "url_prefix";
16562
16657
  impersonation_scope: "read" | "write";
@@ -17291,7 +17386,7 @@ export declare const Constants: {
17291
17386
  readonly billing_interval: readonly ["monthly", "annual"];
17292
17387
  readonly cancellation_context_category: readonly ["customer_requested", "schedule_conflict", "duplicate_or_admin_error", "non_payment", "policy_or_eligibility", "other", "legacy_client_unspecified"];
17293
17388
  readonly content_entry_status: readonly ["draft", "scheduled", "published", "archived"];
17294
- readonly content_owner_kind: readonly ["block", "entry", "page"];
17389
+ readonly content_owner_kind: readonly ["block", "entry", "page", "entry_slot"];
17295
17390
  readonly content_stage: readonly ["draft", "published"];
17296
17391
  readonly gsc_property_type: readonly ["domain", "url_prefix"];
17297
17392
  readonly impersonation_scope: readonly ["read", "write"];
@@ -7,6 +7,7 @@ import { type EditorStructuralCommand } from '../../core/src/index';
7
7
  import { type CustomBlockRegistryEntry, type SdkConfigForBlockPicker } from './block-editor/sdkBlockMerger';
8
8
  import { type BlockActionPresentation } from './block-editor/actionPresentation';
9
9
  import { type ReorderControlMode } from './block-editor/reorderControlMode';
10
+ import { type BlockEditorOwner } from './block-editor/owner';
10
11
  import type { ArrayKeysManager, BlockEditorHandle, BlockItem, BlockFocusRequest, UiSlice, DraftsSlice } from './block-editor/types';
11
12
  import type { BlockDraftSaveability, FieldWidgetComponent } from '../../block-form/src/client/index';
12
13
  type UiState = {
@@ -35,7 +36,7 @@ type UiState = {
35
36
  };
36
37
  export type BlockEditorProps = {
37
38
  siteId: string;
38
- pageId: string;
39
+ owner: BlockEditorOwner;
39
40
  blocks: BlockItem[];
40
41
  recoveryConflictBlockIds?: readonly string[];
41
42
  recoveryConflictReviewRequestId?: number | null;
@@ -43,6 +44,7 @@ export type BlockEditorProps = {
43
44
  apiClient: ApiClient;
44
45
  enableReordering?: boolean;
45
46
  enableCreation?: boolean;
47
+ enableDeletion?: boolean;
46
48
  onBlockSave?: (blockId: string, content: Record<string, unknown>) => void;
47
49
  onBlocksChange?: (blocks: BlockItem[]) => void;
48
50
  theme?: Theme | null;
@@ -53,6 +55,9 @@ export type BlockEditorProps = {
53
55
  enabledContentTypes?: string[];
54
56
  sdkConfig?: SdkConfigForBlockPicker | null;
55
57
  customBlocks?: readonly CustomBlockRegistryEntry[];
58
+ allowedBlockKinds?: readonly string[] | null;
59
+ emptyUnavailableMessage?: string;
60
+ initialCollapsed?: boolean;
56
61
  reorderControlMode?: ReorderControlMode;
57
62
  actionPresentation?: BlockActionPresentation;
58
63
  };
@@ -4,7 +4,7 @@ import type { BlockManifest, Theme } from '../../blocks/src/index';
4
4
  import { type PageDesignEditorBlock } from '../../theme-core/src/site-styles/index';
5
5
  import { type EditorBlockId } from '../../core/src/index';
6
6
  import type { ArrayKeysManager, DraftsSlice, UiStore as BlockEditorUiStore } from './block-editor/types';
7
- type UiStoreState = {
7
+ export type BlockFormUiStoreState = {
8
8
  setActivePreviewField: (field: {
9
9
  kind: 'block';
10
10
  blockId: EditorBlockId;
@@ -16,10 +16,12 @@ type UiStoreState = {
16
16
  showAllValidation: (blockId: EditorBlockId) => boolean;
17
17
  getBlockSaveability: (blockId: EditorBlockId) => BlockDraftSaveability;
18
18
  };
19
- drafts: Pick<DraftsSlice, 'getBlockSnapshot' | 'getCurrentValues' | 'initNewBlock' | 'updateBlockBaseline' | 'clearError' | 'setAtPath' | 'getAtPath'>;
19
+ drafts: Pick<DraftsSlice, 'getBlockSnapshot' | 'getCurrentValues' | 'clearError' | 'setAtPath' | 'getAtPath'> & {
20
+ updateBlockBaseline?: (blockId: EditorBlockId, data: Record<string, unknown> | null) => void;
21
+ };
20
22
  arrayKeys: ArrayKeysManager;
21
23
  };
22
- type UiStore = BlockEditorUiStore<UiStoreState>;
24
+ export type BlockFormUiStore = BlockEditorUiStore<BlockFormUiStoreState>;
23
25
  type BlockItem = {
24
26
  id?: string | null;
25
27
  kind: string;
@@ -33,11 +35,11 @@ type BlockFormFocusSignal = {
33
35
  fieldPath?: string | null;
34
36
  itemIndex?: number | null;
35
37
  };
36
- export declare function BlockForm({ siteId: _siteId, block, manifest, uiStore, hasRecoveryConflict, focusSignal, onFocusHandled, onSaveSuccess: _onSaveSuccess, theme, widgetOverrides, hideThemeV2RawStyleFields, pageDesignBlock, }: {
38
+ export declare function BlockForm({ siteId: _siteId, block, manifest, uiStore, hasRecoveryConflict, focusSignal, onFocusHandled, onSaveSuccess, theme, widgetOverrides, hideThemeV2RawStyleFields, pageDesignBlock, }: {
37
39
  siteId: string;
38
40
  block: BlockItem;
39
41
  manifest: BlockManifest;
40
- uiStore: UiStore;
42
+ uiStore: BlockFormUiStore;
41
43
  hasRecoveryConflict?: boolean;
42
44
  focusSignal?: BlockFormFocusSignal | null;
43
45
  onFocusHandled?: (requestId: number) => void;
@@ -2,6 +2,7 @@ import type { ApiClient } from '../../../../api/src/request';
2
2
  import type { BlockDescriptor } from '../../../../blocks/src/index';
3
3
  import type { EditorInsertBlockCommand } from '../../../../core/src/index';
4
4
  import type { BlockItem, BlockFocusTarget } from '../types';
5
+ import { type BlockEditorOwner } from '../owner';
5
6
  type UiStore = {
6
7
  getState: () => {
7
8
  history: {
@@ -9,11 +10,11 @@ type UiStore = {
9
10
  };
10
11
  };
11
12
  };
12
- export declare function useBlockCreation({ allowCreation, apiClient, siteId, pageId, blockList, setBlockList, onBlocksChange, triggerFocus, uiStore, }: {
13
+ export declare function useBlockCreation({ allowCreation, apiClient, siteId, owner, blockList, setBlockList, onBlocksChange, triggerFocus, uiStore, }: {
13
14
  allowCreation: boolean;
14
15
  apiClient: ApiClient;
15
16
  siteId: string;
16
- pageId: string;
17
+ owner: BlockEditorOwner;
17
18
  blockList: BlockItem[];
18
19
  setBlockList: (next: BlockItem[]) => void;
19
20
  onBlocksChange?: (blocks: BlockItem[]) => void;