@riverbankcms/sdk 0.62.2 → 0.62.4

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 (111) hide show
  1. package/dist/_dts/api/src/accessAdmin.d.ts +7 -0
  2. package/dist/_dts/api/src/bookingClosures.d.ts +106 -0
  3. package/dist/_dts/api/src/bookingManagementEndpoints.d.ts +18 -0
  4. package/dist/_dts/api/src/bookingRecords.d.ts +1 -1
  5. package/dist/_dts/api/src/calendar.d.ts +11 -1
  6. package/dist/_dts/api/src/contentRuntime.d.ts +2 -0
  7. package/dist/_dts/api/src/contentVersionHistory.d.ts +52 -0
  8. package/dist/_dts/api/src/contentVersionHistoryClient.d.ts +45 -0
  9. package/dist/_dts/api/src/endpoints.d.ts +110 -6
  10. package/dist/_dts/api/src/index.d.ts +4 -1
  11. package/dist/_dts/api/src/siteManagementEndpoints.d.ts +31 -7
  12. package/dist/_dts/api/src/siteMembers.d.ts +10 -1
  13. package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +33 -12
  14. package/dist/_dts/api/src/types.d.ts +2 -1
  15. package/dist/_dts/api/src/url.d.ts +3 -3
  16. package/dist/_dts/blocks/src/bindings/index.d.ts +2 -2
  17. package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.client.state.d.ts +12 -0
  18. package/dist/_dts/blocks/src/system/runtime/shared/components/FieldValidationMessage.d.ts +19 -0
  19. package/dist/_dts/blocks/src/system/runtime/shared/components/TerminalPanel.d.ts +8 -2
  20. package/dist/_dts/blocks/src/system/runtime/shared/components/index.d.ts +3 -1
  21. package/dist/_dts/blocks/src/system/runtime/shared/index.d.ts +2 -2
  22. package/dist/_dts/blocks/src/system/transforms/registry/_utils/themeColorResolution.d.ts +7 -0
  23. package/dist/_dts/content-editor/src/hooks/useDebouncedLatestSave.d.ts +24 -0
  24. package/dist/_dts/content-editor/src/index.d.ts +1 -0
  25. package/dist/_dts/content-editor/src/ui/stores/autosaveStore.d.ts +1 -0
  26. package/dist/_dts/content-editor/src/ui/stores/types.d.ts +1 -0
  27. package/dist/_dts/db/src/generated/supabase/database.types.d.ts +208 -0
  28. package/dist/_dts/db/src/schemas/forms.d.ts +1 -0
  29. package/dist/_dts/preview-next/src/client/blocks/BlockToolbar.d.ts +2 -1
  30. package/dist/_dts/preview-next/src/client/blocks/composer/composePageFromBlocks.d.ts +2 -1
  31. package/dist/_dts/preview-next/src/client/blocks/composer/index.d.ts +2 -2
  32. package/dist/_dts/preview-next/src/client/blocks/composer/mergeDrafts.d.ts +2 -1
  33. package/dist/_dts/preview-next/src/client/blocks/composer/types.d.ts +31 -8
  34. package/dist/_dts/preview-next/src/client/blocks/pageDesignRuntimePreview.d.ts +6 -5
  35. package/dist/_dts/preview-next/src/client/blocks/previewProjection/aiProposalProjection.d.ts +7 -0
  36. package/dist/_dts/preview-next/src/client/blocks/previewProjection/applyPreviewProjections.d.ts +7 -0
  37. package/dist/_dts/preview-next/src/client/blocks/previewProjection/index.d.ts +4 -0
  38. package/dist/_dts/preview-next/src/client/blocks/previewProjection/runtimeContentDecoration.d.ts +5 -0
  39. package/dist/_dts/preview-next/src/client/blocks/previewProjection/types.d.ts +72 -0
  40. package/dist/_dts/preview-next/src/client/index.d.ts +1 -1
  41. package/dist/_dts/preview-next/src/client/layout/PreviewLayoutContext.d.ts +6 -5
  42. package/dist/_dts/preview-next/src/client/preview/PageDesignEditorStateContext.d.ts +2 -1
  43. package/dist/_dts/preview-next/src/client/preview/PreviewEditorSidebar.d.ts +11 -1
  44. package/dist/_dts/preview-next/src/client/preview/PreviewShell.d.ts +9 -5
  45. package/dist/_dts/preview-next/src/client/preview/PreviewShellLayout.d.ts +6 -1
  46. package/dist/_dts/preview-next/src/client/preview/StyleConfigurator.d.ts +13 -2
  47. package/dist/_dts/preview-next/src/client/preview/StyleConfigurator.state.d.ts +7 -1
  48. package/dist/_dts/preview-next/src/client/preview/previewCustomizeControlStyles.d.ts +1 -0
  49. package/dist/_dts/preview-next/src/client/preview/previewCustomizeHistory.d.ts +1 -0
  50. package/dist/_dts/preview-next/src/client/preview/previewCustomizeRuntimePatch.d.ts +9 -1
  51. package/dist/_dts/preview-next/src/client/preview/previewCustomizeWorkflowState.d.ts +13 -0
  52. package/dist/_dts/preview-next/src/client/preview/sidebarTabPreference.d.ts +8 -2
  53. package/dist/_dts/preview-next/src/client/preview/siteChromeLookRows.d.ts +49 -0
  54. package/dist/_dts/sdk/src/public-api/contracts.d.ts +3 -1
  55. package/dist/_dts/sdk/src/version.d.ts +1 -1
  56. package/dist/_dts/surfaces/src/index.d.ts +1 -0
  57. package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
  58. package/dist/_dts/theme-core/src/index.d.ts +1 -1
  59. package/dist/_dts/theme-core/src/palette/variants/types.d.ts +2 -21
  60. package/dist/_dts/theme-core/src/site-styles/appearancePresetCatalog.d.ts +3 -67
  61. package/dist/_dts/theme-core/src/site-styles/appearancePresetTypes.d.ts +4 -62
  62. package/dist/_dts/theme-core/src/site-styles/appearancePresets.d.ts +1 -1
  63. package/dist/_dts/theme-core/src/site-styles/curatedSiteStyles.d.ts +24 -0
  64. package/dist/_dts/theme-core/src/site-styles/customizableSurfaces.d.ts +94 -0
  65. package/dist/_dts/theme-core/src/site-styles/footerLooks.d.ts +59 -0
  66. package/dist/_dts/theme-core/src/site-styles/generatedDesignPipeline.d.ts +4 -0
  67. package/dist/_dts/theme-core/src/site-styles/headerCtaVariants.d.ts +3 -0
  68. package/dist/_dts/theme-core/src/site-styles/headerLooks.d.ts +155 -0
  69. package/dist/_dts/theme-core/src/site-styles/headerOpeningSection.d.ts +15 -0
  70. package/dist/_dts/theme-core/src/site-styles/index.d.ts +6 -0
  71. package/dist/_dts/theme-core/src/site-styles/pageDesignAuthority.d.ts +7 -0
  72. package/dist/_dts/theme-core/src/site-styles/pageDesignEditorModel.d.ts +25 -0
  73. package/dist/_dts/theme-core/src/site-styles/previewCompiler.d.ts +15 -1
  74. package/dist/_dts/theme-core/src/site-styles/records.d.ts +1 -0
  75. package/dist/_dts/theme-core/src/site-styles/siteStyleBlockPolicies.d.ts +96 -0
  76. package/dist/_dts/theme-core/src/site-styles/types.d.ts +1 -2
  77. package/dist/_dts/theme-core/src/siteChrome.d.ts +44 -2
  78. package/dist/_dts/theme-core/src/tokens/colorTokenParts.d.ts +13 -0
  79. package/dist/_dts/theme-core/src/tokens/index.d.ts +2 -0
  80. package/dist/_dts/theme-core/src/tokens/themeColorTokens.d.ts +29 -0
  81. package/dist/_dts/theme-core/src/utils/tokenOrColor.d.ts +27 -1
  82. package/dist/cli/index.mjs +1139 -471
  83. package/dist/client/bookings.mjs +519 -368
  84. package/dist/client/client.mjs +4507 -3535
  85. package/dist/client/hooks.mjs +2634 -2035
  86. package/dist/client/rendering/client.mjs +4413 -3549
  87. package/dist/client/rendering/islands.mjs +3456 -2589
  88. package/dist/client/rendering.mjs +4921 -3949
  89. package/dist/preview-next/before-render.mjs +138 -6
  90. package/dist/preview-next/client/runtime.mjs +3541 -1573
  91. package/dist/preview-next/editor-base.css +31 -0
  92. package/dist/preview-next/middleware.mjs +131 -6
  93. package/dist/server/components.mjs +3214 -2560
  94. package/dist/server/config-validation.mjs +2859 -2260
  95. package/dist/server/config.mjs +2859 -2260
  96. package/dist/server/data.mjs +2634 -2035
  97. package/dist/server/index.mjs +132 -7
  98. package/dist/server/next.mjs +2983 -2329
  99. package/dist/server/page-converter.mjs +2478 -2029
  100. package/dist/server/prebuild.mjs +1 -1
  101. package/dist/server/rendering/server.mjs +3214 -2560
  102. package/dist/server/rendering.mjs +3233 -2579
  103. package/dist/server/routing.mjs +2725 -2028
  104. package/dist/server/server.mjs +2636 -2037
  105. package/dist/server/theme-bridge.mjs +1250 -767
  106. package/dist/server/theme.mjs +623 -498
  107. package/dist/styles/index.css +33 -0
  108. package/package.json +1 -1
  109. package/dist/_dts/blocks/src/system/transforms/registry/_utils/colorResolution.d.ts +0 -13
  110. package/dist/_dts/preview-next/src/client/blocks/overlay.d.ts +0 -30
  111. package/dist/_dts/theme-core/src/site-styles/siteChromeAppearancePresets.d.ts +0 -67
