@riverbankcms/sdk 0.77.1 → 0.78.2
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 +114 -43
- package/dist/{PreviewEditorSidebar-DVUG7GK4.mjs → PreviewEditorSidebar-4DXLYX2V.mjs} +4962 -4885
- package/dist/{PreviewEditorUI-P7RN4CDS.mjs → PreviewEditorUI-CS5P4N3P.mjs} +4 -4
- package/dist/SdkPreviewModeRuntime-IJDHTW4W.mjs +8 -0
- package/dist/_dts/ai/src/contracts/proposals.d.ts +190 -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/contentRuntime.d.ts +1 -0
- package/dist/_dts/api/src/demoDashboardMutationSurfaces.d.ts +46 -0
- package/dist/_dts/api/src/endpoints.d.ts +17 -0
- package/dist/_dts/api/src/index.d.ts +16 -4
- 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/public/types.d.ts +1 -1
- package/dist/_dts/api/src/publicExperienceEndpoints.d.ts +55 -26
- package/dist/_dts/api/src/request.d.ts +3 -11
- package/dist/_dts/api/src/sdkConfig/contracts.d.ts +1 -0
- package/dist/_dts/api/src/sdkContracts.d.ts +7 -1
- package/dist/_dts/api/src/siteManagementEndpoints.d.ts +10 -0
- package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +1 -0
- package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +15 -19
- package/dist/_dts/api/src/staffAccess.d.ts +79 -0
- package/dist/_dts/api/src/types.d.ts +14 -27
- package/dist/_dts/api/src/workflows/automaticWorkflowTriggers.d.ts +21 -0
- package/dist/_dts/block-form/src/fields/types.d.ts +6 -0
- package/dist/_dts/block-form/src/widgets/RepeaterField/components/RepeaterList.d.ts +3 -2
- package/dist/_dts/block-form/src/widgets/RepeaterField/components/RepeaterRow.d.ts +6 -3
- package/dist/_dts/block-form/src/widgets/RepeaterField/components/RepeaterRowActions.d.ts +8 -3
- package/dist/_dts/block-form/src/widgets/RepeaterField/hooks/index.d.ts +1 -1
- package/dist/_dts/block-form/src/widgets/RepeaterField/hooks/useLinearRepeaterDnd.d.ts +1 -0
- package/dist/_dts/block-form/src/widgets/RepeaterField/hooks/useRepeaterPointerDragCapability.d.ts +1 -0
- package/dist/_dts/block-form/src/widgets/RepeaterField/hooks/useResolvedItemLabel.d.ts +7 -0
- package/dist/_dts/block-form/src/widgets/RepeaterField/utils/buildSummary.d.ts +1 -0
- package/dist/_dts/block-form/src/widgets/RepeaterField/utils/index.d.ts +3 -1
- package/dist/_dts/block-form/src/widgets/RepeaterField/utils/repeaterDndDomain.d.ts +1 -1
- package/dist/_dts/block-form/src/widgets/RepeaterField/utils/repeaterLabelSource.d.ts +15 -0
- package/dist/_dts/block-form/src/widgets/RepeaterField/utils/repeaterRowActionsDomain.d.ts +50 -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 +879 -288
- package/dist/_dts/blocks/src/system/blocks/blog-listing.d.ts +879 -288
- package/dist/_dts/blocks/src/system/blocks/cart.d.ts +879 -288
- package/dist/_dts/blocks/src/system/blocks/checkout.d.ts +879 -288
- package/dist/_dts/blocks/src/system/blocks/collection.d.ts +879 -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 +885 -289
- package/dist/_dts/blocks/src/system/blocks/gifting.d.ts +879 -288
- package/dist/_dts/blocks/src/system/blocks/location-map.d.ts +3 -1
- package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +68 -21
- package/dist/_dts/blocks/src/system/blocks/product-detail.d.ts +879 -288
- package/dist/_dts/blocks/src/system/blocks/product-list.d.ts +879 -288
- package/dist/_dts/blocks/src/system/blocks/shop.d.ts +879 -288
- package/dist/_dts/blocks/src/system/blocks/team-members.d.ts +3 -0
- 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 +193 -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/hooks/useHeadlessBookingFlow.state.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.headless.state.d.ts +1 -1
- 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 +6 -1
- package/dist/_dts/content-editor/src/pageWorkflowContent.d.ts +29 -0
- package/dist/_dts/content-editor/src/ui/editorSnapshot.d.ts +2 -2
- package/dist/_dts/content-model/src/content-types/schema.d.ts +17 -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/bindingTypeCompatibility.d.ts +3 -1
- package/dist/_dts/content-model/src/templates/bindingValidation.d.ts +10 -4
- package/dist/_dts/content-model/src/templates/editorState.d.ts +25 -0
- package/dist/_dts/content-model/src/templates/fieldPaths.d.ts +20 -0
- package/dist/_dts/content-model/src/templates/manifestAdapter.d.ts +5 -2
- package/dist/_dts/core/src/branded.d.ts +108 -85
- 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/editor-state.d.ts +7 -7
- 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/participants.d.ts +2 -2
- 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/generated/supabase/database.types.d.ts +11 -0
- package/dist/_dts/db/src/schemas/forms.d.ts +50 -50
- package/dist/_dts/editor-blocks/src/blockPayload.d.ts +1 -1
- 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/MediaEditor.d.ts +3 -1
- package/dist/_dts/media-editor/src/MediaPreview.d.ts +3 -1
- package/dist/_dts/media-editor/src/fieldUi.d.ts +5 -0
- package/dist/_dts/media-editor/src/index.d.ts +1 -1
- 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/cli/commands/push/consts.d.ts +1 -1
- package/dist/_dts/sdk/src/cli/commands/push/metadata.d.ts +2 -0
- package/dist/_dts/sdk/src/cli/commands/push/stale.d.ts +3 -3
- package/dist/_dts/sdk/src/cli/commands/push-execute.d.ts +7 -0
- package/dist/_dts/sdk/src/cli/commands/push.d.ts +2 -0
- package/dist/_dts/sdk/src/cli/content/reader.d.ts +13 -0
- package/dist/_dts/sdk/src/cli/content/writer.d.ts +2 -1
- package/dist/_dts/sdk/src/cli/helpers.d.ts +2 -0
- package/dist/_dts/sdk/src/cli/site-commands/commandKeys.d.ts +6 -6
- package/dist/_dts/sdk/src/cli/site-commands/commandRuntime.d.ts +5 -0
- package/dist/_dts/sdk/src/cli/site-commands/commandSurfaceDispatch.d.ts +4 -0
- package/dist/_dts/sdk/src/cli/site-commands/pageCommands.d.ts +5 -2
- package/dist/_dts/sdk/src/cli/site-commands/pushExecution.d.ts +10 -1
- package/dist/_dts/sdk/src/cli/site-commands/pushExecutionTypes.d.ts +1 -1
- 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/management/types.d.ts +6 -0
- package/dist/_dts/sdk/src/client/types.d.ts +39 -21
- package/dist/_dts/sdk/src/config/content-types.d.ts +7 -0
- package/dist/_dts/sdk/src/config/field-definitions.d.ts +2 -0
- 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 +15 -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/{altcha-B5XGSXP5.mjs → altcha-EKUEQ4RP.mjs} +1 -1
- package/dist/{chunk-IENWFSLO.mjs → chunk-4QEGTLK6.mjs} +1 -1
- package/dist/{chunk-ZYEJLCTN.mjs → chunk-6HYXHRAI.mjs} +5 -5
- package/dist/{chunk-VX7B5VAC.mjs → chunk-CR5HKAGU.mjs} +32 -5
- package/dist/{chunk-KWJPDZH2.mjs → chunk-MCRQMPET.mjs} +3793 -1201
- package/dist/{chunk-6SMUFTXD.mjs → chunk-OKMBEAXY.mjs} +1 -1
- package/dist/{chunk-XGB3TDIC.mjs → chunk-R7POPVJR.mjs} +2 -8
- package/dist/{chunk-2SPENC5M.mjs → chunk-RGTOD4AJ.mjs} +242 -57
- package/dist/cli/index.mjs +2361 -668
- package/dist/cli/init-docs/content/cli-reference.md +3 -2
- package/dist/cli/init-docs/content/content-management.md +2 -2
- package/dist/cli/init-docs/content/workflow-preview-mode.md +68 -2
- package/dist/client/{accordion-RZMQSYLR.mjs → accordion-PLYNJIIM.mjs} +2 -2
- package/dist/client/analytics.mjs +1 -1
- package/dist/client/{bookingForm-NF4ASVNV.mjs → bookingForm-BXAP6AO7.mjs} +76 -72
- package/dist/client/bookings.mjs +3765 -310
- package/dist/client/{carousel-LDX47ZIK.mjs → carousel-TRBXDHGF.mjs} +3 -4
- package/dist/client/{cart-RGXDS5F4.mjs → cart-Z7H3HJRS.mjs} +8 -8
- package/dist/client/{checkout-P7WWSNNY.mjs → checkout-WAFCUBIX.mjs} +8 -8
- package/dist/client/{chunk-II7O4XN3.mjs → chunk-75OUS5MT.mjs} +2 -2
- package/dist/client/{chunk-PMAIXMAB.mjs → chunk-AUJ5DBZJ.mjs} +42 -37
- package/dist/client/{chunk-TQ5MSPDX.mjs → chunk-CE7IBGVW.mjs} +3 -1
- package/dist/client/{chunk-E2TDNXCL.mjs → chunk-CWGTG37I.mjs} +2 -1
- package/dist/client/{chunk-UFSWADAO.mjs → chunk-DNRGY432.mjs} +6 -67
- package/dist/client/{chunk-GMVTOKYG.mjs → chunk-FUXW6VW2.mjs} +512 -66
- package/dist/client/{chunk-R56FQ3RR.mjs → chunk-JGXPTEI2.mjs} +322 -106
- package/dist/client/{chunk-L3DNHIJX.mjs → chunk-JRDUHZCT.mjs} +53 -53
- package/dist/client/{chunk-M3L3KYYR.mjs → chunk-UDNSI5PY.mjs} +12 -0
- package/dist/client/{chunk-JEZECJ3W.mjs → chunk-UVQEJJTN.mjs} +129 -3
- package/dist/client/{chunk-F7LHOKEH.mjs → chunk-XSV6KW4D.mjs} +1 -1
- package/dist/client/chunk-ZFHRN6W2.mjs +66 -0
- package/dist/client/{chunk-JNC7CGHX.mjs → chunk-ZI3LLBPZ.mjs} +3 -3
- package/dist/client/client.mjs +7577 -4979
- package/dist/client/{courseRegistration-7F65K5ZR.mjs → courseRegistration-AHFQHWIJ.mjs} +19 -16
- package/dist/client/{eventCalendar-GLSC5KTL.mjs → eventCalendar-LDXTV5R7.mjs} +10 -10
- package/dist/client/{eventCombined-ZHK4WKUR.mjs → eventCombined-A4JGTNJO.mjs} +10 -10
- package/dist/client/{eventDetails-E3PJYBIN.mjs → eventDetails-4YXTZ7EG.mjs} +10 -10
- package/dist/client/{eventListing-EMS3WC3E.mjs → eventListing-P72TPFFM.mjs} +10 -10
- package/dist/client/{eventRegistration-NZOTVNPI.mjs → eventRegistration-LSYJHGMT.mjs} +10 -10
- package/dist/client/{form-ETFZFATW.mjs → form-AOPYOKOW.mjs} +10 -7
- package/dist/client/{headerSection-4LBP7ULT.mjs → headerSection-5TFYDFVQ.mjs} +3 -3
- package/dist/client/hooks.mjs +1119 -327
- package/dist/client/{locationMap-5M655YSJ.mjs → locationMap-QSZ3ZVAZ.mjs} +3 -3
- package/dist/client/{newsletterForm-QOUYW44O.mjs → newsletterForm-KTRHZY52.mjs} +3 -3
- package/dist/client/{productDetail-O4DOCWQG.mjs → productDetail-N4E775RG.mjs} +8 -8
- package/dist/client/{productList-A5RO5WIS.mjs → productList-UGUQ2S45.mjs} +8 -8
- package/dist/client/rendering/client.mjs +7262 -2775
- package/dist/client/rendering/islands.mjs +19 -19
- package/dist/client/rendering.mjs +6964 -4587
- package/dist/client/{shop-L4MZH4I2.mjs → shop-VHSZEEQ2.mjs} +8 -8
- package/dist/preview-next/before-render.mjs +18 -1
- package/dist/preview-next/client/runtime.mjs +6 -6
- package/dist/preview-next/editor-chrome.css +10 -0
- package/dist/preview-next/middleware.mjs +18 -1
- package/dist/preview-next/tailwind-sources.css +1 -0
- package/dist/sdk-runtime-WHPJEF5G.mjs +8 -0
- package/dist/server/components.mjs +2736 -1316
- package/dist/server/config-template-validation.mjs +221 -15
- package/dist/server/config-validation.mjs +1346 -550
- package/dist/server/config.mjs +1346 -550
- package/dist/server/data.mjs +1118 -326
- package/dist/server/index.mjs +514 -251
- package/dist/server/next.mjs +4446 -2444
- package/dist/server/page-converter.mjs +631 -155
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +2743 -1323
- package/dist/server/rendering.mjs +2764 -1328
- package/dist/server/routing.mjs +1860 -590
- package/dist/server/server.mjs +1622 -575
- 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
- package/dist/sdk-runtime-6UT2S7KZ.mjs +0 -8
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { ApiRequestError, markPreviewAuthExpired } from './chunk-
|
|
2
|
+
import { ApiRequestError, markPreviewAuthExpired } from './chunk-CR5HKAGU.mjs';
|
|
3
3
|
import { createContext, useContext, useRef } from 'react';
|
|
4
4
|
import { jsx } from 'react/jsx-runtime';
|
|
5
5
|
import { QueryClient, MutationCache, QueryCache, QueryClientProvider } from '@tanstack/react-query';
|
|
@@ -5,13 +5,7 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __getProtoOf = Object.getPrototypeOf;
|
|
7
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var
|
|
9
|
-
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
10
|
-
}) : x)(function(x) {
|
|
11
|
-
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
12
|
-
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
13
|
-
});
|
|
14
|
-
var __commonJS = (cb, mod) => function __require2() {
|
|
8
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
15
9
|
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
16
10
|
};
|
|
17
11
|
var __export = (target, all) => {
|
|
@@ -35,4 +29,4 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
35
29
|
mod
|
|
36
30
|
));
|
|
37
31
|
|
|
38
|
-
export { __commonJS, __export,
|
|
32
|
+
export { __commonJS, __export, __toESM };
|
|
@@ -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,
|
|
6
|
-
import { API_ENDPOINTS, createBearerAPIClient, isPreviewRuntimeSessionEditable, DEFAULT_SURFACE_ID, initPreviewAuth, usePreviewAuth, usePreviewAuthFetch, markPreviewAuthExpired, usePreviewToken, parseSurfaceId } from './chunk-
|
|
2
|
+
import { useOptionalPreviewLayout, PreviewQueryProvider } from './chunk-OKMBEAXY.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-4QEGTLK6.mjs';
|
|
4
|
+
import { resolvePreviewChromeSurface, getPreviewSidebarTab, onPreviewSidebarOpenRequest, getPreviewChromeSurfaceDataProps, PREVIEW_CHROME_THEME_CLASS_NAME, setPreviewSidebarTab, PreviewPageDesignEditorStateProvider, usePreviewPageDesignEditorState, PREVIEW_SURFACE_PARAM } from './chunk-6HYXHRAI.mjs';
|
|
5
|
+
import { clientComponentRegistry, deriveLaunchReadiness, DEFAULT_LAUNCH_READINESS_INPUT, useEditorUiStore, ResizableSplitPane, BlockApiProvider, EditorProvider, getCuratedSiteStyle, useEditor, createRoutingHelpers, createSnapshotFromPageRecord, EntryControllerProvider, useEntryEditorController, useEditorUiStoreInstance, surfaceResolutionContextFromTheme, unsafeAsEditorBlockId, 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-MCRQMPET.mjs';
|
|
6
|
+
import { API_ENDPOINTS, createBearerAPIClient, isPreviewRuntimeSessionEditable, DEFAULT_SURFACE_ID, initPreviewAuth, usePreviewAuth, usePreviewAuthFetch, markPreviewAuthExpired, usePreviewToken, parseSurfaceId } from './chunk-CR5HKAGU.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
|
|
|
@@ -123,9 +123,12 @@ function previewProjectionsFromAiOverlays(overlays) {
|
|
|
123
123
|
}
|
|
124
124
|
return projections;
|
|
125
125
|
}
|
|
126
|
+
function toStringArray(value) {
|
|
127
|
+
return Array.isArray(value) ? value.filter((item) => typeof item === "string") : [];
|
|
128
|
+
}
|
|
126
129
|
function applyStructureProjection(blockItems, projection) {
|
|
127
|
-
const order = projection.viewMode === "before" ? projection.before.blockIds : projection.after.blockIds;
|
|
128
|
-
if (
|
|
130
|
+
const order = projection.viewMode === "before" ? toStringArray(projection.before.blockIds) : toStringArray(projection.after.blockIds);
|
|
131
|
+
if (order.length === 0) return blockItems.slice();
|
|
129
132
|
const itemsById = /* @__PURE__ */ new Map();
|
|
130
133
|
const unknownIdItems = [];
|
|
131
134
|
for (const item of blockItems) {
|
|
@@ -256,7 +259,7 @@ function getDraftSnapshots(uiStore) {
|
|
|
256
259
|
}
|
|
257
260
|
function mergeBlockWithDraft(block, draftMap, index, projections = []) {
|
|
258
261
|
const id = block.id ?? null;
|
|
259
|
-
const editorBlockId = id ?
|
|
262
|
+
const editorBlockId = id ? unsafeAsEditorBlockId(id) : null;
|
|
260
263
|
const snap = editorBlockId ? draftMap.get(editorBlockId) ?? null : null;
|
|
261
264
|
const rawDraft = snap?.current ?? null;
|
|
262
265
|
const draftContent = editorBlockId ? applyPreviewContentFieldProjections(editorBlockId, rawDraft, projections) : rawDraft;
|
|
@@ -436,7 +439,7 @@ function cyclePageDesignBlockLayout(block, direction) {
|
|
|
436
439
|
};
|
|
437
440
|
}
|
|
438
441
|
function cyclePageDesignBlockLook(block, direction) {
|
|
439
|
-
if (block.availableLooks.length
|
|
442
|
+
if (block.availableLooks.length <= 1) return null;
|
|
440
443
|
const lookIds = block.availableLooks.map((look) => look.id);
|
|
441
444
|
const values = [null, ...lookIds];
|
|
442
445
|
const currentIndex = cycleChoiceIndex(block.look, values, direction);
|
|
@@ -584,6 +587,9 @@ function focusableElementsIn(root) {
|
|
|
584
587
|
)
|
|
585
588
|
).filter((element) => !element.hasAttribute("disabled") && element.getAttribute("aria-hidden") !== "true");
|
|
586
589
|
}
|
|
590
|
+
function isUnknownArray(value) {
|
|
591
|
+
return Array.isArray(value);
|
|
592
|
+
}
|
|
587
593
|
function BlockToolbar({
|
|
588
594
|
blockId,
|
|
589
595
|
blockKind,
|
|
@@ -629,6 +635,9 @@ function BlockToolbar({
|
|
|
629
635
|
const hasLookControls = Boolean(
|
|
630
636
|
designBlock && designBlock.availableLooks.length > 0
|
|
631
637
|
);
|
|
638
|
+
const canCycleLook = Boolean(
|
|
639
|
+
designBlock && designBlock.availableLooks.length > 1
|
|
640
|
+
);
|
|
632
641
|
const facetControls = useMemo(
|
|
633
642
|
() => previewCustomizeFacetControlsFor(blockKind, content, designBlock),
|
|
634
643
|
[blockKind, content, designBlock]
|
|
@@ -649,7 +658,7 @@ function BlockToolbar({
|
|
|
649
658
|
state.setPreviewSidebarTab("editor");
|
|
650
659
|
state.setDrawerOpen(true);
|
|
651
660
|
state.requestFocus({
|
|
652
|
-
blockId:
|
|
661
|
+
blockId: unsafeAsEditorBlockId(blockId),
|
|
653
662
|
fieldPath: focusTarget.fieldPath,
|
|
654
663
|
itemIndex: focusTarget.itemIndex
|
|
655
664
|
});
|
|
@@ -855,6 +864,7 @@ function BlockToolbar({
|
|
|
855
864
|
onClick: cycleLook("prev"),
|
|
856
865
|
className: "grid h-8 w-8 place-items-center hover:bg-muted disabled:cursor-not-allowed disabled:opacity-50",
|
|
857
866
|
"aria-label": "Previous look",
|
|
867
|
+
disabled: !canCycleLook,
|
|
858
868
|
children: /* @__PURE__ */ jsx(ChevronLeft, { size: 14 })
|
|
859
869
|
}
|
|
860
870
|
),
|
|
@@ -865,6 +875,7 @@ function BlockToolbar({
|
|
|
865
875
|
onClick: cycleLook("next"),
|
|
866
876
|
className: "grid h-8 w-8 place-items-center border-l hover:bg-muted disabled:cursor-not-allowed disabled:opacity-50",
|
|
867
877
|
"aria-label": "Next look",
|
|
878
|
+
disabled: !canCycleLook,
|
|
868
879
|
children: /* @__PURE__ */ jsx(ChevronRight, { size: 14 })
|
|
869
880
|
}
|
|
870
881
|
)
|
|
@@ -912,7 +923,7 @@ function findFirstFieldPath(fields, data, prefix) {
|
|
|
912
923
|
}
|
|
913
924
|
if (field.type === "repeater" && field.schema) {
|
|
914
925
|
const collection = isRecord3(data) ? data[field.id] : void 0;
|
|
915
|
-
const items =
|
|
926
|
+
const items = isUnknownArray(collection) ? collection : [];
|
|
916
927
|
if (items.length > 0) {
|
|
917
928
|
const firstItem = items[0];
|
|
918
929
|
const nested = findFirstFieldPath(field.schema.fields, firstItem, [
|
|
@@ -1252,7 +1263,7 @@ function EditablePageRenderer(props) {
|
|
|
1252
1263
|
const previousBlock = blockIndex > 0 ? blockItemsForRender[blockIndex - 1] ?? null : null;
|
|
1253
1264
|
const canonicalBlockIndex = blockItems.findIndex((b) => b.id === blockId);
|
|
1254
1265
|
const canonicalPreviousBlock = canonicalBlockIndex > 0 ? blockItems[canonicalBlockIndex - 1] ?? null : null;
|
|
1255
|
-
const editorBlockId =
|
|
1266
|
+
const editorBlockId = unsafeAsEditorBlockId(blockId);
|
|
1256
1267
|
if (!block) {
|
|
1257
1268
|
return /* @__PURE__ */ jsx(EditableBlockProvider, { blockId, children: rendered });
|
|
1258
1269
|
}
|
|
@@ -1354,9 +1365,7 @@ function usePreviewHeaderClearance() {
|
|
|
1354
1365
|
}
|
|
1355
1366
|
const style = window.getComputedStyle(header);
|
|
1356
1367
|
const isOverlayHeader = style.position === "fixed" || style.position === "sticky";
|
|
1357
|
-
setClearance(
|
|
1358
|
-
isOverlayHeader ? Math.ceil(header.getBoundingClientRect().height) : 0
|
|
1359
|
-
);
|
|
1368
|
+
setClearance(isOverlayHeader ? measuredOverlayHeaderClearancePx(header) : 0);
|
|
1360
1369
|
};
|
|
1361
1370
|
update();
|
|
1362
1371
|
const mutationObserver = new MutationObserver(update);
|
|
@@ -1380,6 +1389,22 @@ function findPreviewOverlayHeader() {
|
|
|
1380
1389
|
".block-site-header.rb-fixed, .block-site-header.rb-sticky"
|
|
1381
1390
|
);
|
|
1382
1391
|
}
|
|
1392
|
+
function measuredOverlayHeaderClearancePx(header) {
|
|
1393
|
+
const visibleHeader = findVisibleHeaderMeasurementTarget(header);
|
|
1394
|
+
return visibleHeaderClearancePx(
|
|
1395
|
+
visibleHeader ? visibleHeader.getBoundingClientRect() : header.getBoundingClientRect()
|
|
1396
|
+
);
|
|
1397
|
+
}
|
|
1398
|
+
function findVisibleHeaderMeasurementTarget(header) {
|
|
1399
|
+
const candidates = Array.from(
|
|
1400
|
+
header.querySelectorAll(SITE_CHROME_VISIBLE_HEADER_SELECTOR)
|
|
1401
|
+
);
|
|
1402
|
+
return candidates.find((candidate) => {
|
|
1403
|
+
const style = window.getComputedStyle(candidate);
|
|
1404
|
+
const rect = candidate.getBoundingClientRect();
|
|
1405
|
+
return style.display !== "none" && rect.height > 0 && rect.bottom > 0;
|
|
1406
|
+
}) ?? null;
|
|
1407
|
+
}
|
|
1383
1408
|
function PreviewAuthInit({
|
|
1384
1409
|
children,
|
|
1385
1410
|
session,
|
|
@@ -1551,7 +1576,7 @@ function usePreviewKeepAlive({ enabled, fetcher, onExpired, intervalMs = DEFAULT
|
|
|
1551
1576
|
}
|
|
1552
1577
|
}
|
|
1553
1578
|
}
|
|
1554
|
-
keepAlive();
|
|
1579
|
+
void keepAlive();
|
|
1555
1580
|
const id = window.setInterval(keepAlive, withJitter(intervalMs));
|
|
1556
1581
|
return () => {
|
|
1557
1582
|
isActive = false;
|
|
@@ -2390,8 +2415,17 @@ function SiteChromeCustomizeProvider({
|
|
|
2390
2415
|
(surface) => {
|
|
2391
2416
|
if (!state || !lookModels) return { kind: "unavailable" };
|
|
2392
2417
|
if (surface === "header") {
|
|
2418
|
+
const currentLayoutId = state.previewed.headerLayoutId;
|
|
2419
|
+
const selectedLayout = lookModels.headerLayout.options.find(
|
|
2420
|
+
(option) => option.id === currentLayoutId
|
|
2421
|
+
);
|
|
2422
|
+
const renderedLayout = lookModels.headerLayout.options.find(
|
|
2423
|
+
(option) => option.id === lookModels.headerLayout.renderedLayoutId
|
|
2424
|
+
);
|
|
2393
2425
|
const currentId2 = state.previewed.headerStyleId;
|
|
2394
|
-
const selected2 = lookModels.headerStyle.options.find(
|
|
2426
|
+
const selected2 = lookModels.headerStyle.options.find(
|
|
2427
|
+
(option) => option.id === currentId2
|
|
2428
|
+
);
|
|
2395
2429
|
const rendered2 = lookModels.headerStyle.options.find(
|
|
2396
2430
|
(option) => option.id === lookModels.headerStyle.renderedStyleId
|
|
2397
2431
|
);
|
|
@@ -2399,6 +2433,9 @@ function SiteChromeCustomizeProvider({
|
|
|
2399
2433
|
kind: "available",
|
|
2400
2434
|
surface: "header",
|
|
2401
2435
|
label: "Header",
|
|
2436
|
+
currentLayoutId,
|
|
2437
|
+
currentLayoutLabel: selectedLayout?.label ?? (renderedLayout ? `${renderedLayout.label} (default)` : "Unknown Layout"),
|
|
2438
|
+
layoutOptions: lookModels.headerLayout.options,
|
|
2402
2439
|
currentId: currentId2,
|
|
2403
2440
|
currentLabel: selected2?.label ?? (rendered2 ? `${rendered2.label} (default)` : "Unknown Look"),
|
|
2404
2441
|
options: lookModels.headerStyle.options,
|
|
@@ -2528,6 +2565,16 @@ function SiteChromeCustomizeProvider({
|
|
|
2528
2565
|
},
|
|
2529
2566
|
[applyAllowed, persistSelection]
|
|
2530
2567
|
);
|
|
2568
|
+
const selectHeaderLayout = useCallback(
|
|
2569
|
+
(layoutId) => {
|
|
2570
|
+
if (!applyAllowed) return;
|
|
2571
|
+
const current = stateRef.current;
|
|
2572
|
+
if (!current) return;
|
|
2573
|
+
const nextState = previewHeaderLayout(current, layoutId);
|
|
2574
|
+
persistSelection("header", nextState.previewed);
|
|
2575
|
+
},
|
|
2576
|
+
[applyAllowed, persistSelection]
|
|
2577
|
+
);
|
|
2531
2578
|
const selectFooterLook = useCallback(
|
|
2532
2579
|
(lookId) => {
|
|
2533
2580
|
if (!applyAllowed) return;
|
|
@@ -2560,12 +2607,28 @@ function SiteChromeCustomizeProvider({
|
|
|
2560
2607
|
},
|
|
2561
2608
|
[getSurfaceState, selectFooterLook, selectHeaderStyle]
|
|
2562
2609
|
);
|
|
2610
|
+
const cycleSurfaceLayout = useCallback(
|
|
2611
|
+
(surface, direction) => {
|
|
2612
|
+
const currentState = getSurfaceState(surface);
|
|
2613
|
+
if (currentState.kind !== "available" || currentState.surface !== "header") {
|
|
2614
|
+
return;
|
|
2615
|
+
}
|
|
2616
|
+
const next = cycleSiteChromeLookId(
|
|
2617
|
+
currentState.layoutOptions,
|
|
2618
|
+
currentState.currentLayoutId,
|
|
2619
|
+
direction
|
|
2620
|
+
);
|
|
2621
|
+
if (next !== void 0 && next !== null) selectHeaderLayout(next);
|
|
2622
|
+
},
|
|
2623
|
+
[getSurfaceState, selectHeaderLayout]
|
|
2624
|
+
);
|
|
2563
2625
|
const value = useMemo(
|
|
2564
2626
|
() => ({
|
|
2565
2627
|
getSurfaceState,
|
|
2566
|
-
cycleSurfaceLook
|
|
2628
|
+
cycleSurfaceLook,
|
|
2629
|
+
cycleSurfaceLayout
|
|
2567
2630
|
}),
|
|
2568
|
-
[cycleSurfaceLook, getSurfaceState]
|
|
2631
|
+
[cycleSurfaceLayout, cycleSurfaceLook, getSurfaceState]
|
|
2569
2632
|
);
|
|
2570
2633
|
return /* @__PURE__ */ jsx(SiteChromeCustomizeContext.Provider, { value, children });
|
|
2571
2634
|
}
|
|
@@ -2579,9 +2642,9 @@ function useSiteChromeCustomizeOptional() {
|
|
|
2579
2642
|
}
|
|
2580
2643
|
|
|
2581
2644
|
// ../blocks/src/client/site-chrome.tsx
|
|
2582
|
-
function renderSiteChromeBlock(model, surface, theme) {
|
|
2645
|
+
function renderSiteChromeBlock(model, surface, theme, options = {}) {
|
|
2583
2646
|
const spec = model[surface];
|
|
2584
|
-
const themeConfig = applyThemeConfigOverride(theme, spec.themeConfigOverride);
|
|
2647
|
+
const themeConfig = options.themeConfigOverrideMode === "ignore" ? theme : applyThemeConfigOverride(theme, spec.themeConfigOverride);
|
|
2585
2648
|
const themeRuntime = buildThemeRuntime(themeConfig);
|
|
2586
2649
|
const manifest = surface === "header" ? siteHeaderManifest : siteFooterManifest;
|
|
2587
2650
|
return renderBlock(manifest, spec.content, {
|
|
@@ -2606,7 +2669,8 @@ function mergeDefinedObject(base, override) {
|
|
|
2606
2669
|
]);
|
|
2607
2670
|
}
|
|
2608
2671
|
function SiteChromeCustomizeButton({
|
|
2609
|
-
surface
|
|
2672
|
+
surface,
|
|
2673
|
+
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
2674
|
}) {
|
|
2611
2675
|
const customize = useSiteChromeCustomizeOptional();
|
|
2612
2676
|
const customizePanelId = useId();
|
|
@@ -2633,6 +2697,12 @@ function SiteChromeCustomizeButton({
|
|
|
2633
2697
|
if (surfaceState.kind !== "available") return 0;
|
|
2634
2698
|
return surfaceState.options.filter((option) => option.available).length;
|
|
2635
2699
|
}, [surfaceState]);
|
|
2700
|
+
const cycleableLayoutOptionCount = useMemo(() => {
|
|
2701
|
+
if (surfaceState.kind !== "available" || surfaceState.surface !== "header") {
|
|
2702
|
+
return 0;
|
|
2703
|
+
}
|
|
2704
|
+
return surfaceState.layoutOptions.filter((option) => option.available).length;
|
|
2705
|
+
}, [surfaceState]);
|
|
2636
2706
|
const toggleCustomize = (event) => {
|
|
2637
2707
|
event.preventDefault();
|
|
2638
2708
|
event.stopPropagation();
|
|
@@ -2643,7 +2713,7 @@ function SiteChromeCustomizeButton({
|
|
|
2643
2713
|
}
|
|
2644
2714
|
setCustomizeOpen((open) => !open);
|
|
2645
2715
|
};
|
|
2646
|
-
return /* @__PURE__ */ jsxs("div", { className:
|
|
2716
|
+
return /* @__PURE__ */ jsxs("div", { className: containerClassName, children: [
|
|
2647
2717
|
/* @__PURE__ */ jsx(
|
|
2648
2718
|
"button",
|
|
2649
2719
|
{
|
|
@@ -2700,6 +2770,44 @@ function SiteChromeCustomizeButton({
|
|
|
2700
2770
|
)
|
|
2701
2771
|
] }),
|
|
2702
2772
|
/* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
|
|
2773
|
+
surfaceState.surface === "header" ? /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-2", children: [
|
|
2774
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
2775
|
+
/* @__PURE__ */ jsx("div", { className: "text-sm font-medium", children: "Layout" }),
|
|
2776
|
+
/* @__PURE__ */ jsx("div", { className: "text-xs text-muted-foreground", children: surfaceState.currentLayoutLabel })
|
|
2777
|
+
] }),
|
|
2778
|
+
/* @__PURE__ */ jsxs("div", { className: "flex shrink-0 items-center overflow-hidden rounded-full border bg-background", children: [
|
|
2779
|
+
/* @__PURE__ */ jsx(
|
|
2780
|
+
"button",
|
|
2781
|
+
{
|
|
2782
|
+
type: "button",
|
|
2783
|
+
onClick: (event) => {
|
|
2784
|
+
event.preventDefault();
|
|
2785
|
+
event.stopPropagation();
|
|
2786
|
+
customize?.cycleSurfaceLayout(surface, "prev");
|
|
2787
|
+
},
|
|
2788
|
+
className: "grid h-8 w-8 place-items-center hover:bg-muted disabled:cursor-not-allowed disabled:opacity-50",
|
|
2789
|
+
"aria-label": `Previous ${surface} Layout`,
|
|
2790
|
+
disabled: surfaceState.saving || !surfaceState.applyAllowed || cycleableLayoutOptionCount <= 1,
|
|
2791
|
+
children: /* @__PURE__ */ jsx(ChevronLeft, { size: 14 })
|
|
2792
|
+
}
|
|
2793
|
+
),
|
|
2794
|
+
/* @__PURE__ */ jsx(
|
|
2795
|
+
"button",
|
|
2796
|
+
{
|
|
2797
|
+
type: "button",
|
|
2798
|
+
onClick: (event) => {
|
|
2799
|
+
event.preventDefault();
|
|
2800
|
+
event.stopPropagation();
|
|
2801
|
+
customize?.cycleSurfaceLayout(surface, "next");
|
|
2802
|
+
},
|
|
2803
|
+
className: "grid h-8 w-8 place-items-center border-l hover:bg-muted disabled:cursor-not-allowed disabled:opacity-50",
|
|
2804
|
+
"aria-label": `Next ${surface} Layout`,
|
|
2805
|
+
disabled: surfaceState.saving || !surfaceState.applyAllowed || cycleableLayoutOptionCount <= 1,
|
|
2806
|
+
children: /* @__PURE__ */ jsx(ChevronRight, { size: 14 })
|
|
2807
|
+
}
|
|
2808
|
+
)
|
|
2809
|
+
] })
|
|
2810
|
+
] }) : null,
|
|
2703
2811
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-2", children: [
|
|
2704
2812
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
2705
2813
|
/* @__PURE__ */ jsx("div", { className: "text-sm font-medium", children: "Look" }),
|
|
@@ -2755,35 +2863,116 @@ function SiteChromeEditableSurface({
|
|
|
2755
2863
|
return renderEditableSurface(
|
|
2756
2864
|
children,
|
|
2757
2865
|
surface,
|
|
2758
|
-
/* @__PURE__ */ jsx(SiteChromeCustomizeButton, { surface }),
|
|
2759
2866
|
{ preserveSingleComponentRoot }
|
|
2760
2867
|
);
|
|
2761
2868
|
}
|
|
2762
|
-
function renderEditableSurface(children, surface,
|
|
2869
|
+
function renderEditableSurface(children, surface, options) {
|
|
2763
2870
|
const childArray = Children.toArray(children);
|
|
2764
2871
|
const child = childArray.length === 1 ? childArray[0] : null;
|
|
2765
|
-
if (isValidElement(child) && child.type !== Fragment$1 && (isHostElement(child) || options.preserveSingleComponentRoot)) {
|
|
2872
|
+
if (isValidElement(child) && child.type !== Fragment$1 && (isHostElement(child) || options.preserveSingleComponentRoot || isEditableSurfaceForwardingElement(child))) {
|
|
2766
2873
|
return cloneElement(child, {
|
|
2767
2874
|
className: joinClassNames(child.props.className, "group/site-chrome relative"),
|
|
2768
2875
|
"data-preview-site-chrome-surface": surface,
|
|
2769
2876
|
children: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2770
2877
|
child.props.children,
|
|
2771
|
-
|
|
2878
|
+
/* @__PURE__ */ jsx(SiteChromeCustomizeButton, { surface })
|
|
2772
2879
|
] })
|
|
2773
2880
|
});
|
|
2774
2881
|
}
|
|
2882
|
+
if (surface === "header") {
|
|
2883
|
+
return /* @__PURE__ */ jsxs(
|
|
2884
|
+
"div",
|
|
2885
|
+
{
|
|
2886
|
+
className: "group/site-chrome",
|
|
2887
|
+
"data-preview-site-chrome-surface": surface,
|
|
2888
|
+
style: { display: "contents" },
|
|
2889
|
+
children: [
|
|
2890
|
+
children,
|
|
2891
|
+
/* @__PURE__ */ jsx(
|
|
2892
|
+
SiteChromeCustomizeButton,
|
|
2893
|
+
{
|
|
2894
|
+
surface,
|
|
2895
|
+
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"
|
|
2896
|
+
}
|
|
2897
|
+
)
|
|
2898
|
+
]
|
|
2899
|
+
}
|
|
2900
|
+
);
|
|
2901
|
+
}
|
|
2775
2902
|
return /* @__PURE__ */ jsxs("div", { className: "group/site-chrome relative", "data-preview-site-chrome-surface": surface, children: [
|
|
2776
2903
|
children,
|
|
2777
|
-
|
|
2904
|
+
/* @__PURE__ */ jsx(SiteChromeCustomizeButton, { surface })
|
|
2778
2905
|
] });
|
|
2779
2906
|
}
|
|
2780
2907
|
function isHostElement(child) {
|
|
2781
2908
|
return typeof child.type === "string";
|
|
2782
2909
|
}
|
|
2910
|
+
function isEditableSurfaceForwardingElement(child) {
|
|
2911
|
+
return typeof child.type !== "string" && child.type !== Fragment$1 && child.type[EDITABLE_SURFACE_FORWARDING_PROP] === true;
|
|
2912
|
+
}
|
|
2783
2913
|
function joinClassNames(...values) {
|
|
2784
2914
|
const className = values.filter(Boolean).join(" ");
|
|
2785
2915
|
return className.length > 0 ? className : void 0;
|
|
2786
2916
|
}
|
|
2917
|
+
|
|
2918
|
+
// ../preview-next/src/client/preview/previewDocumentFrame.ts
|
|
2919
|
+
var PREVIEW_DOCUMENT_FRAME_CLASS_NAME = "builder-preview-document-frame";
|
|
2920
|
+
function planPreviewDocumentFrame(input) {
|
|
2921
|
+
switch (input.viewportMode) {
|
|
2922
|
+
case "squeeze":
|
|
2923
|
+
return {
|
|
2924
|
+
kind: "squeeze",
|
|
2925
|
+
frameClassName: PREVIEW_DOCUMENT_FRAME_CLASS_NAME,
|
|
2926
|
+
frameDataProps: {
|
|
2927
|
+
"data-builder-preview-document-frame": "squeeze",
|
|
2928
|
+
"data-builder-preview-document-scale": "none"
|
|
2929
|
+
}
|
|
2930
|
+
};
|
|
2931
|
+
case "fixed":
|
|
2932
|
+
return planFixedPreviewDocumentFrame(input);
|
|
2933
|
+
default:
|
|
2934
|
+
return assertNever3(input.viewportMode);
|
|
2935
|
+
}
|
|
2936
|
+
}
|
|
2937
|
+
function planFixedPreviewDocumentFrame(input) {
|
|
2938
|
+
const scale = normalizePreviewScale(input.scale);
|
|
2939
|
+
const targetWidthPx = input.viewportWidth === "full" ? 1440 : input.viewportWidth;
|
|
2940
|
+
const scaledWidth = targetWidthPx * scale;
|
|
2941
|
+
const scaledHeight = input.contentHeight > 0 ? input.contentHeight * scale : null;
|
|
2942
|
+
const wrapperStyle = {
|
|
2943
|
+
width: `${scaledWidth}px`,
|
|
2944
|
+
margin: "0 auto"
|
|
2945
|
+
};
|
|
2946
|
+
if (scaledHeight !== null) {
|
|
2947
|
+
wrapperStyle.height = `${scaledHeight}px`;
|
|
2948
|
+
} else {
|
|
2949
|
+
wrapperStyle.minHeight = "100%";
|
|
2950
|
+
}
|
|
2951
|
+
return {
|
|
2952
|
+
kind: "fixed",
|
|
2953
|
+
targetWidthPx,
|
|
2954
|
+
wrapperStyle,
|
|
2955
|
+
contentStyle: {
|
|
2956
|
+
minHeight: "100%",
|
|
2957
|
+
width: `${targetWidthPx}px`,
|
|
2958
|
+
...scale === 1 ? {} : { zoom: scale }
|
|
2959
|
+
},
|
|
2960
|
+
siteDocumentStyle: { width: `${targetWidthPx}px` },
|
|
2961
|
+
frameClassName: PREVIEW_DOCUMENT_FRAME_CLASS_NAME,
|
|
2962
|
+
frameDataProps: {
|
|
2963
|
+
"data-builder-preview-document-frame": "fixed",
|
|
2964
|
+
"data-builder-preview-document-scale": scale === 1 ? "none" : "scaled",
|
|
2965
|
+
"data-builder-preview-fixed-header-behavior": "fixed-as-sticky"
|
|
2966
|
+
}
|
|
2967
|
+
};
|
|
2968
|
+
}
|
|
2969
|
+
function normalizePreviewScale(scale) {
|
|
2970
|
+
if (!Number.isFinite(scale) || scale <= 0) return 1;
|
|
2971
|
+
return scale;
|
|
2972
|
+
}
|
|
2973
|
+
function assertNever3(value) {
|
|
2974
|
+
throw new Error(`Unhandled preview viewport mode: ${String(value)}`);
|
|
2975
|
+
}
|
|
2787
2976
|
function PreviewThemedSiteDocument({
|
|
2788
2977
|
children,
|
|
2789
2978
|
useThemeScope,
|
|
@@ -2805,9 +2994,13 @@ function PreviewThemedSiteDocument({
|
|
|
2805
2994
|
headerVariant: effectiveTheme.header?.variant ?? null,
|
|
2806
2995
|
hasVisibleBanner: Boolean(bannerNode)
|
|
2807
2996
|
});
|
|
2808
|
-
const headerNode = siteChromeRenderModel ? /* @__PURE__ */ jsx(SiteChromeEditableSurface, { surface: "header", children: renderSiteChromeBlock(siteChromeRenderModel, "header", effectiveTheme
|
|
2997
|
+
const headerNode = siteChromeRenderModel ? /* @__PURE__ */ jsx(SiteChromeEditableSurface, { surface: "header", children: renderSiteChromeBlock(siteChromeRenderModel, "header", effectiveTheme, {
|
|
2998
|
+
themeConfigOverrideMode: "ignore"
|
|
2999
|
+
}) }) : staticHeaderNode;
|
|
2809
3000
|
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
|
|
3001
|
+
const footerNode = canRenderFooterReactively && siteChromeRenderModel ? /* @__PURE__ */ jsx(SiteChromeEditableSurface, { surface: "footer", preserveSingleComponentRoot: true, children: renderSiteChromeBlock(siteChromeRenderModel, "footer", effectiveTheme, {
|
|
3002
|
+
themeConfigOverrideMode: "ignore"
|
|
3003
|
+
}) }) : staticFooterNode;
|
|
2811
3004
|
const documentNode = renderPreviewDocument({
|
|
2812
3005
|
viewportMode,
|
|
2813
3006
|
viewportWidth,
|
|
@@ -2829,7 +3022,7 @@ function PreviewThemedSiteDocument({
|
|
|
2829
3022
|
{
|
|
2830
3023
|
theme: effectiveTheme,
|
|
2831
3024
|
responsiveMode: useContainerResponsiveMode ? "container" : "viewport",
|
|
2832
|
-
className: "flex flex-1 flex-col",
|
|
3025
|
+
className: "rb-flex rb-flex-1 rb-flex-col",
|
|
2833
3026
|
children: documentNode
|
|
2834
3027
|
}
|
|
2835
3028
|
);
|
|
@@ -2847,7 +3040,14 @@ function renderPreviewDocument({
|
|
|
2847
3040
|
footerNode,
|
|
2848
3041
|
children
|
|
2849
3042
|
}) {
|
|
3043
|
+
const framePlan = planPreviewDocumentFrame({
|
|
3044
|
+
viewportMode,
|
|
3045
|
+
viewportWidth,
|
|
3046
|
+
scale,
|
|
3047
|
+
contentHeight
|
|
3048
|
+
});
|
|
2850
3049
|
if (viewportMode === "squeeze") {
|
|
3050
|
+
if (framePlan.kind !== "squeeze") return null;
|
|
2851
3051
|
return /* @__PURE__ */ jsx(
|
|
2852
3052
|
SiteDocumentLayout,
|
|
2853
3053
|
{
|
|
@@ -2858,35 +3058,20 @@ function renderPreviewDocument({
|
|
|
2858
3058
|
bannerNode,
|
|
2859
3059
|
footerNode,
|
|
2860
3060
|
minHeightClassName: null,
|
|
2861
|
-
className:
|
|
3061
|
+
className: `${framePlan.frameClassName} rb-flex-1 rb-preview-editor-offset`,
|
|
2862
3062
|
children
|
|
2863
3063
|
}
|
|
2864
3064
|
);
|
|
2865
3065
|
}
|
|
2866
3066
|
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(
|
|
3067
|
+
if (framePlan.kind !== "fixed") return null;
|
|
3068
|
+
return /* @__PURE__ */ jsx("div", { ref: scaleContainerRef, className: "h-full overflow-auto", children: /* @__PURE__ */ jsx("div", { style: framePlan.wrapperStyle, children: /* @__PURE__ */ jsx(
|
|
2880
3069
|
"div",
|
|
2881
3070
|
{
|
|
2882
3071
|
ref: contentRef,
|
|
2883
|
-
className:
|
|
2884
|
-
style:
|
|
2885
|
-
|
|
2886
|
-
width: `${targetWidthPx}px`,
|
|
2887
|
-
transform: `scale(${scale})`,
|
|
2888
|
-
transformOrigin: "top left"
|
|
2889
|
-
},
|
|
3072
|
+
className: `${framePlan.frameClassName} border-x shadow-sm`,
|
|
3073
|
+
style: framePlan.contentStyle,
|
|
3074
|
+
...framePlan.frameDataProps,
|
|
2890
3075
|
children: /* @__PURE__ */ jsx(
|
|
2891
3076
|
SiteDocumentLayout,
|
|
2892
3077
|
{
|
|
@@ -2896,9 +3081,9 @@ function renderPreviewDocument({
|
|
|
2896
3081
|
headerNode,
|
|
2897
3082
|
bannerNode,
|
|
2898
3083
|
footerNode,
|
|
2899
|
-
minHeightClassName:
|
|
2900
|
-
className: "
|
|
2901
|
-
style:
|
|
3084
|
+
minHeightClassName: SITE_CHROME_CLASS_NAMES.fullMinHeight,
|
|
3085
|
+
className: "rb-preview-editor-offset",
|
|
3086
|
+
style: framePlan.siteDocumentStyle,
|
|
2902
3087
|
children
|
|
2903
3088
|
}
|
|
2904
3089
|
)
|
|
@@ -2909,11 +3094,11 @@ function renderPreviewDocument({
|
|
|
2909
3094
|
}
|
|
2910
3095
|
var previewContainerResponsiveEnabled = process.env.NEXT_PUBLIC_ENABLE_PREVIEW_CONTAINER_RESPONSIVE !== "false";
|
|
2911
3096
|
var PreviewEditorSidebar = React9.lazy(async () => {
|
|
2912
|
-
const mod = await import('./PreviewEditorSidebar-
|
|
3097
|
+
const mod = await import('./PreviewEditorSidebar-4DXLYX2V.mjs');
|
|
2913
3098
|
return { default: mod.PreviewEditorSidebar };
|
|
2914
3099
|
});
|
|
2915
3100
|
var PreviewEditorUI = React9.lazy(async () => {
|
|
2916
|
-
const mod = await import('./PreviewEditorUI-
|
|
3101
|
+
const mod = await import('./PreviewEditorUI-CS5P4N3P.mjs');
|
|
2917
3102
|
return { default: mod.PreviewEditorUI };
|
|
2918
3103
|
});
|
|
2919
3104
|
var previewPaneContainmentStyle = {
|