@riverbankcms/sdk 0.127.0 → 0.129.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.
- package/README.md +33 -0
- package/dist/{PreviewEditorSidebar-BXtfF7tp.mjs → PreviewEditorSidebar-B43CJ0g_.mjs} +9 -33
- package/dist/{PreviewEditorUI-Dou73Q0K.mjs → PreviewEditorUI-DHirVkeM.mjs} +3 -3
- package/dist/{PreviewQueryProvider-DgFDIwvK.mjs → PreviewQueryProvider-B1kbhaJD.mjs} +1 -1
- package/dist/SdkPreviewModeRuntime-BJumZy1B.mjs +11209 -0
- package/dist/{SiteChromeCustomizeContext-DZiDBAYu.mjs → SiteChromeCustomizeContext-D9SlpwEj.mjs} +31757 -1621
- package/dist/_dts/ai/src/contracts/proposals.d.ts +288 -36
- package/dist/_dts/api/src/bookingClosures.d.ts +19 -3
- package/dist/_dts/api/src/bookingManagementEndpoints.d.ts +4 -3
- package/dist/_dts/api/src/bookingRecords.d.ts +0 -13
- package/dist/_dts/api/src/commercePortalEndpoints.d.ts +2 -2
- package/dist/_dts/api/src/communications.d.ts +2 -1
- package/dist/_dts/api/src/contactFormSummary.d.ts +15 -0
- package/dist/_dts/api/src/contentRuntime.d.ts +2 -5
- package/dist/_dts/api/src/endpoints.d.ts +1 -1
- package/dist/_dts/api/src/footerSettings.d.ts +11 -0
- package/dist/_dts/api/src/index.d.ts +2 -1
- package/dist/_dts/api/src/occurrenceScheduling.d.ts +48 -0
- package/dist/_dts/api/src/participantMessaging.d.ts +5 -3
- package/dist/_dts/api/src/publicExperience/siteEndpoints.d.ts +7 -0
- package/dist/_dts/api/src/sdkContracts.d.ts +7 -5
- package/dist/_dts/api/src/siteOperations.d.ts +12 -3
- package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +3 -2
- package/dist/_dts/blocks/src/PageRenderer.d.ts +20 -10
- package/dist/_dts/blocks/src/client/form.d.ts +1 -0
- package/dist/_dts/blocks/src/client/newsletter-form.d.ts +1 -0
- package/dist/_dts/blocks/src/client/site-chrome.d.ts +1 -0
- package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +4 -8
- package/dist/_dts/blocks/src/index.d.ts +2 -1
- package/dist/_dts/blocks/src/pageRendererBoundaries.d.ts +30 -0
- package/dist/_dts/blocks/src/pageRenderingMode.d.ts +37 -0
- package/dist/_dts/blocks/src/rendering/server.d.ts +1 -1
- package/dist/_dts/blocks/src/server.d.ts +1 -1
- package/dist/_dts/blocks/src/system/blocks/event-registration.d.ts +41 -0
- package/dist/_dts/blocks/src/system/blocks/newsletter-signup-destination.d.ts +14 -23
- package/dist/_dts/blocks/src/system/blocks/newsletter-signup.d.ts +1 -1
- package/dist/_dts/blocks/src/system/blocks/site-footer-runtime.d.ts +109 -23
- package/dist/_dts/blocks/src/system/data/loaderEndpoints.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +42 -108
- package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +21 -54
- package/dist/_dts/blocks/src/system/runtime/nodes/event-details/logic.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationSurface.d.ts +26 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/types.d.ts +8 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.interactive.d.ts +21 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.interactive.d.ts +29 -78
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.server.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.submission.d.ts +3 -6
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.types.d.ts +27 -8
- package/dist/_dts/content-editor/src/FooterComposerOverview.d.ts +21 -0
- package/dist/_dts/content-editor/src/FooterComposerPanel.d.ts +3 -1
- package/dist/_dts/content-editor/src/FooterEngagementEditorFields.d.ts +31 -0
- package/dist/_dts/content-editor/src/FooterEngagementEditorPanel.d.ts +17 -0
- package/dist/_dts/content-editor/src/footerComposer.d.ts +3 -0
- package/dist/_dts/content-editor/src/footerEngagementDraft.d.ts +57 -0
- package/dist/_dts/content-editor/src/footerEngagementEditor.d.ts +11 -0
- package/dist/_dts/content-editor/src/footerPreviewRuntime.d.ts +13 -0
- package/dist/_dts/content-editor/src/index.d.ts +1 -0
- package/dist/_dts/content-editor/src/useFooterComposerState.d.ts +35 -0
- package/dist/_dts/core/src/footer-arrangement.d.ts +2 -0
- package/dist/_dts/core/src/footer-composition-types.d.ts +118 -0
- package/dist/_dts/core/src/footer-composition.d.ts +7 -116
- package/dist/_dts/core/src/footer-engagement.d.ts +30 -0
- package/dist/_dts/core/src/index.d.ts +4 -0
- package/dist/_dts/core/src/newsletter-signup-destination.d.ts +38 -0
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +73 -6
- package/dist/_dts/db/src/index.d.ts +1 -0
- package/dist/_dts/db/src/schemas/forms.d.ts +72 -2
- package/dist/_dts/db/src/schemas/standard-contact.d.ts +114 -0
- package/dist/_dts/preview-next/src/client/blocks/pageDesignRuntimePreview.d.ts +2 -0
- package/dist/_dts/preview-next/src/client/blocks/previewBatchLoaderParams.d.ts +6 -0
- package/dist/_dts/preview-next/src/client/index.d.ts +47 -47
- package/dist/_dts/preview-next/src/client/preview/EntryEditorPanel.d.ts +2 -5
- package/dist/_dts/preview-next/src/client/preview/EntrySlotBlockEditorPanel.d.ts +2 -5
- package/dist/_dts/preview-next/src/client/preview/PageBlockEditorPanel.d.ts +2 -5
- package/dist/_dts/preview-next/src/client/preview/PreviewEditorSidebar.d.ts +2 -4
- package/dist/_dts/preview-next/src/client/preview/PreviewShell.d.ts +19 -7
- package/dist/_dts/preview-next/src/client/preview/PreviewShellLayout.d.ts +30 -23
- package/dist/_dts/preview-next/src/client/preview/PreviewThemedSiteDocument.d.ts +18 -5
- package/dist/_dts/preview-next/src/client/preview/themeRuntime.d.ts +9 -0
- package/dist/_dts/preview-next/src/client/sdk/SdkPreviewMode.d.ts +21 -6
- package/dist/_dts/preview-next/src/client/sdk-runtime.d.ts +8 -8
- package/dist/_dts/preview-next/src/client/widgets/widgetOverrides.d.ts +6 -5
- package/dist/_dts/sdk/src/cli/commands/push/execute/footer.d.ts +9 -0
- package/dist/_dts/sdk/src/cli/content/footerFile.d.ts +10 -0
- package/dist/_dts/sdk/src/cli/content/reader.d.ts +3 -5
- package/dist/_dts/sdk/src/cli/site-commands/footerCommands.d.ts +15 -3
- package/dist/_dts/sdk/src/client/combineAbortSignals.d.ts +2 -0
- package/dist/_dts/sdk/src/client/management/types.d.ts +6 -15
- package/dist/_dts/sdk/src/client/types.d.ts +10 -2
- package/dist/_dts/sdk/src/client/wholeSeriesReadOperations.d.ts +11 -0
- package/dist/_dts/sdk/src/config/types.d.ts +1 -1
- package/dist/_dts/sdk/src/config/validation.d.ts +3 -0
- package/dist/_dts/sdk/src/contracts/event-registration-content.d.ts +16 -0
- package/dist/_dts/sdk/src/contracts/system-block-content.d.ts +4 -15
- package/dist/_dts/sdk/src/next/catch-all.d.ts +6 -0
- package/dist/_dts/sdk/src/next/index.d.ts +2 -1
- package/dist/_dts/sdk/src/next/renderSdkContent.d.ts +33 -0
- package/dist/_dts/sdk/src/next/types.d.ts +23 -9
- package/dist/_dts/sdk/src/preview-next/before-render.d.ts +4 -6
- package/dist/_dts/sdk/src/preview-next/client/index.d.ts +3 -3
- package/dist/_dts/sdk/src/preview-next/client/runtime.d.ts +1 -1
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +4 -18
- package/dist/_dts/sdk/src/public-api/teamMemberContracts.d.ts +17 -0
- package/dist/_dts/sdk/src/public-api/wholeSeriesContracts.d.ts +2 -0
- package/dist/_dts/sdk/src/rendering/blocks-page-renderer.d.ts +32 -3
- package/dist/_dts/sdk/src/rendering/components/Block.shared.d.ts +13 -2
- package/dist/_dts/sdk/src/rendering/components/Layout.d.ts +31 -18
- package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +20 -9
- package/dist/_dts/sdk/src/rendering/index.d.ts +8 -4
- package/dist/_dts/sdk/src/rendering/mediaAssets.d.ts +8 -2
- package/dist/_dts/sdk/src/rendering/renderingMode.d.ts +23 -0
- package/dist/_dts/sdk/src/rendering/server.d.ts +5 -3
- package/dist/_dts/sdk/src/rendering/themeRuntime.d.ts +6 -0
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/site-commands/src/commandContract.d.ts +8 -1
- package/dist/_dts/site-commands/src/commands.d.ts +16 -2
- package/dist/_dts/theme-core/src/header/paintTargets.d.ts +10 -4
- package/dist/_dts/theme-core/src/header/surfaceRules.d.ts +2 -3
- package/dist/cli/index.mjs +5535 -4835
- package/dist/cli/init-docs/content/workflow-preview-mode.md +24 -11
- package/dist/client/{courseRegistration-DTEYWL6Z.mjs → CourseRegistrationWizard-xRmA7REV.mjs} +329 -49
- package/dist/client/{DiscountCodeDisclosure-BDFRp8Y7.mjs → DiscountCodeDisclosure-B9vriL5C.mjs} +1 -1
- package/dist/client/{EventCombined.client-DJgF1_lf.mjs → EventCombined.client-BgVnVTlz.mjs} +2 -2
- package/dist/client/{EventListing.client-CnWGNjOr.mjs → EventListing.client-CqdsO7jO.mjs} +2 -2
- package/dist/client/{LeafletStaticMap-BISs9Bl7.mjs → LeafletStaticMap-CKPxot9M.mjs} +1 -1
- package/dist/client/{StepIndicator-D8gVYkK-.mjs → StepIndicator-DGCYuBJ1.mjs} +2 -2
- package/dist/client/{accordion-DFDajgDz.mjs → accordion-BfN5Eqd-.mjs} +1 -1
- package/dist/client/{bookingForm-Bdqj9-52.mjs → bookingForm-DOvCpBFP.mjs} +5 -5
- package/dist/client/{carousel-Cvqf-kN8.mjs → carousel-DPNmiH0f.mjs} +1 -1
- package/dist/client/{cart-CuH2TJXP.mjs → cart--egVXlrR.mjs} +3 -3
- package/dist/client/{checkout-CMNPpejZ.mjs → checkout-DywWtMcq.mjs} +3 -3
- package/dist/client/client.mjs +5324 -4942
- package/dist/client/courseRegistration-Dk9qFVwt.mjs +46 -0
- package/dist/client/{eventCalendar-BW-XoxZ0.mjs → eventCalendar-Bkz2HjlS.mjs} +4 -4
- package/dist/client/{eventCombined-Bpn7s0y9.mjs → eventCombined-D4kipYWg.mjs} +2 -2
- package/dist/client/{eventDetails-D2uUSTMH.mjs → eventDetails-Dz_5ix2Q.mjs} +56 -35
- package/dist/client/{eventListing-CVr1c094.mjs → eventListing-D0vm-zST.mjs} +2 -2
- package/dist/client/{eventRegistration-Dv4AvkMw.mjs → eventRegistration-Cw1E4Q4p.mjs} +58 -6
- package/dist/client/{form-DxdKf9fs.mjs → form-C2Zf1n3K.mjs} +1 -1
- package/dist/client/{headerSection-BaXI5Sro.mjs → headerSection-CP05gzdc.mjs} +2 -2
- package/dist/client/hooks.mjs +212 -61
- package/dist/client/{locationMap-BEtW2fKz.mjs → locationMap-Cl3x9PYJ.mjs} +2 -2
- package/dist/client/{newsletterForm-BKKs0S4R.mjs → newsletterForm-DyEJoClm.mjs} +26 -20
- package/dist/client/{pricing-ClkqcElA.mjs → pricing-DGuNR1W4.mjs} +1 -1
- package/dist/client/{productDetail-H-ru8dyy.mjs → productDetail-Cq-HrGew.mjs} +3 -3
- package/dist/client/{productList-Buyi5c0C.mjs → productList-DbB3jwqd.mjs} +3 -3
- package/dist/client/{propsDecoder-BF7i6Ijg.mjs → propsDecoder-CiTuhUwY.mjs} +130 -87
- package/dist/client/rendering/client.mjs +416 -208
- package/dist/client/rendering/islands.mjs +18 -18
- package/dist/client/rendering.mjs +6026 -5596
- package/dist/client/{scrollToBlock-D_7t8yWb.mjs → scrollToBlock-CShkRqab.mjs} +1 -1
- package/dist/client/{shop-CF7SZQNX.mjs → shop-Cu4Ib-ZA.mjs} +5 -5
- package/dist/client/{shop-commerce-DA7_Rq5p.mjs → shop-commerce-BzpsOdh7.mjs} +4 -4
- package/dist/client/{shop-commerce-store-BmLqW7Gh.mjs → shop-commerce-store-DaE7Fhj8.mjs} +1 -1
- package/dist/client/{shopShared-WL-E1znM.mjs → shopShared-cF0c20vB.mjs} +2 -2
- package/dist/client/{useEventFilters-rc8VLeLV.mjs → useEventFilters-QZ3HMgaJ.mjs} +2 -2
- package/dist/client/{usePolling-1ncrfd4S.mjs → usePolling-BKf0GcE-.mjs} +2 -2
- package/dist/preview-next/before-render.mjs +11 -4
- package/dist/preview-next/client/runtime.mjs +4 -4
- package/dist/preview-next/middleware.mjs +1 -1
- package/dist/{previewAuthStore-Dev9CdG9.mjs → previewAuthStore-BesgU5Xu.mjs} +1 -1
- package/dist/{sdk-runtime-BnrCCFJq.mjs → sdk-runtime-CfZd5pAm.mjs} +2 -2
- package/dist/{separator-CFvBx2yl.mjs → separator-DkTe68HE.mjs} +1 -1
- package/dist/server/components.mjs +950 -639
- package/dist/server/config-validation.mjs +209 -61
- package/dist/server/config.mjs +209 -61
- package/dist/server/data.mjs +212 -61
- package/dist/server/index.mjs +40 -16
- package/dist/server/next.mjs +1181 -835
- package/dist/server/page-converter.mjs +211 -64
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +974 -637
- package/dist/server/rendering.mjs +980 -644
- package/dist/server/routing.mjs +254 -80
- package/dist/server/server.mjs +252 -77
- package/package.json +1 -1
- package/dist/SdkPreviewModeRuntime-B0HPXr-l.mjs +0 -39546
- package/dist/client/MagicLinkForm-b5E_HoG9.mjs +0 -327
package/README.md
CHANGED
|
@@ -2627,6 +2627,38 @@ export default Page;
|
|
|
2627
2627
|
export { generateMetadata };
|
|
2628
2628
|
```
|
|
2629
2629
|
|
|
2630
|
+
### Fully custom, override-only rendering
|
|
2631
|
+
|
|
2632
|
+
Hosts that own all visual rendering can opt out of CMS theme admission and built-in block fallbacks explicitly. The registry only needs to cover block kinds the host's content actually uses; `satisfies BlockOverrideRegistrations` checks each registration without pretending custom block kinds form a closed exhaustive set.
|
|
2633
|
+
|
|
2634
|
+
```tsx
|
|
2635
|
+
import { createCatchAllPage } from '@riverbankcms/sdk/next';
|
|
2636
|
+
import type {
|
|
2637
|
+
BlockOverrideProps,
|
|
2638
|
+
BlockOverrideRegistrations,
|
|
2639
|
+
} from '@riverbankcms/sdk/rendering';
|
|
2640
|
+
|
|
2641
|
+
const blockOverrides = {
|
|
2642
|
+
hero: ({ content }: BlockOverrideProps) => (
|
|
2643
|
+
<Hero heading={String(content.heading ?? '')} />
|
|
2644
|
+
),
|
|
2645
|
+
'custom.product-grid': ProductGrid,
|
|
2646
|
+
} satisfies BlockOverrideRegistrations;
|
|
2647
|
+
|
|
2648
|
+
const { Page, generateMetadata } = createCatchAllPage({
|
|
2649
|
+
getClient: getRiverbankClient,
|
|
2650
|
+
config,
|
|
2651
|
+
rendering: { kind: 'overrides-only' },
|
|
2652
|
+
blockOverrides,
|
|
2653
|
+
});
|
|
2654
|
+
```
|
|
2655
|
+
|
|
2656
|
+
In this mode the SDK does not resolve, parse, normalize, or build tokens from the response theme. Overrides receive the usual content, resolved data, routing, media, API/auth, IDs, and preview context, but no `theme` or `themeConfig`. A page fails with `MissingBlockOverrideError` when its content contains an unregistered kind; it never falls through to the known built-in renderer.
|
|
2657
|
+
|
|
2658
|
+
The optional theme-independent wrapper belongs inside `rendering`: use `runtime: { kind: 'responsive-only' }` (the default) for Riverbank's generated responsive utility scope, or `runtime: { kind: 'none' }` when the host owns that too. Do not combine override-only rendering with top-level `themeRuntime`, `theme`, `themes`, or `getTheme`. If you use SDK `Layout` directly, its header and footer must both be custom or disabled. Preview receives the same rendering selection and registry.
|
|
2659
|
+
|
|
2660
|
+
The content response still carries a compatibility theme field for now; override-only rendering deliberately ignores it. Wire-level theme nullability is tracked separately in #1290.
|
|
2661
|
+
|
|
2630
2662
|
Keep the `server-only` marker at the top of the registry so Next.js turns an accidental Client Component import into a build error. `generateMetadata()` never receives or runs host loaders—even with `customMetadata`—so a normal request does not repeat host queries for metadata and rendering.
|
|
2631
2663
|
|
|
2632
2664
|
```tsx
|
|
@@ -3772,6 +3804,7 @@ createCatchAllPage({
|
|
|
3772
3804
|
| `getClient` | `() => RiverbankClient` | Yes | Factory function returning a configured client |
|
|
3773
3805
|
| `config` | `RiverbankSiteConfig` | Yes | Site config from `defineConfig()` |
|
|
3774
3806
|
| `blockOverrides` | `BlockOverrides` | No | Custom block component overrides |
|
|
3807
|
+
| `rendering` | `{ kind: 'overrides-only', runtime?: { kind: 'responsive-only' \| 'none' } }` | No | Opt into host-only rendering; requires `blockOverrides` and forbids theme options |
|
|
3775
3808
|
| `siteUrl` | `string` | No | Override site URL for metadata (uses `config.liveUrl`/`previewUrl` as fallback) |
|
|
3776
3809
|
| `beforeRender` | `function` | No | Intercept before rendering |
|
|
3777
3810
|
| `customMetadata` | `function` | No | Custom metadata generation |
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { $ as createOptimisticActionRunner, $
|
|
3
|
-
import { d as unwrapResponse, f as getDashboardUrl, r as usePreviewAuth } from "./previewAuthStore-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { $ as createOptimisticActionRunner, $i as Callout, A as isPreviewingChange, B as previewHeaderStyle, Br as getHeaderStyle, Ca as DropdownMenuLabel, Ci as updateButtonStyleSelectionChoice, D as createStyleConfiguratorState, Da as Button, Dr as getCuratedSiteStyle, E as cancelPreview, F as palettePreviewProjection, Ft as BlockEditor, G as syncStyleConfiguratorState, H as resetTypographyToSaved, Ht as useEditorUiStoreInstance, I as previewButtonStyle, Ji as Select, K as toggleRow, L as previewCuratedPalette, La as X$1, M as markApplySaved, Mi as paletteColorsSchema, N as markApplySaving, Na as assertNever$1, O as deriveStyleConfiguratorCapabilities, On as ThemeScope, P as openRow, Qa as LoaderCircle, Qi as SelectValue, R as previewFooterLook, Sa as DropdownMenuItem, Si as resolveButtonStyleSelection, T as applyTypographyDraftPatch, Ta as DropdownMenuTrigger, Ti as themeButtonClassName, Tr as curatedSiteStyles, U as setPaletteColors, Ua as Smartphone, V as previewSiteStyle, Va as Tablet, Vt as useEditorUiStore, W as styleConfiguratorHistoryEntryForPersistedSelection, Wa as SlidersHorizontal, Xa as Monitor, Xi as SelectItem, Yi as SelectContent, Za as Maximize2, Zi as SelectTrigger, _ as cycleableSiteChromeOptions, _a as CollapsibleContent, aa as Input, an as deriveRouteMetadataPresentation, ba as DropdownMenu, bi as buttonStyleSelectionParameterValue, c as selectionSnapshotFromApplySiteStyleSelectionResponse, ca as TabsList, d as resolveStyleConfiguratorInitialSnapshot, ea as CalloutDescription, et as resolvePreviewSidebarTab, fn as createManifestValidation, g as cycleSiteChromeLookId, ga as Collapsible, h as buildSiteChromeLookModels, hn as createStoreBackend, ia as PopoverTrigger, io as ChevronLeft, j as markApplyFailed, ja as unsafeAsEditorBlockId, ji as paletteColorEntries, k as dismissWarnings, ka as cn, kr as findFooterLook, l as deriveSiteStylePreviewUpdate, la as TabsTrigger, m as reportPreviewDesignError, n as useSiteChromeCustomizeOptional, na as Popover, oa as Tabs, on as resolvePageRouteSlug, oo as Check, ot as ContentFieldsForm, p as PREVIEW_DESIGN_SAVE_ERROR_MESSAGE, pn as FormRenderer, qr as curatedPalettes, ra as PopoverContent, rn as isAdapterReferenceKind, ro as ChevronRight, s as buildApplySiteStyleSelectionBody, sa as TabsContent, sn as resolveContentTitle, st as useUISelector, ta as SearchInput, tt as FooterComposerPanel, u as planSiteStylePreviewChange, un as ManifestForm, ut as useEntryController, v as planSiteChromeLookSelection, va as CollapsibleTrigger, w as applyResolvedSelections, wa as DropdownMenuSeparator, wi as buttonStyleSelectionKey, x as usePreviewDesignCoordinator, xa as DropdownMenuContent, xi as findButtonStyleRecipe, y as siteChromeLookUnavailableReasonLabel, ya as Surface, yn as listEntryPageContentSlots, z as previewHeaderLayout, zr as getHeaderLayout } from "./SiteChromeCustomizeContext-D9SlpwEj.mjs";
|
|
3
|
+
import { d as unwrapResponse, f as getDashboardUrl, r as usePreviewAuth } from "./previewAuthStore-BesgU5Xu.mjs";
|
|
4
|
+
import { t as Separator } from "./separator-DkTe68HE.mjs";
|
|
5
|
+
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-BJumZy1B.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";
|
|
@@ -1095,7 +1095,7 @@ function updateBlocksWithSavedContent(blocks, blockId, content) {
|
|
|
1095
1095
|
function getErrorMessage(error) {
|
|
1096
1096
|
return error instanceof Error ? error.message : "Unable to load Page Content.";
|
|
1097
1097
|
}
|
|
1098
|
-
function EntrySlotBlockEditorPanel({ siteId, dashboardBaseUrl, typeKey, entryId, theme = null, apiClient,
|
|
1098
|
+
function EntrySlotBlockEditorPanel({ siteId, dashboardBaseUrl, typeKey, entryId, theme = null, apiClient, sdkConfig = null, widgets }) {
|
|
1099
1099
|
const router = useRouter();
|
|
1100
1100
|
const queryClient = useQueryClient();
|
|
1101
1101
|
const uiStore = useEditorUiStoreInstance();
|
|
@@ -1194,9 +1194,6 @@ function EntrySlotBlockEditorPanel({ siteId, dashboardBaseUrl, typeKey, entryId,
|
|
|
1194
1194
|
siteId,
|
|
1195
1195
|
theme,
|
|
1196
1196
|
previewClient: apiClient,
|
|
1197
|
-
bearerToken,
|
|
1198
|
-
supabaseUrl,
|
|
1199
|
-
mediaAssets,
|
|
1200
1197
|
sdkConfig,
|
|
1201
1198
|
children: /* @__PURE__ */ jsx(BlockEditor, {
|
|
1202
1199
|
ref: handleBlockEditorRef,
|
|
@@ -1260,7 +1257,7 @@ function EntrySlotBlockEditorPanel({ siteId, dashboardBaseUrl, typeKey, entryId,
|
|
|
1260
1257
|
}
|
|
1261
1258
|
//#endregion
|
|
1262
1259
|
//#region ../preview-next/src/client/preview/EntryEditorPanel.tsx
|
|
1263
|
-
function EntryEditorPanel({ siteId, dashboardBaseUrl, entryData, contentTypeSchema, referenceContentTypeKeys, draftContent, currentTemplate, theme, apiClient,
|
|
1260
|
+
function EntryEditorPanel({ siteId, dashboardBaseUrl, entryData, contentTypeSchema, referenceContentTypeKeys, draftContent, currentTemplate, theme, apiClient, entrySubrouteContext, metadataPanel, linkedEntrySection, widgets, sdkConfig, viewportMode, viewportWidth, zoom, onViewportModeChange, onViewportWidthChange, onZoomChange }) {
|
|
1264
1261
|
const [contentOpen, setContentOpen] = useState(true);
|
|
1265
1262
|
const [pageContentOpen, setPageContentOpen] = useState(false);
|
|
1266
1263
|
const [templateOpen, setTemplateOpen] = useState(false);
|
|
@@ -1324,9 +1321,6 @@ function EntryEditorPanel({ siteId, dashboardBaseUrl, entryData, contentTypeSche
|
|
|
1324
1321
|
siteId,
|
|
1325
1322
|
theme: theme ?? null,
|
|
1326
1323
|
previewClient: apiClient,
|
|
1327
|
-
bearerToken,
|
|
1328
|
-
supabaseUrl,
|
|
1329
|
-
mediaAssets,
|
|
1330
1324
|
children: /* @__PURE__ */ jsx(ContentFieldsForm, {
|
|
1331
1325
|
siteId,
|
|
1332
1326
|
form: contentFormSpec,
|
|
@@ -1367,10 +1361,7 @@ function EntryEditorPanel({ siteId, dashboardBaseUrl, entryData, contentTypeSche
|
|
|
1367
1361
|
entryId: entryData.id,
|
|
1368
1362
|
theme,
|
|
1369
1363
|
apiClient,
|
|
1370
|
-
bearerToken,
|
|
1371
|
-
supabaseUrl,
|
|
1372
1364
|
sdkConfig: sdkConfig ?? null,
|
|
1373
|
-
mediaAssets,
|
|
1374
1365
|
widgets
|
|
1375
1366
|
})
|
|
1376
1367
|
}) })]
|
|
@@ -1559,7 +1550,7 @@ function usePreviewDesignOpenRequest() {
|
|
|
1559
1550
|
}
|
|
1560
1551
|
//#endregion
|
|
1561
1552
|
//#region ../preview-next/src/client/preview/PageBlockEditorPanel.tsx
|
|
1562
|
-
function PageBlockEditorPanel({ siteId, pageId, dashboardBaseUrl, theme, apiClient,
|
|
1553
|
+
function PageBlockEditorPanel({ siteId, pageId, dashboardBaseUrl, theme, apiClient, blockItems, uiStoreForBlockEditor, blockEditorRef, onBlocksChange, metadataPanel, linkedEntrySection, designPanel, designTakeoverActive = false, sdkConfig, bookingOfferingPresets, viewportMode, viewportWidth, zoom, onViewportModeChange, onViewportWidthChange, onZoomChange }) {
|
|
1563
1554
|
const customizeSelection = usePreviewBlockCustomizeSelectionOptional();
|
|
1564
1555
|
const [designOpen, setDesignOpen] = useState(false);
|
|
1565
1556
|
const [customizeOpen, setCustomizeOpen] = useState(false);
|
|
@@ -1620,9 +1611,6 @@ function PageBlockEditorPanel({ siteId, pageId, dashboardBaseUrl, theme, apiClie
|
|
|
1620
1611
|
siteId,
|
|
1621
1612
|
theme: theme ?? null,
|
|
1622
1613
|
previewClient: apiClient,
|
|
1623
|
-
bearerToken,
|
|
1624
|
-
supabaseUrl,
|
|
1625
|
-
mediaAssets,
|
|
1626
1614
|
bookingOfferingPresets,
|
|
1627
1615
|
sdkConfig: sdkConfig ?? null,
|
|
1628
1616
|
children: /* @__PURE__ */ jsxs("div", {
|
|
@@ -4093,7 +4081,7 @@ function describeWarning(warning) {
|
|
|
4093
4081
|
}
|
|
4094
4082
|
//#endregion
|
|
4095
4083
|
//#region ../preview-next/src/client/preview/PreviewEditorSidebar.tsx
|
|
4096
|
-
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,
|
|
4084
|
+
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, entrySubrouteContext, assistantPanel, sdkConfig, bookingOfferingPresets, siteStyleAccess = { kind: "hidden" }, activeTab, onTabChange, onClose, onFooterSaved, viewportMode, viewportWidth, zoom, onViewportModeChange, onViewportWidthChange, onZoomChange }) {
|
|
4097
4085
|
const controller = useEntryController();
|
|
4098
4086
|
const controllerBlocks = controller.blocks;
|
|
4099
4087
|
const uiStore = useEditorUiStoreInstance();
|
|
@@ -4174,10 +4162,7 @@ function PreviewEditorSidebar({ surfaceId, siteId, dashboardBaseUrl = null, page
|
|
|
4174
4162
|
renderContent: (snapshot) => /* @__PURE__ */ jsx(LinkedEntryEditorPanel, {
|
|
4175
4163
|
siteId,
|
|
4176
4164
|
apiClient,
|
|
4177
|
-
bearerToken,
|
|
4178
|
-
supabaseUrl,
|
|
4179
4165
|
theme,
|
|
4180
|
-
mediaAssets,
|
|
4181
4166
|
widgets: contentFormWidgets,
|
|
4182
4167
|
entry: snapshot,
|
|
4183
4168
|
fields: findLinkedEntryManifestFieldsFromSnapshot(snapshot)
|
|
@@ -4193,12 +4178,9 @@ function PreviewEditorSidebar({ surfaceId, siteId, dashboardBaseUrl = null, page
|
|
|
4193
4178
|
currentTemplate,
|
|
4194
4179
|
theme,
|
|
4195
4180
|
apiClient,
|
|
4196
|
-
bearerToken,
|
|
4197
|
-
supabaseUrl,
|
|
4198
4181
|
entrySubrouteContext,
|
|
4199
4182
|
metadataPanel: metadataSectionContent,
|
|
4200
4183
|
linkedEntrySection,
|
|
4201
|
-
mediaAssets,
|
|
4202
4184
|
widgets: contentFormWidgets,
|
|
4203
4185
|
sdkConfig: sdkConfig ?? null,
|
|
4204
4186
|
viewportMode,
|
|
@@ -4213,8 +4195,6 @@ function PreviewEditorSidebar({ surfaceId, siteId, dashboardBaseUrl = null, page
|
|
|
4213
4195
|
dashboardBaseUrl,
|
|
4214
4196
|
theme,
|
|
4215
4197
|
apiClient,
|
|
4216
|
-
bearerToken,
|
|
4217
|
-
supabaseUrl,
|
|
4218
4198
|
blockItems,
|
|
4219
4199
|
uiStoreForBlockEditor,
|
|
4220
4200
|
blockEditorRef,
|
|
@@ -4243,7 +4223,6 @@ function PreviewEditorSidebar({ surfaceId, siteId, dashboardBaseUrl = null, page
|
|
|
4243
4223
|
siteStyleAccess
|
|
4244
4224
|
}) : null,
|
|
4245
4225
|
sdkConfig: sdkConfig ?? null,
|
|
4246
|
-
mediaAssets,
|
|
4247
4226
|
bookingOfferingPresets,
|
|
4248
4227
|
linkedEntrySection,
|
|
4249
4228
|
viewportMode,
|
|
@@ -4386,7 +4365,7 @@ function PreviewMetadataPanel({ ownerKind, contentTypeKey, entry }) {
|
|
|
4386
4365
|
})]
|
|
4387
4366
|
});
|
|
4388
4367
|
}
|
|
4389
|
-
function LinkedEntryEditorPanel({ siteId, apiClient,
|
|
4368
|
+
function LinkedEntryEditorPanel({ siteId, apiClient, theme, widgets, entry, fields }) {
|
|
4390
4369
|
const uiStore = useEditorUiStoreInstance();
|
|
4391
4370
|
const linkedEntriesAutosave = useUISelector(uiStore, (state) => state.autosave.linkedEntries);
|
|
4392
4371
|
const manifest = useMemo(() => ({
|
|
@@ -4453,9 +4432,6 @@ function LinkedEntryEditorPanel({ siteId, apiClient, bearerToken, supabaseUrl, t
|
|
|
4453
4432
|
siteId,
|
|
4454
4433
|
theme: theme ?? null,
|
|
4455
4434
|
previewClient: apiClient,
|
|
4456
|
-
bearerToken,
|
|
4457
|
-
supabaseUrl,
|
|
4458
|
-
mediaAssets,
|
|
4459
4435
|
children: /* @__PURE__ */ jsx(ManifestForm, {
|
|
4460
4436
|
manifest,
|
|
4461
4437
|
backend,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import { d as unwrapResponse, r as usePreviewAuth } from "./previewAuthStore-
|
|
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-
|
|
2
|
+
import { Ba as TriangleAlert, Bt as classifyHistoryShortcut, Da as Button, Gi as Tooltip, Ha as Sparkles, Ht as useEditorUiStoreInstance, Ja as PenLine, Ka as Redo2, Ki as TooltipContent, Mt as useEditor, Oa as cva, Qa as LoaderCircle, Qt as useMultiAutosave, Sa as DropdownMenuItem, Ta as DropdownMenuTrigger, Vt as useEditorUiStore, Ya as Palette, a as previewDesignHistoryDomainForCommand, ao as ChevronDown, ba as DropdownMenu, da as DialogContent, dt as useEntryEditorController, fa as DialogDescription, ha as DialogTitle, i as usePreviewDesignHistoryOrder, ka as cn, ma as DialogHeader, n as useSiteChromeCustomizeOptional, no as EllipsisVertical, o as selectPreviewDesignHistoryDomain, qa as Pencil, qi as TooltipTrigger, to as Eye, ua as Dialog, xa as DropdownMenuContent, za as Undo2 } from "./SiteChromeCustomizeContext-D9SlpwEj.mjs";
|
|
3
|
+
import { d as unwrapResponse, r as usePreviewAuth } from "./previewAuthStore-BesgU5Xu.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-BJumZy1B.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-
|
|
2
|
+
import { n as markPreviewAuthExpired, s as ApiRequestError } from "./previewAuthStore-BesgU5Xu.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";
|