@riverbankcms/sdk 0.125.0 → 0.126.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 (121) hide show
  1. package/README.md +3 -1
  2. package/dist/{PreviewEditorSidebar-BezDOtQ7.mjs → PreviewEditorSidebar-DcYJxTgc.mjs} +67 -266
  3. package/dist/{PreviewEditorUI-CgSqmfo2.mjs → PreviewEditorUI-Ctt1yTJr.mjs} +3 -3
  4. package/dist/{PreviewQueryProvider-BH-3-jSj.mjs → PreviewQueryProvider-DgFDIwvK.mjs} +1 -1
  5. package/dist/{SdkPreviewModeRuntime-Co3AHfj0.mjs → SdkPreviewModeRuntime-CvW1vdQ4.mjs} +27 -27
  6. package/dist/{SiteChromeCustomizeContext-BHF-KANn.mjs → SiteChromeCustomizeContext-C87qlKWw.mjs} +412 -1301
  7. package/dist/_dts/ai/src/contracts/proposals.d.ts +1354 -202
  8. package/dist/_dts/api/src/common/envelope.d.ts +1 -1
  9. package/dist/_dts/api/src/contentRuntime.d.ts +0 -2
  10. package/dist/_dts/api/src/endpoints.d.ts +0 -7
  11. package/dist/_dts/api/src/sdk-event-upsert.d.ts +42 -0
  12. package/dist/_dts/api/src/sdkContracts.d.ts +11 -9
  13. package/dist/_dts/api/src/siteOperations.d.ts +18 -1
  14. package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +1 -14
  15. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationStripeReturn.d.ts +15 -2
  16. package/dist/_dts/db/src/generated/supabase/database.types.d.ts +182 -19
  17. package/dist/_dts/preview-next/src/client/preview/PreviewEditorSidebar.d.ts +1 -2
  18. package/dist/_dts/preview-next/src/client/preview/PreviewShell.d.ts +2 -3
  19. package/dist/_dts/preview-next/src/client/preview/PreviewShellLayout.d.ts +1 -2
  20. package/dist/_dts/preview-next/src/client/preview/SiteChromeCustomizeContext.d.ts +3 -12
  21. package/dist/_dts/preview-next/src/client/preview/StyleConfigurator.d.ts +3 -13
  22. package/dist/_dts/preview-next/src/client/preview/StyleConfigurator.state.d.ts +8 -100
  23. package/dist/_dts/preview-next/src/client/preview/siteStylePreviewPlanner.d.ts +1 -4
  24. package/dist/_dts/preview-next/src/client/preview/styleConfiguratorApplyPayload.d.ts +1 -15
  25. package/dist/_dts/preview-next/src/client/preview/styleConfiguratorSnapshot.d.ts +11 -21
  26. package/dist/_dts/sdk/src/cli/commands/event.d.ts +2 -2
  27. package/dist/_dts/sdk/src/cli/commands/eventOccurrenceSchedule.d.ts +12 -0
  28. package/dist/_dts/sdk/src/cli/commands/push/pushAllExtras.d.ts +6 -0
  29. package/dist/_dts/sdk/src/cli/commands/style.d.ts +1 -1
  30. package/dist/_dts/sdk/src/cli/content/legacyEventScheduleShapeError.d.ts +5 -0
  31. package/dist/_dts/sdk/src/cli/content/localEventSchedule.d.ts +17 -0
  32. package/dist/_dts/sdk/src/cli/content/reader.d.ts +5 -10
  33. package/dist/_dts/sdk/src/cli/migrations/events.d.ts +1 -1
  34. package/dist/_dts/sdk/src/cli/site-commands/eventScheduleCompiler.d.ts +24 -0
  35. package/dist/_dts/sdk/src/client/management/http.d.ts +1 -1
  36. package/dist/_dts/sdk/src/client/management/types.d.ts +3 -28
  37. package/dist/_dts/sdk/src/config/index.d.ts +1 -1
  38. package/dist/_dts/sdk/src/public-api/contracts.d.ts +5 -20
  39. package/dist/_dts/sdk/src/rendering/index.d.ts +1 -1
  40. package/dist/_dts/sdk/src/version.d.ts +1 -1
  41. package/dist/_dts/site-commands/src/commandContract.d.ts +33 -5
  42. package/dist/_dts/site-commands/src/commandDomain.d.ts +2 -2
  43. package/dist/_dts/site-commands/src/commands.d.ts +38 -9
  44. package/dist/_dts/site-commands/src/siteStyleCommandSchema.d.ts +28 -1
  45. package/dist/_dts/site-commands/src/siteStyleSelectionSchemaBuilder.d.ts +4 -4
  46. package/dist/_dts/theme-core/src/palette/concretePalette.d.ts +20 -0
  47. package/dist/_dts/theme-core/src/palette/curated/index.d.ts +2 -17
  48. package/dist/_dts/theme-core/src/palette/index.d.ts +1 -6
  49. package/dist/_dts/theme-core/src/palette/schema.d.ts +39 -0
  50. package/dist/_dts/theme-core/src/schema.d.ts +38 -26
  51. package/dist/_dts/theme-core/src/site-styles/previewCompiler.d.ts +4 -6
  52. package/dist/_dts/theme-core/src/site-styles/runtimeCompiler.d.ts +5 -6
  53. package/dist/cli/index.mjs +612 -522
  54. package/dist/cli/init-docs/content/cli-reference.md +6 -3
  55. package/dist/cli/init-docs/content/content-management.md +24 -13
  56. package/dist/client/{DiscountCodeDisclosure-CyPpekBp.mjs → DiscountCodeDisclosure-DS0AuFWW.mjs} +1 -1
  57. package/dist/client/{EventCombined.client-zywit-60.mjs → EventCombined.client-DtMxLr7q.mjs} +2 -2
  58. package/dist/client/{EventListing.client-J2nLhkKT.mjs → EventListing.client-BdLSRNg1.mjs} +2 -2
  59. package/dist/client/{LeafletStaticMap-CSubXWt6.mjs → LeafletStaticMap-BrpC6vsT.mjs} +1 -1
  60. package/dist/client/{MagicLinkForm-DDLIfiq9.mjs → MagicLinkForm-Bt3IuLMy.mjs} +1 -1
  61. package/dist/client/{StepIndicator-DE8EvHIp.mjs → StepIndicator-CBYPFVoy.mjs} +2 -2
  62. package/dist/client/{accordion-Ct5T5NiA.mjs → accordion-BqqwPJWM.mjs} +1 -1
  63. package/dist/client/{bookingForm-DMxtLPxw.mjs → bookingForm-SneP3yxC.mjs} +5 -6
  64. package/dist/client/bookings.mjs +190 -24
  65. package/dist/client/{carousel--FMqgvob.mjs → carousel-BTIR9L3I.mjs} +1 -1
  66. package/dist/client/{cart-BKX1bWiU.mjs → cart-bqiqd8SX.mjs} +3 -3
  67. package/dist/client/{checkout-B_jxi4WW.mjs → checkout-WbTFV5v4.mjs} +3 -3
  68. package/dist/client/client.mjs +156 -220
  69. package/dist/client/{courseRegistration-DH4MlkRD.mjs → courseRegistration-BcemLAdN.mjs} +6 -7
  70. package/dist/client/{eventCalendar-BQILwAcL.mjs → eventCalendar-CsxIw0V_.mjs} +4 -4
  71. package/dist/client/{eventCombined-DFFW_Vmo.mjs → eventCombined-B6XMoHfa.mjs} +2 -2
  72. package/dist/client/{eventDetails-B045CTSJ.mjs → eventDetails-BJaoPPfo.mjs} +3 -3
  73. package/dist/client/{eventListing-BDMYNVzS.mjs → eventListing-DgwdYHRT.mjs} +2 -2
  74. package/dist/client/{eventRegistration-CQ2-BSnB.mjs → eventRegistration-C0O3folu.mjs} +30 -22
  75. package/dist/client/{form-DJKuyZgN.mjs → form-Bk9txGFt.mjs} +1 -1
  76. package/dist/client/{headerSection-DeTjfiDo.mjs → headerSection-yIBt0yTv.mjs} +2 -2
  77. package/dist/client/hooks.mjs +50 -102
  78. package/dist/client/{locationMap-i2wDA8gB.mjs → locationMap-C-3KIpv-.mjs} +2 -2
  79. package/dist/client/{newsletterForm-DKiueauk.mjs → newsletterForm-CzB8g8h2.mjs} +1 -1
  80. package/dist/client/{pricing-C01J3Epx.mjs → pricing-C1QeDes_.mjs} +1 -1
  81. package/dist/client/{productDetail-Dfc1sZaX.mjs → productDetail-w7SBp5uc.mjs} +3 -3
  82. package/dist/client/{productList-BXbvXWTF.mjs → productList-D0tGKHGf.mjs} +3 -3
  83. package/dist/client/{propsDecoder-CIR5DQ1l.mjs → propsDecoder-Bcin2DB3.mjs} +167 -11
  84. package/dist/client/rendering/client.mjs +219 -276
  85. package/dist/client/rendering/islands.mjs +18 -18
  86. package/dist/client/rendering.mjs +128 -185
  87. package/dist/client/{useDiscountCodeUi-Bcyh4508.mjs → scrollToBlock-h-o_STf_.mjs} +18 -2
  88. package/dist/client/{shop-BbNwPKM-.mjs → shop-BGzmL8O_.mjs} +5 -6
  89. package/dist/client/{shop-commerce-XO-XMFEt.mjs → shop-commerce-lX8QxjX-.mjs} +4 -4
  90. package/dist/client/{shop-commerce-store-Byh6OUGK.mjs → shop-commerce-store-CEurARtu.mjs} +1 -1
  91. package/dist/client/{shopShared-Bbq39mwr.mjs → shopShared-DXxH8xxw.mjs} +2 -2
  92. package/dist/client/{useEventFilters-C8OOJ3el.mjs → useEventFilters-B591g9vd.mjs} +2 -2
  93. package/dist/client/{usePolling-CyJVo9kF.mjs → usePolling-BvnChV4m.mjs} +2 -2
  94. package/dist/preview-next/before-render.mjs +0 -7
  95. package/dist/preview-next/client/runtime.mjs +4 -4
  96. package/dist/preview-next/middleware.mjs +0 -7
  97. package/dist/{previewAuthStore-CJX21dGi.mjs → previewAuthStore-Dev9CdG9.mjs} +0 -7
  98. package/dist/{sdk-runtime-BGhyuE-E.mjs → sdk-runtime-M__i3Jce.mjs} +2 -2
  99. package/dist/{separator-BFs-Kmv5.mjs → separator-VSlnI9bc.mjs} +1 -1
  100. package/dist/server/components.mjs +87 -139
  101. package/dist/server/config-validation.mjs +50 -102
  102. package/dist/server/config.mjs +50 -102
  103. package/dist/server/data.mjs +50 -102
  104. package/dist/server/index.mjs +1 -8
  105. package/dist/server/next.mjs +91 -150
  106. package/dist/server/page-converter.mjs +50 -102
  107. package/dist/server/prebuild.mjs +1 -1
  108. package/dist/server/rendering/server.mjs +50 -102
  109. package/dist/server/rendering.mjs +88 -140
  110. package/dist/server/routing.mjs +71 -147
  111. package/dist/server/server.mjs +51 -110
  112. package/dist/server/theme-bridge.mjs +172 -162
  113. package/dist/server/theme.mjs +167 -11
  114. package/package.json +1 -1
  115. package/dist/_dts/theme-core/src/palette/editorState.d.ts +0 -75
  116. package/dist/_dts/theme-core/src/palette/libraryModel.d.ts +0 -64
  117. package/dist/_dts/theme-core/src/palette/persistenceReadSource.d.ts +0 -81
  118. package/dist/_dts/theme-core/src/palette/resolveSelection.d.ts +0 -75
  119. package/dist/_dts/theme-core/src/palette/selection.d.ts +0 -74
  120. package/dist/_dts/theme-core/src/palette/sitePalettePersistence.d.ts +0 -34
  121. package/dist/client/scrollToBlock-C86BYkyV.mjs +0 -17
