@riverbankcms/sdk 0.124.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 (130) hide show
  1. package/README.md +3 -1
  2. package/dist/{PreviewEditorSidebar-DBmAJJkQ.mjs → PreviewEditorSidebar-DcYJxTgc.mjs} +67 -266
  3. package/dist/{PreviewEditorUI-CfGaz9cY.mjs → PreviewEditorUI-Ctt1yTJr.mjs} +3 -3
  4. package/dist/{PreviewQueryProvider-BH-3-jSj.mjs → PreviewQueryProvider-DgFDIwvK.mjs} +1 -1
  5. package/dist/{SdkPreviewModeRuntime-BW9Z8j8T.mjs → SdkPreviewModeRuntime-CvW1vdQ4.mjs} +38 -30
  6. package/dist/{SiteChromeCustomizeContext-2z8moxYf.mjs → SiteChromeCustomizeContext-C87qlKWw.mjs} +493 -1378
  7. package/dist/_dts/ai/src/contracts/proposals.d.ts +1354 -202
  8. package/dist/_dts/api/src/accessAdmin.d.ts +2 -14
  9. package/dist/_dts/api/src/common/envelope.d.ts +1 -1
  10. package/dist/_dts/api/src/contentRuntime.d.ts +0 -2
  11. package/dist/_dts/api/src/endpoints.d.ts +0 -7
  12. package/dist/_dts/api/src/sdk-event-upsert.d.ts +42 -0
  13. package/dist/_dts/api/src/sdkContracts.d.ts +11 -9
  14. package/dist/_dts/api/src/siteAccessAdmin.d.ts +23 -0
  15. package/dist/_dts/api/src/siteOperations.d.ts +18 -1
  16. package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +1 -14
  17. package/dist/_dts/billing/src/plans/types.d.ts +24 -5
  18. package/dist/_dts/blocks/src/contracts/non-block-islands.d.ts +4 -0
  19. package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +2 -0
  20. package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +1 -0
  21. package/dist/_dts/blocks/src/system/runtime/nodes/event-details/logic.d.ts +2 -0
  22. package/dist/_dts/blocks/src/system/runtime/nodes/event-details.client.d.ts +3 -1
  23. package/dist/_dts/blocks/src/system/runtime/nodes/event-details.server.d.ts +2 -1
  24. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationStripeReturn.d.ts +15 -2
  25. package/dist/_dts/db/src/generated/supabase/database.types.d.ts +331 -19
  26. package/dist/_dts/preview-next/src/client/preview/PreviewEditorSidebar.d.ts +1 -2
  27. package/dist/_dts/preview-next/src/client/preview/PreviewShell.d.ts +2 -3
  28. package/dist/_dts/preview-next/src/client/preview/PreviewShellLayout.d.ts +1 -2
  29. package/dist/_dts/preview-next/src/client/preview/SiteChromeCustomizeContext.d.ts +3 -12
  30. package/dist/_dts/preview-next/src/client/preview/StyleConfigurator.d.ts +3 -13
  31. package/dist/_dts/preview-next/src/client/preview/StyleConfigurator.state.d.ts +8 -100
  32. package/dist/_dts/preview-next/src/client/preview/siteStylePreviewPlanner.d.ts +1 -4
  33. package/dist/_dts/preview-next/src/client/preview/styleConfiguratorApplyPayload.d.ts +1 -15
  34. package/dist/_dts/preview-next/src/client/preview/styleConfiguratorSnapshot.d.ts +11 -21
  35. package/dist/_dts/sdk/src/cli/commands/event.d.ts +2 -2
  36. package/dist/_dts/sdk/src/cli/commands/eventOccurrenceSchedule.d.ts +12 -0
  37. package/dist/_dts/sdk/src/cli/commands/push/pushAllExtras.d.ts +6 -0
  38. package/dist/_dts/sdk/src/cli/commands/style.d.ts +1 -1
  39. package/dist/_dts/sdk/src/cli/content/legacyEventScheduleShapeError.d.ts +5 -0
  40. package/dist/_dts/sdk/src/cli/content/localEventSchedule.d.ts +17 -0
  41. package/dist/_dts/sdk/src/cli/content/reader.d.ts +5 -10
  42. package/dist/_dts/sdk/src/cli/migrations/events.d.ts +1 -1
  43. package/dist/_dts/sdk/src/cli/site-commands/eventScheduleCompiler.d.ts +24 -0
  44. package/dist/_dts/sdk/src/client/management/http.d.ts +1 -1
  45. package/dist/_dts/sdk/src/client/management/types.d.ts +3 -28
  46. package/dist/_dts/sdk/src/config/index.d.ts +1 -1
  47. package/dist/_dts/sdk/src/public-api/contracts.d.ts +5 -20
  48. package/dist/_dts/sdk/src/rendering/index.d.ts +1 -1
  49. package/dist/_dts/sdk/src/version.d.ts +1 -1
  50. package/dist/_dts/site-commands/src/commandContract.d.ts +33 -5
  51. package/dist/_dts/site-commands/src/commandDomain.d.ts +2 -2
  52. package/dist/_dts/site-commands/src/commands.d.ts +38 -9
  53. package/dist/_dts/site-commands/src/siteStyleCommandSchema.d.ts +28 -1
  54. package/dist/_dts/site-commands/src/siteStyleSelectionSchemaBuilder.d.ts +4 -4
  55. package/dist/_dts/theme-core/src/palette/concretePalette.d.ts +20 -0
  56. package/dist/_dts/theme-core/src/palette/curated/index.d.ts +2 -17
  57. package/dist/_dts/theme-core/src/palette/index.d.ts +1 -6
  58. package/dist/_dts/theme-core/src/palette/schema.d.ts +39 -0
  59. package/dist/_dts/theme-core/src/schema.d.ts +38 -26
  60. package/dist/_dts/theme-core/src/site-styles/previewCompiler.d.ts +4 -6
  61. package/dist/_dts/theme-core/src/site-styles/runtimeCompiler.d.ts +5 -6
  62. package/dist/cli/index.mjs +631 -525
  63. package/dist/cli/init-docs/content/cli-reference.md +6 -3
  64. package/dist/cli/init-docs/content/content-management.md +24 -13
  65. package/dist/client/{DiscountCodeDisclosure-DxvjKvck.mjs → DiscountCodeDisclosure-DS0AuFWW.mjs} +1 -1
  66. package/dist/client/{EventCombined.client-BydMGc4c.mjs → EventCombined.client-DtMxLr7q.mjs} +2 -2
  67. package/dist/client/{EventListing.client-vpzhhysN.mjs → EventListing.client-BdLSRNg1.mjs} +2 -2
  68. package/dist/client/{LeafletStaticMap-CB07rpf8.mjs → LeafletStaticMap-BrpC6vsT.mjs} +1 -1
  69. package/dist/client/{MagicLinkForm-BzyRJ8VF.mjs → MagicLinkForm-Bt3IuLMy.mjs} +1 -1
  70. package/dist/client/{StepIndicator-CTcGf8Be.mjs → StepIndicator-CBYPFVoy.mjs} +2 -2
  71. package/dist/client/{accordion-B-DUDLRD.mjs → accordion-BqqwPJWM.mjs} +1 -1
  72. package/dist/client/{bookingForm-DSbClLcZ.mjs → bookingForm-SneP3yxC.mjs} +5 -6
  73. package/dist/client/bookings.mjs +190 -24
  74. package/dist/client/{carousel-B6Ccdx8M.mjs → carousel-BTIR9L3I.mjs} +1 -1
  75. package/dist/client/{cart-BZh8G8wM.mjs → cart-bqiqd8SX.mjs} +3 -3
  76. package/dist/client/{checkout-o6zaC-kM.mjs → checkout-WbTFV5v4.mjs} +3 -3
  77. package/dist/client/client.mjs +175 -223
  78. package/dist/client/{courseRegistration-Cf11pNDs.mjs → courseRegistration-BcemLAdN.mjs} +6 -7
  79. package/dist/client/{eventCalendar-BeXrdsSE.mjs → eventCalendar-CsxIw0V_.mjs} +4 -4
  80. package/dist/client/{eventCombined-DA76PZgG.mjs → eventCombined-B6XMoHfa.mjs} +2 -2
  81. package/dist/client/{eventDetails-BLxg0rok.mjs → eventDetails-BJaoPPfo.mjs} +10 -5
  82. package/dist/client/{eventListing-tO9LheBX.mjs → eventListing-DgwdYHRT.mjs} +2 -2
  83. package/dist/client/{eventRegistration-Cnene9D9.mjs → eventRegistration-C0O3folu.mjs} +30 -22
  84. package/dist/client/{form-DZf72CHB.mjs → form-Bk9txGFt.mjs} +1 -1
  85. package/dist/client/{headerSection-Hioja5Cr.mjs → headerSection-yIBt0yTv.mjs} +2 -2
  86. package/dist/client/hooks.mjs +54 -102
  87. package/dist/client/{locationMap-DwhUXEix.mjs → locationMap-C-3KIpv-.mjs} +2 -2
  88. package/dist/client/{newsletterForm-C350bEQf.mjs → newsletterForm-CzB8g8h2.mjs} +1 -1
  89. package/dist/client/{pricing-BYWN_ATa.mjs → pricing-C1QeDes_.mjs} +1 -1
  90. package/dist/client/{productDetail-CCqCyXgU.mjs → productDetail-w7SBp5uc.mjs} +3 -3
  91. package/dist/client/{productList-BAiNJrOU.mjs → productList-D0tGKHGf.mjs} +3 -3
  92. package/dist/client/{propsDecoder-DeunRj6m.mjs → propsDecoder-Bcin2DB3.mjs} +172 -11
  93. package/dist/client/rendering/client.mjs +322 -363
  94. package/dist/client/rendering/islands.mjs +18 -18
  95. package/dist/client/rendering.mjs +231 -272
  96. package/dist/client/{useDiscountCodeUi-I-92-x2V.mjs → scrollToBlock-h-o_STf_.mjs} +18 -2
  97. package/dist/client/{shop-DUmCdBtw.mjs → shop-BGzmL8O_.mjs} +5 -6
  98. package/dist/client/{shop-commerce-CY27mEUr.mjs → shop-commerce-lX8QxjX-.mjs} +4 -4
  99. package/dist/client/{shop-commerce-store-ChXPbWfa.mjs → shop-commerce-store-CEurARtu.mjs} +1 -1
  100. package/dist/client/{shopShared-q0kin1cv.mjs → shopShared-DXxH8xxw.mjs} +2 -2
  101. package/dist/client/{useEventFilters-DlcVluZh.mjs → useEventFilters-B591g9vd.mjs} +2 -2
  102. package/dist/client/{usePolling-Bz7GFV_a.mjs → usePolling-BvnChV4m.mjs} +2 -2
  103. package/dist/preview-next/before-render.mjs +0 -7
  104. package/dist/preview-next/client/runtime.mjs +4 -4
  105. package/dist/preview-next/middleware.mjs +0 -7
  106. package/dist/{previewAuthStore-CJX21dGi.mjs → previewAuthStore-Dev9CdG9.mjs} +0 -7
  107. package/dist/{sdk-runtime-OnPM8Z69.mjs → sdk-runtime-M__i3Jce.mjs} +2 -2
  108. package/dist/{separator-CPtfzHqA.mjs → separator-VSlnI9bc.mjs} +1 -1
  109. package/dist/server/components.mjs +99 -141
  110. package/dist/server/config-validation.mjs +54 -102
  111. package/dist/server/config.mjs +54 -102
  112. package/dist/server/data.mjs +54 -102
  113. package/dist/server/index.mjs +1 -8
  114. package/dist/server/next.mjs +103 -152
  115. package/dist/server/page-converter.mjs +54 -102
  116. package/dist/server/prebuild.mjs +1 -1
  117. package/dist/server/rendering/server.mjs +62 -104
  118. package/dist/server/rendering.mjs +100 -142
  119. package/dist/server/routing.mjs +75 -147
  120. package/dist/server/server.mjs +55 -110
  121. package/dist/server/theme-bridge.mjs +172 -162
  122. package/dist/server/theme.mjs +167 -11
  123. package/package.json +1 -1
  124. package/dist/_dts/theme-core/src/palette/editorState.d.ts +0 -75
  125. package/dist/_dts/theme-core/src/palette/libraryModel.d.ts +0 -64
  126. package/dist/_dts/theme-core/src/palette/persistenceReadSource.d.ts +0 -81
  127. package/dist/_dts/theme-core/src/palette/resolveSelection.d.ts +0 -75
  128. package/dist/_dts/theme-core/src/palette/selection.d.ts +0 -74
  129. package/dist/_dts/theme-core/src/palette/sitePalettePersistence.d.ts +0 -34
  130. package/dist/client/scrollToBlock-C86BYkyV.mjs +0 -17