@@ -1,11 +1,19 @@
1
1
  import type { SystemCustomizeFacetSelection, Theme } from '@riverbankcms/blocks';
2
2
  import type { ListMediaAssetsResult, MediaAssetWithLabels } from '@riverbankcms/media-storage-supabase';
3
3
  import type { DbJson } from '@riverbankcms/db';
4
- import type { PageDesignEditorReadModel, PageDesignIntent, AppearancePresetId, BoundaryOptionId, DesignBlockId, LayoutVariantKey } from '@riverbankcms/theme-core/site-styles';
4
+ import type { PageDesignEditorReadModel, PageDesignIntent, AppearancePresetId, BoundaryOptionId, DesignBlockId, FooterLookId, HeaderLookId, LayoutVariantKey } from '@riverbankcms/theme-core/site-styles';
5
5
  import type { ButtonPersonalityId } from '@riverbankcms/theme-core/buttons';
6
6
  import type { PaletteOverrides, PaletteVariantId } from '@riverbankcms/theme-core/palette';
7
+ import type { APIEndpoint } from './apiEndpointTypes';
8
+ import type { AnalyticsReportFilters, AnalyticsReportResponse } from './analytics';
9
+ import type { CreateMediaAssetBody, MediaAssetResponse, MediaAssetFileFilterContract, MediaBulkDeleteResponse, MediaClassifyJobResponse, MediaJobSummaryResponse, MediaLabelSummary, MediaSettingsResponse } from './media';
10
+ import type { MediaUsageCheckResponse } from './shared-contracts';
11
+ import type { BlockWithContentResponse, BlockListItem, ContentEntryListStage, ListPublishedEntriesResponse, PageDraftRecord, PublishedBlockBaseline, PublishedContentEntryPreviewResponse, PublishedPostPreviewResponse, SdkBlockContent, SdkRuntimeContentByPathResponse, SdkTemplate, SiteBySlugResponse, ThemeGenerationTurn, ThemePreferencesRecord, ThemeRow } from './contentRuntime';
12
+ import type { GetVersionHistoryResponse, ListVersionHistoryResponse, RestoreVersionHistoryRequest, RestoreVersionHistoryResponse, VersionHistoryListQuery } from './contentVersionHistory';
13
+ import type { CreateInstagramZipUploadUrlRequest, CreateInstagramZipUploadUrlResponse, CreateMediaUploadUrlRequest, CreateMediaUploadUrlResponse, CreateSiteLogoUploadUrlRequest, CreateSiteLogoUploadUrlResponse, InstagramUploadZipRequest, MediaUploadFinalizeRequest, UploadSiteLogoRequest } from './siteInfrastructure';
14
+ import type { DevToolsGetSiteRoleDowngradeQuery, DevToolsImpersonationResponse, DevToolsSeedResponse, DevToolsSetSiteRoleDowngradeRequest, SiteRoleDowngradeState } from './siteOperations';
7
15
  /**
8
- * Round-trip shape for the Style configurator's persisted selections on the
16
+ * Round-trip shape for the Style configurator and site-chrome persisted selections on the
9
17
  * `saveSiteTheme` endpoint. Each field is optional independently so callers
10
18
  * can update one decision at a time; `null` explicitly clears the selection
11
19
  * (server falls back to the site style's default), distinct from omission
@@ -15,14 +23,9 @@ export type SiteThemeSelectionsPayload = {
15
23
  buttonPersonalityId?: ButtonPersonalityId | null;
16
24
  paletteVariantId?: PaletteVariantId | null;
17
25
  paletteOverrides?: PaletteOverrides | null;
26
+ headerLookId?: HeaderLookId | null;
27
+ footerLookId?: FooterLookId | null;
18
28
  };
19
- import type { APIEndpoint } from './apiEndpointTypes';
20
- import type { AnalyticsReportFilters, AnalyticsReportResponse } from './analytics';
21
- import type { CreateMediaAssetBody, MediaAssetResponse, MediaAssetFileFilterContract, MediaBulkDeleteResponse, MediaClassifyJobResponse, MediaJobSummaryResponse, MediaLabelSummary, MediaSettingsResponse } from './media';
22
- import type { MediaUsageCheckResponse } from './shared-contracts';
23
- import type { BlockWithContentResponse, BlockListItem, ContentEntryListStage, ListPublishedEntriesResponse, PageDraftRecord, PublishedBlockBaseline, PublishedContentEntryPreviewResponse, PublishedPostPreviewResponse, SdkBlockContent, SdkRuntimeContentByPathResponse, SdkTemplate, SiteBySlugResponse, ThemeGenerationTurn, ThemePreferencesRecord, ThemeRow } from './contentRuntime';
24
- import type { CreateInstagramZipUploadUrlRequest, CreateInstagramZipUploadUrlResponse, CreateMediaUploadUrlRequest, CreateMediaUploadUrlResponse, CreateSiteLogoUploadUrlRequest, CreateSiteLogoUploadUrlResponse, InstagramUploadZipRequest, MediaUploadFinalizeRequest, UploadSiteLogoRequest } from './siteInfrastructure';
25
- import type { DevToolsGetSiteRoleDowngradeQuery, DevToolsImpersonationResponse, DevToolsSeedResponse, DevToolsSetSiteRoleDowngradeRequest, SiteRoleDowngradeState } from './siteOperations';
26
29
  export type PageDesignRevisionToken = {
27
30
  kind: 'absent';
28
31
  } | {
@@ -156,13 +159,17 @@ export type SiteRuntimeAPIEndpoints = {
156
159
  theme: Theme;
157
160
  /**
158
161
  * Persisted Style configurator selections. The client resolves
159
- * compatibility locally via `compileSiteThemeFromSelections` and sends
160
- * already-resolved IDs; this response echoes the row's stored state so
161
- * the caller can refresh local state without a follow-up read.
162
+ * compatibility locally via `compileSiteThemeFromSelections`, but
163
+ * header/footer Look IDs remain requested user intent; rendering may
164
+ * temporarily fall back while the stored selection stays reversible.
165
+ * This response echoes the row's stored state so the caller can refresh
166
+ * local state without a follow-up read.
162
167
  */