@@ -1,8 +1,7 @@
1
1
  import type { AddressedLocationValue, BusinessAddress } from '../../../core/src/index';
2
- import type { APIEndpoints, SdkRuntimePageSurfaceSubject as ApiSdkRuntimePageSurfaceSubject, SiteBookingOfferingPresetSummary as ApiSiteBookingOfferingPresetSummary } from '../../../api/src/index';
3
- import type { Media, MediaAssetIndexItem, SiteFooterContent, SiteHeaderContent, Theme } from '../contracts';
2
+ import type { APIEndpoints, SdkRuntimePageSurfaceSubject as ApiSdkRuntimePageSurfaceSubject, SiteBySlugResponse as ApiSiteBySlugResponse, SiteBookingOfferingPresetSummary as ApiSiteBookingOfferingPresetSummary } from '../../../api/src/index';
3
+ import type { Media, MediaAssetIndexItem, SiteFooterContent, SiteHeaderContent } from '../contracts';
4
4
  import type { CompiledBoundaryRuntime } from '../../../theme-core/src/site-styles/index';
5
- import type { RuntimePaletteState } from '../../../theme-core/src/palette/index';
6
5
  import type { BlockFieldConfig as SdkBlockFieldConfig, BlockFieldOptionsMap as SdkBlockFieldOptionsMap, ContentConfig as SdkContentConfig, ContainerOptionsConfig as SdkContainerOptionsConfig, FieldSelectOption as SdkFieldSelectOption, SdkCustomBlock, SdkThemeConfig, SdkThemePalette, SectionBackground as SdkSectionBackground, SectionOptionsConfig as SdkSectionOptionsConfig, SiteStyleConfig as SdkSiteStyleConfig } from '../config/types';