package/README.md CHANGED
@@ -3195,7 +3195,9 @@ npx riverbankcms push-config --dashboard <url>
3195
3195
 
3196
3196
  Pages, content entries, navigation menus, and canonical events are content documents. Sync them with `riverbankcms push pages`, `riverbankcms push entries`, `riverbankcms push navigation`, or `riverbankcms push events`.
3197
3197
 
3198
- Canonical event files in `content/events/*.json` may include `path` and `blocks`. `path` updates the linked event content entry route. `blocks` writes per-event entry-slot content, such as `blocks.main` for the built-in event template. Use stable block identifiers so repeat pushes update existing slot blocks; `push events` rejects duplicate event identifiers before writing. Default entry slots accept enabled SDK `custom.*` blocks, while explicit template `allowedBlocks` lists remain authoritative.
3198
+ Canonical event files in `content/events/*.json` include `preset`, `bookingScope`, and an explicit `occurrences` list. Each occurrence carries UTC `startsAt`/`endsAt` instants and its IANA `timeZone`; this supports one-off events and whole-series schedules without reconstructing dates from a recurrence summary. Files may also include `path` and `blocks`. `path` updates the linked event content entry route. `blocks` writes per-event entry-slot content, such as `blocks.main` for the built-in event template. Use stable block identifiers so repeat pushes update existing slot blocks; `push events` rejects duplicate event identifiers before writing. Default entry slots accept enabled SDK `custom.*` blocks, while explicit template `allowedBlocks` lists remain authoritative.
3199
+
3200
+ The retired `schedule` object is not accepted. When upgrading a site with local event edits: preserve those edits, deploy the matching CMS API first, upgrade the SDK, run `riverbankcms pull events`, then reapply the edits to the canonical files. Existing occurrence schedules may be replayed exactly; changing an already-created schedule remains an explicit CMS capability gap.
3199
3201
 
