@riverbankcms/sdk 0.101.0 → 0.103.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 +10 -2
- package/dist/{PreviewEditorSidebar-DBpy0KTh.mjs → PreviewEditorSidebar-DkNpCPja.mjs} +430 -74
- package/dist/{PreviewEditorUI-Fg6I2R2T.mjs → PreviewEditorUI-DeNKtqk3.mjs} +3 -3
- package/dist/{PreviewQueryProvider-BICQLAUF.mjs → PreviewQueryProvider-ZF6TXq5Q.mjs} +1 -1
- package/dist/{SdkPreviewModeRuntime-DFQP-Q53.mjs → SdkPreviewModeRuntime-5bCsXK2y.mjs} +694 -329
- package/dist/{SiteChromeCustomizeContext-GwZc89KN.mjs → SiteChromeCustomizeContext-CO1sTK_W.mjs} +538 -69
- package/dist/_dts/ai/src/contracts/proposals.d.ts +298 -298
- package/dist/_dts/ai/src/designer/rfc6902.d.ts +57 -1
- package/dist/_dts/ai/src/designer/themePatch.d.ts +16 -6
- package/dist/_dts/api/src/bookingVerticals.d.ts +53 -1
- package/dist/_dts/api/src/index.d.ts +1 -1
- package/dist/_dts/api/src/navigation/contracts.d.ts +6 -6
- package/dist/_dts/api/src/siteBanner.d.ts +2 -2
- package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +1 -0
- package/dist/_dts/blocks/src/PageRenderer.d.ts +6 -1
- package/dist/_dts/blocks/src/bindings/index.d.ts +2 -2
- package/dist/_dts/blocks/src/index.d.ts +1 -1
- package/dist/_dts/blocks/src/server.d.ts +1 -1
- package/dist/_dts/blocks/src/system/blocks/courses/shared/schemas.d.ts +7 -7
- package/dist/_dts/blocks/src/system/blocks/events/event-calendar.d.ts +1 -1
- package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +14 -14
- package/dist/_dts/blocks/src/system/blocks/location-map.d.ts +5 -5
- package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +227 -227
- package/dist/_dts/blocks/src/system/blocks/offerings-preview/model.d.ts +1 -1
- package/dist/_dts/blocks/src/system/constants/background.d.ts +1 -1
- package/dist/_dts/blocks/src/system/customize/facets.d.ts +2 -2
- package/dist/_dts/blocks/src/system/inlineText.d.ts +2 -2
- package/dist/_dts/blocks/src/system/manifest/schema.d.ts +177 -177
- package/dist/_dts/blocks/src/system/node/schema.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/layout.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/shared/contract-schemas.d.ts +7 -7
- package/dist/_dts/blocks/src/system/transforms/typed.d.ts +1 -1
- package/dist/_dts/content-editor/src/index.d.ts +1 -0
- package/dist/_dts/content-model/src/content-types/schema.d.ts +8 -8
- package/dist/_dts/core/src/branded.d.ts +4 -0
- package/dist/_dts/core/src/person-records.d.ts +6 -1
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +154 -18
- package/dist/_dts/db/src/schemas/forms.d.ts +15 -15
- package/dist/_dts/media-core/src/identifiers.d.ts +14 -1
- package/dist/_dts/preview-next/src/client/blocks/composer/mergeDrafts.d.ts +1 -1
- package/dist/_dts/preview-next/src/client/blocks/previewProjection/applyPreviewProjections.d.ts +3 -1
- package/dist/_dts/preview-next/src/client/blocks/previewProjection/runtimeContentDecoration.d.ts +2 -2
- package/dist/_dts/preview-next/src/client/blocks/previewProjection/types.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/preview/CustomizeColorTokenPicker.d.ts +27 -0
- package/dist/_dts/preview-next/src/client/preview/PageBlockEditorPanel.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/preview/PreviewChromeLayer.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/preview/SiteChromeCustomizeContext.d.ts +10 -2
- package/dist/_dts/preview-next/src/client/preview/StyleConfigurator.state.d.ts +43 -7
- package/dist/_dts/preview-next/src/client/preview/sidebarTabPreference.d.ts +1 -1
- package/dist/_dts/preview-next/src/client/preview/siteChromeQuickControlHistoryState.d.ts +16 -1
- package/dist/_dts/preview-next/src/client/preview/siteChromeSavePlan.d.ts +3 -2
- package/dist/_dts/preview-next/src/client/preview/siteStylePreviewPlanner.d.ts +4 -4
- package/dist/_dts/preview-next/src/client/preview/styleConfiguratorApplyPayload.d.ts +1 -1
- package/dist/_dts/preview-next/src/client/preview/typographySelectionInput.d.ts +4 -2
- package/dist/_dts/sdk/src/config/validation.d.ts +3 -3
- package/dist/_dts/sdk/src/contracts/index.d.ts +1 -1
- package/dist/_dts/sdk/src/contracts/page.d.ts +2 -0
- package/dist/_dts/sdk/src/manifest/passes/pass1-fields.d.ts +10 -10
- package/dist/_dts/sdk/src/next/revalidate.d.ts +14 -1
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +4 -4
- package/dist/_dts/sdk/src/rendering/blocks-page-renderer.d.ts +2 -1
- package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +3 -2
- package/dist/_dts/sdk/src/rendering/helpers/loadContent.d.ts +3 -4
- package/dist/_dts/sdk/src/rendering/hooks/useContent.d.ts +1 -0
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/site-commands/src/commands.d.ts +19 -19
- package/dist/_dts/theme-core/src/accordions/types.d.ts +3 -3
- package/dist/_dts/theme-core/src/buttons/personalities/types.d.ts +3 -3
- package/dist/_dts/theme-core/src/buttons/types.d.ts +7 -7
- package/dist/_dts/theme-core/src/cards/types.d.ts +6 -6
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/inputs/types.d.ts +4 -4
- package/dist/_dts/theme-core/src/mock-themes/all.d.ts +150 -144
- package/dist/_dts/theme-core/src/navigation/types.d.ts +6 -6
- package/dist/_dts/theme-core/src/palette/variants/types.d.ts +5 -5
- package/dist/_dts/theme-core/src/schema.d.ts +199 -169
- package/dist/_dts/theme-core/src/site-styles/backgroundAppearance.d.ts +2 -2
- package/dist/_dts/theme-core/src/site-styles/contentTemplateRuntimeCompiler.d.ts +2 -1
- package/dist/_dts/theme-core/src/site-styles/designState.d.ts +28 -26
- package/dist/_dts/theme-core/src/site-styles/generatedSchemas.d.ts +2 -2
- package/dist/_dts/theme-core/src/site-styles/headerLooks.d.ts +4 -4
- package/dist/_dts/theme-core/src/site-styles/index.d.ts +1 -0
- package/dist/_dts/theme-core/src/site-styles/previewCompiler.d.ts +9 -2
- package/dist/_dts/theme-core/src/site-styles/rawStyleFields.d.ts +3 -3
- package/dist/_dts/theme-core/src/site-styles/runtimeCompiler.d.ts +50 -2
- package/dist/_dts/theme-core/src/site-styles/sectionTransitions.d.ts +77 -0
- package/dist/_dts/theme-core/src/site-styles/siteChromeNavPreferences.d.ts +44 -0
- package/dist/_dts/theme-core/src/site-styles/styleTags.d.ts +1 -1
- package/dist/_dts/theme-core/src/site-styles/tokenRecipes.d.ts +1 -1
- package/dist/_dts/theme-core/src/tokens/themeColorTokens.d.ts +3 -3
- package/dist/_dts/ui/src/badge.d.ts +1 -1
- package/dist/_dts/ui/src/button.d.ts +1 -1
- package/dist/_dts/ui/src/card.d.ts +1 -1
- package/dist/_dts/ui/src/toggle.d.ts +2 -2
- package/dist/cli/index.mjs +58 -21
- package/dist/cli/init-docs/content/workflow-isr-revalidation.md +9 -1
- package/dist/client/client.mjs +379 -83
- package/dist/client/hooks.mjs +27 -6
- package/dist/client/rendering/client.mjs +46 -17
- package/dist/client/rendering.mjs +378 -82
- package/dist/preview-next/before-render.mjs +1 -1
- package/dist/preview-next/client/runtime.mjs +4 -4
- package/dist/{previewAuthStore-Da74OL0X.mjs → previewAuthStore-ByPPZqmp.mjs} +1 -0
- package/dist/{sdk-runtime-CP6Kwalv.mjs → sdk-runtime-C8whifOy.mjs} +2 -2
- package/dist/{separator-BVk7GvGN.mjs → separator-CM2C5Axs.mjs} +1 -1
- package/dist/server/components.mjs +357 -77
- package/dist/server/config-validation.mjs +26 -6
- package/dist/server/config.mjs +26 -6
- package/dist/server/data.mjs +26 -6
- package/dist/server/index.mjs +2 -2
- package/dist/server/next/revalidate.mjs +31 -1
- package/dist/server/next.mjs +361 -78
- package/dist/server/page-converter.mjs +19 -5
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +359 -77
- package/dist/server/rendering.mjs +359 -77
- package/dist/server/routing.mjs +40 -9
- package/dist/server/server.mjs +29 -7
- package/dist/server/theme-bridge.mjs +158 -36
- package/dist/server/theme.mjs +3 -0
- package/dist/styles/index.css +123 -30
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { $ as PreviewRichTextEditor, $a as eventScheduleScopeValues, $c as useSdkConfig, $d as Check, $i as parseBlockCustomCssRules, $n as formBlockDefinition, $o as ACCORDION_SPACING_MAP, $r as heroCtaRowFragment, $s as createRichTextDocFromMarkdown, $u as unsafeAsMediaAssetId, Aa as buildEventRuntimeFilters, Ac as siblingPath$1, Ad as ImagePlus, Al as ScrollableDialogContent, An as SITE_OVERLAY_HEADER_CLEARANCE_CSS_VAR, Ao as getContainerClass, Ar as formatInterval, As as ChevronDownIcon, At as createSnapshotFromPageRecord, Au as formatBookingInstant, Ba as columnOptionSchema, Bc as themeButtonClassName, Bd as EllipsisVertical, Bi as backgroundAppearanceColorTokenNames, Bn as ImageResolveContextProvider, Bo as createInteractiveIslandCodec, Br as richTextFragment, Bs as FileAudioIcon, Bt as createManifestFormAdapter, Bu as publicEventPricingMode, Ca as normalizeOfferingsPreviewItemLimit, Cc as formatAspectRatioToken, Cl as TabsContent, Cn as gradientToCss, Co as formatEventCompactDateRail, Cr as buildProductListInteractiveIslandProps, Cs as getSemanticIconComponent, Ct as pushHistoryEntry, Cu as createEditorRemoveBlockCommand, Da as resolveOfferingsPreviewGroups, Dc as getDirectImageUrlForMediaAsset, Dd as LoaderCircle, Dl as List, Dn as siteFooterManifest, Do as formatEventTeacherLine, Dr as buildProductCardDisplay, Ds as ArrowRightIcon, Du as addLocalScheduleDays, Ea as resolveOfferingsPreviewGroupOrderEntries, Ec as asRecord, Ei as surfaceResolutionContextFromTheme, El as Content$1, En as listBlockDescriptors, Eo as formatEventPriceDisplay, Er as buildCartDisplay, Es as ArrowLeftIcon, Et as unsafeAsLinkedContentEntryId, Eu as unsafeAsEditorBlockValues, Fa as resolveEventListPaginationAction, Fc as generateShadowValue$1, Fd as FilePlay, Fi as defaultSectionTransitionVariantForFamily, Fl as DialogFooter, Fn as layoutTransforms, Fo as getLocalDateKey, Fr as parseStoredCommerceCartState, Fs as CirclePlusIcon, Ft as usePalette, Fu as resolveBookingTimeZoneId, G as beginAutosaveBatch, Ga as previewStageSchema, Gc as textColorStyle, Gd as CircleMinus, Gl as Card, Gn as newsletterSignupBlockDefinition, Gr as blogFeaturedPostFragment, Gs as MapPinIcon$1, Gt as listContentTypes, Gu as assertNever$5, Ha as eventCalendarDefaultViewSchema, Hc as borderColorStyle, Hd as CreditCard, Hi as foregroundTokenForBackgroundAppearanceColorToken, Hl as Root, Hn as shopBlockDefinition, Ho as createZodCodec, Hr as cardFragment, Hs as FileTextIcon, Ht as FormRenderer, Hu as publicEventScalarPrice, Ia as normalizeCsvIds, Ic as generateBaseInteractiveCSS, Id as FileHeadphone, Ii as sectionTransitionFamilies, Il as DialogHeader, In as uiTransforms, Io as getLocalMinuteOfDay, Ir as productItemKey, Is as ClockIcon$1, It as recoveryConflictCopy, Iu as toBookingTimeZone, J as enqueueTransaction, Ja as eventCalendarListLayoutOptions, Jc as getModalConfig, Jd as ChevronsUpDown, Ji as isThemeV2NormalEditorRawStyleFieldName, Jl as CardTitle, Jn as buildEventListingInteractiveIslandProps, Jo as splitPositioningClasses, Jr as formEmbedFragment, Js as PlayIcon, Jt as getPageDesignEditorState, Ju as parseSiteId, K as confirmAutosaveBatch, Ka as weekStartSchema, Kc as useBackendWatch, Kd as CircleCheck, Kl as CardContent, Kn as buildNewsletterFormInteractiveIslandProps, Ko as composeHeaderSectionWrapperClassName, Kr as singleButtonFragment, Ks as MinusIcon, Kt as toRoutableLinkPayload, Ku as expectParsedBrandedId, La as normalizeCsvString, Lc as generateInteractiveChildInheritanceCSS, Ld as FileArchive, Li as sectionTransitionFamilyForBoundaryOptionId, Ll as DialogTitle, Ln as formattingTransforms, Lo as resolveRuntimeEventPricing, Lr as reduceCommerceCart, Ls as DownloadIcon, Lt as unfinishedBlockCopy, Lu as toScheduledBookingDateTime, Ma as eventPageSizeSchema, Md as File, Ml as DialogClose, Mn as visibleHeaderClearancePx, Mo as resolveEventCta, Mr as buildPassCartItem, Ms as ChevronRightIcon, Mu as formatLocalScheduleDate, Na as getEventRuntimeFiltersKey, Nc as generateButtonCss, Nd as FileText, Nl as DialogContent, Nn as contentTransforms, No as resolveEventLinkProps, Nr as buildProductCartItem, Ns as ChevronUpIcon, Nu as getBookingLocalDateKey, Oa as isSemanticSpacing, Oc as getImageUrl, Od as Image, Ol as Root2$1, On as siteHeaderManifest, Oo as formatTime$3, Or as buildProductDetailDisplay, Os as CalendarIcon$1, Ot as useDebouncedLatestSave, Ou as formatBookingDate, Pa as resolveEventCalendarListPageSize, Pc as generateEffectsCSS, Pd as FileSpreadsheet, Pl as DialogDescription, Pn as mediaTransforms, Po as getEventAvailability, Pr as deriveCommerceCheckoutState, Ps as CircleMinusIcon, Pt as PaletteProvider, Pu as parseBookingLocalDate, Q as resolvePreviewSidebarTab, Qa as eventBlockKindValues, Qc as SdkConfigProvider, Qd as ChevronDown, Qi as getComponentShadowVar, Ql as DropdownMenuItem, Qn as buildEventCalendarListingRender, Qo as ACCORDION_OPEN_ACCENT_THICKNESS, Qr as ctaCopyFragment, Qs as XIcon, Qt as deleteEntrySlotBlock, Qu as unsafeAsFormId, Ra as normalizeOptionalId, Rc as TokenResolver, Ri as sectionTransitionVariantForBoundaryOptionId, Rl as Collapsible, Rn as createManifestValidator, Ro as blockBookingPaymentTermsSchema, Rr as augmentManifest, Rs as ExternalLinkIcon, Rt as validateBlockManifestIssues, Ru as formatBookingPriceDisplay, Sa as normalizeOfferingsPreviewGroupOrder, Sc as normalizeRightAngle, Si as resolveVisiblePromotedFieldPathsForEditorBlock, Sl as Tabs, Sn as isSupportedLoaderEndpoint, So as formatDate$3, Sr as buildProductDetailInteractiveIslandProps, Ss as SEMANTIC_ICON_DEFINITIONS, St as createHistoryState, Su as createEditorInsertBlockCommand, Ta as resolveOfferingsPreviewGroupCta, Tc as resolveMediaTransformForAspect, Td as Minus, Ti as getCuratedSiteStyle, Tl as TabsTrigger, Tn as getBlockDefinition, To as formatEventPrice, Tr as getShopDisplayForItems, Ts as ArrowDownIcon, Tt as undoHistory, Tu as unsafeAsEditorBlockId, Ua as eventLayoutSchema, Uc as mergeStyles, Ud as Copy, Ui as parseBackgroundAppearanceColorToken, Ul as Trigger, Un as productListBlockDefinition, Uo as defineClientOwnedBlockRuntime, Ur as faqAccordionFragment, Us as InfoIcon, Ut as evaluateVisibility, Uu as publicEventTicketTypes, Va as eventButtonVariantSchema, Vc as backgroundColorStyle, Vd as Crop, Vi as backgroundAppearanceQuickColorTokenNames, Vl as Content, Vn as useImageResolveContextOptional, Vo as defineInteractiveIslandMetaKeys, Vr as headingFragment, Vs as FileSpreadsheetIcon, Vu as publicEventPricingType, Wa as filterAutoShowSchema, Wc as rgbColorValue, Wd as CirclePlus, Wi as defaultThemeTokens, Wl as createCollapsibleScope, Wn as productDetailBlockDefinition, Wo as defineProgressiveBlockRuntime, Wr as faqHeadingFragment, Ws as MailIcon, Wt as createStoreBackend, Wu as formatCurrencyAmount, X as rejectAutosaveBatch, Xa as when, Xc as isNonEmptyValue, Xd as ChevronRight, Xi as pageDesignEditorBackgroundOverrideOwner, Xl as DropdownMenu, Xn as buildEventCalendarInteractiveIslandProps, Xo as asDesignBlockId, Xr as testimonialsCarouselFragment, Xs as ShoppingCartIcon, Xt as createEntrySlotBlock, Xu as unsafeAsAppointmentServiceId, Y as idleEditorTransactionQueueState, Ya as el, Yc as isHeaderField, Yd as ChevronUp, Yi as isThemeV2NormalEditorRawStylePath, Yn as eventCalendarBlockDefinition, Yo as planSiteChromePlacement, Yr as formCopyFragment, Ys as PlusIcon, Yt as createBlock, Yu as unsafeAsAppointmentResourceId, Za as bindingSchema, Zc as useBlockContext, Zd as ChevronLeft, Zi as getComponentBorderWidthPx, Zl as DropdownMenuContent, Zn as buildEventCalendarListingDisplay, Zo as assertNever$6, Zr as testimonialsHeadingFragment, Zs as UploadIcon, Zt as deleteBlock, Zu as unsafeAsCustomerPassId, _c as setContextResolveImageUrlContext, _d as Search, _i as PAGE_DESIGN_EDITOR_STATE_FETCH_ERROR_MESSAGE, _l as Badge, _n as CSS, _o as getTextColorForBackground, _r as buildCourseRegistrationInteractiveIslandProps, _s as parseBlockIconValue, _t as useEditorUiStore, _u as Button, aa as NAV_LINK_TEXT_SIZE_MAP, ac as isInlineTextEmpty, ad as lucide_react_exports, af as __exportAll, ai as siteOptionSources, al as useField, an as deriveLaunchReadiness, ao as normalizeEventSurfacePresetsCsv, ar as findPreSelectedEvent, as as mediaSchema, at as getRichTextImagePositionFromTarget, au as __generator, ba as inferLegacyOfferingsPreviewGroupOrder, bc as attachRenderableMediaAssetFields, bd as Plus, bi as normalEditorCuratedPromotedFieldPaths, bl as PopoverTrigger, bn as useIsomorphicLayoutEffect, bo as normalizeLocationMapProps, br as buildCartInteractiveIslandProps, bs as isIconPickerPreset, bt as canRedoHistory, bu as cn$1, ca as INPUT_SPACING_MAP, cc as MediaPlaceholder, ci as MQ_SM_DOWN, cl as TooltipProvider, cn as KeyboardCode, co as publicEventSchema, cr as resolveRegistrationTarget, cs as createFeatureCardIconKey, ct as EditorProvider, cu as __spreadArray, da as generateCssVars, dc as getCurrentResolveImageUrlContext, dd as Ticket, di as BACKGROUND_POSITION_PRESET_VALUES, dl as Select, dn as getClientRect, do as generateShadowValue, dr as getWizardStepsForContext$1, ds as suggestFeatureCardSemanticIcons, dt as useUISelector, du as useDirection, ea as parseCustomCssRules, ec as unwrapRichTextRoot, ed as unsafeAsPassId, ef as Box, ei as ctaRowFragment, el as hasEmptyOption, en as mutateBlockContent, eo as eventSurfaceScopeValues, er as buildFormInteractiveIslandProps, es as ACCORDION_TRIGGER_FONT_SCALE, et as PreviewInlineTextEditor, eu as DropdownMenuSeparator, fa as createTransformRegistry, fc as renderAudio, fi as getAnchorClasses, fl as SelectContent, fn as useDndContext, fo as normalizeBoxStylesCardVariant, fr as normalizeEventRegistrationPageSurfaceSubject, fs as suggestSemanticIconForFeatureCard, ft as EditableBlockProvider, fu as createCollection, g as PreviewDesignCoordinatorProvider, gc as resolveMediaStorageUrl, gd as Settings, gi as formatSiteChromeBackgroundTokenLabel, gl as Label, gn as useSensors, go as resolveTokenOrCssColorValue, gr as courseRegistrationBlockDefinition, gs as getGeneratedBlockIconStyleState, gu as Primitive, hc as resolveMediaNodeResponsiveImage, hi as resolveBackgroundColorValue, hl as SelectValue, hn as useSensor, ho as resolveOnColorForThemeToken, hr as buildGiftingInteractiveIslandProps, hs as getBlockIconSemanticFallbackId, ht as useEntryEditorController, hu as composeEventHandlers, i as usePreviewDesignHistoryOrder, ia as NAV_LINK_PADDING_X_MAP, ic as inlineTextToPlainText, id as ok$3, if as __commonJSMin, ii as PUBLIC_FILE_FIELD_KINDS, il as FieldFrame, in as DEFAULT_LAUNCH_READINESS_INPUT, io as normalizeEventStaffMemberId, ir as findEventByOccurrenceId, is as PUBLIC_DOWNLOAD_MEDIA_TYPES, it as RichTextEditorSurface, iu as __extends, ja as eventListPaginationActionSchema, jd as GripVertical, jl as Dialog, jn as planSiteOverlayHeaderClearance, jo as groupEventsByDate, jr as EMPTY_COMMERCE_CART_STATE, js as ChevronLeftIcon, ju as formatBookingTime, ka as resolveSpacing, kc as getAtPath, kd as ImageUp, kl as Trigger$1, kn as SITE_CHROME_VISIBLE_HEADER_SELECTOR, ko as getCardOrientation, kr as formatCommercePrice, ks as CheckIcon$1, kt as createRoutingHelpers, ku as formatBookingDateTime, la as LABEL_FONT_SIZE_MAP, lc as buildResolveImageUrlContext, li as MQ_SM_UP, ll as TooltipTrigger, ln as PointerSensor, lo as generateCardCss, lr as WIZARD_STEPS$1, ls as getFeatureCardIconCompletion, lt as useEditor, lu as __spreadArrays, ma as ctaButton, mc as resolveImageUrlWithContext, md as Sparkles, mi as resolveSectionForegroundStyles, ml as SelectTrigger, mn as useDroppable, mo as isCssColorLiteral, mr as giftingBlockDefinition, ms as buildGeneratedBlockIconRenderAssetLookupFromUnknown, mu as createContextScope, n as useSiteChromeCustomizeOptional, na as NAV_LINK_LETTER_SPACING_MAP, nc as isRecord$17, nd as unsafeAsPositiveSeconds, nf as ArrowDown, ni as bodyCopyFragment, nl as mapOptionValueForSelect, nn as reorderEntrySlotBlocks, no as normalizeEventCategoryIdsCsv, nr as buildEventRegistrationInteractiveIslandProps, ns as ICON_CONFIG, nt as useRichTextEditor, nu as __assign, oa as FONT_WEIGHT_MAP, oc as parseInlineTextFromUnknown, od as X, of as __toESM, oi as MQ_LG_UP, ol as Tooltip, on as AMBIENT_BACKGROUND_ROLES$1, oo as normalizeEventSurfaceScope, or as resolveDiscountContext, os as FEATURE_CARD_ICON_TREATMENTS, ot as insertOrReplaceRichTextImage, ou as __read, pa as runTransforms, pc as renderVideo, pd as Star, pi as boxStylesTransforms, pl as SelectItem, pn as useDraggable, po as normalizeCardVariantRole, pr as resolveEventRegistrationScopedEvents, ps as toFeatureCardIconSuggestionInputs, pt as EntryControllerProvider, pu as useControllableState, q as deriveTransactionCapabilities, qa as eventCalendarListLayoutCompatibleDisplayModeValues, qc as getFieldIntent, qd as CircleAlert, ql as CardHeader, qn as eventListingBlockDefinition, qo as markEditableSurfaceForwarding, qr as footerBottomTextFragment, qs as PhoneIcon, qt as applyPageDesignEditorAction, qu as parseMediaAssetId, r as PreviewDesignHistoryOrderProvider, ra as NAV_LINK_PADDING_MAP, rc as coerceInlineTextWithFallback, rd as err$2, rf as Archive, ri as defineFragment, rl as unmapValueFromSelect, rn as decodePublicProductCategorySelectorQuery, ro as normalizeEventScheduleScope, rr as toRegistrationEvents, rs as ICON_SIZE_PX, rt as EMPTY_DOC, ru as __awaiter, sa as INPUT_FONT_SIZE_MAP, sc as ImagePresets, sd as Upload, si as MQ_MD_DOWN, sl as TooltipContent, sn as DndContext, so as normalizeEventVenueId, sr as resolveEventRequiresPayment, ss as applyFeatureCardIconSuggestions, st as InlineTextEditor, su as __rest, t as SiteChromeCustomizeProvider, ta as NAV_LINK_BORDER_RADIUS_MAP, tc as isObjectRecord, td as unsafeAsPositiveByteCount$1, tf as ArrowUp, ti as heroCopyFragment, tl as mapCurrentValueForSelect, tn as reorderBlocks, to as normalizeEventBlockKind, tr as eventRegistrationBlockDefinition, ts as ACCORDION_TRIGGER_LETTER_SPACING, tt as PreviewTextEditor, tu as DropdownMenuTrigger, ua as expandPalette, uc as computeMediaTransformStyle, ud as Trash2, ui as MQ_TABLET_ONLY, ul as Textarea, un as closestCenter, uo as statusMutedColorDeclaration, ur as getStepNumber$1, us as shouldReserveFeatureCardIconZone, uu as useId$1, v as PreviewThemeOverlayProvider, va as OFFERINGS_PREVIEW_EVENT_PRESET_DEFINITIONS, vc as SECTION_BACKGROUND_MIN_SOURCE_WIDTH, vd as RotateCcw, vi as applyCompiledRuntimeFieldsToContent, vl as Popover, vn as isKeyboardEvent, vo as featuresFromHex, vr as checkoutBlockDefinition, vs as resolveBlockIconRenderValue, vt as useEditorUiStoreInstance, vu as cva, wa as resolveOfferingsPreviewCoursePath, wc as parseAspectRatioValue, wi as designRuntimeRulesForTheme, wl as TabsList, wn as GRADIENT_PRESETS, wo as formatEventDateParts, wr as buildShopInteractiveIslandProps, ws as isSemanticIconId, wt as redoHistory, wu as createEditorReorderBlocksCommand, xa as isOfferingsPreviewSourceKey, xc as isRotationDimensionSwap, xd as Pencil, xi as planPageDesignLayoutLookCompatibility, xl as Input, xn as useUniqueId, xo as toLocationMapHydrationProps, xr as buildCheckoutInteractiveIslandProps, xs as resolveIconPickerPreset, xt as canUndoHistory, xu as clsx, y as usePreviewThemeOverlay, ya as buildOfferingsPreviewRenderStates, yc as resolveMediaSlotContract, yi as buildEditorModelRuntimeFieldsByBlockId, yl as PopoverContent, yn as useCombinedRefs, yo as buildGoogleMapsDirectionsUrl, yr as cartBlockDefinition, ys as parseSiteIconStyleGuideVersionId, yt as useOptionalEditorUiStoreInstance, yu as useComposedRefs, za as calendarTabViewsSchema, zc as parseThemeButtonVariantId, zd as EyeOff, zi as BACKGROUND_BODY_TEXT_MIN_CONTRAST_RATIO, zl as CollapsibleContent, zn as isInternalResolvedLinkValue, zo as buildInteractiveIslandProps, zr as augmentManifestWithStyleGroups, zs as FileArchiveIcon, zt as ManifestForm, zu as publicEventPricingCurrency } from "./SiteChromeCustomizeContext-GwZc89KN.mjs";
|
|
3
|
-
import { i as useOptionalPreviewLayout, t as PreviewQueryProvider } from "./PreviewQueryProvider-
|
|
4
|
-
import { _ as API_ENDPOINTS, a as usePreviewToken, c as createBearerAPIClient, d as unwrapResponse, g as resolveSurfaceDocumentAttributes, h as SURFACE_IDS, i as usePreviewAuthFetch, l as ApiEnvelopeError, m as SURFACE_DOCUMENT_DATA_ATTRIBUTE, n as markPreviewAuthExpired, o as isPreviewRuntimeSessionEditable, r as usePreviewAuth, s as ApiRequestError, t as initPreviewAuth, u as extractApiEnvelopeErrorDetails } from "./previewAuthStore-
|
|
2
|
+
import { $ as PreviewRichTextEditor, $a as eventCalendarListLayoutOptions, $c as getModalConfig, $d as ChevronsUpDown, $i as isThemeV2NormalEditorRawStyleFieldName, $l as CardTitle, $n as buildEventCalendarListingRender, $o as splitPositioningClasses, $r as ctaCopyFragment, $s as PlayIcon, $t as deleteEntrySlotBlock, $u as parseSiteId, Aa as resolveOfferingsPreviewGroupCta, Ac as resolveMediaTransformForAspect, Ad as Minus, Ai as surfaceResolutionContextFromTheme, Al as TabsTrigger, An as SITE_CHROME_VISIBLE_HEADER_SELECTOR, Ao as formatEventPrice, Ar as formatCommercePrice, As as ArrowDownIcon, At as createRoutingHelpers, Au as unsafeAsEditorBlockId, Ba as resolveEventListPaginationAction, Bc as generateShadowValue$1, Bd as FilePlay, Bi as defaultSectionTransitionVariantForFamily, Bl as DialogFooter, Bn as isInternalResolvedLinkValue, Bo as getLocalDateKey, Br as augmentManifestWithStyleGroups, Bs as CirclePlusIcon, Bt as ManifestForm, Bu as resolveBookingTimeZoneId, Ca as OFFERINGS_PREVIEW_EVENT_PRESET_DEFINITIONS, Cc as SECTION_BACKGROUND_MIN_SOURCE_WIDTH, Cd as RotateCcw, Ci as retargetCompiledRuntimeFieldsForContentAdjacency, Cl as Popover, Cn as isSupportedLoaderEndpoint, Co as featuresFromHex, Cr as buildProductDetailInteractiveIslandProps, Cs as resolveBlockIconRenderValue, Ct as pushHistoryEntry, Cu as cva, Da as normalizeOfferingsPreviewGroupOrder, Dc as normalizeRightAngle, Dl as Tabs, Dn as listBlockDescriptors, Do as formatDate$3, Dr as buildCartDisplay, Ds as SEMANTIC_ICON_DEFINITIONS, Dt as recordsEqual, Du as createEditorInsertBlockCommand, Ea as isOfferingsPreviewSourceKey, Ec as isRotationDimensionSwap, Ed as Pencil, Ei as resolveVisiblePromotedFieldPathsForEditorBlock, El as Input, En as getBlockDefinition, Eo as toLocationMapHydrationProps, Er as getShopDisplayForItems, Es as resolveIconPickerPreset, Et as unsafeAsLinkedContentEntryId, Eu as clsx, Fa as buildEventRuntimeFilters, Fc as siblingPath$1, Fd as ImagePlus, Fl as ScrollableDialogContent, Fn as mediaTransforms, Fo as getContainerClass, Fr as deriveCommerceCheckoutState, Fs as ChevronDownIcon, Ft as PaletteProvider, Fu as formatBookingInstant, G as beginAutosaveBatch, Ga as columnOptionSchema, Gc as themeButtonClassName, Gd as EllipsisVertical, Gi as backgroundAppearanceColorTokenNames, Gn as productDetailBlockDefinition, Go as createInteractiveIslandCodec, Gr as faqHeadingFragment, Gs as FileAudioIcon, Gt as createStoreBackend, Gu as publicEventPricingMode, Ha as normalizeCsvString, Hc as generateInteractiveChildInheritanceCSS, Hd as FileArchive, Hi as sectionTransitionFamilyForBoundaryOptionId, Hl as DialogTitle, Hn as useImageResolveContextOptional, Ho as resolveRuntimeEventPricing, Hr as headingFragment, Hs as DownloadIcon, Hu as toScheduledBookingDateTime, Ia as eventListPaginationActionSchema, Id as GripVertical, Il as Dialog, In as layoutTransforms, Io as groupEventsByDate, Ir as parseStoredCommerceCartState, Is as ChevronLeftIcon, It as usePalette, Iu as formatBookingTime, J as enqueueTransaction, Ja as eventLayoutSchema, Jc as mergeStyles, Jd as Copy, Ji as parseBackgroundAppearanceColorToken, Jl as Trigger, Jn as eventListingBlockDefinition, Jo as defineClientOwnedBlockRuntime, Jr as footerBottomTextFragment, Js as InfoIcon, Jt as applyPageDesignEditorAction, Ju as publicEventTicketTypes, K as confirmAutosaveBatch, Ka as eventButtonVariantSchema, Kc as backgroundColorStyle, Kd as Crop, Ki as backgroundAppearanceQuickColorTokenNames, Kl as Content, Kn as newsletterSignupBlockDefinition, Ko as defineInteractiveIslandMetaKeys, Kr as blogFeaturedPostFragment, Ks as FileSpreadsheetIcon, Kt as listContentTypes, Ku as publicEventPricingType, La as eventPageSizeSchema, Ld as File, Ll as DialogClose, Ln as uiTransforms, Lo as resolveEventCta, Lr as productItemKey, Ls as ChevronRightIcon, Lt as recoveryConflictCopy, Lu as formatLocalScheduleDate, Ma as resolveOfferingsPreviewGroups, Mc as getDirectImageUrlForMediaAsset, Md as LoaderCircle, Ml as List, Mn as planSiteOverlayHeaderClearance, Mo as formatEventTeacherLine, Mr as EMPTY_COMMERCE_CART_STATE, Ms as ArrowRightIcon, Mu as addLocalScheduleDays, Na as isSemanticSpacing, Nc as getImageUrl, Nd as Image, Nl as Root2$1, Nn as visibleHeaderClearancePx, No as formatTime$3, Nr as buildPassCartItem, Ns as CalendarIcon$1, Nu as formatBookingDate, Oa as normalizeOfferingsPreviewItemLimit, Oc as formatAspectRatioToken, Oi as designRuntimeRulesForTheme, Ol as TabsContent, On as siteFooterManifest, Oo as formatEventCompactDateRail, Or as buildProductCardDisplay, Os as getSemanticIconComponent, Ou as createEditorRemoveBlockCommand, Pa as resolveSpacing, Pc as getAtPath, Pd as ImageUp, Pl as Trigger$1, Pn as contentTransforms, Po as getCardOrientation, Pr as buildProductCartItem, Ps as CheckIcon$1, Pu as formatBookingDateTime, Q as resolvePreviewSidebarTab, Qa as eventCalendarListLayoutCompatibleDisplayModeValues, Qc as getFieldIntent, Qd as CircleAlert, Ql as CardHeader, Qn as buildEventCalendarListingDisplay, Qo as markEditableSurfaceForwarding, Qr as testimonialsHeadingFragment, Qs as PhoneIcon, Qt as deleteBlock, Qu as parseMediaAssetId, Ra as getEventRuntimeFiltersKey, Rc as generateButtonCss, Rd as FileText, Rl as DialogContent, Rn as formattingTransforms, Ro as resolveEventLinkProps, Rr as reduceCommerceCart, Rs as ChevronUpIcon, Rt as unfinishedBlockCopy, Ru as getBookingLocalDateKey, Sc as setContextResolveImageUrlContext, Sd as Search, Si as retargetCompiledBoundaryRuntimeForContentAdjacency, Sl as Badge, Sn as useUniqueId, So as getTextColorForBackground, Sr as buildCheckoutInteractiveIslandProps, Ss as parseBlockIconValue, St as createHistoryState, Su as Button, Ta as inferLegacyOfferingsPreviewGroupOrder, Tc as attachRenderableMediaAssetFields, Td as Plus, Ti as planPageDesignLayoutLookCompatibility, Tl as PopoverTrigger, Tn as GRADIENT_PRESETS, To as normalizeLocationMapProps, Tr as buildShopInteractiveIslandProps, Ts as isIconPickerPreset, Tt as undoHistory, Tu as cn$1, Ua as normalizeOptionalId, Uc as TokenResolver, Ui as sectionTransitionVariantForBoundaryOptionId, Ul as Collapsible, Un as shopBlockDefinition, Uo as blockBookingPaymentTermsSchema, Ur as cardFragment, Us as ExternalLinkIcon, Ut as FormRenderer, Uu as formatBookingPriceDisplay, Va as normalizeCsvIds, Vc as generateBaseInteractiveCSS, Vd as FileHeadphone, Vi as sectionTransitionFamilies, Vl as DialogHeader, Vn as ImageResolveContextProvider, Vo as getLocalMinuteOfDay, Vr as richTextFragment, Vs as ClockIcon$1, Vt as createManifestFormAdapter, Vu as toBookingTimeZone, Wa as calendarTabViewsSchema, Wc as parseThemeButtonVariantId, Wd as EyeOff, Wi as BACKGROUND_BODY_TEXT_MIN_CONTRAST_RATIO, Wl as CollapsibleContent, Wn as productListBlockDefinition, Wo as buildInteractiveIslandProps, Wr as faqAccordionFragment, Ws as FileArchiveIcon, Wt as evaluateVisibility, Wu as publicEventPricingCurrency, X as rejectAutosaveBatch, Xa as previewStageSchema, Xc as textColorStyle, Xd as CircleMinus, Xl as Card, Xn as eventCalendarBlockDefinition, Xr as formCopyFragment, Xs as MapPinIcon$1, Xt as createBlock, Xu as assertNever$5, Y as idleEditorTransactionQueueState, Ya as filterAutoShowSchema, Yc as rgbColorValue, Yd as CirclePlus, Yi as defaultThemeTokens, Yl as createCollapsibleScope, Yn as buildEventListingInteractiveIslandProps, Yo as defineProgressiveBlockRuntime, Yr as formEmbedFragment, Ys as MailIcon, Yt as getPageDesignEditorState, Yu as formatCurrencyAmount, Za as weekStartSchema, Zc as useBackendWatch, Zd as CircleCheck, Zl as CardContent, Zn as buildEventCalendarInteractiveIslandProps, Zo as composeHeaderSectionWrapperClassName, Zr as testimonialsCarouselFragment, Zs as MinusIcon, Zt as createEntrySlotBlock, Zu as expectParsedBrandedId, _a as createTransformRegistry, _c as renderAudio, _i as mergeHeaderNavTypographyPreference, _l as SelectContent, _n as useSensors, _o as normalizeBoxStylesCardVariant, _r as courseRegistrationBlockDefinition, _s as suggestSemanticIconForFeatureCard, _t as useEditorUiStore, _u as createCollection, aa as parseCustomCssRules, ac as unwrapRichTextRoot, ad as unsafeAsPassId, af as Box, ai as PUBLIC_FILE_FIELD_KINDS, al as hasEmptyOption, an as DEFAULT_LAUNCH_READINESS_INPUT, ao as eventSurfaceScopeValues, ar as findEventByOccurrenceId, as as ACCORDION_TRIGGER_FONT_SCALE, at as getRichTextImagePositionFromTarget, au as DropdownMenuSeparator, bc as resolveMediaNodeResponsiveImage, bi as applyCompiledRuntimeFieldsToContent, bl as SelectValue, bn as useCombinedRefs, bo as resolveOnColorForThemeToken, br as cartBlockDefinition, bs as getBlockIconSemanticFallbackId, bt as canRedoHistory, bu as composeEventHandlers, ca as NAV_LINK_PADDING_MAP, cc as coerceInlineTextWithFallback, cd as err$2, cf as Archive, ci as MQ_MD_DOWN, cl as unmapValueFromSelect, cn as DndContext, co as normalizeEventScheduleScope, cr as resolveEventRequiresPayment, cs as ICON_SIZE_PX, ct as EditorProvider, cu as __awaiter, da as FONT_WEIGHT_MAP, dc as parseInlineTextFromUnknown, dd as X, df as __toESM, di as MQ_TABLET_ONLY, dl as Tooltip, dn as closestCenter, do as normalizeEventSurfaceScope, dr as getStepNumber$1, ds as FEATURE_CARD_ICON_TREATMENTS, dt as useUISelector, du as __read, ea as isThemeV2NormalEditorRawStylePath, ec as PlusIcon, ed as unsafeAsAppointmentResourceId, ef as ChevronUp, ei as heroCtaRowFragment, el as isHeaderField, eo as el, er as formBlockDefinition, es as planSiteChromePlacement, et as PreviewInlineTextEditor, fa as INPUT_FONT_SIZE_MAP, fc as ImagePresets, fd as Upload, fi as BACKGROUND_POSITION_PRESET_VALUES, fl as TooltipContent, fn as getClientRect, fo as normalizeEventVenueId, fr as getWizardStepsForContext$1, fs as applyFeatureCardIconSuggestions, ft as EditableBlockProvider, fu as __rest, g as PreviewDesignCoordinatorProvider, ga as generateCssVars, gc as getCurrentResolveImageUrlContext, gd as Ticket, gi as resolveBackgroundColorValue, gl as Select, gn as useSensor, go as generateShadowValue, gr as buildGiftingInteractiveIslandProps, gs as suggestFeatureCardSemanticIcons, gu as useDirection, ha as expandPalette, hc as computeMediaTransformStyle, hd as Trash2, hi as resolveSectionForegroundStyles, hl as Textarea, hn as useDroppable, ho as statusMutedColorDeclaration, hr as giftingBlockDefinition, hs as shouldReserveFeatureCardIconZone, ht as useEntryEditorController, hu as useId$1, i as usePreviewDesignHistoryOrder, ia as parseBlockCustomCssRules, ic as createRichTextDocFromMarkdown, id as unsafeAsMediaAssetId, if as Check, ii as defineFragment, il as useSdkConfig, in as decodePublicProductCategorySelectorQuery, io as eventScheduleScopeValues, ir as toRegistrationEvents, is as ACCORDION_SPACING_MAP, it as RichTextEditorSurface, ja as resolveOfferingsPreviewGroupOrderEntries, jc as asRecord, jl as Content$1, jn as SITE_OVERLAY_HEADER_CLEARANCE_CSS_VAR, jo as formatEventPriceDisplay, jr as formatInterval, js as ArrowLeftIcon, jt as createSnapshotFromPageRecord, ju as unsafeAsEditorBlockValues, ka as resolveOfferingsPreviewCoursePath, kc as parseAspectRatioValue, ki as getCuratedSiteStyle, kl as TabsList, kn as siteHeaderManifest, ko as formatEventDateParts, kr as buildProductDetailDisplay, ks as isSemanticIconId, kt as useDebouncedLatestSave, ku as createEditorReorderBlocksCommand, la as NAV_LINK_PADDING_X_MAP, lc as inlineTextToPlainText, ld as ok$3, lf as __commonJSMin, li as MQ_SM_DOWN, ll as FieldFrame, ln as KeyboardCode, lo as normalizeEventStaffMemberId, lr as resolveRegistrationTarget, ls as PUBLIC_DOWNLOAD_MEDIA_TYPES, lt as useEditor, lu as __extends, ma as LABEL_FONT_SIZE_MAP, mc as buildResolveImageUrlContext, mi as boxStylesTransforms, ml as TooltipTrigger, mn as useDraggable, mo as generateCardCss, mr as resolveEventRegistrationScopedEvents, ms as getFeatureCardIconCompletion, mu as __spreadArrays, n as useSiteChromeCustomizeOptional, na as getComponentBorderWidthPx, nc as UploadIcon, nd as unsafeAsCustomerPassId, nf as ChevronLeft, ni as heroCopyFragment, nl as useBlockContext, nn as reorderBlocks, no as bindingSchema, nr as eventRegistrationBlockDefinition, ns as assertNever$6, nt as useRichTextEditor, nu as DropdownMenuContent, oa as NAV_LINK_BORDER_RADIUS_MAP, oc as isObjectRecord, od as unsafeAsPositiveByteCount$1, of as ArrowUp, oi as siteOptionSources, ol as mapCurrentValueForSelect, on as deriveLaunchReadiness, oo as normalizeEventBlockKind, or as findPreSelectedEvent, os as ACCORDION_TRIGGER_LETTER_SPACING, ot as insertOrReplaceRichTextImage, ou as DropdownMenuTrigger, pa as INPUT_SPACING_MAP, pc as MediaPlaceholder, pi as getAnchorClasses, pl as TooltipProvider, pn as useDndContext, po as publicEventSchema, pr as normalizeEventRegistrationPageSurfaceSubject, ps as createFeatureCardIconKey, pt as EntryControllerProvider, pu as __spreadArray, q as deriveTransactionCapabilities, qa as eventCalendarDefaultViewSchema, qc as borderColorStyle, qd as CreditCard, qi as foregroundTokenForBackgroundAppearanceColorToken, ql as Root, qn as buildNewsletterFormInteractiveIslandProps, qo as createZodCodec, qr as singleButtonFragment, qs as FileTextIcon, qt as toRoutableLinkPayload, qu as publicEventScalarPrice, r as PreviewDesignHistoryOrderProvider, ra as getComponentShadowVar, rc as XIcon, rd as unsafeAsFormId, rf as ChevronDown, ri as bodyCopyFragment, rl as SdkConfigProvider, rn as reorderEntrySlotBlocks, ro as eventBlockKindValues, rr as buildEventRegistrationInteractiveIslandProps, rs as ACCORDION_OPEN_ACCENT_THICKNESS, rt as EMPTY_DOC, ru as DropdownMenuItem, sa as NAV_LINK_LETTER_SPACING_MAP, sc as isRecord$19, sd as unsafeAsPositiveSeconds, sf as ArrowDown, si as MQ_LG_UP, sl as mapOptionValueForSelect, sn as AMBIENT_BACKGROUND_ROLES$1, so as normalizeEventCategoryIdsCsv, sr as resolveDiscountContext, ss as ICON_CONFIG, st as InlineTextEditor, su as __assign, t as SiteChromeCustomizeProvider, ta as pageDesignEditorBackgroundOverrideOwner, tc as ShoppingCartIcon, td as unsafeAsAppointmentServiceId, tf as ChevronRight, ti as ctaRowFragment, tl as isNonEmptyValue, tn as mutateBlockContent, to as when, tr as buildFormInteractiveIslandProps, ts as asDesignBlockId, tt as PreviewTextEditor, tu as DropdownMenu, ua as NAV_LINK_TEXT_SIZE_MAP, uc as isInlineTextEmpty, ud as lucide_react_exports, uf as __exportAll, ui as MQ_SM_UP, ul as useField, un as PointerSensor, uo as normalizeEventSurfacePresetsCsv, ur as WIZARD_STEPS$1, us as mediaSchema, uu as __generator, v as PreviewThemeOverlayProvider, va as runTransforms, vc as renderVideo, vd as Star, vi as formatSiteChromeBackgroundTokenLabel, vl as SelectItem, vn as CSS, vo as normalizeCardVariantRole, vr as buildCourseRegistrationInteractiveIslandProps, vs as toFeatureCardIconSuggestionInputs, vt as useEditorUiStoreInstance, vu as useControllableState, wa as buildOfferingsPreviewRenderStates, wc as resolveMediaSlotContract, wi as normalEditorCuratedPromotedFieldPaths, wl as PopoverContent, wn as gradientToCss, wo as buildGoogleMapsDirectionsUrl, wr as buildProductListInteractiveIslandProps, ws as parseSiteIconStyleGuideVersionId, wt as redoHistory, wu as useComposedRefs, xc as resolveMediaStorageUrl, xd as Settings, xi as compileEditorModelRuntime, xl as Label, xn as useIsomorphicLayoutEffect, xo as resolveTokenOrCssColorValue, xr as buildCartInteractiveIslandProps, xs as getGeneratedBlockIconStyleState, xt as canUndoHistory, xu as Primitive, y as usePreviewThemeOverlay, ya as ctaButton, yc as resolveImageUrlWithContext, yd as Sparkles, yi as PAGE_DESIGN_EDITOR_STATE_FETCH_ERROR_MESSAGE, yl as SelectTrigger, yn as isKeyboardEvent, yo as isCssColorLiteral, yr as checkoutBlockDefinition, ys as buildGeneratedBlockIconRenderAssetLookupFromUnknown, yt as useOptionalEditorUiStoreInstance, yu as createContextScope, za as resolveEventCalendarListPageSize, zc as generateEffectsCSS, zd as FileSpreadsheet, zi as boundaryRuntimeMetricsForTransition, zl as DialogDescription, zn as createManifestValidator, zo as getEventAvailability, zr as augmentManifest, zs as CircleMinusIcon, zt as validateBlockManifestIssues, zu as parseBookingLocalDate } from "./SiteChromeCustomizeContext-CO1sTK_W.mjs";
|
|
3
|
+
import { i as useOptionalPreviewLayout, t as PreviewQueryProvider } from "./PreviewQueryProvider-ZF6TXq5Q.mjs";
|
|
4
|
+
import { _ as API_ENDPOINTS, a as usePreviewToken, c as createBearerAPIClient, d as unwrapResponse, g as resolveSurfaceDocumentAttributes, h as SURFACE_IDS, i as usePreviewAuthFetch, l as ApiEnvelopeError, m as SURFACE_DOCUMENT_DATA_ATTRIBUTE, n as markPreviewAuthExpired, o as isPreviewRuntimeSessionEditable, r as usePreviewAuth, s as ApiRequestError, t as initPreviewAuth, u as extractApiEnvelopeErrorDetails } from "./previewAuthStore-ByPPZqmp.mjs";
|
|
5
5
|
import * as React$1 from "react";
|
|
6
6
|
import React, { Children, Component, Fragment, cloneElement, createContext, createElement, createRef, forwardRef, isValidElement, memo, startTransition, useCallback, useContext, useEffect, useId, useImperativeHandle, useLayoutEffect, useMemo, useReducer, useRef, useState, useSyncExternalStore } from "react";
|
|
7
7
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1280,7 +1280,7 @@ var BlockApiError = class extends Error {
|
|
|
1280
1280
|
this.name = "BlockApiError";
|
|
1281
1281
|
}
|
|
1282
1282
|
};
|
|
1283
|
-
function isRecord$
|
|
1283
|
+
function isRecord$18(value) {
|
|
1284
1284
|
return typeof value === "object" && value !== null;
|
|
1285
1285
|
}
|
|
1286
1286
|
function isJsonResponseContentType(contentType) {
|
|
@@ -1304,8 +1304,8 @@ async function parseJsonBody(response) {
|
|
|
1304
1304
|
}
|
|
1305
1305
|
}
|
|
1306
1306
|
function getBlockApiErrorDetails(data) {
|
|
1307
|
-
if (!isRecord$
|
|
1308
|
-
const nestedError = isRecord$
|
|
1307
|
+
if (!isRecord$18(data)) return {};
|
|
1308
|
+
const nestedError = isRecord$18(data.error) ? data.error : void 0;
|
|
1309
1309
|
return {
|
|
1310
1310
|
message: typeof nestedError?.message === "string" ? nestedError.message : typeof data.message === "string" ? data.message : void 0,
|
|
1311
1311
|
code: typeof nestedError?.code === "string" ? nestedError.code : typeof data.code === "string" ? data.code : void 0
|
|
@@ -2065,15 +2065,15 @@ function Grid({ as: Comp = "div", cols = {
|
|
|
2065
2065
|
}
|
|
2066
2066
|
//#endregion
|
|
2067
2067
|
//#region ../blocks/src/system/runtime/nodes/layout.tsx
|
|
2068
|
-
const SectionNode = ({ blockId: _blockId, blockKind: _blockKind, blockContent: _blockContent, fragmentRegistry: _fragmentRegistry, pathBase: _pathBase, allowOverflow, ...props }) => /* @__PURE__ */ jsx(Section, {
|
|
2068
|
+
const SectionNode = ({ blockId: _blockId, blockKind: _blockKind, blockContent: _blockContent, fragmentRegistry: _fragmentRegistry, previewAuthoring: _previewAuthoring, pathBase: _pathBase, allowOverflow, ...props }) => /* @__PURE__ */ jsx(Section, {
|
|
2069
2069
|
...props,
|
|
2070
2070
|
allowOverflow
|
|
2071
2071
|
});
|
|
2072
|
-
const StackNode = ({ blockId: _blockId, blockKind: _blockKind, blockContent: _blockContent, fragmentRegistry: _fragmentRegistry, pathBase: _pathBase, ...props }) => /* @__PURE__ */ jsx(Stack, { ...props });
|
|
2073
|
-
const InlineNode = ({ blockId: _blockId, blockKind: _blockKind, blockContent: _blockContent, fragmentRegistry: _fragmentRegistry, pathBase: _pathBase, ...props }) => /* @__PURE__ */ jsx(Inline, { ...props });
|
|
2074
|
-
const GridNode = ({ blockId: _blockId, blockKind: _blockKind, blockContent: _blockContent, fragmentRegistry: _fragmentRegistry, pathBase: _pathBase, ...props }) => /* @__PURE__ */ jsx(Grid, { ...props });
|
|
2075
|
-
const DivNode = ({ blockId: _blockId, blockKind: _blockKind, blockContent: _blockContent, fragmentRegistry: _fragmentRegistry, pathBase: _pathBase, ...props }) => /* @__PURE__ */ jsx("div", { ...props });
|
|
2076
|
-
const FigureNode = ({ blockId: _blockId, blockKind: _blockKind, blockContent: _blockContent, fragmentRegistry: _fragmentRegistry, pathBase: _pathBase, ...props }) => /* @__PURE__ */ jsx("figure", { ...props });
|
|
2072
|
+
const StackNode = ({ blockId: _blockId, blockKind: _blockKind, blockContent: _blockContent, fragmentRegistry: _fragmentRegistry, previewAuthoring: _previewAuthoring, pathBase: _pathBase, ...props }) => /* @__PURE__ */ jsx(Stack, { ...props });
|
|
2073
|
+
const InlineNode = ({ blockId: _blockId, blockKind: _blockKind, blockContent: _blockContent, fragmentRegistry: _fragmentRegistry, previewAuthoring: _previewAuthoring, pathBase: _pathBase, ...props }) => /* @__PURE__ */ jsx(Inline, { ...props });
|
|
2074
|
+
const GridNode = ({ blockId: _blockId, blockKind: _blockKind, blockContent: _blockContent, fragmentRegistry: _fragmentRegistry, previewAuthoring: _previewAuthoring, pathBase: _pathBase, ...props }) => /* @__PURE__ */ jsx(Grid, { ...props });
|
|
2075
|
+
const DivNode = ({ blockId: _blockId, blockKind: _blockKind, blockContent: _blockContent, fragmentRegistry: _fragmentRegistry, previewAuthoring: _previewAuthoring, pathBase: _pathBase, ...props }) => /* @__PURE__ */ jsx("div", { ...props });
|
|
2076
|
+
const FigureNode = ({ blockId: _blockId, blockKind: _blockKind, blockContent: _blockContent, fragmentRegistry: _fragmentRegistry, previewAuthoring: _previewAuthoring, pathBase: _pathBase, ...props }) => /* @__PURE__ */ jsx("figure", { ...props });
|
|
2077
2077
|
//#endregion
|
|
2078
2078
|
//#region ../blocks/src/primitives/content/utils/sanitizeHref.ts
|
|
2079
2079
|
const SAFE_PROTOCOLS = /* @__PURE__ */ new Set([
|
|
@@ -2517,7 +2517,7 @@ function Text$1({ as: Comp = "span", children, className = "", path, maxLength:
|
|
|
2517
2517
|
function coerceRichTextDoc(value) {
|
|
2518
2518
|
const raw = unwrapRichTextRoot(value);
|
|
2519
2519
|
if (typeof raw === "string") return createRichTextDocFromMarkdown(raw);
|
|
2520
|
-
if (isRecord$
|
|
2520
|
+
if (isRecord$19(raw) && typeof raw.type === "string") return raw;
|
|
2521
2521
|
return null;
|
|
2522
2522
|
}
|
|
2523
2523
|
//#endregion
|
|
@@ -3634,12 +3634,12 @@ function resolveBookingSiteId(siteId, form) {
|
|
|
3634
3634
|
return siteId || form?.siteId || "";
|
|
3635
3635
|
}
|
|
3636
3636
|
function normalizeBookingFormConfig(form) {
|
|
3637
|
-
if (!isRecord$
|
|
3637
|
+
if (!isRecord$17(form)) return null;
|
|
3638
3638
|
const id = readNonEmptyString(form.id);
|
|
3639
3639
|
const name = readNonEmptyString(form.name);
|
|
3640
3640
|
if (!id || !name) return null;
|
|
3641
|
-
const schemaSource = isRecord$
|
|
3642
|
-
const settingsSource = isRecord$
|
|
3641
|
+
const schemaSource = isRecord$17(form.schema) ? form.schema : isRecord$17(form.schemaJson) ? form.schemaJson : null;
|
|
3642
|
+
const settingsSource = isRecord$17(form.settings) ? form.settings : isRecord$17(form.settingsJson) ? form.settingsJson : null;
|
|
3643
3643
|
return {
|
|
3644
3644
|
id,
|
|
3645
3645
|
name,
|
|
@@ -3659,8 +3659,8 @@ function normalizeBookingServices(services) {
|
|
|
3659
3659
|
};
|
|
3660
3660
|
if (!services) return [];
|
|
3661
3661
|
if (Array.isArray(services)) return services.filter(isBookingFormService).map(normalizeService);
|
|
3662
|
-
if (isRecord$
|
|
3663
|
-
return isRecord$
|
|
3662
|
+
if (isRecord$17(services) && "services" in services) return Array.isArray(services.services) ? services.services.filter(isBookingFormService).map(normalizeService) : [];
|
|
3663
|
+
return isRecord$17(services) ? Object.values(services).filter(isBookingFormService).map(normalizeService) : [];
|
|
3664
3664
|
}
|
|
3665
3665
|
function normalizeBookingSchema(value) {
|
|
3666
3666
|
if (!value) return void 0;
|
|
@@ -3671,7 +3671,7 @@ function normalizeBookingSchema(value) {
|
|
|
3671
3671
|
};
|
|
3672
3672
|
}
|
|
3673
3673
|
function readBookingFormField(value) {
|
|
3674
|
-
if (!isRecord$
|
|
3674
|
+
if (!isRecord$17(value)) return null;
|
|
3675
3675
|
const id = readNonEmptyString(value.id);
|
|
3676
3676
|
const label = readNonEmptyString(value.label);
|
|
3677
3677
|
const type = readBookingFieldType(value.type);
|
|
@@ -3715,7 +3715,7 @@ function readBookingFieldOptions(value) {
|
|
|
3715
3715
|
return options.length > 0 ? options : void 0;
|
|
3716
3716
|
}
|
|
3717
3717
|
function readBookingFieldOption(value) {
|
|
3718
|
-
if (!isRecord$
|
|
3718
|
+
if (!isRecord$17(value)) return null;
|
|
3719
3719
|
const optionValue = readNonEmptyString(value.value);
|
|
3720
3720
|
const label = readNonEmptyString(value.label);
|
|
3721
3721
|
return optionValue && label ? {
|
|
@@ -3735,7 +3735,7 @@ function normalizeBookingSettings(value) {
|
|
|
3735
3735
|
};
|
|
3736
3736
|
}
|
|
3737
3737
|
function isBookingFormService(value) {
|
|
3738
|
-
return isRecord$
|
|
3738
|
+
return isRecord$17(value) && typeof value.id === "string" && typeof value.siteId === "string" && typeof value.title === "string";
|
|
3739
3739
|
}
|
|
3740
3740
|
function collectBookingCustomFields(data) {
|
|
3741
3741
|
const customFields = {};
|
|
@@ -3785,7 +3785,7 @@ function readStringArray(value) {
|
|
|
3785
3785
|
const strings = value.filter((item) => typeof item === "string");
|
|
3786
3786
|
return strings.length > 0 ? strings : void 0;
|
|
3787
3787
|
}
|
|
3788
|
-
function isRecord$
|
|
3788
|
+
function isRecord$17(value) {
|
|
3789
3789
|
return typeof value === "object" && value !== null;
|
|
3790
3790
|
}
|
|
3791
3791
|
function getBookingServicePaymentSelectionMode(service) {
|
|
@@ -19249,7 +19249,7 @@ const LEAFLET_JS_INTEGRITY = "sha256-20nQCchB9co0qIjJZRGuk2/Z9VM+kNiyxNV1lvTlZBo
|
|
|
19249
19249
|
let leafletLoaded = false;
|
|
19250
19250
|
let leafletLoadPromise = null;
|
|
19251
19251
|
function isLeafletApi(value) {
|
|
19252
|
-
if (!isRecord$
|
|
19252
|
+
if (!isRecord$19(value)) return false;
|
|
19253
19253
|
return typeof value.map === "function" && typeof value.tileLayer === "function" && typeof value.marker === "function";
|
|
19254
19254
|
}
|
|
19255
19255
|
function loadLeaflet() {
|
|
@@ -20571,7 +20571,7 @@ Autoplay.globalOptions = void 0;
|
|
|
20571
20571
|
function isObject$2(subject) {
|
|
20572
20572
|
return Object.prototype.toString.call(subject) === "[object Object]";
|
|
20573
20573
|
}
|
|
20574
|
-
function isRecord$
|
|
20574
|
+
function isRecord$16(subject) {
|
|
20575
20575
|
return isObject$2(subject) || Array.isArray(subject);
|
|
20576
20576
|
}
|
|
20577
20577
|
function canUseDOM() {
|
|
@@ -20586,7 +20586,7 @@ function areOptionsEqual(optionsA, optionsB) {
|
|
|
20586
20586
|
const valueA = optionsA[key];
|
|
20587
20587
|
const valueB = optionsB[key];
|
|
20588
20588
|
if (typeof valueA === "function") return `${valueA}` === `${valueB}`;
|
|
20589
|
-
if (!isRecord$
|
|
20589
|
+
if (!isRecord$16(valueA) || !isRecord$16(valueB)) return valueA === valueB;
|
|
20590
20590
|
return areOptionsEqual(valueA, valueB);
|
|
20591
20591
|
});
|
|
20592
20592
|
}
|
|
@@ -27129,7 +27129,7 @@ function WeeklySlotAvailabilityClient({ serviceId, resourceId, horizonWeeks, tim
|
|
|
27129
27129
|
}
|
|
27130
27130
|
//#endregion
|
|
27131
27131
|
//#region ../blocks/src/system/runtime/components/registry.client.tsx
|
|
27132
|
-
function isRecord$
|
|
27132
|
+
function isRecord$15(value) {
|
|
27133
27133
|
return typeof value === "object" && value !== null;
|
|
27134
27134
|
}
|
|
27135
27135
|
function buildRenderFromLooseProps(runtime, mode, props) {
|
|
@@ -27148,12 +27148,12 @@ function withRuntimeBackedEnvelope(source, runtime, render) {
|
|
|
27148
27148
|
function normalizeLegacyInteractiveRenderProps(runtime, mode, props) {
|
|
27149
27149
|
const source = props;
|
|
27150
27150
|
const render = props["render"];
|
|
27151
|
-
if (!isRecord$
|
|
27152
|
-
if (isRecord$
|
|
27151
|
+
if (!isRecord$15(render)) return withRuntimeBackedEnvelope(source, runtime, buildRenderFromLooseProps(runtime, mode, props));
|
|
27152
|
+
if (isRecord$15(render["hydration"])) return withRuntimeBackedEnvelope(source, runtime, {
|
|
27153
27153
|
...render,
|
|
27154
27154
|
mode
|
|
27155
27155
|
});
|
|
27156
|
-
if (!isRecord$
|
|
27156
|
+
if (!isRecord$15(render["display"])) return withRuntimeBackedEnvelope(source, runtime, buildRenderFromLooseProps(runtime, mode, props));
|
|
27157
27157
|
const { display, mode: _legacyMode, ...legacyHydration } = render;
|
|
27158
27158
|
return withRuntimeBackedEnvelope(source, runtime, {
|
|
27159
27159
|
display,
|
|
@@ -27699,7 +27699,7 @@ const defaultTransforms = createTransformRegistry([
|
|
|
27699
27699
|
//#region ../blocks/src/system/data/linkedContentEntries.ts
|
|
27700
27700
|
const LINKED_CONTENT_ENTRY_META_KEY = "__rbLinkedContentEntry";
|
|
27701
27701
|
function coerceLinkedContentEntriesPayload(payload) {
|
|
27702
|
-
if (!isRecord$
|
|
27702
|
+
if (!isRecord$14(payload)) return payload;
|
|
27703
27703
|
const response = payload;
|
|
27704
27704
|
if (!Array.isArray(response.entries)) return payload;
|
|
27705
27705
|
const contentType = parsePublicContentTypeMeta(response.contentType);
|
|
@@ -27707,16 +27707,16 @@ function coerceLinkedContentEntriesPayload(payload) {
|
|
|
27707
27707
|
return response.entries.map((entry) => enrichLinkedContentEntry(entry, contentType));
|
|
27708
27708
|
}
|
|
27709
27709
|
function getLinkedContentEntryMeta(value) {
|
|
27710
|
-
if (!isRecord$
|
|
27710
|
+
if (!isRecord$14(value)) return null;
|
|
27711
27711
|
const candidate = value[LINKED_CONTENT_ENTRY_META_KEY];
|
|
27712
27712
|
return isLinkedContentEntryMeta(candidate) ? candidate : null;
|
|
27713
27713
|
}
|
|
27714
27714
|
function buildLinkedContentEditTarget(input) {
|
|
27715
27715
|
const { entry, sourceBlockId, sourceBlockKind, itemIndex } = input;
|
|
27716
|
-
if (!isRecord$
|
|
27716
|
+
if (!isRecord$14(entry)) return null;
|
|
27717
27717
|
const meta = getLinkedContentEntryMeta(entry);
|
|
27718
27718
|
if (!meta || meta.support.kind !== "supported") return null;
|
|
27719
|
-
const content = isRecord$
|
|
27719
|
+
const content = isRecord$14(entry.content) ? entry.content : {};
|
|
27720
27720
|
return {
|
|
27721
27721
|
kind: "linked-content-entry",
|
|
27722
27722
|
entryId: meta.entryId,
|
|
@@ -27780,12 +27780,12 @@ function resolveLinkedEntryInlineFieldEligibility(input) {
|
|
|
27780
27780
|
};
|
|
27781
27781
|
}
|
|
27782
27782
|
function enrichLinkedContentEntry(entry, contentType) {
|
|
27783
|
-
if (!isRecord$
|
|
27783
|
+
if (!isRecord$14(entry)) return entry;
|
|
27784
27784
|
const entryId = typeof entry.id === "string" ? entry.id : null;
|
|
27785
27785
|
if (!entryId) return entry;
|
|
27786
27786
|
const title = typeof entry.title === "string" && entry.title.trim().length > 0 ? entry.title : entryId;
|
|
27787
27787
|
const optimisticHash = typeof entry.optimisticHash === "string" && entry.optimisticHash.length > 0 ? entry.optimisticHash : null;
|
|
27788
|
-
const content = isRecord$
|
|
27788
|
+
const content = isRecord$14(entry.content) ? entry.content : {};
|
|
27789
27789
|
const meta = {
|
|
27790
27790
|
kind: "linked-content-entry",
|
|
27791
27791
|
entryId,
|
|
@@ -27881,7 +27881,7 @@ function capitalize(value) {
|
|
|
27881
27881
|
return value.charAt(0).toUpperCase() + value.slice(1).toLowerCase();
|
|
27882
27882
|
}
|
|
27883
27883
|
function parsePublicContentTypeMeta(value) {
|
|
27884
|
-
if (!isRecord$
|
|
27884
|
+
if (!isRecord$14(value)) return null;
|
|
27885
27885
|
if (typeof value.key !== "string" || value.key.trim().length === 0) return null;
|
|
27886
27886
|
return {
|
|
27887
27887
|
key: value.key,
|
|
@@ -27891,7 +27891,7 @@ function parsePublicContentTypeMeta(value) {
|
|
|
27891
27891
|
};
|
|
27892
27892
|
}
|
|
27893
27893
|
function parsePublicContentTypeLinkedEntryEditing(value) {
|
|
27894
|
-
if (!isRecord$
|
|
27894
|
+
if (!isRecord$14(value) || typeof value.kind !== "string") return null;
|
|
27895
27895
|
switch (value.kind) {
|
|
27896
27896
|
case "generic": return { kind: "generic" };
|
|
27897
27897
|
case "unsupported-domain-backed": return {
|
|
@@ -27902,7 +27902,7 @@ function parsePublicContentTypeLinkedEntryEditing(value) {
|
|
|
27902
27902
|
}
|
|
27903
27903
|
}
|
|
27904
27904
|
function parsePublicContentTypeFieldMeta(value) {
|
|
27905
|
-
if (!isRecord$
|
|
27905
|
+
if (!isRecord$14(value)) return [];
|
|
27906
27906
|
if (typeof value.id !== "string" || typeof value.type !== "string") return [];
|
|
27907
27907
|
return [{
|
|
27908
27908
|
id: value.id,
|
|
@@ -27917,14 +27917,14 @@ function parseStringArray(value) {
|
|
|
27917
27917
|
return value.filter((item) => typeof item === "string");
|
|
27918
27918
|
}
|
|
27919
27919
|
function isLinkedContentEntryMeta(value) {
|
|
27920
|
-
if (!isRecord$
|
|
27920
|
+
if (!isRecord$14(value)) return false;
|
|
27921
27921
|
if (value.kind !== "linked-content-entry") return false;
|
|
27922
27922
|
if (typeof value.entryId !== "string") return false;
|
|
27923
27923
|
if (typeof value.contentTypeKey !== "string") return false;
|
|
27924
27924
|
if (typeof value.contentTypeLabel !== "string") return false;
|
|
27925
27925
|
if (typeof value.title !== "string") return false;
|
|
27926
27926
|
if (!(value.optimisticHash === null || typeof value.optimisticHash === "string")) return false;
|
|
27927
|
-
if (!isRecord$
|
|
27927
|
+
if (!isRecord$14(value.contentType)) return false;
|
|
27928
27928
|
if (!isLinkedEntryFieldSourceArray(value.fieldSources)) return false;
|
|
27929
27929
|
return isLinkedContentEditSupport(value.support);
|
|
27930
27930
|
}
|
|
@@ -27932,7 +27932,7 @@ function isLinkedEntryFieldSourceArray(value) {
|
|
|
27932
27932
|
return Array.isArray(value) && value.every(isLinkedEntryFieldSource);
|
|
27933
27933
|
}
|
|
27934
27934
|
function isLinkedEntryFieldSource(value) {
|
|
27935
|
-
if (!isRecord$
|
|
27935
|
+
if (!isRecord$14(value)) return false;
|
|
27936
27936
|
if (typeof value.displayPath !== "string") return false;
|
|
27937
27937
|
switch (value.kind) {
|
|
27938
27938
|
case "content-field": return typeof value.fieldPath === "string" && (value.fieldType === "text" || value.fieldType === "richText");
|
|
@@ -27953,7 +27953,7 @@ function isLinkedEntryInlineFieldReadOnlyReason(value) {
|
|
|
27953
27953
|
}
|
|
27954
27954
|
}
|
|
27955
27955
|
function isLinkedContentEditSupport(value) {
|
|
27956
|
-
if (!isRecord$
|
|
27956
|
+
if (!isRecord$14(value) || typeof value.kind !== "string") return false;
|
|
27957
27957
|
switch (value.kind) {
|
|
27958
27958
|
case "supported": return true;
|
|
27959
27959
|
case "unsupported-domain-backed":
|
|
@@ -27962,7 +27962,7 @@ function isLinkedContentEditSupport(value) {
|
|
|
27962
27962
|
default: return false;
|
|
27963
27963
|
}
|
|
27964
27964
|
}
|
|
27965
|
-
function isRecord$
|
|
27965
|
+
function isRecord$14(value) {
|
|
27966
27966
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
27967
27967
|
}
|
|
27968
27968
|
//#endregion
|
|
@@ -28016,14 +28016,14 @@ function isDecoratedHeadingBlockKind(blockKind) {
|
|
|
28016
28016
|
return blockKind === "block.intro" || blockKind === "block.feature-cards" || blockKind === "block.testimonials" || blockKind === "block.faq";
|
|
28017
28017
|
}
|
|
28018
28018
|
function readVariant(blockContent) {
|
|
28019
|
-
if (!isRecord$
|
|
28019
|
+
if (!isRecord$13(blockContent)) return void 0;
|
|
28020
28020
|
const variant = blockContent.variant;
|
|
28021
28021
|
return typeof variant === "string" ? variant : void 0;
|
|
28022
28022
|
}
|
|
28023
28023
|
function isFaqDecoratedVariant(variant) {
|
|
28024
28024
|
return variant === "default" || variant === "question-columns";
|
|
28025
28025
|
}
|
|
28026
|
-
function isRecord$
|
|
28026
|
+
function isRecord$13(value) {
|
|
28027
28027
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
28028
28028
|
}
|
|
28029
28029
|
function buildHeadingDecorationWrapperClassName(className) {
|
|
@@ -28280,6 +28280,7 @@ function applyTransformsAndFallback(value, binding, context) {
|
|
|
28280
28280
|
viewModel: context.viewModel
|
|
28281
28281
|
}, transforms);
|
|
28282
28282
|
if (binding.transforms && binding.transforms.length > 0 && transformed === null) {
|
|
28283
|
+
if (binding.fallback !== void 0) return binding.fallback;
|
|
28283
28284
|
console.warn("[block-system] Transform returned null for binding", {
|
|
28284
28285
|
bindingFrom: binding.from,
|
|
28285
28286
|
transforms: binding.transforms?.map((t) => t.id)
|
|
@@ -30202,7 +30203,7 @@ function generateHeaderRootStyles(header, themeId, tokens, _theme) {
|
|
|
30202
30203
|
}
|
|
30203
30204
|
}
|
|
30204
30205
|
if (header.positioning === "sticky" || header.positioning === "fixed") {
|
|
30205
|
-
const shadowVar = getComponentShadowVar(header.shadow?.elevation ?? "
|
|
30206
|
+
const shadowVar = getComponentShadowVar(header.shadow?.elevation ?? "none");
|
|
30206
30207
|
if (shadowVar) rules.push(`box-shadow: ${shadowVar};`);
|
|
30207
30208
|
}
|
|
30208
30209
|
const baseBlock = `\n${selector} {\n ${rules.join("\n ")}\n}\n`;
|
|
@@ -30285,15 +30286,19 @@ function generateLogoTextBehaviorStyles(logoText, themeId) {
|
|
|
30285
30286
|
* legacy navStyle, navWeight, navColor, and navEffects settings.
|
|
30286
30287
|
*/
|
|
30287
30288
|
function generateNavLinkStyles(header, themeId, tokens, theme, contrastTreatment, navTextSize) {
|
|
30289
|
+
const navPreferences = {
|
|
30290
|
+
typography: header.navTypography ?? "inherit",
|
|
30291
|
+
fontSize: header.navTextSize ?? "inherit"
|
|
30292
|
+
};
|
|
30288
30293
|
if (header.navLinkStyle) return generateNavLinkCSS({
|
|
30289
30294
|
themeId,
|
|
30290
30295
|
tokens,
|
|
30291
30296
|
theme,
|
|
30292
|
-
style: contrastTreatment || navTextSize ? {
|
|
30297
|
+
style: mergeHeaderNavTypographyPreference(contrastTreatment || navTextSize ? {
|
|
30293
30298
|
...header.navLinkStyle,
|
|
30294
30299
|
...contrastTreatment ? { contrastTreatment } : {},
|
|
30295
30300
|
...navTextSize ? { textSize: navTextSize } : {}
|
|
30296
|
-
} : header.navLinkStyle,
|
|
30301
|
+
} : header.navLinkStyle, navPreferences),
|
|
30297
30302
|
className: "header-nav-link"
|
|
30298
30303
|
});
|
|
30299
30304
|
const navStyle = header.navStyle ?? "minimal";
|
|
@@ -30365,7 +30370,7 @@ function generateNavLinkStyles(header, themeId, tokens, theme, contrastTreatment
|
|
|
30365
30370
|
themeId,
|
|
30366
30371
|
tokens,
|
|
30367
30372
|
theme,
|
|
30368
|
-
style: mergedStyle,
|
|
30373
|
+
style: mergeHeaderNavTypographyPreference(mergedStyle, navPreferences),
|
|
30369
30374
|
className: "header-nav-link"
|
|
30370
30375
|
});
|
|
30371
30376
|
}
|
|
@@ -30756,6 +30761,9 @@ const boldWaveTransitionMask = svgDataUrl("<svg viewBox='0 0 1440 72' xmlns='htt
|
|
|
30756
30761
|
const driftWaveTransitionMask = svgDataUrl("<svg viewBox='0 0 1440 72' xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none'><path d='M0 72V39C115 31 205 54 340 48C505 41 610 16 760 33C920 51 1015 64 1160 44C1280 27 1375 35 1440 50V72H0Z' fill='white'/></svg>");
|
|
30757
30762
|
function generateSiteStyleTransitionCss(themeId) {
|
|
30758
30763
|
const selector = `:where([data-theme-scope="${themeId}"])`;
|
|
30764
|
+
const compactBoundaryHeight = requiredBoundaryHeightCss("wave-edge-gentle");
|
|
30765
|
+
const mediumBoundaryHeight = requiredBoundaryHeightCss("wave-edge");
|
|
30766
|
+
const largeBoundaryHeight = requiredBoundaryHeightCss("wave-edge-bold");
|
|
30759
30767
|
return `${selector} [data-style-group^='site-style-transition-'] {
|
|
30760
30768
|
position: relative;
|
|
30761
30769
|
z-index: 2;
|
|
@@ -30763,23 +30771,48 @@ function generateSiteStyleTransitionCss(themeId) {
|
|
|
30763
30771
|
--site-style-transition-to: rgb(var(--tb-background));
|
|
30764
30772
|
}
|
|
30765
30773
|
|
|
30766
|
-
${selector} [data-block-
|
|
30774
|
+
${selector} [data-block-boundary][data-style-group^='site-style-transition-'] {
|
|
30767
30775
|
position: relative;
|
|
30768
30776
|
z-index: 3;
|
|
30769
30777
|
height: 0;
|
|
30770
30778
|
pointer-events: none;
|
|
30779
|
+
--site-style-boundary-height: ${mediumBoundaryHeight};
|
|
30771
30780
|
}
|
|
30772
30781
|
|
|
30773
|
-
${selector} [data-block
|
|
30774
|
-
|
|
30775
|
-
|
|
30782
|
+
${selector} [data-block][data-site-style-boundary-before] > :where([data-slot='section']) {
|
|
30783
|
+
padding-top: calc(var(--rb-section-pad-y, 0rem) + var(--site-style-boundary-before-reserve, 0rem));
|
|
30784
|
+
}
|
|
30785
|
+
|
|
30786
|
+
${selector} [data-block][data-site-style-boundary-after] > :where([data-slot='section']) {
|
|
30787
|
+
padding-bottom: calc(var(--rb-section-pad-y, 0rem) + var(--site-style-boundary-after-reserve, 0rem));
|
|
30788
|
+
}
|
|
30789
|
+
|
|
30790
|
+
${selector} [data-block-boundary][data-style-group^='site-style-transition-wave-edge-']::before,
|
|
30791
|
+
${selector} [data-block-boundary][data-style-group^='site-style-transition-angle-edge-']::before,
|
|
30792
|
+
${selector} [data-block-boundary][data-style-group^='site-style-transition-soft-fade']::before {
|
|
30776
30793
|
content: '';
|
|
30777
30794
|
position: absolute;
|
|
30778
30795
|
left: 0;
|
|
30779
30796
|
right: 0;
|
|
30780
|
-
|
|
30797
|
+
top: 0;
|
|
30798
|
+
transform: translateY(-50%);
|
|
30799
|
+
z-index: 0;
|
|
30800
|
+
height: var(--site-style-boundary-height);
|
|
30801
|
+
background: var(--site-style-transition-from);
|
|
30802
|
+
pointer-events: none;
|
|
30803
|
+
}
|
|
30804
|
+
|
|
30805
|
+
${selector} [data-block-boundary][data-style-group^='site-style-transition-wave-edge-']::after,
|
|
30806
|
+
${selector} [data-block-boundary][data-style-group^='site-style-transition-angle-edge-']::after,
|
|
30807
|
+
${selector} [data-block-boundary][data-style-group^='site-style-transition-soft-fade']::after {
|
|
30808
|
+
content: '';
|
|
30809
|
+
position: absolute;
|
|
30810
|
+
left: 0;
|
|
30811
|
+
right: 0;
|
|
30812
|
+
top: 0;
|
|
30813
|
+
transform: translateY(-50%);
|
|
30781
30814
|
z-index: 1;
|
|
30782
|
-
height:
|
|
30815
|
+
height: var(--site-style-boundary-height);
|
|
30783
30816
|
pointer-events: none;
|
|
30784
30817
|
}
|
|
30785
30818
|
|
|
@@ -30817,7 +30850,7 @@ ${selector} [data-style-group$='-to-brand-depth-band'] {
|
|
|
30817
30850
|
--site-style-transition-to: rgb(var(--tb-primary-800));
|
|
30818
30851
|
}
|
|
30819
30852
|
|
|
30820
|
-
${selector} [data-block-
|
|
30853
|
+
${selector} [data-block-boundary][data-style-group^='site-style-transition-soft-fade']::after {
|
|
30821
30854
|
/* Fallback for browsers without color-mix(). */
|
|
30822
30855
|
background: linear-gradient(
|
|
30823
30856
|
to bottom,
|
|
@@ -30833,30 +30866,37 @@ ${selector} [data-block-transition][data-style-group^='site-style-transition-sof
|
|
|
30833
30866
|
);
|
|
30834
30867
|
}
|
|
30835
30868
|
|
|
30836
|
-
${selector} [data-block-
|
|
30837
|
-
height:
|
|
30869
|
+
${selector} [data-block-boundary][data-style-group^='site-style-transition-soft-fade-long-'] {
|
|
30870
|
+
--site-style-boundary-height: ${requiredBoundaryHeightCss("soft-fade-long")};
|
|
30838
30871
|
}
|
|
30839
30872
|
|
|
30840
|
-
${selector} [data-block-
|
|
30841
|
-
height:
|
|
30873
|
+
${selector} [data-block-boundary][data-style-group^='site-style-transition-soft-fade-expansive-'] {
|
|
30874
|
+
--site-style-boundary-height: ${requiredBoundaryHeightCss("soft-fade-expansive")};
|
|
30842
30875
|
}
|
|
30843
30876
|
|
|
30844
|
-
${selector} [data-block-
|
|
30877
|
+
${selector} [data-block-boundary][data-style-group^='site-style-transition-angle-edge-']::after {
|
|
30878
|
+
height: calc(var(--site-style-boundary-height) + 2px);
|
|
30845
30879
|
background: var(--site-style-transition-to);
|
|
30846
30880
|
clip-path: polygon(0 42%, 100% 8%, 100% 100%, 0 100%);
|
|
30847
30881
|
}
|
|
30848
30882
|
|
|
30849
|
-
${selector} [data-block-
|
|
30850
|
-
height:
|
|
30883
|
+
${selector} [data-block-boundary][data-style-group^='site-style-transition-angle-edge-subtle-'] {
|
|
30884
|
+
--site-style-boundary-height: ${compactBoundaryHeight};
|
|
30885
|
+
}
|
|
30886
|
+
|
|
30887
|
+
${selector} [data-block-boundary][data-style-group^='site-style-transition-angle-edge-subtle-']::after {
|
|
30851
30888
|
clip-path: polygon(0 34%, 100% 18%, 100% 100%, 0 100%);
|
|
30852
30889
|
}
|
|
30853
30890
|
|
|
30854
|
-
${selector} [data-block-
|
|
30855
|
-
height:
|
|
30891
|
+
${selector} [data-block-boundary][data-style-group^='site-style-transition-angle-edge-steep-'] {
|
|
30892
|
+
--site-style-boundary-height: ${largeBoundaryHeight};
|
|
30893
|
+
}
|
|
30894
|
+
|
|
30895
|
+
${selector} [data-block-boundary][data-style-group^='site-style-transition-angle-edge-steep-']::after {
|
|
30856
30896
|
clip-path: polygon(0 54%, 100% 0%, 100% 100%, 0 100%);
|
|
30857
30897
|
}
|
|
30858
30898
|
|
|
30859
|
-
${selector} [data-block-
|
|
30899
|
+
${selector} [data-block-boundary][data-style-group^='site-style-transition-wave-edge-']::after {
|
|
30860
30900
|
background: var(--site-style-transition-to);
|
|
30861
30901
|
mask-image: url("${classicWaveTransitionMask}");
|
|
30862
30902
|
mask-repeat: no-repeat;
|
|
@@ -30866,28 +30906,39 @@ ${selector} [data-block-transition][data-style-group^='site-style-transition-wav
|
|
|
30866
30906
|
-webkit-mask-size: 100% 100%;
|
|
30867
30907
|
}
|
|
30868
30908
|
|
|
30869
|
-
${selector} [data-block-
|
|
30909
|
+
${selector} [data-block-boundary][data-style-group^='site-style-transition-wave-edge-balanced-']::after {
|
|
30870
30910
|
mask-image: url("${balancedWaveTransitionMask}");
|
|
30871
30911
|
-webkit-mask-image: url("${balancedWaveTransitionMask}");
|
|
30872
30912
|
}
|
|
30873
30913
|
|
|
30874
|
-
${selector} [data-block-
|
|
30875
|
-
height:
|
|
30914
|
+
${selector} [data-block-boundary][data-style-group^='site-style-transition-wave-edge-gentle-'] {
|
|
30915
|
+
--site-style-boundary-height: ${compactBoundaryHeight};
|
|
30916
|
+
}
|
|
30917
|
+
|
|
30918
|
+
${selector} [data-block-boundary][data-style-group^='site-style-transition-wave-edge-gentle-']::after {
|
|
30876
30919
|
mask-image: url("${gentleWaveTransitionMask}");
|
|
30877
30920
|
-webkit-mask-image: url("${gentleWaveTransitionMask}");
|
|
30878
30921
|
}
|
|
30879
30922
|
|
|
30880
|
-
${selector} [data-block-
|
|
30881
|
-
height:
|
|
30923
|
+
${selector} [data-block-boundary][data-style-group^='site-style-transition-wave-edge-bold-'] {
|
|
30924
|
+
--site-style-boundary-height: ${largeBoundaryHeight};
|
|
30925
|
+
}
|
|
30926
|
+
|
|
30927
|
+
${selector} [data-block-boundary][data-style-group^='site-style-transition-wave-edge-bold-']::after {
|
|
30882
30928
|
mask-image: url("${boldWaveTransitionMask}");
|
|
30883
30929
|
-webkit-mask-image: url("${boldWaveTransitionMask}");
|
|
30884
30930
|
}
|
|
30885
30931
|
|
|
30886
|
-
${selector} [data-block-
|
|
30932
|
+
${selector} [data-block-boundary][data-style-group^='site-style-transition-wave-edge-drift-']::after {
|
|
30887
30933
|
mask-image: url("${driftWaveTransitionMask}");
|
|
30888
30934
|
-webkit-mask-image: url("${driftWaveTransitionMask}");
|
|
30889
30935
|
}`;
|
|
30890
30936
|
}
|
|
30937
|
+
function requiredBoundaryHeightCss(transition) {
|
|
30938
|
+
const metrics = boundaryRuntimeMetricsForTransition(transition);
|
|
30939
|
+
if (!metrics) throw new Error(`Missing boundary runtime metrics for ${transition}`);
|
|
30940
|
+
return metrics.heightCss;
|
|
30941
|
+
}
|
|
30891
30942
|
function svgDataUrl(svg) {
|
|
30892
30943
|
return `data:image/svg+xml,${encodeURIComponent(svg)}`;
|
|
30893
30944
|
}
|
|
@@ -32821,7 +32872,7 @@ function hydrateValue(value, context) {
|
|
|
32821
32872
|
const resolvedItems = value.map((item) => hydrateValue(item, context));
|
|
32822
32873
|
return resolvedItems.every((item, index) => item === value[index]) ? value : resolvedItems;
|
|
32823
32874
|
}
|
|
32824
|
-
if (isRecord$
|
|
32875
|
+
if (isRecord$19(value)) {
|
|
32825
32876
|
if (isInternalLink(value)) return hydrateInternalLink(value, context.routes);
|
|
32826
32877
|
if (isPageLink(value)) return hydratePageLink(value, context);
|
|
32827
32878
|
if (isEntryLink(value)) return hydrateEntryLink(value, context);
|
|
@@ -33023,13 +33074,15 @@ function mergeBlockDescriptorsWithRegistry(systemBlocks, registry, onConflict) {
|
|
|
33023
33074
|
}
|
|
33024
33075
|
//#endregion
|
|
33025
33076
|
//#region ../blocks/src/PageRenderer.tsx
|
|
33026
|
-
function PageRenderer({ theme, page, usePlaceholders = false, dataContext, wrapBlock, registry, themeTokens: providedThemeTokens, routeMap, blockOverrides, sdkConfig, customBlocks, previewAuthoring }) {
|
|
33077
|
+
function PageRenderer({ theme, page, runtimeBoundaries, usePlaceholders = false, dataContext, wrapBlock, wrapBoundary, registry, themeTokens: providedThemeTokens, routeMap, blockOverrides, sdkConfig, customBlocks, previewAuthoring }) {
|
|
33027
33078
|
const imageResolveContext = React$1.useMemo(() => resolvePageRendererImageResolveContext(dataContext), [
|
|
33028
33079
|
dataContext?.imageResolveContext,
|
|
33029
33080
|
dataContext?.mediaAssets,
|
|
33030
33081
|
dataContext?.siteId,
|
|
33031
33082
|
dataContext?.supabaseUrl
|
|
33032
33083
|
]);
|
|
33084
|
+
const boundaryByAdjacentBlockIds = React$1.useMemo(() => boundaryMapForAdjacentBlockIds(runtimeBoundaries ?? []), [runtimeBoundaries]);
|
|
33085
|
+
const usesRuntimeBoundaries = runtimeBoundaries !== void 0;
|
|
33033
33086
|
if (!page || page.blocks.length === 0) return /* @__PURE__ */ jsx("div", {
|
|
33034
33087
|
className: "rb-p-6 rb-caption",
|
|
33035
33088
|
style: textColorStyle("mutedText"),
|
|
@@ -33041,6 +33094,17 @@ function PageRenderer({ theme, page, usePlaceholders = false, dataContext, wrapB
|
|
|
33041
33094
|
return /* @__PURE__ */ jsx("div", { children: page.blocks.map((block, index) => {
|
|
33042
33095
|
const blockPosition = pageBlockPosition(index, page.blocks.length);
|
|
33043
33096
|
const blockKey = block.id ?? `${block.kind}-${index}`;
|
|
33097
|
+
const previousBlock = page.blocks[index - 1] ?? null;
|
|
33098
|
+
const nextBlock = page.blocks[index + 1] ?? null;
|
|
33099
|
+
const boundaryBefore = boundaryBetweenBlocks(previousBlock, block, boundaryByAdjacentBlockIds);
|
|
33100
|
+
const boundaryAfter = boundaryBetweenBlocks(block, nextBlock, boundaryByAdjacentBlockIds);
|
|
33101
|
+
const boundaryElement = renderBoundaryAfterBlock({
|
|
33102
|
+
block,
|
|
33103
|
+
nextBlock,
|
|
33104
|
+
blockKey,
|
|
33105
|
+
boundaryByAdjacentBlockIds,
|
|
33106
|
+
wrapBoundary
|
|
33107
|
+
});
|
|
33044
33108
|
const cleanKind = block.kind.replace(/^block\./, "");
|
|
33045
33109
|
const definition = getBlockDefinition(block.kind);
|
|
33046
33110
|
const managesOwnWrapper = definition?.manifest.behaviours?.managesOwnWrapper;
|
|
@@ -33063,10 +33127,18 @@ function PageRenderer({ theme, page, usePlaceholders = false, dataContext, wrapB
|
|
|
33063
33127
|
imageResolveContext,
|
|
33064
33128
|
previewAuthoring
|
|
33065
33129
|
};
|
|
33066
|
-
if (!shouldUseWrapper)
|
|
33130
|
+
if (!shouldUseWrapper) {
|
|
33131
|
+
const rendered = /* @__PURE__ */ jsx(MemoBlockSection, { ...blockSectionProps }, `${blockKey}:block`);
|
|
33132
|
+
return boundaryElement ? /* @__PURE__ */ jsxs(React$1.Fragment, { children: [rendered, boundaryElement] }, blockKey) : rendered;
|
|
33133
|
+
}
|
|
33067
33134
|
const wrapperClassName = [`block-${cleanKind}`, wrapBlock ? "group relative" : null].filter(Boolean).join(" ");
|
|
33068
33135
|
const styleGroup = typeof renderableContent.styleGroup === "string" ? renderableContent.styleGroup : void 0;
|
|
33069
33136
|
const blockLook = typeof renderableContent.blockLook === "string" ? renderableContent.blockLook : void 0;
|
|
33137
|
+
const transitionStyle = transitionCssVarsStyle(renderableContent);
|
|
33138
|
+
const blockStyle = mergeStyleObjects(transitionStyle, boundaryReserveCssVarsStyle({
|
|
33139
|
+
before: boundaryBefore,
|
|
33140
|
+
after: boundaryAfter
|
|
33141
|
+
}));
|
|
33070
33142
|
const blockElement = /* @__PURE__ */ jsx("div", {
|
|
33071
33143
|
className: wrapperClassName,
|
|
33072
33144
|
"data-block": cleanKind,
|
|
@@ -33076,21 +33148,92 @@ function PageRenderer({ theme, page, usePlaceholders = false, dataContext, wrapB
|
|
|
33076
33148
|
"data-block-variant": variantKey ?? void 0,
|
|
33077
33149
|
"data-block-look": blockLook,
|
|
33078
33150
|
"data-page-block-position": blockPosition,
|
|
33151
|
+
"data-site-style-boundary-before": boundaryBefore?.metrics.size,
|
|
33152
|
+
"data-site-style-boundary-after": boundaryAfter?.metrics.size,
|
|
33079
33153
|
"data-style-group": styleGroup,
|
|
33154
|
+
style: blockStyle,
|
|
33080
33155
|
children: /* @__PURE__ */ jsx(MemoBlockSection, { ...blockSectionProps })
|
|
33081
33156
|
}, blockKey);
|
|
33082
|
-
if (
|
|
33157
|
+
if (boundaryElement) return /* @__PURE__ */ jsxs(React$1.Fragment, { children: [blockElement, boundaryElement] }, blockKey);
|
|
33158
|
+
if (usesRuntimeBoundaries || !isSiteStyleTransitionStyleGroup(styleGroup)) return blockElement;
|
|
33083
33159
|
return /* @__PURE__ */ jsxs(React$1.Fragment, { children: [blockElement, /* @__PURE__ */ jsx("div", {
|
|
33084
33160
|
"aria-hidden": "true",
|
|
33085
33161
|
"data-block-transition": "",
|
|
33086
33162
|
"data-block-transition-for": block.id ?? blockKey,
|
|
33087
|
-
"data-style-group": styleGroup
|
|
33163
|
+
"data-style-group": styleGroup,
|
|
33164
|
+
style: transitionStyle
|
|
33088
33165
|
})] }, blockKey);
|
|
33089
33166
|
}) });
|
|
33090
33167
|
}
|
|
33091
33168
|
function isSiteStyleTransitionStyleGroup(value) {
|
|
33092
33169
|
return value?.startsWith("site-style-transition-") === true;
|
|
33093
33170
|
}
|
|
33171
|
+
function boundaryMapForAdjacentBlockIds(boundaries) {
|
|
33172
|
+
return new Map(boundaries.map((boundary) => [boundaryKey(boundary.previousBlockId, boundary.nextBlockId), boundary]));
|
|
33173
|
+
}
|
|
33174
|
+
function boundaryKey(previousBlockId, nextBlockId) {
|
|
33175
|
+
return `${previousBlockId}\u0000${nextBlockId}`;
|
|
33176
|
+
}
|
|
33177
|
+
function boundaryBetweenBlocks(previousBlock, nextBlock, boundaryByAdjacentBlockIds) {
|
|
33178
|
+
const previousBlockId = previousBlock?.id ?? null;
|
|
33179
|
+
const nextBlockId = nextBlock?.id ?? null;
|
|
33180
|
+
if (!previousBlockId || !nextBlockId) return null;
|
|
33181
|
+
return boundaryByAdjacentBlockIds.get(boundaryKey(previousBlockId, nextBlockId)) ?? null;
|
|
33182
|
+
}
|
|
33183
|
+
function renderBoundaryAfterBlock(input) {
|
|
33184
|
+
const previousBlockId = input.block.id;
|
|
33185
|
+
const nextBlockId = input.nextBlock?.id ?? null;
|
|
33186
|
+
if (!previousBlockId || !nextBlockId) return null;
|
|
33187
|
+
const boundary = input.boundaryByAdjacentBlockIds.get(boundaryKey(previousBlockId, nextBlockId));
|
|
33188
|
+
if (!boundary) return null;
|
|
33189
|
+
const rendered = /* @__PURE__ */ jsx("div", {
|
|
33190
|
+
"aria-hidden": "true",
|
|
33191
|
+
"data-block-boundary": "",
|
|
33192
|
+
"data-boundary-id": boundary.boundaryId,
|
|
33193
|
+
"data-boundary-previous-block-id": boundary.previousBlockId,
|
|
33194
|
+
"data-boundary-next-block-id": boundary.nextBlockId,
|
|
33195
|
+
"data-style-group": boundary.styleGroup,
|
|
33196
|
+
style: boundaryCssVarsStyle(boundary)
|
|
33197
|
+
}, `${input.blockKey}:boundary`);
|
|
33198
|
+
return input.wrapBoundary ? input.wrapBoundary(boundary, rendered) : rendered;
|
|
33199
|
+
}
|
|
33200
|
+
function boundaryCssVarsStyle(boundary) {
|
|
33201
|
+
return {
|
|
33202
|
+
"--site-style-transition-from": boundary.cssVars.from,
|
|
33203
|
+
"--site-style-transition-to": boundary.cssVars.to
|
|
33204
|
+
};
|
|
33205
|
+
}
|
|
33206
|
+
function boundaryReserveCssVarsStyle(input) {
|
|
33207
|
+
const before = input.before ? boundaryReserveValueForTreatment(input.before) : null;
|
|
33208
|
+
const after = input.after ? boundaryReserveValueForTreatment(input.after) : null;
|
|
33209
|
+
if (!before && !after) return void 0;
|
|
33210
|
+
return {
|
|
33211
|
+
...before ? { "--site-style-boundary-before-reserve": before } : {},
|
|
33212
|
+
...after ? { "--site-style-boundary-after-reserve": after } : {}
|
|
33213
|
+
};
|
|
33214
|
+
}
|
|
33215
|
+
function boundaryReserveValueForTreatment(boundary) {
|
|
33216
|
+
return boundary.metrics.reserveCss;
|
|
33217
|
+
}
|
|
33218
|
+
function transitionCssVarsStyle(content) {
|
|
33219
|
+
const transitionStyles = isObjectRecord(content._transitionStyles) ? content._transitionStyles : null;
|
|
33220
|
+
const cssVars = isObjectRecord(transitionStyles?.cssVars) ? transitionStyles.cssVars : null;
|
|
33221
|
+
const from = typeof cssVars?.from === "string" ? cssVars.from : null;
|
|
33222
|
+
const to = typeof cssVars?.to === "string" ? cssVars.to : null;
|
|
33223
|
+
if (!from && !to) return void 0;
|
|
33224
|
+
return {
|
|
33225
|
+
...from ? { "--site-style-transition-from": from } : {},
|
|
33226
|
+
...to ? { "--site-style-transition-to": to } : {}
|
|
33227
|
+
};
|
|
33228
|
+
}
|
|
33229
|
+
function mergeStyleObjects(left, right) {
|
|
33230
|
+
if (!left) return right;
|
|
33231
|
+
if (!right) return left;
|
|
33232
|
+
return {
|
|
33233
|
+
...left,
|
|
33234
|
+
...right
|
|
33235
|
+
};
|
|
33236
|
+
}
|
|
33094
33237
|
function pageBlockPosition(index, blockCount) {
|
|
33095
33238
|
if (blockCount <= 1) return "only";
|
|
33096
33239
|
if (index === 0) return "first";
|
|
@@ -35002,52 +35145,53 @@ const containerResponsiveThemeCss = `/*
|
|
|
35002
35145
|
|
|
35003
35146
|
/* Semantic spacing tokens (replaces Tailwind maps in src/system/spacing.ts) */
|
|
35004
35147
|
.rb-section-pad-none {
|
|
35005
|
-
|
|
35006
|
-
padding-
|
|
35148
|
+
--rb-section-pad-y: 0rem;
|
|
35149
|
+
padding-top: var(--rb-section-pad-y);
|
|
35150
|
+
padding-bottom: var(--rb-section-pad-y);
|
|
35007
35151
|
}
|
|
35008
35152
|
.rb-section-pad-compact {
|
|
35009
|
-
|
|
35010
|
-
padding-
|
|
35153
|
+
--rb-section-pad-y: 1.5rem;
|
|
35154
|
+
padding-top: var(--rb-section-pad-y);
|
|
35155
|
+
padding-bottom: var(--rb-section-pad-y);
|
|
35011
35156
|
}
|
|
35012
35157
|
.rb-section-pad-cozy {
|
|
35013
|
-
|
|
35014
|
-
padding-
|
|
35158
|
+
--rb-section-pad-y: 2.5rem;
|
|
35159
|
+
padding-top: var(--rb-section-pad-y);
|
|
35160
|
+
padding-bottom: var(--rb-section-pad-y);
|
|
35015
35161
|
}
|
|
35016
35162
|
.rb-section-pad-medium {
|
|
35017
|
-
|
|
35018
|
-
padding-
|
|
35163
|
+
--rb-section-pad-y: 3rem;
|
|
35164
|
+
padding-top: var(--rb-section-pad-y);
|
|
35165
|
+
padding-bottom: var(--rb-section-pad-y);
|
|
35019
35166
|
}
|
|
35020
35167
|
.rb-section-pad-comfortable {
|
|
35021
|
-
|
|
35022
|
-
padding-
|
|
35168
|
+
--rb-section-pad-y: 4rem;
|
|
35169
|
+
padding-top: var(--rb-section-pad-y);
|
|
35170
|
+
padding-bottom: var(--rb-section-pad-y);
|
|
35023
35171
|
}
|
|
35024
35172
|
.rb-section-pad-spacious {
|
|
35025
|
-
|
|
35026
|
-
padding-
|
|
35173
|
+
--rb-section-pad-y: 5rem;
|
|
35174
|
+
padding-top: var(--rb-section-pad-y);
|
|
35175
|
+
padding-bottom: var(--rb-section-pad-y);
|
|
35027
35176
|
}
|
|
35028
35177
|
|
|
35029
35178
|
@container rb-site (min-width: 640px) {
|
|
35030
35179
|
|
|
35031
35180
|
@scope ([data-rb-responsive-mode="container"]) to (:scope [data-rb-responsive-mode]) {
|
|
35032
35181
|
.rb-section-pad-compact {
|
|
35033
|
-
|
|
35034
|
-
padding-bottom: 2rem;
|
|
35182
|
+
--rb-section-pad-y: 2rem;
|
|
35035
35183
|
}
|
|
35036
35184
|
.rb-section-pad-cozy {
|
|
35037
|
-
|
|
35038
|
-
padding-bottom: 3.5rem;
|
|
35185
|
+
--rb-section-pad-y: 3.5rem;
|
|
35039
35186
|
}
|
|
35040
35187
|
.rb-section-pad-medium {
|
|
35041
|
-
|
|
35042
|
-
padding-bottom: 4rem;
|
|
35188
|
+
--rb-section-pad-y: 4rem;
|
|
35043
35189
|
}
|
|
35044
35190
|
.rb-section-pad-comfortable {
|
|
35045
|
-
|
|
35046
|
-
padding-bottom: 5rem;
|
|
35191
|
+
--rb-section-pad-y: 5rem;
|
|
35047
35192
|
}
|
|
35048
35193
|
.rb-section-pad-spacious {
|
|
35049
|
-
|
|
35050
|
-
padding-bottom: 7rem;
|
|
35194
|
+
--rb-section-pad-y: 7rem;
|
|
35051
35195
|
}
|
|
35052
35196
|
}
|
|
35053
35197
|
|
|
@@ -36437,30 +36581,122 @@ const containerResponsiveThemeCss = `/*
|
|
|
36437
36581
|
:where(.theme-scope) .header-logo-text {
|
|
36438
36582
|
font-size: 1.125rem; /* matches rb-text-lg */
|
|
36439
36583
|
line-height: 1.75rem;
|
|
36584
|
+
margin-inline: -0.18em;
|
|
36585
|
+
padding-inline: 0.18em;
|
|
36440
36586
|
transition: font-size 300ms var(--motion-ease, ease);
|
|
36441
36587
|
}
|
|
36442
36588
|
|
|
36443
|
-
/*
|
|
36589
|
+
/* Centered variant uses larger title */
|
|
36590
|
+
:where(.theme-scope) .header-variant-centered .header-logo-text {
|
|
36591
|
+
font-size: 1.25rem; /* matches rb-text-xl */
|
|
36592
|
+
line-height: 1.75rem;
|
|
36593
|
+
}
|
|
36594
|
+
|
|
36595
|
+
:where(.theme-scope) .header-logo-size-compact .header-logo-text {
|
|
36596
|
+
font-size: 0.95rem;
|
|
36597
|
+
line-height: 1.5rem;
|
|
36598
|
+
}
|
|
36599
|
+
:where(.theme-scope) .header-logo-size-standard .header-logo-text {
|
|
36600
|
+
font-size: 1.125rem;
|
|
36601
|
+
line-height: 1.75rem;
|
|
36602
|
+
}
|
|
36603
|
+
:where(.theme-scope) .header-logo-size-generous .header-logo-text {
|
|
36604
|
+
font-size: 1.35rem;
|
|
36605
|
+
line-height: 1.9rem;
|
|
36606
|
+
}
|
|
36607
|
+
:where(.theme-scope) .header-logo-size-display .header-logo-text {
|
|
36608
|
+
font-size: 1.75rem;
|
|
36609
|
+
line-height: 2.25rem;
|
|
36610
|
+
}
|
|
36611
|
+
|
|
36612
|
+
:where(.theme-scope)
|
|
36613
|
+
.header-variant-centered
|
|
36614
|
+
.header-logo-size-compact
|
|
36615
|
+
.header-logo-text {
|
|
36616
|
+
font-size: 1.125rem;
|
|
36617
|
+
line-height: 1.75rem;
|
|
36618
|
+
}
|
|
36619
|
+
:where(.theme-scope)
|
|
36620
|
+
.header-variant-centered
|
|
36621
|
+
.header-logo-size-standard
|
|
36622
|
+
.header-logo-text {
|
|
36623
|
+
font-size: 1.25rem;
|
|
36624
|
+
line-height: 1.75rem;
|
|
36625
|
+
}
|
|
36626
|
+
:where(.theme-scope)
|
|
36627
|
+
.header-variant-centered
|
|
36628
|
+
.header-logo-size-generous
|
|
36629
|
+
.header-logo-text {
|
|
36630
|
+
font-size: 1.6rem;
|
|
36631
|
+
line-height: 2rem;
|
|
36632
|
+
}
|
|
36633
|
+
:where(.theme-scope)
|
|
36634
|
+
.header-variant-centered
|
|
36635
|
+
.header-logo-size-display
|
|
36636
|
+
.header-logo-text {
|
|
36637
|
+
font-size: 2.1rem;
|
|
36638
|
+
line-height: 2.5rem;
|
|
36639
|
+
}
|
|
36640
|
+
|
|
36641
|
+
/* Mobile: reduce site title size to keep header compact */
|
|
36444
36642
|
@container rb-site (max-width: 767px) {
|
|
36445
36643
|
@scope ([data-rb-responsive-mode="container"]) to (:scope [data-rb-responsive-mode]) {
|
|
36446
|
-
:where(.theme-scope) .header-logo-text
|
|
36644
|
+
:where(.theme-scope) .header-logo-text,
|
|
36645
|
+
:where(.theme-scope) .header-logo-size-standard .header-logo-text {
|
|
36447
36646
|
font-size: 0.8rem;
|
|
36448
36647
|
line-height: 1.25rem;
|
|
36449
36648
|
}
|
|
36450
36649
|
|
|
36451
|
-
:where(.theme-scope) .header-
|
|
36650
|
+
:where(.theme-scope) .header-logo-size-compact .header-logo-text {
|
|
36651
|
+
font-size: 0.75rem;
|
|
36652
|
+
line-height: 1.15rem;
|
|
36653
|
+
}
|
|
36654
|
+
|
|
36655
|
+
:where(.theme-scope) .header-logo-size-generous .header-logo-text {
|
|
36656
|
+
font-size: 1rem;
|
|
36657
|
+
line-height: 1.4rem;
|
|
36658
|
+
}
|
|
36659
|
+
|
|
36660
|
+
:where(.theme-scope) .header-logo-size-display .header-logo-text {
|
|
36661
|
+
font-size: 1.25rem;
|
|
36662
|
+
line-height: 1.65rem;
|
|
36663
|
+
}
|
|
36664
|
+
|
|
36665
|
+
:where(.theme-scope) .header-variant-centered .header-logo-text,
|
|
36666
|
+
:where(.theme-scope)
|
|
36667
|
+
.header-variant-centered
|
|
36668
|
+
.header-logo-size-standard
|
|
36669
|
+
.header-logo-text {
|
|
36452
36670
|
font-size: 0.875rem;
|
|
36453
36671
|
line-height: 1.25rem;
|
|
36454
36672
|
}
|
|
36673
|
+
|
|
36674
|
+
:where(.theme-scope)
|
|
36675
|
+
.header-variant-centered
|
|
36676
|
+
.header-logo-size-compact
|
|
36677
|
+
.header-logo-text {
|
|
36678
|
+
font-size: 0.8rem;
|
|
36679
|
+
line-height: 1.2rem;
|
|
36680
|
+
}
|
|
36681
|
+
|
|
36682
|
+
:where(.theme-scope)
|
|
36683
|
+
.header-variant-centered
|
|
36684
|
+
.header-logo-size-generous
|
|
36685
|
+
.header-logo-text {
|
|
36686
|
+
font-size: 1.125rem;
|
|
36687
|
+
line-height: 1.5rem;
|
|
36688
|
+
}
|
|
36689
|
+
|
|
36690
|
+
:where(.theme-scope)
|
|
36691
|
+
.header-variant-centered
|
|
36692
|
+
.header-logo-size-display
|
|
36693
|
+
.header-logo-text {
|
|
36694
|
+
font-size: 1.35rem;
|
|
36695
|
+
line-height: 1.75rem;
|
|
36696
|
+
}
|
|
36455
36697
|
}
|
|
36456
36698
|
}
|
|
36457
36699
|
|
|
36458
|
-
/* Centered variant uses larger title */
|
|
36459
|
-
:where(.theme-scope) .header-variant-centered .header-logo-text {
|
|
36460
|
-
font-size: 1.25rem; /* matches rb-text-xl */
|
|
36461
|
-
line-height: 1.75rem;
|
|
36462
|
-
}
|
|
36463
|
-
|
|
36464
36700
|
/* =================================================================
|
|
36465
36701
|
Shrink on Scroll - Logo & Title
|
|
36466
36702
|
================================================================= */
|
|
@@ -52801,7 +53037,7 @@ function asPositiveSeconds(value) {
|
|
|
52801
53037
|
if (!Number.isSafeInteger(value) || value <= 0) return err("not-positive-seconds");
|
|
52802
53038
|
return ok$1(value);
|
|
52803
53039
|
}
|
|
52804
|
-
function isRecord$
|
|
53040
|
+
function isRecord$12(value) {
|
|
52805
53041
|
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
52806
53042
|
}
|
|
52807
53043
|
function parseFileKindJson(value) {
|
|
@@ -53022,7 +53258,7 @@ function parseEntitledCustomerAccessScopeJson(value) {
|
|
|
53022
53258
|
}
|
|
53023
53259
|
}
|
|
53024
53260
|
function requireRecord(value) {
|
|
53025
|
-
if (!isRecord$
|
|
53261
|
+
if (!isRecord$12(value)) return err("expected-object");
|
|
53026
53262
|
return ok$1(value);
|
|
53027
53263
|
}
|
|
53028
53264
|
function requireString(value) {
|
|
@@ -53277,7 +53513,7 @@ const DEFAULT_MESSAGES = {
|
|
|
53277
53513
|
update: "Failed to update media asset",
|
|
53278
53514
|
delete: "Failed to delete media asset"
|
|
53279
53515
|
};
|
|
53280
|
-
function isRecord$
|
|
53516
|
+
function isRecord$11(value) {
|
|
53281
53517
|
return typeof value === "object" && value !== null;
|
|
53282
53518
|
}
|
|
53283
53519
|
const normalizeLabels = (labels) => labels !== void 0 && labels.length > 0 ? labels.map((label) => label.trim()).filter((label) => label.length > 0).join(",") : void 0;
|
|
@@ -53311,7 +53547,7 @@ const filterUpdatePayload = (input) => {
|
|
|
53311
53547
|
return payload;
|
|
53312
53548
|
};
|
|
53313
53549
|
const extractErrorMessage = (body) => {
|
|
53314
|
-
if (!isRecord$
|
|
53550
|
+
if (!isRecord$11(body)) return typeof body === "string" && body.trim().length > 0 ? body : null;
|
|
53315
53551
|
for (const key of [
|
|
53316
53552
|
"error",
|
|
53317
53553
|
"message",
|
|
@@ -53324,11 +53560,11 @@ const extractErrorMessage = (body) => {
|
|
|
53324
53560
|
const details = body.details;
|
|
53325
53561
|
if (Array.isArray(details)) for (const entry of details) {
|
|
53326
53562
|
if (typeof entry === "string" && entry.trim().length > 0) return entry;
|
|
53327
|
-
if (isRecord$
|
|
53563
|
+
if (isRecord$11(entry) && typeof entry.message === "string" && entry.message.trim().length > 0) return entry.message;
|
|
53328
53564
|
}
|
|
53329
53565
|
const errors = body.errors;
|
|
53330
53566
|
if (Array.isArray(errors)) {
|
|
53331
|
-
for (const entry of errors) if (isRecord$
|
|
53567
|
+
for (const entry of errors) if (isRecord$11(entry) && typeof entry.message === "string" && entry.message.trim().length > 0) return entry.message;
|
|
53332
53568
|
}
|
|
53333
53569
|
return null;
|
|
53334
53570
|
};
|
|
@@ -60691,11 +60927,14 @@ function buildPreviewDashboardSetupUrl(dashboardBaseUrl, handoff) {
|
|
|
60691
60927
|
//#region ../preview-next/src/client/preview/sidebarTabPreference.ts
|
|
60692
60928
|
const STORAGE_KEY = "preview-sidebar-tab";
|
|
60693
60929
|
const REQUEST_EVENT = "riverbank:preview-sidebar:request-open";
|
|
60930
|
+
function normalizeOpenRequest(input) {
|
|
60931
|
+
return parsePreviewSidebarOpenRequestDetail(typeof input === "string" ? { tab: input } : input);
|
|
60932
|
+
}
|
|
60694
60933
|
function parsePreviewSidebarOpenRequestDetail(detail) {
|
|
60695
|
-
const request = isRecord$
|
|
60934
|
+
const request = isRecord$10(detail) ? detail : {};
|
|
60696
60935
|
return {
|
|
60697
60936
|
tab: resolvePreviewSidebarTab(request.tab === "assistant" ? "assistant" : "editor"),
|
|
60698
|
-
...request.designRow
|
|
60937
|
+
...isPreviewDesignRow(request.designRow) ? { designRow: request.designRow } : {}
|
|
60699
60938
|
};
|
|
60700
60939
|
}
|
|
60701
60940
|
function getPreviewSidebarTab() {
|
|
@@ -60712,18 +60951,27 @@ function setPreviewSidebarTab(tab) {
|
|
|
60712
60951
|
window.localStorage.setItem(STORAGE_KEY, resolvePreviewSidebarTab(tab));
|
|
60713
60952
|
} catch {}
|
|
60714
60953
|
}
|
|
60954
|
+
function requestPreviewSidebarOpen(input) {
|
|
60955
|
+
if (typeof window === "undefined") return;
|
|
60956
|
+
const request = normalizeOpenRequest(input);
|
|
60957
|
+
setPreviewSidebarTab(request.tab);
|
|
60958
|
+
window.dispatchEvent(new window.CustomEvent(REQUEST_EVENT, { detail: request }));
|
|
60959
|
+
}
|
|
60715
60960
|
function onPreviewSidebarOpenRequest(handler) {
|
|
60716
60961
|
if (typeof window === "undefined") return () => void 0;
|
|
60717
60962
|
const listener = (event) => {
|
|
60718
|
-
if (!(
|
|
60963
|
+
if (!("detail" in event)) return;
|
|
60719
60964
|
handler(parsePreviewSidebarOpenRequestDetail(event.detail));
|
|
60720
60965
|
};
|
|
60721
60966
|
window.addEventListener(REQUEST_EVENT, listener);
|
|
60722
60967
|
return () => window.removeEventListener(REQUEST_EVENT, listener);
|
|
60723
60968
|
}
|
|
60724
|
-
function isRecord$
|
|
60969
|
+
function isRecord$10(value) {
|
|
60725
60970
|
return typeof value === "object" && value !== null;
|
|
60726
60971
|
}
|
|
60972
|
+
function isPreviewDesignRow(value) {
|
|
60973
|
+
return value === "header" || value === "footer" || value === "header-layout" || value === "header-style" || value === "footer-layout";
|
|
60974
|
+
}
|
|
60727
60975
|
//#endregion
|
|
60728
60976
|
//#region ../preview-next/src/client/preview/previewChromeSurface.ts
|
|
60729
60977
|
const PREVIEW_CHROME_THEME_CLASS_NAME = "builder-dashboard-chrome-theme";
|
|
@@ -60919,14 +61167,14 @@ function backgroundCapabilityFromModes(modeCapabilities) {
|
|
|
60919
61167
|
};
|
|
60920
61168
|
}
|
|
60921
61169
|
function parseBackgroundOverrideFromContent(content) {
|
|
60922
|
-
return parseBackgroundOverride((isRecord$
|
|
61170
|
+
return parseBackgroundOverride((isRecord$9(content._sectionStyles) ? content._sectionStyles : null)?.background);
|
|
60923
61171
|
}
|
|
60924
61172
|
function parseBackgroundOverride(value) {
|
|
60925
61173
|
if (value === null || value === void 0) return {
|
|
60926
61174
|
kind: "supported",
|
|
60927
61175
|
override: DEFAULT_BACKGROUND_OVERRIDE
|
|
60928
61176
|
};
|
|
60929
|
-
if (!isRecord$
|
|
61177
|
+
if (!isRecord$9(value)) return {
|
|
60930
61178
|
kind: "legacy",
|
|
60931
61179
|
reason: "unsupported-shape",
|
|
60932
61180
|
background: {}
|
|
@@ -61042,7 +61290,7 @@ function serializeBackgroundOverride(override) {
|
|
|
61042
61290
|
}
|
|
61043
61291
|
}
|
|
61044
61292
|
function applyBackgroundOverrideContentPatch(content, override) {
|
|
61045
|
-
const sectionStyles = isRecord$
|
|
61293
|
+
const sectionStyles = isRecord$9(content._sectionStyles) ? content._sectionStyles : {};
|
|
61046
61294
|
const serialized = serializeBackgroundOverride(override);
|
|
61047
61295
|
if (serialized === null) return withSectionStyles(content, omitRecordKey$1(sectionStyles, "background"));
|
|
61048
61296
|
return withSectionStyles(content, {
|
|
@@ -61271,7 +61519,7 @@ function imageAllowed(mediaId, pool) {
|
|
|
61271
61519
|
return pool?.some((item) => item.mediaId === mediaId) ?? false;
|
|
61272
61520
|
}
|
|
61273
61521
|
function parseImageMediaAssetId(value) {
|
|
61274
|
-
if (!isRecord$
|
|
61522
|
+
if (!isRecord$9(value)) return { kind: "missing" };
|
|
61275
61523
|
if (value.type !== void 0 && value.type !== "image") return { kind: "missing" };
|
|
61276
61524
|
const parsed = parseMediaAssetId(value.assetId);
|
|
61277
61525
|
if (!parsed.ok) return value.assetId === void 0 || value.assetId === null ? { kind: "missing" } : { kind: "invalid" };
|
|
@@ -61312,7 +61560,7 @@ function withSectionStyles(content, sectionStyles) {
|
|
|
61312
61560
|
function omitRecordKey$1(content, key) {
|
|
61313
61561
|
return Object.fromEntries(Object.entries(content).filter(([entryKey]) => entryKey !== key));
|
|
61314
61562
|
}
|
|
61315
|
-
function isRecord$
|
|
61563
|
+
function isRecord$9(value) {
|
|
61316
61564
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
61317
61565
|
}
|
|
61318
61566
|
//#endregion
|
|
@@ -62109,8 +62357,8 @@ function contentWithPreviousLayoutVariant(currentContent, previousContent) {
|
|
|
62109
62357
|
return nextContent;
|
|
62110
62358
|
}
|
|
62111
62359
|
function contentWithPreviousBackground(currentContent, previousContent) {
|
|
62112
|
-
const previousSectionStyles = isRecord$
|
|
62113
|
-
const nextSectionStyles = { ...isRecord$
|
|
62360
|
+
const previousSectionStyles = isRecord$8(previousContent._sectionStyles) ? previousContent._sectionStyles : {};
|
|
62361
|
+
const nextSectionStyles = { ...isRecord$8(currentContent._sectionStyles) ? currentContent._sectionStyles : {} };
|
|
62114
62362
|
if (Object.prototype.hasOwnProperty.call(previousSectionStyles, "background")) nextSectionStyles.background = previousSectionStyles.background;
|
|
62115
62363
|
else delete nextSectionStyles.background;
|
|
62116
62364
|
if (Object.keys(nextSectionStyles).length > 0) return {
|
|
@@ -62123,9 +62371,9 @@ function contentWithPreviousBackground(currentContent, previousContent) {
|
|
|
62123
62371
|
}
|
|
62124
62372
|
function withRuntimeBackgroundImageAsset(content, imageAsset) {
|
|
62125
62373
|
if (!imageAsset) return content;
|
|
62126
|
-
const sectionStyles = isRecord$
|
|
62127
|
-
const background = isRecord$
|
|
62128
|
-
const image = isRecord$
|
|
62374
|
+
const sectionStyles = isRecord$8(content._sectionStyles) ? content._sectionStyles : null;
|
|
62375
|
+
const background = isRecord$8(sectionStyles?.background) ? sectionStyles.background : null;
|
|
62376
|
+
const image = isRecord$8(background?.image) ? background.image : null;
|
|
62129
62377
|
if (!sectionStyles || !background || !image || background.type !== "image") return content;
|
|
62130
62378
|
return {
|
|
62131
62379
|
...content,
|
|
@@ -62138,7 +62386,7 @@ function withRuntimeBackgroundImageAsset(content, imageAsset) {
|
|
|
62138
62386
|
}
|
|
62139
62387
|
};
|
|
62140
62388
|
}
|
|
62141
|
-
function isRecord$
|
|
62389
|
+
function isRecord$8(value) {
|
|
62142
62390
|
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
62143
62391
|
}
|
|
62144
62392
|
//#endregion
|
|
@@ -62149,6 +62397,7 @@ function applyPreviewCustomizeDraftPatch(uiStore, patch, editorModel) {
|
|
|
62149
62397
|
targetBlockId: patch.blockId,
|
|
62150
62398
|
nextContent: patch.nextContent,
|
|
62151
62399
|
previousContent: patch.previousContent,
|
|
62400
|
+
baselineEquivalentContent: null,
|
|
62152
62401
|
editorModel
|
|
62153
62402
|
});
|
|
62154
62403
|
}
|
|
@@ -62161,19 +62410,20 @@ function rollbackPreviewCustomizeDraftPatch(uiStore, patch) {
|
|
|
62161
62410
|
targetBlockId: patch.blockId,
|
|
62162
62411
|
nextContent: patch.rollback(currentContent),
|
|
62163
62412
|
previousContent: patch.previousContent,
|
|
62413
|
+
baselineEquivalentContent: patch.previousContent,
|
|
62164
62414
|
editorModel: null
|
|
62165
62415
|
});
|
|
62166
62416
|
}
|
|
62167
62417
|
function currentLocalBlockContent(uiStore, targetBlockId) {
|
|
62168
62418
|
const current = uiStore.getState().drafts.getCurrentValues(unsafeAsEditorBlockId(targetBlockId));
|
|
62169
|
-
return isRecord$
|
|
62419
|
+
return isRecord$7(current) ? current : null;
|
|
62170
62420
|
}
|
|
62171
62421
|
function replaceLocalBlockContentWithoutHistory(input) {
|
|
62172
62422
|
const editorBlockId = unsafeAsEditorBlockId(input.targetBlockId);
|
|
62173
62423
|
const history = input.uiStore.getState().history;
|
|
62174
62424
|
const snapshot = history.getState().present;
|
|
62175
62425
|
const draft = snapshot.drafts[editorBlockId];
|
|
62176
|
-
const nextDraft = draft ? applyDraftContentPatch(draft, input.nextContent) : localRuntimeDraftForBlock({
|
|
62426
|
+
const nextDraft = draft ? applyDraftContentPatch(draft, input.nextContent, input.baselineEquivalentContent) : localRuntimeDraftForBlock({
|
|
62177
62427
|
editorBlockId,
|
|
62178
62428
|
targetBlockId: input.targetBlockId,
|
|
62179
62429
|
editorModel: input.editorModel,
|
|
@@ -62190,11 +62440,15 @@ function replaceLocalBlockContentWithoutHistory(input) {
|
|
|
62190
62440
|
});
|
|
62191
62441
|
return { kind: "applied" };
|
|
62192
62442
|
}
|
|
62193
|
-
function applyDraftContentPatch(draft, nextContent) {
|
|
62443
|
+
function applyDraftContentPatch(draft, nextContent, baselineEquivalentContent) {
|
|
62444
|
+
const nextValues = unsafeAsEditorBlockValues(nextContent);
|
|
62445
|
+
const baselineEquivalentValues = baselineEquivalentContent ? unsafeAsEditorBlockValues(baselineEquivalentContent) : null;
|
|
62446
|
+
const current = baselineEquivalentValues && recordsEqual(nextValues, baselineEquivalentValues) ? draft.baseline : nextValues;
|
|
62194
62447
|
return {
|
|
62195
62448
|
...draft,
|
|
62196
62449
|
version: draft.version + 1,
|
|
62197
|
-
current
|
|
62450
|
+
current,
|
|
62451
|
+
syncState: recordsEqual(draft.baseline, current) ? { kind: "baseline" } : { kind: "pending" }
|
|
62198
62452
|
};
|
|
62199
62453
|
}
|
|
62200
62454
|
function localRuntimeDraftForBlock(input) {
|
|
@@ -62214,7 +62468,7 @@ function localRuntimeDraftForBlock(input) {
|
|
|
62214
62468
|
}
|
|
62215
62469
|
};
|
|
62216
62470
|
}
|
|
62217
|
-
function isRecord$
|
|
62471
|
+
function isRecord$7(value) {
|
|
62218
62472
|
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
62219
62473
|
}
|
|
62220
62474
|
//#endregion
|
|
@@ -63043,25 +63297,25 @@ const INITIAL_ONBOARDING_CONFIRMATION_STATE = {
|
|
|
63043
63297
|
resendFeedback: null,
|
|
63044
63298
|
statusLoadFailed: false
|
|
63045
63299
|
};
|
|
63046
|
-
function isRecord$
|
|
63300
|
+
function isRecord$6(value) {
|
|
63047
63301
|
return value !== null && typeof value === "object";
|
|
63048
63302
|
}
|
|
63049
63303
|
function getErrorMessageFromEnvelope(payload, fallback) {
|
|
63050
|
-
const error = isRecord$
|
|
63051
|
-
const message = isRecord$
|
|
63304
|
+
const error = isRecord$6(payload) ? payload.error : null;
|
|
63305
|
+
const message = isRecord$6(error) ? error.message : null;
|
|
63052
63306
|
return typeof message === "string" && message.trim().length > 0 ? message : fallback;
|
|
63053
63307
|
}
|
|
63054
63308
|
function isLaunchReadiness(value) {
|
|
63055
|
-
return isRecord$
|
|
63309
|
+
return isRecord$6(value) && Array.isArray(value.requirements) && typeof value.pendingRequiredCount === "number" && typeof value.pendingRecommendedCount === "number" && typeof value.pendingOptionalCount === "number" && isRecord$6(value.goLiveDecision) && (value.goLiveDecision.kind === "allowed" || value.goLiveDecision.kind === "blocked");
|
|
63056
63310
|
}
|
|
63057
63311
|
function isOnboardingPreviewStatusResponse(value) {
|
|
63058
|
-
return isRecord$
|
|
63312
|
+
return isRecord$6(value) && typeof value.dashboardUnlocked === "boolean" && typeof value.requiresEmailConfirmation === "boolean" && isLaunchReadiness(value.launchReadiness);
|
|
63059
63313
|
}
|
|
63060
63314
|
function isResendOnboardingPreviewConfirmationResponse(value) {
|
|
63061
|
-
return isRecord$
|
|
63315
|
+
return isRecord$6(value) && (value.result === "resent" || value.result === "already_confirmed") && typeof value.dashboardUnlocked === "boolean" && typeof value.requiresEmailConfirmation === "boolean" && isLaunchReadiness(value.launchReadiness);
|
|
63062
63316
|
}
|
|
63063
63317
|
function getSuccessData(payload, isData) {
|
|
63064
|
-
if (!isRecord$
|
|
63318
|
+
if (!isRecord$6(payload) || payload.success !== true || !isData(payload.data)) return null;
|
|
63065
63319
|
return payload.data;
|
|
63066
63320
|
}
|
|
63067
63321
|
function useOnboardingConfirmationCheck(input) {
|
|
@@ -63579,12 +63833,14 @@ function PreviewChromeLayerProvider({ children }) {
|
|
|
63579
63833
|
function usePreviewChromeLayerOptional() {
|
|
63580
63834
|
return useContext(PreviewChromeLayerContext);
|
|
63581
63835
|
}
|
|
63582
|
-
function PreviewChromeFloatingControl({ anchorSelector, placement, fallbackClassName, fallbackStyle, portalClassName = "absolute z-[70] flex gap-1 transition", forceVisible = false, children }) {
|
|
63836
|
+
function PreviewChromeFloatingControl({ anchorSelector, anchorTargetSelector, placement, fallbackClassName, fallbackStyle, portalClassName = "absolute z-[70] flex gap-1 transition", forceVisible = false, children }) {
|
|
63583
63837
|
const layer = usePreviewChromeLayerOptional();
|
|
63584
63838
|
const probeRef = useRef(null);
|
|
63585
63839
|
const anchorElementRef = useRef(null);
|
|
63840
|
+
const anchorTargetElementRef = useRef(null);
|
|
63586
63841
|
const [controlElement, setControlElement] = useState(null);
|
|
63587
63842
|
const [anchorElement, setAnchorElement] = useState(null);
|
|
63843
|
+
const [anchorTargetElement, setAnchorTargetElement] = useState(null);
|
|
63588
63844
|
const [anchorBox, setAnchorBox] = useState(null);
|
|
63589
63845
|
const [themeCustomProperties, setThemeCustomProperties] = useState({});
|
|
63590
63846
|
const [isActive, setIsActive] = useState(false);
|
|
@@ -63594,18 +63850,30 @@ function PreviewChromeFloatingControl({ anchorSelector, placement, fallbackClass
|
|
|
63594
63850
|
});
|
|
63595
63851
|
useEffect(() => {
|
|
63596
63852
|
if (!layer?.portalTarget) return;
|
|
63597
|
-
let
|
|
63853
|
+
let anchorResizeObserver = null;
|
|
63854
|
+
let targetResizeObserver = null;
|
|
63598
63855
|
const readAnchor = () => probeRef.current?.closest(anchorSelector);
|
|
63599
63856
|
const update = () => {
|
|
63600
63857
|
const anchor = readAnchor();
|
|
63858
|
+
const anchorTarget = resolveAnchorTarget(anchor, anchorTargetSelector);
|
|
63601
63859
|
if (anchor !== anchorElementRef.current) {
|
|
63602
|
-
|
|
63603
|
-
|
|
63860
|
+
anchorResizeObserver?.disconnect();
|
|
63861
|
+
anchorResizeObserver = null;
|
|
63604
63862
|
anchorElementRef.current = anchor;
|
|
63605
63863
|
setAnchorElement(anchor);
|
|
63606
63864
|
if (anchor && typeof ResizeObserver !== "undefined") {
|
|
63607
|
-
|
|
63608
|
-
|
|
63865
|
+
anchorResizeObserver = new ResizeObserver(update);
|
|
63866
|
+
anchorResizeObserver.observe(anchor);
|
|
63867
|
+
}
|
|
63868
|
+
}
|
|
63869
|
+
if (anchorTarget !== anchorTargetElementRef.current) {
|
|
63870
|
+
targetResizeObserver?.disconnect();
|
|
63871
|
+
targetResizeObserver = null;
|
|
63872
|
+
anchorTargetElementRef.current = anchorTarget;
|
|
63873
|
+
setAnchorTargetElement(anchorTarget);
|
|
63874
|
+
if (anchorTarget && anchorTarget !== anchor && typeof ResizeObserver !== "undefined") {
|
|
63875
|
+
targetResizeObserver = new ResizeObserver(update);
|
|
63876
|
+
targetResizeObserver.observe(anchorTarget);
|
|
63609
63877
|
}
|
|
63610
63878
|
}
|
|
63611
63879
|
if (!anchor) {
|
|
@@ -63613,7 +63881,7 @@ function PreviewChromeFloatingControl({ anchorSelector, placement, fallbackClass
|
|
|
63613
63881
|
setThemeCustomProperties({});
|
|
63614
63882
|
return;
|
|
63615
63883
|
}
|
|
63616
|
-
const rect = anchor.getBoundingClientRect();
|
|
63884
|
+
const rect = (anchorTarget ?? anchor).getBoundingClientRect();
|
|
63617
63885
|
setThemeCustomProperties(readThemeCustomProperties(anchor));
|
|
63618
63886
|
setAnchorBox({
|
|
63619
63887
|
top: rect.top,
|
|
@@ -63625,48 +63893,59 @@ function PreviewChromeFloatingControl({ anchorSelector, placement, fallbackClass
|
|
|
63625
63893
|
update();
|
|
63626
63894
|
const unsubscribe = layer.subscribeLayout(update);
|
|
63627
63895
|
return () => {
|
|
63628
|
-
|
|
63896
|
+
anchorResizeObserver?.disconnect();
|
|
63897
|
+
targetResizeObserver?.disconnect();
|
|
63629
63898
|
anchorElementRef.current = null;
|
|
63899
|
+
anchorTargetElementRef.current = null;
|
|
63630
63900
|
unsubscribe();
|
|
63631
63901
|
};
|
|
63632
|
-
}, [
|
|
63902
|
+
}, [
|
|
63903
|
+
anchorSelector,
|
|
63904
|
+
anchorTargetSelector,
|
|
63905
|
+
layer
|
|
63906
|
+
]);
|
|
63633
63907
|
useEffect(() => {
|
|
63634
|
-
|
|
63908
|
+
const hoverAnchorElement = anchorTargetElement ?? anchorElement;
|
|
63909
|
+
if (!anchorElement || !hoverAnchorElement || !controlElement) return;
|
|
63635
63910
|
hoverStateRef.current = {
|
|
63636
63911
|
anchor: false,
|
|
63637
63912
|
control: false
|
|
63638
63913
|
};
|
|
63639
63914
|
const show = (event) => {
|
|
63640
|
-
updatePreviewChromeHoverState(hoverStateRef.current, event.currentTarget,
|
|
63915
|
+
updatePreviewChromeHoverState(hoverStateRef.current, event.currentTarget, hoverAnchorElement, controlElement, true);
|
|
63641
63916
|
setIsActive(true);
|
|
63642
63917
|
};
|
|
63643
63918
|
const hideIfFocusLeft = (event) => {
|
|
63644
|
-
updatePreviewChromeHoverState(hoverStateRef.current, event.currentTarget,
|
|
63919
|
+
updatePreviewChromeHoverState(hoverStateRef.current, event.currentTarget, hoverAnchorElement, controlElement, false);
|
|
63645
63920
|
window.setTimeout(() => {
|
|
63646
63921
|
const active = document.activeElement;
|
|
63647
63922
|
const hoverState = hoverStateRef.current;
|
|
63648
|
-
setIsActive(Boolean(hoverState.anchor || hoverState.control || active && (
|
|
63923
|
+
setIsActive(Boolean(hoverState.anchor || hoverState.control || active && (hoverAnchorElement.contains(active) || controlElement.contains(active))));
|
|
63649
63924
|
}, 0);
|
|
63650
63925
|
};
|
|
63651
|
-
|
|
63652
|
-
|
|
63653
|
-
|
|
63654
|
-
|
|
63926
|
+
hoverAnchorElement.addEventListener("mouseenter", show);
|
|
63927
|
+
hoverAnchorElement.addEventListener("mouseleave", hideIfFocusLeft);
|
|
63928
|
+
hoverAnchorElement.addEventListener("focusin", show);
|
|
63929
|
+
hoverAnchorElement.addEventListener("focusout", hideIfFocusLeft);
|
|
63655
63930
|
controlElement.addEventListener("mouseenter", show);
|
|
63656
63931
|
controlElement.addEventListener("mouseleave", hideIfFocusLeft);
|
|
63657
63932
|
controlElement.addEventListener("focusin", show);
|
|
63658
63933
|
controlElement.addEventListener("focusout", hideIfFocusLeft);
|
|
63659
63934
|
return () => {
|
|
63660
|
-
|
|
63661
|
-
|
|
63662
|
-
|
|
63663
|
-
|
|
63935
|
+
hoverAnchorElement.removeEventListener("mouseenter", show);
|
|
63936
|
+
hoverAnchorElement.removeEventListener("mouseleave", hideIfFocusLeft);
|
|
63937
|
+
hoverAnchorElement.removeEventListener("focusin", show);
|
|
63938
|
+
hoverAnchorElement.removeEventListener("focusout", hideIfFocusLeft);
|
|
63664
63939
|
controlElement.removeEventListener("mouseenter", show);
|
|
63665
63940
|
controlElement.removeEventListener("mouseleave", hideIfFocusLeft);
|
|
63666
63941
|
controlElement.removeEventListener("focusin", show);
|
|
63667
63942
|
controlElement.removeEventListener("focusout", hideIfFocusLeft);
|
|
63668
63943
|
};
|
|
63669
|
-
}, [
|
|
63944
|
+
}, [
|
|
63945
|
+
anchorElement,
|
|
63946
|
+
anchorTargetElement,
|
|
63947
|
+
controlElement
|
|
63948
|
+
]);
|
|
63670
63949
|
if (!layer?.portalTarget) return /* @__PURE__ */ jsx("div", {
|
|
63671
63950
|
className: fallbackClassName,
|
|
63672
63951
|
style: fallbackStyle,
|
|
@@ -63702,6 +63981,17 @@ function readThemeCustomProperties(element) {
|
|
|
63702
63981
|
for (let current = element; current; current = current.parentElement) copyThemeCustomProperties(current.style, properties);
|
|
63703
63982
|
return properties;
|
|
63704
63983
|
}
|
|
63984
|
+
function resolveAnchorTarget(anchor, selector) {
|
|
63985
|
+
if (!anchor) return null;
|
|
63986
|
+
if (!selector) return anchor;
|
|
63987
|
+
return Array.from(anchor.querySelectorAll(selector)).find(isUsableElementBox) ?? anchor;
|
|
63988
|
+
}
|
|
63989
|
+
function isUsableElementBox(element) {
|
|
63990
|
+
const rect = element.getBoundingClientRect();
|
|
63991
|
+
if (!Number.isFinite(rect.top) || !Number.isFinite(rect.right) || !Number.isFinite(rect.bottom) || !Number.isFinite(rect.height) || rect.height <= 0) return false;
|
|
63992
|
+
if (typeof window === "undefined") return true;
|
|
63993
|
+
return window.getComputedStyle(element).display !== "none";
|
|
63994
|
+
}
|
|
63705
63995
|
function copyThemeCustomProperties(style, target) {
|
|
63706
63996
|
for (let index = 0; index < style.length; index += 1) {
|
|
63707
63997
|
const propertyName = style.item(index);
|
|
@@ -63947,6 +64237,84 @@ function cycleAvailabilityFromFlags(input) {
|
|
|
63947
64237
|
return { kind: "available" };
|
|
63948
64238
|
}
|
|
63949
64239
|
//#endregion
|
|
64240
|
+
//#region ../preview-next/src/client/preview/CustomizeColorTokenPicker.tsx
|
|
64241
|
+
function CustomizeColorTokenPicker({ title, selectedToken, recommendedTokens, advancedTokens = [], disabled = false, columnsClassName = "grid-cols-2", showTitle = true, labelForToken, swatchColorForToken, onChooseToken }) {
|
|
64242
|
+
if (recommendedTokens.length === 0 && advancedTokens.length === 0) return null;
|
|
64243
|
+
const renderGrid = (tokens) => /* @__PURE__ */ jsx("div", {
|
|
64244
|
+
className: `grid gap-1 ${columnsClassName}`,
|
|
64245
|
+
children: tokens.map((token) => /* @__PURE__ */ jsx(ColorTokenButton, {
|
|
64246
|
+
token,
|
|
64247
|
+
label: labelForToken(token),
|
|
64248
|
+
swatchColor: swatchColorForToken(token),
|
|
64249
|
+
selected: selectedToken === token,
|
|
64250
|
+
disabled,
|
|
64251
|
+
onClick: (event) => onChooseToken(token, event)
|
|
64252
|
+
}, token))
|
|
64253
|
+
});
|
|
64254
|
+
return /* @__PURE__ */ jsxs("div", { children: [
|
|
64255
|
+
showTitle ? /* @__PURE__ */ jsx("div", {
|
|
64256
|
+
className: "mb-1 text-xs font-medium text-muted-foreground",
|
|
64257
|
+
children: title
|
|
64258
|
+
}) : null,
|
|
64259
|
+
renderGrid(recommendedTokens),
|
|
64260
|
+
advancedTokens.length > 0 ? /* @__PURE__ */ jsxs("details", {
|
|
64261
|
+
className: "mt-1",
|
|
64262
|
+
children: [/* @__PURE__ */ jsx("summary", {
|
|
64263
|
+
className: "cursor-pointer text-xs text-muted-foreground",
|
|
64264
|
+
children: "More colors"
|
|
64265
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
64266
|
+
className: "mt-1",
|
|
64267
|
+
children: renderGrid(advancedTokens)
|
|
64268
|
+
})]
|
|
64269
|
+
}) : null
|
|
64270
|
+
] });
|
|
64271
|
+
}
|
|
64272
|
+
function CustomizeBackgroundColorPicker({ title = "Colors", selectedToken, recommendedTokens, advancedTokens = [], disabled = false, columnsClassName = "grid-cols-2", defaultSelected = false, defaultLabel = "Default", labelForToken, swatchColorForToken, onChooseDefault, onChooseToken }) {
|
|
64273
|
+
const hasTokens = recommendedTokens.length > 0 || advancedTokens.length > 0;
|
|
64274
|
+
if (!onChooseDefault && !hasTokens) return null;
|
|
64275
|
+
return /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsxs("div", {
|
|
64276
|
+
className: "mb-2 flex items-center justify-between gap-2",
|
|
64277
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
64278
|
+
className: "text-xs font-medium text-muted-foreground",
|
|
64279
|
+
children: title
|
|
64280
|
+
}), onChooseDefault ? /* @__PURE__ */ jsx("button", {
|
|
64281
|
+
type: "button",
|
|
64282
|
+
className: `rounded-md border px-2 py-1 text-xs hover:bg-muted disabled:cursor-not-allowed disabled:opacity-50 ${defaultSelected ? "border-foreground" : "bg-background"}`,
|
|
64283
|
+
disabled,
|
|
64284
|
+
onClick: onChooseDefault,
|
|
64285
|
+
children: defaultLabel
|
|
64286
|
+
}) : null]
|
|
64287
|
+
}), hasTokens ? /* @__PURE__ */ jsx(CustomizeColorTokenPicker, {
|
|
64288
|
+
title,
|
|
64289
|
+
selectedToken,
|
|
64290
|
+
recommendedTokens,
|
|
64291
|
+
advancedTokens,
|
|
64292
|
+
disabled,
|
|
64293
|
+
columnsClassName,
|
|
64294
|
+
labelForToken,
|
|
64295
|
+
swatchColorForToken,
|
|
64296
|
+
onChooseToken,
|
|
64297
|
+
showTitle: false
|
|
64298
|
+
}) : null] });
|
|
64299
|
+
}
|
|
64300
|
+
function ColorTokenButton({ token, label, swatchColor, selected, disabled, onClick }) {
|
|
64301
|
+
return /* @__PURE__ */ jsxs("button", {
|
|
64302
|
+
type: "button",
|
|
64303
|
+
className: `flex min-w-0 items-center gap-2 rounded-md border px-2 py-1 text-left text-xs hover:bg-muted disabled:cursor-not-allowed disabled:opacity-50 ${selected ? "border-foreground" : "bg-background"}`,
|
|
64304
|
+
disabled,
|
|
64305
|
+
"aria-label": `Choose ${label}`,
|
|
64306
|
+
onClick,
|
|
64307
|
+
"data-token": token,
|
|
64308
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
64309
|
+
className: "h-3 w-3 shrink-0 rounded-full border",
|
|
64310
|
+
style: { backgroundColor: swatchColor }
|
|
64311
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
64312
|
+
className: "truncate",
|
|
64313
|
+
children: label
|
|
64314
|
+
})]
|
|
64315
|
+
});
|
|
64316
|
+
}
|
|
64317
|
+
//#endregion
|
|
63950
64318
|
//#region ../preview-next/src/client/preview/SiteChromeCustomizeButton.tsx
|
|
63951
64319
|
function SiteChromeCustomizeButton({ surface, 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" }) {
|
|
63952
64320
|
const customize = useSiteChromeCustomizeOptional();
|
|
@@ -64018,6 +64386,7 @@ function SiteChromeCustomizeButton({ surface, containerClassName = "pointer-even
|
|
|
64018
64386
|
]);
|
|
64019
64387
|
return /* @__PURE__ */ jsxs(PreviewChromeFloatingControl, {
|
|
64020
64388
|
anchorSelector: "[data-preview-site-chrome-surface]",
|
|
64389
|
+
anchorTargetSelector: surface === "header" ? SITE_CHROME_VISIBLE_HEADER_SELECTOR : void 0,
|
|
64021
64390
|
placement: (anchorBox) => planSiteChromeCustomizePlacement({
|
|
64022
64391
|
surface,
|
|
64023
64392
|
anchorBox
|
|
@@ -64045,7 +64414,6 @@ function SiteChromeCustomizeButton({ surface, containerClassName = "pointer-even
|
|
|
64045
64414
|
children: [
|
|
64046
64415
|
controlPlan.cycleRows.map((row) => /* @__PURE__ */ jsx(CustomizeCycleRow, { ...row }, row.label)),
|
|
64047
64416
|
background?.available ? /* @__PURE__ */ jsx(SiteChromeBackgroundPalette, {
|
|
64048
|
-
surface: surfaceState.surface,
|
|
64049
64417
|
background,
|
|
64050
64418
|
applyAllowed: surfaceState.applyAllowed,
|
|
64051
64419
|
onChoose: (override) => customize?.chooseSurfaceBackground(surfaceState.surface, override)
|
|
@@ -64070,7 +64438,7 @@ function SiteChromeCustomizeButton({ surface, containerClassName = "pointer-even
|
|
|
64070
64438
|
})]
|
|
64071
64439
|
}), /* @__PURE__ */ jsxs("label", {
|
|
64072
64440
|
className: "block text-xs font-medium text-muted-foreground",
|
|
64073
|
-
children: [/* @__PURE__ */ jsx("span", { children:
|
|
64441
|
+
children: [/* @__PURE__ */ jsx("span", { children: surfaceState.brandSizeLabel }), /* @__PURE__ */ jsx("select", {
|
|
64074
64442
|
className: "mt-1 h-8 w-full rounded-md border bg-background px-2 text-sm text-foreground disabled:cursor-not-allowed disabled:opacity-50",
|
|
64075
64443
|
value: surfaceState.logoSize,
|
|
64076
64444
|
onChange: (event) => {
|
|
@@ -64085,6 +64453,23 @@ function SiteChromeCustomizeButton({ surface, containerClassName = "pointer-even
|
|
|
64085
64453
|
})]
|
|
64086
64454
|
})]
|
|
64087
64455
|
}) : null,
|
|
64456
|
+
/* @__PURE__ */ jsx("div", {
|
|
64457
|
+
className: "border-t pt-2",
|
|
64458
|
+
children: /* @__PURE__ */ jsx("button", {
|
|
64459
|
+
type: "button",
|
|
64460
|
+
className: "w-full rounded-md border bg-background px-3 py-2 text-sm font-medium hover:bg-muted",
|
|
64461
|
+
onClick: (event) => {
|
|
64462
|
+
event.preventDefault();
|
|
64463
|
+
event.stopPropagation();
|
|
64464
|
+
requestPreviewSidebarOpen({
|
|
64465
|
+
tab: "editor",
|
|
64466
|
+
designRow: surfaceState.surface === "header" ? "header-style" : "footer"
|
|
64467
|
+
});
|
|
64468
|
+
popover.close();
|
|
64469
|
+
},
|
|
64470
|
+
children: "More options"
|
|
64471
|
+
})
|
|
64472
|
+
}),
|
|
64088
64473
|
surfaceState.diagnostics.length > 0 ? /* @__PURE__ */ jsx("ul", {
|
|
64089
64474
|
className: "space-y-1 text-xs text-amber-700",
|
|
64090
64475
|
children: surfaceState.diagnostics.map((diagnostic) => /* @__PURE__ */ jsx("li", { children: diagnostic }, diagnostic))
|
|
@@ -64165,77 +64550,32 @@ function chooseSiteChromeCustomizePopoverSide(input) {
|
|
|
64165
64550
|
if (measuredPanelHeight <= availableBelow) return "below";
|
|
64166
64551
|
return availableAbove > availableBelow ? "above" : "below";
|
|
64167
64552
|
}
|
|
64168
|
-
function SiteChromeBackgroundPalette({
|
|
64553
|
+
function SiteChromeBackgroundPalette({ background, applyAllowed, onChoose }) {
|
|
64169
64554
|
const choose = (override) => (event) => {
|
|
64170
64555
|
event.preventDefault();
|
|
64171
64556
|
event.stopPropagation();
|
|
64172
64557
|
onChoose(override);
|
|
64173
64558
|
};
|
|
64174
|
-
return /* @__PURE__ */
|
|
64559
|
+
return /* @__PURE__ */ jsx("div", {
|
|
64175
64560
|
className: "border-t pt-3",
|
|
64176
|
-
children:
|
|
64177
|
-
|
|
64178
|
-
|
|
64179
|
-
|
|
64180
|
-
|
|
64181
|
-
|
|
64182
|
-
|
|
64183
|
-
|
|
64184
|
-
|
|
64185
|
-
|
|
64186
|
-
|
|
64187
|
-
|
|
64188
|
-
|
|
64189
|
-
|
|
64190
|
-
|
|
64191
|
-
|
|
64192
|
-
|
|
64193
|
-
|
|
64194
|
-
surface,
|
|
64195
|
-
selected: background.current.kind === "color" && background.current.token === token,
|
|
64196
|
-
disabled: !applyAllowed,
|
|
64197
|
-
onClick: choose({
|
|
64198
|
-
kind: "color",
|
|
64199
|
-
token
|
|
64200
|
-
})
|
|
64201
|
-
}, token))
|
|
64202
|
-
}),
|
|
64203
|
-
background.advancedTokens.length ? /* @__PURE__ */ jsxs("details", {
|
|
64204
|
-
className: "mt-2",
|
|
64205
|
-
children: [/* @__PURE__ */ jsx("summary", {
|
|
64206
|
-
className: "cursor-pointer text-xs text-muted-foreground",
|
|
64207
|
-
children: "More colors"
|
|
64208
|
-
}), /* @__PURE__ */ jsx("div", {
|
|
64209
|
-
className: "mt-1 grid grid-cols-3 gap-1",
|
|
64210
|
-
children: background.advancedTokens.map((token) => /* @__PURE__ */ jsx(BackgroundSwatchButton, {
|
|
64211
|
-
token,
|
|
64212
|
-
surface,
|
|
64213
|
-
selected: background.current.kind === "color" && background.current.token === token,
|
|
64214
|
-
disabled: !applyAllowed,
|
|
64215
|
-
onClick: choose({
|
|
64216
|
-
kind: "color",
|
|
64217
|
-
token
|
|
64218
|
-
})
|
|
64219
|
-
}, token))
|
|
64220
|
-
})]
|
|
64221
|
-
}) : null
|
|
64222
|
-
]
|
|
64223
|
-
});
|
|
64224
|
-
}
|
|
64225
|
-
function BackgroundSwatchButton({ token, surface, selected, disabled, onClick }) {
|
|
64226
|
-
return /* @__PURE__ */ jsxs("button", {
|
|
64227
|
-
type: "button",
|
|
64228
|
-
className: `flex min-w-0 items-center gap-2 rounded-md border px-2 py-1 text-left text-xs hover:bg-muted disabled:cursor-not-allowed disabled:opacity-50 ${selected ? "border-foreground" : "bg-background"}`,
|
|
64229
|
-
disabled,
|
|
64230
|
-
"aria-label": `Set ${surface} background to ${token}`,
|
|
64231
|
-
onClick,
|
|
64232
|
-
children: [/* @__PURE__ */ jsx("span", {
|
|
64233
|
-
className: "h-3 w-3 shrink-0 rounded-full border",
|
|
64234
|
-
style: { backgroundColor: tokenSwatchCss$1(token) }
|
|
64235
|
-
}), /* @__PURE__ */ jsx("span", {
|
|
64236
|
-
className: "truncate",
|
|
64237
|
-
children: formatSiteChromeBackgroundTokenLabel(token)
|
|
64238
|
-
})]
|
|
64561
|
+
children: /* @__PURE__ */ jsx(CustomizeBackgroundColorPicker, {
|
|
64562
|
+
title: "Background colors",
|
|
64563
|
+
defaultSelected: background.current.kind === "default",
|
|
64564
|
+
onChooseDefault: choose({ kind: "default" }),
|
|
64565
|
+
selectedToken: background.current.kind === "color" ? background.current.token : null,
|
|
64566
|
+
recommendedTokens: background.quickTokens,
|
|
64567
|
+
advancedTokens: background.advancedTokens,
|
|
64568
|
+
disabled: !applyAllowed,
|
|
64569
|
+
columnsClassName: "grid-cols-3",
|
|
64570
|
+
labelForToken: formatSiteChromeBackgroundTokenLabel,
|
|
64571
|
+
swatchColorForToken: tokenSwatchCss$1,
|
|
64572
|
+
onChooseToken: (token, event) => {
|
|
64573
|
+
choose({
|
|
64574
|
+
kind: "color",
|
|
64575
|
+
token
|
|
64576
|
+
})(event);
|
|
64577
|
+
}
|
|
64578
|
+
})
|
|
64239
64579
|
});
|
|
64240
64580
|
}
|
|
64241
64581
|
function tokenSwatchCss$1(token) {
|
|
@@ -64507,10 +64847,10 @@ function LinkedEntryEditEventBridge() {
|
|
|
64507
64847
|
//#region ../preview-next/src/client/preview/PreviewShellLayout.tsx
|
|
64508
64848
|
const previewContainerResponsiveEnabled = process.env.NEXT_PUBLIC_ENABLE_PREVIEW_CONTAINER_RESPONSIVE !== "false";
|
|
64509
64849
|
const PreviewEditorSidebar = React.lazy(async () => {
|
|
64510
|
-
return { default: (await import("./PreviewEditorSidebar-
|
|
64850
|
+
return { default: (await import("./PreviewEditorSidebar-DkNpCPja.mjs")).PreviewEditorSidebar };
|
|
64511
64851
|
});
|
|
64512
64852
|
const PreviewEditorUI = React.lazy(async () => {
|
|
64513
|
-
return { default: (await import("./PreviewEditorUI-
|
|
64853
|
+
return { default: (await import("./PreviewEditorUI-DeNKtqk3.mjs")).PreviewEditorUI };
|
|
64514
64854
|
});
|
|
64515
64855
|
const previewPaneContainmentStyle = {
|
|
64516
64856
|
contain: "layout paint",
|
|
@@ -64905,11 +65245,11 @@ function defaultDesignEditorEligibility(input) {
|
|
|
64905
65245
|
//#region ../preview-next/src/client/utils/path.ts
|
|
64906
65246
|
const PATH_SEPARATOR_REGEX = /\./g;
|
|
64907
65247
|
const BRACKET_ACCESS_REGEX = /\[([^\]]+)\]/g;
|
|
64908
|
-
function isRecord$
|
|
65248
|
+
function isRecord$5(value) {
|
|
64909
65249
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
64910
65250
|
}
|
|
64911
65251
|
function isPathContainer(value) {
|
|
64912
|
-
return Array.isArray(value) || isRecord$
|
|
65252
|
+
return Array.isArray(value) || isRecord$5(value);
|
|
64913
65253
|
}
|
|
64914
65254
|
function createPathContainer(nextIsIndex) {
|
|
64915
65255
|
return nextIsIndex ? [] : {};
|
|
@@ -65062,25 +65402,33 @@ function cloneRecord(value) {
|
|
|
65062
65402
|
//#endregion
|
|
65063
65403
|
//#region ../preview-next/src/client/blocks/previewProjection/runtimeContentDecoration.ts
|
|
65064
65404
|
function runtimeContentDecorationProjectionFromEditorModel(editorModel, surfaceResolutionContext, designRules) {
|
|
65405
|
+
const compiled = compileEditorModelRuntime({
|
|
65406
|
+
editorModel,
|
|
65407
|
+
surfaceResolutionContext,
|
|
65408
|
+
designRules
|
|
65409
|
+
});
|
|
65065
65410
|
return {
|
|
65066
65411
|
kind: "runtime-content-decoration",
|
|
65067
65412
|
source: "page-design",
|
|
65068
|
-
fieldsByBlockId:
|
|
65069
|
-
|
|
65070
|
-
surfaceResolutionContext,
|
|
65071
|
-
designRules
|
|
65072
|
-
})
|
|
65413
|
+
fieldsByBlockId: runtimeFieldsByBlockId(compiled.blocks),
|
|
65414
|
+
boundaries: compiled.boundaries
|
|
65073
65415
|
};
|
|
65074
65416
|
}
|
|
65075
|
-
function
|
|
65417
|
+
function runtimeFieldsByBlockId(blocks) {
|
|
65418
|
+
return new Map(blocks.map((block) => [block.blockId, block.fields]));
|
|
65419
|
+
}
|
|
65420
|
+
function applyRuntimeContentDecorationProjection(block, content, projection, adjacency) {
|
|
65076
65421
|
const blockId = designBlockIdFromBlockItem(block);
|
|
65077
|
-
const
|
|
65078
|
-
|
|
65422
|
+
const retargetedFields = retargetCompiledRuntimeFieldsForContentAdjacency(blockId ? projection.fieldsByBlockId.get(blockId) : void 0, {
|
|
65423
|
+
currentContent: isRecord$4(content) ? content : null,
|
|
65424
|
+
nextContent: adjacency?.nextContent
|
|
65425
|
+
});
|
|
65426
|
+
return applyCompiledRuntimeFieldsToContent(isRecord$4(content) ? content : {}, retargetedFields);
|
|
65079
65427
|
}
|
|
65080
65428
|
function designBlockIdFromBlockItem(block) {
|
|
65081
65429
|
return typeof block.id === "string" && block.id.length > 0 ? asDesignBlockId(block.id) : null;
|
|
65082
65430
|
}
|
|
65083
|
-
function isRecord$
|
|
65431
|
+
function isRecord$4(value) {
|
|
65084
65432
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
65085
65433
|
}
|
|
65086
65434
|
//#endregion
|
|
@@ -65097,10 +65445,10 @@ function applyPreviewContentFieldProjections(blockId, content, projections) {
|
|
|
65097
65445
|
return applyContentFieldOverrideProjection(blockId, current, projection);
|
|
65098
65446
|
}, content);
|
|
65099
65447
|
}
|
|
65100
|
-
function applyPreviewRuntimeContentProjections(block, content, projections) {
|
|
65448
|
+
function applyPreviewRuntimeContentProjections(block, content, projections, adjacency) {
|
|
65101
65449
|
return projections.reduce((current, projection) => {
|
|
65102
65450
|
if (projection.kind !== "runtime-content-decoration") return current;
|
|
65103
|
-
return applyRuntimeContentDecorationProjection(block, current, projection);
|
|
65451
|
+
return applyRuntimeContentDecorationProjection(block, current, projection, adjacency);
|
|
65104
65452
|
}, content);
|
|
65105
65453
|
}
|
|
65106
65454
|
function blockHasPreviewContentFieldProjection(blockId, projections) {
|
|
@@ -65131,7 +65479,7 @@ function overlayValue(value, overlays) {
|
|
|
65131
65479
|
});
|
|
65132
65480
|
return changed ? next : value;
|
|
65133
65481
|
}
|
|
65134
|
-
if (!isRecord$
|
|
65482
|
+
if (!isRecord$3(value)) return value;
|
|
65135
65483
|
const meta = parseLinkedEntryMeta(value[LINKED_CONTENT_ENTRY_META_KEY]);
|
|
65136
65484
|
if (meta) {
|
|
65137
65485
|
const overlay = overlays.get(unsafeAsLinkedContentEntryId(meta.entryId));
|
|
@@ -65197,7 +65545,7 @@ function resolveOverlayTitle(content, meta) {
|
|
|
65197
65545
|
function parseLinkedEntryMeta(value) {
|
|
65198
65546
|
return getLinkedContentEntryMeta({ [LINKED_CONTENT_ENTRY_META_KEY]: value });
|
|
65199
65547
|
}
|
|
65200
|
-
function isRecord$
|
|
65548
|
+
function isRecord$3(value) {
|
|
65201
65549
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
65202
65550
|
}
|
|
65203
65551
|
//#endregion
|
|
@@ -65207,26 +65555,42 @@ function getDraftSnapshots(uiStore) {
|
|
|
65207
65555
|
const snapshots = uiStore.getState().drafts.inspect();
|
|
65208
65556
|
return new Map(snapshots.map((snap) => [snap.id, snap]));
|
|
65209
65557
|
}
|
|
65210
|
-
function mergeBlockWithDraft(block, draftMap, index, projections = [], linkedEntryOverlays = EMPTY_LINKED_ENTRY_OVERLAY) {
|
|
65558
|
+
function mergeBlockWithDraft(block, draftMap, index, projections = [], linkedEntryOverlays = EMPTY_LINKED_ENTRY_OVERLAY, nextBlock = null) {
|
|
65211
65559
|
const id = block.id ?? null;
|
|
65212
65560
|
const editorBlockId = id ? unsafeAsEditorBlockId(id) : null;
|
|
65213
65561
|
const snap = editorBlockId ? draftMap.get(editorBlockId) ?? null : null;
|
|
65214
|
-
const
|
|
65215
|
-
const draftContent = editorBlockId ? applyPreviewContentFieldProjections(editorBlockId, rawDraft, projections) : rawDraft;
|
|
65562
|
+
const draftContent = editorBlockId ? readProjectedDraftRenderContent(block, editorBlockId, snap, projections) : null;
|
|
65216
65563
|
const baseline = snap?.baseline ?? block.content ?? block.publishedContent ?? null;
|
|
65564
|
+
const nextContent = nextBlock ? readBlockRenderContents(nextBlock, draftMap, projections) : null;
|
|
65217
65565
|
return {
|
|
65218
65566
|
id,
|
|
65219
65567
|
kind: block.kind,
|
|
65220
65568
|
purpose: "content",
|
|
65221
65569
|
orderIndex: block.orderIndex ?? index,
|
|
65222
|
-
content: renderContent(block, baseline, projections, linkedEntryOverlays),
|
|
65223
|
-
draftContent: renderContent(block, draftContent, projections, linkedEntryOverlays),
|
|
65224
|
-
publishedContent: renderContent(block, block.publishedContent ?? null, projections, EMPTY_LINKED_ENTRY_OVERLAY),
|
|
65570
|
+
content: renderContent(block, baseline, projections, linkedEntryOverlays, nextContent?.baseline ?? null),
|
|
65571
|
+
draftContent: renderContent(block, draftContent, projections, linkedEntryOverlays, nextContent?.draft ?? null),
|
|
65572
|
+
publishedContent: renderContent(block, block.publishedContent ?? null, projections, EMPTY_LINKED_ENTRY_OVERLAY, nextContent?.published ?? null),
|
|
65225
65573
|
bindings: block.bindings ?? null
|
|
65226
65574
|
};
|
|
65227
65575
|
}
|
|
65228
|
-
function
|
|
65229
|
-
|
|
65576
|
+
function readBlockRenderContents(block, draftMap, projections) {
|
|
65577
|
+
const id = block.id ?? null;
|
|
65578
|
+
const editorBlockId = id ? unsafeAsEditorBlockId(id) : null;
|
|
65579
|
+
const snap = editorBlockId ? draftMap.get(editorBlockId) ?? null : null;
|
|
65580
|
+
return {
|
|
65581
|
+
baseline: snap?.baseline ?? block.content ?? block.publishedContent ?? null,
|
|
65582
|
+
draft: editorBlockId ? readProjectedDraftRenderContent(block, editorBlockId, snap, projections) : null,
|
|
65583
|
+
published: block.publishedContent ?? null
|
|
65584
|
+
};
|
|
65585
|
+
}
|
|
65586
|
+
function readProjectedDraftRenderContent(block, editorBlockId, snap, projections) {
|
|
65587
|
+
return applyPreviewContentFieldProjections(editorBlockId, snap?.current ?? snap?.baseline ?? block.content ?? block.publishedContent ?? null, projections);
|
|
65588
|
+
}
|
|
65589
|
+
function renderContent(block, content, projections, linkedEntryOverlays, nextContent) {
|
|
65590
|
+
return applyPreviewRuntimeContentProjections(block, applyLinkedEntryRenderOverlay(content, linkedEntryOverlays), projections, { nextContent: isRecord$2(nextContent) ? nextContent : null });
|
|
65591
|
+
}
|
|
65592
|
+
function isRecord$2(value) {
|
|
65593
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
65230
65594
|
}
|
|
65231
65595
|
//#endregion
|
|
65232
65596
|
//#region ../preview-next/src/client/blocks/composer/transformBlock.ts
|
|
@@ -65284,7 +65648,8 @@ function composePreviewRenderPage(args, cacheRef) {
|
|
|
65284
65648
|
if (!page) return page;
|
|
65285
65649
|
if (!blockItems.length) return page;
|
|
65286
65650
|
const draftMap = draftSnapshotMap(draftSnapshots);
|
|
65287
|
-
const
|
|
65651
|
+
const projectedBlockItems = applyPreviewStructureProjections(blockItems, projections);
|
|
65652
|
+
const renderedBlocks = applyCacheOptimization([...projectedBlockItems.map((block, index) => mergeBlockWithDraft(block, draftMap, index, projections, linkedEntryOverlays, projectedBlockItems[index + 1] ?? null))].sort((a, b) => (a.orderIndex ?? 0) - (b.orderIndex ?? 0)), cacheRef);
|
|
65288
65653
|
return {
|
|
65289
65654
|
...page,
|
|
65290
65655
|
blocks: renderedBlocks
|
|
@@ -65439,7 +65804,7 @@ const editorRegistry = {
|
|
|
65439
65804
|
};
|
|
65440
65805
|
//#endregion
|
|
65441
65806
|
//#region ../preview-next/src/client/blocks/isRecord.ts
|
|
65442
|
-
function isRecord(value) {
|
|
65807
|
+
function isRecord$1(value) {
|
|
65443
65808
|
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
65444
65809
|
}
|
|
65445
65810
|
//#endregion
|
|
@@ -65613,7 +65978,7 @@ function BlockToolbar({ blockId, blockKind, content, bookingOfferingPresets, the
|
|
|
65613
65978
|
const uiStore = useEditorUiStoreInstance();
|
|
65614
65979
|
const editorBlockId = useMemo(() => unsafeAsEditorBlockId(blockId), [blockId]);
|
|
65615
65980
|
const draftContent = useEditorUiStore((state) => state.drafts.getCurrentValues(editorBlockId));
|
|
65616
|
-
const customizeContent = useMemo(() => isRecord(draftContent) ? draftContent : content, [content, draftContent]);
|
|
65981
|
+
const customizeContent = useMemo(() => isRecord$1(draftContent) ? draftContent : content, [content, draftContent]);
|
|
65617
65982
|
const customizeSelection = usePreviewBlockCustomizeSelectionOptional();
|
|
65618
65983
|
const popover = useCustomizePopoverController();
|
|
65619
65984
|
const focusTarget = useMemo(() => computeDefaultFocus(blockKind, customizeContent), [blockKind, customizeContent]);
|
|
@@ -66030,54 +66395,22 @@ function BackgroundChooser({ capability, current, imagePoolStatus, onChoose }) {
|
|
|
66030
66395
|
}, { selectedImage });
|
|
66031
66396
|
setMediaPickerOpenKey(0);
|
|
66032
66397
|
};
|
|
66033
|
-
const renderColorOptions = () =>
|
|
66034
|
-
|
|
66035
|
-
|
|
66036
|
-
|
|
66037
|
-
|
|
66038
|
-
|
|
66039
|
-
|
|
66040
|
-
|
|
66041
|
-
|
|
66042
|
-
|
|
66043
|
-
|
|
66044
|
-
|
|
66045
|
-
|
|
66046
|
-
|
|
66047
|
-
|
|
66048
|
-
|
|
66049
|
-
style: { backgroundColor: tokenSwatchCss(token) }
|
|
66050
|
-
}), /* @__PURE__ */ jsx("span", {
|
|
66051
|
-
className: "truncate",
|
|
66052
|
-
children: formatTokenLabel(token)
|
|
66053
|
-
})]
|
|
66054
|
-
}, token))
|
|
66055
|
-
}),
|
|
66056
|
-
advancedTokens.length ? /* @__PURE__ */ jsxs("details", {
|
|
66057
|
-
className: "mt-1",
|
|
66058
|
-
children: [/* @__PURE__ */ jsx("summary", {
|
|
66059
|
-
className: "cursor-pointer text-xs text-muted-foreground",
|
|
66060
|
-
children: "More colors"
|
|
66061
|
-
}), /* @__PURE__ */ jsx("div", {
|
|
66062
|
-
className: "mt-1 grid grid-cols-2 gap-1",
|
|
66063
|
-
children: advancedTokens.map((token) => /* @__PURE__ */ jsxs("button", {
|
|
66064
|
-
type: "button",
|
|
66065
|
-
className: `flex min-w-0 items-center gap-2 rounded-md border px-2 py-1 text-left text-xs hover:bg-muted ${current.kind === "color" && current.token === token ? "border-foreground" : "bg-background"}`,
|
|
66066
|
-
onClick: chooseFromClick({
|
|
66067
|
-
kind: "color",
|
|
66068
|
-
token
|
|
66069
|
-
}),
|
|
66070
|
-
children: [/* @__PURE__ */ jsx("span", {
|
|
66071
|
-
className: "h-3 w-3 shrink-0 rounded-full border",
|
|
66072
|
-
style: { backgroundColor: tokenSwatchCss(token) }
|
|
66073
|
-
}), /* @__PURE__ */ jsx("span", {
|
|
66074
|
-
className: "truncate",
|
|
66075
|
-
children: formatTokenLabel(token)
|
|
66076
|
-
})]
|
|
66077
|
-
}, token))
|
|
66078
|
-
})]
|
|
66079
|
-
}) : null
|
|
66080
|
-
] }) : null;
|
|
66398
|
+
const renderColorOptions = () => /* @__PURE__ */ jsx(CustomizeBackgroundColorPicker, {
|
|
66399
|
+
title: "Colors",
|
|
66400
|
+
selectedToken: current.kind === "color" ? current.token : null,
|
|
66401
|
+
recommendedTokens,
|
|
66402
|
+
advancedTokens,
|
|
66403
|
+
defaultSelected: current.kind === "default",
|
|
66404
|
+
onChooseDefault: capability.modes.includes("default") ? chooseFromClick(defaultBackgroundOverrideForMode("default", capability)) : void 0,
|
|
66405
|
+
labelForToken: formatTokenLabel,
|
|
66406
|
+
swatchColorForToken: tokenSwatchCss,
|
|
66407
|
+
onChooseToken: (token, event) => {
|
|
66408
|
+
chooseFromClick({
|
|
66409
|
+
kind: "color",
|
|
66410
|
+
token
|
|
66411
|
+
})(event);
|
|
66412
|
+
}
|
|
66413
|
+
});
|
|
66081
66414
|
const renderGradientOptions = () => capability.gradientIds?.length ? /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("div", {
|
|
66082
66415
|
className: "mb-1 text-xs font-medium text-muted-foreground",
|
|
66083
66416
|
children: "Gradients"
|
|
@@ -66182,16 +66515,7 @@ function BackgroundChooser({ capability, current, imagePoolStatus, onChoose }) {
|
|
|
66182
66515
|
return /* @__PURE__ */ jsxs("div", {
|
|
66183
66516
|
className: "mt-2 max-h-80 overflow-y-auto rounded-md border bg-muted/20 p-2",
|
|
66184
66517
|
children: [
|
|
66185
|
-
current.kind === "default"
|
|
66186
|
-
type: "button",
|
|
66187
|
-
className: "flex w-full items-center gap-2 rounded-md border border-foreground bg-background px-2 py-1 text-left text-xs",
|
|
66188
|
-
onClick: chooseFromClick(defaultBackgroundOverrideForMode("default", capability)),
|
|
66189
|
-
children: [/* @__PURE__ */ jsx(BackgroundPreviewSwatch, {
|
|
66190
|
-
override: current,
|
|
66191
|
-
imagePool: images
|
|
66192
|
-
}), /* @__PURE__ */ jsx("span", { children: "Default background" })]
|
|
66193
|
-
}) : null,
|
|
66194
|
-
current.kind === "color" ? renderColorOptions() : null,
|
|
66518
|
+
current.kind === "default" || current.kind === "color" ? renderColorOptions() : null,
|
|
66195
66519
|
current.kind === "gradient" ? renderGradientOptions() : null,
|
|
66196
66520
|
current.kind === "image" ? renderImageOptions() : null
|
|
66197
66521
|
]
|
|
@@ -66219,13 +66543,13 @@ function findFirstFieldPath(fields, data, prefix) {
|
|
|
66219
66543
|
if (Array.isArray(field.visibleRoles) && !field.visibleRoles.includes("author")) continue;
|
|
66220
66544
|
const nextPrefix = [...prefix, field.id];
|
|
66221
66545
|
if (field.type === "group") {
|
|
66222
|
-
const groupValue = isRecord(data) ? data[field.id] : void 0;
|
|
66546
|
+
const groupValue = isRecord$1(data) ? data[field.id] : void 0;
|
|
66223
66547
|
const nested = findFirstFieldPath(field.schema.fields, groupValue, nextPrefix);
|
|
66224
66548
|
if (nested) return nested;
|
|
66225
66549
|
continue;
|
|
66226
66550
|
}
|
|
66227
66551
|
if (field.type === "repeater" && field.schema) {
|
|
66228
|
-
const collection = isRecord(data) ? data[field.id] : void 0;
|
|
66552
|
+
const collection = isRecord$1(data) ? data[field.id] : void 0;
|
|
66229
66553
|
const items = isUnknownArray(collection) ? collection : [];
|
|
66230
66554
|
if (items.length > 0) {
|
|
66231
66555
|
const firstItem = items[0];
|
|
@@ -66753,6 +67077,35 @@ function EditablePageRenderer(props) {
|
|
|
66753
67077
|
uiStore,
|
|
66754
67078
|
renderStateVersion
|
|
66755
67079
|
]) ?? pageRendererProps.page;
|
|
67080
|
+
const runtimeBoundaries = useMemo(() => retargetRuntimeBoundariesForRenderPage(runtimeProjection?.boundaries ?? pageRendererProps.runtimeBoundaries ?? [], renderPage), [
|
|
67081
|
+
pageRendererProps.runtimeBoundaries,
|
|
67082
|
+
renderPage,
|
|
67083
|
+
runtimeProjection
|
|
67084
|
+
]);
|
|
67085
|
+
const renderedBlockById = useMemo(() => {
|
|
67086
|
+
return new Map((renderPage?.blocks ?? []).filter((block) => Boolean(block.id)).map((block) => [block.id, block]));
|
|
67087
|
+
}, [renderPage?.blocks]);
|
|
67088
|
+
const wrapBoundaryWithControl = useCallback((boundary, rendered) => {
|
|
67089
|
+
const previousBlock = renderedBlockById.get(boundary.previousBlockId);
|
|
67090
|
+
const nextBlock = renderedBlockById.get(boundary.nextBlockId);
|
|
67091
|
+
const control = !isEntryTemplatePage && previousBlock && nextBlock ? /* @__PURE__ */ jsx(BoundaryControl, {
|
|
67092
|
+
previousBlockId: asDesignBlockId(boundary.previousBlockId),
|
|
67093
|
+
nextBlockId: asDesignBlockId(boundary.nextBlockId),
|
|
67094
|
+
previousBlockKind: previousBlock.kind,
|
|
67095
|
+
nextBlockKind: nextBlock.kind
|
|
67096
|
+
}) : null;
|
|
67097
|
+
const wrapped = pageRendererProps.wrapBoundary ? pageRendererProps.wrapBoundary(boundary, rendered) : rendered;
|
|
67098
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
67099
|
+
className: "relative",
|
|
67100
|
+
"data-preview-boundary-wrapper": "",
|
|
67101
|
+
"data-boundary-id": boundary.boundaryId,
|
|
67102
|
+
children: [wrapped, control]
|
|
67103
|
+
});
|
|
67104
|
+
}, [
|
|
67105
|
+
isEntryTemplatePage,
|
|
67106
|
+
pageRendererProps.wrapBoundary,
|
|
67107
|
+
renderedBlockById
|
|
67108
|
+
]);
|
|
66756
67109
|
const wrapBlockWithProvider = useCallback((blockId, rendered) => {
|
|
66757
67110
|
const renderedBlocks = renderPage?.blocks ?? [];
|
|
66758
67111
|
const controllerBlockIndex = blockItemsForRender.findIndex((b) => b.id === blockId);
|
|
@@ -66760,9 +67113,6 @@ function EditablePageRenderer(props) {
|
|
|
66760
67113
|
const blockIndex = controllerBlockIndex >= 0 ? controllerBlockIndex : renderedBlockIndex;
|
|
66761
67114
|
const chromeBlocks = controllerBlockIndex >= 0 ? blockItemsForRender : renderedBlocks;
|
|
66762
67115
|
const block = blockIndex >= 0 ? chromeBlocks[blockIndex] ?? null : null;
|
|
66763
|
-
const previousBlock = blockIndex > 0 ? chromeBlocks[blockIndex - 1] ?? null : null;
|
|
66764
|
-
const canonicalBlockIndex = blockItems.findIndex((b) => b.id === blockId);
|
|
66765
|
-
const canonicalPreviousBlock = canonicalBlockIndex > 0 ? blockItems[canonicalBlockIndex - 1] ?? null : null;
|
|
66766
67116
|
const editorBlockId = unsafeAsEditorBlockId(blockId);
|
|
66767
67117
|
if (!block) return /* @__PURE__ */ jsx(EditableBlockProvider, {
|
|
66768
67118
|
blockId,
|
|
@@ -66775,12 +67125,7 @@ function EditablePageRenderer(props) {
|
|
|
66775
67125
|
children: /* @__PURE__ */ jsxs(Fragment$1, { children: [rendered, /* @__PURE__ */ jsxs(Fragment$1, { children: [blockHasPreviewContentFieldProjection(editorBlockId, aiProjections) ? /* @__PURE__ */ jsx("span", {
|
|
66776
67126
|
className: "pointer-events-none absolute left-2 top-2 z-10 rounded-full bg-amber-500/90 px-2 py-0.5 text-[10px] font-semibold uppercase text-white shadow",
|
|
66777
67127
|
children: "AI"
|
|
66778
|
-
}) : null, !isEntryTemplatePage ? /* @__PURE__ */
|
|
66779
|
-
previousBlockId: asDesignBlockId(previousBlock.id),
|
|
66780
|
-
nextBlockId: asDesignBlockId(blockId),
|
|
66781
|
-
previousBlockKind: previousBlock.kind,
|
|
66782
|
-
nextBlockKind: block.kind
|
|
66783
|
-
}) : null, /* @__PURE__ */ jsx(BlockToolbar, {
|
|
67128
|
+
}) : null, !isEntryTemplatePage ? /* @__PURE__ */ jsx(BlockToolbar, {
|
|
66784
67129
|
blockId,
|
|
66785
67130
|
blockKind: block.kind,
|
|
66786
67131
|
content,
|
|
@@ -66791,11 +67136,10 @@ function EditablePageRenderer(props) {
|
|
|
66791
67136
|
blockIndex,
|
|
66792
67137
|
headerClearance
|
|
66793
67138
|
})
|
|
66794
|
-
})
|
|
67139
|
+
}) : null] })] })
|
|
66795
67140
|
});
|
|
66796
67141
|
}, [
|
|
66797
67142
|
aiProjections,
|
|
66798
|
-
blockItems,
|
|
66799
67143
|
blockItemsForRender,
|
|
66800
67144
|
headerClearance,
|
|
66801
67145
|
isEntryTemplatePage,
|
|
@@ -66813,13 +67157,34 @@ function EditablePageRenderer(props) {
|
|
|
66813
67157
|
return /* @__PURE__ */ jsx(PageRenderer, {
|
|
66814
67158
|
...pageRendererProps,
|
|
66815
67159
|
page: renderPage,
|
|
67160
|
+
runtimeBoundaries,
|
|
66816
67161
|
registry: allowInlineEditing ? editorRegistry : pageRendererProps.registry ?? clientComponentRegistry,
|
|
66817
67162
|
wrapBlock: allowInlineEditing ? wrapBlockWithProvider : pageRendererProps.wrapBlock,
|
|
67163
|
+
wrapBoundary: allowInlineEditing ? wrapBoundaryWithControl : pageRendererProps.wrapBoundary,
|
|
66818
67164
|
dataContext,
|
|
66819
67165
|
previewAuthoring,
|
|
66820
67166
|
usePlaceholders: true
|
|
66821
67167
|
});
|
|
66822
67168
|
}
|
|
67169
|
+
function retargetRuntimeBoundariesForRenderPage(boundaries, page) {
|
|
67170
|
+
if (!boundaries?.length) return boundaries;
|
|
67171
|
+
const blockById = new Map(page.blocks.filter((block) => Boolean(block.id)).map((block) => [block.id, block]));
|
|
67172
|
+
return boundaries.map((boundary) => {
|
|
67173
|
+
const currentBlock = blockById.get(boundary.previousBlockId);
|
|
67174
|
+
const nextBlock = blockById.get(boundary.nextBlockId);
|
|
67175
|
+
return retargetCompiledBoundaryRuntimeForContentAdjacency(boundary, {
|
|
67176
|
+
currentContent: renderableBoundaryContent(currentBlock),
|
|
67177
|
+
nextContent: renderableBoundaryContent(nextBlock)
|
|
67178
|
+
});
|
|
67179
|
+
});
|
|
67180
|
+
}
|
|
67181
|
+
function renderableBoundaryContent(block) {
|
|
67182
|
+
const source = block?.draftContent ?? block?.content ?? null;
|
|
67183
|
+
return isRecord(source) ? source : null;
|
|
67184
|
+
}
|
|
67185
|
+
function isRecord(value) {
|
|
67186
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
67187
|
+
}
|
|
66823
67188
|
function usePreviewBlockResolvedData(args) {
|
|
66824
67189
|
const { page, dataContext, apiClient } = args;
|
|
66825
67190
|
const cacheKey = useMemo(() => {
|