@riverbankcms/sdk 0.77.1 → 0.78.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 +69 -0
- package/dist/{PreviewEditorSidebar-DVUG7GK4.mjs → PreviewEditorSidebar-RIKFQ72L.mjs} +4916 -4847
- package/dist/{PreviewEditorUI-P7RN4CDS.mjs → PreviewEditorUI-XO7TUWKK.mjs} +3 -3
- package/dist/SdkPreviewModeRuntime-LAGYMPNF.mjs +8 -0
- package/dist/_dts/ai/src/contracts/proposals.d.ts +154 -154
- package/dist/_dts/api/src/accessAdmin.d.ts +5 -0
- package/dist/_dts/api/src/billing.d.ts +3 -26
- package/dist/_dts/api/src/bookingVerticals.d.ts +4 -0
- package/dist/_dts/api/src/content-editor.d.ts +1 -0
- package/dist/_dts/api/src/demoDashboardMutationSurfaces.d.ts +46 -0
- package/dist/_dts/api/src/endpoints.d.ts +8 -0
- package/dist/_dts/api/src/index.d.ts +14 -2
- package/dist/_dts/api/src/navigation/dashboardBookingsNav.d.ts +87 -0
- package/dist/_dts/api/src/navigation/dashboardDemoNav.d.ts +5 -0
- package/dist/_dts/api/src/navigation/dashboardSettingsNav.d.ts +45 -0
- package/dist/_dts/api/src/navigation/dashboardSiteNav.d.ts +42 -0
- package/dist/_dts/api/src/navigation/dashboardTeamMemberNav.d.ts +24 -0
- package/dist/_dts/api/src/navigation/linkUrlType.d.ts +3 -0
- package/dist/_dts/api/src/navigation.d.ts +12 -0
- package/dist/_dts/api/src/publicExperienceEndpoints.d.ts +55 -26
- package/dist/_dts/api/src/staffAccess.d.ts +79 -0
- package/dist/_dts/api/src/types.d.ts +3 -1
- package/dist/_dts/api/src/workflows/automaticWorkflowTriggers.d.ts +21 -0
- package/dist/_dts/blocks/src/client/site-chrome.d.ts +4 -1
- package/dist/_dts/blocks/src/index.d.ts +1 -0
- package/dist/_dts/blocks/src/system/blocks/appointment-booking.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/blog-listing.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/cart.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/checkout.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/collection.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/courses/shared/schemas.d.ts +2 -2
- package/dist/_dts/blocks/src/system/blocks/faq.d.ts +294 -289
- package/dist/_dts/blocks/src/system/blocks/gifting.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/location-map.d.ts +1 -1
- package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +21 -21
- package/dist/_dts/blocks/src/system/blocks/product-detail.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/product-list.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/shop.d.ts +288 -288
- package/dist/_dts/blocks/src/system/data/index.d.ts +5 -3
- package/dist/_dts/blocks/src/system/data/previewResolvedDataState.d.ts +45 -0
- package/dist/_dts/blocks/src/system/fields/boxStyles.d.ts +2 -1
- package/dist/_dts/blocks/src/system/fragments/library/faqAccordion.d.ts +5 -0
- package/dist/_dts/blocks/src/system/manifest/schema.d.ts +29 -29
- package/dist/_dts/blocks/src/system/node/fragments/headingDecoration.d.ts +10 -0
- package/dist/_dts/blocks/src/system/node/fragments/index.d.ts +1 -0
- package/dist/_dts/blocks/src/system/node/fragments/styledSection.d.ts +9 -0
- package/dist/_dts/blocks/src/system/runtime/api/client.d.ts +3 -2
- package/dist/_dts/blocks/src/system/runtime/api/endpoints.d.ts +8 -0
- package/dist/_dts/blocks/src/system/runtime/api/index.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/api/types.d.ts +43 -8
- package/dist/_dts/blocks/src/system/runtime/header/shared.d.ts +8 -7
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/EventCompactRow.d.ts +1 -4
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/utils.d.ts +7 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/header-section.client.d.ts +2 -8
- package/dist/_dts/blocks/src/system/runtime/nodes/header-section.server.d.ts +2 -9
- package/dist/_dts/blocks/src/system/runtime/nodes/shop-cart-discount-ui.d.ts +5 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/shop-checkout-form.d.ts +76 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/shop-checkout.state.d.ts +1 -4
- package/dist/_dts/blocks/src/system/runtime/nodes/shop-commerce-store.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/shop-commerce.shared.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/shop-discount-apply.state.d.ts +52 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/shop.state.d.ts +2 -4
- package/dist/_dts/blocks/src/system/runtime/nodes/useDiscountApply.d.ts +21 -0
- package/dist/_dts/blocks/src/system/runtime/shared/components/DiscountCodeDisclosure.d.ts +54 -0
- package/dist/_dts/blocks/src/system/runtime/shared/components/index.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/shared/index.d.ts +2 -2
- package/dist/_dts/blocks/src/system/transforms/registry/ui.d.ts +1 -1
- package/dist/_dts/blocks/src/system/transforms/typed.d.ts +1 -1
- package/dist/_dts/content-editor/src/contentTypeEditorContentState.d.ts +26 -0
- package/dist/_dts/content-editor/src/definitions/factory.d.ts +75 -0
- package/dist/_dts/content-editor/src/entryWorkflows.d.ts +2 -0
- package/dist/_dts/content-editor/src/footerBlocksEditorState.d.ts +76 -0
- package/dist/_dts/content-editor/src/index.d.ts +5 -0
- package/dist/_dts/content-editor/src/pageWorkflowContent.d.ts +29 -0
- package/dist/_dts/content-model/src/content-types/schema.d.ts +3 -3
- package/dist/_dts/content-model/src/index.d.ts +1 -0
- package/dist/_dts/content-model/src/routeTemplate.d.ts +4 -0
- package/dist/_dts/content-model/src/templates/editorState.d.ts +25 -0
- package/dist/_dts/core/src/csv-cells.d.ts +10 -0
- package/dist/_dts/core/src/csv-date-filter.d.ts +27 -0
- package/dist/_dts/core/src/csv-escape.d.ts +1 -0
- package/dist/_dts/core/src/csv-filename.d.ts +18 -0
- package/dist/_dts/core/src/csv-render.d.ts +4 -0
- package/dist/_dts/core/src/csv-types.d.ts +116 -0
- package/dist/_dts/core/src/currency-format.d.ts +4 -0
- package/dist/_dts/core/src/demo-capability-policy.d.ts +29 -0
- package/dist/_dts/core/src/demo-claim-access.d.ts +14 -0
- package/dist/_dts/core/src/demo-lifecycle-status.d.ts +11 -0
- package/dist/_dts/core/src/demo-runtime.d.ts +47 -0
- package/dist/_dts/core/src/duration.d.ts +14 -0
- package/dist/_dts/core/src/email-format.d.ts +10 -0
- package/dist/_dts/core/src/field-errors.d.ts +1 -0
- package/dist/_dts/core/src/form-submission-preview.d.ts +24 -0
- package/dist/_dts/core/src/index.d.ts +20 -0
- package/dist/_dts/core/src/number-input.d.ts +22 -0
- package/dist/_dts/core/src/public-url-validation.d.ts +12 -0
- package/dist/_dts/core/src/slug.d.ts +39 -0
- package/dist/_dts/core/src/string.d.ts +19 -0
- package/dist/_dts/core/src/uuid.d.ts +6 -0
- package/dist/_dts/db/src/schemas/forms.d.ts +50 -50
- package/dist/_dts/media-core/src/assetsInUseSummary.d.ts +34 -0
- package/dist/_dts/media-core/src/bulkDeletePlanning.d.ts +24 -0
- package/dist/_dts/media-core/src/canonicalCropReview.d.ts +66 -0
- package/dist/_dts/media-core/src/classifyAllPlanning.d.ts +48 -0
- package/dist/_dts/media-core/src/filename.d.ts +1 -0
- package/dist/_dts/media-core/src/index.d.ts +10 -0
- package/dist/_dts/media-core/src/mediaAssetUsageStatus.d.ts +47 -0
- package/dist/_dts/media-core/src/mediaSettingsState.d.ts +3 -0
- package/dist/_dts/media-core/src/portableMediaReferences.d.ts +38 -0
- package/dist/_dts/media-core/src/uploadVerificationContract.d.ts +28 -0
- package/dist/_dts/media-core/src/videoAssetRepair.d.ts +38 -0
- package/dist/_dts/media-editor/src/mediaEditorDebug.d.ts +1 -0
- package/dist/_dts/path-utils/src/index.d.ts +8 -0
- package/dist/_dts/path-utils/src/redirectPaths.d.ts +26 -0
- package/dist/_dts/path-utils/src/safeAppPath.d.ts +26 -0
- package/dist/_dts/preview-next/src/client/preview/SiteChromeCustomizeButton.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/preview/SiteChromeCustomizeContext.d.ts +4 -0
- package/dist/_dts/preview-next/src/client/preview/previewDocumentFrame.d.ts +31 -0
- package/dist/_dts/sdk/src/client/error.d.ts +3 -0
- package/dist/_dts/sdk/src/client/index.d.ts +2 -2
- package/dist/_dts/sdk/src/client/types.d.ts +37 -19
- package/dist/_dts/sdk/src/index.d.ts +2 -2
- package/dist/_dts/sdk/src/manifest/passes/pass1-fields.d.ts +16 -16
- package/dist/_dts/sdk/src/next/content-load-failure.d.ts +51 -0
- package/dist/_dts/sdk/src/next/index.d.ts +2 -1
- package/dist/_dts/sdk/src/next/types.d.ts +19 -0
- package/dist/_dts/sdk/src/portal/redirects.d.ts +1 -1
- package/dist/_dts/sdk/src/routing/index.d.ts +3 -2
- package/dist/_dts/sdk/src/routing/resolvePageContent.d.ts +71 -6
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/site-commands/src/commands.d.ts +12 -12
- package/dist/_dts/site-commands/src/index.d.ts +1 -0
- package/dist/_dts/site-commands/src/pagePaths.d.ts +6 -0
- package/dist/_dts/theme-core/src/accordions/siteStyleDefaults.d.ts +26 -0
- package/dist/_dts/theme-core/src/accordions/types.d.ts +1 -0
- package/dist/_dts/theme-core/src/blocks/vars/index.d.ts +1 -0
- package/dist/_dts/theme-core/src/fonts/index.d.ts +1 -0
- package/dist/_dts/theme-core/src/fonts/uploadFormat.d.ts +44 -0
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/index.d.ts +3 -1
- package/dist/_dts/theme-core/src/mock-themes/all.d.ts +36 -24
- package/dist/_dts/theme-core/src/navigation/generateNavLinkCSS.d.ts +6 -1
- package/dist/_dts/theme-core/src/navigation/types.d.ts +12 -0
- package/dist/_dts/theme-core/src/palette/variants/types.d.ts +3 -3
- package/dist/_dts/theme-core/src/runtime/themeCssVarNames.d.ts +7 -0
- package/dist/_dts/theme-core/src/schema.d.ts +64 -18
- package/dist/_dts/theme-core/src/site-styles/appearancePresetCatalog.d.ts +214 -34
- package/dist/_dts/theme-core/src/site-styles/appearancePresetTypes.d.ts +5 -2
- package/dist/_dts/theme-core/src/site-styles/blockAppearancePresets.d.ts +214 -34
- package/dist/_dts/theme-core/src/site-styles/curatedSiteStyles.d.ts +24 -0
- package/dist/_dts/theme-core/src/site-styles/designState.d.ts +31 -3
- package/dist/_dts/theme-core/src/site-styles/generatedSchemas.d.ts +4 -4
- package/dist/_dts/theme-core/src/site-styles/headerLooks.d.ts +33 -1
- package/dist/_dts/theme-core/src/site-styles/rawStyleFields.d.ts +4 -2
- package/dist/_dts/theme-core/src/site-styles/runtimeCompiler.d.ts +9 -1
- package/dist/_dts/theme-core/src/site-styles/types.d.ts +27 -2
- package/dist/_dts/theme-core/src/siteChrome.d.ts +17 -34
- package/dist/_dts/theme-core/src/siteChromeOverlayClearance.d.ts +22 -0
- package/dist/_dts/theme-core/src/siteChromePlacement.d.ts +22 -0
- package/dist/_dts/theme-core/src/siteChromePlanning.d.ts +32 -0
- package/dist/_dts/theme-core/src/tokens/themeColorTokens.d.ts +2 -2
- package/dist/{chunk-2SPENC5M.mjs → chunk-F7RTCZYN.mjs} +229 -50
- package/dist/{chunk-IENWFSLO.mjs → chunk-NIDXI46P.mjs} +1 -1
- package/dist/{chunk-KWJPDZH2.mjs → chunk-OECWLDHN.mjs} +2770 -620
- package/dist/{chunk-VX7B5VAC.mjs → chunk-SVMMM2NA.mjs} +8 -0
- package/dist/{chunk-6SMUFTXD.mjs → chunk-SXOLGNMX.mjs} +1 -1
- package/dist/{chunk-ZYEJLCTN.mjs → chunk-TXDES5P2.mjs} +2 -2
- package/dist/cli/index.mjs +1677 -440
- package/dist/client/{accordion-RZMQSYLR.mjs → accordion-EVDEOUPR.mjs} +2 -2
- package/dist/client/{bookingForm-NF4ASVNV.mjs → bookingForm-DIHBLC64.mjs} +27 -30
- package/dist/client/bookings.mjs +3707 -259
- package/dist/client/{carousel-LDX47ZIK.mjs → carousel-FEBQHIWI.mjs} +3 -4
- package/dist/client/{cart-RGXDS5F4.mjs → cart-7CKSXAE4.mjs} +8 -8
- package/dist/client/{checkout-P7WWSNNY.mjs → checkout-WKYCANLV.mjs} +8 -8
- package/dist/client/{chunk-JNC7CGHX.mjs → chunk-2SAVKN2M.mjs} +2 -2
- package/dist/client/{chunk-TQ5MSPDX.mjs → chunk-36WJCERQ.mjs} +1 -1
- package/dist/client/{chunk-R56FQ3RR.mjs → chunk-65F47D7Y.mjs} +280 -71
- package/dist/client/{chunk-L3DNHIJX.mjs → chunk-GUK2FPXQ.mjs} +23 -45
- package/dist/client/{chunk-PMAIXMAB.mjs → chunk-IVNCUVAV.mjs} +26 -21
- package/dist/client/{chunk-II7O4XN3.mjs → chunk-OFMSCGNY.mjs} +2 -2
- package/dist/client/chunk-PD6NBCEY.mjs +66 -0
- package/dist/client/{chunk-GMVTOKYG.mjs → chunk-RV6FX7UH.mjs} +510 -64
- package/dist/client/{chunk-E2TDNXCL.mjs → chunk-RZDWX7QW.mjs} +2 -1
- package/dist/client/{chunk-M3L3KYYR.mjs → chunk-UDNSI5PY.mjs} +12 -0
- package/dist/client/{chunk-JEZECJ3W.mjs → chunk-VPPMNXCF.mjs} +129 -3
- package/dist/client/{chunk-UFSWADAO.mjs → chunk-YDSEG6GZ.mjs} +5 -66
- package/dist/client/client.mjs +7070 -4561
- package/dist/client/{courseRegistration-7F65K5ZR.mjs → courseRegistration-5QF2PHKM.mjs} +14 -11
- package/dist/client/{eventCalendar-GLSC5KTL.mjs → eventCalendar-4ZOSETDU.mjs} +9 -9
- package/dist/client/{eventCombined-ZHK4WKUR.mjs → eventCombined-WQGU7JUX.mjs} +9 -9
- package/dist/client/{eventDetails-E3PJYBIN.mjs → eventDetails-AYWVUJ5Y.mjs} +9 -9
- package/dist/client/{eventListing-EMS3WC3E.mjs → eventListing-NT7C6UT5.mjs} +9 -9
- package/dist/client/{eventRegistration-NZOTVNPI.mjs → eventRegistration-OH24F4ZJ.mjs} +9 -9
- package/dist/client/{form-ETFZFATW.mjs → form-7L42SRBB.mjs} +6 -6
- package/dist/client/{headerSection-4LBP7ULT.mjs → headerSection-OZRZNZ52.mjs} +3 -3
- package/dist/client/hooks.mjs +1040 -278
- package/dist/client/{locationMap-5M655YSJ.mjs → locationMap-ZBXRPQ7C.mjs} +2 -2
- package/dist/client/{newsletterForm-QOUYW44O.mjs → newsletterForm-SNAGFF2I.mjs} +3 -3
- package/dist/client/{productDetail-O4DOCWQG.mjs → productDetail-I46BOFGV.mjs} +8 -8
- package/dist/client/{productList-A5RO5WIS.mjs → productList-BOYHTYI6.mjs} +8 -8
- package/dist/client/rendering/client.mjs +7090 -2645
- package/dist/client/rendering/islands.mjs +19 -19
- package/dist/client/rendering.mjs +6089 -3792
- package/dist/client/{shop-L4MZH4I2.mjs → shop-XTXPZTKR.mjs} +8 -8
- package/dist/preview-next/before-render.mjs +8 -0
- package/dist/preview-next/client/runtime.mjs +5 -5
- package/dist/preview-next/editor-chrome.css +10 -0
- package/dist/preview-next/middleware.mjs +8 -0
- package/dist/{sdk-runtime-6UT2S7KZ.mjs → sdk-runtime-ZJLKC6DR.mjs} +6 -6
- package/dist/server/components.mjs +2635 -1262
- package/dist/server/config-validation.mjs +1271 -509
- package/dist/server/config.mjs +1271 -509
- package/dist/server/data.mjs +1040 -278
- package/dist/server/index.mjs +488 -246
- package/dist/server/next.mjs +4087 -2147
- package/dist/server/page-converter.mjs +571 -115
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +2636 -1263
- package/dist/server/rendering.mjs +2654 -1268
- package/dist/server/routing.mjs +1729 -489
- package/dist/server/server.mjs +1532 -530
- package/dist/server/theme-bridge.mjs +3151 -131
- package/dist/server/theme.mjs +10 -1
- package/dist/styles/index.css +488 -48
- package/package.json +2 -1
- package/dist/SdkPreviewModeRuntime-KLPX47SE.mjs +0 -8
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/DiscountCodeSection.d.ts +0 -7
- package/dist/_dts/preview-next/src/client/widgets/PreviewMediaField.d.ts +0 -4
- package/dist/client/chunk-OJPZEZU2.mjs +0 -31
- package/dist/client/chunk-RTZ3JKKX.mjs +0 -178
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { useOptionalPreviewLayout, PreviewQueryProvider } from './chunk-
|
|
3
|
-
import { PreviewThemeOverlayProvider, PreviewDesignCoordinatorProvider, resolveSiteStyleAccess, usePreviewDesignCoordinator, createOptimisticActionRunner, resolveStyleConfiguratorInitialSnapshot, createStyleConfiguratorState, syncStyleConfiguratorState, buildSiteChromeLookModels, planSiteStylePreviewChange, markApplyFailed, markApplySaved, markApplySaving, previewHeaderStyle, previewFooterLook, cycleSiteChromeLookId, usePreviewThemeOverlay, resolvePreviewDashboardSetupHandoff, buildPreviewDashboardSetupUrl, resolvePreviewSetupBannerModel, planSiteChromeLookSelection, sanitizeDashboardPath } from './chunk-
|
|
4
|
-
import { resolvePreviewChromeSurface, getPreviewSidebarTab, onPreviewSidebarOpenRequest, getPreviewChromeSurfaceDataProps, PREVIEW_CHROME_THEME_CLASS_NAME, setPreviewSidebarTab, PreviewPageDesignEditorStateProvider, usePreviewPageDesignEditorState, PREVIEW_SURFACE_PARAM } from './chunk-
|
|
5
|
-
import { clientComponentRegistry, deriveLaunchReadiness, DEFAULT_LAUNCH_READINESS_INPUT, useEditorUiStore, ResizableSplitPane, BlockApiProvider, EditorProvider, getCuratedSiteStyle, useEditor, createRoutingHelpers, createSnapshotFromPageRecord, EntryControllerProvider, useEntryEditorController, useEditorUiStoreInstance, surfaceResolutionContextFromTheme, asEditorBlockId, EditableBlockProvider, asDesignBlockId, PageRenderer, planSiteDocument, ThemeScope, FixedBottomSurface, Button, unwrapResponse, X, ChevronLeft, ChevronRight, RotateCcw, PreviewRichTextEditor, RichText, PreviewTextEditor, Text, buildThemeRuntime, renderBlock, siteHeaderManifest, siteFooterManifest, SiteDocumentLayout, Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription, DialogFooter, buildEditorModelRuntimeFieldsByBlockId, applyCompiledRuntimeFieldsToContent, assertNever2, getBlockDefinition, systemCustomizeFacetDefinitionsForBlock, systemCustomizeFacetAppliesToLayoutVariant, systemCustomizeFacetCurrentValue, systemCustomizeFacetLabelForValue, systemCustomizeFacetNextValue, assertNever } from './chunk-
|
|
6
|
-
import { API_ENDPOINTS, createBearerAPIClient, isPreviewRuntimeSessionEditable, DEFAULT_SURFACE_ID, initPreviewAuth, usePreviewAuth, usePreviewAuthFetch, markPreviewAuthExpired, usePreviewToken, parseSurfaceId } from './chunk-
|
|
2
|
+
import { useOptionalPreviewLayout, PreviewQueryProvider } from './chunk-SXOLGNMX.mjs';
|
|
3
|
+
import { PreviewThemeOverlayProvider, PreviewDesignCoordinatorProvider, resolveSiteStyleAccess, usePreviewDesignCoordinator, createOptimisticActionRunner, resolveStyleConfiguratorInitialSnapshot, createStyleConfiguratorState, syncStyleConfiguratorState, buildSiteChromeLookModels, planSiteStylePreviewChange, markApplyFailed, markApplySaved, markApplySaving, previewHeaderStyle, previewHeaderLayout, previewFooterLook, cycleSiteChromeLookId, usePreviewThemeOverlay, resolvePreviewDashboardSetupHandoff, buildPreviewDashboardSetupUrl, resolvePreviewSetupBannerModel, planSiteChromeLookSelection, sanitizeDashboardPath } from './chunk-NIDXI46P.mjs';
|
|
4
|
+
import { resolvePreviewChromeSurface, getPreviewSidebarTab, onPreviewSidebarOpenRequest, getPreviewChromeSurfaceDataProps, PREVIEW_CHROME_THEME_CLASS_NAME, setPreviewSidebarTab, PreviewPageDesignEditorStateProvider, usePreviewPageDesignEditorState, PREVIEW_SURFACE_PARAM } from './chunk-TXDES5P2.mjs';
|
|
5
|
+
import { clientComponentRegistry, deriveLaunchReadiness, DEFAULT_LAUNCH_READINESS_INPUT, useEditorUiStore, ResizableSplitPane, BlockApiProvider, EditorProvider, getCuratedSiteStyle, useEditor, createRoutingHelpers, createSnapshotFromPageRecord, EntryControllerProvider, useEntryEditorController, useEditorUiStoreInstance, surfaceResolutionContextFromTheme, asEditorBlockId, EditableBlockProvider, asDesignBlockId, PageRenderer, planSiteDocument, ThemeScope, FixedBottomSurface, Button, unwrapResponse, X, ChevronLeft, ChevronRight, RotateCcw, PreviewRichTextEditor, RichText, PreviewTextEditor, Text, buildThemeRuntime, renderBlock, siteHeaderManifest, siteFooterManifest, SiteDocumentLayout, SITE_CHROME_CLASS_NAMES, Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription, DialogFooter, buildEditorModelRuntimeFieldsByBlockId, applyCompiledRuntimeFieldsToContent, assertNever2, getBlockDefinition, systemCustomizeFacetDefinitionsForBlock, systemCustomizeFacetAppliesToLayoutVariant, systemCustomizeFacetCurrentValue, systemCustomizeFacetLabelForValue, visibleHeaderClearancePx, systemCustomizeFacetNextValue, EDITABLE_SURFACE_FORWARDING_PROP, assertNever, SITE_CHROME_VISIBLE_HEADER_SELECTOR } from './chunk-OECWLDHN.mjs';
|
|
6
|
+
import { API_ENDPOINTS, createBearerAPIClient, isPreviewRuntimeSessionEditable, DEFAULT_SURFACE_ID, initPreviewAuth, usePreviewAuth, usePreviewAuthFetch, markPreviewAuthExpired, usePreviewToken, parseSurfaceId } from './chunk-SVMMM2NA.mjs';
|
|
7
7
|
import React9, { createContext, useMemo, useState, useEffect, useRef, useCallback, useId, useReducer, Children, isValidElement, Fragment as Fragment$1, cloneElement, useContext } from 'react';
|
|
8
8
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
9
9
|
|
|
@@ -436,7 +436,7 @@ function cyclePageDesignBlockLayout(block, direction) {
|
|
|
436
436
|
};
|
|
437
437
|
}
|
|
438
438
|
function cyclePageDesignBlockLook(block, direction) {
|
|
439
|
-
if (block.availableLooks.length
|
|
439
|
+
if (block.availableLooks.length <= 1) return null;
|
|
440
440
|
const lookIds = block.availableLooks.map((look) => look.id);
|
|
441
441
|
const values = [null, ...lookIds];
|
|
442
442
|
const currentIndex = cycleChoiceIndex(block.look, values, direction);
|
|
@@ -629,6 +629,9 @@ function BlockToolbar({
|
|
|
629
629
|
const hasLookControls = Boolean(
|
|
630
630
|
designBlock && designBlock.availableLooks.length > 0
|
|
631
631
|
);
|
|
632
|
+
const canCycleLook = Boolean(
|
|
633
|
+
designBlock && designBlock.availableLooks.length > 1
|
|
634
|
+
);
|
|
632
635
|
const facetControls = useMemo(
|
|
633
636
|
() => previewCustomizeFacetControlsFor(blockKind, content, designBlock),
|
|
634
637
|
[blockKind, content, designBlock]
|
|
@@ -855,6 +858,7 @@ function BlockToolbar({
|
|
|
855
858
|
onClick: cycleLook("prev"),
|
|
856
859
|
className: "grid h-8 w-8 place-items-center hover:bg-muted disabled:cursor-not-allowed disabled:opacity-50",
|
|
857
860
|
"aria-label": "Previous look",
|
|
861
|
+
disabled: !canCycleLook,
|
|
858
862
|
children: /* @__PURE__ */ jsx(ChevronLeft, { size: 14 })
|
|
859
863
|
}
|
|
860
864
|
),
|
|
@@ -865,6 +869,7 @@ function BlockToolbar({
|
|
|
865
869
|
onClick: cycleLook("next"),
|
|
866
870
|
className: "grid h-8 w-8 place-items-center border-l hover:bg-muted disabled:cursor-not-allowed disabled:opacity-50",
|
|
867
871
|
"aria-label": "Next look",
|
|
872
|
+
disabled: !canCycleLook,
|
|
868
873
|
children: /* @__PURE__ */ jsx(ChevronRight, { size: 14 })
|
|
869
874
|
}
|
|
870
875
|
)
|
|
@@ -1354,9 +1359,7 @@ function usePreviewHeaderClearance() {
|
|
|
1354
1359
|
}
|
|
1355
1360
|
const style = window.getComputedStyle(header);
|
|
1356
1361
|
const isOverlayHeader = style.position === "fixed" || style.position === "sticky";
|
|
1357
|
-
setClearance(
|
|
1358
|
-
isOverlayHeader ? Math.ceil(header.getBoundingClientRect().height) : 0
|
|
1359
|
-
);
|
|
1362
|
+
setClearance(isOverlayHeader ? measuredOverlayHeaderClearancePx(header) : 0);
|
|
1360
1363
|
};
|
|
1361
1364
|
update();
|
|
1362
1365
|
const mutationObserver = new MutationObserver(update);
|
|
@@ -1380,6 +1383,22 @@ function findPreviewOverlayHeader() {
|
|
|
1380
1383
|
".block-site-header.rb-fixed, .block-site-header.rb-sticky"
|
|
1381
1384
|
);
|
|
1382
1385
|
}
|
|
1386
|
+
function measuredOverlayHeaderClearancePx(header) {
|
|
1387
|
+
const visibleHeader = findVisibleHeaderMeasurementTarget(header);
|
|
1388
|
+
return visibleHeaderClearancePx(
|
|
1389
|
+
visibleHeader ? visibleHeader.getBoundingClientRect() : header.getBoundingClientRect()
|
|
1390
|
+
);
|
|
1391
|
+
}
|
|
1392
|
+
function findVisibleHeaderMeasurementTarget(header) {
|
|
1393
|
+
const candidates = Array.from(
|
|
1394
|
+
header.querySelectorAll(SITE_CHROME_VISIBLE_HEADER_SELECTOR)
|
|
1395
|
+
);
|
|
1396
|
+
return candidates.find((candidate) => {
|
|
1397
|
+
const style = window.getComputedStyle(candidate);
|
|
1398
|
+
const rect = candidate.getBoundingClientRect();
|
|
1399
|
+
return style.display !== "none" && rect.height > 0 && rect.bottom > 0;
|
|
1400
|
+
}) ?? null;
|
|
1401
|
+
}
|
|
1383
1402
|
function PreviewAuthInit({
|
|
1384
1403
|
children,
|
|
1385
1404
|
session,
|
|
@@ -2390,8 +2409,17 @@ function SiteChromeCustomizeProvider({
|
|
|
2390
2409
|
(surface) => {
|
|
2391
2410
|
if (!state || !lookModels) return { kind: "unavailable" };
|
|
2392
2411
|
if (surface === "header") {
|
|
2412
|
+
const currentLayoutId = state.previewed.headerLayoutId;
|
|
2413
|
+
const selectedLayout = lookModels.headerLayout.options.find(
|
|
2414
|
+
(option) => option.id === currentLayoutId
|
|
2415
|
+
);
|
|
2416
|
+
const renderedLayout = lookModels.headerLayout.options.find(
|
|
2417
|
+
(option) => option.id === lookModels.headerLayout.renderedLayoutId
|
|
2418
|
+
);
|
|
2393
2419
|
const currentId2 = state.previewed.headerStyleId;
|
|
2394
|
-
const selected2 = lookModels.headerStyle.options.find(
|
|
2420
|
+
const selected2 = lookModels.headerStyle.options.find(
|
|
2421
|
+
(option) => option.id === currentId2
|
|
2422
|
+
);
|
|
2395
2423
|
const rendered2 = lookModels.headerStyle.options.find(
|
|
2396
2424
|
(option) => option.id === lookModels.headerStyle.renderedStyleId
|
|
2397
2425
|
);
|
|
@@ -2399,6 +2427,9 @@ function SiteChromeCustomizeProvider({
|
|
|
2399
2427
|
kind: "available",
|
|
2400
2428
|
surface: "header",
|
|
2401
2429
|
label: "Header",
|
|
2430
|
+
currentLayoutId,
|
|
2431
|
+
currentLayoutLabel: selectedLayout?.label ?? (renderedLayout ? `${renderedLayout.label} (default)` : "Unknown Layout"),
|
|
2432
|
+
layoutOptions: lookModels.headerLayout.options,
|
|
2402
2433
|
currentId: currentId2,
|
|
2403
2434
|
currentLabel: selected2?.label ?? (rendered2 ? `${rendered2.label} (default)` : "Unknown Look"),
|
|
2404
2435
|
options: lookModels.headerStyle.options,
|
|
@@ -2528,6 +2559,16 @@ function SiteChromeCustomizeProvider({
|
|
|
2528
2559
|
},
|
|
2529
2560
|
[applyAllowed, persistSelection]
|
|
2530
2561
|
);
|
|
2562
|
+
const selectHeaderLayout = useCallback(
|
|
2563
|
+
(layoutId) => {
|
|
2564
|
+
if (!applyAllowed) return;
|
|
2565
|
+
const current = stateRef.current;
|
|
2566
|
+
if (!current) return;
|
|
2567
|
+
const nextState = previewHeaderLayout(current, layoutId);
|
|
2568
|
+
persistSelection("header", nextState.previewed);
|
|
2569
|
+
},
|
|
2570
|
+
[applyAllowed, persistSelection]
|
|
2571
|
+
);
|
|
2531
2572
|
const selectFooterLook = useCallback(
|
|
2532
2573
|
(lookId) => {
|
|
2533
2574
|
if (!applyAllowed) return;
|
|
@@ -2560,12 +2601,28 @@ function SiteChromeCustomizeProvider({
|
|
|
2560
2601
|
},
|
|
2561
2602
|
[getSurfaceState, selectFooterLook, selectHeaderStyle]
|
|
2562
2603
|
);
|
|
2604
|
+
const cycleSurfaceLayout = useCallback(
|
|
2605
|
+
(surface, direction) => {
|
|
2606
|
+
const currentState = getSurfaceState(surface);
|
|
2607
|
+
if (currentState.kind !== "available" || currentState.surface !== "header") {
|
|
2608
|
+
return;
|
|
2609
|
+
}
|
|
2610
|
+
const next = cycleSiteChromeLookId(
|
|
2611
|
+
currentState.layoutOptions,
|
|
2612
|
+
currentState.currentLayoutId,
|
|
2613
|
+
direction
|
|
2614
|
+
);
|
|
2615
|
+
if (next !== void 0 && next !== null) selectHeaderLayout(next);
|
|
2616
|
+
},
|
|
2617
|
+
[getSurfaceState, selectHeaderLayout]
|
|
2618
|
+
);
|
|
2563
2619
|
const value = useMemo(
|
|
2564
2620
|
() => ({
|
|
2565
2621
|
getSurfaceState,
|
|
2566
|
-
cycleSurfaceLook
|
|
2622
|
+
cycleSurfaceLook,
|
|
2623
|
+
cycleSurfaceLayout
|
|
2567
2624
|
}),
|
|
2568
|
-
[cycleSurfaceLook, getSurfaceState]
|
|
2625
|
+
[cycleSurfaceLayout, cycleSurfaceLook, getSurfaceState]
|
|
2569
2626
|
);
|
|
2570
2627
|
return /* @__PURE__ */ jsx(SiteChromeCustomizeContext.Provider, { value, children });
|
|
2571
2628
|
}
|
|
@@ -2579,9 +2636,9 @@ function useSiteChromeCustomizeOptional() {
|
|
|
2579
2636
|
}
|
|
2580
2637
|
|
|
2581
2638
|
// ../blocks/src/client/site-chrome.tsx
|
|
2582
|
-
function renderSiteChromeBlock(model, surface, theme) {
|
|
2639
|
+
function renderSiteChromeBlock(model, surface, theme, options = {}) {
|
|
2583
2640
|
const spec = model[surface];
|
|
2584
|
-
const themeConfig = applyThemeConfigOverride(theme, spec.themeConfigOverride);
|
|
2641
|
+
const themeConfig = options.themeConfigOverrideMode === "ignore" ? theme : applyThemeConfigOverride(theme, spec.themeConfigOverride);
|
|
2585
2642
|
const themeRuntime = buildThemeRuntime(themeConfig);
|
|
2586
2643
|
const manifest = surface === "header" ? siteHeaderManifest : siteFooterManifest;
|
|
2587
2644
|
return renderBlock(manifest, spec.content, {
|
|
@@ -2606,7 +2663,8 @@ function mergeDefinedObject(base, override) {
|
|
|
2606
2663
|
]);
|
|
2607
2664
|
}
|
|
2608
2665
|
function SiteChromeCustomizeButton({
|
|
2609
|
-
surface
|
|
2666
|
+
surface,
|
|
2667
|
+
containerClassName = "pointer-events-auto absolute right-2 top-2 z-50 opacity-0 transition group-focus-within/site-chrome:opacity-100 group-hover/site-chrome:opacity-100"
|
|
2610
2668
|
}) {
|
|
2611
2669
|
const customize = useSiteChromeCustomizeOptional();
|
|
2612
2670
|
const customizePanelId = useId();
|
|
@@ -2633,6 +2691,12 @@ function SiteChromeCustomizeButton({
|
|
|
2633
2691
|
if (surfaceState.kind !== "available") return 0;
|
|
2634
2692
|
return surfaceState.options.filter((option) => option.available).length;
|
|
2635
2693
|
}, [surfaceState]);
|
|
2694
|
+
const cycleableLayoutOptionCount = useMemo(() => {
|
|
2695
|
+
if (surfaceState.kind !== "available" || surfaceState.surface !== "header") {
|
|
2696
|
+
return 0;
|
|
2697
|
+
}
|
|
2698
|
+
return surfaceState.layoutOptions.filter((option) => option.available).length;
|
|
2699
|
+
}, [surfaceState]);
|
|
2636
2700
|
const toggleCustomize = (event) => {
|
|
2637
2701
|
event.preventDefault();
|
|
2638
2702
|
event.stopPropagation();
|
|
@@ -2643,7 +2707,7 @@ function SiteChromeCustomizeButton({
|
|
|
2643
2707
|
}
|
|
2644
2708
|
setCustomizeOpen((open) => !open);
|
|
2645
2709
|
};
|
|
2646
|
-
return /* @__PURE__ */ jsxs("div", { className:
|
|
2710
|
+
return /* @__PURE__ */ jsxs("div", { className: containerClassName, children: [
|
|
2647
2711
|
/* @__PURE__ */ jsx(
|
|
2648
2712
|
"button",
|
|
2649
2713
|
{
|
|
@@ -2700,6 +2764,44 @@ function SiteChromeCustomizeButton({
|
|
|
2700
2764
|
)
|
|
2701
2765
|
] }),
|
|
2702
2766
|
/* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
|
|
2767
|
+
surfaceState.surface === "header" ? /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-2", children: [
|
|
2768
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
2769
|
+
/* @__PURE__ */ jsx("div", { className: "text-sm font-medium", children: "Layout" }),
|
|
2770
|
+
/* @__PURE__ */ jsx("div", { className: "text-xs text-muted-foreground", children: surfaceState.currentLayoutLabel })
|
|
2771
|
+
] }),
|
|
2772
|
+
/* @__PURE__ */ jsxs("div", { className: "flex shrink-0 items-center overflow-hidden rounded-full border bg-background", children: [
|
|
2773
|
+
/* @__PURE__ */ jsx(
|
|
2774
|
+
"button",
|
|
2775
|
+
{
|
|
2776
|
+
type: "button",
|
|
2777
|
+
onClick: (event) => {
|
|
2778
|
+
event.preventDefault();
|
|
2779
|
+
event.stopPropagation();
|
|
2780
|
+
customize?.cycleSurfaceLayout(surface, "prev");
|
|
2781
|
+
},
|
|
2782
|
+
className: "grid h-8 w-8 place-items-center hover:bg-muted disabled:cursor-not-allowed disabled:opacity-50",
|
|
2783
|
+
"aria-label": `Previous ${surface} Layout`,
|
|
2784
|
+
disabled: surfaceState.saving || !surfaceState.applyAllowed || cycleableLayoutOptionCount <= 1,
|
|
2785
|
+
children: /* @__PURE__ */ jsx(ChevronLeft, { size: 14 })
|
|
2786
|
+
}
|
|
2787
|
+
),
|
|
2788
|
+
/* @__PURE__ */ jsx(
|
|
2789
|
+
"button",
|
|
2790
|
+
{
|
|
2791
|
+
type: "button",
|
|
2792
|
+
onClick: (event) => {
|
|
2793
|
+
event.preventDefault();
|
|
2794
|
+
event.stopPropagation();
|
|
2795
|
+
customize?.cycleSurfaceLayout(surface, "next");
|
|
2796
|
+
},
|
|
2797
|
+
className: "grid h-8 w-8 place-items-center border-l hover:bg-muted disabled:cursor-not-allowed disabled:opacity-50",
|
|
2798
|
+
"aria-label": `Next ${surface} Layout`,
|
|
2799
|
+
disabled: surfaceState.saving || !surfaceState.applyAllowed || cycleableLayoutOptionCount <= 1,
|
|
2800
|
+
children: /* @__PURE__ */ jsx(ChevronRight, { size: 14 })
|
|
2801
|
+
}
|
|
2802
|
+
)
|
|
2803
|
+
] })
|
|
2804
|
+
] }) : null,
|
|
2703
2805
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-2", children: [
|
|
2704
2806
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
2705
2807
|
/* @__PURE__ */ jsx("div", { className: "text-sm font-medium", children: "Look" }),
|
|
@@ -2755,35 +2857,116 @@ function SiteChromeEditableSurface({
|
|
|
2755
2857
|
return renderEditableSurface(
|
|
2756
2858
|
children,
|
|
2757
2859
|
surface,
|
|
2758
|
-
/* @__PURE__ */ jsx(SiteChromeCustomizeButton, { surface }),
|
|
2759
2860
|
{ preserveSingleComponentRoot }
|
|
2760
2861
|
);
|
|
2761
2862
|
}
|
|
2762
|
-
function renderEditableSurface(children, surface,
|
|
2863
|
+
function renderEditableSurface(children, surface, options) {
|
|
2763
2864
|
const childArray = Children.toArray(children);
|
|
2764
2865
|
const child = childArray.length === 1 ? childArray[0] : null;
|
|
2765
|
-
if (isValidElement(child) && child.type !== Fragment$1 && (isHostElement(child) || options.preserveSingleComponentRoot)) {
|
|
2866
|
+
if (isValidElement(child) && child.type !== Fragment$1 && (isHostElement(child) || options.preserveSingleComponentRoot || isEditableSurfaceForwardingElement(child))) {
|
|
2766
2867
|
return cloneElement(child, {
|
|
2767
2868
|
className: joinClassNames(child.props.className, "group/site-chrome relative"),
|
|
2768
2869
|
"data-preview-site-chrome-surface": surface,
|
|
2769
2870
|
children: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2770
2871
|
child.props.children,
|
|
2771
|
-
|
|
2872
|
+
/* @__PURE__ */ jsx(SiteChromeCustomizeButton, { surface })
|
|
2772
2873
|
] })
|
|
2773
2874
|
});
|
|
2774
2875
|
}
|
|
2876
|
+
if (surface === "header") {
|
|
2877
|
+
return /* @__PURE__ */ jsxs(
|
|
2878
|
+
"div",
|
|
2879
|
+
{
|
|
2880
|
+
className: "group/site-chrome",
|
|
2881
|
+
"data-preview-site-chrome-surface": surface,
|
|
2882
|
+
style: { display: "contents" },
|
|
2883
|
+
children: [
|
|
2884
|
+
children,
|
|
2885
|
+
/* @__PURE__ */ jsx(
|
|
2886
|
+
SiteChromeCustomizeButton,
|
|
2887
|
+
{
|
|
2888
|
+
surface,
|
|
2889
|
+
containerClassName: "pointer-events-auto fixed right-4 top-4 z-[70] opacity-0 transition group-focus-within/site-chrome:opacity-100 group-hover/site-chrome:opacity-100"
|
|
2890
|
+
}
|
|
2891
|
+
)
|
|
2892
|
+
]
|
|
2893
|
+
}
|
|
2894
|
+
);
|
|
2895
|
+
}
|
|
2775
2896
|
return /* @__PURE__ */ jsxs("div", { className: "group/site-chrome relative", "data-preview-site-chrome-surface": surface, children: [
|
|
2776
2897
|
children,
|
|
2777
|
-
|
|
2898
|
+
/* @__PURE__ */ jsx(SiteChromeCustomizeButton, { surface })
|
|
2778
2899
|
] });
|
|
2779
2900
|
}
|
|
2780
2901
|
function isHostElement(child) {
|
|
2781
2902
|
return typeof child.type === "string";
|
|
2782
2903
|
}
|
|
2904
|
+
function isEditableSurfaceForwardingElement(child) {
|
|
2905
|
+
return typeof child.type !== "string" && child.type !== Fragment$1 && child.type[EDITABLE_SURFACE_FORWARDING_PROP] === true;
|
|
2906
|
+
}
|
|
2783
2907
|
function joinClassNames(...values) {
|
|
2784
2908
|
const className = values.filter(Boolean).join(" ");
|
|
2785
2909
|
return className.length > 0 ? className : void 0;
|
|
2786
2910
|
}
|
|
2911
|
+
|
|
2912
|
+
// ../preview-next/src/client/preview/previewDocumentFrame.ts
|
|
2913
|
+
var PREVIEW_DOCUMENT_FRAME_CLASS_NAME = "builder-preview-document-frame";
|
|
2914
|
+
function planPreviewDocumentFrame(input) {
|
|
2915
|
+
switch (input.viewportMode) {
|
|
2916
|
+
case "squeeze":
|
|
2917
|
+
return {
|
|
2918
|
+
kind: "squeeze",
|
|
2919
|
+
frameClassName: PREVIEW_DOCUMENT_FRAME_CLASS_NAME,
|
|
2920
|
+
frameDataProps: {
|
|
2921
|
+
"data-builder-preview-document-frame": "squeeze",
|
|
2922
|
+
"data-builder-preview-document-scale": "none"
|
|
2923
|
+
}
|
|
2924
|
+
};
|
|
2925
|
+
case "fixed":
|
|
2926
|
+
return planFixedPreviewDocumentFrame(input);
|
|
2927
|
+
default:
|
|
2928
|
+
return assertNever3(input.viewportMode);
|
|
2929
|
+
}
|
|
2930
|
+
}
|
|
2931
|
+
function planFixedPreviewDocumentFrame(input) {
|
|
2932
|
+
const scale = normalizePreviewScale(input.scale);
|
|
2933
|
+
const targetWidthPx = input.viewportWidth === "full" ? 1440 : input.viewportWidth;
|
|
2934
|
+
const scaledWidth = targetWidthPx * scale;
|
|
2935
|
+
const scaledHeight = input.contentHeight > 0 ? input.contentHeight * scale : null;
|
|
2936
|
+
const wrapperStyle = {
|
|
2937
|
+
width: `${scaledWidth}px`,
|
|
2938
|
+
margin: "0 auto"
|
|
2939
|
+
};
|
|
2940
|
+
if (scaledHeight !== null) {
|
|
2941
|
+
wrapperStyle.height = `${scaledHeight}px`;
|
|
2942
|
+
} else {
|
|
2943
|
+
wrapperStyle.minHeight = "100%";
|
|
2944
|
+
}
|
|
2945
|
+
return {
|
|
2946
|
+
kind: "fixed",
|
|
2947
|
+
targetWidthPx,
|
|
2948
|
+
wrapperStyle,
|
|
2949
|
+
contentStyle: {
|
|
2950
|
+
minHeight: "100%",
|
|
2951
|
+
width: `${targetWidthPx}px`,
|
|
2952
|
+
...scale === 1 ? {} : { zoom: scale }
|
|
2953
|
+
},
|
|
2954
|
+
siteDocumentStyle: { width: `${targetWidthPx}px` },
|
|
2955
|
+
frameClassName: PREVIEW_DOCUMENT_FRAME_CLASS_NAME,
|
|
2956
|
+
frameDataProps: {
|
|
2957
|
+
"data-builder-preview-document-frame": "fixed",
|
|
2958
|
+
"data-builder-preview-document-scale": scale === 1 ? "none" : "scaled",
|
|
2959
|
+
"data-builder-preview-fixed-header-behavior": "fixed-as-sticky"
|
|
2960
|
+
}
|
|
2961
|
+
};
|
|
2962
|
+
}
|
|
2963
|
+
function normalizePreviewScale(scale) {
|
|
2964
|
+
if (!Number.isFinite(scale) || scale <= 0) return 1;
|
|
2965
|
+
return scale;
|
|
2966
|
+
}
|
|
2967
|
+
function assertNever3(value) {
|
|
2968
|
+
throw new Error(`Unhandled preview viewport mode: ${String(value)}`);
|
|
2969
|
+
}
|
|
2787
2970
|
function PreviewThemedSiteDocument({
|
|
2788
2971
|
children,
|
|
2789
2972
|
useThemeScope,
|
|
@@ -2805,9 +2988,13 @@ function PreviewThemedSiteDocument({
|
|
|
2805
2988
|
headerVariant: effectiveTheme.header?.variant ?? null,
|
|
2806
2989
|
hasVisibleBanner: Boolean(bannerNode)
|
|
2807
2990
|
});
|
|
2808
|
-
const headerNode = siteChromeRenderModel ? /* @__PURE__ */ jsx(SiteChromeEditableSurface, { surface: "header", children: renderSiteChromeBlock(siteChromeRenderModel, "header", effectiveTheme
|
|
2991
|
+
const headerNode = siteChromeRenderModel ? /* @__PURE__ */ jsx(SiteChromeEditableSurface, { surface: "header", children: renderSiteChromeBlock(siteChromeRenderModel, "header", effectiveTheme, {
|
|
2992
|
+
themeConfigOverrideMode: "ignore"
|
|
2993
|
+
}) }) : staticHeaderNode;
|
|
2809
2994
|
const canRenderFooterReactively = Boolean(siteChromeRenderModel) && siteChromeRenderModel?.footer.canRenderReactively !== false;
|
|
2810
|
-
const footerNode = canRenderFooterReactively && siteChromeRenderModel ? /* @__PURE__ */ jsx(SiteChromeEditableSurface, { surface: "footer", preserveSingleComponentRoot: true, children: renderSiteChromeBlock(siteChromeRenderModel, "footer", effectiveTheme
|
|
2995
|
+
const footerNode = canRenderFooterReactively && siteChromeRenderModel ? /* @__PURE__ */ jsx(SiteChromeEditableSurface, { surface: "footer", preserveSingleComponentRoot: true, children: renderSiteChromeBlock(siteChromeRenderModel, "footer", effectiveTheme, {
|
|
2996
|
+
themeConfigOverrideMode: "ignore"
|
|
2997
|
+
}) }) : staticFooterNode;
|
|
2811
2998
|
const documentNode = renderPreviewDocument({
|
|
2812
2999
|
viewportMode,
|
|
2813
3000
|
viewportWidth,
|
|
@@ -2829,7 +3016,7 @@ function PreviewThemedSiteDocument({
|
|
|
2829
3016
|
{
|
|
2830
3017
|
theme: effectiveTheme,
|
|
2831
3018
|
responsiveMode: useContainerResponsiveMode ? "container" : "viewport",
|
|
2832
|
-
className: "flex flex-1 flex-col",
|
|
3019
|
+
className: "rb-flex rb-flex-1 rb-flex-col",
|
|
2833
3020
|
children: documentNode
|
|
2834
3021
|
}
|
|
2835
3022
|
);
|
|
@@ -2847,7 +3034,14 @@ function renderPreviewDocument({
|
|
|
2847
3034
|
footerNode,
|
|
2848
3035
|
children
|
|
2849
3036
|
}) {
|
|
3037
|
+
const framePlan = planPreviewDocumentFrame({
|
|
3038
|
+
viewportMode,
|
|
3039
|
+
viewportWidth,
|
|
3040
|
+
scale,
|
|
3041
|
+
contentHeight
|
|
3042
|
+
});
|
|
2850
3043
|
if (viewportMode === "squeeze") {
|
|
3044
|
+
if (framePlan.kind !== "squeeze") return null;
|
|
2851
3045
|
return /* @__PURE__ */ jsx(
|
|
2852
3046
|
SiteDocumentLayout,
|
|
2853
3047
|
{
|
|
@@ -2858,35 +3052,20 @@ function renderPreviewDocument({
|
|
|
2858
3052
|
bannerNode,
|
|
2859
3053
|
footerNode,
|
|
2860
3054
|
minHeightClassName: null,
|
|
2861
|
-
className:
|
|
3055
|
+
className: `${framePlan.frameClassName} rb-flex-1 rb-preview-editor-offset`,
|
|
2862
3056
|
children
|
|
2863
3057
|
}
|
|
2864
3058
|
);
|
|
2865
3059
|
}
|
|
2866
3060
|
if (viewportMode === "fixed") {
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
const scaledHeight = contentHeight > 0 ? contentHeight * scale : 0;
|
|
2870
|
-
const wrapperStyle = {
|
|
2871
|
-
width: `${scaledWidth}px`,
|
|
2872
|
-
margin: "0 auto"
|
|
2873
|
-
};
|
|
2874
|
-
if (scaledHeight > 0) {
|
|
2875
|
-
wrapperStyle.height = `${scaledHeight}px`;
|
|
2876
|
-
} else {
|
|
2877
|
-
wrapperStyle.minHeight = "100%";
|
|
2878
|
-
}
|
|
2879
|
-
return /* @__PURE__ */ jsx("div", { ref: scaleContainerRef, className: "h-full overflow-auto", children: /* @__PURE__ */ jsx("div", { style: wrapperStyle, children: /* @__PURE__ */ jsx(
|
|
3061
|
+
if (framePlan.kind !== "fixed") return null;
|
|
3062
|
+
return /* @__PURE__ */ jsx("div", { ref: scaleContainerRef, className: "h-full overflow-auto", children: /* @__PURE__ */ jsx("div", { style: framePlan.wrapperStyle, children: /* @__PURE__ */ jsx(
|
|
2880
3063
|
"div",
|
|
2881
3064
|
{
|
|
2882
3065
|
ref: contentRef,
|
|
2883
|
-
className:
|
|
2884
|
-
style:
|
|
2885
|
-
|
|
2886
|
-
width: `${targetWidthPx}px`,
|
|
2887
|
-
transform: `scale(${scale})`,
|
|
2888
|
-
transformOrigin: "top left"
|
|
2889
|
-
},
|
|
3066
|
+
className: `${framePlan.frameClassName} border-x shadow-sm`,
|
|
3067
|
+
style: framePlan.contentStyle,
|
|
3068
|
+
...framePlan.frameDataProps,
|
|
2890
3069
|
children: /* @__PURE__ */ jsx(
|
|
2891
3070
|
SiteDocumentLayout,
|
|
2892
3071
|
{
|
|
@@ -2896,9 +3075,9 @@ function renderPreviewDocument({
|
|
|
2896
3075
|
headerNode,
|
|
2897
3076
|
bannerNode,
|
|
2898
3077
|
footerNode,
|
|
2899
|
-
minHeightClassName:
|
|
2900
|
-
className: "
|
|
2901
|
-
style:
|
|
3078
|
+
minHeightClassName: SITE_CHROME_CLASS_NAMES.fullMinHeight,
|
|
3079
|
+
className: "rb-preview-editor-offset",
|
|
3080
|
+
style: framePlan.siteDocumentStyle,
|
|
2902
3081
|
children
|
|
2903
3082
|
}
|
|
2904
3083
|
)
|
|
@@ -2909,11 +3088,11 @@ function renderPreviewDocument({
|
|
|
2909
3088
|
}
|
|
2910
3089
|
var previewContainerResponsiveEnabled = process.env.NEXT_PUBLIC_ENABLE_PREVIEW_CONTAINER_RESPONSIVE !== "false";
|
|
2911
3090
|
var PreviewEditorSidebar = React9.lazy(async () => {
|
|
2912
|
-
const mod = await import('./PreviewEditorSidebar-
|
|
3091
|
+
const mod = await import('./PreviewEditorSidebar-RIKFQ72L.mjs');
|
|
2913
3092
|
return { default: mod.PreviewEditorSidebar };
|
|
2914
3093
|
});
|
|
2915
3094
|
var PreviewEditorUI = React9.lazy(async () => {
|
|
2916
|
-
const mod = await import('./PreviewEditorUI-
|
|
3095
|
+
const mod = await import('./PreviewEditorUI-XO7TUWKK.mjs');
|
|
2917
3096
|
return { default: mod.PreviewEditorUI };
|
|
2918
3097
|
});
|
|
2919
3098
|
var previewPaneContainmentStyle = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { assertNever2, deriveNearestCompatibleHeaderStyle, findLegacyHeaderLookIdForSelection, compileSiteThemeFromSelections, footerLookCatalog, getOrderedHeaderStyleIdsForLayout, getOrderedHeaderLayoutIdsForCuration, footerLookRejectionReasonLabel, getHeaderStyle, getHeaderLayout, writePlanForLookCustomizationCommand, siteStyleIdFromTheme, getCuratedSiteStyle } from './chunk-
|
|
2
|
+
import { assertNever2, deriveNearestCompatibleHeaderStyle, findLegacyHeaderLookIdForSelection, compileSiteThemeFromSelections, footerLookCatalog, getOrderedHeaderStyleIdsForLayout, getOrderedHeaderLayoutIdsForCuration, footerLookRejectionReasonLabel, getHeaderStyle, getHeaderLayout, writePlanForLookCustomizationCommand, siteStyleIdFromTheme, getCuratedSiteStyle } from './chunk-OECWLDHN.mjs';
|
|
3
3
|
import { createContext, useState, useCallback, useMemo, useContext, useRef, useEffect } from 'react';
|
|
4
4
|
import { jsx } from 'react/jsx-runtime';
|
|
5
5
|
|