3200
3202
  **Options:**
3201
3203
 
@@ -1,8 +1,8 @@
1
1
  "use client";
2
- import { $i as curatedPalettes, $s as SearchInput, A as deriveStyleConfiguratorCapabilities, B as previewButtonStyle, Bt as BlockEditor, Cc as DropdownMenuContent, D as committedPaletteForSnapshot, Dc as DropdownMenuTrigger, Dl as Smartphone, E as cancelPreview, Ec as DropdownMenuSeparator, F as markApplySaving, Fc as Button, Fi as findFooterLook, Fl as Monitor, G as previewSitePalette, Gi as getHeaderLayout, H as previewFooterLook, I as openRow, J as resetTypographyToSaved, Js as SelectItem, K as previewSiteStyle, Ki as getHeaderStyle, Kl as ChevronRight, Ks as Select, Kt as useEditorUiStore, L as paletteMutationCapability, Ll as Maximize2, M as isPreviewingChange, N as markApplyFailed, Ni as getCuratedSiteStyle, O as createPalette, Ol as SlidersHorizontal, On as listEntryPageContentSlots, P as markApplySaved, Pn as ThemeScope, Q as toggleRow, Qs as CalloutDescription, R as palettePreviewProjection, Rc as cn, Rl as LoaderCircle, Sc as DropdownMenu, T as applyTypographyDraftPatch, Tc as DropdownMenuLabel, U as previewHeaderLayout, V as previewCuratedPalette, Vc as unsafeAsEditorBlockId, W as previewHeaderStyle, X as styleConfiguratorHistoryEntryForPersistedSelection, Xs as SelectValue, Y as setPaletteColors, Yl as Check, Ys as SelectTrigger, Z as syncStyleConfiguratorState, Zs as Callout, _ as planSiteChromeLookSelection, ac as TabsContent, at as createOptimisticActionRunner, c as selectionSnapshotFromApplySiteStyleSelectionResponse, cl as assertNever$1, cn as isAdapterReferenceKind, d as PREVIEW_DESIGN_REFRESH_ERROR_MESSAGE, dn as resolvePageRouteSlug, ds as resolveButtonStyleSelection, dt as ContentFieldsForm, ea as findCuratedPalette, ec as Popover, f as PREVIEW_DESIGN_SAVE_ERROR_MESSAGE, fn as resolveContentTitle, fs as updateButtonStyleSelectionChoice, ft as useUISelector, g as cycleableSiteChromeOptions, gc as CollapsibleTrigger, gn as ManifestForm, gs as themeButtonClassName, h as cycleSiteChromeLookId, hc as CollapsibleContent, ht as useEntryController, ia as paletteColorsSchema, ic as Tabs, j as dismissWarnings, ji as curatedSiteStyles, jl as Plus, k as createStyleConfiguratorState, l as resolveStyleConfiguratorInitialSnapshot, ls as buttonStyleSelectionParameterValue, m as buildSiteChromeLookModels, mc as Collapsible, n as useSiteChromeCustomizeOptional, na as paletteColorEntries, nc as PopoverTrigger, oc as TabsList, ot as resolvePreviewSidebarTab, p as reportPreviewDesignError, ps as buttonStyleSelectionKey, q as reconcilePaletteLibraryActive, ql as ChevronLeft, qs as SelectContent, qt as useEditorUiStoreInstance, ra as paletteColorsEqual, rc as Input, s as buildApplySiteStyleSelectionBody, sc as TabsTrigger, st as FooterComposerPanel, ta as buildPaletteLibraryReadModel, tc as PopoverContent, u as PREVIEW_DESIGN_LOAD_ERROR_MESSAGE, un as deriveRouteMetadataPresentation, us as findButtonStyleRecipe, v as deriveSiteStylePreviewUpdate, vn as createManifestValidation, w as applyResolvedSelections, wc as DropdownMenuItem, wl as Tablet, x as usePreviewDesignCoordinator, xc as Surface, xn as createStoreBackend, y as planSiteStylePreviewChange, yl as X$1, yn as FormRenderer, z as prepareStalePaletteRetry } from "./SiteChromeCustomizeContext-2z8moxYf.mjs";
3
- import { d as unwrapResponse, f as getDashboardUrl, r as usePreviewAuth } from "./previewAuthStore-CJX21dGi.mjs";
4
- import { S as getSiteFontsStorageUrl, _ as useBlockCustomizeControls, b as buildFontPreviewUrl, d as resolvePreviewDashboardSetupHandoff, f as resolvePreviewEditorGuidanceModel, g as usePreviewBlockCustomizeSelectionOptional, h as canInspectSiteStyle, m as canApplySiteStyle, p as resolvePreviewSidebarChromeModel, u as buildPreviewDashboardSetupUrl, v as PreviewFormProvider, x as generateFontFaceCss, y as previewWidgetOverrides } from "./SdkPreviewModeRuntime-BW9Z8j8T.mjs";
5
- import { t as Separator } from "./separator-CPtfzHqA.mjs";
2
+ import { $ as resolvePreviewSidebarTab, $o as resolveButtonStyleSelection, A as markApplyFailed, B as previewSiteStyle, Bs as SelectValue, Bt as useEditorUiStoreInstance, C as applyResolvedSelections, D as deriveStyleConfiguratorCapabilities, Dl as Maximize2, Dn as ThemeScope, E as createStyleConfiguratorState, Ei as findFooterLook, F as previewButtonStyle, G as toggleRow, Gs as PopoverContent, H as setPaletteColors, Hs as CalloutDescription, I as previewCuratedPalette, Ii as getHeaderLayout, Il as ChevronRight, Is as Select, Js as Tabs, Ks as PopoverTrigger, L as previewFooterLook, Li as getHeaderStyle, Ll as ChevronLeft, Ls as SelectContent, M as markApplySaving, N as openRow, Nt as BlockEditor, O as dismissWarnings, Oc as cn, Ol as LoaderCircle, P as palettePreviewProjection, Q as createOptimisticActionRunner, Qc as assertNever$1, Qo as findButtonStyleRecipe, R as previewHeaderLayout, Rs as SelectItem, Si as curatedSiteStyles, T as cancelPreview, Tc as Button, Tl as Monitor, U as styleConfiguratorHistoryEntryForPersistedSelection, Us as SearchInput, V as resetTypographyToSaved, Vs as Callout, W as syncStyleConfiguratorState, Wi as curatedPalettes, Ws as Popover, Xs as TabsList, Ys as TabsContent, Zo as buttonStyleSelectionParameterValue, Zs as TabsTrigger, _ as cycleableSiteChromeOptions, _c as DropdownMenuTrigger, _l as Smartphone, _s as paletteColorEntries, ac as CollapsibleContent, an as resolveContentTitle, at as useUISelector, b as usePreviewDesignCoordinator, c as selectionSnapshotFromApplySiteStyleSelectionResponse, ct as useEntryController, d as resolveStyleConfiguratorInitialSnapshot, dc as Surface, dn as createManifestValidation, es as updateButtonStyleSelectionChoice, et as FooterComposerPanel, fc as DropdownMenu, fn as FormRenderer, g as cycleSiteChromeLookId, gc as DropdownMenuSeparator, h as buildSiteChromeLookModels, hc as DropdownMenuLabel, ic as Collapsible, in as resolvePageRouteSlug, is as themeButtonClassName, it as ContentFieldsForm, j as markApplySaved, jc as unsafeAsEditorBlockId, k as isPreviewingChange, l as deriveSiteStylePreviewUpdate, ll as X$1, ln as ManifestForm, m as reportPreviewDesignError, mc as DropdownMenuItem, ml as Tablet, mn as createStoreBackend, n as useSiteChromeCustomizeOptional, oc as CollapsibleTrigger, p as PREVIEW_DESIGN_SAVE_ERROR_MESSAGE, pc as DropdownMenuContent, qs as Input, rn as deriveRouteMetadataPresentation, s as buildApplySiteStyleSelectionBody, tn as isAdapterReferenceKind, ts as buttonStyleSelectionKey, u as planSiteStylePreviewChange, v as planSiteChromeLookSelection, vl as SlidersHorizontal, vs as paletteColorsSchema, w as applyTypographyDraftPatch, wi as getCuratedSiteStyle, xn as listEntryPageContentSlots, z as previewHeaderStyle, zl as Check, zs as SelectTrigger, zt as useEditorUiStore } from "./SiteChromeCustomizeContext-C87qlKWw.mjs";
3
+ import { d as unwrapResponse, f as getDashboardUrl, r as usePreviewAuth } from "./previewAuthStore-Dev9CdG9.mjs";
4
+ import { S as getSiteFontsStorageUrl, _ as useBlockCustomizeControls, b as buildFontPreviewUrl, d as resolvePreviewDashboardSetupHandoff, f as resolvePreviewEditorGuidanceModel, g as usePreviewBlockCustomizeSelectionOptional, h as canInspectSiteStyle, m as canApplySiteStyle, p as resolvePreviewSidebarChromeModel, u as buildPreviewDashboardSetupUrl, v as PreviewFormProvider, x as generateFontFaceCss, y as previewWidgetOverrides } from "./SdkPreviewModeRuntime-CvW1vdQ4.mjs";
5
+ import { t as Separator } from "./separator-VSlnI9bc.mjs";
6
6
  import React, { createContext, forwardRef, useCallback, useContext, useEffect, useId, useLayoutEffect, useMemo, useRef, useState, useSyncExternalStore, useTransition } from "react";
