@riverbankcms/sdk 0.102.0 → 0.104.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-BKkhhkJk.mjs → PreviewEditorSidebar-ywqcYjTB.mjs} +217 -131
- package/dist/{PreviewEditorUI-DIvTqcqI.mjs → PreviewEditorUI-DApUNF6g.mjs} +3 -3
- package/dist/{PreviewQueryProvider-ZF6TXq5Q.mjs → PreviewQueryProvider-CStABBUh.mjs} +1 -1
- package/dist/{SdkPreviewModeRuntime-CA2k7Z_T.mjs → SdkPreviewModeRuntime-DmHCcIMO.mjs} +1738 -815
- package/dist/{SiteChromeCustomizeContext-Bh9-DtMQ.mjs → SiteChromeCustomizeContext-BV9GU-3C.mjs} +3517 -2524
- package/dist/_dts/ai/src/contracts/proposals.d.ts +298 -298
- package/dist/_dts/api/src/contentRuntime.d.ts +6 -3
- package/dist/_dts/api/src/endpoints.d.ts +10 -3
- package/dist/_dts/api/src/index.d.ts +2 -2
- 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/siteIcons.d.ts +39 -43
- package/dist/_dts/api/src/siteManagementEndpoints.d.ts +3 -3
- package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +36 -7
- package/dist/_dts/block-form/src/widgets/SliderField/SliderField.d.ts +3 -3
- package/dist/_dts/block-form/src/widgets/SliderField/sliderValue.d.ts +36 -0
- package/dist/_dts/block-form/src/widgets/utils/readNumericUiConfig.d.ts +3 -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 +2 -2
- 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/feature-card-icons.d.ts +29 -29
- package/dist/_dts/blocks/src/system/blocks/feature-cards.d.ts +1 -0
- package/dist/_dts/blocks/src/system/blocks/location-map.d.ts +8 -5
- package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +362 -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/icons/generatedAssets.d.ts +28 -0
- package/dist/_dts/blocks/src/system/icons/index.d.ts +1 -0
- package/dist/_dts/blocks/src/system/icons/value.d.ts +3 -6
- package/dist/_dts/blocks/src/system/inlineText.d.ts +2 -2
- package/dist/_dts/blocks/src/system/manifest/schema.d.ts +417 -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/feature-card-icon.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/ui/editorUiStore.d.ts +2 -0
- package/dist/_dts/content-editor/src/ui/stores/generatedIconAssetsStore.d.ts +9 -0
- package/dist/_dts/content-model/src/content-types/schema.d.ts +8 -8
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +344 -0
- package/dist/_dts/db/src/schemas/forms.d.ts +15 -15
- package/dist/_dts/editor-blocks/src/BlockEditor.d.ts +7 -0
- package/dist/_dts/editor-blocks/src/BlockForm.d.ts +2 -1
- package/dist/_dts/editor-blocks/src/block-editor/BlockCard.d.ts +4 -4
- package/dist/_dts/editor-blocks/src/block-editor/BlockCardBody.d.ts +2 -3
- package/dist/_dts/editor-blocks/src/block-editor/BlockCardHeader.d.ts +4 -4
- package/dist/_dts/editor-blocks/src/block-editor/FeatureCardIconsPanel.d.ts +4 -4
- package/dist/_dts/editor-blocks/src/block-editor/GeneratedIconSetDialog.d.ts +3 -3
- package/dist/_dts/editor-blocks/src/block-editor/SortableBlockItem.d.ts +2 -3
- package/dist/_dts/editor-blocks/src/block-editor/blockHeaderActionPlan.d.ts +1 -5
- package/dist/_dts/editor-blocks/src/block-editor/featureCardIconActions.d.ts +25 -19
- package/dist/_dts/editor-blocks/src/block-editor/generatedIconApplyCoordination.d.ts +32 -0
- package/dist/_dts/editor-blocks/src/widgets/icon-picker/GeneratedIconLibraryContext.d.ts +28 -0
- package/dist/_dts/editor-blocks/src/widgets/icon-picker/index.d.ts +2 -0
- package/dist/_dts/editor-blocks/src/widgets/icon-picker/loaders.d.ts +7 -0
- package/dist/_dts/preview-next/src/client/blocks/previewProjection/types.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/preview/CustomizeBackgroundControlRows.d.ts +15 -0
- package/dist/_dts/preview-next/src/client/preview/CustomizeColorTokenPicker.d.ts +27 -0
- package/dist/_dts/preview-next/src/client/preview/EntryEditorPanel.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/preview/EntrySlotBlockEditorPanel.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/preview/PageBlockEditorPanel.d.ts +3 -1
- package/dist/_dts/preview-next/src/client/preview/PreviewEditorSidebar.d.ts +4 -3
- package/dist/_dts/preview-next/src/client/preview/PreviewShell.d.ts +4 -3
- package/dist/_dts/preview-next/src/client/preview/PreviewShellLayout.d.ts +4 -3
- package/dist/_dts/preview-next/src/client/preview/SiteChromeCustomizeContext.d.ts +13 -6
- package/dist/_dts/preview-next/src/client/preview/StyleConfigurator.d.ts +5 -4
- package/dist/_dts/preview-next/src/client/preview/StyleConfigurator.state.d.ts +44 -18
- 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 -5
- package/dist/_dts/preview-next/src/client/preview/styleConfiguratorApplyPayload.d.ts +22 -1
- package/dist/_dts/preview-next/src/client/preview/styleConfiguratorSnapshot.d.ts +12 -4
- package/dist/_dts/sdk/src/client/management/types.d.ts +3 -0
- 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/contracts/system-block-content.d.ts +0 -1
- 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 +9 -6
- 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 +156 -150
- package/dist/_dts/theme-core/src/navigation/types.d.ts +8 -6
- package/dist/_dts/theme-core/src/palette/colors.d.ts +84 -0
- package/dist/_dts/theme-core/src/palette/{variants → curated}/brand-led.d.ts +12 -24
- package/dist/_dts/theme-core/src/palette/{variants → curated}/high-contrast.d.ts +9 -18
- package/dist/_dts/theme-core/src/palette/{variants → curated}/index.d.ts +67 -119
- package/dist/_dts/theme-core/src/palette/{variants → curated}/soft-natural.d.ts +12 -24
- package/dist/_dts/theme-core/src/palette/{variants → curated}/types.d.ts +52 -62
- package/dist/_dts/theme-core/src/palette/{variants → curated}/warm-dark.d.ts +6 -12
- package/dist/_dts/theme-core/src/palette/{variants → curated}/warm-neutral.d.ts +12 -24
- package/dist/_dts/theme-core/src/palette/editorState.d.ts +45 -0
- package/dist/_dts/theme-core/src/palette/index.d.ts +25 -14
- package/dist/_dts/theme-core/src/palette/legacyRuntimeProjection.d.ts +38 -0
- package/dist/_dts/theme-core/src/palette/legacySelection.d.ts +34 -0
- package/dist/_dts/theme-core/src/palette/libraryModel.d.ts +58 -0
- package/dist/_dts/theme-core/src/palette/paletteCompatibilityTransition.d.ts +241 -0
- package/dist/_dts/theme-core/src/palette/persistenceReadSource.d.ts +118 -0
- package/dist/_dts/theme-core/src/palette/resolveSelection.d.ts +50 -0
- package/dist/_dts/theme-core/src/palette/selection.d.ts +72 -0
- package/dist/_dts/theme-core/src/palette/sitePalettePersistence.d.ts +34 -0
- package/dist/_dts/theme-core/src/palette/themePaletteCompatibility.d.ts +58 -0
- package/dist/_dts/theme-core/src/schema.d.ts +208 -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/curatedSiteStyles.d.ts +22 -22
- package/dist/_dts/theme-core/src/site-styles/designState.d.ts +24 -24
- package/dist/_dts/theme-core/src/site-styles/generatedSchemas.d.ts +2 -2
- package/dist/_dts/theme-core/src/site-styles/index.d.ts +2 -0
- package/dist/_dts/theme-core/src/site-styles/previewCompiler.d.ts +35 -11
- package/dist/_dts/theme-core/src/site-styles/runtimeCompiler.d.ts +48 -17
- package/dist/_dts/theme-core/src/site-styles/sectionTransitions.d.ts +77 -0
- package/dist/_dts/theme-core/src/site-styles/siteChromeNavPreferences.d.ts +45 -0
- package/dist/_dts/theme-core/src/site-styles/styleTags.d.ts +1 -1
- package/dist/_dts/theme-core/src/site-styles/themeParity.d.ts +21 -0
- 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/palette/PaletteTokenEditor.d.ts +2 -1
- package/dist/_dts/ui/src/toggle.d.ts +2 -2
- package/dist/cli/index.mjs +7815 -7445
- package/dist/cli/init-docs/content/workflow-isr-revalidation.md +9 -1
- package/dist/client/{DiscountCodeDisclosure-ChVZwVtS.mjs → DiscountCodeDisclosure-Dit2aItR.mjs} +1 -1
- package/dist/client/{EventCombined.client-PZtXbH6R.mjs → EventCombined.client-BnREyCjf.mjs} +3 -3
- package/dist/client/{EventListing.client-C4AMTXec.mjs → EventListing.client-0uHld51x.mjs} +2 -2
- package/dist/client/{LeafletStaticMap-B0w8_i0u.mjs → LeafletStaticMap-DJcvSfmj.mjs} +1 -1
- package/dist/client/{MagicLinkForm-DF0ZGhIu.mjs → MagicLinkForm-EAsIktfw.mjs} +2 -2
- package/dist/client/{StepIndicator-PccQ89Ct.mjs → StepIndicator-CRR17tYI.mjs} +2 -2
- package/dist/client/{accordion-CTNWT1lk.mjs → accordion-B47HIuuH.mjs} +1 -1
- package/dist/client/{bookingForm-DYixwPqP.mjs → bookingForm-I1E-8F9P.mjs} +6 -6
- package/dist/client/{buttons-CySQwlFs.mjs → buttons-BbPn8OKA.mjs} +1 -1
- package/dist/client/{carousel-W75iYR0M.mjs → carousel-OlM7SyBs.mjs} +1 -1
- package/dist/client/{cart-Ca_DGWQq.mjs → cart-BKpG5jz6.mjs} +3 -3
- package/dist/client/{checkout-STgKTsNh.mjs → checkout-Dmmr6qoU.mjs} +3 -3
- package/dist/client/client.mjs +9000 -8353
- package/dist/client/{courseRegistration-DQI1cu1u.mjs → courseRegistration-CflZiqGk.mjs} +7 -7
- package/dist/client/{eventCalendar-BJrHpofg.mjs → eventCalendar-BvoLWcp-.mjs} +5 -5
- package/dist/client/{eventCombined-DPtqBHaH.mjs → eventCombined-DsrO8t_t.mjs} +2 -2
- package/dist/client/{eventDetails-Brt31CDo.mjs → eventDetails-C3hxgcJm.mjs} +3 -3
- package/dist/client/{eventListing-BrClHJOq.mjs → eventListing-C-hb237X.mjs} +2 -2
- package/dist/client/{eventRegistration-DxlNlVUC.mjs → eventRegistration-B0gyzDGi.mjs} +7 -7
- package/dist/client/{form-Vp5cGzDF.mjs → form-C_RUi6oJ.mjs} +2 -2
- package/dist/client/{headerSection-DL2xjRgW.mjs → headerSection-IKQiD2U0.mjs} +3 -3
- package/dist/client/hooks.mjs +4792 -4606
- package/dist/client/{locationMap-B0EjoXQS.mjs → locationMap-8ZBrMzRJ.mjs} +2 -2
- package/dist/client/{newsletterForm-BlV9VRlq.mjs → newsletterForm-CYk3ucwj.mjs} +2 -2
- package/dist/client/{pricing-DmRD7Tjx.mjs → pricing-B5GmvfIH.mjs} +1 -1
- package/dist/client/{productDetail-BLTQsY2f.mjs → productDetail-BjS2Dqzo.mjs} +3 -3
- package/dist/client/{productList-R8lsMpRs.mjs → productList-BOHvC8My.mjs} +3 -3
- package/dist/client/{propsDecoder-DgAshF92.mjs → propsDecoder-WS6UEJwZ.mjs} +7 -0
- package/dist/client/rendering/client.mjs +3565 -3218
- package/dist/client/rendering/islands.mjs +18 -18
- package/dist/client/rendering.mjs +8919 -8279
- package/dist/client/{shop-DWjyje1s.mjs → shop-CON03-wN.mjs} +6 -6
- package/dist/client/{shop-commerce-CSKCR87d.mjs → shop-commerce-DlqrFgH8.mjs} +5 -5
- package/dist/client/{shop-commerce-store-DxPnE-iN.mjs → shop-commerce-store-l74-Kne6.mjs} +1 -1
- package/dist/client/{shopShared-OOeAkFq7.mjs → shopShared-CQheEXSg.mjs} +2 -2
- package/dist/client/{useDiscountCodeUi-Bp6X7XgG.mjs → useDiscountCodeUi-v6OluyWl.mjs} +1 -1
- package/dist/client/{useEventFilters-B489x9TO.mjs → useEventFilters-BqSTcNOf.mjs} +3 -3
- package/dist/client/{usePolling-BKP66stL.mjs → usePolling-DMfADjIF.mjs} +2 -2
- package/dist/preview-next/before-render.mjs +10 -3
- package/dist/preview-next/client/runtime.mjs +4 -4
- package/dist/preview-next/middleware.mjs +10 -3
- package/dist/{previewAuthStore-ByPPZqmp.mjs → previewAuthStore-CfquDtTh.mjs} +10 -3
- package/dist/{sdk-runtime-K8Oqj97H.mjs → sdk-runtime-DWb08Xaz.mjs} +2 -2
- package/dist/{separator-CRoP34pT.mjs → separator--6yjc914.mjs} +1 -1
- package/dist/server/components.mjs +10183 -9621
- package/dist/server/config-validation.mjs +4871 -4686
- package/dist/server/config.mjs +4871 -4686
- package/dist/server/data.mjs +4848 -4663
- package/dist/server/index.mjs +11 -4
- package/dist/server/next/revalidate.mjs +31 -1
- package/dist/server/next.mjs +9894 -9322
- package/dist/server/page-converter.mjs +4758 -4573
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +10099 -9619
- package/dist/server/rendering.mjs +10195 -9631
- package/dist/server/routing.mjs +4985 -4701
- package/dist/server/server.mjs +4823 -4629
- package/dist/server/theme-bridge.mjs +360 -146
- package/dist/server/theme.mjs +94 -91
- package/dist/styles/index.css +143 -30
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { $ as PreviewRichTextEditor, $a as bindingSchema, $c as useBlockContext, $d as ChevronLeft, $i as getComponentBorderWidthPx, $l as DropdownMenuContent, $n as buildEventCalendarListingRender, $o as assertNever$6, $r as ctaCopyFragment, $s as UploadIcon, $t as deleteEntrySlotBlock, $u as unsafeAsCustomerPassId, Aa as isSemanticSpacing, Ac as getImageUrl, Ad as Image, Al as Root2$1, An as SITE_CHROME_VISIBLE_HEADER_SELECTOR, Ao as formatTime$3, Ar as formatCommercePrice, As as CalendarIcon$1, At as createRoutingHelpers, Au as formatBookingDate, Ba as normalizeOptionalId, Bc as TokenResolver, Bi as sectionTransitionVariantForBoundaryOptionId, Bl as Collapsible, Bn as isInternalResolvedLinkValue, Bo as blockBookingPaymentTermsSchema, Br as augmentManifestWithStyleGroups, Bs as ExternalLinkIcon, Bt as ManifestForm, Bu as formatBookingPriceDisplay, Ca as isOfferingsPreviewSourceKey, Cc as isRotationDimensionSwap, Cd as Pencil, Ci as planPageDesignLayoutLookCompatibility, Cl as Input, Cn as isSupportedLoaderEndpoint, Co as toLocationMapHydrationProps, Cr as buildProductDetailInteractiveIslandProps, Cs as resolveIconPickerPreset, Ct as pushHistoryEntry, Cu as clsx, Da as resolveOfferingsPreviewGroupCta, Dc as resolveMediaTransformForAspect, Dd as Minus, Di as getCuratedSiteStyle, Dl as TabsTrigger, Dn as listBlockDescriptors, Do as formatEventPrice, Dr as buildCartDisplay, Ds as ArrowDownIcon, Dt as recordsEqual, Du as unsafeAsEditorBlockId, Ea as resolveOfferingsPreviewCoursePath, Ec as parseAspectRatioValue, Ei as designRuntimeRulesForTheme, El as TabsList, En as getBlockDefinition, Eo as formatEventDateParts, Er as getShopDisplayForItems, Es as isSemanticIconId, Et as unsafeAsLinkedContentEntryId, Eu as createEditorReorderBlocksCommand, Fa as getEventRuntimeFiltersKey, Fc as generateButtonCss, Fd as FileText, Fl as DialogContent, Fn as mediaTransforms, Fo as resolveEventLinkProps, Fr as deriveCommerceCheckoutState, Fs as ChevronUpIcon, Ft as PaletteProvider, Fu as getBookingLocalDateKey, G as beginAutosaveBatch, Ga as eventLayoutSchema, Gc as mergeStyles, Gd as Copy, Gi as parseBackgroundAppearanceColorToken, Gl as Trigger, Gn as productDetailBlockDefinition, Go as defineClientOwnedBlockRuntime, Gr as faqHeadingFragment, Gs as InfoIcon, Gt as createStoreBackend, Gu as publicEventTicketTypes, Ha as columnOptionSchema, Hc as themeButtonClassName, Hd as EllipsisVertical, Hi as backgroundAppearanceColorTokenNames, Hn as useImageResolveContextOptional, Ho as createInteractiveIslandCodec, Hr as headingFragment, Hs as FileAudioIcon, Hu as publicEventPricingMode, Ia as resolveEventCalendarListPageSize, Ic as generateEffectsCSS, Id as FileSpreadsheet, Il as DialogDescription, In as layoutTransforms, Io as getEventAvailability, Ir as parseStoredCommerceCartState, Is as CircleMinusIcon, It as usePalette, Iu as parseBookingLocalDate, J as enqueueTransaction, Ja as weekStartSchema, Jc as useBackendWatch, Jd as CircleCheck, Jl as CardContent, Jn as eventListingBlockDefinition, Jo as composeHeaderSectionWrapperClassName, Jr as footerBottomTextFragment, Js as MinusIcon, Jt as applyPageDesignEditorAction, Ju as expectParsedBrandedId, K as confirmAutosaveBatch, Ka as filterAutoShowSchema, Kc as rgbColorValue, Kd as CirclePlus, Ki as defaultThemeTokens, Kl as createCollapsibleScope, Kn as newsletterSignupBlockDefinition, Ko as defineProgressiveBlockRuntime, Kr as blogFeaturedPostFragment, Ks as MailIcon, Kt as listContentTypes, Ku as formatCurrencyAmount, La as resolveEventListPaginationAction, Lc as generateShadowValue$1, Ld as FilePlay, Li as defaultSectionTransitionVariantForFamily, Ll as DialogFooter, Ln as uiTransforms, Lo as getLocalDateKey, Lr as productItemKey, Ls as CirclePlusIcon, Lt as recoveryConflictCopy, Lu as resolveBookingTimeZoneId, Ma as buildEventRuntimeFilters, Mc as siblingPath$1, Md as ImagePlus, Ml as ScrollableDialogContent, Mn as planSiteOverlayHeaderClearance, Mo as getContainerClass, Mr as EMPTY_COMMERCE_CART_STATE, Ms as ChevronDownIcon, Mu as formatBookingInstant, Na as eventListPaginationActionSchema, Nd as GripVertical, Nl as Dialog, Nn as visibleHeaderClearancePx, No as groupEventsByDate, Nr as buildPassCartItem, Ns as ChevronLeftIcon, Nu as formatBookingTime, Oa as resolveOfferingsPreviewGroupOrderEntries, Oc as asRecord, Oi as surfaceResolutionContextFromTheme, Ol as Content$1, On as siteFooterManifest, Oo as formatEventPriceDisplay, Or as buildProductCardDisplay, Os as ArrowLeftIcon, Ou as unsafeAsEditorBlockValues, Pa as eventPageSizeSchema, Pd as File, Pl as DialogClose, Pn as contentTransforms, Po as resolveEventCta, Pr as buildProductCartItem, Ps as ChevronRightIcon, Pu as formatLocalScheduleDate, Q as resolvePreviewSidebarTab, Qa as when, Qc as isNonEmptyValue, Qd as ChevronRight, Qi as pageDesignEditorBackgroundOverrideOwner, Ql as DropdownMenu, Qn as buildEventCalendarListingDisplay, Qo as asDesignBlockId, Qr as testimonialsHeadingFragment, Qs as ShoppingCartIcon, Qt as deleteBlock, Qu as unsafeAsAppointmentServiceId, Ra as normalizeCsvIds, Rc as generateBaseInteractiveCSS, Rd as FileHeadphone, Ri as sectionTransitionFamilies, Rl as DialogHeader, Rn as formattingTransforms, Ro as getLocalMinuteOfDay, Rr as reduceCommerceCart, Rs as ClockIcon$1, Rt as unfinishedBlockCopy, Ru as toBookingTimeZone, Sa as inferLegacyOfferingsPreviewGroupOrder, Sc as attachRenderableMediaAssetFields, Sd as Plus, Si as normalEditorCuratedPromotedFieldPaths, Sl as PopoverTrigger, Sn as useUniqueId, So as normalizeLocationMapProps, Sr as buildCheckoutInteractiveIslandProps, Ss as isIconPickerPreset, St as createHistoryState, Su as cn$1, Ta as normalizeOfferingsPreviewItemLimit, Tc as formatAspectRatioToken, Tl as TabsContent, Tn as GRADIENT_PRESETS, To as formatEventCompactDateRail, Tr as buildShopInteractiveIslandProps, Ts as getSemanticIconComponent, Tt as undoHistory, Tu as createEditorRemoveBlockCommand, Ua as eventButtonVariantSchema, Uc as backgroundColorStyle, Ud as Crop, Ui as backgroundAppearanceQuickColorTokenNames, Ul as Content, Un as shopBlockDefinition, Uo as defineInteractiveIslandMetaKeys, Ur as cardFragment, Us as FileSpreadsheetIcon, Ut as FormRenderer, Uu as publicEventPricingType, Va as calendarTabViewsSchema, Vc as parseThemeButtonVariantId, Vd as EyeOff, Vi as BACKGROUND_BODY_TEXT_MIN_CONTRAST_RATIO, Vl as CollapsibleContent, Vn as ImageResolveContextProvider, Vo as buildInteractiveIslandProps, Vr as richTextFragment, Vs as FileArchiveIcon, Vt as createManifestFormAdapter, Vu as publicEventPricingCurrency, Wa as eventCalendarDefaultViewSchema, Wc as borderColorStyle, Wd as CreditCard, Wi as foregroundTokenForBackgroundAppearanceColorToken, Wl as Root, Wn as productListBlockDefinition, Wo as createZodCodec, Wr as faqAccordionFragment, Ws as FileTextIcon, Wt as evaluateVisibility, Wu as publicEventScalarPrice, X as rejectAutosaveBatch, Xa as eventCalendarListLayoutOptions, Xc as getModalConfig, Xd as ChevronsUpDown, Xi as isThemeV2NormalEditorRawStyleFieldName, Xl as CardTitle, Xn as eventCalendarBlockDefinition, Xo as splitPositioningClasses, Xr as formCopyFragment, Xs as PlayIcon, Xt as createBlock, Xu as parseSiteId, Y as idleEditorTransactionQueueState, Ya as eventCalendarListLayoutCompatibleDisplayModeValues, Yc as getFieldIntent, Yd as CircleAlert, Yl as CardHeader, Yn as buildEventListingInteractiveIslandProps, Yo as markEditableSurfaceForwarding, Yr as formEmbedFragment, Ys as PhoneIcon, Yt as getPageDesignEditorState, Yu as parseMediaAssetId, Za as el, Zc as isHeaderField, Zd as ChevronUp, Zi as isThemeV2NormalEditorRawStylePath, Zn as buildEventCalendarInteractiveIslandProps, Zo as planSiteChromePlacement, Zr as testimonialsCarouselFragment, Zs as PlusIcon, Zt as createEntrySlotBlock, Zu as unsafeAsAppointmentResourceId, _c as resolveMediaNodeResponsiveImage, _i as formatSiteChromeBackgroundTokenLabel, _l as SelectValue, _n as useSensors, _o as resolveOnColorForThemeToken, _r as courseRegistrationBlockDefinition, _s as getBlockIconSemanticFallbackId, _t as useEditorUiStore, _u as composeEventHandlers, aa as NAV_LINK_PADDING_MAP, ac as coerceInlineTextWithFallback, ad as err$2, af as Archive, ai as PUBLIC_FILE_FIELD_KINDS, al as unmapValueFromSelect, an as DEFAULT_LAUNCH_READINESS_INPUT, ao as normalizeEventScheduleScope, ar as findEventByOccurrenceId, as as ICON_SIZE_PX, at as getRichTextImagePositionFromTarget, au as __awaiter, ba as OFFERINGS_PREVIEW_EVENT_PRESET_DEFINITIONS, bc as SECTION_BACKGROUND_MIN_SOURCE_WIDTH, bd as RotateCcw, bi as buildEditorModelRuntimeFieldsByBlockId, bl as Popover, bn as useCombinedRefs, bo as featuresFromHex, br as cartBlockDefinition, bs as resolveBlockIconRenderValue, bt as canRedoHistory, bu as cva, ca as FONT_WEIGHT_MAP, cc as parseInlineTextFromUnknown, cd as X, cf as __toESM, ci as MQ_MD_DOWN, cl as Tooltip, cn as DndContext, co as normalizeEventSurfaceScope, cr as resolveEventRequiresPayment, cs as FEATURE_CARD_ICON_TREATMENTS, ct as EditorProvider, cu as __read, da as LABEL_FONT_SIZE_MAP, dc as buildResolveImageUrlContext, di as MQ_TABLET_ONLY, dl as TooltipTrigger, dn as closestCenter, do as generateCardCss, dr as getStepNumber$1, ds as getFeatureCardIconCompletion, dt as useUISelector, du as __spreadArrays, ea as getComponentShadowVar, ec as XIcon, ed as unsafeAsFormId, ef as ChevronDown, ei as heroCtaRowFragment, el as SdkConfigProvider, eo as eventBlockKindValues, er as formBlockDefinition, es as ACCORDION_OPEN_ACCENT_THICKNESS, et as PreviewInlineTextEditor, eu as DropdownMenuItem, fa as expandPalette, fc as computeMediaTransformStyle, fd as Trash2, fi as BACKGROUND_POSITION_PRESET_VALUES, fl as Textarea, fn as getClientRect, fo as statusMutedColorDeclaration, fr as getWizardStepsForContext$1, fs as shouldReserveFeatureCardIconZone, ft as EditableBlockProvider, fu as useId$1, g as PreviewDesignCoordinatorProvider, ga as ctaButton, gc as resolveImageUrlWithContext, gd as Sparkles, gi as resolveBackgroundColorValue, gl as SelectTrigger, gn as useSensor, go as isCssColorLiteral, gr as buildGiftingInteractiveIslandProps, gs as buildGeneratedBlockIconRenderAssetLookupFromUnknown, gu as createContextScope, ha as runTransforms, hc as renderVideo, hd as Star, hi as resolveSectionForegroundStyles, hl as SelectItem, hn as useDroppable, ho as normalizeCardVariantRole, hr as giftingBlockDefinition, hs as toFeatureCardIconSuggestionInputs, ht as useEntryEditorController, hu as useControllableState, i as usePreviewDesignHistoryOrder, ia as NAV_LINK_LETTER_SPACING_MAP, ic as isRecord$18, id as unsafeAsPositiveSeconds, if as ArrowDown, ii as defineFragment, il as mapOptionValueForSelect, in as decodePublicProductCategorySelectorQuery, io as normalizeEventCategoryIdsCsv, ir as toRegistrationEvents, is as ICON_CONFIG, it as RichTextEditorSurface, iu as __assign, ja as resolveSpacing, jc as getAtPath, jd as ImageUp, jl as Trigger$1, jn as SITE_OVERLAY_HEADER_CLEARANCE_CSS_VAR, jo as getCardOrientation, jr as formatInterval, js as CheckIcon$1, jt as createSnapshotFromPageRecord, ju as formatBookingDateTime, ka as resolveOfferingsPreviewGroups, kc as getDirectImageUrlForMediaAsset, kd as LoaderCircle, kl as List, kn as siteHeaderManifest, ko as formatEventTeacherLine, kr as buildProductDetailDisplay, ks as ArrowRightIcon, kt as useDebouncedLatestSave, ku as addLocalScheduleDays, la as INPUT_FONT_SIZE_MAP, lc as ImagePresets, ld as Upload, li as MQ_SM_DOWN, ll as TooltipContent, ln as KeyboardCode, lo as normalizeEventVenueId, lr as resolveRegistrationTarget, ls as applyFeatureCardIconSuggestions, lt as useEditor, lu as __rest, ma as createTransformRegistry, mc as renderAudio, mi as boxStylesTransforms, ml as SelectContent, mn as useDraggable, mo as normalizeBoxStylesCardVariant, mr as resolveEventRegistrationScopedEvents, ms as suggestSemanticIconForFeatureCard, mu as createCollection, n as useSiteChromeCustomizeOptional, na as parseCustomCssRules, nc as unwrapRichTextRoot, nd as unsafeAsPassId, nf as Box, ni as heroCopyFragment, nl as hasEmptyOption, nn as reorderBlocks, no as eventSurfaceScopeValues, nr as eventRegistrationBlockDefinition, ns as ACCORDION_TRIGGER_FONT_SCALE, nt as useRichTextEditor, nu as DropdownMenuSeparator, oa as NAV_LINK_PADDING_X_MAP, oc as inlineTextToPlainText, od as ok$3, of as __commonJSMin, oi as siteOptionSources, ol as FieldFrame, on as deriveLaunchReadiness, oo as normalizeEventStaffMemberId, or as findPreSelectedEvent, os as PUBLIC_DOWNLOAD_MEDIA_TYPES, ot as insertOrReplaceRichTextImage, ou as __extends, pa as generateCssVars, pc as getCurrentResolveImageUrlContext, pd as Ticket, pi as getAnchorClasses, pl as Select, pn as useDndContext, po as generateShadowValue, pr as normalizeEventRegistrationPageSurfaceSubject, ps as suggestFeatureCardSemanticIcons, pt as EntryControllerProvider, pu as useDirection, q as deriveTransactionCapabilities, qa as previewStageSchema, qc as textColorStyle, qd as CircleMinus, ql as Card, qn as buildNewsletterFormInteractiveIslandProps, qr as singleButtonFragment, qs as MapPinIcon$1, qt as toRoutableLinkPayload, qu as assertNever$5, r as PreviewDesignHistoryOrderProvider, ra as NAV_LINK_BORDER_RADIUS_MAP, rc as isObjectRecord, rd as unsafeAsPositiveByteCount$1, rf as ArrowUp, ri as bodyCopyFragment, rl as mapCurrentValueForSelect, rn as reorderEntrySlotBlocks, ro as normalizeEventBlockKind, rr as buildEventRegistrationInteractiveIslandProps, rs as ACCORDION_TRIGGER_LETTER_SPACING, rt as EMPTY_DOC, ru as DropdownMenuTrigger, sa as NAV_LINK_TEXT_SIZE_MAP, sc as isInlineTextEmpty, sd as lucide_react_exports, sf as __exportAll, si as MQ_LG_UP, sl as useField, sn as AMBIENT_BACKGROUND_ROLES$1, so as normalizeEventSurfacePresetsCsv, sr as resolveDiscountContext, ss as mediaSchema, st as InlineTextEditor, su as __generator, t as SiteChromeCustomizeProvider, ta as parseBlockCustomCssRules, tc as createRichTextDocFromMarkdown, td as unsafeAsMediaAssetId, tf as Check, ti as ctaRowFragment, tl as useSdkConfig, tn as mutateBlockContent, to as eventScheduleScopeValues, tr as buildFormInteractiveIslandProps, ts as ACCORDION_SPACING_MAP, tt as PreviewTextEditor, ua as INPUT_SPACING_MAP, uc as MediaPlaceholder, ui as MQ_SM_UP, ul as TooltipProvider, un as PointerSensor, uo as publicEventSchema, ur as WIZARD_STEPS$1, us as createFeatureCardIconKey, uu as __spreadArray, v as PreviewThemeOverlayProvider, vc as resolveMediaStorageUrl, vd as Settings, vi as PAGE_DESIGN_EDITOR_STATE_FETCH_ERROR_MESSAGE, vl as Label, vn as CSS, vo as resolveTokenOrCssColorValue, vr as buildCourseRegistrationInteractiveIslandProps, vs as getGeneratedBlockIconStyleState, vt as useEditorUiStoreInstance, vu as Primitive, wa as normalizeOfferingsPreviewGroupOrder, wc as normalizeRightAngle, wi as resolveVisiblePromotedFieldPathsForEditorBlock, wl as Tabs, wn as gradientToCss, wo as formatDate$3, wr as buildProductListInteractiveIslandProps, ws as SEMANTIC_ICON_DEFINITIONS, wt as redoHistory, wu as createEditorInsertBlockCommand, xa as buildOfferingsPreviewRenderStates, xc as resolveMediaSlotContract, xi as retargetCompiledRuntimeFieldsForContentAdjacency, xl as PopoverContent, xn as useIsomorphicLayoutEffect, xo as buildGoogleMapsDirectionsUrl, xr as buildCartInteractiveIslandProps, xs as parseSiteIconStyleGuideVersionId, xt as canUndoHistory, xu as useComposedRefs, y as usePreviewThemeOverlay, yc as setContextResolveImageUrlContext, yd as Search, yi as applyCompiledRuntimeFieldsToContent, yl as Badge, yn as isKeyboardEvent, yo as getTextColorForBackground, yr as checkoutBlockDefinition, ys as parseBlockIconValue, yt as useOptionalEditorUiStoreInstance, yu as Button, za as normalizeCsvString, zc as generateInteractiveChildInheritanceCSS, zd as FileArchive, zi as sectionTransitionFamilyForBoundaryOptionId, zl as DialogTitle, zn as createManifestValidator, zo as resolveRuntimeEventPricing, zr as augmentManifest, zs as DownloadIcon, zt as validateBlockManifestIssues, zu as toScheduledBookingDateTime } from "./SiteChromeCustomizeContext-Bh9-DtMQ.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 previewStageSchema, $c as rgbColorValue, $d as Copy, $l as createCollapsibleScope, $n as buildEventCalendarListingRender, $r as ctaCopyFragment, $s as MailIcon, $t as deleteEntrySlotBlock, $u as formatCurrencyAmount, Aa as normalizeOfferingsPreviewGroupOrder, Ac as isRotationDimensionSwap, Ad as Pencil, Ai as getCuratedSiteStyle, Al as Input, An as SITE_CHROME_VISIBLE_HEADER_SELECTOR, Ao as formatDate$3, Ar as formatCommercePrice, As as resolveIconPickerPreset, At as createRoutingHelpers, Au as clsx, Ba as eventPageSizeSchema, Bd as ImageOff, Bi as NAV_LINK_LETTER_SPACING_MAP, Bl as Dialog, Bn as isInternalResolvedLinkValue, Bo as resolveEventCta, Br as augmentManifestWithStyleGroups, Bs as ChevronLeftIcon, Bt as ManifestForm, Bu as formatBookingTime, Cc as resolveImageUrlWithContext, Cd as Sparkles, Ci as retargetCompiledBoundaryRuntimeForContentAdjacency, Cl as SelectTrigger, Cn as isSupportedLoaderEndpoint, Co as resolveOnColorForThemeToken, Cr as buildProductDetailInteractiveIslandProps, Cs as getGeneratedBlockIconStyleState, Ct as pushHistoryEntry, Cu as createContextScope, Da as buildOfferingsPreviewRenderStates, Dc as SECTION_BACKGROUND_MIN_SOURCE_WIDTH, Dd as RotateCcw, Di as resolveVisiblePromotedFieldPathsForEditorBlock, Dl as Popover, Dn as listBlockDescriptors, Do as buildGoogleMapsDirectionsUrl, Dr as buildCartDisplay, Ds as parseGeneratedIconSetId, Dt as recordsEqual, Du as cva, Ea as OFFERINGS_PREVIEW_EVENT_PRESET_DEFINITIONS, Ec as setContextResolveImageUrlContext, Ed as Search, Ei as planPageDesignLayoutLookCompatibility, El as Badge, En as getBlockDefinition, Eo as featuresFromHex, Er as getShopDisplayForItems, Es as parseGeneratedIconAssetId, Et as unsafeAsLinkedContentEntryId, Eu as Button, Fa as resolveOfferingsPreviewGroups, Fc as asRecord, Fi as getComponentBorderWidthPx, Fl as Content$1, Fn as mediaTransforms, Fo as formatEventTeacherLine, Fr as deriveCommerceCheckoutState, Fs as ArrowLeftIcon, Ft as PaletteProvider, Fu as unsafeAsEditorBlockValues, G as beginAutosaveBatch, Ga as normalizeCsvString, Gc as generateBaseInteractiveCSS, Gd as FilePlay, Gi as INPUT_FONT_SIZE_MAP, Gl as DialogHeader, Gn as productDetailBlockDefinition, Go as resolveRuntimeEventPricing, Gr as faqHeadingFragment, Gs as ClockIcon$1, Gt as createStoreBackend, Gu as toBookingTimeZone, Ha as resolveEventCalendarListPageSize, Hc as generateButtonCss, Hd as File, Hi as NAV_LINK_PADDING_X_MAP, Hl as DialogContent, Hn as useImageResolveContextOptional, Ho as getEventAvailability, Hr as headingFragment, Hs as ChevronUpIcon, Hu as getBookingLocalDateKey, Ia as isSemanticSpacing, Ic as getDirectImageUrlForMediaAsset, Id as LoaderCircle, Ii as getComponentShadowVar, Il as List, In as layoutTransforms, Io as formatTime$3, Ir as parseStoredCommerceCartState, Is as ArrowRightIcon, It as usePalette, Iu as addLocalScheduleDays, J as enqueueTransaction, Ja as columnOptionSchema, Jc as parseThemeButtonVariantId, Jl as CollapsibleContent, Jn as eventListingBlockDefinition, Jo as createInteractiveIslandCodec, Jr as footerBottomTextFragment, Js as FileArchiveIcon, Jt as applyPageDesignEditorAction, Ju as publicEventPricingCurrency, K as confirmAutosaveBatch, Ka as normalizeOptionalId, Kc as generateInteractiveChildInheritanceCSS, Kd as FileHeadphone, Ki as INPUT_SPACING_MAP, Kl as DialogTitle, Kn as newsletterSignupBlockDefinition, Ko as blockBookingPaymentTermsSchema, Kr as blogFeaturedPostFragment, Ks as DownloadIcon, Kt as listContentTypes, Ku as toScheduledBookingDateTime, La as resolveSpacing, Lc as getImageUrl, Ld as Image, Li as parseBlockCustomCssRules, Ll as Root2$1, Ln as uiTransforms, Lo as getCardOrientation, Lr as productItemKey, Ls as CalendarIcon$1, Lt as recoveryConflictCopy, Lu as formatBookingDate, Ma as resolveOfferingsPreviewCoursePath, Mc as formatAspectRatioToken, Mi as isThemeV2NormalEditorRawStyleFieldName, Ml as TabsContent, Mn as planSiteOverlayHeaderClearance, Mo as formatEventDateParts, Mr as EMPTY_COMMERCE_CART_STATE, Ms as getSemanticIconComponent, Mu as createEditorRemoveBlockCommand, Na as resolveOfferingsPreviewGroupCta, Nc as parseAspectRatioValue, Ni as isThemeV2NormalEditorRawStylePath, Nl as TabsList, Nn as visibleHeaderClearancePx, No as formatEventPrice, Nr as buildPassCartItem, Ns as isSemanticIconId, Nu as createEditorReorderBlocksCommand, Oa as inferLegacyOfferingsPreviewGroupOrder, Oc as resolveMediaSlotContract, Ol as PopoverContent, On as siteFooterManifest, Oo as normalizeLocationMapProps, Or as buildProductCardDisplay, Os as parseSiteIconStyleGuideVersionId, Ou as useComposedRefs, Pa as resolveOfferingsPreviewGroupOrderEntries, Pc as resolveMediaTransformForAspect, Pd as Minus, Pi as pageDesignEditorBackgroundOverrideOwner, Pl as TabsTrigger, Pn as contentTransforms, Po as formatEventPriceDisplay, Pr as buildProductCartItem, Ps as ArrowDownIcon, Pu as unsafeAsEditorBlockId, Q as resolvePreviewSidebarTab, Qa as filterAutoShowSchema, Qc as mergeStyles, Qd as CreditCard, Ql as Trigger, Qn as buildEventCalendarListingDisplay, Qo as defineProgressiveBlockRuntime, Qr as testimonialsHeadingFragment, Qs as InfoIcon, Qt as deleteBlock, Qu as publicEventTicketTypes, Ra as buildEventRuntimeFilters, Rc as getAtPath, Rd as ImageUp, Ri as parseCustomCssRules, Rl as Trigger$1, Rn as formattingTransforms, Ro as getContainerClass, Rr as reduceCommerceCart, Rs as CheckIcon$1, Rt as unfinishedBlockCopy, Ru as formatBookingDateTime, Sa as ctaButton, Sc as renderVideo, Sd as Star, Si as compileEditorModelRuntime, Sl as SelectItem, Sn as useUniqueId, So as isCssColorLiteral, Sr as buildCheckoutInteractiveIslandProps, Ss as getBlockIconSemanticId, St as createHistoryState, Su as useControllableState, Tc as resolveMediaStorageUrl, Td as Settings, Ti as normalEditorCuratedPromotedFieldPaths, Tl as Label, Tn as GRADIENT_PRESETS, To as getTextColorForBackground, Tr as buildShopInteractiveIslandProps, Ts as resolveBlockIconRenderValue, Tt as undoHistory, Tu as Primitive, Ua as resolveEventListPaginationAction, Uc as generateEffectsCSS, Ud as FileText, Ui as NAV_LINK_TEXT_SIZE_MAP, Ul as DialogDescription, Un as shopBlockDefinition, Uo as getLocalDateKey, Ur as cardFragment, Us as CircleMinusIcon, Ut as FormRenderer, Uu as parseBookingLocalDate, Va as getEventRuntimeFiltersKey, Vd as GripVertical, Vi as NAV_LINK_PADDING_MAP, Vl as DialogClose, Vn as ImageResolveContextProvider, Vo as resolveEventLinkProps, Vr as richTextFragment, Vs as ChevronRightIcon, Vt as createManifestFormAdapter, Vu as formatLocalScheduleDate, Wa as normalizeCsvIds, Wc as generateShadowValue$1, Wd as FileSpreadsheet, Wi as FONT_WEIGHT_MAP, Wl as DialogFooter, Wn as productListBlockDefinition, Wo as getLocalMinuteOfDay, Wr as faqAccordionFragment, Ws as CirclePlusIcon, Wt as evaluateVisibility, Wu as resolveBookingTimeZoneId, X as rejectAutosaveBatch, Xa as eventCalendarDefaultViewSchema, Xc as backgroundColorStyle, Xd as EllipsisVertical, Xl as Content, Xn as eventCalendarBlockDefinition, Xo as createZodCodec, Xr as formCopyFragment, Xs as FileSpreadsheetIcon, Xt as createBlock, Xu as publicEventPricingType, Y as idleEditorTransactionQueueState, Ya as eventButtonVariantSchema, Yc as themeButtonClassName, Yd as EyeOff, Yn as buildEventListingInteractiveIslandProps, Yo as defineInteractiveIslandMetaKeys, Yr as formEmbedFragment, Ys as FileAudioIcon, Yt as getPageDesignEditorState, Yu as publicEventPricingMode, Za as eventLayoutSchema, Zc as borderColorStyle, Zd as Crop, Zl as Root, Zn as buildEventCalendarInteractiveIslandProps, Zo as defineClientOwnedBlockRuntime, Zr as testimonialsCarouselFragment, Zs as FileTextIcon, Zt as createEntrySlotBlock, Zu as publicEventScalarPrice, _c as MediaPlaceholder, _f as __toESM, _i as mergeHeaderNavTypographyPreference, _l as TooltipProvider, _n as useSensors, _o as generateCardCss, _r as courseRegistrationBlockDefinition, _s as resolveFeatureCardGeneratedIconSizePx, _t as useEditorUiStore, _u as __spreadArray, aa as sectionTransitionFamilyForBoundaryOptionId, ac as ShoppingCartIcon, ad as unsafeAsAppointmentServiceId, af as ChevronsUpDown, ai as PUBLIC_FILE_FIELD_KINDS, al as isNonEmptyValue, an as DEFAULT_LAUNCH_READINESS_INPUT, ao as bindingSchema, ar as findEventByOccurrenceId, as as assertNever$6, at as getRichTextImagePositionFromTarget, au as DropdownMenu, ba as createTransformRegistry, bc as getCurrentResolveImageUrlContext, bd as Ticket, bi as PAGE_DESIGN_EDITOR_STATE_FETCH_ERROR_MESSAGE, bl as Select, bn as useCombinedRefs, bo as normalizeBoxStylesCardVariant, br as cartBlockDefinition, bs as toFeatureCardIconSuggestionInputs, bt as canRedoHistory, bu as useDirection, ca as backgroundAppearanceColorTokenNames, cc as createRichTextDocFromMarkdown, cd as unsafeAsMediaAssetId, cf as ChevronLeft, ci as MQ_MD_DOWN, cl as useSdkConfig, cn as DndContext, co as eventSurfaceScopeValues, cr as resolveEventRequiresPayment, cs as ACCORDION_TRIGGER_FONT_SCALE, ct as EditorProvider, da as parseBackgroundAppearanceColorToken, dc as isRecord$20, dd as unsafeAsPositiveSeconds, df as Box, di as MQ_TABLET_ONLY, dl as mapOptionValueForSelect, dn as closestCenter, do as normalizeEventScheduleScope, dr as getStepNumber$1, ds as ICON_SIZE_PX, dt as useUISelector, du as __assign, ec as MapPinIcon$1, ed as assertNever$5, ef as Clock3, ei as heroCtaRowFragment, el as textColorStyle, eo as weekStartSchema, er as formBlockDefinition, es as composeHeaderSectionWrapperClassName, et as PreviewInlineTextEditor, eu as Card, fa as defaultThemeTokens, fc as coerceInlineTextWithFallback, fd as err$2, ff as ArrowUp, fi as BACKGROUND_POSITION_PRESET_VALUES, fl as unmapValueFromSelect, fn as getClientRect, fo as normalizeEventStaffMemberId, fr as getWizardStepsForContext$1, fs as PUBLIC_DOWNLOAD_MEDIA_TYPES, ft as EditableBlockProvider, fu as __awaiter, g as PreviewDesignCoordinatorProvider, gc as ImagePresets, gd as Upload, gf as __exportAll, gi as resolveBackgroundColorValue, gl as TooltipContent, gn as useSensor, go as publicEventSchema, gr as buildGiftingInteractiveIslandProps, gs as getFeatureCardIconCompletion, gu as __rest, hc as parseInlineTextFromUnknown, hd as X, hf as __commonJSMin, hi as resolveSectionForegroundStyles, hl as Tooltip, hn as useDroppable, ho as normalizeEventVenueId, hr as giftingBlockDefinition, hs as createFeatureCardIconKey, ht as useEntryEditorController, hu as __read, i as usePreviewDesignHistoryOrder, ia as sectionTransitionFamilies, ic as PlusIcon, id as unsafeAsAppointmentResourceId, if as CircleAlert, ii as defineFragment, il as isHeaderField, in as decodePublicProductCategorySelectorQuery, io as when, ir as toRegistrationEvents, is as asDesignBlockId, it as RichTextEditorSurface, ja as normalizeOfferingsPreviewItemLimit, jc as normalizeRightAngle, ji as surfaceResolutionContextFromTheme, jl as Tabs, jn as SITE_OVERLAY_HEADER_CLEARANCE_CSS_VAR, jo as formatEventCompactDateRail, jr as formatInterval, js as SEMANTIC_ICON_DEFINITIONS, jt as createSnapshotFromPageRecord, ju as createEditorInsertBlockCommand, ka as isOfferingsPreviewSourceKey, kc as attachRenderableMediaAssetFields, kd as Plus, ki as designRuntimeRulesForTheme, kl as PopoverTrigger, kn as siteHeaderManifest, ko as toLocationMapHydrationProps, kr as buildProductDetailDisplay, ks as isIconPickerPreset, kt as useDebouncedLatestSave, ku as cn$1, la as backgroundAppearanceQuickColorTokenNames, lc as unwrapRichTextRoot, ld as unsafeAsPassId, lf as ChevronDown, li as MQ_SM_DOWN, ll as hasEmptyOption, ln as KeyboardCode, lo as normalizeEventBlockKind, lr as resolveRegistrationTarget, ls as ACCORDION_TRIGGER_LETTER_SPACING, lt as useEditor, lu as DropdownMenuSeparator, mc as isInlineTextEmpty, md as lucide_react_exports, mf as Archive, mi as boxStylesTransforms, ml as useField, mn as useDraggable, mo as normalizeEventSurfaceScope, mr as resolveEventRegistrationScopedEvents, ms as FEATURE_CARD_ICON_TREATMENTS, mu as __generator, n as useSiteChromeCustomizeOptional, na as boundaryRuntimeMetricsForTransition, nc as PhoneIcon, nd as parseMediaAssetId, nf as CircleMinus, ni as heroCopyFragment, nl as getFieldIntent, nn as reorderBlocks, no as eventCalendarListLayoutOptions, nr as eventRegistrationBlockDefinition, ns as splitPositioningClasses, nt as useRichTextEditor, nu as CardHeader, oa as sectionTransitionVariantForBoundaryOptionId, oc as UploadIcon, od as unsafeAsCustomerPassId, of as ChevronUp, oi as siteOptionSources, ol as useBlockContext, on as deriveLaunchReadiness, oo as eventBlockKindValues, or as findPreSelectedEvent, os as ACCORDION_OPEN_ACCENT_THICKNESS, ot as insertOrReplaceRichTextImage, ou as DropdownMenuContent, pc as inlineTextToPlainText, pd as ok$3, pf as ArrowDown, pi as getAnchorClasses, pl as FieldFrame, pn as useDndContext, po as normalizeEventSurfacePresetsCsv, pr as normalizeEventRegistrationPageSurfaceSubject, ps as mediaSchema, pt as EntryControllerProvider, pu as __extends, q as deriveTransactionCapabilities, qa as calendarTabViewsSchema, qc as TokenResolver, qd as FileArchive, qi as LABEL_FONT_SIZE_MAP, ql as Collapsible, qn as buildNewsletterFormInteractiveIslandProps, qo as buildInteractiveIslandProps, qr as singleButtonFragment, qs as ExternalLinkIcon, qt as toRoutableLinkPayload, qu as formatBookingPriceDisplay, r as PreviewDesignHistoryOrderProvider, ra as defaultSectionTransitionVariantForFamily, rc as PlayIcon, rd as parseSiteId, rf as CircleCheck, ri as bodyCopyFragment, rl as getModalConfig, rn as reorderEntrySlotBlocks, ro as el, rr as buildEventRegistrationInteractiveIslandProps, rs as planSiteChromePlacement, rt as EMPTY_DOC, ru as CardTitle, sa as BACKGROUND_BODY_TEXT_MIN_CONTRAST_RATIO, sc as XIcon, sd as unsafeAsFormId, sf as ChevronRight, si as MQ_LG_UP, sl as SdkConfigProvider, sn as AMBIENT_BACKGROUND_ROLES$1, so as eventScheduleScopeValues, sr as resolveDiscountContext, ss as ACCORDION_SPACING_MAP, st as InlineTextEditor, su as DropdownMenuItem, t as SiteChromeCustomizeProvider, tc as MinusIcon, td as expectParsedBrandedId, tf as CirclePlus, ti as ctaRowFragment, tl as useBackendWatch, tn as mutateBlockContent, to as eventCalendarListLayoutCompatibleDisplayModeValues, tr as buildFormInteractiveIslandProps, ts as markEditableSurfaceForwarding, tt as PreviewTextEditor, tu as CardContent, ua as foregroundTokenForBackgroundAppearanceColorToken, uc as isObjectRecord, ud as unsafeAsPositiveByteCount$1, uf as Check, ui as MQ_SM_UP, ul as mapCurrentValueForSelect, un as PointerSensor, uo as normalizeEventCategoryIdsCsv, ur as WIZARD_STEPS$1, us as ICON_CONFIG, uu as DropdownMenuTrigger, v as PreviewThemeOverlayProvider, va as expandPalette, vc as buildResolveImageUrlContext, vi as readHeaderNavFontSizePreference, vl as TooltipTrigger, vn as CSS, vo as statusMutedColorDeclaration, vr as buildCourseRegistrationInteractiveIslandProps, vs as shouldReserveFeatureCardIconZone, vt as useEditorUiStoreInstance, vu as __spreadArrays, wc as resolveMediaNodeResponsiveImage, wi as retargetCompiledRuntimeFieldsForContentAdjacency, wl as SelectValue, wn as gradientToCss, wo as resolveTokenOrCssColorValue, wr as buildProductListInteractiveIslandProps, ws as parseBlockIconValue, wt as redoHistory, wu as composeEventHandlers, xa as runTransforms, xc as renderAudio, xi as applyCompiledRuntimeFieldsToContent, xl as SelectContent, xn as useIsomorphicLayoutEffect, xo as normalizeCardVariantRole, xr as buildCartInteractiveIslandProps, xs as buildGeneratedBlockIconRenderAssetLookupFromUnknown, xt as canUndoHistory, xu as createCollection, y as usePreviewThemeOverlay, ya as generateCssVars, yc as computeMediaTransformStyle, yd as Trash2, yi as formatSiteChromeBackgroundTokenLabel, yl as Textarea, yn as isKeyboardEvent, yo as generateShadowValue, yr as checkoutBlockDefinition, ys as suggestSemanticIconForFeatureCard, yt as useOptionalEditorUiStoreInstance, yu as useId$1, za as eventListPaginationActionSchema, zc as siblingPath$1, zd as ImagePlus, zi as NAV_LINK_BORDER_RADIUS_MAP, zl as ScrollableDialogContent, zn as createManifestValidator, zo as groupEventsByDate, zr as augmentManifest, zs as ChevronDownIcon, zt as validateBlockManifestIssues, zu as formatBookingInstant } from "./SiteChromeCustomizeContext-BV9GU-3C.mjs";
|
|
3
|
+
import { i as useOptionalPreviewLayout, t as PreviewQueryProvider } from "./PreviewQueryProvider-CStABBUh.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-CfquDtTh.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$19(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$19(data)) return {};
|
|
1308
|
+
const nestedError = isRecord$19(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
|
|
@@ -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$20(raw) && typeof raw.type === "string") return raw;
|
|
2521
2521
|
return null;
|
|
2522
2522
|
}
|
|
2523
2523
|
//#endregion
|
|
@@ -2735,7 +2735,8 @@ function getIconComponent(name) {
|
|
|
2735
2735
|
//#endregion
|
|
2736
2736
|
//#region ../blocks/src/system/runtime/nodes/icon.tsx
|
|
2737
2737
|
const IconNode = ({ value, title, className, blockId: _blockId, blockKind: _blockKind, blockContent: _blockContent, fragmentRegistry: _fragmentRegistry, pathBase: _pathBase, ...rest }) => {
|
|
2738
|
-
const
|
|
2738
|
+
const parsedValue = parseBlockIconValue(value);
|
|
2739
|
+
const Icon = getIconComponent(parsedValue.kind === "generated" ? null : parsedValue.kind === "semantic" ? parsedValue.iconId : value);
|
|
2739
2740
|
if (!Icon) return null;
|
|
2740
2741
|
const decorative = !rest["aria-label"] && !title;
|
|
2741
2742
|
return /* @__PURE__ */ jsx(Icon, {
|
|
@@ -2746,6 +2747,70 @@ const IconNode = ({ value, title, className, blockId: _blockId, blockKind: _bloc
|
|
|
2746
2747
|
});
|
|
2747
2748
|
};
|
|
2748
2749
|
//#endregion
|
|
2750
|
+
//#region ../blocks/src/system/icons/generatedAssets.ts
|
|
2751
|
+
function isRecord$18(value) {
|
|
2752
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
2753
|
+
}
|
|
2754
|
+
function generatedIconAssetRefKey(ref) {
|
|
2755
|
+
return `${ref.setId}\u0000${ref.assetId}`;
|
|
2756
|
+
}
|
|
2757
|
+
function collectGeneratedIconAssetRefs(page) {
|
|
2758
|
+
const blocks = [];
|
|
2759
|
+
for (const block of page.blocks) {
|
|
2760
|
+
if (block.kind !== "block.feature-cards" || typeof block.id !== "string") continue;
|
|
2761
|
+
const content = isRecord$18(block.draftContent) ? block.draftContent : isRecord$18(block.content) ? block.content : null;
|
|
2762
|
+
const cards = Array.isArray(content?.cards) ? content.cards : [];
|
|
2763
|
+
const refs = /* @__PURE__ */ new Map();
|
|
2764
|
+
for (const card of cards) {
|
|
2765
|
+
if (!isRecord$18(card)) continue;
|
|
2766
|
+
const icon = parseBlockIconValue(card.icon);
|
|
2767
|
+
if (icon.kind !== "generated") continue;
|
|
2768
|
+
const ref = {
|
|
2769
|
+
setId: icon.setId,
|
|
2770
|
+
assetId: icon.assetId
|
|
2771
|
+
};
|
|
2772
|
+
refs.set(generatedIconAssetRefKey(ref), ref);
|
|
2773
|
+
}
|
|
2774
|
+
if (refs.size > 0) blocks.push({
|
|
2775
|
+
blockId: block.id,
|
|
2776
|
+
refs: [...refs.values()]
|
|
2777
|
+
});
|
|
2778
|
+
}
|
|
2779
|
+
return blocks;
|
|
2780
|
+
}
|
|
2781
|
+
function dedupeGeneratedIconAssetRefs(blocks) {
|
|
2782
|
+
return [...new Map(blocks.flatMap((block) => block.refs).map((ref) => [generatedIconAssetRefKey(ref), ref])).values()];
|
|
2783
|
+
}
|
|
2784
|
+
function mapGeneratedIconAssetsToBlocks(blocks, resolvedAssets) {
|
|
2785
|
+
const byKey = new Map(resolvedAssets.map((asset) => [generatedIconAssetRefKey(asset), asset]));
|
|
2786
|
+
return Object.fromEntries(blocks.flatMap((block) => {
|
|
2787
|
+
const assets = block.refs.flatMap((ref) => {
|
|
2788
|
+
const asset = byKey.get(generatedIconAssetRefKey(ref));
|
|
2789
|
+
if (!asset) return [];
|
|
2790
|
+
const setId = parseGeneratedIconSetId(asset.setId);
|
|
2791
|
+
const assetId = parseGeneratedIconAssetId(asset.assetId);
|
|
2792
|
+
if (!setId || !assetId) return [];
|
|
2793
|
+
return [{
|
|
2794
|
+
setId,
|
|
2795
|
+
assetId,
|
|
2796
|
+
src: asset.src,
|
|
2797
|
+
...asset.width === void 0 ? {} : { width: asset.width },
|
|
2798
|
+
...asset.height === void 0 ? {} : { height: asset.height }
|
|
2799
|
+
}];
|
|
2800
|
+
});
|
|
2801
|
+
return assets.length > 0 ? [[block.blockId, assets]] : [];
|
|
2802
|
+
}));
|
|
2803
|
+
}
|
|
2804
|
+
function mergeGeneratedIconAssetsIntoResolvedData(resolvedData, assetsByBlock) {
|
|
2805
|
+
if (Object.keys(assetsByBlock).length === 0) return resolvedData;
|
|
2806
|
+
const merged = { ...resolvedData };
|
|
2807
|
+
for (const [blockId, generatedIconAssets] of Object.entries(assetsByBlock)) merged[blockId] = {
|
|
2808
|
+
...merged[blockId] ?? {},
|
|
2809
|
+
generatedIconAssets
|
|
2810
|
+
};
|
|
2811
|
+
return merged;
|
|
2812
|
+
}
|
|
2813
|
+
//#endregion
|
|
2749
2814
|
//#region ../blocks/src/system/runtime/nodes/feature-card-icon.tsx
|
|
2750
2815
|
function joinClasses$3(...values) {
|
|
2751
2816
|
return values.filter(Boolean).join(" ") || void 0;
|
|
@@ -2757,14 +2822,19 @@ function buildRenderAssetLookupFromUnknown(value) {
|
|
|
2757
2822
|
const result = buildGeneratedBlockIconRenderAssetLookupFromUnknown(value);
|
|
2758
2823
|
return result.kind === "ok" ? result.lookup : /* @__PURE__ */ new Map();
|
|
2759
2824
|
}
|
|
2760
|
-
|
|
2825
|
+
function generatedIconZoneStyle(value) {
|
|
2826
|
+
return { "--rb-feature-card-generated-icon-size": `${resolveFeatureCardGeneratedIconSizePx(value)}px` };
|
|
2827
|
+
}
|
|
2828
|
+
const FeatureCardIconNode = ({ value, treatment, generatedIconSizePx, className, generatedAssets, blockContent }) => {
|
|
2761
2829
|
if (!shouldReserveFeatureCardIconZone(blockContent?.cards)) return null;
|
|
2762
2830
|
const resolvedIcon = resolveBlockIconRenderValue(value, buildRenderAssetLookupFromUnknown(generatedAssets));
|
|
2763
|
-
const iconId = resolvedIcon.kind === "semantic" ? resolvedIcon.iconId :
|
|
2831
|
+
const iconId = resolvedIcon.kind === "semantic" ? resolvedIcon.iconId : null;
|
|
2764
2832
|
const resolvedTreatment = resolveTreatment(treatment);
|
|
2765
|
-
const hasIcon = resolvedIcon.kind
|
|
2833
|
+
const hasIcon = resolvedIcon.kind === "semantic" || resolvedIcon.kind === "generated_asset";
|
|
2834
|
+
const hasGeneratedAsset = resolvedIcon.kind === "generated_asset";
|
|
2766
2835
|
return /* @__PURE__ */ jsx("div", {
|
|
2767
|
-
className: joinClasses$3("rb-feature-card-icon-zone", `rb-feature-card-icon-zone--${resolvedTreatment}`, hasIcon ? "rb-feature-card-icon-zone--filled" : "rb-feature-card-icon-zone--empty", className),
|
|
2836
|
+
className: joinClasses$3("rb-feature-card-icon-zone", `rb-feature-card-icon-zone--${resolvedTreatment}`, hasGeneratedAsset && "rb-feature-card-icon-zone--generated", hasIcon ? "rb-feature-card-icon-zone--filled" : "rb-feature-card-icon-zone--empty", className),
|
|
2837
|
+
style: hasGeneratedAsset ? generatedIconZoneStyle(generatedIconSizePx) : void 0,
|
|
2768
2838
|
"aria-hidden": "true",
|
|
2769
2839
|
children: resolvedIcon.kind === "generated_asset" ? /* @__PURE__ */ jsx("img", {
|
|
2770
2840
|
src: resolvedIcon.asset.src,
|
|
@@ -3634,12 +3704,12 @@ function resolveBookingSiteId(siteId, form) {
|
|
|
3634
3704
|
return siteId || form?.siteId || "";
|
|
3635
3705
|
}
|
|
3636
3706
|
function normalizeBookingFormConfig(form) {
|
|
3637
|
-
if (!isRecord$
|
|
3707
|
+
if (!isRecord$17(form)) return null;
|
|
3638
3708
|
const id = readNonEmptyString(form.id);
|
|
3639
3709
|
const name = readNonEmptyString(form.name);
|
|
3640
3710
|
if (!id || !name) return null;
|
|
3641
|
-
const schemaSource = isRecord$
|
|
3642
|
-
const settingsSource = isRecord$
|
|
3711
|
+
const schemaSource = isRecord$17(form.schema) ? form.schema : isRecord$17(form.schemaJson) ? form.schemaJson : null;
|
|
3712
|
+
const settingsSource = isRecord$17(form.settings) ? form.settings : isRecord$17(form.settingsJson) ? form.settingsJson : null;
|
|
3643
3713
|
return {
|
|
3644
3714
|
id,
|
|
3645
3715
|
name,
|
|
@@ -3659,8 +3729,8 @@ function normalizeBookingServices(services) {
|
|
|
3659
3729
|
};
|
|
3660
3730
|
if (!services) return [];
|
|
3661
3731
|
if (Array.isArray(services)) return services.filter(isBookingFormService).map(normalizeService);
|
|
3662
|
-
if (isRecord$
|
|
3663
|
-
return isRecord$
|
|
3732
|
+
if (isRecord$17(services) && "services" in services) return Array.isArray(services.services) ? services.services.filter(isBookingFormService).map(normalizeService) : [];
|
|
3733
|
+
return isRecord$17(services) ? Object.values(services).filter(isBookingFormService).map(normalizeService) : [];
|
|
3664
3734
|
}
|
|
3665
3735
|
function normalizeBookingSchema(value) {
|
|
3666
3736
|
if (!value) return void 0;
|
|
@@ -3671,7 +3741,7 @@ function normalizeBookingSchema(value) {
|
|
|
3671
3741
|
};
|
|
3672
3742
|
}
|
|
3673
3743
|
function readBookingFormField(value) {
|
|
3674
|
-
if (!isRecord$
|
|
3744
|
+
if (!isRecord$17(value)) return null;
|
|
3675
3745
|
const id = readNonEmptyString(value.id);
|
|
3676
3746
|
const label = readNonEmptyString(value.label);
|
|
3677
3747
|
const type = readBookingFieldType(value.type);
|
|
@@ -3715,7 +3785,7 @@ function readBookingFieldOptions(value) {
|
|
|
3715
3785
|
return options.length > 0 ? options : void 0;
|
|
3716
3786
|
}
|
|
3717
3787
|
function readBookingFieldOption(value) {
|
|
3718
|
-
if (!isRecord$
|
|
3788
|
+
if (!isRecord$17(value)) return null;
|
|
3719
3789
|
const optionValue = readNonEmptyString(value.value);
|
|
3720
3790
|
const label = readNonEmptyString(value.label);
|
|
3721
3791
|
return optionValue && label ? {
|
|
@@ -3735,7 +3805,7 @@ function normalizeBookingSettings(value) {
|
|
|
3735
3805
|
};
|
|
3736
3806
|
}
|
|
3737
3807
|
function isBookingFormService(value) {
|
|
3738
|
-
return isRecord$
|
|
3808
|
+
return isRecord$17(value) && typeof value.id === "string" && typeof value.siteId === "string" && typeof value.title === "string";
|
|
3739
3809
|
}
|
|
3740
3810
|
function collectBookingCustomFields(data) {
|
|
3741
3811
|
const customFields = {};
|
|
@@ -3785,7 +3855,7 @@ function readStringArray(value) {
|
|
|
3785
3855
|
const strings = value.filter((item) => typeof item === "string");
|
|
3786
3856
|
return strings.length > 0 ? strings : void 0;
|
|
3787
3857
|
}
|
|
3788
|
-
function isRecord$
|
|
3858
|
+
function isRecord$17(value) {
|
|
3789
3859
|
return typeof value === "object" && value !== null;
|
|
3790
3860
|
}
|
|
3791
3861
|
function getBookingServicePaymentSelectionMode(service) {
|
|
@@ -19249,7 +19319,7 @@ const LEAFLET_JS_INTEGRITY = "sha256-20nQCchB9co0qIjJZRGuk2/Z9VM+kNiyxNV1lvTlZBo
|
|
|
19249
19319
|
let leafletLoaded = false;
|
|
19250
19320
|
let leafletLoadPromise = null;
|
|
19251
19321
|
function isLeafletApi(value) {
|
|
19252
|
-
if (!isRecord$
|
|
19322
|
+
if (!isRecord$20(value)) return false;
|
|
19253
19323
|
return typeof value.map === "function" && typeof value.tileLayer === "function" && typeof value.marker === "function";
|
|
19254
19324
|
}
|
|
19255
19325
|
function loadLeaflet() {
|
|
@@ -20571,7 +20641,7 @@ Autoplay.globalOptions = void 0;
|
|
|
20571
20641
|
function isObject$2(subject) {
|
|
20572
20642
|
return Object.prototype.toString.call(subject) === "[object Object]";
|
|
20573
20643
|
}
|
|
20574
|
-
function isRecord$
|
|
20644
|
+
function isRecord$16(subject) {
|
|
20575
20645
|
return isObject$2(subject) || Array.isArray(subject);
|
|
20576
20646
|
}
|
|
20577
20647
|
function canUseDOM() {
|
|
@@ -20586,7 +20656,7 @@ function areOptionsEqual(optionsA, optionsB) {
|
|
|
20586
20656
|
const valueA = optionsA[key];
|
|
20587
20657
|
const valueB = optionsB[key];
|
|
20588
20658
|
if (typeof valueA === "function") return `${valueA}` === `${valueB}`;
|
|
20589
|
-
if (!isRecord$
|
|
20659
|
+
if (!isRecord$16(valueA) || !isRecord$16(valueB)) return valueA === valueB;
|
|
20590
20660
|
return areOptionsEqual(valueA, valueB);
|
|
20591
20661
|
});
|
|
20592
20662
|
}
|
|
@@ -27129,7 +27199,7 @@ function WeeklySlotAvailabilityClient({ serviceId, resourceId, horizonWeeks, tim
|
|
|
27129
27199
|
}
|
|
27130
27200
|
//#endregion
|
|
27131
27201
|
//#region ../blocks/src/system/runtime/components/registry.client.tsx
|
|
27132
|
-
function isRecord$
|
|
27202
|
+
function isRecord$15(value) {
|
|
27133
27203
|
return typeof value === "object" && value !== null;
|
|
27134
27204
|
}
|
|
27135
27205
|
function buildRenderFromLooseProps(runtime, mode, props) {
|
|
@@ -27148,12 +27218,12 @@ function withRuntimeBackedEnvelope(source, runtime, render) {
|
|
|
27148
27218
|
function normalizeLegacyInteractiveRenderProps(runtime, mode, props) {
|
|
27149
27219
|
const source = props;
|
|
27150
27220
|
const render = props["render"];
|
|
27151
|
-
if (!isRecord$
|
|
27152
|
-
if (isRecord$
|
|
27221
|
+
if (!isRecord$15(render)) return withRuntimeBackedEnvelope(source, runtime, buildRenderFromLooseProps(runtime, mode, props));
|
|
27222
|
+
if (isRecord$15(render["hydration"])) return withRuntimeBackedEnvelope(source, runtime, {
|
|
27153
27223
|
...render,
|
|
27154
27224
|
mode
|
|
27155
27225
|
});
|
|
27156
|
-
if (!isRecord$
|
|
27226
|
+
if (!isRecord$15(render["display"])) return withRuntimeBackedEnvelope(source, runtime, buildRenderFromLooseProps(runtime, mode, props));
|
|
27157
27227
|
const { display, mode: _legacyMode, ...legacyHydration } = render;
|
|
27158
27228
|
return withRuntimeBackedEnvelope(source, runtime, {
|
|
27159
27229
|
display,
|
|
@@ -27699,7 +27769,7 @@ const defaultTransforms = createTransformRegistry([
|
|
|
27699
27769
|
//#region ../blocks/src/system/data/linkedContentEntries.ts
|
|
27700
27770
|
const LINKED_CONTENT_ENTRY_META_KEY = "__rbLinkedContentEntry";
|
|
27701
27771
|
function coerceLinkedContentEntriesPayload(payload) {
|
|
27702
|
-
if (!isRecord$
|
|
27772
|
+
if (!isRecord$14(payload)) return payload;
|
|
27703
27773
|
const response = payload;
|
|
27704
27774
|
if (!Array.isArray(response.entries)) return payload;
|
|
27705
27775
|
const contentType = parsePublicContentTypeMeta(response.contentType);
|
|
@@ -27707,16 +27777,16 @@ function coerceLinkedContentEntriesPayload(payload) {
|
|
|
27707
27777
|
return response.entries.map((entry) => enrichLinkedContentEntry(entry, contentType));
|
|
27708
27778
|
}
|
|
27709
27779
|
function getLinkedContentEntryMeta(value) {
|
|
27710
|
-
if (!isRecord$
|
|
27780
|
+
if (!isRecord$14(value)) return null;
|
|
27711
27781
|
const candidate = value[LINKED_CONTENT_ENTRY_META_KEY];
|
|
27712
27782
|
return isLinkedContentEntryMeta(candidate) ? candidate : null;
|
|
27713
27783
|
}
|
|
27714
27784
|
function buildLinkedContentEditTarget(input) {
|
|
27715
27785
|
const { entry, sourceBlockId, sourceBlockKind, itemIndex } = input;
|
|
27716
|
-
if (!isRecord$
|
|
27786
|
+
if (!isRecord$14(entry)) return null;
|
|
27717
27787
|
const meta = getLinkedContentEntryMeta(entry);
|
|
27718
27788
|
if (!meta || meta.support.kind !== "supported") return null;
|
|
27719
|
-
const content = isRecord$
|
|
27789
|
+
const content = isRecord$14(entry.content) ? entry.content : {};
|
|
27720
27790
|
return {
|
|
27721
27791
|
kind: "linked-content-entry",
|
|
27722
27792
|
entryId: meta.entryId,
|
|
@@ -27780,12 +27850,12 @@ function resolveLinkedEntryInlineFieldEligibility(input) {
|
|
|
27780
27850
|
};
|
|
27781
27851
|
}
|
|
27782
27852
|
function enrichLinkedContentEntry(entry, contentType) {
|
|
27783
|
-
if (!isRecord$
|
|
27853
|
+
if (!isRecord$14(entry)) return entry;
|
|
27784
27854
|
const entryId = typeof entry.id === "string" ? entry.id : null;
|
|
27785
27855
|
if (!entryId) return entry;
|
|
27786
27856
|
const title = typeof entry.title === "string" && entry.title.trim().length > 0 ? entry.title : entryId;
|
|
27787
27857
|
const optimisticHash = typeof entry.optimisticHash === "string" && entry.optimisticHash.length > 0 ? entry.optimisticHash : null;
|
|
27788
|
-
const content = isRecord$
|
|
27858
|
+
const content = isRecord$14(entry.content) ? entry.content : {};
|
|
27789
27859
|
const meta = {
|
|
27790
27860
|
kind: "linked-content-entry",
|
|
27791
27861
|
entryId,
|
|
@@ -27881,7 +27951,7 @@ function capitalize(value) {
|
|
|
27881
27951
|
return value.charAt(0).toUpperCase() + value.slice(1).toLowerCase();
|
|
27882
27952
|
}
|
|
27883
27953
|
function parsePublicContentTypeMeta(value) {
|
|
27884
|
-
if (!isRecord$
|
|
27954
|
+
if (!isRecord$14(value)) return null;
|
|
27885
27955
|
if (typeof value.key !== "string" || value.key.trim().length === 0) return null;
|
|
27886
27956
|
return {
|
|
27887
27957
|
key: value.key,
|
|
@@ -27891,7 +27961,7 @@ function parsePublicContentTypeMeta(value) {
|
|
|
27891
27961
|
};
|
|
27892
27962
|
}
|
|
27893
27963
|
function parsePublicContentTypeLinkedEntryEditing(value) {
|
|
27894
|
-
if (!isRecord$
|
|
27964
|
+
if (!isRecord$14(value) || typeof value.kind !== "string") return null;
|
|
27895
27965
|
switch (value.kind) {
|
|
27896
27966
|
case "generic": return { kind: "generic" };
|
|
27897
27967
|
case "unsupported-domain-backed": return {
|
|
@@ -27902,7 +27972,7 @@ function parsePublicContentTypeLinkedEntryEditing(value) {
|
|
|
27902
27972
|
}
|
|
27903
27973
|
}
|
|
27904
27974
|
function parsePublicContentTypeFieldMeta(value) {
|
|
27905
|
-
if (!isRecord$
|
|
27975
|
+
if (!isRecord$14(value)) return [];
|
|
27906
27976
|
if (typeof value.id !== "string" || typeof value.type !== "string") return [];
|
|
27907
27977
|
return [{
|
|
27908
27978
|
id: value.id,
|
|
@@ -27917,14 +27987,14 @@ function parseStringArray(value) {
|
|
|
27917
27987
|
return value.filter((item) => typeof item === "string");
|
|
27918
27988
|
}
|
|
27919
27989
|
function isLinkedContentEntryMeta(value) {
|
|
27920
|
-
if (!isRecord$
|
|
27990
|
+
if (!isRecord$14(value)) return false;
|
|
27921
27991
|
if (value.kind !== "linked-content-entry") return false;
|
|
27922
27992
|
if (typeof value.entryId !== "string") return false;
|
|
27923
27993
|
if (typeof value.contentTypeKey !== "string") return false;
|
|
27924
27994
|
if (typeof value.contentTypeLabel !== "string") return false;
|
|
27925
27995
|
if (typeof value.title !== "string") return false;
|
|
27926
27996
|
if (!(value.optimisticHash === null || typeof value.optimisticHash === "string")) return false;
|
|
27927
|
-
if (!isRecord$
|
|
27997
|
+
if (!isRecord$14(value.contentType)) return false;
|
|
27928
27998
|
if (!isLinkedEntryFieldSourceArray(value.fieldSources)) return false;
|
|
27929
27999
|
return isLinkedContentEditSupport(value.support);
|
|
27930
28000
|
}
|
|
@@ -27932,7 +28002,7 @@ function isLinkedEntryFieldSourceArray(value) {
|
|
|
27932
28002
|
return Array.isArray(value) && value.every(isLinkedEntryFieldSource);
|
|
27933
28003
|
}
|
|
27934
28004
|
function isLinkedEntryFieldSource(value) {
|
|
27935
|
-
if (!isRecord$
|
|
28005
|
+
if (!isRecord$14(value)) return false;
|
|
27936
28006
|
if (typeof value.displayPath !== "string") return false;
|
|
27937
28007
|
switch (value.kind) {
|
|
27938
28008
|
case "content-field": return typeof value.fieldPath === "string" && (value.fieldType === "text" || value.fieldType === "richText");
|
|
@@ -27953,7 +28023,7 @@ function isLinkedEntryInlineFieldReadOnlyReason(value) {
|
|
|
27953
28023
|
}
|
|
27954
28024
|
}
|
|
27955
28025
|
function isLinkedContentEditSupport(value) {
|
|
27956
|
-
if (!isRecord$
|
|
28026
|
+
if (!isRecord$14(value) || typeof value.kind !== "string") return false;
|
|
27957
28027
|
switch (value.kind) {
|
|
27958
28028
|
case "supported": return true;
|
|
27959
28029
|
case "unsupported-domain-backed":
|
|
@@ -27962,7 +28032,7 @@ function isLinkedContentEditSupport(value) {
|
|
|
27962
28032
|
default: return false;
|
|
27963
28033
|
}
|
|
27964
28034
|
}
|
|
27965
|
-
function isRecord$
|
|
28035
|
+
function isRecord$14(value) {
|
|
27966
28036
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
27967
28037
|
}
|
|
27968
28038
|
//#endregion
|
|
@@ -28016,14 +28086,14 @@ function isDecoratedHeadingBlockKind(blockKind) {
|
|
|
28016
28086
|
return blockKind === "block.intro" || blockKind === "block.feature-cards" || blockKind === "block.testimonials" || blockKind === "block.faq";
|
|
28017
28087
|
}
|
|
28018
28088
|
function readVariant(blockContent) {
|
|
28019
|
-
if (!isRecord$
|
|
28089
|
+
if (!isRecord$13(blockContent)) return void 0;
|
|
28020
28090
|
const variant = blockContent.variant;
|
|
28021
28091
|
return typeof variant === "string" ? variant : void 0;
|
|
28022
28092
|
}
|
|
28023
28093
|
function isFaqDecoratedVariant(variant) {
|
|
28024
28094
|
return variant === "default" || variant === "question-columns";
|
|
28025
28095
|
}
|
|
28026
|
-
function isRecord$
|
|
28096
|
+
function isRecord$13(value) {
|
|
28027
28097
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
28028
28098
|
}
|
|
28029
28099
|
function buildHeadingDecorationWrapperClassName(className) {
|
|
@@ -30286,15 +30356,19 @@ function generateLogoTextBehaviorStyles(logoText, themeId) {
|
|
|
30286
30356
|
* legacy navStyle, navWeight, navColor, and navEffects settings.
|
|
30287
30357
|
*/
|
|
30288
30358
|
function generateNavLinkStyles(header, themeId, tokens, theme, contrastTreatment, navTextSize) {
|
|
30359
|
+
const navPreferences = {
|
|
30360
|
+
typography: header.navTypography ?? "inherit",
|
|
30361
|
+
fontSize: readHeaderNavFontSizePreference(header.navTextSize)
|
|
30362
|
+
};
|
|
30289
30363
|
if (header.navLinkStyle) return generateNavLinkCSS({
|
|
30290
30364
|
themeId,
|
|
30291
30365
|
tokens,
|
|
30292
30366
|
theme,
|
|
30293
|
-
style: contrastTreatment || navTextSize ? {
|
|
30367
|
+
style: mergeHeaderNavTypographyPreference(contrastTreatment || navTextSize ? {
|
|
30294
30368
|
...header.navLinkStyle,
|
|
30295
30369
|
...contrastTreatment ? { contrastTreatment } : {},
|
|
30296
30370
|
...navTextSize ? { textSize: navTextSize } : {}
|
|
30297
|
-
} : header.navLinkStyle,
|
|
30371
|
+
} : header.navLinkStyle, navPreferences),
|
|
30298
30372
|
className: "header-nav-link"
|
|
30299
30373
|
});
|
|
30300
30374
|
const navStyle = header.navStyle ?? "minimal";
|
|
@@ -30366,7 +30440,7 @@ function generateNavLinkStyles(header, themeId, tokens, theme, contrastTreatment
|
|
|
30366
30440
|
themeId,
|
|
30367
30441
|
tokens,
|
|
30368
30442
|
theme,
|
|
30369
|
-
style: mergedStyle,
|
|
30443
|
+
style: mergeHeaderNavTypographyPreference(mergedStyle, navPreferences),
|
|
30370
30444
|
className: "header-nav-link"
|
|
30371
30445
|
});
|
|
30372
30446
|
}
|
|
@@ -30757,6 +30831,9 @@ const boldWaveTransitionMask = svgDataUrl("<svg viewBox='0 0 1440 72' xmlns='htt
|
|
|
30757
30831
|
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>");
|
|
30758
30832
|
function generateSiteStyleTransitionCss(themeId) {
|
|
30759
30833
|
const selector = `:where([data-theme-scope="${themeId}"])`;
|
|
30834
|
+
const compactBoundaryHeight = requiredBoundaryHeightCss("wave-edge-gentle");
|
|
30835
|
+
const mediumBoundaryHeight = requiredBoundaryHeightCss("wave-edge");
|
|
30836
|
+
const largeBoundaryHeight = requiredBoundaryHeightCss("wave-edge-bold");
|
|
30760
30837
|
return `${selector} [data-style-group^='site-style-transition-'] {
|
|
30761
30838
|
position: relative;
|
|
30762
30839
|
z-index: 2;
|
|
@@ -30764,23 +30841,48 @@ function generateSiteStyleTransitionCss(themeId) {
|
|
|
30764
30841
|
--site-style-transition-to: rgb(var(--tb-background));
|
|
30765
30842
|
}
|
|
30766
30843
|
|
|
30767
|
-
${selector} [data-block-
|
|
30844
|
+
${selector} [data-block-boundary][data-style-group^='site-style-transition-'] {
|
|
30768
30845
|
position: relative;
|
|
30769
30846
|
z-index: 3;
|
|
30770
30847
|
height: 0;
|
|
30771
30848
|
pointer-events: none;
|
|
30849
|
+
--site-style-boundary-height: ${mediumBoundaryHeight};
|
|
30850
|
+
}
|
|
30851
|
+
|
|
30852
|
+
${selector} [data-block][data-site-style-boundary-before] > :where([data-slot='section']) {
|
|
30853
|
+
padding-top: calc(var(--rb-section-pad-y, 0rem) + var(--site-style-boundary-before-reserve, 0rem));
|
|
30854
|
+
}
|
|
30855
|
+
|
|
30856
|
+
${selector} [data-block][data-site-style-boundary-after] > :where([data-slot='section']) {
|
|
30857
|
+
padding-bottom: calc(var(--rb-section-pad-y, 0rem) + var(--site-style-boundary-after-reserve, 0rem));
|
|
30772
30858
|
}
|
|
30773
30859
|
|
|
30774
|
-
${selector} [data-block-
|
|
30775
|
-
${selector} [data-block-
|
|
30776
|
-
${selector} [data-block-
|
|
30860
|
+
${selector} [data-block-boundary][data-style-group^='site-style-transition-wave-edge-']::before,
|
|
30861
|
+
${selector} [data-block-boundary][data-style-group^='site-style-transition-angle-edge-']::before,
|
|
30862
|
+
${selector} [data-block-boundary][data-style-group^='site-style-transition-soft-fade']::before {
|
|
30777
30863
|
content: '';
|
|
30778
30864
|
position: absolute;
|
|
30779
30865
|
left: 0;
|
|
30780
30866
|
right: 0;
|
|
30781
|
-
|
|
30867
|
+
top: 0;
|
|
30868
|
+
transform: translateY(-50%);
|
|
30869
|
+
z-index: 0;
|
|
30870
|
+
height: var(--site-style-boundary-height);
|
|
30871
|
+
background: var(--site-style-transition-from);
|
|
30872
|
+
pointer-events: none;
|
|
30873
|
+
}
|
|
30874
|
+
|
|
30875
|
+
${selector} [data-block-boundary][data-style-group^='site-style-transition-wave-edge-']::after,
|
|
30876
|
+
${selector} [data-block-boundary][data-style-group^='site-style-transition-angle-edge-']::after,
|
|
30877
|
+
${selector} [data-block-boundary][data-style-group^='site-style-transition-soft-fade']::after {
|
|
30878
|
+
content: '';
|
|
30879
|
+
position: absolute;
|
|
30880
|
+
left: 0;
|
|
30881
|
+
right: 0;
|
|
30882
|
+
top: 0;
|
|
30883
|
+
transform: translateY(-50%);
|
|
30782
30884
|
z-index: 1;
|
|
30783
|
-
height:
|
|
30885
|
+
height: var(--site-style-boundary-height);
|
|
30784
30886
|
pointer-events: none;
|
|
30785
30887
|
}
|
|
30786
30888
|
|
|
@@ -30818,7 +30920,7 @@ ${selector} [data-style-group$='-to-brand-depth-band'] {
|
|
|
30818
30920
|
--site-style-transition-to: rgb(var(--tb-primary-800));
|
|
30819
30921
|
}
|
|
30820
30922
|
|
|
30821
|
-
${selector} [data-block-
|
|
30923
|
+
${selector} [data-block-boundary][data-style-group^='site-style-transition-soft-fade']::after {
|
|
30822
30924
|
/* Fallback for browsers without color-mix(). */
|
|
30823
30925
|
background: linear-gradient(
|
|
30824
30926
|
to bottom,
|
|
@@ -30834,30 +30936,37 @@ ${selector} [data-block-transition][data-style-group^='site-style-transition-sof
|
|
|
30834
30936
|
);
|
|
30835
30937
|
}
|
|
30836
30938
|
|
|
30837
|
-
${selector} [data-block-
|
|
30838
|
-
height:
|
|
30939
|
+
${selector} [data-block-boundary][data-style-group^='site-style-transition-soft-fade-long-'] {
|
|
30940
|
+
--site-style-boundary-height: ${requiredBoundaryHeightCss("soft-fade-long")};
|
|
30839
30941
|
}
|
|
30840
30942
|
|
|
30841
|
-
${selector} [data-block-
|
|
30842
|
-
height:
|
|
30943
|
+
${selector} [data-block-boundary][data-style-group^='site-style-transition-soft-fade-expansive-'] {
|
|
30944
|
+
--site-style-boundary-height: ${requiredBoundaryHeightCss("soft-fade-expansive")};
|
|
30843
30945
|
}
|
|
30844
30946
|
|
|
30845
|
-
${selector} [data-block-
|
|
30947
|
+
${selector} [data-block-boundary][data-style-group^='site-style-transition-angle-edge-']::after {
|
|
30948
|
+
height: calc(var(--site-style-boundary-height) + 2px);
|
|
30846
30949
|
background: var(--site-style-transition-to);
|
|
30847
30950
|
clip-path: polygon(0 42%, 100% 8%, 100% 100%, 0 100%);
|
|
30848
30951
|
}
|
|
30849
30952
|
|
|
30850
|
-
${selector} [data-block-
|
|
30851
|
-
height:
|
|
30953
|
+
${selector} [data-block-boundary][data-style-group^='site-style-transition-angle-edge-subtle-'] {
|
|
30954
|
+
--site-style-boundary-height: ${compactBoundaryHeight};
|
|
30955
|
+
}
|
|
30956
|
+
|
|
30957
|
+
${selector} [data-block-boundary][data-style-group^='site-style-transition-angle-edge-subtle-']::after {
|
|
30852
30958
|
clip-path: polygon(0 34%, 100% 18%, 100% 100%, 0 100%);
|
|
30853
30959
|
}
|
|
30854
30960
|
|
|
30855
|
-
${selector} [data-block-
|
|
30856
|
-
height:
|
|
30961
|
+
${selector} [data-block-boundary][data-style-group^='site-style-transition-angle-edge-steep-'] {
|
|
30962
|
+
--site-style-boundary-height: ${largeBoundaryHeight};
|
|
30963
|
+
}
|
|
30964
|
+
|
|
30965
|
+
${selector} [data-block-boundary][data-style-group^='site-style-transition-angle-edge-steep-']::after {
|
|
30857
30966
|
clip-path: polygon(0 54%, 100% 0%, 100% 100%, 0 100%);
|
|
30858
30967
|
}
|
|
30859
30968
|
|
|
30860
|
-
${selector} [data-block-
|
|
30969
|
+
${selector} [data-block-boundary][data-style-group^='site-style-transition-wave-edge-']::after {
|
|
30861
30970
|
background: var(--site-style-transition-to);
|
|
30862
30971
|
mask-image: url("${classicWaveTransitionMask}");
|
|
30863
30972
|
mask-repeat: no-repeat;
|
|
@@ -30867,28 +30976,39 @@ ${selector} [data-block-transition][data-style-group^='site-style-transition-wav
|
|
|
30867
30976
|
-webkit-mask-size: 100% 100%;
|
|
30868
30977
|
}
|
|
30869
30978
|
|
|
30870
|
-
${selector} [data-block-
|
|
30979
|
+
${selector} [data-block-boundary][data-style-group^='site-style-transition-wave-edge-balanced-']::after {
|
|
30871
30980
|
mask-image: url("${balancedWaveTransitionMask}");
|
|
30872
30981
|
-webkit-mask-image: url("${balancedWaveTransitionMask}");
|
|
30873
30982
|
}
|
|
30874
30983
|
|
|
30875
|
-
${selector} [data-block-
|
|
30876
|
-
height:
|
|
30984
|
+
${selector} [data-block-boundary][data-style-group^='site-style-transition-wave-edge-gentle-'] {
|
|
30985
|
+
--site-style-boundary-height: ${compactBoundaryHeight};
|
|
30986
|
+
}
|
|
30987
|
+
|
|
30988
|
+
${selector} [data-block-boundary][data-style-group^='site-style-transition-wave-edge-gentle-']::after {
|
|
30877
30989
|
mask-image: url("${gentleWaveTransitionMask}");
|
|
30878
30990
|
-webkit-mask-image: url("${gentleWaveTransitionMask}");
|
|
30879
30991
|
}
|
|
30880
30992
|
|
|
30881
|
-
${selector} [data-block-
|
|
30882
|
-
height:
|
|
30993
|
+
${selector} [data-block-boundary][data-style-group^='site-style-transition-wave-edge-bold-'] {
|
|
30994
|
+
--site-style-boundary-height: ${largeBoundaryHeight};
|
|
30995
|
+
}
|
|
30996
|
+
|
|
30997
|
+
${selector} [data-block-boundary][data-style-group^='site-style-transition-wave-edge-bold-']::after {
|
|
30883
30998
|
mask-image: url("${boldWaveTransitionMask}");
|
|
30884
30999
|
-webkit-mask-image: url("${boldWaveTransitionMask}");
|
|
30885
31000
|
}
|
|
30886
31001
|
|
|
30887
|
-
${selector} [data-block-
|
|
31002
|
+
${selector} [data-block-boundary][data-style-group^='site-style-transition-wave-edge-drift-']::after {
|
|
30888
31003
|
mask-image: url("${driftWaveTransitionMask}");
|
|
30889
31004
|
-webkit-mask-image: url("${driftWaveTransitionMask}");
|
|
30890
31005
|
}`;
|
|
30891
31006
|
}
|
|
31007
|
+
function requiredBoundaryHeightCss(transition) {
|
|
31008
|
+
const metrics = boundaryRuntimeMetricsForTransition(transition);
|
|
31009
|
+
if (!metrics) throw new Error(`Missing boundary runtime metrics for ${transition}`);
|
|
31010
|
+
return metrics.heightCss;
|
|
31011
|
+
}
|
|
30892
31012
|
function svgDataUrl(svg) {
|
|
30893
31013
|
return `data:image/svg+xml,${encodeURIComponent(svg)}`;
|
|
30894
31014
|
}
|
|
@@ -32822,7 +32942,7 @@ function hydrateValue(value, context) {
|
|
|
32822
32942
|
const resolvedItems = value.map((item) => hydrateValue(item, context));
|
|
32823
32943
|
return resolvedItems.every((item, index) => item === value[index]) ? value : resolvedItems;
|
|
32824
32944
|
}
|
|
32825
|
-
if (isRecord$
|
|
32945
|
+
if (isRecord$20(value)) {
|
|
32826
32946
|
if (isInternalLink(value)) return hydrateInternalLink(value, context.routes);
|
|
32827
32947
|
if (isPageLink(value)) return hydratePageLink(value, context);
|
|
32828
32948
|
if (isEntryLink(value)) return hydrateEntryLink(value, context);
|
|
@@ -33024,13 +33144,15 @@ function mergeBlockDescriptorsWithRegistry(systemBlocks, registry, onConflict) {
|
|
|
33024
33144
|
}
|
|
33025
33145
|
//#endregion
|
|
33026
33146
|
//#region ../blocks/src/PageRenderer.tsx
|
|
33027
|
-
function PageRenderer({ theme, page, usePlaceholders = false, dataContext, wrapBlock, registry, themeTokens: providedThemeTokens, routeMap, blockOverrides, sdkConfig, customBlocks, previewAuthoring }) {
|
|
33147
|
+
function PageRenderer({ theme, page, runtimeBoundaries, usePlaceholders = false, dataContext, wrapBlock, wrapBoundary, registry, themeTokens: providedThemeTokens, routeMap, blockOverrides, sdkConfig, customBlocks, previewAuthoring }) {
|
|
33028
33148
|
const imageResolveContext = React$1.useMemo(() => resolvePageRendererImageResolveContext(dataContext), [
|
|
33029
33149
|
dataContext?.imageResolveContext,
|
|
33030
33150
|
dataContext?.mediaAssets,
|
|
33031
33151
|
dataContext?.siteId,
|
|
33032
33152
|
dataContext?.supabaseUrl
|
|
33033
33153
|
]);
|
|
33154
|
+
const boundaryByAdjacentBlockIds = React$1.useMemo(() => boundaryMapForAdjacentBlockIds(runtimeBoundaries ?? []), [runtimeBoundaries]);
|
|
33155
|
+
const usesRuntimeBoundaries = runtimeBoundaries !== void 0;
|
|
33034
33156
|
if (!page || page.blocks.length === 0) return /* @__PURE__ */ jsx("div", {
|
|
33035
33157
|
className: "rb-p-6 rb-caption",
|
|
33036
33158
|
style: textColorStyle("mutedText"),
|
|
@@ -33042,6 +33164,17 @@ function PageRenderer({ theme, page, usePlaceholders = false, dataContext, wrapB
|
|
|
33042
33164
|
return /* @__PURE__ */ jsx("div", { children: page.blocks.map((block, index) => {
|
|
33043
33165
|
const blockPosition = pageBlockPosition(index, page.blocks.length);
|
|
33044
33166
|
const blockKey = block.id ?? `${block.kind}-${index}`;
|
|
33167
|
+
const previousBlock = page.blocks[index - 1] ?? null;
|
|
33168
|
+
const nextBlock = page.blocks[index + 1] ?? null;
|
|
33169
|
+
const boundaryBefore = boundaryBetweenBlocks(previousBlock, block, boundaryByAdjacentBlockIds);
|
|
33170
|
+
const boundaryAfter = boundaryBetweenBlocks(block, nextBlock, boundaryByAdjacentBlockIds);
|
|
33171
|
+
const boundaryElement = renderBoundaryAfterBlock({
|
|
33172
|
+
block,
|
|
33173
|
+
nextBlock,
|
|
33174
|
+
blockKey,
|
|
33175
|
+
boundaryByAdjacentBlockIds,
|
|
33176
|
+
wrapBoundary
|
|
33177
|
+
});
|
|
33045
33178
|
const cleanKind = block.kind.replace(/^block\./, "");
|
|
33046
33179
|
const definition = getBlockDefinition(block.kind);
|
|
33047
33180
|
const managesOwnWrapper = definition?.manifest.behaviours?.managesOwnWrapper;
|
|
@@ -33064,11 +33197,18 @@ function PageRenderer({ theme, page, usePlaceholders = false, dataContext, wrapB
|
|
|
33064
33197
|
imageResolveContext,
|
|
33065
33198
|
previewAuthoring
|
|
33066
33199
|
};
|
|
33067
|
-
if (!shouldUseWrapper)
|
|
33200
|
+
if (!shouldUseWrapper) {
|
|
33201
|
+
const rendered = /* @__PURE__ */ jsx(MemoBlockSection, { ...blockSectionProps }, `${blockKey}:block`);
|
|
33202
|
+
return boundaryElement ? /* @__PURE__ */ jsxs(React$1.Fragment, { children: [rendered, boundaryElement] }, blockKey) : rendered;
|
|
33203
|
+
}
|
|
33068
33204
|
const wrapperClassName = [`block-${cleanKind}`, wrapBlock ? "group relative" : null].filter(Boolean).join(" ");
|
|
33069
33205
|
const styleGroup = typeof renderableContent.styleGroup === "string" ? renderableContent.styleGroup : void 0;
|
|
33070
33206
|
const blockLook = typeof renderableContent.blockLook === "string" ? renderableContent.blockLook : void 0;
|
|
33071
33207
|
const transitionStyle = transitionCssVarsStyle(renderableContent);
|
|
33208
|
+
const blockStyle = mergeStyleObjects(transitionStyle, boundaryReserveCssVarsStyle({
|
|
33209
|
+
before: boundaryBefore,
|
|
33210
|
+
after: boundaryAfter
|
|
33211
|
+
}));
|
|
33072
33212
|
const blockElement = /* @__PURE__ */ jsx("div", {
|
|
33073
33213
|
className: wrapperClassName,
|
|
33074
33214
|
"data-block": cleanKind,
|
|
@@ -33078,11 +33218,14 @@ function PageRenderer({ theme, page, usePlaceholders = false, dataContext, wrapB
|
|
|
33078
33218
|
"data-block-variant": variantKey ?? void 0,
|
|
33079
33219
|
"data-block-look": blockLook,
|
|
33080
33220
|
"data-page-block-position": blockPosition,
|
|
33221
|
+
"data-site-style-boundary-before": boundaryBefore?.metrics.size,
|
|
33222
|
+
"data-site-style-boundary-after": boundaryAfter?.metrics.size,
|
|
33081
33223
|
"data-style-group": styleGroup,
|
|
33082
|
-
style:
|
|
33224
|
+
style: blockStyle,
|
|
33083
33225
|
children: /* @__PURE__ */ jsx(MemoBlockSection, { ...blockSectionProps })
|
|
33084
33226
|
}, blockKey);
|
|
33085
|
-
if (
|
|
33227
|
+
if (boundaryElement) return /* @__PURE__ */ jsxs(React$1.Fragment, { children: [blockElement, boundaryElement] }, blockKey);
|
|
33228
|
+
if (usesRuntimeBoundaries || !isSiteStyleTransitionStyleGroup(styleGroup)) return blockElement;
|
|
33086
33229
|
return /* @__PURE__ */ jsxs(React$1.Fragment, { children: [blockElement, /* @__PURE__ */ jsx("div", {
|
|
33087
33230
|
"aria-hidden": "true",
|
|
33088
33231
|
"data-block-transition": "",
|
|
@@ -33095,6 +33238,53 @@ function PageRenderer({ theme, page, usePlaceholders = false, dataContext, wrapB
|
|
|
33095
33238
|
function isSiteStyleTransitionStyleGroup(value) {
|
|
33096
33239
|
return value?.startsWith("site-style-transition-") === true;
|
|
33097
33240
|
}
|
|
33241
|
+
function boundaryMapForAdjacentBlockIds(boundaries) {
|
|
33242
|
+
return new Map(boundaries.map((boundary) => [boundaryKey(boundary.previousBlockId, boundary.nextBlockId), boundary]));
|
|
33243
|
+
}
|
|
33244
|
+
function boundaryKey(previousBlockId, nextBlockId) {
|
|
33245
|
+
return `${previousBlockId}\u0000${nextBlockId}`;
|
|
33246
|
+
}
|
|
33247
|
+
function boundaryBetweenBlocks(previousBlock, nextBlock, boundaryByAdjacentBlockIds) {
|
|
33248
|
+
const previousBlockId = previousBlock?.id ?? null;
|
|
33249
|
+
const nextBlockId = nextBlock?.id ?? null;
|
|
33250
|
+
if (!previousBlockId || !nextBlockId) return null;
|
|
33251
|
+
return boundaryByAdjacentBlockIds.get(boundaryKey(previousBlockId, nextBlockId)) ?? null;
|
|
33252
|
+
}
|
|
33253
|
+
function renderBoundaryAfterBlock(input) {
|
|
33254
|
+
const previousBlockId = input.block.id;
|
|
33255
|
+
const nextBlockId = input.nextBlock?.id ?? null;
|
|
33256
|
+
if (!previousBlockId || !nextBlockId) return null;
|
|
33257
|
+
const boundary = input.boundaryByAdjacentBlockIds.get(boundaryKey(previousBlockId, nextBlockId));
|
|
33258
|
+
if (!boundary) return null;
|
|
33259
|
+
const rendered = /* @__PURE__ */ jsx("div", {
|
|
33260
|
+
"aria-hidden": "true",
|
|
33261
|
+
"data-block-boundary": "",
|
|
33262
|
+
"data-boundary-id": boundary.boundaryId,
|
|
33263
|
+
"data-boundary-previous-block-id": boundary.previousBlockId,
|
|
33264
|
+
"data-boundary-next-block-id": boundary.nextBlockId,
|
|
33265
|
+
"data-style-group": boundary.styleGroup,
|
|
33266
|
+
style: boundaryCssVarsStyle(boundary)
|
|
33267
|
+
}, `${input.blockKey}:boundary`);
|
|
33268
|
+
return input.wrapBoundary ? input.wrapBoundary(boundary, rendered) : rendered;
|
|
33269
|
+
}
|
|
33270
|
+
function boundaryCssVarsStyle(boundary) {
|
|
33271
|
+
return {
|
|
33272
|
+
"--site-style-transition-from": boundary.cssVars.from,
|
|
33273
|
+
"--site-style-transition-to": boundary.cssVars.to
|
|
33274
|
+
};
|
|
33275
|
+
}
|
|
33276
|
+
function boundaryReserveCssVarsStyle(input) {
|
|
33277
|
+
const before = input.before ? boundaryReserveValueForTreatment(input.before) : null;
|
|
33278
|
+
const after = input.after ? boundaryReserveValueForTreatment(input.after) : null;
|
|
33279
|
+
if (!before && !after) return void 0;
|
|
33280
|
+
return {
|
|
33281
|
+
...before ? { "--site-style-boundary-before-reserve": before } : {},
|
|
33282
|
+
...after ? { "--site-style-boundary-after-reserve": after } : {}
|
|
33283
|
+
};
|
|
33284
|
+
}
|
|
33285
|
+
function boundaryReserveValueForTreatment(boundary) {
|
|
33286
|
+
return boundary.metrics.reserveCss;
|
|
33287
|
+
}
|
|
33098
33288
|
function transitionCssVarsStyle(content) {
|
|
33099
33289
|
const transitionStyles = isObjectRecord(content._transitionStyles) ? content._transitionStyles : null;
|
|
33100
33290
|
const cssVars = isObjectRecord(transitionStyles?.cssVars) ? transitionStyles.cssVars : null;
|
|
@@ -33106,6 +33296,14 @@ function transitionCssVarsStyle(content) {
|
|
|
33106
33296
|
...to ? { "--site-style-transition-to": to } : {}
|
|
33107
33297
|
};
|
|
33108
33298
|
}
|
|
33299
|
+
function mergeStyleObjects(left, right) {
|
|
33300
|
+
if (!left) return right;
|
|
33301
|
+
if (!right) return left;
|
|
33302
|
+
return {
|
|
33303
|
+
...left,
|
|
33304
|
+
...right
|
|
33305
|
+
};
|
|
33306
|
+
}
|
|
33109
33307
|
function pageBlockPosition(index, blockCount) {
|
|
33110
33308
|
if (blockCount <= 1) return "only";
|
|
33111
33309
|
if (index === 0) return "first";
|
|
@@ -33407,12 +33605,10 @@ function shouldDebugCustomBlocks() {
|
|
|
33407
33605
|
}
|
|
33408
33606
|
}
|
|
33409
33607
|
function resolveBlockData({ block, definition, dataContext }) {
|
|
33410
|
-
if (!definition.dataLoaders || Object.keys(definition.dataLoaders).length === 0) return;
|
|
33411
33608
|
const blockId = block.id ?? null;
|
|
33412
|
-
|
|
33413
|
-
|
|
33414
|
-
|
|
33415
|
-
return { ...raw };
|
|
33609
|
+
const raw = blockId ? dataContext?.resolvedData?.[blockId] : void 0;
|
|
33610
|
+
if (isObjectRecord(raw)) return { ...raw };
|
|
33611
|
+
return definition.dataLoaders && Object.keys(definition.dataLoaders).length > 0 ? {} : void 0;
|
|
33416
33612
|
}
|
|
33417
33613
|
/**
|
|
33418
33614
|
* Resolves block content based on stage priority.
|
|
@@ -35017,52 +35213,53 @@ const containerResponsiveThemeCss = `/*
|
|
|
35017
35213
|
|
|
35018
35214
|
/* Semantic spacing tokens (replaces Tailwind maps in src/system/spacing.ts) */
|
|
35019
35215
|
.rb-section-pad-none {
|
|
35020
|
-
|
|
35021
|
-
padding-
|
|
35216
|
+
--rb-section-pad-y: 0rem;
|
|
35217
|
+
padding-top: var(--rb-section-pad-y);
|
|
35218
|
+
padding-bottom: var(--rb-section-pad-y);
|
|
35022
35219
|
}
|
|
35023
35220
|
.rb-section-pad-compact {
|
|
35024
|
-
|
|
35025
|
-
padding-
|
|
35221
|
+
--rb-section-pad-y: 1.5rem;
|
|
35222
|
+
padding-top: var(--rb-section-pad-y);
|
|
35223
|
+
padding-bottom: var(--rb-section-pad-y);
|
|
35026
35224
|
}
|
|
35027
35225
|
.rb-section-pad-cozy {
|
|
35028
|
-
|
|
35029
|
-
padding-
|
|
35226
|
+
--rb-section-pad-y: 2.5rem;
|
|
35227
|
+
padding-top: var(--rb-section-pad-y);
|
|
35228
|
+
padding-bottom: var(--rb-section-pad-y);
|
|
35030
35229
|
}
|
|
35031
35230
|
.rb-section-pad-medium {
|
|
35032
|
-
|
|
35033
|
-
padding-
|
|
35231
|
+
--rb-section-pad-y: 3rem;
|
|
35232
|
+
padding-top: var(--rb-section-pad-y);
|
|
35233
|
+
padding-bottom: var(--rb-section-pad-y);
|
|
35034
35234
|
}
|
|
35035
35235
|
.rb-section-pad-comfortable {
|
|
35036
|
-
|
|
35037
|
-
padding-
|
|
35236
|
+
--rb-section-pad-y: 4rem;
|
|
35237
|
+
padding-top: var(--rb-section-pad-y);
|
|
35238
|
+
padding-bottom: var(--rb-section-pad-y);
|
|
35038
35239
|
}
|
|
35039
35240
|
.rb-section-pad-spacious {
|
|
35040
|
-
|
|
35041
|
-
padding-
|
|
35241
|
+
--rb-section-pad-y: 5rem;
|
|
35242
|
+
padding-top: var(--rb-section-pad-y);
|
|
35243
|
+
padding-bottom: var(--rb-section-pad-y);
|
|
35042
35244
|
}
|
|
35043
35245
|
|
|
35044
35246
|
@container rb-site (min-width: 640px) {
|
|
35045
35247
|
|
|
35046
35248
|
@scope ([data-rb-responsive-mode="container"]) to (:scope [data-rb-responsive-mode]) {
|
|
35047
35249
|
.rb-section-pad-compact {
|
|
35048
|
-
|
|
35049
|
-
padding-bottom: 2rem;
|
|
35250
|
+
--rb-section-pad-y: 2rem;
|
|
35050
35251
|
}
|
|
35051
35252
|
.rb-section-pad-cozy {
|
|
35052
|
-
|
|
35053
|
-
padding-bottom: 3.5rem;
|
|
35253
|
+
--rb-section-pad-y: 3.5rem;
|
|
35054
35254
|
}
|
|
35055
35255
|
.rb-section-pad-medium {
|
|
35056
|
-
|
|
35057
|
-
padding-bottom: 4rem;
|
|
35256
|
+
--rb-section-pad-y: 4rem;
|
|
35058
35257
|
}
|
|
35059
35258
|
.rb-section-pad-comfortable {
|
|
35060
|
-
|
|
35061
|
-
padding-bottom: 5rem;
|
|
35259
|
+
--rb-section-pad-y: 5rem;
|
|
35062
35260
|
}
|
|
35063
35261
|
.rb-section-pad-spacious {
|
|
35064
|
-
|
|
35065
|
-
padding-bottom: 7rem;
|
|
35262
|
+
--rb-section-pad-y: 7rem;
|
|
35066
35263
|
}
|
|
35067
35264
|
}
|
|
35068
35265
|
|
|
@@ -36452,30 +36649,122 @@ const containerResponsiveThemeCss = `/*
|
|
|
36452
36649
|
:where(.theme-scope) .header-logo-text {
|
|
36453
36650
|
font-size: 1.125rem; /* matches rb-text-lg */
|
|
36454
36651
|
line-height: 1.75rem;
|
|
36652
|
+
margin-inline: -0.18em;
|
|
36653
|
+
padding-inline: 0.18em;
|
|
36455
36654
|
transition: font-size 300ms var(--motion-ease, ease);
|
|
36456
36655
|
}
|
|
36457
36656
|
|
|
36458
|
-
/*
|
|
36657
|
+
/* Centered variant uses larger title */
|
|
36658
|
+
:where(.theme-scope) .header-variant-centered .header-logo-text {
|
|
36659
|
+
font-size: 1.25rem; /* matches rb-text-xl */
|
|
36660
|
+
line-height: 1.75rem;
|
|
36661
|
+
}
|
|
36662
|
+
|
|
36663
|
+
:where(.theme-scope) .header-logo-size-compact .header-logo-text {
|
|
36664
|
+
font-size: 0.95rem;
|
|
36665
|
+
line-height: 1.5rem;
|
|
36666
|
+
}
|
|
36667
|
+
:where(.theme-scope) .header-logo-size-standard .header-logo-text {
|
|
36668
|
+
font-size: 1.125rem;
|
|
36669
|
+
line-height: 1.75rem;
|
|
36670
|
+
}
|
|
36671
|
+
:where(.theme-scope) .header-logo-size-generous .header-logo-text {
|
|
36672
|
+
font-size: 1.35rem;
|
|
36673
|
+
line-height: 1.9rem;
|
|
36674
|
+
}
|
|
36675
|
+
:where(.theme-scope) .header-logo-size-display .header-logo-text {
|
|
36676
|
+
font-size: 1.75rem;
|
|
36677
|
+
line-height: 2.25rem;
|
|
36678
|
+
}
|
|
36679
|
+
|
|
36680
|
+
:where(.theme-scope)
|
|
36681
|
+
.header-variant-centered
|
|
36682
|
+
.header-logo-size-compact
|
|
36683
|
+
.header-logo-text {
|
|
36684
|
+
font-size: 1.125rem;
|
|
36685
|
+
line-height: 1.75rem;
|
|
36686
|
+
}
|
|
36687
|
+
:where(.theme-scope)
|
|
36688
|
+
.header-variant-centered
|
|
36689
|
+
.header-logo-size-standard
|
|
36690
|
+
.header-logo-text {
|
|
36691
|
+
font-size: 1.25rem;
|
|
36692
|
+
line-height: 1.75rem;
|
|
36693
|
+
}
|
|
36694
|
+
:where(.theme-scope)
|
|
36695
|
+
.header-variant-centered
|
|
36696
|
+
.header-logo-size-generous
|
|
36697
|
+
.header-logo-text {
|
|
36698
|
+
font-size: 1.6rem;
|
|
36699
|
+
line-height: 2rem;
|
|
36700
|
+
}
|
|
36701
|
+
:where(.theme-scope)
|
|
36702
|
+
.header-variant-centered
|
|
36703
|
+
.header-logo-size-display
|
|
36704
|
+
.header-logo-text {
|
|
36705
|
+
font-size: 2.1rem;
|
|
36706
|
+
line-height: 2.5rem;
|
|
36707
|
+
}
|
|
36708
|
+
|
|
36709
|
+
/* Mobile: reduce site title size to keep header compact */
|
|
36459
36710
|
@container rb-site (max-width: 767px) {
|
|
36460
36711
|
@scope ([data-rb-responsive-mode="container"]) to (:scope [data-rb-responsive-mode]) {
|
|
36461
|
-
:where(.theme-scope) .header-logo-text
|
|
36712
|
+
:where(.theme-scope) .header-logo-text,
|
|
36713
|
+
:where(.theme-scope) .header-logo-size-standard .header-logo-text {
|
|
36462
36714
|
font-size: 0.8rem;
|
|
36463
36715
|
line-height: 1.25rem;
|
|
36464
36716
|
}
|
|
36465
36717
|
|
|
36466
|
-
:where(.theme-scope) .header-
|
|
36718
|
+
:where(.theme-scope) .header-logo-size-compact .header-logo-text {
|
|
36719
|
+
font-size: 0.75rem;
|
|
36720
|
+
line-height: 1.15rem;
|
|
36721
|
+
}
|
|
36722
|
+
|
|
36723
|
+
:where(.theme-scope) .header-logo-size-generous .header-logo-text {
|
|
36724
|
+
font-size: 1rem;
|
|
36725
|
+
line-height: 1.4rem;
|
|
36726
|
+
}
|
|
36727
|
+
|
|
36728
|
+
:where(.theme-scope) .header-logo-size-display .header-logo-text {
|
|
36729
|
+
font-size: 1.25rem;
|
|
36730
|
+
line-height: 1.65rem;
|
|
36731
|
+
}
|
|
36732
|
+
|
|
36733
|
+
:where(.theme-scope) .header-variant-centered .header-logo-text,
|
|
36734
|
+
:where(.theme-scope)
|
|
36735
|
+
.header-variant-centered
|
|
36736
|
+
.header-logo-size-standard
|
|
36737
|
+
.header-logo-text {
|
|
36467
36738
|
font-size: 0.875rem;
|
|
36468
36739
|
line-height: 1.25rem;
|
|
36469
36740
|
}
|
|
36741
|
+
|
|
36742
|
+
:where(.theme-scope)
|
|
36743
|
+
.header-variant-centered
|
|
36744
|
+
.header-logo-size-compact
|
|
36745
|
+
.header-logo-text {
|
|
36746
|
+
font-size: 0.8rem;
|
|
36747
|
+
line-height: 1.2rem;
|
|
36748
|
+
}
|
|
36749
|
+
|
|
36750
|
+
:where(.theme-scope)
|
|
36751
|
+
.header-variant-centered
|
|
36752
|
+
.header-logo-size-generous
|
|
36753
|
+
.header-logo-text {
|
|
36754
|
+
font-size: 1.125rem;
|
|
36755
|
+
line-height: 1.5rem;
|
|
36756
|
+
}
|
|
36757
|
+
|
|
36758
|
+
:where(.theme-scope)
|
|
36759
|
+
.header-variant-centered
|
|
36760
|
+
.header-logo-size-display
|
|
36761
|
+
.header-logo-text {
|
|
36762
|
+
font-size: 1.35rem;
|
|
36763
|
+
line-height: 1.75rem;
|
|
36764
|
+
}
|
|
36470
36765
|
}
|
|
36471
36766
|
}
|
|
36472
36767
|
|
|
36473
|
-
/* Centered variant uses larger title */
|
|
36474
|
-
:where(.theme-scope) .header-variant-centered .header-logo-text {
|
|
36475
|
-
font-size: 1.25rem; /* matches rb-text-xl */
|
|
36476
|
-
line-height: 1.75rem;
|
|
36477
|
-
}
|
|
36478
|
-
|
|
36479
36768
|
/* =================================================================
|
|
36480
36769
|
Shrink on Scroll - Logo & Title
|
|
36481
36770
|
================================================================= */
|
|
@@ -44165,11 +44454,31 @@ const containerResponsiveThemeCss = `/*
|
|
|
44165
44454
|
object-fit: contain;
|
|
44166
44455
|
}
|
|
44167
44456
|
|
|
44457
|
+
:where(.theme-scope) .rb-feature-card-icon-zone--generated {
|
|
44458
|
+
align-self: center;
|
|
44459
|
+
inline-size: min(var(--rb-feature-card-generated-icon-size, 75px), 100%);
|
|
44460
|
+
max-inline-size: 100%;
|
|
44461
|
+
block-size: auto;
|
|
44462
|
+
aspect-ratio: 1;
|
|
44463
|
+
margin-inline: auto;
|
|
44464
|
+
padding: 0;
|
|
44465
|
+
border: 0;
|
|
44466
|
+
border-radius: 0;
|
|
44467
|
+
background: transparent;
|
|
44468
|
+
box-shadow: none;
|
|
44469
|
+
}
|
|
44470
|
+
|
|
44168
44471
|
:where(.theme-scope) .rb-feature-card-icon-zone--plain .rb-feature-card-icon {
|
|
44169
44472
|
width: 1.5rem;
|
|
44170
44473
|
height: 1.5rem;
|
|
44171
44474
|
}
|
|
44172
44475
|
|
|
44476
|
+
:where(.theme-scope) .rb-feature-card-icon-zone--generated .rb-feature-card-icon--generated {
|
|
44477
|
+
inline-size: 100%;
|
|
44478
|
+
max-inline-size: 100%;
|
|
44479
|
+
block-size: 100%;
|
|
44480
|
+
}
|
|
44481
|
+
|
|
44173
44482
|
/* --- Card marker mode (icons / numbers / none) -----------------------------
|
|
44174
44483
|
*
|
|
44175
44484
|
* The icon zone and the number zone both sit in the DOM; the grid's
|
|
@@ -52816,7 +53125,7 @@ function asPositiveSeconds(value) {
|
|
|
52816
53125
|
if (!Number.isSafeInteger(value) || value <= 0) return err("not-positive-seconds");
|
|
52817
53126
|
return ok$1(value);
|
|
52818
53127
|
}
|
|
52819
|
-
function isRecord$
|
|
53128
|
+
function isRecord$12(value) {
|
|
52820
53129
|
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
52821
53130
|
}
|
|
52822
53131
|
function parseFileKindJson(value) {
|
|
@@ -53037,7 +53346,7 @@ function parseEntitledCustomerAccessScopeJson(value) {
|
|
|
53037
53346
|
}
|
|
53038
53347
|
}
|
|
53039
53348
|
function requireRecord(value) {
|
|
53040
|
-
if (!isRecord$
|
|
53349
|
+
if (!isRecord$12(value)) return err("expected-object");
|
|
53041
53350
|
return ok$1(value);
|
|
53042
53351
|
}
|
|
53043
53352
|
function requireString(value) {
|
|
@@ -53292,7 +53601,7 @@ const DEFAULT_MESSAGES = {
|
|
|
53292
53601
|
update: "Failed to update media asset",
|
|
53293
53602
|
delete: "Failed to delete media asset"
|
|
53294
53603
|
};
|
|
53295
|
-
function isRecord$
|
|
53604
|
+
function isRecord$11(value) {
|
|
53296
53605
|
return typeof value === "object" && value !== null;
|
|
53297
53606
|
}
|
|
53298
53607
|
const normalizeLabels = (labels) => labels !== void 0 && labels.length > 0 ? labels.map((label) => label.trim()).filter((label) => label.length > 0).join(",") : void 0;
|
|
@@ -53326,7 +53635,7 @@ const filterUpdatePayload = (input) => {
|
|
|
53326
53635
|
return payload;
|
|
53327
53636
|
};
|
|
53328
53637
|
const extractErrorMessage = (body) => {
|
|
53329
|
-
if (!isRecord$
|
|
53638
|
+
if (!isRecord$11(body)) return typeof body === "string" && body.trim().length > 0 ? body : null;
|
|
53330
53639
|
for (const key of [
|
|
53331
53640
|
"error",
|
|
53332
53641
|
"message",
|
|
@@ -53339,11 +53648,11 @@ const extractErrorMessage = (body) => {
|
|
|
53339
53648
|
const details = body.details;
|
|
53340
53649
|
if (Array.isArray(details)) for (const entry of details) {
|
|
53341
53650
|
if (typeof entry === "string" && entry.trim().length > 0) return entry;
|
|
53342
|
-
if (isRecord$
|
|
53651
|
+
if (isRecord$11(entry) && typeof entry.message === "string" && entry.message.trim().length > 0) return entry.message;
|
|
53343
53652
|
}
|
|
53344
53653
|
const errors = body.errors;
|
|
53345
53654
|
if (Array.isArray(errors)) {
|
|
53346
|
-
for (const entry of errors) if (isRecord$
|
|
53655
|
+
for (const entry of errors) if (isRecord$11(entry) && typeof entry.message === "string" && entry.message.trim().length > 0) return entry.message;
|
|
53347
53656
|
}
|
|
53348
53657
|
return null;
|
|
53349
53658
|
};
|
|
@@ -56067,6 +56376,18 @@ function blockSaveabilityEqual(left, right) {
|
|
|
56067
56376
|
}
|
|
56068
56377
|
//#endregion
|
|
56069
56378
|
//#region ../editor-blocks/src/block-editor/featureCardIconActions.ts
|
|
56379
|
+
function planGeneratedIconSetCompatibility(input) {
|
|
56380
|
+
if (input.unavailableAssetIds.length > 0) return {
|
|
56381
|
+
kind: "set_incomplete",
|
|
56382
|
+
unavailableAssetIds: input.unavailableAssetIds
|
|
56383
|
+
};
|
|
56384
|
+
if (!input.sourceCards || input.sourceFingerprintVersion !== 1) return { kind: "source_metadata_unavailable" };
|
|
56385
|
+
if (input.sourceCards.length !== input.currentCards.length || input.sourceCards.some((card, index) => card.cardKey !== input.currentCards[index]?.cardKey)) return { kind: "structural_mismatch" };
|
|
56386
|
+
return input.sourceCards.every((card, index) => {
|
|
56387
|
+
const current = input.currentCards[index];
|
|
56388
|
+
return current && card.title === current.title && card.bodyText === current.bodyText && card.semanticIconId === current.semanticIconId;
|
|
56389
|
+
}) ? { kind: "exact_match" } : { kind: "key_match_content_changed" };
|
|
56390
|
+
}
|
|
56070
56391
|
function getFeatureCards(content) {
|
|
56071
56392
|
const cards = content?.cards;
|
|
56072
56393
|
return Array.isArray(cards) ? cards : [];
|
|
@@ -56076,12 +56397,12 @@ function getFeatureCardIconStatus(content) {
|
|
|
56076
56397
|
}
|
|
56077
56398
|
function getFeatureCardIconDialogCards(content) {
|
|
56078
56399
|
return toFeatureCardIconSuggestionInputs(getFeatureCards(content)).map((card, index) => {
|
|
56079
|
-
const
|
|
56400
|
+
const semanticIconId = getBlockIconSemanticId(card.icon) ?? suggestSemanticIconForFeatureCard(card);
|
|
56080
56401
|
return {
|
|
56081
56402
|
cardKey: card.key,
|
|
56082
56403
|
title: card.title.trim().length > 0 ? card.title.trim() : `Card ${index + 1}`,
|
|
56083
56404
|
bodyText: card.bodyText.slice(0, 160),
|
|
56084
|
-
semanticIconId
|
|
56405
|
+
semanticIconId
|
|
56085
56406
|
};
|
|
56086
56407
|
});
|
|
56087
56408
|
}
|
|
@@ -56114,41 +56435,6 @@ function getFeatureCardGeneratedIconStyleSummary(content, currentStyleGuideVersi
|
|
|
56114
56435
|
invalidGeneratedCount
|
|
56115
56436
|
};
|
|
56116
56437
|
}
|
|
56117
|
-
function applyCuratedFeatureCardIconSuggestions({ blockId, content, drafts }) {
|
|
56118
|
-
const cards = getFeatureCards(content);
|
|
56119
|
-
if (cards.length === 0) return { kind: "no_cards" };
|
|
56120
|
-
const suggestions = suggestFeatureCardSemanticIcons(cards);
|
|
56121
|
-
if (suggestions.length === 0) return { kind: "complete" };
|
|
56122
|
-
const plan = applyFeatureCardIconSuggestions(cards, suggestions);
|
|
56123
|
-
switch (plan.kind) {
|
|
56124
|
-
case "applied": break;
|
|
56125
|
-
case "duplicate_card_key":
|
|
56126
|
-
case "duplicate_suggestion_card_key":
|
|
56127
|
-
case "missing_suggestion_card_key":
|
|
56128
|
-
case "unknown_card_key": return {
|
|
56129
|
-
kind: "plan_failed",
|
|
56130
|
-
reason: plan.kind,
|
|
56131
|
-
cardKey: plan.cardKey
|
|
56132
|
-
};
|
|
56133
|
-
case "invalid_semantic_icon": return {
|
|
56134
|
-
kind: "plan_failed",
|
|
56135
|
-
reason: plan.kind,
|
|
56136
|
-
iconId: plan.iconId
|
|
56137
|
-
};
|
|
56138
|
-
default: assertNever$5(plan);
|
|
56139
|
-
}
|
|
56140
|
-
for (const suggestion of plan.appliedSuggestions) {
|
|
56141
|
-
const cardIndex = cards.findIndex((card, index) => createFeatureCardIconKey(card, index) === suggestion.cardKey);
|
|
56142
|
-
if (cardIndex >= 0) drafts.setAtPath(blockId, `cards.${cardIndex}.icon`, {
|
|
56143
|
-
kind: "semantic",
|
|
56144
|
-
iconId: suggestion.iconId
|
|
56145
|
-
});
|
|
56146
|
-
}
|
|
56147
|
-
return {
|
|
56148
|
-
kind: "applied",
|
|
56149
|
-
appliedCount: plan.appliedSuggestions.length
|
|
56150
|
-
};
|
|
56151
|
-
}
|
|
56152
56438
|
function planGeneratedFeatureCardIconSetApply(cards, assets) {
|
|
56153
56439
|
const cardKeys = cards.map(createFeatureCardIconKey);
|
|
56154
56440
|
const cardKeySet = new Set(cardKeys);
|
|
@@ -56210,7 +56496,33 @@ function applyGeneratedFeatureCardIconSet({ blockId, content, drafts, assets })
|
|
|
56210
56496
|
};
|
|
56211
56497
|
}
|
|
56212
56498
|
//#endregion
|
|
56499
|
+
//#region ../editor-blocks/src/widgets/icon-picker/GeneratedIconLibraryContext.tsx
|
|
56500
|
+
const GeneratedIconLibraryContext = createContext({
|
|
56501
|
+
kind: "ready",
|
|
56502
|
+
sets: [],
|
|
56503
|
+
nextCursor: null,
|
|
56504
|
+
loadMore: null
|
|
56505
|
+
});
|
|
56506
|
+
function GeneratedIconLibraryProvider({ value, children }) {
|
|
56507
|
+
return /* @__PURE__ */ jsx(GeneratedIconLibraryContext.Provider, {
|
|
56508
|
+
value,
|
|
56509
|
+
children
|
|
56510
|
+
});
|
|
56511
|
+
}
|
|
56512
|
+
function useGeneratedIconLibrary() {
|
|
56513
|
+
return useContext(GeneratedIconLibraryContext);
|
|
56514
|
+
}
|
|
56515
|
+
//#endregion
|
|
56213
56516
|
//#region ../editor-blocks/src/block-editor/GeneratedIconSetDialog.tsx
|
|
56517
|
+
const GENERATION_FAILURE_MESSAGE = "We could not make those icons this time. Please try again in a moment.";
|
|
56518
|
+
function isTechnicalGenerationMessage(message) {
|
|
56519
|
+
return /\b(provider|request|status|validation|internal server error)\b/iu.test(message);
|
|
56520
|
+
}
|
|
56521
|
+
function friendlyGenerationFailureMessage(message) {
|
|
56522
|
+
const trimmed = message?.trim();
|
|
56523
|
+
if (!trimmed) return GENERATION_FAILURE_MESSAGE;
|
|
56524
|
+
return isTechnicalGenerationMessage(trimmed) ? GENERATION_FAILURE_MESSAGE : trimmed;
|
|
56525
|
+
}
|
|
56214
56526
|
function reducer(state, action) {
|
|
56215
56527
|
switch (action.type) {
|
|
56216
56528
|
case "reset": return { kind: "idle" };
|
|
@@ -56219,6 +56531,11 @@ function reducer(state, action) {
|
|
|
56219
56531
|
kind: "applying",
|
|
56220
56532
|
preview: action.preview
|
|
56221
56533
|
};
|
|
56534
|
+
case "apply_failed": return {
|
|
56535
|
+
kind: "apply_failed",
|
|
56536
|
+
preview: action.preview,
|
|
56537
|
+
message: action.message
|
|
56538
|
+
};
|
|
56222
56539
|
case "preview_ready": return {
|
|
56223
56540
|
kind: "preview_ready",
|
|
56224
56541
|
preview: action.preview
|
|
@@ -56230,27 +56547,27 @@ function reducer(state, action) {
|
|
|
56230
56547
|
}
|
|
56231
56548
|
}
|
|
56232
56549
|
function getGenerationErrorMessage(error) {
|
|
56233
|
-
return error instanceof Error
|
|
56550
|
+
return friendlyGenerationFailureMessage(error instanceof Error ? error.message : null);
|
|
56234
56551
|
}
|
|
56235
56552
|
function validateGeneratedIconSetPreview(preview, cards) {
|
|
56236
56553
|
const cardKeys = new Set(cards.map((card) => card.cardKey));
|
|
56237
56554
|
if (cardKeys.size !== cards.length) return {
|
|
56238
56555
|
kind: "invalid",
|
|
56239
|
-
message: "
|
|
56556
|
+
message: "The icons did not line up with this block. Please try again."
|
|
56240
56557
|
};
|
|
56241
56558
|
const assetKeys = new Set(preview.assets.map((asset) => asset.cardKey));
|
|
56242
56559
|
if (assetKeys.size !== preview.assets.length || assetKeys.size !== cardKeys.size) return {
|
|
56243
56560
|
kind: "invalid",
|
|
56244
|
-
message: "
|
|
56561
|
+
message: "The icons came back incomplete. Please try again."
|
|
56245
56562
|
};
|
|
56246
56563
|
for (const asset of preview.assets) {
|
|
56247
56564
|
if (!cardKeys.has(asset.cardKey)) return {
|
|
56248
56565
|
kind: "invalid",
|
|
56249
|
-
message: "
|
|
56566
|
+
message: "The icons came back incomplete. Please try again."
|
|
56250
56567
|
};
|
|
56251
56568
|
if (parseBlockIconValue(asset.iconValue).kind !== "generated") return {
|
|
56252
56569
|
kind: "invalid",
|
|
56253
|
-
message: "
|
|
56570
|
+
message: "The icons did not line up with this block. Please try again."
|
|
56254
56571
|
};
|
|
56255
56572
|
}
|
|
56256
56573
|
return {
|
|
@@ -56258,12 +56575,43 @@ function validateGeneratedIconSetPreview(preview, cards) {
|
|
|
56258
56575
|
preview
|
|
56259
56576
|
};
|
|
56260
56577
|
}
|
|
56578
|
+
function librarySetToPreview(set, cards) {
|
|
56579
|
+
const assets = set.assets.map((asset) => {
|
|
56580
|
+
const iconValue = parseBlockIconValue(asset.iconValue);
|
|
56581
|
+
if (iconValue.kind !== "generated") return null;
|
|
56582
|
+
const card = cards.find((candidate) => candidate.cardKey === asset.cardKey);
|
|
56583
|
+
return {
|
|
56584
|
+
cardKey: asset.cardKey,
|
|
56585
|
+
title: card?.title ?? asset.subjectLabel,
|
|
56586
|
+
src: asset.renderAsset?.src ?? "",
|
|
56587
|
+
iconValue,
|
|
56588
|
+
renderAsset: asset.renderAsset
|
|
56589
|
+
};
|
|
56590
|
+
});
|
|
56591
|
+
if (assets.some((asset) => asset === null)) return {
|
|
56592
|
+
kind: "invalid",
|
|
56593
|
+
message: "This icon set is no longer available."
|
|
56594
|
+
};
|
|
56595
|
+
return validateGeneratedIconSetPreview({
|
|
56596
|
+
setId: set.setId,
|
|
56597
|
+
styleGuideSummary: set.styleFreshness.kind === "current" ? "Made with your current icon style" : "Made with an older icon style",
|
|
56598
|
+
assets: assets.filter((asset) => asset !== null)
|
|
56599
|
+
}, cards);
|
|
56600
|
+
}
|
|
56601
|
+
function formatGeneratedAt(value) {
|
|
56602
|
+
const date = new Date(value);
|
|
56603
|
+
return Number.isNaN(date.valueOf()) ? "Previously generated" : new Intl.DateTimeFormat(void 0, { dateStyle: "medium" }).format(date);
|
|
56604
|
+
}
|
|
56261
56605
|
function GeneratedIconSetDialog({ open, onOpenChange, cards, styleGuideSummary, styleGuideEditHref, onGenerate, onApply }) {
|
|
56262
56606
|
const [state, dispatch] = useReducer(reducer, { kind: "idle" });
|
|
56263
56607
|
const [styleNote, setStyleNote] = useState("");
|
|
56608
|
+
const [view, setView] = useState("create");
|
|
56264
56609
|
const activeGenerationRef = useRef(null);
|
|
56265
|
-
const
|
|
56266
|
-
const
|
|
56610
|
+
const library = useGeneratedIconLibrary();
|
|
56611
|
+
const recentSets = library.sets.filter((set) => set.blockKind === "block.feature-cards");
|
|
56612
|
+
const canGenerate = Boolean(onGenerate) && cards.length > 0 && state.kind !== "generating" && state.kind !== "applying";
|
|
56613
|
+
const canApply = Boolean(onApply) && (state.kind === "preview_ready" || state.kind === "apply_failed");
|
|
56614
|
+
const activePreview = state.kind === "preview_ready" || state.kind === "applying" || state.kind === "apply_failed" ? state.preview : null;
|
|
56267
56615
|
function abortActiveGeneration() {
|
|
56268
56616
|
activeGenerationRef.current?.abort();
|
|
56269
56617
|
activeGenerationRef.current = null;
|
|
@@ -56302,7 +56650,7 @@ function GeneratedIconSetDialog({ open, onOpenChange, cards, styleGuideSummary,
|
|
|
56302
56650
|
}
|
|
56303
56651
|
dispatch({
|
|
56304
56652
|
type: "failed",
|
|
56305
|
-
message: result.message
|
|
56653
|
+
message: friendlyGenerationFailureMessage(result.message)
|
|
56306
56654
|
});
|
|
56307
56655
|
} catch (error) {
|
|
56308
56656
|
if (activeGenerationRef.current !== generation || generation.signal.aborted) return;
|
|
@@ -56317,7 +56665,10 @@ function GeneratedIconSetDialog({ open, onOpenChange, cards, styleGuideSummary,
|
|
|
56317
56665
|
function close(nextOpen) {
|
|
56318
56666
|
if (!nextOpen) abortActiveGeneration();
|
|
56319
56667
|
onOpenChange(nextOpen);
|
|
56320
|
-
if (!nextOpen)
|
|
56668
|
+
if (!nextOpen) {
|
|
56669
|
+
dispatch({ type: "reset" });
|
|
56670
|
+
setView("create");
|
|
56671
|
+
}
|
|
56321
56672
|
}
|
|
56322
56673
|
async function apply(preview) {
|
|
56323
56674
|
if (!onApply) return;
|
|
@@ -56329,7 +56680,8 @@ function GeneratedIconSetDialog({ open, onOpenChange, cards, styleGuideSummary,
|
|
|
56329
56680
|
const result = await onApply(preview);
|
|
56330
56681
|
if (result?.kind === "failed") {
|
|
56331
56682
|
dispatch({
|
|
56332
|
-
type: "
|
|
56683
|
+
type: "apply_failed",
|
|
56684
|
+
preview,
|
|
56333
56685
|
message: result.message
|
|
56334
56686
|
});
|
|
56335
56687
|
return;
|
|
@@ -56337,7 +56689,8 @@ function GeneratedIconSetDialog({ open, onOpenChange, cards, styleGuideSummary,
|
|
|
56337
56689
|
close(false);
|
|
56338
56690
|
} catch (error) {
|
|
56339
56691
|
dispatch({
|
|
56340
|
-
type: "
|
|
56692
|
+
type: "apply_failed",
|
|
56693
|
+
preview,
|
|
56341
56694
|
message: getGenerationErrorMessage(error)
|
|
56342
56695
|
});
|
|
56343
56696
|
}
|
|
@@ -56348,67 +56701,219 @@ function GeneratedIconSetDialog({ open, onOpenChange, cards, styleGuideSummary,
|
|
|
56348
56701
|
children: /* @__PURE__ */ jsxs(DialogContent, {
|
|
56349
56702
|
className: "sm:max-w-2xl",
|
|
56350
56703
|
children: [
|
|
56351
|
-
/* @__PURE__ */ jsxs(DialogHeader, { children: [/* @__PURE__ */ jsx(DialogTitle, { children: "
|
|
56704
|
+
/* @__PURE__ */ jsxs(DialogHeader, { children: [/* @__PURE__ */ jsx(DialogTitle, { children: "Choose icon set" }), /* @__PURE__ */ jsx(DialogDescription, { children: activePreview ? activePreview.styleGuideSummary : `${cards.length} cards` })] }),
|
|
56352
56705
|
/* @__PURE__ */ jsxs("div", {
|
|
56353
56706
|
className: "space-y-4",
|
|
56354
56707
|
children: [
|
|
56355
|
-
|
|
56356
|
-
className: "rounded-md
|
|
56357
|
-
|
|
56358
|
-
|
|
56359
|
-
|
|
56360
|
-
|
|
56361
|
-
|
|
56362
|
-
|
|
56363
|
-
children:
|
|
56364
|
-
|
|
56365
|
-
|
|
56366
|
-
|
|
56367
|
-
|
|
56368
|
-
|
|
56369
|
-
|
|
56370
|
-
|
|
56371
|
-
|
|
56372
|
-
|
|
56373
|
-
|
|
56374
|
-
|
|
56375
|
-
|
|
56376
|
-
|
|
56377
|
-
placeholder: "Simple, soft-edged, lightly textured"
|
|
56708
|
+
/* @__PURE__ */ jsxs("div", {
|
|
56709
|
+
className: "grid grid-cols-2 rounded-md bg-muted p-1",
|
|
56710
|
+
"aria-label": "Icon set source",
|
|
56711
|
+
children: [/* @__PURE__ */ jsxs(Button, {
|
|
56712
|
+
type: "button",
|
|
56713
|
+
size: "sm",
|
|
56714
|
+
variant: view === "create" ? "secondary" : "ghost",
|
|
56715
|
+
onClick: () => setView("create"),
|
|
56716
|
+
children: [/* @__PURE__ */ jsx(Sparkles, {
|
|
56717
|
+
className: "mr-2 h-4 w-4",
|
|
56718
|
+
"aria-hidden": "true"
|
|
56719
|
+
}), "Make new"]
|
|
56720
|
+
}), /* @__PURE__ */ jsxs(Button, {
|
|
56721
|
+
type: "button",
|
|
56722
|
+
size: "sm",
|
|
56723
|
+
variant: view === "recent" ? "secondary" : "ghost",
|
|
56724
|
+
onClick: () => setView("recent"),
|
|
56725
|
+
children: [/* @__PURE__ */ jsx(Clock3, {
|
|
56726
|
+
className: "mr-2 h-4 w-4",
|
|
56727
|
+
"aria-hidden": "true"
|
|
56728
|
+
}), "Previously generated"]
|
|
56729
|
+
})]
|
|
56378
56730
|
}),
|
|
56379
|
-
state.kind === "failed" ? /* @__PURE__ */ jsx("p", {
|
|
56731
|
+
state.kind === "failed" || state.kind === "apply_failed" ? /* @__PURE__ */ jsx("p", {
|
|
56380
56732
|
role: "alert",
|
|
56381
56733
|
className: "text-sm text-destructive",
|
|
56382
56734
|
children: state.message
|
|
56383
56735
|
}) : null,
|
|
56384
|
-
/* @__PURE__ */
|
|
56385
|
-
|
|
56386
|
-
|
|
56387
|
-
|
|
56388
|
-
|
|
56389
|
-
|
|
56390
|
-
|
|
56391
|
-
|
|
56392
|
-
|
|
56393
|
-
|
|
56394
|
-
|
|
56395
|
-
|
|
56396
|
-
|
|
56397
|
-
|
|
56398
|
-
|
|
56399
|
-
|
|
56400
|
-
|
|
56401
|
-
|
|
56402
|
-
|
|
56403
|
-
|
|
56404
|
-
|
|
56405
|
-
|
|
56406
|
-
|
|
56407
|
-
|
|
56408
|
-
|
|
56409
|
-
|
|
56410
|
-
|
|
56736
|
+
view === "create" ? /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
56737
|
+
styleGuideSummary || styleGuideEditHref ? /* @__PURE__ */ jsxs("div", {
|
|
56738
|
+
className: "rounded-md border bg-muted/20 px-3 py-2 text-sm",
|
|
56739
|
+
children: [styleGuideSummary ? /* @__PURE__ */ jsx("p", {
|
|
56740
|
+
className: "text-muted-foreground",
|
|
56741
|
+
children: styleGuideSummary
|
|
56742
|
+
}) : null, styleGuideEditHref ? /* @__PURE__ */ jsx("a", {
|
|
56743
|
+
href: styleGuideEditHref,
|
|
56744
|
+
className: "mt-1 inline-flex text-sm font-medium text-primary underline-offset-4 hover:underline",
|
|
56745
|
+
children: "Edit icon style"
|
|
56746
|
+
}) : null]
|
|
56747
|
+
}) : null,
|
|
56748
|
+
/* @__PURE__ */ jsx("label", {
|
|
56749
|
+
className: "block text-sm font-medium",
|
|
56750
|
+
htmlFor: "generated-icon-style-note",
|
|
56751
|
+
children: "Icon style"
|
|
56752
|
+
}),
|
|
56753
|
+
/* @__PURE__ */ jsx(Textarea, {
|
|
56754
|
+
id: "generated-icon-style-note",
|
|
56755
|
+
value: styleNote,
|
|
56756
|
+
maxLength: 240,
|
|
56757
|
+
disabled: state.kind === "generating",
|
|
56758
|
+
onChange: (event) => setStyleNote(event.currentTarget.value),
|
|
56759
|
+
placeholder: "Simple, soft-edged, lightly textured"
|
|
56760
|
+
}),
|
|
56761
|
+
activePreview ? /* @__PURE__ */ jsx("p", {
|
|
56762
|
+
className: "rounded-md bg-emerald-50 px-3 py-2 text-sm text-emerald-800",
|
|
56763
|
+
children: "Saved to your icon library. Apply the set when you’re ready to use it on these cards."
|
|
56764
|
+
}) : null,
|
|
56765
|
+
/* @__PURE__ */ jsx("div", {
|
|
56766
|
+
className: "grid gap-2 sm:grid-cols-2",
|
|
56767
|
+
children: cards.map((card) => {
|
|
56768
|
+
const previewAsset = activePreview ? activePreview.assets.find((asset) => asset.cardKey === card.cardKey) : null;
|
|
56769
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
56770
|
+
className: "grid min-h-24 grid-cols-[3rem_1fr] gap-3 rounded-md border bg-muted/20 p-3",
|
|
56771
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
56772
|
+
className: "flex size-12 items-center justify-center rounded-md border bg-background",
|
|
56773
|
+
children: previewAsset?.src ? /* @__PURE__ */ jsx("img", {
|
|
56774
|
+
src: previewAsset.src,
|
|
56775
|
+
alt: "",
|
|
56776
|
+
className: "size-10 object-contain"
|
|
56777
|
+
}) : /* @__PURE__ */ jsx(ImagePlus, {
|
|
56778
|
+
className: "size-5 text-muted-foreground",
|
|
56779
|
+
"aria-hidden": "true"
|
|
56780
|
+
})
|
|
56781
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
56782
|
+
className: "min-w-0",
|
|
56783
|
+
children: [/* @__PURE__ */ jsx("p", {
|
|
56784
|
+
className: "truncate text-sm font-medium",
|
|
56785
|
+
children: card.title
|
|
56786
|
+
}), card.bodyText ? /* @__PURE__ */ jsx("p", {
|
|
56787
|
+
className: "overflow-hidden text-ellipsis text-xs text-muted-foreground",
|
|
56788
|
+
children: card.bodyText
|
|
56789
|
+
}) : null]
|
|
56790
|
+
})]
|
|
56791
|
+
}, card.cardKey);
|
|
56792
|
+
})
|
|
56411
56793
|
})
|
|
56794
|
+
] }) : /* @__PURE__ */ jsxs("div", {
|
|
56795
|
+
className: "max-h-[28rem] space-y-3 overflow-y-auto pr-1",
|
|
56796
|
+
children: [
|
|
56797
|
+
library.kind === "loading" ? /* @__PURE__ */ jsx("p", {
|
|
56798
|
+
className: "py-8 text-center text-sm text-muted-foreground",
|
|
56799
|
+
children: "Loading your icons…"
|
|
56800
|
+
}) : library.kind === "failed" && library.sets.length === 0 ? /* @__PURE__ */ jsx("p", {
|
|
56801
|
+
role: "alert",
|
|
56802
|
+
className: "py-8 text-center text-sm text-destructive",
|
|
56803
|
+
children: library.message
|
|
56804
|
+
}) : recentSets.length === 0 ? /* @__PURE__ */ jsxs("div", {
|
|
56805
|
+
className: "rounded-md border border-dashed px-4 py-8 text-center",
|
|
56806
|
+
children: [/* @__PURE__ */ jsx("p", {
|
|
56807
|
+
className: "text-sm font-medium",
|
|
56808
|
+
children: "No generated icon sets yet"
|
|
56809
|
+
}), /* @__PURE__ */ jsx("p", {
|
|
56810
|
+
className: "mt-1 text-sm text-muted-foreground",
|
|
56811
|
+
children: "Make a set and it will stay here for reuse."
|
|
56812
|
+
})]
|
|
56813
|
+
}) : recentSets.map((set) => {
|
|
56814
|
+
const preview = librarySetToPreview(set, cards);
|
|
56815
|
+
const unavailableAssetIds = set.assets.flatMap((asset) => {
|
|
56816
|
+
if (asset.availability === "available") return [];
|
|
56817
|
+
const iconValue = parseBlockIconValue(asset.iconValue);
|
|
56818
|
+
return iconValue.kind === "generated" ? [iconValue.assetId] : [];
|
|
56819
|
+
});
|
|
56820
|
+
const compatibility = planGeneratedIconSetCompatibility({
|
|
56821
|
+
sourceFingerprintVersion: set.sourceFingerprintVersion,
|
|
56822
|
+
sourceCards: set.sourceCards,
|
|
56823
|
+
currentCards: cards,
|
|
56824
|
+
unavailableAssetIds
|
|
56825
|
+
});
|
|
56826
|
+
const canApplyWholeSet = compatibility.kind === "exact_match" || compatibility.kind === "key_match_content_changed";
|
|
56827
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
56828
|
+
className: "rounded-md border p-3",
|
|
56829
|
+
children: [
|
|
56830
|
+
/* @__PURE__ */ jsxs("div", {
|
|
56831
|
+
className: "flex items-start justify-between gap-3",
|
|
56832
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
56833
|
+
className: "min-w-0",
|
|
56834
|
+
children: [
|
|
56835
|
+
/* @__PURE__ */ jsx("p", {
|
|
56836
|
+
className: "truncate text-sm font-medium",
|
|
56837
|
+
children: set.blockLabel
|
|
56838
|
+
}),
|
|
56839
|
+
/* @__PURE__ */ jsxs("p", {
|
|
56840
|
+
className: "text-xs text-muted-foreground",
|
|
56841
|
+
children: [
|
|
56842
|
+
formatGeneratedAt(set.createdAt),
|
|
56843
|
+
" · ",
|
|
56844
|
+
set.assets.length,
|
|
56845
|
+
" icons"
|
|
56846
|
+
]
|
|
56847
|
+
}),
|
|
56848
|
+
set.userStyleNote ? /* @__PURE__ */ jsx("p", {
|
|
56849
|
+
className: "mt-1 truncate text-xs text-muted-foreground",
|
|
56850
|
+
children: set.userStyleNote
|
|
56851
|
+
}) : null
|
|
56852
|
+
]
|
|
56853
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
56854
|
+
className: "flex shrink-0 items-center gap-2",
|
|
56855
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
56856
|
+
className: `rounded-full px-2 py-0.5 text-[11px] font-medium ${set.styleFreshness.kind === "current" ? "bg-emerald-100 text-emerald-800" : "bg-amber-100 text-amber-800"}`,
|
|
56857
|
+
children: set.styleFreshness.kind === "current" ? "Current style" : "Older style"
|
|
56858
|
+
}), /* @__PURE__ */ jsx(Button, {
|
|
56859
|
+
type: "button",
|
|
56860
|
+
size: "sm",
|
|
56861
|
+
disabled: preview.kind === "invalid" || !canApplyWholeSet || state.kind === "applying",
|
|
56862
|
+
onClick: () => {
|
|
56863
|
+
if (preview.kind === "valid") apply(preview.preview);
|
|
56864
|
+
},
|
|
56865
|
+
children: compatibility.kind === "key_match_content_changed" ? "Use anyway" : "Use set"
|
|
56866
|
+
})]
|
|
56867
|
+
})]
|
|
56868
|
+
}),
|
|
56869
|
+
/* @__PURE__ */ jsx("div", {
|
|
56870
|
+
className: "mt-3 flex gap-2 overflow-hidden",
|
|
56871
|
+
children: set.assets.slice(0, 6).map((asset) => /* @__PURE__ */ jsx("div", {
|
|
56872
|
+
className: "flex size-12 shrink-0 items-center justify-center rounded-md border bg-muted/20",
|
|
56873
|
+
children: asset.availability === "available" ? /* @__PURE__ */ jsx("img", {
|
|
56874
|
+
src: asset.renderAsset.src,
|
|
56875
|
+
alt: "",
|
|
56876
|
+
className: "size-10 object-contain"
|
|
56877
|
+
}) : /* @__PURE__ */ jsx("span", {
|
|
56878
|
+
title: "Generated icon unavailable",
|
|
56879
|
+
"aria-label": "Generated icon unavailable",
|
|
56880
|
+
children: /* @__PURE__ */ jsx(ImageOff, {
|
|
56881
|
+
className: "size-5 text-destructive",
|
|
56882
|
+
"aria-hidden": "true"
|
|
56883
|
+
})
|
|
56884
|
+
})
|
|
56885
|
+
}, asset.iconValue.kind === "generated" ? asset.iconValue.assetId : asset.cardKey))
|
|
56886
|
+
}),
|
|
56887
|
+
compatibility.kind === "set_incomplete" ? /* @__PURE__ */ jsx("p", {
|
|
56888
|
+
className: "mt-2 text-xs text-destructive",
|
|
56889
|
+
children: "One or more image files are unavailable, so this set can’t be applied as a whole. Available icons remain in each icon picker."
|
|
56890
|
+
}) : preview.kind === "invalid" || !canApplyWholeSet ? /* @__PURE__ */ jsx("p", {
|
|
56891
|
+
className: "mt-2 text-xs text-muted-foreground",
|
|
56892
|
+
children: "This set was made for different cards and can’t be applied as a whole. Individual icons remain available in each icon picker."
|
|
56893
|
+
}) : compatibility.kind === "key_match_content_changed" ? /* @__PURE__ */ jsx("p", {
|
|
56894
|
+
className: "mt-2 text-xs text-amber-700",
|
|
56895
|
+
children: "Your card wording has changed since this set was made. Check the thumbnails before using it."
|
|
56896
|
+
}) : set.styleFreshness.kind === "older_style" ? /* @__PURE__ */ jsx("p", {
|
|
56897
|
+
className: "mt-2 text-xs text-amber-700",
|
|
56898
|
+
children: "Made with an older icon style."
|
|
56899
|
+
}) : null
|
|
56900
|
+
]
|
|
56901
|
+
}, set.setId);
|
|
56902
|
+
}),
|
|
56903
|
+
library.kind === "failed" && library.sets.length > 0 ? /* @__PURE__ */ jsx("p", {
|
|
56904
|
+
role: "alert",
|
|
56905
|
+
className: "text-center text-sm text-destructive",
|
|
56906
|
+
children: library.message
|
|
56907
|
+
}) : null,
|
|
56908
|
+
library.loadMore ? /* @__PURE__ */ jsx(Button, {
|
|
56909
|
+
type: "button",
|
|
56910
|
+
variant: "outline",
|
|
56911
|
+
className: "w-full",
|
|
56912
|
+
disabled: library.kind === "loading_more",
|
|
56913
|
+
onClick: library.loadMore,
|
|
56914
|
+
children: library.kind === "loading_more" ? "Loading more…" : "Load more sets"
|
|
56915
|
+
}) : null
|
|
56916
|
+
]
|
|
56412
56917
|
})
|
|
56413
56918
|
]
|
|
56414
56919
|
}),
|
|
@@ -56419,63 +56924,134 @@ function GeneratedIconSetDialog({ open, onOpenChange, cards, styleGuideSummary,
|
|
|
56419
56924
|
onClick: () => close(false),
|
|
56420
56925
|
children: "Cancel"
|
|
56421
56926
|
}),
|
|
56422
|
-
/* @__PURE__ */ jsxs(Button, {
|
|
56927
|
+
view === "create" ? /* @__PURE__ */ jsxs(Button, {
|
|
56423
56928
|
type: "button",
|
|
56424
56929
|
variant: "outline",
|
|
56425
56930
|
disabled: !canGenerate,
|
|
56426
56931
|
onClick: () => {
|
|
56427
56932
|
generate();
|
|
56428
56933
|
},
|
|
56429
|
-
children: [
|
|
56934
|
+
children: [activePreview ? /* @__PURE__ */ jsx(RotateCcw, {
|
|
56430
56935
|
className: "mr-2 h-4 w-4",
|
|
56431
56936
|
"aria-hidden": "true"
|
|
56432
56937
|
}) : /* @__PURE__ */ jsx(Sparkles, {
|
|
56433
56938
|
className: "mr-2 h-4 w-4",
|
|
56434
56939
|
"aria-hidden": "true"
|
|
56435
|
-
}),
|
|
56436
|
-
}),
|
|
56437
|
-
/* @__PURE__ */ jsx(Button, {
|
|
56940
|
+
}), activePreview ? "Regenerate" : state.kind === "generating" ? "Generating" : "Generate"]
|
|
56941
|
+
}) : null,
|
|
56942
|
+
view === "create" ? /* @__PURE__ */ jsx(Button, {
|
|
56438
56943
|
type: "button",
|
|
56439
56944
|
disabled: !canApply,
|
|
56440
56945
|
onClick: () => {
|
|
56441
|
-
if (state.kind !== "preview_ready" || !onApply) return;
|
|
56946
|
+
if (state.kind !== "preview_ready" && state.kind !== "apply_failed" || !onApply) return;
|
|
56442
56947
|
apply(state.preview);
|
|
56443
56948
|
},
|
|
56444
56949
|
children: state.kind === "applying" ? "Applying" : "Apply set"
|
|
56445
|
-
})
|
|
56950
|
+
}) : null
|
|
56446
56951
|
] })
|
|
56447
56952
|
]
|
|
56448
56953
|
})
|
|
56449
56954
|
});
|
|
56450
56955
|
}
|
|
56451
56956
|
//#endregion
|
|
56957
|
+
//#region ../editor-blocks/src/block-editor/generatedIconApplyCoordination.ts
|
|
56958
|
+
const GENERATED_ICON_AUTOSAVE_TIMEOUT_MS = 15e3;
|
|
56959
|
+
async function saveBlocksNow(uiStore) {
|
|
56960
|
+
const before = uiStore.getState().autosave.blocks;
|
|
56961
|
+
uiStore.getState().autosave.saveNow(["blocks"]);
|
|
56962
|
+
if (!before) return true;
|
|
56963
|
+
return new Promise((resolve) => {
|
|
56964
|
+
let waitState = { kind: "waiting_for_start" };
|
|
56965
|
+
let settled = false;
|
|
56966
|
+
let unsubscribe = () => {};
|
|
56967
|
+
let timeout = null;
|
|
56968
|
+
const finish = (saved) => {
|
|
56969
|
+
if (settled) return;
|
|
56970
|
+
settled = true;
|
|
56971
|
+
if (timeout) clearTimeout(timeout);
|
|
56972
|
+
unsubscribe();
|
|
56973
|
+
resolve(saved);
|
|
56974
|
+
};
|
|
56975
|
+
const evaluate = () => {
|
|
56976
|
+
const status = uiStore.getState().autosave.blocks;
|
|
56977
|
+
if (!status) return finish(true);
|
|
56978
|
+
if (status.status === "saving") {
|
|
56979
|
+
waitState = { kind: "saving_seen" };
|
|
56980
|
+
return;
|
|
56981
|
+
}
|
|
56982
|
+
if (status.status === "success") {
|
|
56983
|
+
if (waitState.kind === "saving_seen" || status.lastSavedAt !== before.lastSavedAt) finish(true);
|
|
56984
|
+
return;
|
|
56985
|
+
}
|
|
56986
|
+
if (status.status === "error") {
|
|
56987
|
+
if (waitState.kind === "saving_seen" || before.status !== "error" || status.lastSavedAt !== before.lastSavedAt) finish(false);
|
|
56988
|
+
}
|
|
56989
|
+
};
|
|
56990
|
+
unsubscribe = uiStore.subscribe(evaluate);
|
|
56991
|
+
evaluate();
|
|
56992
|
+
if (!settled) timeout = setTimeout(() => finish(false), GENERATED_ICON_AUTOSAVE_TIMEOUT_MS);
|
|
56993
|
+
});
|
|
56994
|
+
}
|
|
56995
|
+
function parseRenderAssets(preview) {
|
|
56996
|
+
const assets = [];
|
|
56997
|
+
for (const asset of preview.assets) {
|
|
56998
|
+
if (!asset.renderAsset) return null;
|
|
56999
|
+
const setId = parseGeneratedIconSetId(asset.renderAsset.setId);
|
|
57000
|
+
const assetId = parseGeneratedIconAssetId(asset.renderAsset.assetId);
|
|
57001
|
+
if (!setId || !assetId || setId !== asset.iconValue.setId || assetId !== asset.iconValue.assetId) return null;
|
|
57002
|
+
assets.push({
|
|
57003
|
+
setId,
|
|
57004
|
+
assetId,
|
|
57005
|
+
src: asset.renderAsset.src,
|
|
57006
|
+
...asset.renderAsset.width === void 0 ? {} : { width: asset.renderAsset.width },
|
|
57007
|
+
...asset.renderAsset.height === void 0 ? {} : { height: asset.renderAsset.height }
|
|
57008
|
+
});
|
|
57009
|
+
}
|
|
57010
|
+
return assets;
|
|
57011
|
+
}
|
|
57012
|
+
async function applyGeneratedIconSetToEditor({ blockId, content, preview, uiStore }) {
|
|
57013
|
+
const renderAssets = parseRenderAssets(preview);
|
|
57014
|
+
if (!renderAssets) return {
|
|
57015
|
+
kind: "invalid_render_asset",
|
|
57016
|
+
cardKey: preview.assets.find((asset) => !asset.renderAsset)?.cardKey ?? "unknown"
|
|
57017
|
+
};
|
|
57018
|
+
const result = applyGeneratedFeatureCardIconSet({
|
|
57019
|
+
blockId,
|
|
57020
|
+
content,
|
|
57021
|
+
drafts: uiStore.getState().drafts,
|
|
57022
|
+
assets: preview.assets
|
|
57023
|
+
});
|
|
57024
|
+
if (result.kind !== "applied") return result;
|
|
57025
|
+
uiStore.getState().generatedIconAssets.setForBlock(blockId, renderAssets);
|
|
57026
|
+
return await saveBlocksNow(uiStore) ? result : { kind: "autosave_failed" };
|
|
57027
|
+
}
|
|
57028
|
+
//#endregion
|
|
56452
57029
|
//#region ../editor-blocks/src/block-editor/FeatureCardIconsPanel.tsx
|
|
56453
57030
|
function supportsFeatureCardIconActions(blockKind) {
|
|
56454
57031
|
return blockKind === "block.feature-cards";
|
|
56455
57032
|
}
|
|
56456
|
-
function FeatureCardIconsPanel({ block, uiStore, currentStyleGuideVersionId, iconStyleGuideSummary, iconStyleGuideEditHref, onGenerateIconSet
|
|
57033
|
+
function FeatureCardIconsPanel({ block, uiStore, currentStyleGuideVersionId, iconStyleGuideSummary, iconStyleGuideEditHref, onGenerateIconSet }) {
|
|
56457
57034
|
const [generateDialogOpen, setGenerateDialogOpen] = useState(false);
|
|
56458
57035
|
const blockId = typeof block.id === "string" ? unsafeAsEditorBlockId(block.id) : null;
|
|
56459
57036
|
const content = useStoreSelector(uiStore, (state) => blockId ? state.drafts.getCurrentValues(blockId) : null) ?? block.draftContent ?? block.content ?? null;
|
|
56460
57037
|
const status = useMemo(() => getFeatureCardIconStatus(content), [content]);
|
|
56461
57038
|
const dialogCards = useMemo(() => getFeatureCardIconDialogCards(content), [content]);
|
|
56462
57039
|
const styleSummary = useMemo(() => getFeatureCardGeneratedIconStyleSummary(content, currentStyleGuideVersionId), [content, currentStyleGuideVersionId]);
|
|
56463
|
-
const isComplete = status.totalCards > 0 && status.cardsWithIcons >= status.totalCards;
|
|
56464
57040
|
const hasStaleGeneratedIcons = styleSummary.kind === "available" && styleSummary.staleCount > 0;
|
|
56465
57041
|
async function applyGeneratedIconSetPreview(preview) {
|
|
56466
57042
|
if (!blockId) return {
|
|
56467
57043
|
kind: "failed",
|
|
56468
57044
|
message: "Could not apply generated icon set"
|
|
56469
57045
|
};
|
|
56470
|
-
const
|
|
56471
|
-
if (applyGeneratedFeatureCardIconSet({
|
|
57046
|
+
const result = await applyGeneratedIconSetToEditor({
|
|
56472
57047
|
blockId,
|
|
56473
57048
|
content,
|
|
56474
|
-
|
|
56475
|
-
|
|
56476
|
-
})
|
|
57049
|
+
preview,
|
|
57050
|
+
uiStore
|
|
57051
|
+
});
|
|
57052
|
+
if (result.kind !== "applied") return {
|
|
56477
57053
|
kind: "failed",
|
|
56478
|
-
message: "Could not apply generated icon set"
|
|
57054
|
+
message: result.kind === "autosave_failed" ? "The icons are ready, but we couldn’t save this page. Please try again." : "Could not apply generated icon set"
|
|
56479
57055
|
};
|
|
56480
57056
|
return { kind: "applied" };
|
|
56481
57057
|
}
|
|
@@ -56486,51 +57062,31 @@ function FeatureCardIconsPanel({ block, uiStore, currentStyleGuideVersionId, ico
|
|
|
56486
57062
|
"data-testid": "feature-card-icons-panel",
|
|
56487
57063
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
56488
57064
|
className: "flex flex-wrap items-center gap-2",
|
|
56489
|
-
children: [
|
|
56490
|
-
|
|
56491
|
-
|
|
56492
|
-
|
|
56493
|
-
|
|
56494
|
-
|
|
56495
|
-
|
|
56496
|
-
|
|
56497
|
-
|
|
56498
|
-
|
|
56499
|
-
|
|
56500
|
-
|
|
56501
|
-
|
|
56502
|
-
|
|
56503
|
-
|
|
56504
|
-
|
|
56505
|
-
|
|
56506
|
-
|
|
56507
|
-
|
|
56508
|
-
|
|
56509
|
-
|
|
56510
|
-
|
|
56511
|
-
|
|
56512
|
-
|
|
56513
|
-
|
|
56514
|
-
drafts: uiStore.getState().drafts
|
|
56515
|
-
});
|
|
56516
|
-
},
|
|
56517
|
-
children: [/* @__PURE__ */ jsx(Sparkles, {
|
|
56518
|
-
className: "mr-2 h-4 w-4",
|
|
56519
|
-
"aria-hidden": "true"
|
|
56520
|
-
}), "Suggest icons"]
|
|
56521
|
-
}),
|
|
56522
|
-
/* @__PURE__ */ jsxs(Button, {
|
|
56523
|
-
type: "button",
|
|
56524
|
-
variant: "outline",
|
|
56525
|
-
size: "sm",
|
|
56526
|
-
disabled: status.totalCards === 0,
|
|
56527
|
-
onClick: () => setGenerateDialogOpen(true),
|
|
56528
|
-
children: [/* @__PURE__ */ jsx(ImagePlus, {
|
|
56529
|
-
className: "mr-2 h-4 w-4",
|
|
56530
|
-
"aria-hidden": "true"
|
|
56531
|
-
}), "Generate icon set"]
|
|
56532
|
-
})
|
|
56533
|
-
]
|
|
57065
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
57066
|
+
className: "min-w-0 flex-1",
|
|
57067
|
+
children: [/* @__PURE__ */ jsx("h3", {
|
|
57068
|
+
className: "text-sm font-medium",
|
|
57069
|
+
children: "Icons"
|
|
57070
|
+
}), /* @__PURE__ */ jsxs("p", {
|
|
57071
|
+
className: "text-xs text-muted-foreground",
|
|
57072
|
+
children: [
|
|
57073
|
+
status.cardsWithIcons,
|
|
57074
|
+
" of ",
|
|
57075
|
+
status.totalCards,
|
|
57076
|
+
" cards"
|
|
57077
|
+
]
|
|
57078
|
+
})]
|
|
57079
|
+
}), /* @__PURE__ */ jsxs(Button, {
|
|
57080
|
+
type: "button",
|
|
57081
|
+
variant: "outline",
|
|
57082
|
+
size: "sm",
|
|
57083
|
+
disabled: status.totalCards === 0,
|
|
57084
|
+
onClick: () => setGenerateDialogOpen(true),
|
|
57085
|
+
children: [/* @__PURE__ */ jsx(ImagePlus, {
|
|
57086
|
+
className: "mr-2 h-4 w-4",
|
|
57087
|
+
"aria-hidden": "true"
|
|
57088
|
+
}), "Generate icon set"]
|
|
57089
|
+
})]
|
|
56534
57090
|
}), hasStaleGeneratedIcons ? /* @__PURE__ */ jsxs(Callout, {
|
|
56535
57091
|
tone: "warning",
|
|
56536
57092
|
className: "mt-3 flex flex-wrap items-center gap-2",
|
|
@@ -56561,7 +57117,7 @@ function FeatureCardIconsPanel({ block, uiStore, currentStyleGuideVersionId, ico
|
|
|
56561
57117
|
}
|
|
56562
57118
|
//#endregion
|
|
56563
57119
|
//#region ../editor-blocks/src/block-editor/BlockCardBody.tsx
|
|
56564
|
-
function BlockCardBody({ siteId, block, manifest, uiStore, hasRecoveryConflict, focusSignal, onFocusHandled, onBlockSave, theme, widgetOverrides, hideThemeV2RawStyleFields = false, pageDesignBlock = null, currentStyleGuideVersionId, iconStyleGuideSummary, iconStyleGuideEditHref, onGenerateIconSet
|
|
57120
|
+
function BlockCardBody({ siteId, block, manifest, uiStore, hasRecoveryConflict, focusSignal, onFocusHandled, onBlockSave, theme, widgetOverrides, hideThemeV2RawStyleFields = false, pageDesignBlock = null, currentStyleGuideVersionId, iconStyleGuideSummary, iconStyleGuideEditHref, onGenerateIconSet }) {
|
|
56565
57121
|
return /* @__PURE__ */ jsxs(CardContent, {
|
|
56566
57122
|
className: "space-y-4 pb-6",
|
|
56567
57123
|
children: [/* @__PURE__ */ jsx(FeatureCardIconsPanel, {
|
|
@@ -56570,8 +57126,7 @@ function BlockCardBody({ siteId, block, manifest, uiStore, hasRecoveryConflict,
|
|
|
56570
57126
|
currentStyleGuideVersionId,
|
|
56571
57127
|
iconStyleGuideSummary,
|
|
56572
57128
|
iconStyleGuideEditHref,
|
|
56573
|
-
onGenerateIconSet
|
|
56574
|
-
onApplyGeneratedIconSet
|
|
57129
|
+
onGenerateIconSet
|
|
56575
57130
|
}), /* @__PURE__ */ jsx(BlockForm, {
|
|
56576
57131
|
siteId,
|
|
56577
57132
|
block,
|
|
@@ -56794,7 +57349,7 @@ function useDraftContent(uiStore, blockId) {
|
|
|
56794
57349
|
}
|
|
56795
57350
|
//#endregion
|
|
56796
57351
|
//#region ../editor-blocks/src/block-editor/blockHeaderActionPlan.ts
|
|
56797
|
-
function deriveBlockHeaderActionPlan({ actionPresentation, blockId, settingsAvailable, featureCardIconActionsAvailable,
|
|
57352
|
+
function deriveBlockHeaderActionPlan({ actionPresentation, blockId, settingsAvailable, featureCardIconActionsAvailable, generatedIconSetActionsAvailable, hasStaleGeneratedIcons, featureCardIconDialogCardsCount, duplicateAvailable, duplicateDisabled, deleteAvailable, deleteDisabled }) {
|
|
56798
57353
|
const customizeAction = deriveCustomizeAction({
|
|
56799
57354
|
actionPresentation,
|
|
56800
57355
|
blockId,
|
|
@@ -56814,7 +57369,6 @@ function deriveBlockHeaderActionPlan({ actionPresentation, blockId, settingsAvai
|
|
|
56814
57369
|
});
|
|
56815
57370
|
const iconActions = deriveIconActions({
|
|
56816
57371
|
featureCardIconActionsAvailable,
|
|
56817
|
-
featureCardIconsComplete,
|
|
56818
57372
|
generatedIconSetActionsAvailable,
|
|
56819
57373
|
hasStaleGeneratedIcons,
|
|
56820
57374
|
featureCardIconDialogCardsCount
|
|
@@ -56858,16 +57412,13 @@ function deriveCustomizeAction({ actionPresentation, blockId, settingsAvailable
|
|
|
56858
57412
|
default: return assertNever$5(actionPresentation.customize);
|
|
56859
57413
|
}
|
|
56860
57414
|
}
|
|
56861
|
-
function deriveIconActions({ featureCardIconActionsAvailable,
|
|
57415
|
+
function deriveIconActions({ featureCardIconActionsAvailable, generatedIconSetActionsAvailable, hasStaleGeneratedIcons, featureCardIconDialogCardsCount }) {
|
|
56862
57416
|
if (!featureCardIconActionsAvailable) return [];
|
|
56863
|
-
return [{
|
|
56864
|
-
kind: "suggest-icons",
|
|
56865
|
-
disabled: featureCardIconsComplete
|
|
56866
|
-
}, ...generatedIconSetActionsAvailable ? [{
|
|
57417
|
+
return generatedIconSetActionsAvailable ? [{
|
|
56867
57418
|
kind: "generated-icon-set",
|
|
56868
57419
|
disabled: featureCardIconDialogCardsCount === 0,
|
|
56869
57420
|
stale: hasStaleGeneratedIcons
|
|
56870
|
-
}] : []
|
|
57421
|
+
}] : [];
|
|
56871
57422
|
}
|
|
56872
57423
|
function deriveStructureActions({ duplicateAvailable, duplicateDisabled, deleteAvailable, deleteDisabled }) {
|
|
56873
57424
|
return [...duplicateAvailable ? [{
|
|
@@ -56880,7 +57431,7 @@ function deriveStructureActions({ duplicateAvailable, duplicateDisabled, deleteA
|
|
|
56880
57431
|
}
|
|
56881
57432
|
//#endregion
|
|
56882
57433
|
//#region ../editor-blocks/src/block-editor/BlockCardHeader.tsx
|
|
56883
|
-
function BlockCardHeader({ block, manifest, isFirst, isLast, isMoving, onMove, onDuplicate, onDelete, dragListeners, canReorder, collapsed, onToggleCollapsed, contentId, uiStore, widgetOverrides, theme, hideThemeV2RawStyleFields = false, reorderControlMode = "full", actionPresentation = DEFAULT_BLOCK_ACTION_PRESENTATION, currentStyleGuideVersionId, iconStyleGuideSummary, iconStyleGuideEditHref, onGenerateIconSet
|
|
57434
|
+
function BlockCardHeader({ block, manifest, isFirst, isLast, isMoving, onMove, onDuplicate, onDelete, dragListeners, canReorder, collapsed, onToggleCollapsed, contentId, uiStore, widgetOverrides, theme, hideThemeV2RawStyleFields = false, reorderControlMode = "full", actionPresentation = DEFAULT_BLOCK_ACTION_PRESENTATION, currentStyleGuideVersionId, iconStyleGuideSummary, iconStyleGuideEditHref, onGenerateIconSet }) {
|
|
56884
57435
|
const [deleteDialogOpen, setDeleteDialogOpen] = useState(false);
|
|
56885
57436
|
const [settingsDialogOpen, setSettingsDialogOpen] = useState(false);
|
|
56886
57437
|
const [generateIconSetDialogOpen, setGenerateIconSetDialogOpen] = useState(false);
|
|
@@ -56892,7 +57443,6 @@ function BlockCardHeader({ block, manifest, isFirst, isLast, isMoving, onMove, o
|
|
|
56892
57443
|
const currentContent = useStoreSelector(uiStore, (state) => supportsIconActions && blockId ? state.drafts.getCurrentValues(blockId) : null);
|
|
56893
57444
|
const featureCardIconStatus = supportsIconActions ? getFeatureCardIconStatus(currentContent ?? block.draftContent ?? contentToUse) : null;
|
|
56894
57445
|
const featureCardIconActionsAvailable = Boolean(blockId) && supportsIconActions && (featureCardIconStatus?.totalCards ?? 0) > 0;
|
|
56895
|
-
const featureCardIconsComplete = featureCardIconStatus !== null && featureCardIconStatus.totalCards > 0 && featureCardIconStatus.cardsWithIcons >= featureCardIconStatus.totalCards;
|
|
56896
57446
|
const generatedIconSetActionsAvailable = featureCardIconActionsAvailable && Boolean(onGenerateIconSet);
|
|
56897
57447
|
const featureCardIconContent = currentContent ?? block.draftContent ?? contentToUse;
|
|
56898
57448
|
const featureCardIconDialogCards = supportsIconActions ? getFeatureCardIconDialogCards(featureCardIconContent) : [];
|
|
@@ -56903,15 +57453,15 @@ function BlockCardHeader({ block, manifest, isFirst, isLast, isMoving, onMove, o
|
|
|
56903
57453
|
kind: "failed",
|
|
56904
57454
|
message: "Could not apply generated icon set"
|
|
56905
57455
|
};
|
|
56906
|
-
const
|
|
56907
|
-
if (applyGeneratedFeatureCardIconSet({
|
|
57456
|
+
const result = await applyGeneratedIconSetToEditor({
|
|
56908
57457
|
blockId,
|
|
56909
57458
|
content: featureCardIconContent,
|
|
56910
|
-
|
|
56911
|
-
|
|
56912
|
-
})
|
|
57459
|
+
preview,
|
|
57460
|
+
uiStore
|
|
57461
|
+
});
|
|
57462
|
+
if (result.kind !== "applied") return {
|
|
56913
57463
|
kind: "failed",
|
|
56914
|
-
message: "Could not apply generated icon set"
|
|
57464
|
+
message: result.kind === "autosave_failed" ? "The icons are ready, but we couldn’t save this page. Please try again." : "Could not apply generated icon set"
|
|
56915
57465
|
};
|
|
56916
57466
|
return { kind: "applied" };
|
|
56917
57467
|
}
|
|
@@ -56921,7 +57471,6 @@ function BlockCardHeader({ block, manifest, isFirst, isLast, isMoving, onMove, o
|
|
|
56921
57471
|
blockId,
|
|
56922
57472
|
settingsAvailable,
|
|
56923
57473
|
featureCardIconActionsAvailable,
|
|
56924
|
-
featureCardIconsComplete,
|
|
56925
57474
|
generatedIconSetActionsAvailable,
|
|
56926
57475
|
hasStaleGeneratedIcons,
|
|
56927
57476
|
featureCardIconDialogCardsCount: featureCardIconDialogCards.length,
|
|
@@ -56952,14 +57501,6 @@ function BlockCardHeader({ block, manifest, isFirst, isLast, isMoving, onMove, o
|
|
|
56952
57501
|
}
|
|
56953
57502
|
setSettingsDialogOpen(true);
|
|
56954
57503
|
return;
|
|
56955
|
-
case "suggest-icons":
|
|
56956
|
-
if (!blockId || action.disabled) return;
|
|
56957
|
-
applyCuratedFeatureCardIconSuggestions({
|
|
56958
|
-
blockId,
|
|
56959
|
-
content: currentContent ?? block.draftContent ?? contentToUse,
|
|
56960
|
-
drafts: uiStore.getState().drafts
|
|
56961
|
-
});
|
|
56962
|
-
return;
|
|
56963
57504
|
case "generated-icon-set":
|
|
56964
57505
|
if (action.disabled) return;
|
|
56965
57506
|
setGenerateIconSetDialogOpen(true);
|
|
@@ -57121,7 +57662,6 @@ function BlockCardHeader({ block, manifest, isFirst, isLast, isMoving, onMove, o
|
|
|
57121
57662
|
function menuActionIcon(action) {
|
|
57122
57663
|
switch (action.kind) {
|
|
57123
57664
|
case "customize": return /* @__PURE__ */ jsx(Settings, { className: "mr-2 h-4 w-4" });
|
|
57124
|
-
case "suggest-icons": return /* @__PURE__ */ jsx(Sparkles, { className: "mr-2 h-4 w-4" });
|
|
57125
57665
|
case "generated-icon-set": return action.stale ? /* @__PURE__ */ jsx(RotateCcw, { className: "mr-2 h-4 w-4" }) : /* @__PURE__ */ jsx(ImagePlus, { className: "mr-2 h-4 w-4" });
|
|
57126
57666
|
case "duplicate": return /* @__PURE__ */ jsx(Copy, { className: "mr-2 h-4 w-4" });
|
|
57127
57667
|
case "delete": return /* @__PURE__ */ jsx(Trash2, { className: "mr-2 h-4 w-4" });
|
|
@@ -57131,7 +57671,6 @@ function menuActionIcon(action) {
|
|
|
57131
57671
|
function menuActionLabel(action) {
|
|
57132
57672
|
switch (action.kind) {
|
|
57133
57673
|
case "customize": return "Customize";
|
|
57134
|
-
case "suggest-icons": return "Suggest icons";
|
|
57135
57674
|
case "generated-icon-set": return action.stale ? "Regenerate icon set" : "Generate icon set";
|
|
57136
57675
|
case "duplicate": return "Duplicate";
|
|
57137
57676
|
case "delete": return "Delete";
|
|
@@ -57140,7 +57679,7 @@ function menuActionLabel(action) {
|
|
|
57140
57679
|
}
|
|
57141
57680
|
//#endregion
|
|
57142
57681
|
//#region ../editor-blocks/src/block-editor/BlockCard.tsx
|
|
57143
|
-
function BlockCard({ siteId, block, manifest, isFirst, isLast, isMoving, onMove, onDuplicate, onDelete, dragListeners, canReorder, collapsed, onCollapsedChange, highlighted, hasRecoveryConflict, focusSignal, onFocusHandled, onBlockSave, theme, widgetOverrides, uiStore, hideThemeV2RawStyleFields = false, pageDesignBlock = null, reorderControlMode = DEFAULT_REORDER_CONTROL_MODE, actionPresentation = DEFAULT_BLOCK_ACTION_PRESENTATION, currentStyleGuideVersionId, iconStyleGuideSummary, iconStyleGuideEditHref, onGenerateIconSet
|
|
57682
|
+
function BlockCard({ siteId, block, manifest, isFirst, isLast, isMoving, onMove, onDuplicate, onDelete, dragListeners, canReorder, collapsed, onCollapsedChange, highlighted, hasRecoveryConflict, focusSignal, onFocusHandled, onBlockSave, theme, widgetOverrides, uiStore, hideThemeV2RawStyleFields = false, pageDesignBlock = null, reorderControlMode = DEFAULT_REORDER_CONTROL_MODE, actionPresentation = DEFAULT_BLOCK_ACTION_PRESENTATION, currentStyleGuideVersionId, iconStyleGuideSummary, iconStyleGuideEditHref, onGenerateIconSet }) {
|
|
57144
57683
|
const contentId = block.id ? `builder-block-content-${block.id}` : void 0;
|
|
57145
57684
|
return /* @__PURE__ */ jsx(Card, {
|
|
57146
57685
|
className: cn$1("w-full p-0 transition-shadow", highlighted ? "builder-editor-block-highlight" : ""),
|
|
@@ -57172,8 +57711,7 @@ function BlockCard({ siteId, block, manifest, isFirst, isLast, isMoving, onMove,
|
|
|
57172
57711
|
currentStyleGuideVersionId,
|
|
57173
57712
|
iconStyleGuideSummary,
|
|
57174
57713
|
iconStyleGuideEditHref,
|
|
57175
|
-
onGenerateIconSet
|
|
57176
|
-
onApplyGeneratedIconSet
|
|
57714
|
+
onGenerateIconSet
|
|
57177
57715
|
}), /* @__PURE__ */ jsx(CollapsibleContent, {
|
|
57178
57716
|
id: contentId,
|
|
57179
57717
|
children: /* @__PURE__ */ jsx(BlockCardBody, {
|
|
@@ -57192,8 +57730,7 @@ function BlockCard({ siteId, block, manifest, isFirst, isLast, isMoving, onMove,
|
|
|
57192
57730
|
currentStyleGuideVersionId,
|
|
57193
57731
|
iconStyleGuideSummary,
|
|
57194
57732
|
iconStyleGuideEditHref,
|
|
57195
|
-
onGenerateIconSet
|
|
57196
|
-
onApplyGeneratedIconSet
|
|
57733
|
+
onGenerateIconSet
|
|
57197
57734
|
})
|
|
57198
57735
|
})]
|
|
57199
57736
|
})
|
|
@@ -57201,7 +57738,7 @@ function BlockCard({ siteId, block, manifest, isFirst, isLast, isMoving, onMove,
|
|
|
57201
57738
|
}
|
|
57202
57739
|
//#endregion
|
|
57203
57740
|
//#region ../editor-blocks/src/block-editor/SortableBlockItem.tsx
|
|
57204
|
-
const SortableBlockItem = memo(function SortableBlockItem({ siteId, block, onMove, onDuplicate, onDelete, isFirst, isLast, isMoving, isDraggable, collapsed, onCollapsedChange, highlighted, hasRecoveryConflict, focusSignal, onFocusHandled, onBlockSave, theme, widgetOverrides, uiStore, sdkConfig, customBlocks = [], hideThemeV2RawStyleFields = false, pageDesignBlock = null, reorderControlMode = DEFAULT_REORDER_CONTROL_MODE, actionPresentation = DEFAULT_BLOCK_ACTION_PRESENTATION, currentStyleGuideVersionId, iconStyleGuideSummary, iconStyleGuideEditHref, onGenerateIconSet
|
|
57741
|
+
const SortableBlockItem = memo(function SortableBlockItem({ siteId, block, onMove, onDuplicate, onDelete, isFirst, isLast, isMoving, isDraggable, collapsed, onCollapsedChange, highlighted, hasRecoveryConflict, focusSignal, onFocusHandled, onBlockSave, theme, widgetOverrides, uiStore, sdkConfig, customBlocks = [], hideThemeV2RawStyleFields = false, pageDesignBlock = null, reorderControlMode = DEFAULT_REORDER_CONTROL_MODE, actionPresentation = DEFAULT_BLOCK_ACTION_PRESENTATION, currentStyleGuideVersionId, iconStyleGuideSummary, iconStyleGuideEditHref, onGenerateIconSet }) {
|
|
57205
57742
|
const sortable = useSortable({
|
|
57206
57743
|
id: block.id,
|
|
57207
57744
|
disabled: !isDraggable
|
|
@@ -57274,14 +57811,39 @@ const SortableBlockItem = memo(function SortableBlockItem({ siteId, block, onMov
|
|
|
57274
57811
|
currentStyleGuideVersionId,
|
|
57275
57812
|
iconStyleGuideSummary,
|
|
57276
57813
|
iconStyleGuideEditHref,
|
|
57277
|
-
onGenerateIconSet
|
|
57278
|
-
onApplyGeneratedIconSet
|
|
57814
|
+
onGenerateIconSet
|
|
57279
57815
|
})
|
|
57280
57816
|
});
|
|
57281
57817
|
});
|
|
57282
57818
|
//#endregion
|
|
57819
|
+
//#region ../editor-blocks/src/widgets/icon-picker/loaders.ts
|
|
57820
|
+
async function loadGeneratedIconLibraryPage(apiClient, input) {
|
|
57821
|
+
return unwrapResponse(await apiClient({
|
|
57822
|
+
endpoint: "listGeneratedIconSets",
|
|
57823
|
+
params: {
|
|
57824
|
+
siteId: input.siteId,
|
|
57825
|
+
...input.cursor ? { cursor: input.cursor } : {},
|
|
57826
|
+
...input.limit === void 0 ? {} : { limit: String(input.limit) }
|
|
57827
|
+
}
|
|
57828
|
+
}));
|
|
57829
|
+
}
|
|
57830
|
+
//#endregion
|
|
57283
57831
|
//#region ../editor-blocks/src/BlockEditor.tsx
|
|
57284
|
-
|
|
57832
|
+
function buildDashboardPath(dashboardBaseUrl, path) {
|
|
57833
|
+
const baseUrl = dashboardBaseUrl?.trim();
|
|
57834
|
+
if (!baseUrl) return path;
|
|
57835
|
+
return `${baseUrl.replace(/\/+$/u, "")}${path}`;
|
|
57836
|
+
}
|
|
57837
|
+
function getApiRequestErrorMessage(error) {
|
|
57838
|
+
return extractApiEnvelopeErrorDetails(error.body).message ?? error.message;
|
|
57839
|
+
}
|
|
57840
|
+
const GENERATED_ICON_SET_FRIENDLY_ERROR = "We could not make those icons this time. Please try again in a moment.";
|
|
57841
|
+
function getGeneratedIconSetErrorMessage(error) {
|
|
57842
|
+
if (!(error instanceof ApiRequestError)) return GENERATED_ICON_SET_FRIENDLY_ERROR;
|
|
57843
|
+
const message = getApiRequestErrorMessage(error);
|
|
57844
|
+
return message === "Internal server error" || /^Request to .+ failed with status \d+$/u.test(message) ? GENERATED_ICON_SET_FRIENDLY_ERROR : message;
|
|
57845
|
+
}
|
|
57846
|
+
const BlockEditor = forwardRef(function BlockEditor({ siteId, dashboardBaseUrl, owner, blocks, recoveryConflictBlockIds = [], recoveryConflictReviewRequestId = null, apiClient, uiStore, enableReordering = true, enableCreation = true, enableDeletion = true, onBlockSave, onBlocksChange, theme, widgetOverrides, headerLeftSlot, hideThemeV2RawStyleFields = false, pageDesignEditorModel = null, enabledContentTypes = [], sdkConfig = null, customBlocks = [], allowedBlockKinds = null, emptyUnavailableMessage = "No blocks available for this page.", initialCollapsed = true, reorderControlMode = DEFAULT_REORDER_CONTROL_MODE, actionPresentation = DEFAULT_BLOCK_ACTION_PRESENTATION }, ref) {
|
|
57285
57847
|
const [blockList, setBlockList] = useState(() => normalizeBlockListInitial(blocks));
|
|
57286
57848
|
const [errorMessage, setErrorMessage] = useState(null);
|
|
57287
57849
|
const [highlightedBlockId, setHighlightedBlockId] = useState(null);
|
|
@@ -57295,6 +57857,11 @@ const BlockEditor = forwardRef(function BlockEditor({ siteId, owner, blocks, rec
|
|
|
57295
57857
|
const [fetchedContentTypes, setFetchedContentTypes] = useState(enabledContentTypes);
|
|
57296
57858
|
const [fetchingContentTypes, setFetchingContentTypes] = useState(false);
|
|
57297
57859
|
const [iconStyleGuide, setIconStyleGuide] = useState(null);
|
|
57860
|
+
const [generatedIconLibrary, setGeneratedIconLibrary] = useState({
|
|
57861
|
+
kind: "loading",
|
|
57862
|
+
sets: [],
|
|
57863
|
+
nextCursor: null
|
|
57864
|
+
});
|
|
57298
57865
|
const allowReordering = enableReordering;
|
|
57299
57866
|
const allowCreation = enableCreation;
|
|
57300
57867
|
const allowDeletion = enableDeletion;
|
|
@@ -57324,7 +57891,7 @@ const BlockEditor = forwardRef(function BlockEditor({ siteId, owner, blocks, rec
|
|
|
57324
57891
|
setIconStyleGuide(versionId ? {
|
|
57325
57892
|
versionId,
|
|
57326
57893
|
summary: response.guide.displaySummary,
|
|
57327
|
-
editHref: `/dashboard/sites/${siteId}/settings/icon-style-guide`
|
|
57894
|
+
editHref: buildDashboardPath(dashboardBaseUrl, `/dashboard/sites/${siteId}/settings/icon-style-guide`)
|
|
57328
57895
|
} : null);
|
|
57329
57896
|
}).catch(() => {
|
|
57330
57897
|
if (!cancelled) setIconStyleGuide(null);
|
|
@@ -57332,7 +57899,81 @@ const BlockEditor = forwardRef(function BlockEditor({ siteId, owner, blocks, rec
|
|
|
57332
57899
|
return () => {
|
|
57333
57900
|
cancelled = true;
|
|
57334
57901
|
};
|
|
57902
|
+
}, [
|
|
57903
|
+
apiClient,
|
|
57904
|
+
dashboardBaseUrl,
|
|
57905
|
+
siteId
|
|
57906
|
+
]);
|
|
57907
|
+
useEffect(() => {
|
|
57908
|
+
if (typeof apiClient !== "function") {
|
|
57909
|
+
setGeneratedIconLibrary({
|
|
57910
|
+
kind: "failed",
|
|
57911
|
+
sets: [],
|
|
57912
|
+
nextCursor: null,
|
|
57913
|
+
message: "Generated icon library is unavailable"
|
|
57914
|
+
});
|
|
57915
|
+
return;
|
|
57916
|
+
}
|
|
57917
|
+
let cancelled = false;
|
|
57918
|
+
setGeneratedIconLibrary((current) => ({
|
|
57919
|
+
kind: "loading",
|
|
57920
|
+
sets: current.sets,
|
|
57921
|
+
nextCursor: current.nextCursor
|
|
57922
|
+
}));
|
|
57923
|
+
Promise.resolve().then(() => loadGeneratedIconLibraryPage(apiClient, {
|
|
57924
|
+
siteId,
|
|
57925
|
+
limit: 24
|
|
57926
|
+
})).then((response) => {
|
|
57927
|
+
if (cancelled) return;
|
|
57928
|
+
setGeneratedIconLibrary({
|
|
57929
|
+
kind: "ready",
|
|
57930
|
+
sets: response.sets,
|
|
57931
|
+
nextCursor: response.nextCursor
|
|
57932
|
+
});
|
|
57933
|
+
}).catch(() => {
|
|
57934
|
+
if (!cancelled) setGeneratedIconLibrary((current) => ({
|
|
57935
|
+
kind: "failed",
|
|
57936
|
+
sets: current.sets,
|
|
57937
|
+
nextCursor: current.nextCursor,
|
|
57938
|
+
message: "Could not load previously generated icons"
|
|
57939
|
+
}));
|
|
57940
|
+
});
|
|
57941
|
+
return () => {
|
|
57942
|
+
cancelled = true;
|
|
57943
|
+
};
|
|
57335
57944
|
}, [apiClient, siteId]);
|
|
57945
|
+
const loadMoreGeneratedIcons = useCallback(() => {
|
|
57946
|
+
if (typeof apiClient !== "function" || !generatedIconLibrary.nextCursor || generatedIconLibrary.kind === "loading" || generatedIconLibrary.kind === "loading_more") return;
|
|
57947
|
+
const cursor = generatedIconLibrary.nextCursor;
|
|
57948
|
+
const currentSets = generatedIconLibrary.sets;
|
|
57949
|
+
setGeneratedIconLibrary({
|
|
57950
|
+
kind: "loading_more",
|
|
57951
|
+
sets: currentSets,
|
|
57952
|
+
nextCursor: cursor
|
|
57953
|
+
});
|
|
57954
|
+
loadGeneratedIconLibraryPage(apiClient, {
|
|
57955
|
+
siteId,
|
|
57956
|
+
cursor,
|
|
57957
|
+
limit: 24
|
|
57958
|
+
}).then((response) => {
|
|
57959
|
+
setGeneratedIconLibrary((current) => ({
|
|
57960
|
+
kind: "ready",
|
|
57961
|
+
sets: [...current.sets, ...response.sets.filter((set) => !current.sets.some((currentSet) => currentSet.setId === set.setId))],
|
|
57962
|
+
nextCursor: response.nextCursor
|
|
57963
|
+
}));
|
|
57964
|
+
}).catch(() => {
|
|
57965
|
+
setGeneratedIconLibrary((current) => ({
|
|
57966
|
+
kind: "failed",
|
|
57967
|
+
sets: current.sets,
|
|
57968
|
+
nextCursor: cursor,
|
|
57969
|
+
message: "Could not load more generated icons"
|
|
57970
|
+
}));
|
|
57971
|
+
});
|
|
57972
|
+
}, [
|
|
57973
|
+
apiClient,
|
|
57974
|
+
generatedIconLibrary,
|
|
57975
|
+
siteId
|
|
57976
|
+
]);
|
|
57336
57977
|
const generateFeatureCardIconSet = useCallback(async (input) => {
|
|
57337
57978
|
if (typeof apiClient !== "function") return {
|
|
57338
57979
|
kind: "failed",
|
|
@@ -57355,53 +57996,37 @@ const BlockEditor = forwardRef(function BlockEditor({ siteId, owner, blocks, rec
|
|
|
57355
57996
|
},
|
|
57356
57997
|
options: input.signal ? { signal: input.signal } : void 0
|
|
57357
57998
|
}));
|
|
57358
|
-
const assets = response.
|
|
57999
|
+
const assets = response.set.assets.map((asset) => {
|
|
57359
58000
|
const iconValue = parseBlockIconValue(asset.iconValue);
|
|
57360
|
-
if (iconValue.kind !== "generated") throw new Error(
|
|
58001
|
+
if (iconValue.kind !== "generated") throw new Error(GENERATED_ICON_SET_FRIENDLY_ERROR);
|
|
57361
58002
|
return {
|
|
57362
58003
|
cardKey: asset.cardKey,
|
|
57363
58004
|
title: input.cards.find((card) => card.cardKey === asset.cardKey)?.title ?? asset.cardKey,
|
|
57364
|
-
src: asset.src,
|
|
57365
|
-
iconValue
|
|
58005
|
+
src: asset.renderAsset?.src ?? "",
|
|
58006
|
+
iconValue,
|
|
58007
|
+
renderAsset: asset.renderAsset
|
|
57366
58008
|
};
|
|
57367
58009
|
});
|
|
58010
|
+
setGeneratedIconLibrary((current) => ({
|
|
58011
|
+
kind: "ready",
|
|
58012
|
+
sets: [response.set, ...current.sets.filter((set) => set.setId !== response.set.setId)],
|
|
58013
|
+
nextCursor: current.nextCursor
|
|
58014
|
+
}));
|
|
57368
58015
|
return {
|
|
57369
58016
|
kind: "preview_ready",
|
|
57370
58017
|
preview: {
|
|
57371
|
-
setId: response.
|
|
58018
|
+
setId: response.set.setId,
|
|
57372
58019
|
styleGuideSummary: response.styleGuide.displaySummary,
|
|
57373
|
-
candidate: response.candidate,
|
|
57374
58020
|
assets
|
|
57375
58021
|
}
|
|
57376
58022
|
};
|
|
57377
58023
|
} catch (error) {
|
|
57378
58024
|
return {
|
|
57379
58025
|
kind: "failed",
|
|
57380
|
-
message: error
|
|
58026
|
+
message: getGeneratedIconSetErrorMessage(error)
|
|
57381
58027
|
};
|
|
57382
58028
|
}
|
|
57383
58029
|
}, [apiClient, siteId]);
|
|
57384
|
-
const applyGeneratedFeatureCardIconSet = useCallback(async (preview) => {
|
|
57385
|
-
if (typeof apiClient !== "function") return preview;
|
|
57386
|
-
if (!preview.candidate) return preview;
|
|
57387
|
-
const response = unwrapResponse(await apiClient({
|
|
57388
|
-
endpoint: "applyGeneratedIconSet",
|
|
57389
|
-
params: { siteId },
|
|
57390
|
-
body: { candidate: preview.candidate }
|
|
57391
|
-
}));
|
|
57392
|
-
const iconValuesByCardKey = new Map(response.assets.map((asset) => [asset.cardKey, asset.iconValue]));
|
|
57393
|
-
return {
|
|
57394
|
-
...preview,
|
|
57395
|
-
assets: preview.assets.map((asset) => {
|
|
57396
|
-
const iconValue = parseBlockIconValue(iconValuesByCardKey.get(asset.cardKey) ?? asset.iconValue);
|
|
57397
|
-
if (iconValue.kind !== "generated") throw new Error("Generated icon apply response included an invalid icon reference");
|
|
57398
|
-
return {
|
|
57399
|
-
...asset,
|
|
57400
|
-
iconValue
|
|
57401
|
-
};
|
|
57402
|
-
})
|
|
57403
|
-
};
|
|
57404
|
-
}, [apiClient, siteId]);
|
|
57405
58030
|
useEffect(() => {
|
|
57406
58031
|
return uiStore.subscribe(() => {
|
|
57407
58032
|
const structureList = uiStore.getState().structure.getList();
|
|
@@ -57576,133 +58201,139 @@ const BlockEditor = forwardRef(function BlockEditor({ siteId, owner, blocks, rec
|
|
|
57576
58201
|
uiStore
|
|
57577
58202
|
]);
|
|
57578
58203
|
const hasBlocks = blockList.length > 0;
|
|
57579
|
-
|
|
57580
|
-
|
|
57581
|
-
|
|
57582
|
-
|
|
57583
|
-
|
|
57584
|
-
|
|
57585
|
-
|
|
57586
|
-
|
|
57587
|
-
|
|
57588
|
-
|
|
57589
|
-
|
|
57590
|
-
|
|
57591
|
-
|
|
57592
|
-
|
|
57593
|
-
|
|
57594
|
-
|
|
57595
|
-
|
|
57596
|
-
|
|
57597
|
-
|
|
57598
|
-
|
|
57599
|
-
|
|
57600
|
-
|
|
57601
|
-
|
|
57602
|
-
|
|
57603
|
-
|
|
57604
|
-
|
|
57605
|
-
|
|
57606
|
-
|
|
57607
|
-
|
|
57608
|
-
|
|
57609
|
-
|
|
57610
|
-
|
|
57611
|
-
|
|
57612
|
-
|
|
57613
|
-
|
|
57614
|
-
|
|
57615
|
-
|
|
57616
|
-
|
|
57617
|
-
|
|
57618
|
-
|
|
57619
|
-
|
|
57620
|
-
|
|
57621
|
-
|
|
57622
|
-
|
|
57623
|
-
|
|
57624
|
-
|
|
57625
|
-
|
|
57626
|
-
|
|
57627
|
-
|
|
57628
|
-
|
|
57629
|
-
|
|
57630
|
-
|
|
57631
|
-
|
|
57632
|
-
|
|
57633
|
-
|
|
57634
|
-
block,
|
|
57635
|
-
onMove: handleMove,
|
|
57636
|
-
onDuplicate: duplicateBlock,
|
|
57637
|
-
onDelete: allowDeletion ? handleDelete : void 0,
|
|
57638
|
-
isFirst: index === 0,
|
|
57639
|
-
isLast: index === blockList.length - 1,
|
|
57640
|
-
isMoving: reorderId === block.id || duplicatingBlockId === block.id,
|
|
57641
|
-
isDraggable: allowReordering,
|
|
57642
|
-
collapsed,
|
|
57643
|
-
onCollapsedChange: (nextCollapsed) => {
|
|
58204
|
+
const contextValue = useMemo(() => ({
|
|
58205
|
+
blockList,
|
|
58206
|
+
setBlockList,
|
|
58207
|
+
reorderId,
|
|
58208
|
+
focusRequest,
|
|
58209
|
+
triggerFocus,
|
|
58210
|
+
handleMove,
|
|
58211
|
+
onDragEnd,
|
|
58212
|
+
activeBlockId,
|
|
58213
|
+
setActiveBlockId,
|
|
58214
|
+
theme
|
|
58215
|
+
}), [
|
|
58216
|
+
blockList,
|
|
58217
|
+
reorderId,
|
|
58218
|
+
focusRequest,
|
|
58219
|
+
triggerFocus,
|
|
58220
|
+
handleMove,
|
|
58221
|
+
onDragEnd,
|
|
58222
|
+
activeBlockId,
|
|
58223
|
+
setActiveBlockId,
|
|
58224
|
+
theme
|
|
58225
|
+
]);
|
|
58226
|
+
return /* @__PURE__ */ jsx(GeneratedIconLibraryProvider, {
|
|
58227
|
+
value: {
|
|
58228
|
+
...generatedIconLibrary,
|
|
58229
|
+
loadMore: generatedIconLibrary.nextCursor ? loadMoreGeneratedIcons : null
|
|
58230
|
+
},
|
|
58231
|
+
children: /* @__PURE__ */ jsx(BlockListProvider, {
|
|
58232
|
+
value: contextValue,
|
|
58233
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
58234
|
+
className: "space-y-3 touch-pan-y",
|
|
58235
|
+
children: [
|
|
58236
|
+
/* @__PURE__ */ jsx(HeaderActions, { headerLeftSlot }),
|
|
58237
|
+
errorMessage ? /* @__PURE__ */ jsx("div", {
|
|
58238
|
+
className: "rounded-md border border-destructive bg-destructive/10 px-4 py-2 text-sm text-destructive",
|
|
58239
|
+
children: errorMessage
|
|
58240
|
+
}) : null,
|
|
58241
|
+
hasBlocks ? /* @__PURE__ */ jsx(DndContext, {
|
|
58242
|
+
sensors: activeSensors,
|
|
58243
|
+
collisionDetection: closestCenter,
|
|
58244
|
+
onDragEnd,
|
|
58245
|
+
children: /* @__PURE__ */ jsx(SortableContext, {
|
|
58246
|
+
items: blockList.map((b) => b.id),
|
|
58247
|
+
strategy: verticalListSortingStrategy,
|
|
58248
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
58249
|
+
className: "space-y-0",
|
|
58250
|
+
children: [canCreateBlocks ? /* @__PURE__ */ jsx(AddBlockDivider, {
|
|
58251
|
+
onOpen: openPicker,
|
|
58252
|
+
position: 0
|
|
58253
|
+
}) : null, blockList.map((block, index) => {
|
|
58254
|
+
const focusSignal = focusRequest && block.id && focusRequest.blockId === unsafeAsEditorBlockId(block.id) ? focusRequest : null;
|
|
58255
|
+
const collapsed = isCollapsed(block.id);
|
|
58256
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
58257
|
+
className: "group",
|
|
58258
|
+
ref: (node) => {
|
|
57644
58259
|
if (!block.id) return;
|
|
57645
|
-
|
|
57646
|
-
|
|
57647
|
-
if (activeBlockId === unsafeAsEditorBlockId(block.id)) uiStore.getState().setActiveBlockId(null);
|
|
57648
|
-
return;
|
|
57649
|
-
}
|
|
57650
|
-
uiStore.getState().setActiveBlockId(unsafeAsEditorBlockId(block.id));
|
|
58260
|
+
if (node) blockRefs.current.set(block.id, node);
|
|
58261
|
+
else blockRefs.current.delete(block.id);
|
|
57651
58262
|
},
|
|
57652
|
-
|
|
57653
|
-
|
|
57654
|
-
|
|
57655
|
-
|
|
57656
|
-
|
|
57657
|
-
|
|
57658
|
-
|
|
57659
|
-
|
|
57660
|
-
|
|
57661
|
-
|
|
57662
|
-
|
|
57663
|
-
|
|
57664
|
-
|
|
57665
|
-
|
|
57666
|
-
|
|
57667
|
-
|
|
57668
|
-
|
|
57669
|
-
|
|
57670
|
-
|
|
57671
|
-
|
|
57672
|
-
|
|
57673
|
-
|
|
57674
|
-
|
|
57675
|
-
|
|
57676
|
-
|
|
58263
|
+
children: [/* @__PURE__ */ jsx(SortableBlockItem, {
|
|
58264
|
+
siteId,
|
|
58265
|
+
block,
|
|
58266
|
+
onMove: handleMove,
|
|
58267
|
+
onDuplicate: duplicateBlock,
|
|
58268
|
+
onDelete: allowDeletion ? handleDelete : void 0,
|
|
58269
|
+
isFirst: index === 0,
|
|
58270
|
+
isLast: index === blockList.length - 1,
|
|
58271
|
+
isMoving: reorderId === block.id || duplicatingBlockId === block.id,
|
|
58272
|
+
isDraggable: allowReordering,
|
|
58273
|
+
collapsed,
|
|
58274
|
+
onCollapsedChange: (nextCollapsed) => {
|
|
58275
|
+
if (!block.id) return;
|
|
58276
|
+
setCollapsed(block.id, nextCollapsed);
|
|
58277
|
+
if (nextCollapsed) {
|
|
58278
|
+
if (activeBlockId === unsafeAsEditorBlockId(block.id)) uiStore.getState().setActiveBlockId(null);
|
|
58279
|
+
return;
|
|
58280
|
+
}
|
|
58281
|
+
uiStore.getState().setActiveBlockId(unsafeAsEditorBlockId(block.id));
|
|
58282
|
+
},
|
|
58283
|
+
highlighted: highlightedBlockId === block.id,
|
|
58284
|
+
hasRecoveryConflict: typeof block.id === "string" && conflictedBlockIdSet.has(block.id),
|
|
58285
|
+
focusSignal,
|
|
58286
|
+
onFocusHandled: handleFocusHandled,
|
|
58287
|
+
onBlockSave,
|
|
58288
|
+
theme,
|
|
58289
|
+
widgetOverrides,
|
|
58290
|
+
uiStore,
|
|
58291
|
+
sdkConfig,
|
|
58292
|
+
customBlocks,
|
|
58293
|
+
hideThemeV2RawStyleFields,
|
|
58294
|
+
pageDesignBlock: block.id ? pageDesignBlockById.get(block.id) ?? null : null,
|
|
58295
|
+
reorderControlMode,
|
|
58296
|
+
actionPresentation,
|
|
58297
|
+
currentStyleGuideVersionId: iconStyleGuide?.versionId ?? null,
|
|
58298
|
+
iconStyleGuideSummary: iconStyleGuide?.summary ?? null,
|
|
58299
|
+
iconStyleGuideEditHref: iconStyleGuide?.editHref ?? null,
|
|
58300
|
+
onGenerateIconSet: generateFeatureCardIconSet
|
|
58301
|
+
}), canCreateBlocks && index < blockList.length - 1 ? /* @__PURE__ */ jsx(AddBlockDivider, {
|
|
58302
|
+
onOpen: openPicker,
|
|
58303
|
+
position: index + 1
|
|
58304
|
+
}) : null]
|
|
58305
|
+
}, block.id ?? index);
|
|
58306
|
+
})]
|
|
58307
|
+
})
|
|
57677
58308
|
})
|
|
57678
|
-
})
|
|
57679
|
-
|
|
57680
|
-
|
|
57681
|
-
|
|
57682
|
-
|
|
57683
|
-
|
|
57684
|
-
|
|
57685
|
-
|
|
57686
|
-
|
|
57687
|
-
|
|
57688
|
-
|
|
57689
|
-
|
|
57690
|
-
|
|
57691
|
-
|
|
57692
|
-
|
|
57693
|
-
})
|
|
57694
|
-
|
|
57695
|
-
|
|
57696
|
-
|
|
57697
|
-
|
|
57698
|
-
|
|
57699
|
-
|
|
57700
|
-
|
|
57701
|
-
|
|
57702
|
-
|
|
57703
|
-
|
|
57704
|
-
|
|
57705
|
-
|
|
58309
|
+
}) : hasBlocks ? /* @__PURE__ */ jsx("div", {
|
|
58310
|
+
className: "rounded-md border border-dashed px-4 py-6 text-center text-sm text-muted-foreground",
|
|
58311
|
+
children: "Loading block editor..."
|
|
58312
|
+
}) : canCreateBlocks ? /* @__PURE__ */ jsx(EmptyState, { onAdd: () => openPicker(0) }) : /* @__PURE__ */ jsx("div", {
|
|
58313
|
+
className: "rounded-md border border-dashed px-4 py-6 text-center text-sm text-muted-foreground",
|
|
58314
|
+
children: emptyUnavailableMessage
|
|
58315
|
+
}),
|
|
58316
|
+
canCreateBlocks && hasBlocks ? /* @__PURE__ */ jsx("div", {
|
|
58317
|
+
className: "flex justify-center",
|
|
58318
|
+
children: /* @__PURE__ */ jsxs(Button, {
|
|
58319
|
+
type: "button",
|
|
58320
|
+
variant: "secondary",
|
|
58321
|
+
onClick: () => openPicker(blockList.length),
|
|
58322
|
+
children: [/* @__PURE__ */ jsx(Plus, { className: "mr-2 h-4 w-4" }), "Add block"]
|
|
58323
|
+
})
|
|
58324
|
+
}) : null,
|
|
58325
|
+
canCreateBlocks ? /* @__PURE__ */ jsx(EnhancedBlockPickerDialog, {
|
|
58326
|
+
open: pickerOpen,
|
|
58327
|
+
onOpenChange: (open) => open ? openPicker(blockList.length) : closePicker(),
|
|
58328
|
+
creatingBlockName,
|
|
58329
|
+
descriptors: availableBlocks,
|
|
58330
|
+
siteId,
|
|
58331
|
+
existingBlockNames: blockList.map((b) => b.kind).filter(Boolean),
|
|
58332
|
+
enabledContentTypes: fetchedContentTypes,
|
|
58333
|
+
onSelect: (descriptor) => void handleCreateBlock(descriptor)
|
|
58334
|
+
}) : null
|
|
58335
|
+
]
|
|
58336
|
+
})
|
|
57706
58337
|
})
|
|
57707
58338
|
});
|
|
57708
58339
|
});
|
|
@@ -59140,45 +59771,169 @@ function EntryPickerField({ path, backend, config }) {
|
|
|
59140
59771
|
//#region ../editor-blocks/src/widgets/icon-picker/IconPickerField.tsx
|
|
59141
59772
|
function IconPickerField({ path, backend, config }) {
|
|
59142
59773
|
const { value, error, setValue } = useField(path, backend);
|
|
59774
|
+
const library = useGeneratedIconLibrary();
|
|
59775
|
+
const parsedValue = parseBlockIconValue(value);
|
|
59776
|
+
const [source, setSource] = useState(parsedValue.kind === "generated" ? "generated" : "symbols");
|
|
59777
|
+
const [generatedQuery, setGeneratedQuery] = useState("");
|
|
59143
59778
|
const configuredPreset = config.ui?.iconPickerPreset;
|
|
59144
59779
|
const preset = resolveIconPickerPreset(configuredPreset);
|
|
59145
59780
|
if (configuredPreset && !isIconPickerPreset(configuredPreset) && true) console.warn(`[IconPickerField] Unknown iconPickerPreset at "${path}". Falling back to "cta".`);
|
|
59146
59781
|
const options = getIconPickerOptionsForPreset(preset);
|
|
59147
|
-
const
|
|
59782
|
+
const selectedSemanticId = parsedValue.kind === "semantic" ? parsedValue.iconId : value;
|
|
59783
|
+
const selected = typeof selectedSemanticId === "string" && isKnownIconName(selectedSemanticId) && options.some((option) => option.id === selectedSemanticId) ? selectedSemanticId : void 0;
|
|
59784
|
+
const generatedAssets = library.sets.flatMap((set) => set.assets.map((asset) => ({
|
|
59785
|
+
asset,
|
|
59786
|
+
blockLabel: set.blockLabel
|
|
59787
|
+
})));
|
|
59788
|
+
const normalizedGeneratedQuery = generatedQuery.trim().toLowerCase();
|
|
59789
|
+
const visibleGeneratedAssets = normalizedGeneratedQuery.length === 0 ? generatedAssets : generatedAssets.filter(({ asset, blockLabel }) => [asset.subjectLabel, blockLabel].some((text) => text.toLowerCase().includes(normalizedGeneratedQuery)));
|
|
59790
|
+
const selectedGeneratedAsset = parsedValue.kind === "generated" ? generatedAssets.find(({ asset }) => asset.iconValue.kind === "generated" && asset.iconValue.assetId === parsedValue.assetId)?.asset : null;
|
|
59791
|
+
const selectedGeneratedAssetUnavailable = parsedValue.kind === "generated" && (selectedGeneratedAsset?.availability === "unavailable" || !selectedGeneratedAsset && library.kind === "ready" && library.nextCursor === null);
|
|
59148
59792
|
return /* @__PURE__ */ jsx(FieldFrame, {
|
|
59149
59793
|
label: config.label,
|
|
59150
59794
|
description: config.description,
|
|
59151
59795
|
error: error?.message,
|
|
59152
|
-
children: () => /* @__PURE__ */
|
|
59153
|
-
|
|
59154
|
-
|
|
59155
|
-
|
|
59156
|
-
|
|
59157
|
-
|
|
59158
|
-
|
|
59159
|
-
|
|
59160
|
-
|
|
59161
|
-
|
|
59162
|
-
|
|
59163
|
-
|
|
59164
|
-
|
|
59165
|
-
|
|
59166
|
-
|
|
59167
|
-
|
|
59168
|
-
|
|
59169
|
-
|
|
59170
|
-
|
|
59171
|
-
|
|
59172
|
-
|
|
59173
|
-
|
|
59174
|
-
|
|
59175
|
-
|
|
59176
|
-
|
|
59177
|
-
|
|
59178
|
-
|
|
59796
|
+
children: () => /* @__PURE__ */ jsxs("div", {
|
|
59797
|
+
className: "space-y-2",
|
|
59798
|
+
children: [
|
|
59799
|
+
parsedValue.kind === "generated" ? /* @__PURE__ */ jsxs("div", {
|
|
59800
|
+
className: `flex items-center gap-3 rounded-md border p-2 ${selectedGeneratedAssetUnavailable ? "border-destructive/40 bg-destructive/5" : "bg-muted/20"}`,
|
|
59801
|
+
children: [
|
|
59802
|
+
selectedGeneratedAsset?.availability === "available" ? /* @__PURE__ */ jsx("img", {
|
|
59803
|
+
src: selectedGeneratedAsset.renderAsset.src,
|
|
59804
|
+
alt: "",
|
|
59805
|
+
className: "size-10 object-contain"
|
|
59806
|
+
}) : null,
|
|
59807
|
+
/* @__PURE__ */ jsxs("span", {
|
|
59808
|
+
className: "min-w-0 flex-1 text-sm",
|
|
59809
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
59810
|
+
className: "block truncate font-medium",
|
|
59811
|
+
children: selectedGeneratedAssetUnavailable ? "Generated icon unavailable" : selectedGeneratedAsset?.subjectLabel ?? "Generated icon"
|
|
59812
|
+
}), selectedGeneratedAssetUnavailable ? /* @__PURE__ */ jsx("span", {
|
|
59813
|
+
className: "block text-xs text-muted-foreground",
|
|
59814
|
+
children: "The image file is missing or was deleted. Choose a replacement below or clear it."
|
|
59815
|
+
}) : null]
|
|
59816
|
+
}),
|
|
59817
|
+
/* @__PURE__ */ jsx(Button, {
|
|
59818
|
+
type: "button",
|
|
59819
|
+
size: "sm",
|
|
59820
|
+
variant: "ghost",
|
|
59821
|
+
onClick: () => setValue(null),
|
|
59822
|
+
children: "Clear"
|
|
59823
|
+
})
|
|
59824
|
+
]
|
|
59825
|
+
}) : null,
|
|
59826
|
+
/* @__PURE__ */ jsxs("div", {
|
|
59827
|
+
className: "grid grid-cols-2 rounded-md bg-muted p-1",
|
|
59828
|
+
"aria-label": "Icon source",
|
|
59829
|
+
children: [/* @__PURE__ */ jsx(Button, {
|
|
59830
|
+
type: "button",
|
|
59831
|
+
size: "sm",
|
|
59832
|
+
variant: source === "generated" ? "secondary" : "ghost",
|
|
59833
|
+
onClick: () => setSource("generated"),
|
|
59834
|
+
children: "Generated"
|
|
59835
|
+
}), /* @__PURE__ */ jsx(Button, {
|
|
59836
|
+
type: "button",
|
|
59837
|
+
size: "sm",
|
|
59838
|
+
variant: source === "symbols" ? "secondary" : "ghost",
|
|
59839
|
+
onClick: () => setSource("symbols"),
|
|
59840
|
+
children: "Symbols"
|
|
59179
59841
|
})]
|
|
59180
|
-
})
|
|
59181
|
-
|
|
59842
|
+
}),
|
|
59843
|
+
source === "symbols" ? /* @__PURE__ */ jsx(Combobox, {
|
|
59844
|
+
items: options.map((opt) => ({
|
|
59845
|
+
id: opt.id,
|
|
59846
|
+
label: opt.label,
|
|
59847
|
+
searchText: opt.searchText,
|
|
59848
|
+
item: opt
|
|
59849
|
+
})),
|
|
59850
|
+
value: selected,
|
|
59851
|
+
onSelect: (entry) => {
|
|
59852
|
+
if (!entry) {
|
|
59853
|
+
setValue(null);
|
|
59854
|
+
return;
|
|
59855
|
+
}
|
|
59856
|
+
setValue(entry.id);
|
|
59857
|
+
},
|
|
59858
|
+
placeholder: "Select icon…",
|
|
59859
|
+
clearLabel: "Clear",
|
|
59860
|
+
renderItem: (entry) => {
|
|
59861
|
+
const Icon = getIconComponent(entry.id);
|
|
59862
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
59863
|
+
className: "flex items-center gap-2",
|
|
59864
|
+
children: [Icon ? /* @__PURE__ */ jsx(Icon, {
|
|
59865
|
+
className: "h-4 w-4 shrink-0",
|
|
59866
|
+
"aria-hidden": "true"
|
|
59867
|
+
}) : null, /* @__PURE__ */ jsx("span", {
|
|
59868
|
+
className: "truncate",
|
|
59869
|
+
children: entry.label
|
|
59870
|
+
})]
|
|
59871
|
+
});
|
|
59872
|
+
}
|
|
59873
|
+
}) : /* @__PURE__ */ jsxs("div", {
|
|
59874
|
+
className: "space-y-2 rounded-md border p-2",
|
|
59875
|
+
children: [
|
|
59876
|
+
/* @__PURE__ */ jsx("label", {
|
|
59877
|
+
className: "sr-only",
|
|
59878
|
+
htmlFor: `${path}-generated-icon-search`,
|
|
59879
|
+
children: "Search generated icons"
|
|
59880
|
+
}),
|
|
59881
|
+
/* @__PURE__ */ jsx("input", {
|
|
59882
|
+
id: `${path}-generated-icon-search`,
|
|
59883
|
+
type: "search",
|
|
59884
|
+
value: generatedQuery,
|
|
59885
|
+
onChange: (event) => setGeneratedQuery(event.currentTarget.value),
|
|
59886
|
+
placeholder: "Search generated icons…",
|
|
59887
|
+
className: "h-9 w-full rounded-md border bg-background px-3 text-sm"
|
|
59888
|
+
}),
|
|
59889
|
+
/* @__PURE__ */ jsx("div", {
|
|
59890
|
+
className: "max-h-56 overflow-y-auto",
|
|
59891
|
+
children: library.kind === "loading" ? /* @__PURE__ */ jsx("p", {
|
|
59892
|
+
className: "py-6 text-center text-sm text-muted-foreground",
|
|
59893
|
+
children: "Loading generated icons…"
|
|
59894
|
+
}) : library.kind === "failed" && library.sets.length === 0 ? /* @__PURE__ */ jsx("p", {
|
|
59895
|
+
role: "alert",
|
|
59896
|
+
className: "py-6 text-center text-sm text-destructive",
|
|
59897
|
+
children: library.message
|
|
59898
|
+
}) : generatedAssets.length === 0 ? /* @__PURE__ */ jsx("p", {
|
|
59899
|
+
className: "py-6 text-center text-sm text-muted-foreground",
|
|
59900
|
+
children: "Generated icons will appear here after you make a set."
|
|
59901
|
+
}) : visibleGeneratedAssets.length === 0 ? /* @__PURE__ */ jsx("p", {
|
|
59902
|
+
className: "py-6 text-center text-sm text-muted-foreground",
|
|
59903
|
+
children: "No generated icons match that search."
|
|
59904
|
+
}) : /* @__PURE__ */ jsx("div", {
|
|
59905
|
+
className: "grid grid-cols-4 gap-2",
|
|
59906
|
+
children: visibleGeneratedAssets.map(({ asset }) => {
|
|
59907
|
+
const iconValue = parseBlockIconValue(asset.iconValue);
|
|
59908
|
+
if (iconValue.kind !== "generated" || asset.availability !== "available") return null;
|
|
59909
|
+
const isSelected = parsedValue.kind === "generated" && parsedValue.assetId === iconValue.assetId;
|
|
59910
|
+
return /* @__PURE__ */ jsx("button", {
|
|
59911
|
+
type: "button",
|
|
59912
|
+
className: `flex aspect-square items-center justify-center rounded-md border p-1 transition-colors hover:bg-muted ${isSelected ? "border-primary ring-1 ring-primary" : ""}`,
|
|
59913
|
+
"aria-label": `Use ${asset.subjectLabel}`,
|
|
59914
|
+
"aria-pressed": isSelected,
|
|
59915
|
+
onClick: () => setValue(iconValue),
|
|
59916
|
+
children: /* @__PURE__ */ jsx("img", {
|
|
59917
|
+
src: asset.renderAsset.src,
|
|
59918
|
+
alt: "",
|
|
59919
|
+
className: "size-full object-contain"
|
|
59920
|
+
})
|
|
59921
|
+
}, `${iconValue.setId}:${iconValue.assetId}`);
|
|
59922
|
+
})
|
|
59923
|
+
})
|
|
59924
|
+
}),
|
|
59925
|
+
library.loadMore ? /* @__PURE__ */ jsx(Button, {
|
|
59926
|
+
type: "button",
|
|
59927
|
+
size: "sm",
|
|
59928
|
+
variant: "outline",
|
|
59929
|
+
className: "w-full",
|
|
59930
|
+
disabled: library.kind === "loading_more",
|
|
59931
|
+
onClick: library.loadMore,
|
|
59932
|
+
children: library.kind === "loading_more" ? "Loading more…" : "Load more icons"
|
|
59933
|
+
}) : null
|
|
59934
|
+
]
|
|
59935
|
+
})
|
|
59936
|
+
]
|
|
59182
59937
|
})
|
|
59183
59938
|
});
|
|
59184
59939
|
}
|
|
@@ -60706,11 +61461,14 @@ function buildPreviewDashboardSetupUrl(dashboardBaseUrl, handoff) {
|
|
|
60706
61461
|
//#region ../preview-next/src/client/preview/sidebarTabPreference.ts
|
|
60707
61462
|
const STORAGE_KEY = "preview-sidebar-tab";
|
|
60708
61463
|
const REQUEST_EVENT = "riverbank:preview-sidebar:request-open";
|
|
61464
|
+
function normalizeOpenRequest(input) {
|
|
61465
|
+
return parsePreviewSidebarOpenRequestDetail(typeof input === "string" ? { tab: input } : input);
|
|
61466
|
+
}
|
|
60709
61467
|
function parsePreviewSidebarOpenRequestDetail(detail) {
|
|
60710
|
-
const request = isRecord$
|
|
61468
|
+
const request = isRecord$10(detail) ? detail : {};
|
|
60711
61469
|
return {
|
|
60712
61470
|
tab: resolvePreviewSidebarTab(request.tab === "assistant" ? "assistant" : "editor"),
|
|
60713
|
-
...request.designRow
|
|
61471
|
+
...isPreviewDesignRow(request.designRow) ? { designRow: request.designRow } : {}
|
|
60714
61472
|
};
|
|
60715
61473
|
}
|
|
60716
61474
|
function getPreviewSidebarTab() {
|
|
@@ -60727,18 +61485,27 @@ function setPreviewSidebarTab(tab) {
|
|
|
60727
61485
|
window.localStorage.setItem(STORAGE_KEY, resolvePreviewSidebarTab(tab));
|
|
60728
61486
|
} catch {}
|
|
60729
61487
|
}
|
|
61488
|
+
function requestPreviewSidebarOpen(input) {
|
|
61489
|
+
if (typeof window === "undefined") return;
|
|
61490
|
+
const request = normalizeOpenRequest(input);
|
|
61491
|
+
setPreviewSidebarTab(request.tab);
|
|
61492
|
+
window.dispatchEvent(new window.CustomEvent(REQUEST_EVENT, { detail: request }));
|
|
61493
|
+
}
|
|
60730
61494
|
function onPreviewSidebarOpenRequest(handler) {
|
|
60731
61495
|
if (typeof window === "undefined") return () => void 0;
|
|
60732
61496
|
const listener = (event) => {
|
|
60733
|
-
if (!(
|
|
61497
|
+
if (!("detail" in event)) return;
|
|
60734
61498
|
handler(parsePreviewSidebarOpenRequestDetail(event.detail));
|
|
60735
61499
|
};
|
|
60736
61500
|
window.addEventListener(REQUEST_EVENT, listener);
|
|
60737
61501
|
return () => window.removeEventListener(REQUEST_EVENT, listener);
|
|
60738
61502
|
}
|
|
60739
|
-
function isRecord$
|
|
61503
|
+
function isRecord$10(value) {
|
|
60740
61504
|
return typeof value === "object" && value !== null;
|
|
60741
61505
|
}
|
|
61506
|
+
function isPreviewDesignRow(value) {
|
|
61507
|
+
return value === "header" || value === "footer" || value === "header-layout" || value === "header-style" || value === "footer-layout";
|
|
61508
|
+
}
|
|
60742
61509
|
//#endregion
|
|
60743
61510
|
//#region ../preview-next/src/client/preview/previewChromeSurface.ts
|
|
60744
61511
|
const PREVIEW_CHROME_THEME_CLASS_NAME = "builder-dashboard-chrome-theme";
|
|
@@ -60934,14 +61701,14 @@ function backgroundCapabilityFromModes(modeCapabilities) {
|
|
|
60934
61701
|
};
|
|
60935
61702
|
}
|
|
60936
61703
|
function parseBackgroundOverrideFromContent(content) {
|
|
60937
|
-
return parseBackgroundOverride((isRecord$
|
|
61704
|
+
return parseBackgroundOverride((isRecord$9(content._sectionStyles) ? content._sectionStyles : null)?.background);
|
|
60938
61705
|
}
|
|
60939
61706
|
function parseBackgroundOverride(value) {
|
|
60940
61707
|
if (value === null || value === void 0) return {
|
|
60941
61708
|
kind: "supported",
|
|
60942
61709
|
override: DEFAULT_BACKGROUND_OVERRIDE
|
|
60943
61710
|
};
|
|
60944
|
-
if (!isRecord$
|
|
61711
|
+
if (!isRecord$9(value)) return {
|
|
60945
61712
|
kind: "legacy",
|
|
60946
61713
|
reason: "unsupported-shape",
|
|
60947
61714
|
background: {}
|
|
@@ -61057,7 +61824,7 @@ function serializeBackgroundOverride(override) {
|
|
|
61057
61824
|
}
|
|
61058
61825
|
}
|
|
61059
61826
|
function applyBackgroundOverrideContentPatch(content, override) {
|
|
61060
|
-
const sectionStyles = isRecord$
|
|
61827
|
+
const sectionStyles = isRecord$9(content._sectionStyles) ? content._sectionStyles : {};
|
|
61061
61828
|
const serialized = serializeBackgroundOverride(override);
|
|
61062
61829
|
if (serialized === null) return withSectionStyles(content, omitRecordKey$1(sectionStyles, "background"));
|
|
61063
61830
|
return withSectionStyles(content, {
|
|
@@ -61286,7 +62053,7 @@ function imageAllowed(mediaId, pool) {
|
|
|
61286
62053
|
return pool?.some((item) => item.mediaId === mediaId) ?? false;
|
|
61287
62054
|
}
|
|
61288
62055
|
function parseImageMediaAssetId(value) {
|
|
61289
|
-
if (!isRecord$
|
|
62056
|
+
if (!isRecord$9(value)) return { kind: "missing" };
|
|
61290
62057
|
if (value.type !== void 0 && value.type !== "image") return { kind: "missing" };
|
|
61291
62058
|
const parsed = parseMediaAssetId(value.assetId);
|
|
61292
62059
|
if (!parsed.ok) return value.assetId === void 0 || value.assetId === null ? { kind: "missing" } : { kind: "invalid" };
|
|
@@ -61327,7 +62094,7 @@ function withSectionStyles(content, sectionStyles) {
|
|
|
61327
62094
|
function omitRecordKey$1(content, key) {
|
|
61328
62095
|
return Object.fromEntries(Object.entries(content).filter(([entryKey]) => entryKey !== key));
|
|
61329
62096
|
}
|
|
61330
|
-
function isRecord$
|
|
62097
|
+
function isRecord$9(value) {
|
|
61331
62098
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
61332
62099
|
}
|
|
61333
62100
|
//#endregion
|
|
@@ -62124,8 +62891,8 @@ function contentWithPreviousLayoutVariant(currentContent, previousContent) {
|
|
|
62124
62891
|
return nextContent;
|
|
62125
62892
|
}
|
|
62126
62893
|
function contentWithPreviousBackground(currentContent, previousContent) {
|
|
62127
|
-
const previousSectionStyles = isRecord$
|
|
62128
|
-
const nextSectionStyles = { ...isRecord$
|
|
62894
|
+
const previousSectionStyles = isRecord$8(previousContent._sectionStyles) ? previousContent._sectionStyles : {};
|
|
62895
|
+
const nextSectionStyles = { ...isRecord$8(currentContent._sectionStyles) ? currentContent._sectionStyles : {} };
|
|
62129
62896
|
if (Object.prototype.hasOwnProperty.call(previousSectionStyles, "background")) nextSectionStyles.background = previousSectionStyles.background;
|
|
62130
62897
|
else delete nextSectionStyles.background;
|
|
62131
62898
|
if (Object.keys(nextSectionStyles).length > 0) return {
|
|
@@ -62138,9 +62905,9 @@ function contentWithPreviousBackground(currentContent, previousContent) {
|
|
|
62138
62905
|
}
|
|
62139
62906
|
function withRuntimeBackgroundImageAsset(content, imageAsset) {
|
|
62140
62907
|
if (!imageAsset) return content;
|
|
62141
|
-
const sectionStyles = isRecord$
|
|
62142
|
-
const background = isRecord$
|
|
62143
|
-
const image = isRecord$
|
|
62908
|
+
const sectionStyles = isRecord$8(content._sectionStyles) ? content._sectionStyles : null;
|
|
62909
|
+
const background = isRecord$8(sectionStyles?.background) ? sectionStyles.background : null;
|
|
62910
|
+
const image = isRecord$8(background?.image) ? background.image : null;
|
|
62144
62911
|
if (!sectionStyles || !background || !image || background.type !== "image") return content;
|
|
62145
62912
|
return {
|
|
62146
62913
|
...content,
|
|
@@ -62153,7 +62920,7 @@ function withRuntimeBackgroundImageAsset(content, imageAsset) {
|
|
|
62153
62920
|
}
|
|
62154
62921
|
};
|
|
62155
62922
|
}
|
|
62156
|
-
function isRecord$
|
|
62923
|
+
function isRecord$8(value) {
|
|
62157
62924
|
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
62158
62925
|
}
|
|
62159
62926
|
//#endregion
|
|
@@ -62183,7 +62950,7 @@ function rollbackPreviewCustomizeDraftPatch(uiStore, patch) {
|
|
|
62183
62950
|
}
|
|
62184
62951
|
function currentLocalBlockContent(uiStore, targetBlockId) {
|
|
62185
62952
|
const current = uiStore.getState().drafts.getCurrentValues(unsafeAsEditorBlockId(targetBlockId));
|
|
62186
|
-
return isRecord$
|
|
62953
|
+
return isRecord$7(current) ? current : null;
|
|
62187
62954
|
}
|
|
62188
62955
|
function replaceLocalBlockContentWithoutHistory(input) {
|
|
62189
62956
|
const editorBlockId = unsafeAsEditorBlockId(input.targetBlockId);
|
|
@@ -62235,7 +63002,7 @@ function localRuntimeDraftForBlock(input) {
|
|
|
62235
63002
|
}
|
|
62236
63003
|
};
|
|
62237
63004
|
}
|
|
62238
|
-
function isRecord$
|
|
63005
|
+
function isRecord$7(value) {
|
|
62239
63006
|
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
62240
63007
|
}
|
|
62241
63008
|
//#endregion
|
|
@@ -63064,25 +63831,25 @@ const INITIAL_ONBOARDING_CONFIRMATION_STATE = {
|
|
|
63064
63831
|
resendFeedback: null,
|
|
63065
63832
|
statusLoadFailed: false
|
|
63066
63833
|
};
|
|
63067
|
-
function isRecord$
|
|
63834
|
+
function isRecord$6(value) {
|
|
63068
63835
|
return value !== null && typeof value === "object";
|
|
63069
63836
|
}
|
|
63070
63837
|
function getErrorMessageFromEnvelope(payload, fallback) {
|
|
63071
|
-
const error = isRecord$
|
|
63072
|
-
const message = isRecord$
|
|
63838
|
+
const error = isRecord$6(payload) ? payload.error : null;
|
|
63839
|
+
const message = isRecord$6(error) ? error.message : null;
|
|
63073
63840
|
return typeof message === "string" && message.trim().length > 0 ? message : fallback;
|
|
63074
63841
|
}
|
|
63075
63842
|
function isLaunchReadiness(value) {
|
|
63076
|
-
return isRecord$
|
|
63843
|
+
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");
|
|
63077
63844
|
}
|
|
63078
63845
|
function isOnboardingPreviewStatusResponse(value) {
|
|
63079
|
-
return isRecord$
|
|
63846
|
+
return isRecord$6(value) && typeof value.dashboardUnlocked === "boolean" && typeof value.requiresEmailConfirmation === "boolean" && isLaunchReadiness(value.launchReadiness);
|
|
63080
63847
|
}
|
|
63081
63848
|
function isResendOnboardingPreviewConfirmationResponse(value) {
|
|
63082
|
-
return isRecord$
|
|
63849
|
+
return isRecord$6(value) && (value.result === "resent" || value.result === "already_confirmed") && typeof value.dashboardUnlocked === "boolean" && typeof value.requiresEmailConfirmation === "boolean" && isLaunchReadiness(value.launchReadiness);
|
|
63083
63850
|
}
|
|
63084
63851
|
function getSuccessData(payload, isData) {
|
|
63085
|
-
if (!isRecord$
|
|
63852
|
+
if (!isRecord$6(payload) || payload.success !== true || !isData(payload.data)) return null;
|
|
63086
63853
|
return payload.data;
|
|
63087
63854
|
}
|
|
63088
63855
|
function useOnboardingConfirmationCheck(input) {
|
|
@@ -64004,10 +64771,162 @@ function cycleAvailabilityFromFlags(input) {
|
|
|
64004
64771
|
return { kind: "available" };
|
|
64005
64772
|
}
|
|
64006
64773
|
//#endregion
|
|
64774
|
+
//#region ../preview-next/src/client/preview/CustomizeColorTokenPicker.tsx
|
|
64775
|
+
function CustomizeColorTokenPicker({ title, selectedToken, recommendedTokens, advancedTokens = [], disabled = false, columnsClassName = "grid-cols-2", showTitle = true, labelForToken, swatchColorForToken, onChooseToken }) {
|
|
64776
|
+
if (recommendedTokens.length === 0 && advancedTokens.length === 0) return null;
|
|
64777
|
+
const renderGrid = (tokens) => /* @__PURE__ */ jsx("div", {
|
|
64778
|
+
className: `grid gap-1 ${columnsClassName}`,
|
|
64779
|
+
children: tokens.map((token) => /* @__PURE__ */ jsx(ColorTokenButton, {
|
|
64780
|
+
token,
|
|
64781
|
+
label: labelForToken(token),
|
|
64782
|
+
swatchColor: swatchColorForToken(token),
|
|
64783
|
+
selected: selectedToken === token,
|
|
64784
|
+
disabled,
|
|
64785
|
+
onClick: (event) => onChooseToken(token, event)
|
|
64786
|
+
}, token))
|
|
64787
|
+
});
|
|
64788
|
+
return /* @__PURE__ */ jsxs("div", { children: [
|
|
64789
|
+
showTitle ? /* @__PURE__ */ jsx("div", {
|
|
64790
|
+
className: "mb-1 text-xs font-medium text-muted-foreground",
|
|
64791
|
+
children: title
|
|
64792
|
+
}) : null,
|
|
64793
|
+
renderGrid(recommendedTokens),
|
|
64794
|
+
advancedTokens.length > 0 ? /* @__PURE__ */ jsxs("details", {
|
|
64795
|
+
className: "mt-1",
|
|
64796
|
+
children: [/* @__PURE__ */ jsx("summary", {
|
|
64797
|
+
className: "cursor-pointer text-xs text-muted-foreground",
|
|
64798
|
+
children: "More colors"
|
|
64799
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
64800
|
+
className: "mt-1",
|
|
64801
|
+
children: renderGrid(advancedTokens)
|
|
64802
|
+
})]
|
|
64803
|
+
}) : null
|
|
64804
|
+
] });
|
|
64805
|
+
}
|
|
64806
|
+
function CustomizeBackgroundColorPicker({ title = "Colors", selectedToken, recommendedTokens, advancedTokens = [], disabled = false, columnsClassName = "grid-cols-2", defaultSelected = false, defaultLabel = "Default", labelForToken, swatchColorForToken, onChooseDefault, onChooseToken }) {
|
|
64807
|
+
const hasTokens = recommendedTokens.length > 0 || advancedTokens.length > 0;
|
|
64808
|
+
if (!onChooseDefault && !hasTokens) return null;
|
|
64809
|
+
return /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsxs("div", {
|
|
64810
|
+
className: "mb-2 flex items-center justify-between gap-2",
|
|
64811
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
64812
|
+
className: "text-xs font-medium text-muted-foreground",
|
|
64813
|
+
children: title
|
|
64814
|
+
}), onChooseDefault ? /* @__PURE__ */ jsx("button", {
|
|
64815
|
+
type: "button",
|
|
64816
|
+
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"}`,
|
|
64817
|
+
disabled,
|
|
64818
|
+
onClick: onChooseDefault,
|
|
64819
|
+
children: defaultLabel
|
|
64820
|
+
}) : null]
|
|
64821
|
+
}), hasTokens ? /* @__PURE__ */ jsx(CustomizeColorTokenPicker, {
|
|
64822
|
+
title,
|
|
64823
|
+
selectedToken,
|
|
64824
|
+
recommendedTokens,
|
|
64825
|
+
advancedTokens,
|
|
64826
|
+
disabled,
|
|
64827
|
+
columnsClassName,
|
|
64828
|
+
labelForToken,
|
|
64829
|
+
swatchColorForToken,
|
|
64830
|
+
onChooseToken,
|
|
64831
|
+
showTitle: false
|
|
64832
|
+
}) : null] });
|
|
64833
|
+
}
|
|
64834
|
+
function ColorTokenButton({ token, label, swatchColor, selected, disabled, onClick }) {
|
|
64835
|
+
return /* @__PURE__ */ jsxs("button", {
|
|
64836
|
+
type: "button",
|
|
64837
|
+
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"}`,
|
|
64838
|
+
disabled,
|
|
64839
|
+
"aria-label": `Choose ${label}`,
|
|
64840
|
+
onClick,
|
|
64841
|
+
"data-token": token,
|
|
64842
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
64843
|
+
className: "h-3 w-3 shrink-0 rounded-full border",
|
|
64844
|
+
style: { backgroundColor: swatchColor }
|
|
64845
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
64846
|
+
className: "truncate",
|
|
64847
|
+
children: label
|
|
64848
|
+
})]
|
|
64849
|
+
});
|
|
64850
|
+
}
|
|
64851
|
+
//#endregion
|
|
64852
|
+
//#region ../preview-next/src/client/preview/CustomizeBackgroundControlRows.tsx
|
|
64853
|
+
function CustomizeBackgroundControlRows({ modeLabel, valueLabel, valueAriaLabel, swatch, chooserOpen, chooser, canCycleMode, canCycleValue, onCycleMode, onCycleValue, onToggleChooser }) {
|
|
64854
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
64855
|
+
className: "space-y-2",
|
|
64856
|
+
children: [
|
|
64857
|
+
/* @__PURE__ */ jsxs("div", {
|
|
64858
|
+
className: "flex items-stretch overflow-hidden rounded-full border bg-background",
|
|
64859
|
+
children: [
|
|
64860
|
+
/* @__PURE__ */ jsx("button", {
|
|
64861
|
+
type: "button",
|
|
64862
|
+
onClick: (event) => onCycleMode("prev", event),
|
|
64863
|
+
className: "grid h-8 w-8 place-items-center hover:bg-muted disabled:cursor-not-allowed disabled:opacity-50",
|
|
64864
|
+
"aria-label": "Previous background mode",
|
|
64865
|
+
disabled: !canCycleMode,
|
|
64866
|
+
children: /* @__PURE__ */ jsx(ChevronLeft, { size: 14 })
|
|
64867
|
+
}),
|
|
64868
|
+
/* @__PURE__ */ jsxs("div", {
|
|
64869
|
+
className: "min-w-0 flex-1 border-x px-2 py-1 text-center",
|
|
64870
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
64871
|
+
className: "text-xs font-medium leading-3 text-muted-foreground",
|
|
64872
|
+
children: "Background:"
|
|
64873
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
64874
|
+
className: "truncate text-xs font-semibold leading-4",
|
|
64875
|
+
children: modeLabel
|
|
64876
|
+
})]
|
|
64877
|
+
}),
|
|
64878
|
+
/* @__PURE__ */ jsx("button", {
|
|
64879
|
+
type: "button",
|
|
64880
|
+
onClick: (event) => onCycleMode("next", event),
|
|
64881
|
+
className: "grid h-8 w-8 place-items-center hover:bg-muted disabled:cursor-not-allowed disabled:opacity-50",
|
|
64882
|
+
"aria-label": "Next background mode",
|
|
64883
|
+
disabled: !canCycleMode,
|
|
64884
|
+
children: /* @__PURE__ */ jsx(ChevronRight, { size: 14 })
|
|
64885
|
+
})
|
|
64886
|
+
]
|
|
64887
|
+
}),
|
|
64888
|
+
/* @__PURE__ */ jsxs("div", {
|
|
64889
|
+
className: "flex items-stretch overflow-hidden rounded-full border bg-background",
|
|
64890
|
+
children: [
|
|
64891
|
+
/* @__PURE__ */ jsx("button", {
|
|
64892
|
+
type: "button",
|
|
64893
|
+
onClick: (event) => onCycleValue("prev", event),
|
|
64894
|
+
className: "grid h-8 w-8 place-items-center hover:bg-muted disabled:cursor-not-allowed disabled:opacity-50",
|
|
64895
|
+
"aria-label": "Previous background value",
|
|
64896
|
+
disabled: !canCycleValue,
|
|
64897
|
+
children: /* @__PURE__ */ jsx(ChevronLeft, { size: 14 })
|
|
64898
|
+
}),
|
|
64899
|
+
/* @__PURE__ */ jsxs("button", {
|
|
64900
|
+
type: "button",
|
|
64901
|
+
className: "flex min-w-0 flex-1 items-center justify-center gap-2 border-x px-2 py-1 text-center hover:bg-muted",
|
|
64902
|
+
"aria-expanded": chooserOpen,
|
|
64903
|
+
"aria-label": valueAriaLabel,
|
|
64904
|
+
onClick: onToggleChooser,
|
|
64905
|
+
children: [swatch, /* @__PURE__ */ jsx("span", {
|
|
64906
|
+
className: "truncate text-xs font-medium",
|
|
64907
|
+
children: valueLabel
|
|
64908
|
+
})]
|
|
64909
|
+
}),
|
|
64910
|
+
/* @__PURE__ */ jsx("button", {
|
|
64911
|
+
type: "button",
|
|
64912
|
+
onClick: (event) => onCycleValue("next", event),
|
|
64913
|
+
className: "grid h-8 w-8 place-items-center hover:bg-muted disabled:cursor-not-allowed disabled:opacity-50",
|
|
64914
|
+
"aria-label": "Next background value",
|
|
64915
|
+
disabled: !canCycleValue,
|
|
64916
|
+
children: /* @__PURE__ */ jsx(ChevronRight, { size: 14 })
|
|
64917
|
+
})
|
|
64918
|
+
]
|
|
64919
|
+
}),
|
|
64920
|
+
chooserOpen ? chooser : null
|
|
64921
|
+
]
|
|
64922
|
+
});
|
|
64923
|
+
}
|
|
64924
|
+
//#endregion
|
|
64007
64925
|
//#region ../preview-next/src/client/preview/SiteChromeCustomizeButton.tsx
|
|
64008
64926
|
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" }) {
|
|
64009
64927
|
const customize = useSiteChromeCustomizeOptional();
|
|
64010
64928
|
const popover = useCustomizePopoverController();
|
|
64929
|
+
const [backgroundChooserOpen, setBackgroundChooserOpen] = useState(false);
|
|
64011
64930
|
const popoverSide = useSiteChromeCustomizePopoverSide({
|
|
64012
64931
|
open: popover.open,
|
|
64013
64932
|
surface,
|
|
@@ -64027,52 +64946,39 @@ function SiteChromeCustomizeButton({ surface, containerClassName = "pointer-even
|
|
|
64027
64946
|
}, [surfaceState]);
|
|
64028
64947
|
const controlPlan = useMemo(() => {
|
|
64029
64948
|
if (surfaceState.kind !== "available" || !background) return { cycleRows: [] };
|
|
64030
|
-
return { cycleRows: [
|
|
64031
|
-
|
|
64032
|
-
|
|
64033
|
-
|
|
64034
|
-
|
|
64035
|
-
|
|
64036
|
-
|
|
64037
|
-
|
|
64038
|
-
|
|
64039
|
-
|
|
64040
|
-
|
|
64041
|
-
|
|
64042
|
-
|
|
64043
|
-
|
|
64044
|
-
|
|
64045
|
-
|
|
64046
|
-
|
|
64047
|
-
|
|
64048
|
-
|
|
64049
|
-
|
|
64050
|
-
|
|
64051
|
-
|
|
64052
|
-
|
|
64053
|
-
onNext: () => customize?.cycleSurfaceLook(surface, "next")
|
|
64054
|
-
},
|
|
64055
|
-
...background.available ? [{
|
|
64056
|
-
label: "Background",
|
|
64057
|
-
valueLabel: background.currentLabel,
|
|
64058
|
-
previousLabel: `Previous ${surface} background`,
|
|
64059
|
-
nextLabel: `Next ${surface} background`,
|
|
64060
|
-
availability: cycleAvailabilityFromFlags({
|
|
64061
|
-
canCycle: background.quickTokens.length > 0,
|
|
64062
|
-
applyAllowed: surfaceState.applyAllowed
|
|
64063
|
-
}),
|
|
64064
|
-
onPrevious: () => customize?.cycleSurfaceBackground(surface, "prev"),
|
|
64065
|
-
onNext: () => customize?.cycleSurfaceBackground(surface, "next")
|
|
64066
|
-
}] : []
|
|
64067
|
-
] };
|
|
64949
|
+
return { cycleRows: [...surfaceState.surface === "header" || surfaceState.surface === "footer" ? [{
|
|
64950
|
+
label: "Layout",
|
|
64951
|
+
valueLabel: surfaceState.currentLayoutLabel,
|
|
64952
|
+
previousLabel: `Previous ${surface} Layout`,
|
|
64953
|
+
nextLabel: `Next ${surface} Layout`,
|
|
64954
|
+
availability: cycleAvailabilityFromFlags({
|
|
64955
|
+
canCycle: cycleableLayoutOptionCount > 1,
|
|
64956
|
+
applyAllowed: surfaceState.applyAllowed
|
|
64957
|
+
}),
|
|
64958
|
+
onPrevious: () => customize?.cycleSurfaceLayout(surface, "prev"),
|
|
64959
|
+
onNext: () => customize?.cycleSurfaceLayout(surface, "next")
|
|
64960
|
+
}] : [], {
|
|
64961
|
+
label: "Look",
|
|
64962
|
+
valueLabel: surfaceState.currentLabel,
|
|
64963
|
+
previousLabel: `Previous ${surface} Look`,
|
|
64964
|
+
nextLabel: `Next ${surface} Look`,
|
|
64965
|
+
availability: cycleAvailabilityFromFlags({
|
|
64966
|
+
canCycle: cycleableOptionCount > 1,
|
|
64967
|
+
applyAllowed: surfaceState.applyAllowed
|
|
64968
|
+
}),
|
|
64969
|
+
onPrevious: () => customize?.cycleSurfaceLook(surface, "prev"),
|
|
64970
|
+
onNext: () => customize?.cycleSurfaceLook(surface, "next")
|
|
64971
|
+
}] };
|
|
64068
64972
|
}, [
|
|
64069
|
-
background,
|
|
64070
64973
|
customize,
|
|
64071
64974
|
cycleableLayoutOptionCount,
|
|
64072
64975
|
cycleableOptionCount,
|
|
64073
64976
|
surface,
|
|
64074
64977
|
surfaceState
|
|
64075
64978
|
]);
|
|
64979
|
+
useEffect(() => {
|
|
64980
|
+
if (!popover.open) setBackgroundChooserOpen(false);
|
|
64981
|
+
}, [popover.open]);
|
|
64076
64982
|
return /* @__PURE__ */ jsxs(PreviewChromeFloatingControl, {
|
|
64077
64983
|
anchorSelector: "[data-preview-site-chrome-surface]",
|
|
64078
64984
|
anchorTargetSelector: surface === "header" ? SITE_CHROME_VISIBLE_HEADER_SELECTOR : void 0,
|
|
@@ -64102,10 +65008,29 @@ function SiteChromeCustomizeButton({ surface, containerClassName = "pointer-even
|
|
|
64102
65008
|
side: popoverSide,
|
|
64103
65009
|
children: [
|
|
64104
65010
|
controlPlan.cycleRows.map((row) => /* @__PURE__ */ jsx(CustomizeCycleRow, { ...row }, row.label)),
|
|
64105
|
-
background?.available ? /* @__PURE__ */ jsx(
|
|
64106
|
-
surface: surfaceState.surface,
|
|
65011
|
+
background?.available ? /* @__PURE__ */ jsx(SiteChromeBackgroundControl, {
|
|
64107
65012
|
background,
|
|
64108
65013
|
applyAllowed: surfaceState.applyAllowed,
|
|
65014
|
+
chooserOpen: backgroundChooserOpen,
|
|
65015
|
+
onToggleChooser: (event) => {
|
|
65016
|
+
event.preventDefault();
|
|
65017
|
+
event.stopPropagation();
|
|
65018
|
+
setBackgroundChooserOpen((open) => !open);
|
|
65019
|
+
},
|
|
65020
|
+
onCycleMode: (direction, event) => {
|
|
65021
|
+
event.preventDefault();
|
|
65022
|
+
event.stopPropagation();
|
|
65023
|
+
chooseSiteChromeBackgroundMode({
|
|
65024
|
+
background,
|
|
65025
|
+
direction,
|
|
65026
|
+
onChoose: (override) => customize?.chooseSurfaceBackground(surfaceState.surface, override)
|
|
65027
|
+
});
|
|
65028
|
+
},
|
|
65029
|
+
onCycleValue: (direction, event) => {
|
|
65030
|
+
event.preventDefault();
|
|
65031
|
+
event.stopPropagation();
|
|
65032
|
+
customize?.cycleSurfaceBackground(surfaceState.surface, direction);
|
|
65033
|
+
},
|
|
64109
65034
|
onChoose: (override) => customize?.chooseSurfaceBackground(surfaceState.surface, override)
|
|
64110
65035
|
}) : null,
|
|
64111
65036
|
surfaceState.surface === "header" ? /* @__PURE__ */ jsxs("div", {
|
|
@@ -64128,7 +65053,7 @@ function SiteChromeCustomizeButton({ surface, containerClassName = "pointer-even
|
|
|
64128
65053
|
})]
|
|
64129
65054
|
}), /* @__PURE__ */ jsxs("label", {
|
|
64130
65055
|
className: "block text-xs font-medium text-muted-foreground",
|
|
64131
|
-
children: [/* @__PURE__ */ jsx("span", { children:
|
|
65056
|
+
children: [/* @__PURE__ */ jsx("span", { children: surfaceState.brandSizeLabel }), /* @__PURE__ */ jsx("select", {
|
|
64132
65057
|
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",
|
|
64133
65058
|
value: surfaceState.logoSize,
|
|
64134
65059
|
onChange: (event) => {
|
|
@@ -64143,6 +65068,23 @@ function SiteChromeCustomizeButton({ surface, containerClassName = "pointer-even
|
|
|
64143
65068
|
})]
|
|
64144
65069
|
})]
|
|
64145
65070
|
}) : null,
|
|
65071
|
+
/* @__PURE__ */ jsx("div", {
|
|
65072
|
+
className: "border-t pt-2",
|
|
65073
|
+
children: /* @__PURE__ */ jsx("button", {
|
|
65074
|
+
type: "button",
|
|
65075
|
+
className: "w-full rounded-md border bg-background px-3 py-2 text-sm font-medium hover:bg-muted",
|
|
65076
|
+
onClick: (event) => {
|
|
65077
|
+
event.preventDefault();
|
|
65078
|
+
event.stopPropagation();
|
|
65079
|
+
requestPreviewSidebarOpen({
|
|
65080
|
+
tab: "editor",
|
|
65081
|
+
designRow: surfaceState.surface === "header" ? "header-style" : "footer"
|
|
65082
|
+
});
|
|
65083
|
+
popover.close();
|
|
65084
|
+
},
|
|
65085
|
+
children: "More options"
|
|
65086
|
+
})
|
|
65087
|
+
}),
|
|
64146
65088
|
surfaceState.diagnostics.length > 0 ? /* @__PURE__ */ jsx("ul", {
|
|
64147
65089
|
className: "space-y-1 text-xs text-amber-700",
|
|
64148
65090
|
children: surfaceState.diagnostics.map((diagnostic) => /* @__PURE__ */ jsx("li", { children: diagnostic }, diagnostic))
|
|
@@ -64223,77 +65165,73 @@ function chooseSiteChromeCustomizePopoverSide(input) {
|
|
|
64223
65165
|
if (measuredPanelHeight <= availableBelow) return "below";
|
|
64224
65166
|
return availableAbove > availableBelow ? "above" : "below";
|
|
64225
65167
|
}
|
|
64226
|
-
function
|
|
65168
|
+
function SiteChromeBackgroundControl({ background, applyAllowed, chooserOpen, onToggleChooser, onCycleMode, onCycleValue, onChoose }) {
|
|
64227
65169
|
const choose = (override) => (event) => {
|
|
64228
65170
|
event.preventDefault();
|
|
64229
65171
|
event.stopPropagation();
|
|
64230
65172
|
onChoose(override);
|
|
64231
65173
|
};
|
|
64232
|
-
|
|
65174
|
+
const canCycleMode = applyAllowed && (background.current.kind === "color" || background.quickTokens.length > 0);
|
|
65175
|
+
const canCycleValue = applyAllowed && background.current.kind === "color" && background.quickTokens.length > 1;
|
|
65176
|
+
return /* @__PURE__ */ jsx("div", {
|
|
64233
65177
|
className: "border-t pt-3",
|
|
64234
|
-
children:
|
|
64235
|
-
|
|
64236
|
-
|
|
64237
|
-
|
|
64238
|
-
|
|
64239
|
-
|
|
64240
|
-
|
|
64241
|
-
|
|
64242
|
-
|
|
64243
|
-
|
|
64244
|
-
|
|
64245
|
-
|
|
64246
|
-
|
|
64247
|
-
|
|
64248
|
-
|
|
64249
|
-
|
|
64250
|
-
|
|
64251
|
-
token,
|
|
64252
|
-
|
|
64253
|
-
|
|
65178
|
+
children: /* @__PURE__ */ jsx(CustomizeBackgroundControlRows, {
|
|
65179
|
+
modeLabel: siteChromeBackgroundModeLabel(background.current),
|
|
65180
|
+
valueLabel: background.currentLabel,
|
|
65181
|
+
valueAriaLabel: `Choose background ${background.currentLabel.toLowerCase()}`,
|
|
65182
|
+
swatch: /* @__PURE__ */ jsx(SiteChromeBackgroundSwatch, { override: background.current }),
|
|
65183
|
+
chooserOpen,
|
|
65184
|
+
canCycleMode,
|
|
65185
|
+
canCycleValue,
|
|
65186
|
+
onCycleMode,
|
|
65187
|
+
onCycleValue,
|
|
65188
|
+
onToggleChooser,
|
|
65189
|
+
chooser: /* @__PURE__ */ jsx("div", {
|
|
65190
|
+
className: "mt-2 max-h-80 overflow-y-auto rounded-md border bg-muted/20 p-2",
|
|
65191
|
+
children: /* @__PURE__ */ jsx(CustomizeBackgroundColorPicker, {
|
|
65192
|
+
title: "Colors",
|
|
65193
|
+
defaultSelected: background.current.kind === "default",
|
|
65194
|
+
onChooseDefault: choose({ kind: "default" }),
|
|
65195
|
+
selectedToken: background.current.kind === "color" ? background.current.token : null,
|
|
65196
|
+
recommendedTokens: background.quickTokens,
|
|
65197
|
+
advancedTokens: background.advancedTokens,
|
|
64254
65198
|
disabled: !applyAllowed,
|
|
64255
|
-
|
|
64256
|
-
|
|
64257
|
-
|
|
64258
|
-
|
|
64259
|
-
}, token))
|
|
64260
|
-
}),
|
|
64261
|
-
background.advancedTokens.length ? /* @__PURE__ */ jsxs("details", {
|
|
64262
|
-
className: "mt-2",
|
|
64263
|
-
children: [/* @__PURE__ */ jsx("summary", {
|
|
64264
|
-
className: "cursor-pointer text-xs text-muted-foreground",
|
|
64265
|
-
children: "More colors"
|
|
64266
|
-
}), /* @__PURE__ */ jsx("div", {
|
|
64267
|
-
className: "mt-1 grid grid-cols-3 gap-1",
|
|
64268
|
-
children: background.advancedTokens.map((token) => /* @__PURE__ */ jsx(BackgroundSwatchButton, {
|
|
64269
|
-
token,
|
|
64270
|
-
surface,
|
|
64271
|
-
selected: background.current.kind === "color" && background.current.token === token,
|
|
64272
|
-
disabled: !applyAllowed,
|
|
64273
|
-
onClick: choose({
|
|
65199
|
+
labelForToken: formatSiteChromeBackgroundTokenLabel,
|
|
65200
|
+
swatchColorForToken: tokenSwatchCss$1,
|
|
65201
|
+
onChooseToken: (token, event) => {
|
|
65202
|
+
choose({
|
|
64274
65203
|
kind: "color",
|
|
64275
65204
|
token
|
|
64276
|
-
})
|
|
64277
|
-
}
|
|
64278
|
-
})
|
|
64279
|
-
})
|
|
64280
|
-
|
|
65205
|
+
})(event);
|
|
65206
|
+
}
|
|
65207
|
+
})
|
|
65208
|
+
})
|
|
65209
|
+
})
|
|
64281
65210
|
});
|
|
64282
65211
|
}
|
|
64283
|
-
function
|
|
64284
|
-
|
|
64285
|
-
|
|
64286
|
-
|
|
64287
|
-
|
|
64288
|
-
|
|
64289
|
-
|
|
64290
|
-
|
|
64291
|
-
|
|
64292
|
-
|
|
64293
|
-
|
|
64294
|
-
|
|
64295
|
-
|
|
64296
|
-
|
|
65212
|
+
function chooseSiteChromeBackgroundMode({ background, direction, onChoose }) {
|
|
65213
|
+
if (background.current.kind === "color") {
|
|
65214
|
+
onChoose({ kind: "default" });
|
|
65215
|
+
return;
|
|
65216
|
+
}
|
|
65217
|
+
const token = direction === "next" ? background.quickTokens[0] : background.quickTokens[background.quickTokens.length - 1];
|
|
65218
|
+
if (token) onChoose({
|
|
65219
|
+
kind: "color",
|
|
65220
|
+
token
|
|
65221
|
+
});
|
|
65222
|
+
}
|
|
65223
|
+
function siteChromeBackgroundModeLabel(override) {
|
|
65224
|
+
return override.kind === "default" ? "Default" : "Color";
|
|
65225
|
+
}
|
|
65226
|
+
function SiteChromeBackgroundSwatch({ override }) {
|
|
65227
|
+
const baseClassName = "grid h-6 w-9 shrink-0 place-items-center overflow-hidden rounded-md border";
|
|
65228
|
+
if (override.kind === "default") return /* @__PURE__ */ jsx("span", {
|
|
65229
|
+
className: `${baseClassName} bg-background`,
|
|
65230
|
+
children: /* @__PURE__ */ jsx("span", { className: "h-3 w-3 rounded-full border bg-muted" })
|
|
65231
|
+
});
|
|
65232
|
+
return /* @__PURE__ */ jsx("span", {
|
|
65233
|
+
className: baseClassName,
|
|
65234
|
+
style: { backgroundColor: tokenSwatchCss$1(override.token) }
|
|
64297
65235
|
});
|
|
64298
65236
|
}
|
|
64299
65237
|
function tokenSwatchCss$1(token) {
|
|
@@ -64565,17 +65503,17 @@ function LinkedEntryEditEventBridge() {
|
|
|
64565
65503
|
//#region ../preview-next/src/client/preview/PreviewShellLayout.tsx
|
|
64566
65504
|
const previewContainerResponsiveEnabled = process.env.NEXT_PUBLIC_ENABLE_PREVIEW_CONTAINER_RESPONSIVE !== "false";
|
|
64567
65505
|
const PreviewEditorSidebar = React.lazy(async () => {
|
|
64568
|
-
return { default: (await import("./PreviewEditorSidebar-
|
|
65506
|
+
return { default: (await import("./PreviewEditorSidebar-ywqcYjTB.mjs")).PreviewEditorSidebar };
|
|
64569
65507
|
});
|
|
64570
65508
|
const PreviewEditorUI = React.lazy(async () => {
|
|
64571
|
-
return { default: (await import("./PreviewEditorUI-
|
|
65509
|
+
return { default: (await import("./PreviewEditorUI-DApUNF6g.mjs")).PreviewEditorUI };
|
|
64572
65510
|
});
|
|
64573
65511
|
const previewPaneContainmentStyle = {
|
|
64574
65512
|
contain: "layout paint",
|
|
64575
65513
|
isolation: "isolate",
|
|
64576
65514
|
transform: "translateZ(0)"
|
|
64577
65515
|
};
|
|
64578
|
-
function PreviewShellLayout({ children, theme, surfaceId, siteId, dashboardBaseUrl = null, pageId, entryData, contentTypeSchema, referenceContentTypeKeys = [], draftContent, currentTemplate, apiClient, bearerToken, themeId = null, themeSelectionId = null, themeSelectionVersion = null, themeSelectionUpdatedAt = null, themeSelectionButtonPersonalityId = null, themeSelectionPaletteVariantId = null, themeSelectionPaletteOverrides = null, themeSelectionHeaderLayoutId = null, themeSelectionHeaderStyleId = null, themeSelectionTypographyPresetId = null, themeSelectionTypographyBodyFontOverride = null, themeSelectionTypographyHeadingFontOverride = null, themeSelectionHeaderLookId = null, themeSelectionFooterLookId = null, themeSelectionHeaderContext, themeSelectionFooterContext, supabaseUrl, isSiteLaunched, maintenanceModeEnabled, entrySubrouteContext, assistantPanel, sdkConfig, mediaAssets, bookingOfferingPresets, themeRuntime = defaultPreviewThemeRuntime, siteStyleAccess = { kind: "hidden" } }) {
|
|
65516
|
+
function PreviewShellLayout({ children, theme, surfaceId, siteId, dashboardBaseUrl = null, pageId, entryData, contentTypeSchema, referenceContentTypeKeys = [], draftContent, currentTemplate, apiClient, bearerToken, themeId = null, themeSelectionId = null, themeSelectionVersion = null, themeSelectionUpdatedAt = null, themeSelectionButtonPersonalityId = null, runtimePaletteState = null, themeSelectionPaletteVariantId = null, themeSelectionPaletteOverrides = null, themeSelectionHeaderLayoutId = null, themeSelectionHeaderStyleId = null, themeSelectionTypographyPresetId = null, themeSelectionTypographyBodyFontOverride = null, themeSelectionTypographyHeadingFontOverride = null, themeSelectionHeaderLookId = null, themeSelectionFooterLookId = null, themeSelectionHeaderContext, themeSelectionFooterContext, supabaseUrl, isSiteLaunched, maintenanceModeEnabled, entrySubrouteContext, assistantPanel, sdkConfig, mediaAssets, bookingOfferingPresets, themeRuntime = defaultPreviewThemeRuntime, siteStyleAccess = { kind: "hidden" } }) {
|
|
64579
65517
|
const layout = useOptionalPreviewLayout();
|
|
64580
65518
|
const headerNode = layout?.headerNode ?? null;
|
|
64581
65519
|
const bannerNode = layout?.bannerNode ?? null;
|
|
@@ -64765,6 +65703,7 @@ function PreviewShellLayout({ children, theme, surfaceId, siteId, dashboardBaseU
|
|
|
64765
65703
|
themeSelectionVersion,
|
|
64766
65704
|
themeSelectionUpdatedAt,
|
|
64767
65705
|
themeSelectionButtonPersonalityId,
|
|
65706
|
+
runtimePaletteState,
|
|
64768
65707
|
themeSelectionPaletteVariantId,
|
|
64769
65708
|
themeSelectionPaletteOverrides,
|
|
64770
65709
|
themeSelectionHeaderLayoutId,
|
|
@@ -64824,6 +65763,7 @@ function PreviewShellLayout({ children, theme, surfaceId, siteId, dashboardBaseU
|
|
|
64824
65763
|
selectionVersion: themeSelectionVersion,
|
|
64825
65764
|
selectionUpdatedAt: themeSelectionUpdatedAt,
|
|
64826
65765
|
buttonPersonalityId: themeSelectionButtonPersonalityId,
|
|
65766
|
+
runtimePaletteState,
|
|
64827
65767
|
paletteVariantId: themeSelectionPaletteVariantId,
|
|
64828
65768
|
paletteOverrides: themeSelectionPaletteOverrides,
|
|
64829
65769
|
headerLayoutId: themeSelectionHeaderLayoutId,
|
|
@@ -64866,7 +65806,7 @@ function PreviewShellLayout({ children, theme, surfaceId, siteId, dashboardBaseU
|
|
|
64866
65806
|
}
|
|
64867
65807
|
//#endregion
|
|
64868
65808
|
//#region ../preview-next/src/client/preview/PreviewShell.tsx
|
|
64869
|
-
function PreviewShell({ children, apiBaseUrl, blockApiConfig, siteId, siteSlug, editableId, previewSession, previewToken, dashboardBaseUrl = null, surfaceId, theme, themeId = null, themeSelectionId = null, themeSelectionVersion = null, themeSelectionUpdatedAt = null, themeSelectionButtonPersonalityId = null, themeSelectionPaletteVariantId = null, themeSelectionPaletteOverrides = null, themeSelectionHeaderLayoutId = null, themeSelectionHeaderStyleId = null, themeSelectionTypographyPresetId = null, themeSelectionTypographyBodyFontOverride = null, themeSelectionTypographyHeadingFontOverride = null, themeSelectionHeaderLookId = null, themeSelectionFooterLookId = null, themeSelectionHeaderContext, themeSelectionFooterContext, pageId, routeId, entryData, contentTypeSchema, referenceContentTypeKeys = [], draftContent, currentTemplate, initialStatus, initialBlocks, pageMetadata, isSiteLaunched, maintenanceModeEnabled, entrySubrouteContext, assistantPanel, sdkConfig, mediaAssets, bookingOfferingPresets, supabaseUrl, themeRuntime = defaultPreviewThemeRuntime, designEditorEligibility, baseFetch }) {
|
|
65809
|
+
function PreviewShell({ children, apiBaseUrl, blockApiConfig, siteId, siteSlug, editableId, previewSession, previewToken, dashboardBaseUrl = null, surfaceId, theme, themeId = null, themeSelectionId = null, themeSelectionVersion = null, themeSelectionUpdatedAt = null, themeSelectionButtonPersonalityId = null, runtimePaletteState = null, themeSelectionPaletteVariantId = null, themeSelectionPaletteOverrides = null, themeSelectionHeaderLayoutId = null, themeSelectionHeaderStyleId = null, themeSelectionTypographyPresetId = null, themeSelectionTypographyBodyFontOverride = null, themeSelectionTypographyHeadingFontOverride = null, themeSelectionHeaderLookId = null, themeSelectionFooterLookId = null, themeSelectionHeaderContext, themeSelectionFooterContext, pageId, routeId, entryData, contentTypeSchema, referenceContentTypeKeys = [], draftContent, currentTemplate, initialStatus, initialBlocks, pageMetadata, isSiteLaunched, maintenanceModeEnabled, entrySubrouteContext, assistantPanel, sdkConfig, mediaAssets, bookingOfferingPresets, supabaseUrl, themeRuntime = defaultPreviewThemeRuntime, designEditorEligibility, baseFetch }) {
|
|
64870
65810
|
const apiClient = useMemo(() => createBearerAPIClient(previewToken, apiBaseUrl), [previewToken, apiBaseUrl]);
|
|
64871
65811
|
const resolvedDesignEditorEligibility = designEditorEligibility ?? defaultDesignEditorEligibility({
|
|
64872
65812
|
pageId,
|
|
@@ -64924,6 +65864,7 @@ function PreviewShell({ children, apiBaseUrl, blockApiConfig, siteId, siteSlug,
|
|
|
64924
65864
|
themeSelectionVersion,
|
|
64925
65865
|
themeSelectionUpdatedAt,
|
|
64926
65866
|
themeSelectionButtonPersonalityId,
|
|
65867
|
+
runtimePaletteState,
|
|
64927
65868
|
themeSelectionPaletteVariantId,
|
|
64928
65869
|
themeSelectionPaletteOverrides,
|
|
64929
65870
|
themeSelectionHeaderLayoutId,
|
|
@@ -64963,11 +65904,11 @@ function defaultDesignEditorEligibility(input) {
|
|
|
64963
65904
|
//#region ../preview-next/src/client/utils/path.ts
|
|
64964
65905
|
const PATH_SEPARATOR_REGEX = /\./g;
|
|
64965
65906
|
const BRACKET_ACCESS_REGEX = /\[([^\]]+)\]/g;
|
|
64966
|
-
function isRecord$
|
|
65907
|
+
function isRecord$5(value) {
|
|
64967
65908
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
64968
65909
|
}
|
|
64969
65910
|
function isPathContainer(value) {
|
|
64970
|
-
return Array.isArray(value) || isRecord$
|
|
65911
|
+
return Array.isArray(value) || isRecord$5(value);
|
|
64971
65912
|
}
|
|
64972
65913
|
function createPathContainer(nextIsIndex) {
|
|
64973
65914
|
return nextIsIndex ? [] : {};
|
|
@@ -65120,28 +66061,33 @@ function cloneRecord(value) {
|
|
|
65120
66061
|
//#endregion
|
|
65121
66062
|
//#region ../preview-next/src/client/blocks/previewProjection/runtimeContentDecoration.ts
|
|
65122
66063
|
function runtimeContentDecorationProjectionFromEditorModel(editorModel, surfaceResolutionContext, designRules) {
|
|
66064
|
+
const compiled = compileEditorModelRuntime({
|
|
66065
|
+
editorModel,
|
|
66066
|
+
surfaceResolutionContext,
|
|
66067
|
+
designRules
|
|
66068
|
+
});
|
|
65123
66069
|
return {
|
|
65124
66070
|
kind: "runtime-content-decoration",
|
|
65125
66071
|
source: "page-design",
|
|
65126
|
-
fieldsByBlockId:
|
|
65127
|
-
|
|
65128
|
-
surfaceResolutionContext,
|
|
65129
|
-
designRules
|
|
65130
|
-
})
|
|
66072
|
+
fieldsByBlockId: runtimeFieldsByBlockId(compiled.blocks),
|
|
66073
|
+
boundaries: compiled.boundaries
|
|
65131
66074
|
};
|
|
65132
66075
|
}
|
|
66076
|
+
function runtimeFieldsByBlockId(blocks) {
|
|
66077
|
+
return new Map(blocks.map((block) => [block.blockId, block.fields]));
|
|
66078
|
+
}
|
|
65133
66079
|
function applyRuntimeContentDecorationProjection(block, content, projection, adjacency) {
|
|
65134
66080
|
const blockId = designBlockIdFromBlockItem(block);
|
|
65135
66081
|
const retargetedFields = retargetCompiledRuntimeFieldsForContentAdjacency(blockId ? projection.fieldsByBlockId.get(blockId) : void 0, {
|
|
65136
|
-
currentContent: isRecord$
|
|
66082
|
+
currentContent: isRecord$4(content) ? content : null,
|
|
65137
66083
|
nextContent: adjacency?.nextContent
|
|
65138
66084
|
});
|
|
65139
|
-
return applyCompiledRuntimeFieldsToContent(isRecord$
|
|
66085
|
+
return applyCompiledRuntimeFieldsToContent(isRecord$4(content) ? content : {}, retargetedFields);
|
|
65140
66086
|
}
|
|
65141
66087
|
function designBlockIdFromBlockItem(block) {
|
|
65142
66088
|
return typeof block.id === "string" && block.id.length > 0 ? asDesignBlockId(block.id) : null;
|
|
65143
66089
|
}
|
|
65144
|
-
function isRecord$
|
|
66090
|
+
function isRecord$4(value) {
|
|
65145
66091
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
65146
66092
|
}
|
|
65147
66093
|
//#endregion
|
|
@@ -65192,7 +66138,7 @@ function overlayValue(value, overlays) {
|
|
|
65192
66138
|
});
|
|
65193
66139
|
return changed ? next : value;
|
|
65194
66140
|
}
|
|
65195
|
-
if (!isRecord$
|
|
66141
|
+
if (!isRecord$3(value)) return value;
|
|
65196
66142
|
const meta = parseLinkedEntryMeta(value[LINKED_CONTENT_ENTRY_META_KEY]);
|
|
65197
66143
|
if (meta) {
|
|
65198
66144
|
const overlay = overlays.get(unsafeAsLinkedContentEntryId(meta.entryId));
|
|
@@ -65258,7 +66204,7 @@ function resolveOverlayTitle(content, meta) {
|
|
|
65258
66204
|
function parseLinkedEntryMeta(value) {
|
|
65259
66205
|
return getLinkedContentEntryMeta({ [LINKED_CONTENT_ENTRY_META_KEY]: value });
|
|
65260
66206
|
}
|
|
65261
|
-
function isRecord$
|
|
66207
|
+
function isRecord$3(value) {
|
|
65262
66208
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
65263
66209
|
}
|
|
65264
66210
|
//#endregion
|
|
@@ -65300,9 +66246,9 @@ function readProjectedDraftRenderContent(block, editorBlockId, snap, projections
|
|
|
65300
66246
|
return applyPreviewContentFieldProjections(editorBlockId, snap?.current ?? snap?.baseline ?? block.content ?? block.publishedContent ?? null, projections);
|
|
65301
66247
|
}
|
|
65302
66248
|
function renderContent(block, content, projections, linkedEntryOverlays, nextContent) {
|
|
65303
|
-
return applyPreviewRuntimeContentProjections(block, applyLinkedEntryRenderOverlay(content, linkedEntryOverlays), projections, { nextContent: isRecord$
|
|
66249
|
+
return applyPreviewRuntimeContentProjections(block, applyLinkedEntryRenderOverlay(content, linkedEntryOverlays), projections, { nextContent: isRecord$2(nextContent) ? nextContent : null });
|
|
65304
66250
|
}
|
|
65305
|
-
function isRecord$
|
|
66251
|
+
function isRecord$2(value) {
|
|
65306
66252
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
65307
66253
|
}
|
|
65308
66254
|
//#endregion
|
|
@@ -65517,7 +66463,7 @@ const editorRegistry = {
|
|
|
65517
66463
|
};
|
|
65518
66464
|
//#endregion
|
|
65519
66465
|
//#region ../preview-next/src/client/blocks/isRecord.ts
|
|
65520
|
-
function isRecord(value) {
|
|
66466
|
+
function isRecord$1(value) {
|
|
65521
66467
|
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
65522
66468
|
}
|
|
65523
66469
|
//#endregion
|
|
@@ -65691,7 +66637,7 @@ function BlockToolbar({ blockId, blockKind, content, bookingOfferingPresets, the
|
|
|
65691
66637
|
const uiStore = useEditorUiStoreInstance();
|
|
65692
66638
|
const editorBlockId = useMemo(() => unsafeAsEditorBlockId(blockId), [blockId]);
|
|
65693
66639
|
const draftContent = useEditorUiStore((state) => state.drafts.getCurrentValues(editorBlockId));
|
|
65694
|
-
const customizeContent = useMemo(() => isRecord(draftContent) ? draftContent : content, [content, draftContent]);
|
|
66640
|
+
const customizeContent = useMemo(() => isRecord$1(draftContent) ? draftContent : content, [content, draftContent]);
|
|
65695
66641
|
const customizeSelection = usePreviewBlockCustomizeSelectionOptional();
|
|
65696
66642
|
const popover = useCustomizePopoverController();
|
|
65697
66643
|
const focusTarget = useMemo(() => computeDefaultFocus(blockKind, customizeContent), [blockKind, customizeContent]);
|
|
@@ -65980,99 +66926,37 @@ function renderBlockCustomizeBuiltinRow(row, context) {
|
|
|
65980
66926
|
}, "look");
|
|
65981
66927
|
case "background":
|
|
65982
66928
|
if (context.currentBackground.kind !== "supported" || !context.backgroundCapability) return null;
|
|
65983
|
-
return /* @__PURE__ */
|
|
65984
|
-
|
|
65985
|
-
|
|
65986
|
-
|
|
65987
|
-
|
|
65988
|
-
|
|
65989
|
-
|
|
65990
|
-
|
|
65991
|
-
|
|
65992
|
-
|
|
65993
|
-
|
|
65994
|
-
|
|
65995
|
-
|
|
65996
|
-
|
|
65997
|
-
|
|
65998
|
-
|
|
65999
|
-
|
|
66000
|
-
|
|
66001
|
-
|
|
66002
|
-
|
|
66003
|
-
|
|
66004
|
-
|
|
66005
|
-
|
|
66006
|
-
|
|
66007
|
-
|
|
66008
|
-
|
|
66009
|
-
|
|
66010
|
-
|
|
66011
|
-
|
|
66012
|
-
|
|
66013
|
-
|
|
66014
|
-
direction: "next"
|
|
66015
|
-
}),
|
|
66016
|
-
className: "grid h-8 w-8 place-items-center hover:bg-muted disabled:cursor-not-allowed disabled:opacity-50",
|
|
66017
|
-
"aria-label": "Next background mode",
|
|
66018
|
-
disabled: !context.canCycleBackgroundMode,
|
|
66019
|
-
children: /* @__PURE__ */ jsx(ChevronRight, { size: 14 })
|
|
66020
|
-
})
|
|
66021
|
-
]
|
|
66022
|
-
}),
|
|
66023
|
-
/* @__PURE__ */ jsxs("div", {
|
|
66024
|
-
className: "flex items-stretch overflow-hidden rounded-full border bg-background",
|
|
66025
|
-
children: [
|
|
66026
|
-
/* @__PURE__ */ jsx("button", {
|
|
66027
|
-
type: "button",
|
|
66028
|
-
onClick: context.handleBackgroundCycle({
|
|
66029
|
-
kind: "cycle-value",
|
|
66030
|
-
direction: "prev"
|
|
66031
|
-
}),
|
|
66032
|
-
className: "grid h-8 w-8 place-items-center hover:bg-muted disabled:cursor-not-allowed disabled:opacity-50",
|
|
66033
|
-
"aria-label": "Previous background value",
|
|
66034
|
-
disabled: !context.canCycleBackgroundValue,
|
|
66035
|
-
children: /* @__PURE__ */ jsx(ChevronLeft, { size: 14 })
|
|
66036
|
-
}),
|
|
66037
|
-
/* @__PURE__ */ jsxs("button", {
|
|
66038
|
-
type: "button",
|
|
66039
|
-
className: "flex min-w-0 flex-1 items-center justify-center gap-2 border-x px-2 py-1 text-center hover:bg-muted",
|
|
66040
|
-
"aria-expanded": context.backgroundChooserOpen,
|
|
66041
|
-
"aria-label": `Choose background ${backgroundOverrideLabel(context.currentBackground.override).toLowerCase()}`,
|
|
66042
|
-
onClick: (event) => {
|
|
66043
|
-
event.preventDefault();
|
|
66044
|
-
event.stopPropagation();
|
|
66045
|
-
context.onToggleBackgroundChooser();
|
|
66046
|
-
},
|
|
66047
|
-
children: [/* @__PURE__ */ jsx(BackgroundPreviewSwatch, {
|
|
66048
|
-
override: context.currentBackground.override,
|
|
66049
|
-
imagePool: context.mergedBackgroundImagePool
|
|
66050
|
-
}), /* @__PURE__ */ jsx("span", {
|
|
66051
|
-
className: "truncate text-xs font-medium",
|
|
66052
|
-
children: backgroundOverrideValueLabel(context.currentBackground.override, context.mergedBackgroundImagePool)
|
|
66053
|
-
})]
|
|
66054
|
-
}),
|
|
66055
|
-
/* @__PURE__ */ jsx("button", {
|
|
66056
|
-
type: "button",
|
|
66057
|
-
onClick: context.handleBackgroundCycle({
|
|
66058
|
-
kind: "cycle-value",
|
|
66059
|
-
direction: "next"
|
|
66060
|
-
}),
|
|
66061
|
-
className: "grid h-8 w-8 place-items-center hover:bg-muted disabled:cursor-not-allowed disabled:opacity-50",
|
|
66062
|
-
"aria-label": "Next background value",
|
|
66063
|
-
disabled: !context.canCycleBackgroundValue,
|
|
66064
|
-
children: /* @__PURE__ */ jsx(ChevronRight, { size: 14 })
|
|
66065
|
-
})
|
|
66066
|
-
]
|
|
66067
|
-
}),
|
|
66068
|
-
context.backgroundChooserOpen ? /* @__PURE__ */ jsx(BackgroundChooser, {
|
|
66069
|
-
capability: context.backgroundCapability,
|
|
66070
|
-
current: context.currentBackground.override,
|
|
66071
|
-
imagePoolStatus: context.imagePoolStatus,
|
|
66072
|
-
onChoose: context.onChooseBackgroundOverride
|
|
66073
|
-
}) : null
|
|
66074
|
-
]
|
|
66075
|
-
}, "background");
|
|
66929
|
+
return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(CustomizeBackgroundControlRows, {
|
|
66930
|
+
modeLabel: backgroundModeLabel(context.currentBackground.override.kind),
|
|
66931
|
+
valueLabel: backgroundOverrideValueLabel(context.currentBackground.override, context.mergedBackgroundImagePool),
|
|
66932
|
+
valueAriaLabel: `Choose background ${backgroundOverrideLabel(context.currentBackground.override).toLowerCase()}`,
|
|
66933
|
+
swatch: /* @__PURE__ */ jsx(BackgroundPreviewSwatch, {
|
|
66934
|
+
override: context.currentBackground.override,
|
|
66935
|
+
imagePool: context.mergedBackgroundImagePool
|
|
66936
|
+
}),
|
|
66937
|
+
chooserOpen: context.backgroundChooserOpen,
|
|
66938
|
+
canCycleMode: context.canCycleBackgroundMode,
|
|
66939
|
+
canCycleValue: context.canCycleBackgroundValue,
|
|
66940
|
+
onCycleMode: (direction, event) => context.handleBackgroundCycle({
|
|
66941
|
+
kind: "cycle-mode",
|
|
66942
|
+
direction
|
|
66943
|
+
})(event),
|
|
66944
|
+
onCycleValue: (direction, event) => context.handleBackgroundCycle({
|
|
66945
|
+
kind: "cycle-value",
|
|
66946
|
+
direction
|
|
66947
|
+
})(event),
|
|
66948
|
+
onToggleChooser: (event) => {
|
|
66949
|
+
event.preventDefault();
|
|
66950
|
+
event.stopPropagation();
|
|
66951
|
+
context.onToggleBackgroundChooser();
|
|
66952
|
+
},
|
|
66953
|
+
chooser: /* @__PURE__ */ jsx(BackgroundChooser, {
|
|
66954
|
+
capability: context.backgroundCapability,
|
|
66955
|
+
current: context.currentBackground.override,
|
|
66956
|
+
imagePoolStatus: context.imagePoolStatus,
|
|
66957
|
+
onChoose: context.onChooseBackgroundOverride
|
|
66958
|
+
})
|
|
66959
|
+
}) }, "background");
|
|
66076
66960
|
case "facet": return /* @__PURE__ */ jsx(CustomizeCycleRow, {
|
|
66077
66961
|
label: row.control.label,
|
|
66078
66962
|
valueLabel: row.control.valueLabel,
|
|
@@ -66108,54 +66992,22 @@ function BackgroundChooser({ capability, current, imagePoolStatus, onChoose }) {
|
|
|
66108
66992
|
}, { selectedImage });
|
|
66109
66993
|
setMediaPickerOpenKey(0);
|
|
66110
66994
|
};
|
|
66111
|
-
const renderColorOptions = () =>
|
|
66112
|
-
|
|
66113
|
-
|
|
66114
|
-
|
|
66115
|
-
|
|
66116
|
-
|
|
66117
|
-
|
|
66118
|
-
|
|
66119
|
-
|
|
66120
|
-
|
|
66121
|
-
|
|
66122
|
-
|
|
66123
|
-
|
|
66124
|
-
|
|
66125
|
-
|
|
66126
|
-
|
|
66127
|
-
style: { backgroundColor: tokenSwatchCss(token) }
|
|
66128
|
-
}), /* @__PURE__ */ jsx("span", {
|
|
66129
|
-
className: "truncate",
|
|
66130
|
-
children: formatTokenLabel(token)
|
|
66131
|
-
})]
|
|
66132
|
-
}, token))
|
|
66133
|
-
}),
|
|
66134
|
-
advancedTokens.length ? /* @__PURE__ */ jsxs("details", {
|
|
66135
|
-
className: "mt-1",
|
|
66136
|
-
children: [/* @__PURE__ */ jsx("summary", {
|
|
66137
|
-
className: "cursor-pointer text-xs text-muted-foreground",
|
|
66138
|
-
children: "More colors"
|
|
66139
|
-
}), /* @__PURE__ */ jsx("div", {
|
|
66140
|
-
className: "mt-1 grid grid-cols-2 gap-1",
|
|
66141
|
-
children: advancedTokens.map((token) => /* @__PURE__ */ jsxs("button", {
|
|
66142
|
-
type: "button",
|
|
66143
|
-
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"}`,
|
|
66144
|
-
onClick: chooseFromClick({
|
|
66145
|
-
kind: "color",
|
|
66146
|
-
token
|
|
66147
|
-
}),
|
|
66148
|
-
children: [/* @__PURE__ */ jsx("span", {
|
|
66149
|
-
className: "h-3 w-3 shrink-0 rounded-full border",
|
|
66150
|
-
style: { backgroundColor: tokenSwatchCss(token) }
|
|
66151
|
-
}), /* @__PURE__ */ jsx("span", {
|
|
66152
|
-
className: "truncate",
|
|
66153
|
-
children: formatTokenLabel(token)
|
|
66154
|
-
})]
|
|
66155
|
-
}, token))
|
|
66156
|
-
})]
|
|
66157
|
-
}) : null
|
|
66158
|
-
] }) : null;
|
|
66995
|
+
const renderColorOptions = () => /* @__PURE__ */ jsx(CustomizeBackgroundColorPicker, {
|
|
66996
|
+
title: "Colors",
|
|
66997
|
+
selectedToken: current.kind === "color" ? current.token : null,
|
|
66998
|
+
recommendedTokens,
|
|
66999
|
+
advancedTokens,
|
|
67000
|
+
defaultSelected: current.kind === "default",
|
|
67001
|
+
onChooseDefault: capability.modes.includes("default") ? chooseFromClick(defaultBackgroundOverrideForMode("default", capability)) : void 0,
|
|
67002
|
+
labelForToken: formatTokenLabel,
|
|
67003
|
+
swatchColorForToken: tokenSwatchCss,
|
|
67004
|
+
onChooseToken: (token, event) => {
|
|
67005
|
+
chooseFromClick({
|
|
67006
|
+
kind: "color",
|
|
67007
|
+
token
|
|
67008
|
+
})(event);
|
|
67009
|
+
}
|
|
67010
|
+
});
|
|
66159
67011
|
const renderGradientOptions = () => capability.gradientIds?.length ? /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("div", {
|
|
66160
67012
|
className: "mb-1 text-xs font-medium text-muted-foreground",
|
|
66161
67013
|
children: "Gradients"
|
|
@@ -66260,16 +67112,7 @@ function BackgroundChooser({ capability, current, imagePoolStatus, onChoose }) {
|
|
|
66260
67112
|
return /* @__PURE__ */ jsxs("div", {
|
|
66261
67113
|
className: "mt-2 max-h-80 overflow-y-auto rounded-md border bg-muted/20 p-2",
|
|
66262
67114
|
children: [
|
|
66263
|
-
current.kind === "default"
|
|
66264
|
-
type: "button",
|
|
66265
|
-
className: "flex w-full items-center gap-2 rounded-md border border-foreground bg-background px-2 py-1 text-left text-xs",
|
|
66266
|
-
onClick: chooseFromClick(defaultBackgroundOverrideForMode("default", capability)),
|
|
66267
|
-
children: [/* @__PURE__ */ jsx(BackgroundPreviewSwatch, {
|
|
66268
|
-
override: current,
|
|
66269
|
-
imagePool: images
|
|
66270
|
-
}), /* @__PURE__ */ jsx("span", { children: "Default background" })]
|
|
66271
|
-
}) : null,
|
|
66272
|
-
current.kind === "color" ? renderColorOptions() : null,
|
|
67115
|
+
current.kind === "default" || current.kind === "color" ? renderColorOptions() : null,
|
|
66273
67116
|
current.kind === "gradient" ? renderGradientOptions() : null,
|
|
66274
67117
|
current.kind === "image" ? renderImageOptions() : null
|
|
66275
67118
|
]
|
|
@@ -66297,13 +67140,13 @@ function findFirstFieldPath(fields, data, prefix) {
|
|
|
66297
67140
|
if (Array.isArray(field.visibleRoles) && !field.visibleRoles.includes("author")) continue;
|
|
66298
67141
|
const nextPrefix = [...prefix, field.id];
|
|
66299
67142
|
if (field.type === "group") {
|
|
66300
|
-
const groupValue = isRecord(data) ? data[field.id] : void 0;
|
|
67143
|
+
const groupValue = isRecord$1(data) ? data[field.id] : void 0;
|
|
66301
67144
|
const nested = findFirstFieldPath(field.schema.fields, groupValue, nextPrefix);
|
|
66302
67145
|
if (nested) return nested;
|
|
66303
67146
|
continue;
|
|
66304
67147
|
}
|
|
66305
67148
|
if (field.type === "repeater" && field.schema) {
|
|
66306
|
-
const collection = isRecord(data) ? data[field.id] : void 0;
|
|
67149
|
+
const collection = isRecord$1(data) ? data[field.id] : void 0;
|
|
66307
67150
|
const items = isUnknownArray(collection) ? collection : [];
|
|
66308
67151
|
if (items.length > 0) {
|
|
66309
67152
|
const firstItem = items[0];
|
|
@@ -66785,7 +67628,8 @@ function EditablePageRenderer(props) {
|
|
|
66785
67628
|
return [
|
|
66786
67629
|
snapshots.map((s) => `${s.id}:${s.version}`).join("|"),
|
|
66787
67630
|
linkedEntries.map((entry) => `${entry.meta.entryId}:${entry.version}`).join("|"),
|
|
66788
|
-
`overlay:${overlayRevision}
|
|
67631
|
+
`overlay:${overlayRevision}`,
|
|
67632
|
+
`generated-icons:${state.generatedIconAssets?.revision ?? 0}`
|
|
66789
67633
|
].join("|");
|
|
66790
67634
|
});
|
|
66791
67635
|
const linkedEntryOverlays = useMemo(() => {
|
|
@@ -66831,6 +67675,35 @@ function EditablePageRenderer(props) {
|
|
|
66831
67675
|
uiStore,
|
|
66832
67676
|
renderStateVersion
|
|
66833
67677
|
]) ?? pageRendererProps.page;
|
|
67678
|
+
const runtimeBoundaries = useMemo(() => retargetRuntimeBoundariesForRenderPage(runtimeProjection?.boundaries ?? pageRendererProps.runtimeBoundaries ?? [], renderPage), [
|
|
67679
|
+
pageRendererProps.runtimeBoundaries,
|
|
67680
|
+
renderPage,
|
|
67681
|
+
runtimeProjection
|
|
67682
|
+
]);
|
|
67683
|
+
const renderedBlockById = useMemo(() => {
|
|
67684
|
+
return new Map((renderPage?.blocks ?? []).filter((block) => Boolean(block.id)).map((block) => [block.id, block]));
|
|
67685
|
+
}, [renderPage?.blocks]);
|
|
67686
|
+
const wrapBoundaryWithControl = useCallback((boundary, rendered) => {
|
|
67687
|
+
const previousBlock = renderedBlockById.get(boundary.previousBlockId);
|
|
67688
|
+
const nextBlock = renderedBlockById.get(boundary.nextBlockId);
|
|
67689
|
+
const control = !isEntryTemplatePage && previousBlock && nextBlock ? /* @__PURE__ */ jsx(BoundaryControl, {
|
|
67690
|
+
previousBlockId: asDesignBlockId(boundary.previousBlockId),
|
|
67691
|
+
nextBlockId: asDesignBlockId(boundary.nextBlockId),
|
|
67692
|
+
previousBlockKind: previousBlock.kind,
|
|
67693
|
+
nextBlockKind: nextBlock.kind
|
|
67694
|
+
}) : null;
|
|
67695
|
+
const wrapped = pageRendererProps.wrapBoundary ? pageRendererProps.wrapBoundary(boundary, rendered) : rendered;
|
|
67696
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
67697
|
+
className: "relative",
|
|
67698
|
+
"data-preview-boundary-wrapper": "",
|
|
67699
|
+
"data-boundary-id": boundary.boundaryId,
|
|
67700
|
+
children: [wrapped, control]
|
|
67701
|
+
});
|
|
67702
|
+
}, [
|
|
67703
|
+
isEntryTemplatePage,
|
|
67704
|
+
pageRendererProps.wrapBoundary,
|
|
67705
|
+
renderedBlockById
|
|
67706
|
+
]);
|
|
66834
67707
|
const wrapBlockWithProvider = useCallback((blockId, rendered) => {
|
|
66835
67708
|
const renderedBlocks = renderPage?.blocks ?? [];
|
|
66836
67709
|
const controllerBlockIndex = blockItemsForRender.findIndex((b) => b.id === blockId);
|
|
@@ -66838,9 +67711,6 @@ function EditablePageRenderer(props) {
|
|
|
66838
67711
|
const blockIndex = controllerBlockIndex >= 0 ? controllerBlockIndex : renderedBlockIndex;
|
|
66839
67712
|
const chromeBlocks = controllerBlockIndex >= 0 ? blockItemsForRender : renderedBlocks;
|
|
66840
67713
|
const block = blockIndex >= 0 ? chromeBlocks[blockIndex] ?? null : null;
|
|
66841
|
-
const previousBlock = blockIndex > 0 ? chromeBlocks[blockIndex - 1] ?? null : null;
|
|
66842
|
-
const canonicalBlockIndex = blockItems.findIndex((b) => b.id === blockId);
|
|
66843
|
-
const canonicalPreviousBlock = canonicalBlockIndex > 0 ? blockItems[canonicalBlockIndex - 1] ?? null : null;
|
|
66844
67714
|
const editorBlockId = unsafeAsEditorBlockId(blockId);
|
|
66845
67715
|
if (!block) return /* @__PURE__ */ jsx(EditableBlockProvider, {
|
|
66846
67716
|
blockId,
|
|
@@ -66853,12 +67723,7 @@ function EditablePageRenderer(props) {
|
|
|
66853
67723
|
children: /* @__PURE__ */ jsxs(Fragment$1, { children: [rendered, /* @__PURE__ */ jsxs(Fragment$1, { children: [blockHasPreviewContentFieldProjection(editorBlockId, aiProjections) ? /* @__PURE__ */ jsx("span", {
|
|
66854
67724
|
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",
|
|
66855
67725
|
children: "AI"
|
|
66856
|
-
}) : null, !isEntryTemplatePage ? /* @__PURE__ */
|
|
66857
|
-
previousBlockId: asDesignBlockId(previousBlock.id),
|
|
66858
|
-
nextBlockId: asDesignBlockId(blockId),
|
|
66859
|
-
previousBlockKind: previousBlock.kind,
|
|
66860
|
-
nextBlockKind: block.kind
|
|
66861
|
-
}) : null, /* @__PURE__ */ jsx(BlockToolbar, {
|
|
67726
|
+
}) : null, !isEntryTemplatePage ? /* @__PURE__ */ jsx(BlockToolbar, {
|
|
66862
67727
|
blockId,
|
|
66863
67728
|
blockKind: block.kind,
|
|
66864
67729
|
content,
|
|
@@ -66869,11 +67734,10 @@ function EditablePageRenderer(props) {
|
|
|
66869
67734
|
blockIndex,
|
|
66870
67735
|
headerClearance
|
|
66871
67736
|
})
|
|
66872
|
-
})
|
|
67737
|
+
}) : null] })] })
|
|
66873
67738
|
});
|
|
66874
67739
|
}, [
|
|
66875
67740
|
aiProjections,
|
|
66876
|
-
blockItems,
|
|
66877
67741
|
blockItemsForRender,
|
|
66878
67742
|
headerClearance,
|
|
66879
67743
|
isEntryTemplatePage,
|
|
@@ -66887,17 +67751,55 @@ function EditablePageRenderer(props) {
|
|
|
66887
67751
|
dataContext: linkedEntryDataContext,
|
|
66888
67752
|
apiClient: blockDataApiClient
|
|
66889
67753
|
});
|
|
66890
|
-
const
|
|
67754
|
+
const generatedIconAssetOverlay = useMemo(() => {
|
|
67755
|
+
const byBlock = {};
|
|
67756
|
+
for (const block of renderPage.blocks) {
|
|
67757
|
+
if (!block.id) continue;
|
|
67758
|
+
const assets = uiStore.getState().generatedIconAssets?.getForBlock(unsafeAsEditorBlockId(block.id)) ?? [];
|
|
67759
|
+
if (assets.length > 0) byBlock[block.id] = assets;
|
|
67760
|
+
}
|
|
67761
|
+
return byBlock;
|
|
67762
|
+
}, [
|
|
67763
|
+
renderPage.blocks,
|
|
67764
|
+
renderStateVersion,
|
|
67765
|
+
uiStore
|
|
67766
|
+
]);
|
|
67767
|
+
const dataContext = useMemo(() => mergeGeneratedIconAssetsIntoDataContext(mergeResolvedDataContext(linkedEntryDataContext, liveResolvedData), generatedIconAssetOverlay), [
|
|
67768
|
+
generatedIconAssetOverlay,
|
|
67769
|
+
linkedEntryDataContext,
|
|
67770
|
+
liveResolvedData
|
|
67771
|
+
]);
|
|
66891
67772
|
return /* @__PURE__ */ jsx(PageRenderer, {
|
|
66892
67773
|
...pageRendererProps,
|
|
66893
67774
|
page: renderPage,
|
|
67775
|
+
runtimeBoundaries,
|
|
66894
67776
|
registry: allowInlineEditing ? editorRegistry : pageRendererProps.registry ?? clientComponentRegistry,
|
|
66895
67777
|
wrapBlock: allowInlineEditing ? wrapBlockWithProvider : pageRendererProps.wrapBlock,
|
|
67778
|
+
wrapBoundary: allowInlineEditing ? wrapBoundaryWithControl : pageRendererProps.wrapBoundary,
|
|
66896
67779
|
dataContext,
|
|
66897
67780
|
previewAuthoring,
|
|
66898
67781
|
usePlaceholders: true
|
|
66899
67782
|
});
|
|
66900
67783
|
}
|
|
67784
|
+
function retargetRuntimeBoundariesForRenderPage(boundaries, page) {
|
|
67785
|
+
if (!boundaries?.length) return boundaries;
|
|
67786
|
+
const blockById = new Map(page.blocks.filter((block) => Boolean(block.id)).map((block) => [block.id, block]));
|
|
67787
|
+
return boundaries.map((boundary) => {
|
|
67788
|
+
const currentBlock = blockById.get(boundary.previousBlockId);
|
|
67789
|
+
const nextBlock = blockById.get(boundary.nextBlockId);
|
|
67790
|
+
return retargetCompiledBoundaryRuntimeForContentAdjacency(boundary, {
|
|
67791
|
+
currentContent: renderableBoundaryContent(currentBlock),
|
|
67792
|
+
nextContent: renderableBoundaryContent(nextBlock)
|
|
67793
|
+
});
|
|
67794
|
+
});
|
|
67795
|
+
}
|
|
67796
|
+
function renderableBoundaryContent(block) {
|
|
67797
|
+
const source = block?.draftContent ?? block?.content ?? null;
|
|
67798
|
+
return isRecord(source) ? source : null;
|
|
67799
|
+
}
|
|
67800
|
+
function isRecord(value) {
|
|
67801
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
67802
|
+
}
|
|
66901
67803
|
function usePreviewBlockResolvedData(args) {
|
|
66902
67804
|
const { page, dataContext, apiClient } = args;
|
|
66903
67805
|
const cacheKey = useMemo(() => {
|
|
@@ -66929,14 +67831,16 @@ function usePreviewBlockResolvedData(args) {
|
|
|
66929
67831
|
}
|
|
66930
67832
|
let cancelled = false;
|
|
66931
67833
|
const context = buildPreviewBlockDataContext(dataContext);
|
|
66932
|
-
|
|
66933
|
-
|
|
67834
|
+
const loaderClient = createPreviewBlockDataApiClient(apiClient, context);
|
|
67835
|
+
Promise.all([prefetchBlockData(page, context, {
|
|
67836
|
+
apiClient: loaderClient,
|
|
66934
67837
|
isValidEndpoint: isSupportedLoaderEndpoint,
|
|
66935
67838
|
onError: () => {}
|
|
66936
|
-
}).then((data) => {
|
|
67839
|
+
}), prefetchGeneratedIconAssets(page, dataContext.siteId, apiClient).catch(() => ({}))]).then(([data, generatedIconAssets]) => {
|
|
67840
|
+
const merged = mergeGeneratedIconAssets(data, generatedIconAssets);
|
|
66937
67841
|
if (!cancelled) setResolvedData({
|
|
66938
67842
|
key: cacheKey,
|
|
66939
|
-
data
|
|
67843
|
+
data: merged
|
|
66940
67844
|
});
|
|
66941
67845
|
}).catch(() => {});
|
|
66942
67846
|
return () => {
|
|
@@ -66950,6 +67854,25 @@ function usePreviewBlockResolvedData(args) {
|
|
|
66950
67854
|
]);
|
|
66951
67855
|
return resolvedData?.data ?? null;
|
|
66952
67856
|
}
|
|
67857
|
+
async function prefetchGeneratedIconAssets(page, siteId, apiClient) {
|
|
67858
|
+
const blockRefs = collectGeneratedIconAssetRefs(page);
|
|
67859
|
+
if (blockRefs.length === 0) return {};
|
|
67860
|
+
return mapGeneratedIconAssetsToBlocks(blockRefs, unwrapResponse(await apiClient({
|
|
67861
|
+
endpoint: "getGeneratedIconRenderAssets",
|
|
67862
|
+
params: { siteId },
|
|
67863
|
+
body: { refs: dedupeGeneratedIconAssetRefs(blockRefs) }
|
|
67864
|
+
})).assets);
|
|
67865
|
+
}
|
|
67866
|
+
function mergeGeneratedIconAssets(resolvedData, byBlock) {
|
|
67867
|
+
return mergeGeneratedIconAssetsIntoResolvedData(resolvedData, byBlock);
|
|
67868
|
+
}
|
|
67869
|
+
function mergeGeneratedIconAssetsIntoDataContext(dataContext, byBlock) {
|
|
67870
|
+
if (!dataContext || Object.keys(byBlock).length === 0) return dataContext;
|
|
67871
|
+
return {
|
|
67872
|
+
...dataContext,
|
|
67873
|
+
resolvedData: mergeGeneratedIconAssets(dataContext.resolvedData ?? {}, byBlock)
|
|
67874
|
+
};
|
|
67875
|
+
}
|
|
66953
67876
|
function buildPreviewBlockDataContext(dataContext) {
|
|
66954
67877
|
return {
|
|
66955
67878
|
siteId: dataContext.siteId,
|