163
168
  buttonPersonalityId: ButtonPersonalityId | null;
164
169
  paletteVariantId: PaletteVariantId | null;
165
170
  paletteOverrides: PaletteOverrides | null;
171
+ headerLookId: HeaderLookId | null;
172
+ footerLookId: FooterLookId | null;
166
173
  }>;
167
174
  uploadSiteLogo: APIEndpoint<UploadSiteLogoRequest, never, {
168
175
  path: string;
@@ -436,6 +443,20 @@ export type SiteRuntimeAPIEndpoints = {
436
443
  siteId: string;
437
444
  pageId: string;
438
445
  }, SavePageDesignStateResponse>;
446
+ listPageVersions: APIEndpoint<never, VersionHistoryListQuery & {
447
+ siteId: string;
448
+ pageId: string;
449
+ }, ListVersionHistoryResponse>;
450
+ getPageVersion: APIEndpoint<never, {
451
+ siteId: string;
452
+ pageId: string;
453
+ versionId: string;
454
+ }, GetVersionHistoryResponse>;
455
+ restorePageVersion: APIEndpoint<RestoreVersionHistoryRequest, {
456
+ siteId: string;
457
+ pageId: string;
458
+ versionId: string;
459
+ }, RestoreVersionHistoryResponse>;
439
460
  applyPageDesignEditorAction: APIEndpoint<{
440
461
  action: PageDesignEditorAction;
441
462
  }, {
@@ -14,6 +14,7 @@ export type * from "./bookingRecords";
14
14
  export type * from "./commercePortalEndpoints";
15
15
  export type * from "./communications";
16
16
  export type * from "./contentRuntime";
17
+ export type * from "./contentVersionHistory";
17
18
  export type * from "./courses";
18
19
  export type * from "./participantMessaging";
19
20
  export type * from "./publicExperienceEndpoints";
@@ -64,7 +65,7 @@ type ComposeEndpointMaps<Maps extends readonly object[], Acc extends object = {}
64
65
  infer Head extends object,
65
66
  ...infer Tail extends readonly object[]
66
67
  ] ? [Extract<keyof Acc, keyof Head>] extends [never] ? ComposeEndpointMaps<Tail, Acc & Head> : never : Acc;
67
- type SiteMembersAPIEndpointName = "listSiteMembers" | "inviteSiteMember" | "updateSiteMemberRole" | "removeSiteMember" | "revokeSiteInvitation" | "transferSiteOwnership" | "acceptSiteInvitation";
68
+ type SiteMembersAPIEndpointName = "listSiteMembers" | "inviteSiteMember" | "updateSiteMemberRole" | "linkCurrentUserPractitioner" | "unlinkCurrentUserPractitioner" | "removeSiteMember" | "revokeSiteInvitation" | "transferSiteOwnership" | "acceptSiteInvitation";
68
69
  type SeoAPIEndpointName = "getSeoOverview" | "getSeoPages" | "exportSeoPagesCsv" | "getSeoQueries" | "exportSeoQueriesCsv" | "getPerformanceOverview" | "applySeoChanges";
69
70
  type RedirectsAPIEndpointName = "checkRedirect" | "listRedirectRules" | "createRedirectRule" | "deleteRedirectRule";
70
71
  type AvailabilityAPIEndpointName = "listAvailabilityRules" | "setWeeklyAvailability" | "listBlackouts" | "createBlackout" | "deleteBlackout" | "getAvailableSlots";
@@ -48,9 +48,9 @@ export declare function getCmsApiUrl(): string;
48
48
  * ```ts
49
49
  * getAbsoluteDashboardUrl() // -> 'http://localhost:4000/dashboard'
50
50
  * getAbsoluteDashboardUrl('sites/site-123/content/event/entry-456') // -> 'http://localhost:4000/dashboard/sites/site-123/content/event/entry-456'
51
- * getAbsoluteDashboardUrl('sites/site-123/forms/contact/submissions', { surfaceId: 'macadamia' })
52
- * // prod: 'https://macadamia.studio/dashboard/sites/site-123/forms/contact/submissions'
53
- * // dev: 'http://macadamia.localhost:4000/dashboard/sites/site-123/forms/contact/submissions'
51
+ * getAbsoluteDashboardUrl('sites/site-123/forms/form-123/submissions', { surfaceId: 'macadamia' })
52
+ * // prod: 'https://macadamia.studio/dashboard/sites/site-123/forms/form-123/submissions'
53
+ * // dev: 'http://macadamia.localhost:4000/dashboard/sites/site-123/forms/form-123/submissions'
54
54
  * ```
55
55
  */
56
56
  export type GetAbsoluteDashboardUrlOptions = Readonly<{
@@ -6,8 +6,8 @@
6
6
  */
7
7
  export type { BindingSource, BindingDescriptor, BindingInput, BindingMap, BindingContext, BindingPath, BindingTransformName, KnownBindingTransformName, FieldBindingDescriptor, MetaBindingDescriptor, LiteralBindingDescriptor, TransformBindingDescriptor, FallbackBindingDescriptor, } from './types';
8
8
  export { TRANSFORMS, BINDING_SOURCES } from './types';
9
- export { asContentTemplateDesignBlockId, asLayoutVariantKey, compileContentTemplateRuntimeFields, parseContentTemplateDesignIntent, type CompiledBlockRuntimeFields, type LayoutVariantKey, } from '@riverbankcms/theme-core/site-styles';
10
- export { applyCompiledRuntimeFieldsToContent } from '@riverbankcms/theme-core/site-styles/previewCompiler';
9
+ export { asDesignBlockId, asContentTemplateDesignBlockId, asLayoutVariantKey, buildPageDesignEditorReadModel, compileContentTemplateRuntimeFields, parsePageDesignIntent, type DesignBlockId, parseContentTemplateDesignIntent, type CompiledBlockRuntimeFields, type LayoutVariantKey, type PageDesignEditorBlockInput, type PageDesignIntent, applyBlockContentVariantPolicy, deriveSiteStyleBlockPolicy, } from '@riverbankcms/theme-core/site-styles';
10
+ export { applyCompiledRuntimeFieldsToContent, buildEditorModelRuntimeFieldsByBlockId, } from '@riverbankcms/theme-core/site-styles/previewCompiler';
11
11
  export { blockDesignMetadataMapFromDefinitions } from '../system/designCapabilities';
12
12
  export { systemBlockDefinitions } from '../system/blocks';
13
13
  import type { BindingContext, BindingDescriptor, BindingInput, BindingMap, BindingPath, FieldBindingDescriptor, FallbackBindingDescriptor, KnownBindingTransformName, LiteralBindingDescriptor, MetaBindingDescriptor, TransformBindingDescriptor } from './types';
@@ -0,0 +1,12 @@
1
+ export type NewsletterFormError = Readonly<{
2
+ kind: 'field';
3
+ fieldId: string;
4
+ message: string;
5
+ }> | Readonly<{
6
+ kind: 'form';
7
+ message: string;
8
+ }>;
9
+ export declare function newsletterFieldError(fieldId: string, message: string): NewsletterFormError;
10
+ export declare function newsletterFormError(message: string): NewsletterFormError;
11
+ export declare function getNewsletterFieldError(error: NewsletterFormError | null, fieldId: string): string | null;
12
+ export declare function getNewsletterFormError(error: NewsletterFormError | null): string | null;
@@ -0,0 +1,19 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { FeedbackLiveMode } from './FeedbackMessage';
3
+ export type FieldValidationMessageProps = Readonly<{
4
+ id: string;
5
+ children: ReactNode;
6
+ className?: string;
7
+ live?: FeedbackLiveMode;
8
+ }>;
9
+ export type FieldValidationControlProps = Readonly<{
10
+ 'aria-invalid'?: 'true';
11
+ 'aria-describedby'?: string;
12
+ }>;
13
+ export type FieldValidationControlInput = Readonly<{
14
+ message: ReactNode | null | undefined;
15
+ messageId: string;
16
+ describedBy?: string;
17
+ }>;
18
+ export declare function getFieldValidationControlProps({ message, messageId, describedBy, }: FieldValidationControlInput): FieldValidationControlProps;
19
+ export declare function FieldValidationMessage({ id, children, className, live, }: FieldValidationMessageProps): import("react/jsx-runtime").JSX.Element;
@@ -1,15 +1,21 @@
1
1
  import type { ReactNode } from 'react';
2
- import type { FeedbackTone } from './FeedbackMessage';
2
+ import type { FeedbackLiveMode, FeedbackTone } from './FeedbackMessage';
3
+ export type TerminalPanelTitleElement = 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
3
4
  export type TerminalPanelProps = Readonly<{
4
5
  tone: FeedbackTone;
5
6
  title: ReactNode;
7
+ titleAs?: TerminalPanelTitleElement;
6
8
  body?: ReactNode;
9
+ secondaryBody?: ReactNode;
7
10
  icon?: ReactNode;
8
11
  actions?: ReactNode;
9
12
  className?: string;
10
13
  titleClassName?: string;
11
14
  bodyClassName?: string;
15
+ secondaryBodyClassName?: string;
12
16
  iconClassName?: string;
13
17
  actionsClassName?: string;
18
+ role?: 'alert' | 'status';
19
+ live?: FeedbackLiveMode;
14
20
  }>;
15
- export declare function TerminalPanel({ tone, title, body, icon, actions, className, titleClassName, bodyClassName, iconClassName, actionsClassName, }: TerminalPanelProps): import("react/jsx-runtime").JSX.Element;
21
+ export declare function TerminalPanel({ tone, title, titleAs: Title, body, secondaryBody, icon, actions, className, titleClassName, bodyClassName, secondaryBodyClassName, iconClassName, actionsClassName, role, live, }: TerminalPanelProps): import("react/jsx-runtime").JSX.Element;
@@ -6,6 +6,8 @@ export { ClockIcon } from './ClockIcon';
6
6
  export { CrossIcon } from './CrossIcon';
7
7
  export { ActionRow } from './ActionRow';
8
8
  export type { ActionRowProps } from './ActionRow';
9
+ export { FieldValidationMessage, getFieldValidationControlProps, } from './FieldValidationMessage';
10
+ export type { FieldValidationControlInput, FieldValidationControlProps, FieldValidationMessageProps, } from './FieldValidationMessage';
9
11
  export { FeedbackMessage } from './FeedbackMessage';
10
12
  export type { FeedbackLiveMode, FeedbackMessageProps, FeedbackTone } from './FeedbackMessage';
11
13
  export { LoggedInAsUser } from './LoggedInAsUser';
@@ -16,6 +18,6 @@ export { ModalShell } from './ModalShell';
16
18
  export type { ModalShellProps } from './ModalShell';
17
19
  export { TabBarFragment } from './TabBarFragment';
18
20
  export { TerminalPanel } from './TerminalPanel';
19
- export type { TerminalPanelProps } from './TerminalPanel';
21
+ export type { TerminalPanelProps, TerminalPanelTitleElement } from './TerminalPanel';
20
22
  export { StepIndicator } from './StepIndicator';
21
23
  export type { StepIndicatorBaseProps, StepIndicatorProps } from './StepIndicator';
@@ -7,5 +7,5 @@ export type { FormData, ButtonVariant } from './types';
7
7
  export { DEFAULT_CURRENCY } from './types';
8
8
  export { buildCheckoutReturnUrls, resolveDedicatedBookingPath, formatPrice, scrollToBlock, consumeSearchParam, consumeSearchParams, validateFormData, getStepNumber, } from './utils';
9
9
  export { createBodyThemePortalRoot } from './utils';
10
- export { ActionRow, CheckIcon, ClockIcon, CrossIcon, FeedbackMessage, MembershipHero, ModalShell, StateIcon, StepIndicator, TerminalPanel, } from './components';
11
- export type { ActionRowProps, FeedbackLiveMode, FeedbackMessageProps, FeedbackTone, ModalShellProps, StepIndicatorBaseProps, StepIndicatorProps, TerminalPanelProps, } from './components';
10
+ export { ActionRow, CheckIcon, ClockIcon, CrossIcon, FieldValidationMessage, FeedbackMessage, getFieldValidationControlProps, MembershipHero, ModalShell, StateIcon, StepIndicator, TerminalPanel, } from './components';
11
+ export type { ActionRowProps, FieldValidationControlInput, FieldValidationControlProps, FieldValidationMessageProps, FeedbackLiveMode, FeedbackMessageProps, FeedbackTone, ModalShellProps, StepIndicatorBaseProps, StepIndicatorProps, TerminalPanelProps, TerminalPanelTitleElement, } from './components';
@@ -0,0 +1,7 @@
1
+ type ThemeColorTransformContext = {
2
+ theme?: {
3
+ palette?: Record<string, string>;
4
+ };
5
+ };
6
+ export declare function resolveBackgroundColorValue(value: string, context: ThemeColorTransformContext): string;
7
+ export {};
@@ -0,0 +1,24 @@
1
+ export type DebouncedLatestSaveHandle = {
2
+ trigger: () => void;
3
+ cancel: () => void;
4
+ flush: () => void;
5
+ isPending: () => boolean;
6
+ };
7
+ export type DebouncedLatestSaveConfig<TSnapshot, TPayload, TResult> = {
8
+ getSnapshot: () => TSnapshot;
9
+ buildPayload: (snapshot: TSnapshot) => TPayload | null | undefined;
10
+ save: (payload: TPayload) => Promise<TResult>;
11
+ shouldSkip?: (snapshot: TSnapshot) => boolean;
12
+ onSaving?: (snapshot: TSnapshot) => void;
13
+ onSaved?: (result: TResult, sentSnapshotRef: {
14
+ current: TSnapshot | null;
15
+ }) => void;
16
+ onFailed?: (error: unknown, sentSnapshotRef: {
17
+ current: TSnapshot | null;
18
+ }) => void;
19
+ delay?: number;
20
+ maxWait?: number;
21
+ enabled?: boolean;
22
+ retryDelay?: number;
23
+ };
24
+ export declare function useDebouncedLatestSave<TSnapshot, TPayload, TResult>(config: DebouncedLatestSaveConfig<TSnapshot, TPayload, TResult>): DebouncedLatestSaveHandle;
@@ -1,5 +1,6 @@
1
1
  export * from './registry';
2
2
  export * from './services';
3
+ export { useDebouncedLatestSave, type DebouncedLatestSaveConfig, type DebouncedLatestSaveHandle } from './hooks/useDebouncedLatestSave';
3
4
  export { useSimpleAutosave, useMultiAutosave } from './hooks/useSimpleAutosave';
4
5
  export { useStoreAutosave, type StoreAutosaveConfig, type AutosaveScope } from './hooks/useStoreAutosave';
5
6
  export { useBlockAutosave, type BlockAutosaveOptions } from './hooks/useBlockAutosave';
@@ -24,6 +24,7 @@ export type AutosaveState = {
24
24
  */
25
25
  saveNow: (types: AutosaveType[]) => void;
26
26
  flushAllPending: () => void;
27
+ cancelAllPending: () => void;
27
28
  };
28
29
  /**
29
30
  * Creates the autosave slice for managing autosave status and handles.
@@ -7,6 +7,7 @@ export type AutosaveStatus = {
7
7
  };
8
8
  export type AutosaveHandle = {
9
9
  trigger: () => void;
10
+ cancel?: () => void;
10
11
  flush: () => void;
11
12
  isPending: () => boolean;
12
13
  };
@@ -424,6 +424,8 @@ export type Database = {
424
424
  };
425
425
  appointment_availability_rules: {
426
426
  Row: {
427
+ command_batch_ref: string | null;
428
+ command_owner_ref: string | null;
427
429
  created_at: string;
428
430
  end_time: string;
429
431
  id: string;
@@ -435,6 +437,8 @@ export type Database = {
435
437
  weekday: number;
436
438
  };
437
439
  Insert: {
440
+ command_batch_ref?: string | null;
441
+ command_owner_ref?: string | null;
438
442
  created_at?: string;
439
443
  end_time: string;
440
444
  id?: string;
@@ -446,6 +450,8 @@ export type Database = {
446
450
  weekday: number;
447
451
  };
448
452
  Update: {
453
+ command_batch_ref?: string | null;
454
+ command_owner_ref?: string | null;
449
455
  created_at?: string;
450
456
  end_time?: string;
451
457
  id?: string;
@@ -1300,6 +1306,202 @@ export type Database = {
1300
1306
  }
1301
1307
  ];
1302
1308
  };
1309
+ booking_closure_notification_jobs: {
1310
+ Row: {
1311
+ attendee_id: string;
1312
+ closure_id: string;
1313
+ created_at: string;
1314
+ id: string;
1315
+ idempotency_key: string;
1316
+ occurrence_id: string;
1317
+ site_id: string;
1318
+ transactional_email_job_id: string;
1319
+ };
1320
+ Insert: {
1321
+ attendee_id: string;
1322
+ closure_id: string;
1323
+ created_at?: string;
1324
+ id?: string;
1325
+ idempotency_key: string;
1326
+ occurrence_id: string;
1327
+ site_id: string;
1328
+ transactional_email_job_id: string;
1329
+ };
1330
+ Update: {
1331
+ attendee_id?: string;
1332
+ closure_id?: string;
1333
+ created_at?: string;
1334
+ id?: string;
1335
+ idempotency_key?: string;
1336
+ occurrence_id?: string;
1337
+ site_id?: string;
1338
+ transactional_email_job_id?: string;
1339
+ };
1340
+ Relationships: [
1341
+ {
1342
+ foreignKeyName: "booking_closure_notification_jo_transactional_email_job_id_fkey";
1343
+ columns: ["transactional_email_job_id"];
1344
+ isOneToOne: false;
1345
+ referencedRelation: "transactional_email_jobs";
1346
+ referencedColumns: ["id"];
1347
+ },
1348
+ {
1349
+ foreignKeyName: "booking_closure_notification_jobs_attendee_id_fkey";
1350
+ columns: ["attendee_id"];
1351
+ isOneToOne: false;
1352
+ referencedRelation: "event_attendees";
1353
+ referencedColumns: ["id"];
1354
+ },
1355
+ {
1356
+ foreignKeyName: "booking_closure_notification_jobs_closure_id_fkey";
1357
+ columns: ["closure_id"];
1358
+ isOneToOne: false;
1359
+ referencedRelation: "booking_closures";
1360
+ referencedColumns: ["id"];
1361
+ },
1362
+ {
1363
+ foreignKeyName: "booking_closure_notification_jobs_occurrence_id_fkey";
1364
+ columns: ["occurrence_id"];
1365
+ isOneToOne: false;
1366
+ referencedRelation: "event_occurrences";
1367
+ referencedColumns: ["id"];
1368
+ },
1369
+ {
1370
+ foreignKeyName: "booking_closure_notification_jobs_site_id_fkey";
1371
+ columns: ["site_id"];
1372
+ isOneToOne: false;
1373
+ referencedRelation: "sites";
1374
+ referencedColumns: ["id"];
1375
+ }
1376
+ ];
1377
+ };
1378
+ booking_closure_occurrence_actions: {
1379
+ Row: {
1380
+ action_type: string;
1381
+ cancellation_state: string;
1382
+ closure_id: string;
1383
+ created_at: string;
1384
+ id: string;
1385
+ last_error: string | null;
1386
+ occurrence_id: string;
1387
+ site_id: string;
1388
+ updated_at: string;
1389
+ };
1390
+ Insert: {
1391
+ action_type?: string;
1392
+ cancellation_state?: string;
1393
+ closure_id: string;
1394
+ created_at?: string;
1395
+ id?: string;
1396
+ last_error?: string | null;
1397
+ occurrence_id: string;
1398
+ site_id: string;
1399
+ updated_at?: string;
1400
+ };
1401
+ Update: {
1402
+ action_type?: string;
1403
+ cancellation_state?: string;
1404
+ closure_id?: string;
1405
+ created_at?: string;
1406
+ id?: string;
1407
+ last_error?: string | null;
1408
+ occurrence_id?: string;
1409
+ site_id?: string;
1410
+ updated_at?: string;
1411
+ };
1412
+ Relationships: [
1413
+ {
1414
+ foreignKeyName: "booking_closure_occurrence_actions_closure_id_fkey";
1415
+ columns: ["closure_id"];
1416
+ isOneToOne: false;
1417
+ referencedRelation: "booking_closures";
1418
+ referencedColumns: ["id"];
1419
+ },
1420
+ {
1421
+ foreignKeyName: "booking_closure_occurrence_actions_occurrence_id_fkey";
1422
+ columns: ["occurrence_id"];
1423
+ isOneToOne: false;
1424
+ referencedRelation: "event_occurrences";
1425
+ referencedColumns: ["id"];
1426
+ },
1427
+ {
1428
+ foreignKeyName: "booking_closure_occurrence_actions_site_id_fkey";
1429
+ columns: ["site_id"];
1430
+ isOneToOne: false;
1431
+ referencedRelation: "sites";
1432
+ referencedColumns: ["id"];
1433
+ }
1434
+ ];
1435
+ };
1436
+ booking_closures: {
1437
+ Row: {
1438
+ created_at: string;
1439
+ created_by_user_id: string | null;
1440
+ deleted_at: string | null;
1441
+ deleted_by_user_id: string | null;
1442
+ ends_on: string;
1443
+ id: string;
1444
+ metadata: Json;
1445
+ name: string | null;
1446
+ reason: string;
1447
+ scope_type: string;
1448
+ site_id: string;
1449
+ starts_on: string;
1450
+ timezone: string;
1451
+ updated_at: string;
1452
+ venue_id: string | null;
1453
+ };
1454
+ Insert: {
1455
+ created_at?: string;
1456
+ created_by_user_id?: string | null;
1457
+ deleted_at?: string | null;
1458
+ deleted_by_user_id?: string | null;
1459
+ ends_on: string;
1460
+ id?: string;
1461
+ metadata?: Json;
1462
+ name?: string | null;
1463
+ reason: string;
1464
+ scope_type: string;
1465
+ site_id: string;
1466
+ starts_on: string;
1467
+ timezone: string;
1468
+ updated_at?: string;
1469
+ venue_id?: string | null;
1470
+ };
1471
+ Update: {
1472
+ created_at?: string;
1473
+ created_by_user_id?: string | null;
1474
+ deleted_at?: string | null;
1475
+ deleted_by_user_id?: string | null;
1476
+ ends_on?: string;
1477
+ id?: string;
1478
+ metadata?: Json;
1479
+ name?: string | null;
1480
+ reason?: string;
1481
+ scope_type?: string;
1482
+ site_id?: string;
1483
+ starts_on?: string;
1484
+ timezone?: string;
1485
+ updated_at?: string;
1486
+ venue_id?: string | null;
1487
+ };
1488
+ Relationships: [
1489
+ {
1490
+ foreignKeyName: "booking_closures_site_id_fkey";
1491
+ columns: ["site_id"];
1492
+ isOneToOne: false;
1493
+ referencedRelation: "sites";
1494
+ referencedColumns: ["id"];
1495
+ },
1496
+ {
1497
+ foreignKeyName: "booking_closures_venue_id_fkey";
1498
+ columns: ["venue_id"];
1499
+ isOneToOne: false;
1500
+ referencedRelation: "venues";
1501
+ referencedColumns: ["id"];
1502
+ }
1503
+ ];
1504
+ };
1303
1505
  booking_credit_restorations: {
1304
1506
  Row: {
1305
1507
  actor_kind: string;
@@ -12250,6 +12452,8 @@ export type Database = {
12250
12452
  Row: {
12251
12453
  button_personality_id: string | null;
12252
12454
  created_at: string;
12455
+ footer_look_id: string | null;
12456
+ header_look_id: string | null;
12253
12457
  id: string;
12254
12458
  is_current: boolean;
12255
12459
  overrides: Json;
@@ -12263,6 +12467,8 @@ export type Database = {
12263
12467
  Insert: {
12264
12468
  button_personality_id?: string | null;
12265
12469
  created_at?: string;
12470
+ footer_look_id?: string | null;
12471
+ header_look_id?: string | null;
12266
12472
  id?: string;
12267
12473
  is_current?: boolean;
12268
12474
  overrides?: Json;
@@ -12276,6 +12482,8 @@ export type Database = {
12276
12482
  Update: {
12277
12483
  button_personality_id?: string | null;
12278
12484
  created_at?: string;
12485
+ footer_look_id?: string | null;
12486
+ header_look_id?: string | null;
12279
12487
  id?: string;
12280
12488
  is_current?: boolean;
12281
12489
  overrides?: Json;
@@ -886,6 +886,7 @@ export declare function parseBookingQuestionsContent(shape: BookingQuestionsForm
886
886
  * Form creation payload schema
887
887
  * Validates the request body when creating a new form via API
888
888
  */
889
+ export declare const formSlugSchema: z.ZodString;
889
890
  export declare const createFormPayloadSchema: z.ZodObject<{
890
891
  name: z.ZodString;
891
892
  slug: z.ZodString;
@@ -1,5 +1,6 @@
1
- export declare function BlockToolbar({ blockId, blockKind, content, }: {
1
+ export declare function BlockToolbar({ blockId, blockKind, content, headerClearancePx, }: {
2
2
  blockId: string;
3
3
  blockKind: string;
4
4
  content: Record<string, unknown>;
5
+ headerClearancePx?: number;
5
6
  }): import("react/jsx-runtime").JSX.Element;
@@ -1,7 +1,8 @@
1
1
  import type { MutableRefObject } from 'react';
2
2
  import type { PageOutline } from '@riverbankcms/blocks';
3
- import type { ComposePageArgs, CachedBlockTransform, BlockWithContent } from './types';
3
+ import type { ComposePageArgs, ComposePreviewRenderPageArgs, CachedBlockTransform, BlockWithContent } from './types';
4
4
  export type PageOutlineWithContent = Omit<PageOutline, 'blocks'> & {
5
5
  blocks: BlockWithContent[];
6
6
  };
7
7
  export declare function composePageFromBlocks(args: ComposePageArgs, cacheRef: MutableRefObject<Map<string, CachedBlockTransform>>): PageOutlineWithContent | null;
8
+ export declare function composePreviewRenderPage(args: ComposePreviewRenderPageArgs, cacheRef: MutableRefObject<Map<string, CachedBlockTransform>>): PageOutlineWithContent | null;
@@ -1,2 +1,2 @@
1
- export { composePageFromBlocks } from './composePageFromBlocks';
2
- export type { ComposePageArgs, CachedBlockTransform, EditorDraftInspectorStore } from './types';
1
+ export { composePageFromBlocks, composePreviewRenderPage, } from './composePageFromBlocks';
2
+ export type { CachedBlockTransform, ComposePageArgs, ComposePreviewRenderPageArgs, EditorDraftInspectorStore, } from './types';
@@ -1,5 +1,6 @@
1
1
  import type { EditorBlockId } from '@riverbankcms/core';
2
2
  import type { BlockItem } from '@riverbankcms/editor-blocks';
3
3
  import type { DraftSnapshot, EditorDraftInspectorStore, EnrichedBlock } from './types';
4
+ import { type PreviewProjection } from '../previewProjection';
4
5
  export declare function getDraftSnapshots(uiStore: EditorDraftInspectorStore): Map<EditorBlockId, DraftSnapshot>;
5
- export declare function mergeBlockWithDraft(block: BlockItem, draftMap: Map<EditorBlockId, DraftSnapshot>, index: number, uiStore: EditorDraftInspectorStore): EnrichedBlock;
6
+ export declare function mergeBlockWithDraft(block: BlockItem, draftMap: Map<EditorBlockId, DraftSnapshot>, index: number, projections?: readonly PreviewProjection[]): EnrichedBlock;
@@ -1,29 +1,30 @@
1
1
  import type { PageOutline } from '@riverbankcms/blocks';
2
2
  import type { EditorBlockId } from '@riverbankcms/core';
3
3
  import type { BlockItem } from '@riverbankcms/editor-blocks';
4
+ import type { CanonicalBlockContent, PreviewProjection, PreviewRenderContent } from '../previewProjection';
4
5
  export type BlockWithContent = {
5
6
  [key: string]: unknown;
6
7
  id: string | null;
7
8
  kind: string;
8
9
  purpose: string;
9
- content?: Record<string, unknown>;
10
- draftContent?: Record<string, unknown> | null;
11
- publishedContent?: Record<string, unknown> | null;
10
+ content?: PreviewRenderContent;
11
+ draftContent?: PreviewRenderContent | null;
12
+ publishedContent?: PreviewRenderContent | null;
12
13
  bindings?: Record<string, unknown>;
13
14
  };
14
15
  export type DraftSnapshot = {
15
16
  id: EditorBlockId;
16
- baseline: Record<string, unknown> | null;
17
- current: Record<string, unknown> | null;
17
+ baseline: CanonicalBlockContent | null;
18
+ current: CanonicalBlockContent | null;
18
19
  };
19
20
  export type EnrichedBlock = {
20
21
  id: string | null;
21
22
  kind: string;
22
23
  purpose: string;
23
24
  orderIndex: number;
24
- content: Record<string, unknown> | null;
25
- draftContent: Record<string, unknown> | null;
26
- publishedContent: Record<string, unknown> | null;
25
+ content: PreviewRenderContent | null;
26
+ draftContent: PreviewRenderContent | null;
27
+ publishedContent: PreviewRenderContent | null;
27
28
  bindings: Record<string, unknown> | null;
28
29
  };
29
30
  export type CachedBlockTransform = {
@@ -42,6 +43,21 @@ export type EditorDraftInspectorStore = {
42
43
  before: unknown;
43
44
  after: unknown;
44
45
  }>;
46
+ structure?: {
47
+ proposalId: string;
48
+ includeUnspecified?: boolean;
49
+ before: {
50
+ blockIds: string[];
51
+ };
52
+ after: {
53
+ blockIds: string[];
54
+ addedBlocks?: Array<{
55
+ id: string;
56
+ kind: string;
57
+ content?: Record<string, unknown> | null;
58
+ }>;
59
+ };
60
+ } | null;
45
61
  };
46
62
  };
47
63
  };
@@ -49,4 +65,11 @@ export type ComposePageArgs = {
49
65
  page: PageOutline | null;
50
66
  blockItems: BlockItem[];
51
67
  uiStore: EditorDraftInspectorStore;
68
+ projections?: readonly PreviewProjection[];
69
+ };
70
+ export type ComposePreviewRenderPageArgs = {
71
+ page: PageOutline | null;
72
+ blockItems: BlockItem[];
73
+ draftSnapshots: readonly DraftSnapshot[];
74
+ projections: readonly PreviewProjection[];
52
75
  };