7
7
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
8
8
  import { useQuery, useQueryClient } from "@tanstack/react-query";
@@ -3333,23 +3333,8 @@ function StyleConfigurator({ siteId, apiClient, theme, selectionId, selectionVer
3333
3333
  if (plan.kind !== "footer") return;
3334
3334
  setState((current) => current ? previewFooterLook(current, plan.next.footerLookId) : current);
3335
3335
  }, []);
3336
- const handlePreviewPaletteItem = useCallback((item) => {
3337
- setState((current) => {
3338
- if (!current) return current;
3339
- if (item.kind === "curated") return previewCuratedPalette(current, item.valueKey);
3340
- return previewSitePalette(current, {
3341
- paletteId: item.paletteId,
3342
- colors: item.colors,
3343
- mode: item.mode,
3344
- version: item.version
3345
- });
3346
- });
3347
- }, []);
3348
- const handleCreatePalette = useCallback(() => {
3349
- setState((current) => current ? createPalette(current) : current);
3350
- }, []);
3351
- const handlePaletteLibraryLoaded = useCallback((response) => {
3352
- setState((current) => current ? reconcilePaletteLibraryActive(current, response.active, response.palettes) : current);
3336
+ const handlePreviewPalette = useCallback((valueKey) => {
3337
+ setState((current) => current ? previewCuratedPalette(current, valueKey) : current);
3353
3338
  }, []);
3354
3339
  const patchTypography = useCallback((patch) => {
3355
3340
  setState((current) => {
@@ -3389,7 +3374,6 @@ function StyleConfigurator({ siteId, apiClient, theme, selectionId, selectionVer
3389
3374
  setState((current) => {
3390
3375
  if (!current) return current;
3391
3376
  const palette = palettePreviewProjection(current.previewed.palette);
3392
- if (palette.kind === "invalid") return current;
3393
3377
  if (!(role in palette.colors)) return current;
3394
3378
  const nextColors = paletteColorsSchema.safeParse({
3395
3379
  ...palette.colors,
@@ -3398,16 +3382,6 @@ function StyleConfigurator({ siteId, apiClient, theme, selectionId, selectionVer
3398
3382
  return nextColors.success ? setPaletteColors(current, nextColors.data) : current;
3399
3383
  });
3400
3384
  }, []);
3401
- const handleResetOverrides = useCallback(() => {
3402
- setState((current) => {
3403
- if (!current) return current;
3404
- const palette = palettePreviewProjection(current.previewed.palette);
3405
- const sourceValueKey = palette.kind === "curated" ? palette.valueKey : palette.kind === "curated-fork" ? palette.sourceValueKey : null;
3406
- if (!sourceValueKey) return current;
3407
- const curated = findCuratedPalette(sourceValueKey);
3408
- return curated ? setPaletteColors(current, curated.colors) : current;
3409
- });
3410
- }, []);
3411
3385
  const handleToggleRow = useCallback((row) => {
3412
3386
  if (row === "typography") setTypographySurface(typographyOverviewSurface);
3413
3387
  setState((current) => current ? toggleRow(current, row) : current);
@@ -3419,27 +3393,10 @@ function StyleConfigurator({ siteId, apiClient, theme, selectionId, selectionVer
3419
3393
  const handleDismissWarnings = useCallback(() => {
3420
3394
  setState((current) => current ? dismissWarnings(current) : current);
3421
3395
  }, []);
3422
- const handleApply = useCallback(async (retry = false) => {
3423
- const current = stateRef.current;
3424
- let live = current;
3425
- if (current && retry) try {
3426
- const paletteAuthority = await apiClient({
3427
- endpoint: "listSiteThemePalettes",
3428
- params: { siteId }
3429
- }).then(unwrapResponse);
3430
- live = prepareStalePaletteRetry(reconcilePaletteLibraryActive(current, paletteAuthority.active, paletteAuthority.palettes), { sitePalettes: paletteAuthority.palettes });
3431
- } catch (error) {
3432
- reportPreviewDesignError("Failed to refresh palette authority", error);
3433
- const message = PREVIEW_DESIGN_REFRESH_ERROR_MESSAGE;
3434
- setState((latest) => latest ? markApplyFailed(latest, message, "stale") : latest);
3435
- return;
3436
- }
3396
+ const handleApply = useCallback(async () => {
3397
+ const live = stateRef.current;
3437
3398
  if (!live || !isPreviewingChange(live)) return;
3438
3399
  if (!deriveStyleConfiguratorCapabilities(live).canApplyStaged) return;
3439
- if (live !== current) {
3440
- stateRef.current = live;
3441
- setState(live);
3442
- }
3443
3400
  const previewed = live.previewed;
3444
3401
  if (!getCuratedSiteStyle(previewed.siteStyleId)) return;
3445
3402
  await runnerRef.current.run({
@@ -3508,11 +3465,7 @@ function StyleConfigurator({ siteId, apiClient, theme, selectionId, selectionVer
3508
3465
  children: "This site uses a Site Style that cannot be configured here."
3509
3466
  });
3510
3467
  const currentPalette = palettePreviewProjection(state.previewed.palette);
3511
- const paletteMutation = paletteMutationCapability(state);
3512
- const paletteControlsDisabled = saving || !stagedCapabilities.canPreviewStaged || paletteMutation.kind !== "editable";
3513
- const currentCuratedValueKey = currentPalette.kind === "curated" ? currentPalette.valueKey : currentPalette.kind === "curated-fork" ? currentPalette.sourceValueKey : null;
3514
- const currentCuratedPalette = currentCuratedValueKey ? findCuratedPalette(currentCuratedValueKey) : null;
3515
- const paletteIsCustom = currentPalette.kind !== "invalid" && (!currentCuratedPalette || currentPalette.mode !== currentCuratedPalette.mode || !paletteColorsEqual(currentPalette.colors, currentCuratedPalette.colors));
3468
+ const paletteControlsDisabled = saving || !stagedCapabilities.canPreviewStaged;
3516
3469
  const currentPreviewPlan = planSiteStylePreviewChange({
3517
3470
  siteStyle: currentSiteStyle,
3518
3471
  selection: state.previewed,
@@ -3558,7 +3511,7 @@ function StyleConfigurator({ siteId, apiClient, theme, selectionId, selectionVer
3558
3511
  saveStatus: state.saveStatus,
3559
3512
  onCancel: handleCancel,
3560
3513
  onApply: () => void handleApply(),
3561
- onRetry: () => void handleApply(true)
3514
+ onRetry: () => void handleApply()
3562
3515
  })
3563
3516
  })]
3564
3517
  });
@@ -3662,18 +3615,10 @@ function StyleConfigurator({ siteId, apiClient, theme, selectionId, selectionVer
3662
3615
  /* @__PURE__ */ jsx(PaletteRow, {
3663
3616
  expanded: state.expandedRow === "palette",
3664
3617
  onToggle: () => handleToggleRow("palette"),
3665
- apiClient,
3666
- siteId,
3667
3618
  siteStyle: currentSiteStyle,
3668
3619
  palette: currentPalette,
3669
- committedSelection: committedPaletteForSnapshot(state.base.palette)?.selection ?? null,
3670
- onPreview: handlePreviewPaletteItem,
3671
- onCreate: handleCreatePalette,
3672
- onLibraryLoaded: handlePaletteLibraryLoaded,
3673
- isCustom: paletteIsCustom,
3620
+ onPreview: handlePreviewPalette,
3674
3621
  onTokenChange: handleTokenOverride,
3675
- onReset: handleResetOverrides,
3676
- mutationCapability: paletteMutation,
3677
3622
  disabled: saving || !applyAllowed,
3678
3623
  mutationDisabled: paletteControlsDisabled || !applyAllowed
3679
3624
  }),
@@ -3686,7 +3631,7 @@ function StyleConfigurator({ siteId, apiClient, theme, selectionId, selectionVer
3686
3631
  saveStatus: state.saveStatus,
3687
3632
  onCancel: handleCancel,
3688
3633
  onApply: () => void handleApply(),
3689
- onRetry: () => void handleApply(true)
3634
+ onRetry: () => void handleApply()
3690
3635
  })
3691
3636
  ]
3692
3637
  });
@@ -3924,70 +3869,13 @@ function HeaderMenuControls({ state, disabled, onMenuFontChange, onMenuFontSizeC
3924
3869
  })]
3925
3870
  });
3926
3871
  }
3927
- function PaletteRow({ expanded, onToggle, apiClient, siteId, siteStyle, palette, committedSelection, onPreview, onCreate, onLibraryLoaded, isCustom, onTokenChange, onReset, mutationCapability, disabled, mutationDisabled }) {
3928
- const [library, setLibrary] = useState({
3929
- kind: "idle",
3930
- palettes: []
3931
- });
3872
+ function PaletteRow({ expanded, onToggle, siteStyle, palette, onPreview, onTokenChange, disabled, mutationDisabled }) {
3932
3873
  const optionRefs = useRef([]);
3933
- const activeSelection = selectionForPaletteSnapshot(palette) ?? committedSelection;
3934
- const libraryModel = useMemo(() => buildPaletteLibraryReadModel({
3935
- active: activeSelection ? {
3936
- kind: "available",
3937
- selection: activeSelection
3938
- } : { kind: "invalid" },
3939
- sitePalettes: library.palettes,
3940
- curatedPalettes,
3941
- recommendations: siteStyle.paletteRecommendations.map((recommendation) => recommendation.id)
3942
- }), [
3943
- activeSelection,
3944
- library.palettes,
3945
- siteStyle.paletteRecommendations
3946
- ]);
3947
- useEffect(() => {
3948
- if (!expanded || library.kind !== "idle") return;
3949
- setLibrary((current) => ({
3950
- kind: "loading",
3951
- palettes: current.palettes
3952
- }));
3953
- }, [expanded, library.kind]);
3954
- useEffect(() => {
3955
- if (library.kind !== "loading") return;
3956
- let cancelled = false;
3957
- apiClient({
3958
- endpoint: "listSiteThemePalettes",
3959
- params: { siteId }
3960
- }).then(unwrapResponse).then((response) => {
3961
- if (cancelled) return;
3962
- setLibrary({
3963
- kind: "loaded",
3964
- palettes: response.palettes
3965
- });
3966
- onLibraryLoaded(response);
3967
- }).catch((error) => {
3968
- if (cancelled) return;
3969
- reportPreviewDesignError("Failed to load site palettes", error);
3970
- setLibrary((current) => ({
3971
- kind: "failed",
3972
- palettes: current.palettes,
3973
- message: PREVIEW_DESIGN_LOAD_ERROR_MESSAGE
3974
- }));
3975
- });
3976
- return () => {
3977
- cancelled = true;
3978
- };
3979
- }, [
3980
- apiClient,
3981
- library.kind,
3982
- onLibraryLoaded,
3983
- siteId
3984
- ]);
3985
- const items = libraryModel?.ok ? [
3986
- ...libraryModel.model.yours,
3987
- ...libraryModel.model.suggested,
3988
- ...libraryModel.model.more
3989
- ] : [];
3990
- const currentLabel = palette.kind === "new-site" ? "New palette" : "Selected palette";
3874
+ const suggestedKeys = new Set(siteStyle.paletteRecommendations.map((recommendation) => recommendation.id));
3875
+ const suggested = curatedPalettes.filter((candidate) => suggestedKeys.has(candidate.valueKey));
3876
+ const more = curatedPalettes.filter((candidate) => !suggestedKeys.has(candidate.valueKey));
3877
+ const items = [...suggested, ...more];
3878
+ const currentLabel = (palette.curatedValueKey ? curatedPalettes.find((candidate) => candidate.valueKey === palette.curatedValueKey) : null)?.name ?? "Custom palette";
3991
3879
  const onOptionKeyDown = (event, index) => {
3992
3880
  if (items.length === 0) return;
3993
3881
  const direction = event.key === "ArrowDown" || event.key === "ArrowRight" ? 1 : event.key === "ArrowUp" || event.key === "ArrowLeft" ? -1 : 0;
@@ -3996,100 +3884,46 @@ function PaletteRow({ expanded, onToggle, apiClient, siteId, siteStyle, palette,
3996
3884
  const nextIndex = (index + direction + items.length) % items.length;
3997
3885
  const next = items[nextIndex];
3998
3886
  if (!next) return;
3999
- onPreview(next);
3887
+ onPreview(next.valueKey);
4000
3888
  optionRefs.current[nextIndex]?.focus();
4001
3889
  };
4002
3890
  return /* @__PURE__ */ jsxs(StyleRowFrame, {
4003
3891
  label: "Palette",
4004
3892
  currentLabel,
4005
- swatch: palette.kind === "invalid" ? null : palette.colors.primary,
3893
+ swatch: palette.colors.primary,
4006
3894
  expanded,
4007
3895
  onToggle,
4008
- children: [
4009
- mutationCapability.kind === "blocked" && mutationCapability.reason === "invalid-palette" ? /* @__PURE__ */ jsx("div", {
4010
- role: "status",
4011
- className: "mb-3 flex items-center justify-between gap-3 rounded-md border border-muted px-3 py-2 text-xs text-muted-foreground",
4012
- children: /* @__PURE__ */ jsx("span", { children: mutationCapability.message })
4013
- }) : null,
4014
- library.kind === "loading" ? /* @__PURE__ */ jsx("p", {
4015
- className: "text-xs text-muted-foreground",
4016
- children: "Loading palettes..."
4017
- }) : null,
4018
- library.kind === "failed" ? /* @__PURE__ */ jsxs("div", {
4019
- role: "status",
4020
- className: "space-y-2 text-xs text-muted-foreground",
4021
- children: [/* @__PURE__ */ jsx("p", { children: library.message }), /* @__PURE__ */ jsx(Button, {
4022
- type: "button",
4023
- size: "sm",
4024
- variant: "outline",
4025
- onClick: () => setLibrary({
4026
- kind: "idle",
4027
- palettes: library.palettes
4028
- }),
4029
- children: "Retry loading palettes"
4030
- })]
4031
- }) : null,
4032
- libraryModel.ok ? /* @__PURE__ */ jsxs("div", {
4033
- role: "radiogroup",
4034
- "aria-label": "Palette library",
4035
- className: "space-y-3",
4036
- children: [
4037
- /* @__PURE__ */ jsx(PaletteLibraryGroup, {
4038
- label: "Your palettes",
4039
- items: libraryModel.model.yours,
4040
- offset: 0,
4041
- optionRefs,
4042
- onPreview,
4043
- onOptionKeyDown,
4044
- disabled
4045
- }),
4046
- /* @__PURE__ */ jsx(PaletteLibraryGroup, {
4047
- label: "Suggested for this style",
4048
- items: libraryModel.model.suggested,
4049
- offset: libraryModel.model.yours.length,
4050
- optionRefs,
4051
- onPreview,
4052
- onOptionKeyDown,
4053
- disabled
4054
- }),
4055
- /* @__PURE__ */ jsx(PaletteLibraryGroup, {
4056
- label: "More palettes",
4057
- items: libraryModel.model.more,
4058
- offset: libraryModel.model.yours.length + libraryModel.model.suggested.length,
4059
- optionRefs,
4060
- onPreview,
4061
- onOptionKeyDown,
4062
- disabled
4063
- })
4064
- ]
4065
- }) : /* @__PURE__ */ jsx("p", {
4066
- role: "status",
4067
- className: "text-xs text-muted-foreground",
4068
- children: "Palette details are unavailable."
4069
- }),
4070
- /* @__PURE__ */ jsxs(Button, {
4071
- type: "button",
4072
- size: "sm",
4073
- variant: "outline",
4074
- className: "mt-3",
4075
- onClick: onCreate,
4076
- disabled: mutationDisabled,
4077
- children: [/* @__PURE__ */ jsx(Plus, {
4078
- "aria-hidden": "true",
4079
- className: "size-3.5"
4080
- }), "Create palette"]
4081
- }),
4082
- palette.kind !== "invalid" ? /* @__PURE__ */ jsx(PaletteTokenControls, {
4083
- palette: palette.colors,
4084
- isCustom,
4085
- onTokenChange,
4086
- onReset,
4087
- disabled: mutationDisabled
4088
- }) : null
4089
- ]
3896
+ children: [/* @__PURE__ */ jsxs("div", {
3897
+ role: "radiogroup",
3898
+ "aria-label": "Palette library",
3899
+ className: "space-y-3",
3900
+ children: [/* @__PURE__ */ jsx(CuratedPaletteGroup, {
3901
+ label: "Suggested for this style",
3902
+ items: suggested,
3903
+ selectedValueKey: palette.curatedValueKey,
3904
+ offset: 0,
3905
+ optionRefs,
3906
+ onPreview,
3907
+ onOptionKeyDown,
3908
+ disabled
3909
+ }), /* @__PURE__ */ jsx(CuratedPaletteGroup, {
3910
+ label: "More palettes",
3911
+ items: more,
3912
+ selectedValueKey: palette.curatedValueKey,
3913
+ offset: suggested.length,
3914
+ optionRefs,
3915
+ onPreview,
3916
+ onOptionKeyDown,
3917
+ disabled
3918
+ })]
3919
+ }), /* @__PURE__ */ jsx(PaletteTokenControls, {
3920
+ palette: palette.colors,
3921
+ onTokenChange,
3922
+ disabled: mutationDisabled
3923
+ })]
4090
3924
  });
4091
3925
  }
4092
- function PaletteLibraryGroup({ label, items, offset, optionRefs, onPreview, onOptionKeyDown, disabled }) {
3926
+ function CuratedPaletteGroup({ label, items, selectedValueKey, offset, optionRefs, onPreview, onOptionKeyDown, disabled }) {
4093
3927
  if (items.length === 0) return null;
4094
3928
  return /* @__PURE__ */ jsxs("section", {
4095
3929
  "aria-label": label,
@@ -4104,53 +3938,37 @@ function PaletteLibraryGroup({ label, items, offset, optionRefs, onPreview, onOp
4104
3938
  },
4105
3939
  type: "button",
4106
3940
  role: "radio",
4107
- "aria-label": item.accessibleLabel,
4108
- "aria-checked": item.selected,
3941
+ "aria-label": `${item.name}. ${item.description}`,
3942
+ "aria-checked": item.valueKey === selectedValueKey,
4109
3943
  disabled,
4110
- onClick: () => onPreview(item),
3944
+ onClick: () => onPreview(item.valueKey),
4111
3945
  onKeyDown: (event) => onOptionKeyDown(event, offset + index),
4112
- className: cn("relative h-10 overflow-hidden rounded-md border p-0.5 outline-none transition focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50", item.selected ? "border-foreground ring-1 ring-foreground" : "border-border hover:border-foreground/60"),
3946
+ className: cn("relative h-10 overflow-hidden rounded-md border p-0.5 outline-none transition focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50", item.valueKey === selectedValueKey ? "border-foreground ring-1 ring-foreground" : "border-border hover:border-foreground/60"),
4113
3947
  children: [/* @__PURE__ */ jsx("span", {
4114
3948
  className: "grid h-full grid-cols-5 overflow-hidden rounded-[3px]",
4115
3949
  "aria-hidden": "true",
4116
- children: item.swatch.map((color, swatchIndex) => /* @__PURE__ */ jsx("span", { style: { backgroundColor: color } }, `${paletteLibraryItemKey(item)}:${swatchIndex}`))
4117
- }), item.selected ? /* @__PURE__ */ jsx("span", {
3950
+ children: [
3951
+ item.colors.primary,
3952
+ item.colors.secondary,
3953
+ item.colors.accent,
3954
+ item.colors.background,
3955
+ item.colors.text
3956
+ ].map((color, swatchIndex) => /* @__PURE__ */ jsx("span", { style: { backgroundColor: color } }, `${item.valueKey}:${swatchIndex}`))
3957
+ }), item.valueKey === selectedValueKey ? /* @__PURE__ */ jsx("span", {
4118
3958
  className: "absolute right-1 top-1 grid size-4 place-items-center rounded-full bg-foreground text-background",
4119
3959
  children: /* @__PURE__ */ jsx(Check, {
4120
3960
  "aria-hidden": "true",
4121
3961
  className: "size-3"
4122
3962
  })
4123
3963
  }) : null]
4124
- }, paletteLibraryItemKey(item)))
3964
+ }, item.valueKey))
4125
3965
  })]
4126
3966
  });
4127
3967
  }
4128
- function paletteLibraryItemKey(item) {
4129
- return item.kind === "curated" ? `curated:${item.valueKey}` : `site:${item.paletteId}`;
4130
- }
4131
- function selectionForPaletteSnapshot(palette) {
4132
- switch (palette.kind) {
4133
- case "curated": return {
4134
- kind: "curated",
4135
- valueKey: palette.valueKey
4136
- };
4137
- case "curated-fork": return {
4138
- kind: "curated",
4139
- valueKey: palette.sourceValueKey
4140
- };
4141
- case "site": return {
4142
- kind: "site",
4143
- paletteId: palette.paletteId
4144
- };
4145
- case "new-site":
4146
- case "invalid": return null;
4147
- default: return assertNever$1(palette);
4148
- }
4149
- }
4150
- function PaletteTokenControls({ palette, isCustom, onTokenChange, onReset, disabled }) {
4151
- return /* @__PURE__ */ jsxs("div", {
3968
+ function PaletteTokenControls({ palette, onTokenChange, disabled }) {
3969
+ return /* @__PURE__ */ jsx("div", {
4152
3970
  className: "mt-4 space-y-3 border-t pt-4",
4153
- children: [/* @__PURE__ */ jsx("fieldset", {
3971
+ children: /* @__PURE__ */ jsx("fieldset", {
4154
3972
  disabled,
4155
3973
  className: "min-w-0 border-0 p-0",
4156
3974
  children: /* @__PURE__ */ jsx(PaletteTokenEditor, {
@@ -4162,17 +3980,7 @@ function PaletteTokenControls({ palette, isCustom, onTokenChange, onReset, disab
4162
3980
  showContrastChecks: false,
4163
3981
  disabled
4164
3982
  })
4165
- }), isCustom ? /* @__PURE__ */ jsx("div", {
4166
- className: "flex justify-end",
4167
- children: /* @__PURE__ */ jsx(Button, {
4168
- type: "button",
4169
- variant: "outline",
4170
- size: "sm",
4171
- onClick: onReset,
4172
- disabled,
4173
- children: "Reset to variant"
4174
- })
4175
- }) : null]
3983
+ })
4176
3984
  });
4177
3985
  }
4178
3986
  function PickerOption({ selected, label, description, swatch, onSelect, disabled }) {
@@ -4204,8 +4012,6 @@ function PickerOption({ selected, label, description, swatch, onSelect, disabled
4204
4012
  }
4205
4013
  function paletteApplyPlanErrorMessage(error) {
4206
4014
  switch (error) {
4207
- case "invalid-palette-state": return "Palette details are unavailable. Refresh and try again.";
4208
- case "curated-palette-missing": return "This curated palette is no longer available. Refresh and try again.";
4209
4015
  case "no-selection-changes": return "There are no design changes to apply.";
4210
4016
  default: return assertNever$1(error);
4211
4017
  }
@@ -4218,10 +4024,6 @@ function classifyStyleApplyError(error) {
4218
4024
  if (isRecord(error)) {
4219
4025
  const status = error.status;
4220
4026
  const code = error.code ?? error.errorCode;
4221
- if (code === "PALETTE_CAP_REACHED") return {
4222
- kind: "palette-cap",
4223
- message: "This site has reached its palette limit. Your palette draft is still here."
4224
- };
4225
4027
  if (status === 409 || code === "resource:conflict") return {
4226
4028
  kind: "stale",
4227
4029
  message: "This design changed elsewhere. Refreshing the latest version now."
@@ -4271,7 +4073,7 @@ function describeWarning(warning) {
4271
4073
  }
4272
4074
  //#endregion
4273
4075
  //#region ../preview-next/src/client/preview/PreviewEditorSidebar.tsx
4274
- function PreviewEditorSidebar({ surfaceId, siteId, dashboardBaseUrl = null, pageId, entryData, contentTypeSchema, referenceContentTypeKeys = [], draftContent, currentTemplate, theme, themeId = null, themeSelectionId = null, themeSelectionVersion = null, themeSelectionUpdatedAt = null, themeSelectionButtonStyleSelection = null, runtimePaletteState, themeSelectionHeaderLayoutId = null, themeSelectionHeaderStyleId = null, themeSelectionHeaderLookId = null, themeSelectionFooterLookId = null, themeSelectionHeaderContext, apiClient, bearerToken, supabaseUrl, entrySubrouteContext, assistantPanel, sdkConfig, mediaAssets, bookingOfferingPresets, siteStyleAccess = { kind: "hidden" }, activeTab, onTabChange, onClose, onFooterSaved, viewportMode, viewportWidth, zoom, onViewportModeChange, onViewportWidthChange, onZoomChange }) {
4076
+ function PreviewEditorSidebar({ surfaceId, siteId, dashboardBaseUrl = null, pageId, entryData, contentTypeSchema, referenceContentTypeKeys = [], draftContent, currentTemplate, theme, themeId = null, themeSelectionId = null, themeSelectionVersion = null, themeSelectionUpdatedAt = null, themeSelectionButtonStyleSelection = null, themeSelectionHeaderLayoutId = null, themeSelectionHeaderStyleId = null, themeSelectionHeaderLookId = null, themeSelectionFooterLookId = null, themeSelectionHeaderContext, apiClient, bearerToken, supabaseUrl, entrySubrouteContext, assistantPanel, sdkConfig, mediaAssets, bookingOfferingPresets, siteStyleAccess = { kind: "hidden" }, activeTab, onTabChange, onClose, onFooterSaved, viewportMode, viewportWidth, zoom, onViewportModeChange, onViewportWidthChange, onZoomChange }) {
4275
4077
  const controller = useEntryController();
4276
4078
  const controllerBlocks = controller.blocks;
4277
4079
  const uiStore = useEditorUiStoreInstance();
@@ -4411,7 +4213,6 @@ function PreviewEditorSidebar({ surfaceId, siteId, dashboardBaseUrl = null, page
4411
4213
  selectionVersion: themeSelectionVersion,
4412
4214
  selectionUpdatedAt: themeSelectionUpdatedAt,
4413
4215
  buttonStyleSelection: themeSelectionButtonStyleSelection,
4414
- runtimePaletteState,
4415
4216
  headerLayoutId: themeSelectionHeaderLayoutId,
4416
4217
  headerStyleId: themeSelectionHeaderStyleId,
4417
4218
  headerLookId: themeSelectionHeaderLookId,
@@ -1,7 +1,7 @@
1
1
  "use client";
2
- import { Al as Redo2, Cc as DropdownMenuContent, Dc as DropdownMenuTrigger, El as Sparkles, Fc as Button, Gs as TooltipTrigger, Gt as classifyHistoryShortcut, Hl as EllipsisVertical, Ic as cva, Jl as ChevronDown, Kt as useEditorUiStore, Lt as useEditor, Ml as Pencil, Nl as PenLine, Pl as Palette, Rc as cn, Rl as LoaderCircle, Sc as DropdownMenu, Sl as TriangleAlert, Us as Tooltip, Vl as Eye, Ws as TooltipContent, a as previewDesignHistoryDomainForCommand, cc as Dialog, fc as DialogHeader, gt as useEntryEditorController, i as usePreviewDesignHistoryOrder, lc as DialogContent, n as useSiteChromeCustomizeOptional, o as selectPreviewDesignHistoryDomain, pc as DialogTitle, qt as useEditorUiStoreInstance, rn as useMultiAutosave, uc as DialogDescription, wc as DropdownMenuItem, xl as Undo2 } from "./SiteChromeCustomizeContext-2z8moxYf.mjs";
3
- import { d as unwrapResponse, r as usePreviewAuth } from "./previewAuthStore-CJX21dGi.mjs";
4
- import { C as FixedBottomSurface, a as usePreviewPageDesignEditorState, c as applyPreviewChromeSurfaceToElement, l as resolvePreviewChromeSurface, o as PREVIEW_CHROME_PORTAL_CLASS_NAME, s as PREVIEW_CHROME_THEME_CLASS_NAME } from "./SdkPreviewModeRuntime-BW9Z8j8T.mjs";
2
+ import { $s as DialogContent, At as useEditor, Bt as useEditorUiStoreInstance, Cl as PenLine, Ec as cva, Fs as TooltipTrigger, Ml as EllipsisVertical, Ns as Tooltip, Oc as cn, Ol as LoaderCircle, Ps as TooltipContent, Qs as Dialog, Rl as ChevronDown, Rt as classifyHistoryShortcut, Sl as Pencil, Tc as Button, Xt as useMultiAutosave, _c as DropdownMenuTrigger, a as previewDesignHistoryDomainForCommand, bl as Redo2, dl as Undo2, ec as DialogDescription, fc as DropdownMenu, fl as TriangleAlert, gl as Sparkles, i as usePreviewDesignHistoryOrder, jl as Eye, lt as useEntryEditorController, mc as DropdownMenuItem, n as useSiteChromeCustomizeOptional, nc as DialogHeader, o as selectPreviewDesignHistoryDomain, pc as DropdownMenuContent, rc as DialogTitle, wl as Palette, zt as useEditorUiStore } from "./SiteChromeCustomizeContext-C87qlKWw.mjs";
3
+ import { d as unwrapResponse, r as usePreviewAuth } from "./previewAuthStore-Dev9CdG9.mjs";
4
+ import { C as FixedBottomSurface, a as usePreviewPageDesignEditorState, c as applyPreviewChromeSurfaceToElement, l as resolvePreviewChromeSurface, o as PREVIEW_CHROME_PORTAL_CLASS_NAME, s as PREVIEW_CHROME_THEME_CLASS_NAME } from "./SdkPreviewModeRuntime-CvW1vdQ4.mjs";
5
5
  import * as React$1 from "react";
6
6
  import { useCallback, useEffect, useMemo, useState, useTransition } from "react";
7
7
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { n as markPreviewAuthExpired, s as ApiRequestError } from "./previewAuthStore-CJX21dGi.mjs";
2
+ import { n as markPreviewAuthExpired, s as ApiRequestError } from "./previewAuthStore-Dev9CdG9.mjs";
3
3
  import { createContext, useContext, useRef } from "react";
4
4
  import { jsx } from "react/jsx-runtime";
5
5
  import { MutationCache, QueryCache, QueryClient, QueryClientProvider } from "@tanstack/react-query";