7
6
  export type PublicTeamMemberSummary = {
8
7
  id: string;
@@ -282,7 +281,8 @@ export type SiteRouteRecord = {
282
281
  publishedAt?: string | null;
283
282
  };
284
283
  export type SiteBookingOfferingPresetSummary = ApiSiteBookingOfferingPresetSummary;
285
- export type SiteResponse = {
284
+ type SiteSelectionResponse = Pick<ApiSiteBySlugResponse, 'theme' | 'themeId' | 'selectionId' | 'selectionVersion' | 'selectionUpdatedAt' | 'selectionButtonStyleSelection' | 'selectionHeaderLayoutId' | 'selectionHeaderStyleId' | 'selectionHeaderLookId' | 'selectionFooterLookId'>;
285
+ export type SiteResponse = SiteSelectionResponse & {
286
286
  site: {
287
287
  id: string;
288
288
  title: string;
@@ -301,22 +301,6 @@ export type SiteResponse = {
301
301
  url: string;
302
302
  mimeType: string;
303
303
  } | null;
304
- theme: Theme;
305
- themeId?: string | null;
306
- selectionId?: string | null;
307
- selectionVersion?: number | null;
308
- selectionUpdatedAt?: string | null;
309
- /**
310
- * Persisted design selections. Optional so legacy
311
- * payloads without these columns still satisfy the type — consumers fall
312
- * back to the site style's defaults when null.
313
- */
314
- selectionButtonStyleSelection?: import('../../../theme-core/src/buttons/index').ButtonStyleSelection | null;
315
- runtimePaletteState?: RuntimePaletteState | null;
316
- selectionHeaderLayoutId?: string | null;
317
- selectionHeaderStyleId?: string | null;
318
- selectionHeaderLookId?: string | null;
319
- selectionFooterLookId?: string | null;
320
304
  navigation: NavigationMenuWithItems[];
321
305
  appointmentsEnabled?: boolean;
322
306
  portalEnabled?: boolean;
@@ -916,3 +900,4 @@ export type PublicSdkContainerOptionsConfig = SdkContainerOptionsConfig;
916
900
  export type PublicSdkBlockFieldConfig = SdkBlockFieldConfig;
917
901
  export type PublicSdkBlockFieldOptionsMap = SdkBlockFieldOptionsMap;
918
902
  export type PublicSdkFieldSelectOption = SdkFieldSelectOption;
903
+ export {};
@@ -16,7 +16,7 @@ export type { LoadPageParams, LoadPageResult } from './helpers/loadPage';
16
16
  export { loadContent, isPageContent, isEntryContent, isPageSurfaceContent, } from './helpers/loadContent';
17
17
  export type { LoadContentParams, LoadContentResult, ContentEntryData, PagePreviewMetadata, SiteData, } from './helpers/loadContent';
18
18
  export type { BlockLoaderMap, DataLoaderContext, DataLoaderFn, DataLoaderOverrides, DataLoaderPreviewStage, DataLoaderRenderTarget, DataLoaderSearchParams, DataLoaderValue, } from '../data/types';
19
- export type { AppointmentBookingContent, BlogListingContent, BlogPostContent, BodyTextAlignment, BodyTextContent, ButtonVariant, CalendarTabViews, CardStylesContent, CollectionContent, ColumnsContent, ColumnOption, ContainerStylesContent, CtaFullContent, DisplayMode, EmbedContent, EventCalendarContent, EventDetailsContent, EventLayout, EventListingContent, EventRegistrationContent, EventSpotlightContent, FaqContent, FaqItem, FilterAutoShow, FormBlockContent, GiftingContent, HeroContent, HeroCta, HeroCtaInput, HeroMedia, ImageColSize, ImageGalleryContent, LayoutAlign, LayoutWidth, Media, MediaTextAlignment, MediaTextAspectRatio, MediaTextContent, MediaTextImagePosition, NewsletterSignupContent, NewsletterSignupPreset, TipTapNode, TipTapMark, LinkValue, InternalLinkValue, ExternalLinkValue, CustomLinkValue, PageLinkValue, EntryLinkValue, RichTextPrimitiveProps, RichTextVariant, PageOutline, BlockOutline, RouteMap, RouteMapEntry, OccurrenceContextData, EntrySubrouteContextData, Theme, ThemeTokens, SectionStylesContent, SemanticSpacing, ShopContent, SingleButtonContent, SiteFooterContent, SiteHeaderContent, StackContentAlignment, StackImagePosition, SystemBlockContentByFullKind, SystemBlockContentByKind, SystemBlockContentFor, SystemBlockShortKind, TeamMembersContent, TestimonialEntryContent, TestimonialsBlockContent, ThumbnailPadding, ThumbnailShape, VideoGridContent, WeekStart, MediaAssetIndexItem, ImageOptions, ResolveImageUrlContext, ResolveImageUrlContextInput, ResolveImageSourceSetOptions, ResolvedImageSourceSet, } from '../contracts';
19
+ export type { AppointmentBookingContent, BlogListingContent, BlogPostContent, BodyTextAlignment, BodyTextContent, ButtonVariant, CalendarTabViews, CardStylesContent, CollectionContent, ColumnsContent, ColumnOption, ContainerStylesContent, CtaFullContent, DisplayMode, EmbedContent, EventCalendarContent, EventDetailsContent, EventLayout, EventListingContent, EventRegistrationContent, EventSpotlightContent, FaqContent, FaqItem, FilterAutoShow, FormBlockContent, GiftingContent, HeroContent, HeroCta, HeroCtaInput, HeroMedia, ImageColSize, ImageGalleryContent, LayoutAlign, LayoutWidth, Media, MediaTextAlignment, MediaTextAspectRatio, MediaTextContent, MediaTextImagePosition, NewsletterSignupContent, NewsletterSignupPreset, TipTapNode, TipTapMark, LinkValue, InternalLinkValue, ExternalLinkValue, CustomLinkValue, PageLinkValue, EntryLinkValue, RichTextPrimitiveProps, RichTextVariant, PageOutline, BlockOutline, RouteMap, RouteMapEntry, OccurrenceContextData, EntrySubrouteContextData, Theme, ThemeTokens, RichTextDoc, SectionStylesContent, SemanticSpacing, ShopContent, SingleButtonContent, SiteFooterContent, SiteHeaderContent, StackContentAlignment, StackImagePosition, SystemBlockContentByFullKind, SystemBlockContentByKind, SystemBlockContentFor, SystemBlockShortKind, TeamMembersContent, TestimonialEntryContent, TestimonialsBlockContent, ThumbnailPadding, ThumbnailShape, VideoGridContent, WeekStart, MediaAssetIndexItem, ImageOptions, ResolveImageUrlContext, ResolveImageUrlContextInput, ResolveImageSourceSetOptions, ResolvedImageSourceSet, } from '../contracts';
20
20
  export { ImagePresets } from '../contracts';
21
21
  export { RichText } from './primitives/RichText';
22
22
  export { resolveImageUrl, resolveImageUrlWithContext, resolveImageSourceSetWithContext, } from './image';
@@ -8,4 +8,4 @@
8
8
  * 1. This constant
9
9
  * 2. The "version" field in package.json
10
10
  */
11
- export declare const SDK_VERSION = "0.125.0";
11
+ export declare const SDK_VERSION = "0.126.0";
@@ -112,7 +112,34 @@ export declare const siteCommandBatchSchema: z.ZodObject<{
112
112
  }, z.core.$strict>], "styleId">>;
113
113
  }, z.core.$strict>, z.ZodObject<{
114
114
  kind: z.ZodLiteral<"set-palette">;
115
- command: z.ZodType<import("../../blocks/src/index").PaletteCommand, unknown, z.core.$ZodTypeInternals<import("../../blocks/src/index").PaletteCommand, unknown>>;
115
+ palette: z.ZodPipe<z.ZodObject<{
116
+ colors: z.ZodArray<z.ZodObject<{
117
+ name: z.ZodString;
118
+ hex: z.ZodString;
119
+ }, z.core.$strip>>;
120
+ meta: z.ZodObject<{
121
+ mode: z.ZodEnum<{
122
+ light: "light";
123
+ dark: "dark";
124
+ }>;
125
+ }, z.core.$strip>;
126
+ }, z.core.$strip>, z.ZodTransform<{
127
+ colors: {
128
+ name: string;
129
+ hex: string;
130
+ }[];
131
+ meta: {
132
+ mode: "light" | "dark";
133
+ };
134
+ }, {
135
+ colors: {
136
+ name: string;
137
+ hex: string;
138
+ }[];
139
+ meta: {
140
+ mode: "light" | "dark";
141
+ };
142
+ }>>;
116
143
  }, z.core.$strict>, z.ZodObject<{
117
144
  kind: z.ZodLiteral<"set-typography">;
118
145
  typography: z.ZodNullable<z.ZodObject<{
@@ -800,17 +827,18 @@ export declare const siteCommandBatchSchema: z.ZodObject<{
800
827
  slug: z.ZodString;
801
828
  path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
802
829
  title: z.ZodString;
803
- archetype: z.ZodEnum<{
804
- custom: "custom";
830
+ preset: z.ZodEnum<{
831
+ course: "course";
832
+ event: "event";
805
833
  performance: "performance";
806
834
  class: "class";
807
835
  workshop: "workshop";
808
836
  retreat: "retreat";
809
837
  }>;
810
- bookingScope: z.ZodOptional<z.ZodEnum<{
838
+ bookingScope: z.ZodEnum<{
811
839
  single_occurrence: "single_occurrence";
812
840
  whole_series: "whole_series";
813
- }>>;
841
+ }>;
814
842
  status: z.ZodOptional<z.ZodEnum<{
815
843
  active: "active";
816
844
  draft: "draft";
@@ -2,8 +2,8 @@ export declare const navigationLocations: readonly ["main", "header", "footer"];
2
2
  export type NavigationLocation = (typeof navigationLocations)[number];
3
3
  export declare const navigationMenuRoles: readonly ["primary", "footer", "legal-policy"];
4
4
  export type NavigationMenuRole = (typeof navigationMenuRoles)[number];
5
- export declare const offeringArchetypes: readonly ["class", "workshop", "retreat", "performance", "custom"];
6
- export type OfferingArchetype = (typeof offeringArchetypes)[number];
5
+ export declare const eventPresets: readonly ["event", "class", "course", "workshop", "retreat", "performance"];
6
+ export type EventPreset = (typeof eventPresets)[number];
7
7
  export declare const offeringVisibilities: readonly ["draft", "unlisted", "listed", "published"];
8
8
  export type OfferingVisibility = (typeof offeringVisibilities)[number];
9
9
  export declare const bookingPassProductUseCases: readonly ["event_pass", "appointment_package"];
@@ -374,17 +374,18 @@ export declare const upsertEventSeriesCommandSchema: z.ZodObject<{
374
374
  slug: z.ZodString;
375
375
  path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
376
376
  title: z.ZodString;
377
- archetype: z.ZodEnum<{
378
- custom: "custom";
377
+ preset: z.ZodEnum<{
378
+ course: "course";
379
+ event: "event";
379
380
  performance: "performance";
380
381
  class: "class";
381
382
  workshop: "workshop";
382
383
  retreat: "retreat";
383
384
  }>;
384
- bookingScope: z.ZodOptional<z.ZodEnum<{
385
+ bookingScope: z.ZodEnum<{
385
386
  single_occurrence: "single_occurrence";
386
387
  whole_series: "whole_series";
387
- }>>;
388
+ }>;
388
389
  status: z.ZodOptional<z.ZodEnum<{
389
390
  active: "active";
390
391
  draft: "draft";
@@ -887,7 +888,34 @@ export declare const siteCommandSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
887
888
  }, z.core.$strict>], "styleId">>;
888
889
  }, z.core.$strict>, z.ZodObject<{
889
890
  kind: z.ZodLiteral<"set-palette">;
890
- command: z.ZodType<import("../../blocks/src/index").PaletteCommand, unknown, z.core.$ZodTypeInternals<import("../../blocks/src/index").PaletteCommand, unknown>>;
891
+ palette: z.ZodPipe<z.ZodObject<{
892
+ colors: z.ZodArray<z.ZodObject<{
893
+ name: z.ZodString;
894
+ hex: z.ZodString;
895
+ }, z.core.$strip>>;
896
+ meta: z.ZodObject<{
897
+ mode: z.ZodEnum<{
898
+ light: "light";
899
+ dark: "dark";
900
+ }>;
901
+ }, z.core.$strip>;
902
+ }, z.core.$strip>, z.ZodTransform<{
903
+ colors: {
904
+ name: string;
905
+ hex: string;
906
+ }[];
907
+ meta: {
908
+ mode: "light" | "dark";
909
+ };
910
+ }, {
911
+ colors: {
912
+ name: string;
913
+ hex: string;
914
+ }[];
915
+ meta: {
916
+ mode: "light" | "dark";
917
+ };
918
+ }>>;
891
919
  }, z.core.$strict>, z.ZodObject<{
892
920
  kind: z.ZodLiteral<"set-typography">;
893
921
  typography: z.ZodNullable<z.ZodObject<{
@@ -1517,17 +1545,18 @@ export declare const siteCommandSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1517
1545
  slug: z.ZodString;
1518
1546
  path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1519
1547
  title: z.ZodString;
1520
- archetype: z.ZodEnum<{
1521
- custom: "custom";
1548
+ preset: z.ZodEnum<{
1549
+ course: "course";
1550
+ event: "event";
1522
1551
  performance: "performance";
1523
1552
  class: "class";
1524
1553
  workshop: "workshop";
1525
1554
  retreat: "retreat";
1526
1555
  }>;
1527
- bookingScope: z.ZodOptional<z.ZodEnum<{
1556
+ bookingScope: z.ZodEnum<{
1528
1557
  single_occurrence: "single_occurrence";
1529
1558
  whole_series: "whole_series";
1530
- }>>;
1559
+ }>;
1531
1560
  status: z.ZodOptional<z.ZodEnum<{
1532
1561
  active: "active";
1533
1562
  draft: "draft";
@@ -53,7 +53,34 @@ export declare const applySiteStyleSelectionCommandSchema: z.ZodObject<{
53
53
  }, z.core.$strict>], "styleId">>;
54
54
  }, z.core.$strict>, z.ZodObject<{
55
55
  kind: z.ZodLiteral<"set-palette">;
56
- command: z.ZodType<import("../../blocks/src/index").PaletteCommand, unknown, z.core.$ZodTypeInternals<import("../../blocks/src/index").PaletteCommand, unknown>>;
56
+ palette: z.ZodPipe<z.ZodObject<{
57
+ colors: z.ZodArray<z.ZodObject<{
58
+ name: z.ZodString;
59
+ hex: z.ZodString;
60
+ }, z.core.$strip>>;
61
+ meta: z.ZodObject<{
62
+ mode: z.ZodEnum<{
63
+ light: "light";
64
+ dark: "dark";
65
+ }>;
66
+ }, z.core.$strip>;
67
+ }, z.core.$strip>, z.ZodTransform<{
68
+ colors: {
69
+ name: string;
70
+ hex: string;
71
+ }[];
72
+ meta: {
73
+ mode: "light" | "dark";
74
+ };
75
+ }, {
76
+ colors: {
77
+ name: string;
78
+ hex: string;
79
+ }[];
80
+ meta: {
81
+ mode: "light" | "dark";
82
+ };
83
+ }>>;
57
84
  }, z.core.$strict>, z.ZodObject<{
58
85
  kind: z.ZodLiteral<"set-typography">;
59
86
  typography: z.ZodNullable<z.ZodObject<{
@@ -1,15 +1,15 @@
1
1
  import { z } from 'zod';
2
- type SiteStyleSelectionSchemaParts<TSiteStyleId extends z.ZodType, TButtonStyleSelection extends z.ZodType, TPaletteCommand extends z.ZodType, TTypography extends z.ZodType, THeaderLookId extends z.ZodType, THeaderLayoutId extends z.ZodType, THeaderStyleId extends z.ZodType, TFooterLookId extends z.ZodType> = Readonly<{
2
+ type SiteStyleSelectionSchemaParts<TSiteStyleId extends z.ZodType, TButtonStyleSelection extends z.ZodType, TPalette extends z.ZodType, TTypography extends z.ZodType, THeaderLookId extends z.ZodType, THeaderLayoutId extends z.ZodType, THeaderStyleId extends z.ZodType, TFooterLookId extends z.ZodType> = Readonly<{
3
3
  siteStyleId: TSiteStyleId;
4
4
  buttonStyleSelection: TButtonStyleSelection;
5
- paletteCommand: TPaletteCommand;
5
+ palette: TPalette;
6
6
  typography: TTypography;
7
7
  headerLookId: THeaderLookId;
8
8
  headerLayoutId: THeaderLayoutId;
9
9
  headerStyleId: THeaderStyleId;
10
10
  footerLookId: TFooterLookId;
11
11
  }>;
12
- export declare function createSiteStyleSelectionChangeSchema<TSiteStyleId extends z.ZodType, TButtonStyleSelection extends z.ZodType, TPaletteCommand extends z.ZodType, TTypography extends z.ZodType, THeaderLookId extends z.ZodType, THeaderLayoutId extends z.ZodType, THeaderStyleId extends z.ZodType, TFooterLookId extends z.ZodType>(parts: SiteStyleSelectionSchemaParts<TSiteStyleId, TButtonStyleSelection, TPaletteCommand, TTypography, THeaderLookId, THeaderLayoutId, THeaderStyleId, TFooterLookId>): z.ZodDiscriminatedUnion<[z.ZodObject<{
12
+ export declare function createSiteStyleSelectionChangeSchema<TSiteStyleId extends z.ZodType, TButtonStyleSelection extends z.ZodType, TPalette extends z.ZodType, TTypography extends z.ZodType, THeaderLookId extends z.ZodType, THeaderLayoutId extends z.ZodType, THeaderStyleId extends z.ZodType, TFooterLookId extends z.ZodType>(parts: SiteStyleSelectionSchemaParts<TSiteStyleId, TButtonStyleSelection, TPalette, TTypography, THeaderLookId, THeaderLayoutId, THeaderStyleId, TFooterLookId>): z.ZodDiscriminatedUnion<[z.ZodObject<{
13
13
  kind: z.ZodLiteral<"set-site-style">;
14
14
  siteStyleId: TSiteStyleId;
15
15
  }, z.core.$strict>, z.ZodObject<{
@@ -17,7 +17,7 @@ export declare function createSiteStyleSelectionChangeSchema<TSiteStyleId extend
17
17
  buttonStyleSelection: z.ZodNullable<TButtonStyleSelection>;
18
18
  }, z.core.$strict>, z.ZodObject<{
19
19
  kind: z.ZodLiteral<"set-palette">;
20
- command: TPaletteCommand;
20
+ palette: TPalette;
21
21
  }, z.core.$strict>, z.ZodObject<{
22
22
  kind: z.ZodLiteral<"set-typography">;
23
23
  typography: z.ZodNullable<TTypography>;
@@ -0,0 +1,20 @@
1
+ import type { Theme } from '../schema';
2
+ import { type PaletteColors, type PaletteMode } from './colors';
3
+ /**
4
+ * The complete palette value shared by curated authoring templates and themes.
5
+ * It carries no catalogue identity, persistence origin, or independent version.
6
+ */
7
+ export type ConcretePalette = Readonly<{
8
+ colors: PaletteColors;
9
+ mode: PaletteMode;
10
+ }>;
11
+ /**
12
+ * Converts an already schema-validated theme palette into the canonical
13
+ * role-keyed representation. The theme boundary guarantees completeness and
14
+ * mode validity; colour notation is normalised by that boundary.
15
+ */
16
+ export declare function concretePaletteFromTheme(palette: Theme['palette']): ConcretePalette;
17
+ export declare function concretePaletteToTheme(palette: ConcretePalette): Theme['palette'];
18
+ export declare function concretePalettesEqual(left: ConcretePalette, right: ConcretePalette): boolean;
19
+ /** Exact semantic equality for two schema-validated theme palette values. */
20
+ export declare function themePalettesEqual(left: Theme['palette'], right: Theme['palette']): boolean;
@@ -2,11 +2,9 @@
2
2
  * Curated palette library.
3
3
  *
4
4
  * Authoring keys are readable source aliases. Value keys are derived from the
5
- * complete mode and semantic colours and are the only curated identity used at
6
- * persistence and runtime boundaries.
5
+ * complete mode and semantic colours for picker and catalogue identity.
7
6
  */
8
- import { z } from 'zod';
9
- import { type PaletteValueKey } from '../colors';
7
+ import type { PaletteValueKey } from '../colors';
10
8
  import type { CuratedPaletteAuthoringKey, CuratedPaletteDefinition } from './types';
11
9
  export type { CuratedPaletteAuthoringKey, CuratedPaletteDefinition, HexColor, PaletteColorEntry, PaletteColors, PaletteMode, PartialPaletteColors, PaletteTokenName, } from './types';
12
10
  export type { PaletteValueKey } from '../colors';
@@ -28,16 +26,3 @@ export type KnownCuratedPaletteAuthoringKeyValue = Unbrand<KnownCuratedPaletteAu
28
26
  export declare function findCuratedPalette(valueKey: PaletteValueKey): CuratedPalette | undefined;
29
27
  export declare function findCuratedPaletteByAuthoringKey(authoringKey: CuratedPaletteAuthoringKey): CuratedPalette | undefined;
30
28
  export declare function requireCuratedPaletteValueKey(authoringKey: CuratedPaletteAuthoringKey): KnownCuratedPaletteValueKey;
31
- export declare function isKnownCuratedPaletteValueKey(value: unknown): value is KnownCuratedPaletteValueKey;
32
- /** Parses a raw persisted key into catalogue-proven curated membership. */
33
- export declare const knownCuratedPaletteValueKeySchema: z.ZodPipe<z.ZodString, z.ZodTransform<KnownCuratedPaletteValueKey, string>>;
34
- export type PersistedCuratedPaletteValueKeyParseResult = Readonly<{
35
- kind: 'known';
36
- valueKey: KnownCuratedPaletteValueKey;
37
- }> | Readonly<{
38
- kind: 'unknown';
39
- raw: string;
40
- }> | Readonly<{
41
- kind: 'empty';
42
- }>;
43
- export declare function parsePersistedCuratedPaletteValueKey(value: string | null | undefined): PersistedCuratedPaletteValueKeyParseResult;
@@ -9,12 +9,7 @@ export * from './utils';
9
9
  export * from './utils/paletteAccess';
10
10
  export * from './extractPalette';
11
11
  export * from './colors';
12
- export * from './editorState';
13
- export * from './libraryModel';
14
- export * from './persistenceReadSource';
15
- export * from './resolveSelection';
16
- export * from './selection';
17
- export * from './sitePalettePersistence';
12
+ export * from './concretePalette';
18
13
  export * from './utils/fromVibrant';
19
14
  export * from './utils/suggestRecipes';
20
15
  export * from './recipes/allRecipes';
@@ -0,0 +1,39 @@
1
+ import { z } from 'zod';
2
+ export declare const paletteColorSchema: z.ZodObject<{
3
+ name: z.ZodString;
4
+ hex: z.ZodString;
5
+ }, z.core.$strip>;
6
+ export declare const paletteMetaSchema: z.ZodObject<{
7
+ mode: z.ZodEnum<{
8
+ light: "light";
9
+ dark: "dark";
10
+ }>;
11
+ }, z.core.$strip>;
12
+ export declare const paletteSchema: z.ZodPipe<z.ZodObject<{
13
+ colors: z.ZodArray<z.ZodObject<{
14
+ name: z.ZodString;
15
+ hex: z.ZodString;
16
+ }, z.core.$strip>>;
17
+ meta: z.ZodObject<{
18
+ mode: z.ZodEnum<{
19
+ light: "light";
20
+ dark: "dark";
21
+ }>;
22
+ }, z.core.$strip>;
23
+ }, z.core.$strip>, z.ZodTransform<{
24
+ colors: {
25
+ name: string;
26
+ hex: string;
27
+ }[];
28
+ meta: {
29
+ mode: "light" | "dark";
30
+ };
31
+ }, {
32
+ colors: {
33
+ name: string;
34
+ hex: string;
35
+ }[];
36
+ meta: {
37
+ mode: "light" | "dark";
38
+ };
39
+ }>>;
@@ -1,5 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  import type { ExpandedPalette } from './palette/expandPalette';
3
+ import { paletteColorSchema, paletteMetaSchema, paletteSchema } from './palette/schema';
3
4
  export declare const axesSchema: z.ZodObject<{
4
5
  tone: z.ZodEnum<{
5
6
  bold: "bold";
@@ -31,28 +32,7 @@ export declare const axesSchema: z.ZodObject<{
31
32
  expressive: "expressive";
32
33
  }>;
33
34
  }, z.core.$strip>;
34
- export declare const paletteColorSchema: z.ZodObject<{
35
- name: z.ZodString;
36
- hex: z.ZodString;
37
- }, z.core.$strip>;
38
- export declare const paletteMetaSchema: z.ZodObject<{
39
- mode: z.ZodEnum<{
40
- light: "light";
41
- dark: "dark";
42
- }>;
43
- }, z.core.$strip>;
44
- export declare const paletteSchema: z.ZodObject<{
45
- colors: z.ZodArray<z.ZodObject<{
46
- name: z.ZodString;
47
- hex: z.ZodString;
48
- }, z.core.$strip>>;
49
- meta: z.ZodObject<{
50
- mode: z.ZodEnum<{
51
- light: "light";
52
- dark: "dark";
53
- }>;
54
- }, z.core.$strip>;
55
- }, z.core.$strip>;
35
+ export { paletteColorSchema, paletteMetaSchema, paletteSchema };
56
36
  declare const headingSizeSchema: z.ZodEnum<{
57
37
  sm: "sm";
58
38
  md: "md";
@@ -3339,7 +3319,7 @@ export declare const themeSchema: z.ZodObject<{
3339
3319
  expressive: "expressive";
3340
3320
  }>;
3341
3321
  }, z.core.$strip>;
3342
- palette: z.ZodObject<{
3322
+ palette: z.ZodPipe<z.ZodObject<{
3343
3323
  colors: z.ZodArray<z.ZodObject<{
3344
3324
  name: z.ZodString;
3345
3325
  hex: z.ZodString;
@@ -3350,7 +3330,23 @@ export declare const themeSchema: z.ZodObject<{
3350
3330
  dark: "dark";
3351
3331
  }>;
3352
3332
  }, z.core.$strip>;
3353
- }, z.core.$strip>;
3333
+ }, z.core.$strip>, z.ZodTransform<{
3334
+ colors: {
3335
+ name: string;
3336
+ hex: string;
3337
+ }[];
3338
+ meta: {
3339
+ mode: "light" | "dark";
3340
+ };
3341
+ }, {
3342
+ colors: {
3343
+ name: string;
3344
+ hex: string;
3345
+ }[];
3346
+ meta: {
3347
+ mode: "light" | "dark";
3348
+ };
3349
+ }>>;
3354
3350
  typography: z.ZodObject<{
3355
3351
  body: z.ZodObject<{
3356
3352
  family: z.ZodString;
@@ -6589,7 +6585,7 @@ export declare const themesTurnSchema: z.ZodObject<{
6589
6585
  expressive: "expressive";
6590
6586
  }>;
6591
6587
  }, z.core.$strip>;
6592
- palette: z.ZodObject<{
6588
+ palette: z.ZodPipe<z.ZodObject<{
6593
6589
  colors: z.ZodArray<z.ZodObject<{
6594
6590
  name: z.ZodString;
6595
6591
  hex: z.ZodString;
@@ -6600,7 +6596,23 @@ export declare const themesTurnSchema: z.ZodObject<{
6600
6596
  dark: "dark";
6601
6597
  }>;
6602
6598
  }, z.core.$strip>;
6603
- }, z.core.$strip>;
6599
+ }, z.core.$strip>, z.ZodTransform<{
6600
+ colors: {
6601
+ name: string;
6602
+ hex: string;
6603
+ }[];
6604
+ meta: {
6605
+ mode: "light" | "dark";
6606
+ };
6607
+ }, {
6608
+ colors: {
6609
+ name: string;
6610
+ hex: string;
6611
+ }[];
6612
+ meta: {
6613
+ mode: "light" | "dark";
6614
+ };
6615
+ }>>;
6604
6616
  typography: z.ZodObject<{
6605
6617
  body: z.ZodObject<{
6606
6618
  family: z.ZodString;
@@ -1,7 +1,6 @@
1
1
  import type { PageDesignEditorReadModel } from './pageDesignEditorModel';
2
2
  import { type Theme } from '../schema';
3
3
  import { type ButtonStyleSelection } from '../buttons/styles';
4
- import type { CompleteResolvedPaletteSelection, PaletteSelection } from '../palette';
5
4
  import { type CuratedSiteStyle } from './curatedSiteStyles';
6
5
  import { type FooterLookId, type FooterSelectionResult } from './footerLooks';
7
6
  import type { HeaderSelectionIdentity, SiteThemeCompilationPlan } from './compilationPlan';
@@ -34,7 +33,7 @@ export declare const previewCustomizePurpose: "preview-customize";
34
33
  * `compileSiteThemeFromSelections` with the style's default curated palette.
35
34
  */
36
35
  export declare function compileCuratedSiteStyleTheme(siteStyle: CuratedSiteStyle): CuratedSiteStyleTheme;
37
- export declare function defaultResolvedPaletteForSiteStyle(siteStyle: CuratedSiteStyle): CompleteResolvedPaletteSelection;
36
+ export declare function defaultConcretePaletteForSiteStyle(siteStyle: CuratedSiteStyle): Theme['palette'];
38
37
  export declare function compileCuratedSiteStyleThemeById(siteStyleId: SiteStyleId): CuratedSiteStyleTheme | null;
39
38
  export type SelectionFallbackWarning = Readonly<{
40
39
  kind: 'rejected-button-style';
@@ -45,7 +44,7 @@ type SiteThemeSelectionsCommonInput = Readonly<{
45
44
  siteStyle: CuratedSiteStyle;
46
45
  buttonStyleSelection: ButtonStyleSelection | null;
47
46
  typography?: Theme['typography'];
48
- resolvedPalette: CompleteResolvedPaletteSelection;
47
+ palette: Theme['palette'];
49
48
  }>;
50
49
  export type ReplacementSiteThemeSelectionsInput = SiteThemeSelectionsCommonInput & Readonly<{
51
50
  compilationPlan: Extract<SiteThemeCompilationPlan, {
@@ -62,7 +61,6 @@ export type SiteThemeSelectionsInput = SiteThemeSelectionsCommonInput & Readonly
62
61
  }>;
63
62
  type ResolvedSiteThemeSelections = Readonly<{
64
63
  buttonStyleSelection: ButtonStyleSelection;
65
- paletteSelection: PaletteSelection | null;
66
64
  headerLookId: HeaderLookId | null;
67
65
  headerLayoutId: HeaderLayoutId | null;
68
66
  headerStyleId: HeaderStyleId | null;
@@ -103,8 +101,8 @@ export type UpdateSiteThemeSelectionsResult = SiteThemeSelectionsBaseResult<Reso
103
101
  export type SiteThemeSelectionsResult = ReplacementSiteThemeSelectionsResult | UpdateSiteThemeSelectionsResult;
104
102
  /**
105
103
  * High-level, site-style-aware compiler. Resolves the user's button style and
106
- * palette selections into theme tokens. Palette authority is always supplied
107
- * as a complete resolved curated/site selection or an explicit draft.
104
+ * palette values into theme tokens. Palette authority is always supplied as a
105
+ * complete concrete value.
108
106
  *
109
107
  * Returns the resolved IDs so the caller can persist auto-pick decisions, plus
110
108
  * any fallback warnings the UI can surface as "we changed your selection"
@@ -1,7 +1,6 @@
1
1
  import { type CardStylesOverride, type ContainerStylesOverride, type SectionStylesOverride, type Theme } from '../schema';
2
2
  import { type ExpandedPalette } from '../palette/expandPalette';
3
3
  import { type ButtonStyleSelection } from '../buttons/styles';
4
- import type { CompleteResolvedPaletteSelection } from '../palette/resolveSelection';
5
4
  import { type RuntimeStyleWriteResultForFields, type StyleAuthority } from './designState';
6
5
  import { type ContentFrameIntent, type BlockCompositionIntent, type EyebrowTreatment, type FlushFrameTreatment, type DesignBoundaryId, type PanelFrameTreatment, type ResolvedBlockDesignPlan, type ResolvedPageDesignPlan, type SiteStyleItemSurfaceIntent, type SiteStyleSectionTransitionIntent, type SiteStyleSurfaceIntent, type ThemeTokenRecipes } from './types';
7
6
  import { type SectionBoundaryRuntimeMetrics } from './sectionTransitions';
@@ -334,8 +333,8 @@ export declare function compilePageRuntimeFields<TBlockId extends string, TPurpo
334
333
  terminalSectionAdjacency?: TerminalSectionAdjacency;
335
334
  }>): CompiledPageRuntime<TBlockId>;
336
335
  type PaletteCompileOptions = Readonly<{
337
- /** A complete palette resolved from an explicit curated or site selection. */
338
- resolvedPalette?: CompleteResolvedPaletteSelection;
336
+ /** A complete concrete palette supplied by the theme/editor boundary. */
337
+ palette?: Theme['palette'];
339
338
  }>;
340
339
  export type CompileTokenRecipesOptions = Readonly<{
341
340
  /** Validated button style selection. When provided, emits `theme.buttons`. */
@@ -346,9 +345,9 @@ export type CompileTokenRecipesOptions = Readonly<{
346
345
  * pure and schema-validated so generated Theme V2 choices have a concrete legacy
347
346
  * Theme output before any persistence or Phase 5 integration consumes them.
348
347
  *
349
- * Optional `options` accept an already-resolved palette selection and button
350
- * style. Sparse overrides and legacy palette IDs are deliberately not
351
- * compiler inputs: callers must resolve a complete palette before compiling.
348
+ * Optional `options` accept a complete concrete palette and button style.
349
+ * Sparse overrides and palette identities are deliberately not compiler
350
+ * inputs.
352
351
  */
353
352
  export declare function compileTokenRecipes(recipes: ThemeTokenRecipes, options?: CompileTokenRecipesOptions): Theme;
354
353
  export {};