@riverbankcms/sdk 0.103.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.
Files changed (149) hide show
  1. package/dist/{PreviewEditorSidebar-DkNpCPja.mjs → PreviewEditorSidebar-ywqcYjTB.mjs} +148 -128
  2. package/dist/{PreviewEditorUI-DeNKtqk3.mjs → PreviewEditorUI-DApUNF6g.mjs} +3 -3
  3. package/dist/{PreviewQueryProvider-ZF6TXq5Q.mjs → PreviewQueryProvider-CStABBUh.mjs} +1 -1
  4. package/dist/{SdkPreviewModeRuntime-5bCsXK2y.mjs → SdkPreviewModeRuntime-DmHCcIMO.mjs} +1199 -563
  5. package/dist/{SiteChromeCustomizeContext-CO1sTK_W.mjs → SiteChromeCustomizeContext-BV9GU-3C.mjs} +3145 -2452
  6. package/dist/_dts/api/src/contentRuntime.d.ts +6 -3
  7. package/dist/_dts/api/src/endpoints.d.ts +10 -3
  8. package/dist/_dts/api/src/index.d.ts +1 -1
  9. package/dist/_dts/api/src/siteIcons.d.ts +39 -43
  10. package/dist/_dts/api/src/siteManagementEndpoints.d.ts +3 -3
  11. package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +36 -7
  12. package/dist/_dts/block-form/src/widgets/SliderField/SliderField.d.ts +3 -3
  13. package/dist/_dts/block-form/src/widgets/SliderField/sliderValue.d.ts +36 -0
  14. package/dist/_dts/block-form/src/widgets/utils/readNumericUiConfig.d.ts +3 -0
  15. package/dist/_dts/blocks/src/index.d.ts +1 -1
  16. package/dist/_dts/blocks/src/system/blocks/feature-card-icons.d.ts +29 -29
  17. package/dist/_dts/blocks/src/system/blocks/feature-cards.d.ts +1 -0
  18. package/dist/_dts/blocks/src/system/blocks/location-map.d.ts +3 -0
  19. package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +135 -0
  20. package/dist/_dts/blocks/src/system/icons/generatedAssets.d.ts +28 -0
  21. package/dist/_dts/blocks/src/system/icons/index.d.ts +1 -0
  22. package/dist/_dts/blocks/src/system/icons/value.d.ts +3 -6
  23. package/dist/_dts/blocks/src/system/manifest/schema.d.ts +240 -0
  24. package/dist/_dts/blocks/src/system/runtime/nodes/feature-card-icon.d.ts +1 -0
  25. package/dist/_dts/content-editor/src/ui/editorUiStore.d.ts +2 -0
  26. package/dist/_dts/content-editor/src/ui/stores/generatedIconAssetsStore.d.ts +9 -0
  27. package/dist/_dts/db/src/generated/supabase/database.types.d.ts +208 -0
  28. package/dist/_dts/editor-blocks/src/BlockEditor.d.ts +7 -0
  29. package/dist/_dts/editor-blocks/src/BlockForm.d.ts +2 -1
  30. package/dist/_dts/editor-blocks/src/block-editor/BlockCard.d.ts +4 -4
  31. package/dist/_dts/editor-blocks/src/block-editor/BlockCardBody.d.ts +2 -3
  32. package/dist/_dts/editor-blocks/src/block-editor/BlockCardHeader.d.ts +4 -4
  33. package/dist/_dts/editor-blocks/src/block-editor/FeatureCardIconsPanel.d.ts +4 -4
  34. package/dist/_dts/editor-blocks/src/block-editor/GeneratedIconSetDialog.d.ts +3 -3
  35. package/dist/_dts/editor-blocks/src/block-editor/SortableBlockItem.d.ts +2 -3
  36. package/dist/_dts/editor-blocks/src/block-editor/blockHeaderActionPlan.d.ts +1 -5
  37. package/dist/_dts/editor-blocks/src/block-editor/featureCardIconActions.d.ts +25 -19
  38. package/dist/_dts/editor-blocks/src/block-editor/generatedIconApplyCoordination.d.ts +32 -0
  39. package/dist/_dts/editor-blocks/src/widgets/icon-picker/GeneratedIconLibraryContext.d.ts +28 -0
  40. package/dist/_dts/editor-blocks/src/widgets/icon-picker/index.d.ts +2 -0
  41. package/dist/_dts/editor-blocks/src/widgets/icon-picker/loaders.d.ts +7 -0
  42. package/dist/_dts/preview-next/src/client/preview/CustomizeBackgroundControlRows.d.ts +15 -0
  43. package/dist/_dts/preview-next/src/client/preview/EntryEditorPanel.d.ts +2 -1
  44. package/dist/_dts/preview-next/src/client/preview/EntrySlotBlockEditorPanel.d.ts +2 -1
  45. package/dist/_dts/preview-next/src/client/preview/PageBlockEditorPanel.d.ts +2 -1
  46. package/dist/_dts/preview-next/src/client/preview/PreviewEditorSidebar.d.ts +4 -3
  47. package/dist/_dts/preview-next/src/client/preview/PreviewShell.d.ts +4 -3
  48. package/dist/_dts/preview-next/src/client/preview/PreviewShellLayout.d.ts +4 -3
  49. package/dist/_dts/preview-next/src/client/preview/SiteChromeCustomizeContext.d.ts +3 -4
  50. package/dist/_dts/preview-next/src/client/preview/StyleConfigurator.d.ts +5 -4
  51. package/dist/_dts/preview-next/src/client/preview/StyleConfigurator.state.d.ts +44 -18
  52. package/dist/_dts/preview-next/src/client/preview/siteStylePreviewPlanner.d.ts +4 -5
  53. package/dist/_dts/preview-next/src/client/preview/styleConfiguratorApplyPayload.d.ts +22 -1
  54. package/dist/_dts/preview-next/src/client/preview/styleConfiguratorSnapshot.d.ts +12 -4
  55. package/dist/_dts/sdk/src/client/management/types.d.ts +3 -0
  56. package/dist/_dts/sdk/src/contracts/system-block-content.d.ts +0 -1
  57. package/dist/_dts/sdk/src/public-api/contracts.d.ts +5 -2
  58. package/dist/_dts/sdk/src/version.d.ts +1 -1
  59. package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
  60. package/dist/_dts/theme-core/src/mock-themes/all.d.ts +9 -9
  61. package/dist/_dts/theme-core/src/navigation/types.d.ts +2 -0
  62. package/dist/_dts/theme-core/src/palette/colors.d.ts +84 -0
  63. package/dist/_dts/theme-core/src/palette/{variants → curated}/brand-led.d.ts +12 -24
  64. package/dist/_dts/theme-core/src/palette/{variants → curated}/high-contrast.d.ts +9 -18
  65. package/dist/_dts/theme-core/src/palette/{variants → curated}/index.d.ts +67 -119
  66. package/dist/_dts/theme-core/src/palette/{variants → curated}/soft-natural.d.ts +12 -24
  67. package/dist/_dts/theme-core/src/palette/{variants → curated}/types.d.ts +50 -60
  68. package/dist/_dts/theme-core/src/palette/{variants → curated}/warm-dark.d.ts +6 -12
  69. package/dist/_dts/theme-core/src/palette/{variants → curated}/warm-neutral.d.ts +12 -24
  70. package/dist/_dts/theme-core/src/palette/editorState.d.ts +45 -0
  71. package/dist/_dts/theme-core/src/palette/index.d.ts +25 -14
  72. package/dist/_dts/theme-core/src/palette/legacyRuntimeProjection.d.ts +38 -0
  73. package/dist/_dts/theme-core/src/palette/legacySelection.d.ts +34 -0
  74. package/dist/_dts/theme-core/src/palette/libraryModel.d.ts +58 -0
  75. package/dist/_dts/theme-core/src/palette/paletteCompatibilityTransition.d.ts +241 -0
  76. package/dist/_dts/theme-core/src/palette/persistenceReadSource.d.ts +118 -0
  77. package/dist/_dts/theme-core/src/palette/resolveSelection.d.ts +50 -0
  78. package/dist/_dts/theme-core/src/palette/selection.d.ts +72 -0
  79. package/dist/_dts/theme-core/src/palette/sitePalettePersistence.d.ts +34 -0
  80. package/dist/_dts/theme-core/src/palette/themePaletteCompatibility.d.ts +58 -0
  81. package/dist/_dts/theme-core/src/schema.d.ts +9 -0
  82. package/dist/_dts/theme-core/src/site-styles/curatedSiteStyles.d.ts +22 -22
  83. package/dist/_dts/theme-core/src/site-styles/index.d.ts +1 -0
  84. package/dist/_dts/theme-core/src/site-styles/previewCompiler.d.ts +31 -9
  85. package/dist/_dts/theme-core/src/site-styles/runtimeCompiler.d.ts +22 -16
  86. package/dist/_dts/theme-core/src/site-styles/siteChromeNavPreferences.d.ts +6 -5
  87. package/dist/_dts/theme-core/src/site-styles/themeParity.d.ts +21 -0
  88. package/dist/_dts/ui/src/palette/PaletteTokenEditor.d.ts +2 -1
  89. package/dist/cli/index.mjs +7798 -7449
  90. package/dist/client/{DiscountCodeDisclosure-ChVZwVtS.mjs → DiscountCodeDisclosure-Dit2aItR.mjs} +1 -1
  91. package/dist/client/{EventCombined.client-PZtXbH6R.mjs → EventCombined.client-BnREyCjf.mjs} +3 -3
  92. package/dist/client/{EventListing.client-C4AMTXec.mjs → EventListing.client-0uHld51x.mjs} +2 -2
  93. package/dist/client/{LeafletStaticMap-B0w8_i0u.mjs → LeafletStaticMap-DJcvSfmj.mjs} +1 -1
  94. package/dist/client/{MagicLinkForm-DF0ZGhIu.mjs → MagicLinkForm-EAsIktfw.mjs} +2 -2
  95. package/dist/client/{StepIndicator-PccQ89Ct.mjs → StepIndicator-CRR17tYI.mjs} +2 -2
  96. package/dist/client/{accordion-CTNWT1lk.mjs → accordion-B47HIuuH.mjs} +1 -1
  97. package/dist/client/{bookingForm-DYixwPqP.mjs → bookingForm-I1E-8F9P.mjs} +6 -6
  98. package/dist/client/{buttons-CySQwlFs.mjs → buttons-BbPn8OKA.mjs} +1 -1
  99. package/dist/client/{carousel-W75iYR0M.mjs → carousel-OlM7SyBs.mjs} +1 -1
  100. package/dist/client/{cart-Ca_DGWQq.mjs → cart-BKpG5jz6.mjs} +3 -3
  101. package/dist/client/{checkout-STgKTsNh.mjs → checkout-Dmmr6qoU.mjs} +3 -3
  102. package/dist/client/client.mjs +8699 -8320
  103. package/dist/client/{courseRegistration-DQI1cu1u.mjs → courseRegistration-CflZiqGk.mjs} +7 -7
  104. package/dist/client/{eventCalendar-BJrHpofg.mjs → eventCalendar-BvoLWcp-.mjs} +5 -5
  105. package/dist/client/{eventCombined-DPtqBHaH.mjs → eventCombined-DsrO8t_t.mjs} +2 -2
  106. package/dist/client/{eventDetails-Brt31CDo.mjs → eventDetails-C3hxgcJm.mjs} +3 -3
  107. package/dist/client/{eventListing-BrClHJOq.mjs → eventListing-C-hb237X.mjs} +2 -2
  108. package/dist/client/{eventRegistration-DxlNlVUC.mjs → eventRegistration-B0gyzDGi.mjs} +7 -7
  109. package/dist/client/{form-Vp5cGzDF.mjs → form-C_RUi6oJ.mjs} +2 -2
  110. package/dist/client/{headerSection-DL2xjRgW.mjs → headerSection-IKQiD2U0.mjs} +3 -3
  111. package/dist/client/hooks.mjs +4837 -4663
  112. package/dist/client/{locationMap-B0EjoXQS.mjs → locationMap-8ZBrMzRJ.mjs} +2 -2
  113. package/dist/client/{newsletterForm-BlV9VRlq.mjs → newsletterForm-CYk3ucwj.mjs} +2 -2
  114. package/dist/client/{pricing-DmRD7Tjx.mjs → pricing-B5GmvfIH.mjs} +1 -1
  115. package/dist/client/{productDetail-BLTQsY2f.mjs → productDetail-BjS2Dqzo.mjs} +3 -3
  116. package/dist/client/{productList-R8lsMpRs.mjs → productList-BOHvC8My.mjs} +3 -3
  117. package/dist/client/{propsDecoder-DgAshF92.mjs → propsDecoder-WS6UEJwZ.mjs} +7 -0
  118. package/dist/client/rendering/client.mjs +3607 -3281
  119. package/dist/client/rendering/islands.mjs +18 -18
  120. package/dist/client/rendering.mjs +8562 -8190
  121. package/dist/client/{shop-DWjyje1s.mjs → shop-CON03-wN.mjs} +6 -6
  122. package/dist/client/{shop-commerce-CSKCR87d.mjs → shop-commerce-DlqrFgH8.mjs} +5 -5
  123. package/dist/client/{shop-commerce-store-DxPnE-iN.mjs → shop-commerce-store-l74-Kne6.mjs} +1 -1
  124. package/dist/client/{shopShared-OOeAkFq7.mjs → shopShared-CQheEXSg.mjs} +2 -2
  125. package/dist/client/{useDiscountCodeUi-Bp6X7XgG.mjs → useDiscountCodeUi-v6OluyWl.mjs} +1 -1
  126. package/dist/client/{useEventFilters-B489x9TO.mjs → useEventFilters-BqSTcNOf.mjs} +3 -3
  127. package/dist/client/{usePolling-BKP66stL.mjs → usePolling-DMfADjIF.mjs} +2 -2
  128. package/dist/preview-next/before-render.mjs +10 -3
  129. package/dist/preview-next/client/runtime.mjs +4 -4
  130. package/dist/preview-next/middleware.mjs +10 -3
  131. package/dist/{previewAuthStore-ByPPZqmp.mjs → previewAuthStore-CfquDtTh.mjs} +10 -3
  132. package/dist/{sdk-runtime-C8whifOy.mjs → sdk-runtime-DWb08Xaz.mjs} +2 -2
  133. package/dist/{separator-CM2C5Axs.mjs → separator--6yjc914.mjs} +1 -1
  134. package/dist/server/components.mjs +9863 -9557
  135. package/dist/server/config-validation.mjs +4861 -4687
  136. package/dist/server/config.mjs +4861 -4687
  137. package/dist/server/data.mjs +4838 -4664
  138. package/dist/server/index.mjs +11 -4
  139. package/dist/server/next.mjs +8657 -8344
  140. package/dist/server/page-converter.mjs +4749 -4575
  141. package/dist/server/prebuild.mjs +1 -1
  142. package/dist/server/rendering/server.mjs +9808 -9586
  143. package/dist/server/rendering.mjs +9872 -9566
  144. package/dist/server/routing.mjs +4967 -4704
  145. package/dist/server/server.mjs +4845 -4664
  146. package/dist/server/theme-bridge.mjs +207 -114
  147. package/dist/server/theme.mjs +92 -91
  148. package/dist/styles/index.css +20 -0
  149. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  "use client";
2
- import { $ as PreviewRichTextEditor, $a as eventCalendarListLayoutOptions, $c as getModalConfig, $d as ChevronsUpDown, $i as isThemeV2NormalEditorRawStyleFieldName, $l as CardTitle, $n as buildEventCalendarListingRender, $o as splitPositioningClasses, $r as ctaCopyFragment, $s as PlayIcon, $t as deleteEntrySlotBlock, $u as parseSiteId, Aa as resolveOfferingsPreviewGroupCta, Ac as resolveMediaTransformForAspect, Ad as Minus, Ai as surfaceResolutionContextFromTheme, Al as TabsTrigger, An as SITE_CHROME_VISIBLE_HEADER_SELECTOR, Ao as formatEventPrice, Ar as formatCommercePrice, As as ArrowDownIcon, At as createRoutingHelpers, Au as unsafeAsEditorBlockId, Ba as resolveEventListPaginationAction, Bc as generateShadowValue$1, Bd as FilePlay, Bi as defaultSectionTransitionVariantForFamily, Bl as DialogFooter, Bn as isInternalResolvedLinkValue, Bo as getLocalDateKey, Br as augmentManifestWithStyleGroups, Bs as CirclePlusIcon, Bt as ManifestForm, Bu as resolveBookingTimeZoneId, Ca as OFFERINGS_PREVIEW_EVENT_PRESET_DEFINITIONS, Cc as SECTION_BACKGROUND_MIN_SOURCE_WIDTH, Cd as RotateCcw, Ci as retargetCompiledRuntimeFieldsForContentAdjacency, Cl as Popover, Cn as isSupportedLoaderEndpoint, Co as featuresFromHex, Cr as buildProductDetailInteractiveIslandProps, Cs as resolveBlockIconRenderValue, Ct as pushHistoryEntry, Cu as cva, Da as normalizeOfferingsPreviewGroupOrder, Dc as normalizeRightAngle, Dl as Tabs, Dn as listBlockDescriptors, Do as formatDate$3, Dr as buildCartDisplay, Ds as SEMANTIC_ICON_DEFINITIONS, Dt as recordsEqual, Du as createEditorInsertBlockCommand, Ea as isOfferingsPreviewSourceKey, Ec as isRotationDimensionSwap, Ed as Pencil, Ei as resolveVisiblePromotedFieldPathsForEditorBlock, El as Input, En as getBlockDefinition, Eo as toLocationMapHydrationProps, Er as getShopDisplayForItems, Es as resolveIconPickerPreset, Et as unsafeAsLinkedContentEntryId, Eu as clsx, Fa as buildEventRuntimeFilters, Fc as siblingPath$1, Fd as ImagePlus, Fl as ScrollableDialogContent, Fn as mediaTransforms, Fo as getContainerClass, Fr as deriveCommerceCheckoutState, Fs as ChevronDownIcon, Ft as PaletteProvider, Fu as formatBookingInstant, G as beginAutosaveBatch, Ga as columnOptionSchema, Gc as themeButtonClassName, Gd as EllipsisVertical, Gi as backgroundAppearanceColorTokenNames, Gn as productDetailBlockDefinition, Go as createInteractiveIslandCodec, Gr as faqHeadingFragment, Gs as FileAudioIcon, Gt as createStoreBackend, Gu as publicEventPricingMode, Ha as normalizeCsvString, Hc as generateInteractiveChildInheritanceCSS, Hd as FileArchive, Hi as sectionTransitionFamilyForBoundaryOptionId, Hl as DialogTitle, Hn as useImageResolveContextOptional, Ho as resolveRuntimeEventPricing, Hr as headingFragment, Hs as DownloadIcon, Hu as toScheduledBookingDateTime, Ia as eventListPaginationActionSchema, Id as GripVertical, Il as Dialog, In as layoutTransforms, Io as groupEventsByDate, Ir as parseStoredCommerceCartState, Is as ChevronLeftIcon, It as usePalette, Iu as formatBookingTime, J as enqueueTransaction, Ja as eventLayoutSchema, Jc as mergeStyles, Jd as Copy, Ji as parseBackgroundAppearanceColorToken, Jl as Trigger, Jn as eventListingBlockDefinition, Jo as defineClientOwnedBlockRuntime, Jr as footerBottomTextFragment, Js as InfoIcon, Jt as applyPageDesignEditorAction, Ju as publicEventTicketTypes, K as confirmAutosaveBatch, Ka as eventButtonVariantSchema, Kc as backgroundColorStyle, Kd as Crop, Ki as backgroundAppearanceQuickColorTokenNames, Kl as Content, Kn as newsletterSignupBlockDefinition, Ko as defineInteractiveIslandMetaKeys, Kr as blogFeaturedPostFragment, Ks as FileSpreadsheetIcon, Kt as listContentTypes, Ku as publicEventPricingType, La as eventPageSizeSchema, Ld as File, Ll as DialogClose, Ln as uiTransforms, Lo as resolveEventCta, Lr as productItemKey, Ls as ChevronRightIcon, Lt as recoveryConflictCopy, Lu as formatLocalScheduleDate, Ma as resolveOfferingsPreviewGroups, Mc as getDirectImageUrlForMediaAsset, Md as LoaderCircle, Ml as List, Mn as planSiteOverlayHeaderClearance, Mo as formatEventTeacherLine, Mr as EMPTY_COMMERCE_CART_STATE, Ms as ArrowRightIcon, Mu as addLocalScheduleDays, Na as isSemanticSpacing, Nc as getImageUrl, Nd as Image, Nl as Root2$1, Nn as visibleHeaderClearancePx, No as formatTime$3, Nr as buildPassCartItem, Ns as CalendarIcon$1, Nu as formatBookingDate, Oa as normalizeOfferingsPreviewItemLimit, Oc as formatAspectRatioToken, Oi as designRuntimeRulesForTheme, Ol as TabsContent, On as siteFooterManifest, Oo as formatEventCompactDateRail, Or as buildProductCardDisplay, Os as getSemanticIconComponent, Ou as createEditorRemoveBlockCommand, Pa as resolveSpacing, Pc as getAtPath, Pd as ImageUp, Pl as Trigger$1, Pn as contentTransforms, Po as getCardOrientation, Pr as buildProductCartItem, Ps as CheckIcon$1, Pu as formatBookingDateTime, Q as resolvePreviewSidebarTab, Qa as eventCalendarListLayoutCompatibleDisplayModeValues, Qc as getFieldIntent, Qd as CircleAlert, Ql as CardHeader, Qn as buildEventCalendarListingDisplay, Qo as markEditableSurfaceForwarding, Qr as testimonialsHeadingFragment, Qs as PhoneIcon, Qt as deleteBlock, Qu as parseMediaAssetId, Ra as getEventRuntimeFiltersKey, Rc as generateButtonCss, Rd as FileText, Rl as DialogContent, Rn as formattingTransforms, Ro as resolveEventLinkProps, Rr as reduceCommerceCart, Rs as ChevronUpIcon, Rt as unfinishedBlockCopy, Ru as getBookingLocalDateKey, Sc as setContextResolveImageUrlContext, Sd as Search, Si as retargetCompiledBoundaryRuntimeForContentAdjacency, Sl as Badge, Sn as useUniqueId, So as getTextColorForBackground, Sr as buildCheckoutInteractiveIslandProps, Ss as parseBlockIconValue, St as createHistoryState, Su as Button, Ta as inferLegacyOfferingsPreviewGroupOrder, Tc as attachRenderableMediaAssetFields, Td as Plus, Ti as planPageDesignLayoutLookCompatibility, Tl as PopoverTrigger, Tn as GRADIENT_PRESETS, To as normalizeLocationMapProps, Tr as buildShopInteractiveIslandProps, Ts as isIconPickerPreset, Tt as undoHistory, Tu as cn$1, Ua as normalizeOptionalId, Uc as TokenResolver, Ui as sectionTransitionVariantForBoundaryOptionId, Ul as Collapsible, Un as shopBlockDefinition, Uo as blockBookingPaymentTermsSchema, Ur as cardFragment, Us as ExternalLinkIcon, Ut as FormRenderer, Uu as formatBookingPriceDisplay, Va as normalizeCsvIds, Vc as generateBaseInteractiveCSS, Vd as FileHeadphone, Vi as sectionTransitionFamilies, Vl as DialogHeader, Vn as ImageResolveContextProvider, Vo as getLocalMinuteOfDay, Vr as richTextFragment, Vs as ClockIcon$1, Vt as createManifestFormAdapter, Vu as toBookingTimeZone, Wa as calendarTabViewsSchema, Wc as parseThemeButtonVariantId, Wd as EyeOff, Wi as BACKGROUND_BODY_TEXT_MIN_CONTRAST_RATIO, Wl as CollapsibleContent, Wn as productListBlockDefinition, Wo as buildInteractiveIslandProps, Wr as faqAccordionFragment, Ws as FileArchiveIcon, Wt as evaluateVisibility, Wu as publicEventPricingCurrency, X as rejectAutosaveBatch, Xa as previewStageSchema, Xc as textColorStyle, Xd as CircleMinus, Xl as Card, Xn as eventCalendarBlockDefinition, Xr as formCopyFragment, Xs as MapPinIcon$1, Xt as createBlock, Xu as assertNever$5, Y as idleEditorTransactionQueueState, Ya as filterAutoShowSchema, Yc as rgbColorValue, Yd as CirclePlus, Yi as defaultThemeTokens, Yl as createCollapsibleScope, Yn as buildEventListingInteractiveIslandProps, Yo as defineProgressiveBlockRuntime, Yr as formEmbedFragment, Ys as MailIcon, Yt as getPageDesignEditorState, Yu as formatCurrencyAmount, Za as weekStartSchema, Zc as useBackendWatch, Zd as CircleCheck, Zl as CardContent, Zn as buildEventCalendarInteractiveIslandProps, Zo as composeHeaderSectionWrapperClassName, Zr as testimonialsCarouselFragment, Zs as MinusIcon, Zt as createEntrySlotBlock, Zu as expectParsedBrandedId, _a as createTransformRegistry, _c as renderAudio, _i as mergeHeaderNavTypographyPreference, _l as SelectContent, _n as useSensors, _o as normalizeBoxStylesCardVariant, _r as courseRegistrationBlockDefinition, _s as suggestSemanticIconForFeatureCard, _t as useEditorUiStore, _u as createCollection, aa as parseCustomCssRules, ac as unwrapRichTextRoot, ad as unsafeAsPassId, af as Box, ai as PUBLIC_FILE_FIELD_KINDS, al as hasEmptyOption, an as DEFAULT_LAUNCH_READINESS_INPUT, ao as eventSurfaceScopeValues, ar as findEventByOccurrenceId, as as ACCORDION_TRIGGER_FONT_SCALE, at as getRichTextImagePositionFromTarget, au as DropdownMenuSeparator, bc as resolveMediaNodeResponsiveImage, bi as applyCompiledRuntimeFieldsToContent, bl as SelectValue, bn as useCombinedRefs, bo as resolveOnColorForThemeToken, br as cartBlockDefinition, bs as getBlockIconSemanticFallbackId, bt as canRedoHistory, bu as composeEventHandlers, ca as NAV_LINK_PADDING_MAP, cc as coerceInlineTextWithFallback, cd as err$2, cf as Archive, ci as MQ_MD_DOWN, cl as unmapValueFromSelect, cn as DndContext, co as normalizeEventScheduleScope, cr as resolveEventRequiresPayment, cs as ICON_SIZE_PX, ct as EditorProvider, cu as __awaiter, da as FONT_WEIGHT_MAP, dc as parseInlineTextFromUnknown, dd as X, df as __toESM, di as MQ_TABLET_ONLY, dl as Tooltip, dn as closestCenter, do as normalizeEventSurfaceScope, dr as getStepNumber$1, ds as FEATURE_CARD_ICON_TREATMENTS, dt as useUISelector, du as __read, ea as isThemeV2NormalEditorRawStylePath, ec as PlusIcon, ed as unsafeAsAppointmentResourceId, ef as ChevronUp, ei as heroCtaRowFragment, el as isHeaderField, eo as el, er as formBlockDefinition, es as planSiteChromePlacement, et as PreviewInlineTextEditor, fa as INPUT_FONT_SIZE_MAP, fc as ImagePresets, fd as Upload, fi as BACKGROUND_POSITION_PRESET_VALUES, fl as TooltipContent, fn as getClientRect, fo as normalizeEventVenueId, fr as getWizardStepsForContext$1, fs as applyFeatureCardIconSuggestions, ft as EditableBlockProvider, fu as __rest, g as PreviewDesignCoordinatorProvider, ga as generateCssVars, gc as getCurrentResolveImageUrlContext, gd as Ticket, gi as resolveBackgroundColorValue, gl as Select, gn as useSensor, go as generateShadowValue, gr as buildGiftingInteractiveIslandProps, gs as suggestFeatureCardSemanticIcons, gu as useDirection, ha as expandPalette, hc as computeMediaTransformStyle, hd as Trash2, hi as resolveSectionForegroundStyles, hl as Textarea, hn as useDroppable, ho as statusMutedColorDeclaration, hr as giftingBlockDefinition, hs as shouldReserveFeatureCardIconZone, ht as useEntryEditorController, hu as useId$1, i as usePreviewDesignHistoryOrder, ia as parseBlockCustomCssRules, ic as createRichTextDocFromMarkdown, id as unsafeAsMediaAssetId, if as Check, ii as defineFragment, il as useSdkConfig, in as decodePublicProductCategorySelectorQuery, io as eventScheduleScopeValues, ir as toRegistrationEvents, is as ACCORDION_SPACING_MAP, it as RichTextEditorSurface, ja as resolveOfferingsPreviewGroupOrderEntries, jc as asRecord, jl as Content$1, jn as SITE_OVERLAY_HEADER_CLEARANCE_CSS_VAR, jo as formatEventPriceDisplay, jr as formatInterval, js as ArrowLeftIcon, jt as createSnapshotFromPageRecord, ju as unsafeAsEditorBlockValues, ka as resolveOfferingsPreviewCoursePath, kc as parseAspectRatioValue, ki as getCuratedSiteStyle, kl as TabsList, kn as siteHeaderManifest, ko as formatEventDateParts, kr as buildProductDetailDisplay, ks as isSemanticIconId, kt as useDebouncedLatestSave, ku as createEditorReorderBlocksCommand, la as NAV_LINK_PADDING_X_MAP, lc as inlineTextToPlainText, ld as ok$3, lf as __commonJSMin, li as MQ_SM_DOWN, ll as FieldFrame, ln as KeyboardCode, lo as normalizeEventStaffMemberId, lr as resolveRegistrationTarget, ls as PUBLIC_DOWNLOAD_MEDIA_TYPES, lt as useEditor, lu as __extends, ma as LABEL_FONT_SIZE_MAP, mc as buildResolveImageUrlContext, mi as boxStylesTransforms, ml as TooltipTrigger, mn as useDraggable, mo as generateCardCss, mr as resolveEventRegistrationScopedEvents, ms as getFeatureCardIconCompletion, mu as __spreadArrays, n as useSiteChromeCustomizeOptional, na as getComponentBorderWidthPx, nc as UploadIcon, nd as unsafeAsCustomerPassId, nf as ChevronLeft, ni as heroCopyFragment, nl as useBlockContext, nn as reorderBlocks, no as bindingSchema, nr as eventRegistrationBlockDefinition, ns as assertNever$6, nt as useRichTextEditor, nu as DropdownMenuContent, oa as NAV_LINK_BORDER_RADIUS_MAP, oc as isObjectRecord, od as unsafeAsPositiveByteCount$1, of as ArrowUp, oi as siteOptionSources, ol as mapCurrentValueForSelect, on as deriveLaunchReadiness, oo as normalizeEventBlockKind, or as findPreSelectedEvent, os as ACCORDION_TRIGGER_LETTER_SPACING, ot as insertOrReplaceRichTextImage, ou as DropdownMenuTrigger, pa as INPUT_SPACING_MAP, pc as MediaPlaceholder, pi as getAnchorClasses, pl as TooltipProvider, pn as useDndContext, po as publicEventSchema, pr as normalizeEventRegistrationPageSurfaceSubject, ps as createFeatureCardIconKey, pt as EntryControllerProvider, pu as __spreadArray, q as deriveTransactionCapabilities, qa as eventCalendarDefaultViewSchema, qc as borderColorStyle, qd as CreditCard, qi as foregroundTokenForBackgroundAppearanceColorToken, ql as Root, qn as buildNewsletterFormInteractiveIslandProps, qo as createZodCodec, qr as singleButtonFragment, qs as FileTextIcon, qt as toRoutableLinkPayload, qu as publicEventScalarPrice, r as PreviewDesignHistoryOrderProvider, ra as getComponentShadowVar, rc as XIcon, rd as unsafeAsFormId, rf as ChevronDown, ri as bodyCopyFragment, rl as SdkConfigProvider, rn as reorderEntrySlotBlocks, ro as eventBlockKindValues, rr as buildEventRegistrationInteractiveIslandProps, rs as ACCORDION_OPEN_ACCENT_THICKNESS, rt as EMPTY_DOC, ru as DropdownMenuItem, sa as NAV_LINK_LETTER_SPACING_MAP, sc as isRecord$19, sd as unsafeAsPositiveSeconds, sf as ArrowDown, si as MQ_LG_UP, sl as mapOptionValueForSelect, sn as AMBIENT_BACKGROUND_ROLES$1, so as normalizeEventCategoryIdsCsv, sr as resolveDiscountContext, ss as ICON_CONFIG, st as InlineTextEditor, su as __assign, t as SiteChromeCustomizeProvider, ta as pageDesignEditorBackgroundOverrideOwner, tc as ShoppingCartIcon, td as unsafeAsAppointmentServiceId, tf as ChevronRight, ti as ctaRowFragment, tl as isNonEmptyValue, tn as mutateBlockContent, to as when, tr as buildFormInteractiveIslandProps, ts as asDesignBlockId, tt as PreviewTextEditor, tu as DropdownMenu, ua as NAV_LINK_TEXT_SIZE_MAP, uc as isInlineTextEmpty, ud as lucide_react_exports, uf as __exportAll, ui as MQ_SM_UP, ul as useField, un as PointerSensor, uo as normalizeEventSurfacePresetsCsv, ur as WIZARD_STEPS$1, us as mediaSchema, uu as __generator, v as PreviewThemeOverlayProvider, va as runTransforms, vc as renderVideo, vd as Star, vi as formatSiteChromeBackgroundTokenLabel, vl as SelectItem, vn as CSS, vo as normalizeCardVariantRole, vr as buildCourseRegistrationInteractiveIslandProps, vs as toFeatureCardIconSuggestionInputs, vt as useEditorUiStoreInstance, vu as useControllableState, wa as buildOfferingsPreviewRenderStates, wc as resolveMediaSlotContract, wi as normalEditorCuratedPromotedFieldPaths, wl as PopoverContent, wn as gradientToCss, wo as buildGoogleMapsDirectionsUrl, wr as buildProductListInteractiveIslandProps, ws as parseSiteIconStyleGuideVersionId, wt as redoHistory, wu as useComposedRefs, xc as resolveMediaStorageUrl, xd as Settings, xi as compileEditorModelRuntime, xl as Label, xn as useIsomorphicLayoutEffect, xo as resolveTokenOrCssColorValue, xr as buildCartInteractiveIslandProps, xs as getGeneratedBlockIconStyleState, xt as canUndoHistory, xu as Primitive, y as usePreviewThemeOverlay, ya as ctaButton, yc as resolveImageUrlWithContext, yd as Sparkles, yi as PAGE_DESIGN_EDITOR_STATE_FETCH_ERROR_MESSAGE, yl as SelectTrigger, yn as isKeyboardEvent, yo as isCssColorLiteral, yr as checkoutBlockDefinition, ys as buildGeneratedBlockIconRenderAssetLookupFromUnknown, yt as useOptionalEditorUiStoreInstance, yu as createContextScope, za as resolveEventCalendarListPageSize, zc as generateEffectsCSS, zd as FileSpreadsheet, zi as boundaryRuntimeMetricsForTransition, zl as DialogDescription, zn as createManifestValidator, zo as getEventAvailability, zr as augmentManifest, zs as CircleMinusIcon, zt as validateBlockManifestIssues, zu as parseBookingLocalDate } from "./SiteChromeCustomizeContext-CO1sTK_W.mjs";
3
- import { i as useOptionalPreviewLayout, t as PreviewQueryProvider } from "./PreviewQueryProvider-ZF6TXq5Q.mjs";
4
- import { _ as API_ENDPOINTS, a as usePreviewToken, c as createBearerAPIClient, d as unwrapResponse, g as resolveSurfaceDocumentAttributes, h as SURFACE_IDS, i as usePreviewAuthFetch, l as ApiEnvelopeError, m as SURFACE_DOCUMENT_DATA_ATTRIBUTE, n as markPreviewAuthExpired, o as isPreviewRuntimeSessionEditable, r as usePreviewAuth, s as ApiRequestError, t as initPreviewAuth, u as extractApiEnvelopeErrorDetails } from "./previewAuthStore-ByPPZqmp.mjs";
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$18(value) {
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$18(data)) return {};
1308
- const nestedError = isRecord$18(data.error) ? data.error : void 0;
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$19(raw) && typeof raw.type === "string") return raw;
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 Icon = getIconComponent(getBlockIconSemanticFallbackId(value) ?? value);
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
- const FeatureCardIconNode = ({ value, treatment, className, generatedAssets, blockContent }) => {
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 : resolvedIcon.kind === "generated_fallback" ? resolvedIcon.semanticFallbackIconId : null;
2831
+ const iconId = resolvedIcon.kind === "semantic" ? resolvedIcon.iconId : null;
2764
2832
  const resolvedTreatment = resolveTreatment(treatment);
2765
- const hasIcon = resolvedIcon.kind !== "none";
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,
@@ -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$19(value)) return false;
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() {
@@ -30288,7 +30358,7 @@ function generateLogoTextBehaviorStyles(logoText, themeId) {
30288
30358
  function generateNavLinkStyles(header, themeId, tokens, theme, contrastTreatment, navTextSize) {
30289
30359
  const navPreferences = {
30290
30360
  typography: header.navTypography ?? "inherit",
30291
- fontSize: header.navTextSize ?? "inherit"
30361
+ fontSize: readHeaderNavFontSizePreference(header.navTextSize)
30292
30362
  };
30293
30363
  if (header.navLinkStyle) return generateNavLinkCSS({
30294
30364
  themeId,
@@ -32872,7 +32942,7 @@ function hydrateValue(value, context) {
32872
32942
  const resolvedItems = value.map((item) => hydrateValue(item, context));
32873
32943
  return resolvedItems.every((item, index) => item === value[index]) ? value : resolvedItems;
32874
32944
  }
32875
- if (isRecord$19(value)) {
32945
+ if (isRecord$20(value)) {
32876
32946
  if (isInternalLink(value)) return hydrateInternalLink(value, context.routes);
32877
32947
  if (isPageLink(value)) return hydratePageLink(value, context);
32878
32948
  if (isEntryLink(value)) return hydrateEntryLink(value, context);
@@ -33535,12 +33605,10 @@ function shouldDebugCustomBlocks() {
33535
33605
  }
33536
33606
  }
33537
33607
  function resolveBlockData({ block, definition, dataContext }) {
33538
- if (!definition.dataLoaders || Object.keys(definition.dataLoaders).length === 0) return;
33539
33608
  const blockId = block.id ?? null;
33540
- if (!blockId) return void 0;
33541
- const raw = dataContext?.resolvedData?.[blockId];
33542
- if (!raw || typeof raw !== "object") return {};
33543
- 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;
33544
33612
  }
33545
33613
  /**
33546
33614
  * Resolves block content based on stage priority.
@@ -44386,11 +44454,31 @@ const containerResponsiveThemeCss = `/*
44386
44454
  object-fit: contain;
44387
44455
  }
44388
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
+
44389
44471
  :where(.theme-scope) .rb-feature-card-icon-zone--plain .rb-feature-card-icon {
44390
44472
  width: 1.5rem;
44391
44473
  height: 1.5rem;
44392
44474
  }
44393
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
+
44394
44482
  /* --- Card marker mode (icons / numbers / none) -----------------------------
44395
44483
  *
44396
44484
  * The icon zone and the number zone both sit in the DOM; the grid's
@@ -56288,6 +56376,18 @@ function blockSaveabilityEqual(left, right) {
56288
56376
  }
56289
56377
  //#endregion
56290
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
+ }
56291
56391
  function getFeatureCards(content) {
56292
56392
  const cards = content?.cards;
56293
56393
  return Array.isArray(cards) ? cards : [];
@@ -56297,12 +56397,12 @@ function getFeatureCardIconStatus(content) {
56297
56397
  }
56298
56398
  function getFeatureCardIconDialogCards(content) {
56299
56399
  return toFeatureCardIconSuggestionInputs(getFeatureCards(content)).map((card, index) => {
56300
- const semanticFallback = getBlockIconSemanticFallbackId(card.icon) ?? suggestSemanticIconForFeatureCard(card);
56400
+ const semanticIconId = getBlockIconSemanticId(card.icon) ?? suggestSemanticIconForFeatureCard(card);
56301
56401
  return {
56302
56402
  cardKey: card.key,
56303
56403
  title: card.title.trim().length > 0 ? card.title.trim() : `Card ${index + 1}`,
56304
56404
  bodyText: card.bodyText.slice(0, 160),
56305
- semanticIconId: semanticFallback
56405
+ semanticIconId
56306
56406
  };
56307
56407
  });
56308
56408
  }
@@ -56335,41 +56435,6 @@ function getFeatureCardGeneratedIconStyleSummary(content, currentStyleGuideVersi
56335
56435
  invalidGeneratedCount
56336
56436
  };
56337
56437
  }
56338
- function applyCuratedFeatureCardIconSuggestions({ blockId, content, drafts }) {
56339
- const cards = getFeatureCards(content);
56340
- if (cards.length === 0) return { kind: "no_cards" };
56341
- const suggestions = suggestFeatureCardSemanticIcons(cards);
56342
- if (suggestions.length === 0) return { kind: "complete" };
56343
- const plan = applyFeatureCardIconSuggestions(cards, suggestions);
56344
- switch (plan.kind) {
56345
- case "applied": break;
56346
- case "duplicate_card_key":
56347
- case "duplicate_suggestion_card_key":
56348
- case "missing_suggestion_card_key":
56349
- case "unknown_card_key": return {
56350
- kind: "plan_failed",
56351
- reason: plan.kind,
56352
- cardKey: plan.cardKey
56353
- };
56354
- case "invalid_semantic_icon": return {
56355
- kind: "plan_failed",
56356
- reason: plan.kind,
56357
- iconId: plan.iconId
56358
- };
56359
- default: assertNever$5(plan);
56360
- }
56361
- for (const suggestion of plan.appliedSuggestions) {
56362
- const cardIndex = cards.findIndex((card, index) => createFeatureCardIconKey(card, index) === suggestion.cardKey);
56363
- if (cardIndex >= 0) drafts.setAtPath(blockId, `cards.${cardIndex}.icon`, {
56364
- kind: "semantic",
56365
- iconId: suggestion.iconId
56366
- });
56367
- }
56368
- return {
56369
- kind: "applied",
56370
- appliedCount: plan.appliedSuggestions.length
56371
- };
56372
- }
56373
56438
  function planGeneratedFeatureCardIconSetApply(cards, assets) {
56374
56439
  const cardKeys = cards.map(createFeatureCardIconKey);
56375
56440
  const cardKeySet = new Set(cardKeys);
@@ -56431,7 +56496,33 @@ function applyGeneratedFeatureCardIconSet({ blockId, content, drafts, assets })
56431
56496
  };
56432
56497
  }
56433
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
56434
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
+ }
56435
56526
  function reducer(state, action) {
56436
56527
  switch (action.type) {
56437
56528
  case "reset": return { kind: "idle" };
@@ -56440,6 +56531,11 @@ function reducer(state, action) {
56440
56531
  kind: "applying",
56441
56532
  preview: action.preview
56442
56533
  };
56534
+ case "apply_failed": return {
56535
+ kind: "apply_failed",
56536
+ preview: action.preview,
56537
+ message: action.message
56538
+ };
56443
56539
  case "preview_ready": return {
56444
56540
  kind: "preview_ready",
56445
56541
  preview: action.preview
@@ -56451,27 +56547,27 @@ function reducer(state, action) {
56451
56547
  }
56452
56548
  }
56453
56549
  function getGenerationErrorMessage(error) {
56454
- return error instanceof Error && error.message.length > 0 ? error.message : "Failed to generate icon set";
56550
+ return friendlyGenerationFailureMessage(error instanceof Error ? error.message : null);
56455
56551
  }
56456
56552
  function validateGeneratedIconSetPreview(preview, cards) {
56457
56553
  const cardKeys = new Set(cards.map((card) => card.cardKey));
56458
56554
  if (cardKeys.size !== cards.length) return {
56459
56555
  kind: "invalid",
56460
- message: "Generated icon set could not match every card"
56556
+ message: "The icons did not line up with this block. Please try again."
56461
56557
  };
56462
56558
  const assetKeys = new Set(preview.assets.map((asset) => asset.cardKey));
56463
56559
  if (assetKeys.size !== preview.assets.length || assetKeys.size !== cardKeys.size) return {
56464
56560
  kind: "invalid",
56465
- message: "Generated icon set was incomplete"
56561
+ message: "The icons came back incomplete. Please try again."
56466
56562
  };
56467
56563
  for (const asset of preview.assets) {
56468
56564
  if (!cardKeys.has(asset.cardKey)) return {
56469
56565
  kind: "invalid",
56470
- message: "Generated icon set was incomplete"
56566
+ message: "The icons came back incomplete. Please try again."
56471
56567
  };
56472
56568
  if (parseBlockIconValue(asset.iconValue).kind !== "generated") return {
56473
56569
  kind: "invalid",
56474
- message: "Generated icon set included an invalid icon reference"
56570
+ message: "The icons did not line up with this block. Please try again."
56475
56571
  };
56476
56572
  }
56477
56573
  return {
@@ -56479,12 +56575,43 @@ function validateGeneratedIconSetPreview(preview, cards) {
56479
56575
  preview
56480
56576
  };
56481
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
+ }
56482
56605
  function GeneratedIconSetDialog({ open, onOpenChange, cards, styleGuideSummary, styleGuideEditHref, onGenerate, onApply }) {
56483
56606
  const [state, dispatch] = useReducer(reducer, { kind: "idle" });
56484
56607
  const [styleNote, setStyleNote] = useState("");
56608
+ const [view, setView] = useState("create");
56485
56609
  const activeGenerationRef = useRef(null);
56486
- const canGenerate = Boolean(onGenerate) && cards.length > 0 && state.kind !== "generating";
56487
- const canApply = Boolean(onApply) && state.kind === "preview_ready";
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;
56488
56615
  function abortActiveGeneration() {
56489
56616
  activeGenerationRef.current?.abort();
56490
56617
  activeGenerationRef.current = null;
@@ -56523,7 +56650,7 @@ function GeneratedIconSetDialog({ open, onOpenChange, cards, styleGuideSummary,
56523
56650
  }
56524
56651
  dispatch({
56525
56652
  type: "failed",
56526
- message: result.message
56653
+ message: friendlyGenerationFailureMessage(result.message)
56527
56654
  });
56528
56655
  } catch (error) {
56529
56656
  if (activeGenerationRef.current !== generation || generation.signal.aborted) return;
@@ -56538,7 +56665,10 @@ function GeneratedIconSetDialog({ open, onOpenChange, cards, styleGuideSummary,
56538
56665
  function close(nextOpen) {
56539
56666
  if (!nextOpen) abortActiveGeneration();
56540
56667
  onOpenChange(nextOpen);
56541
- if (!nextOpen) dispatch({ type: "reset" });
56668
+ if (!nextOpen) {
56669
+ dispatch({ type: "reset" });
56670
+ setView("create");
56671
+ }
56542
56672
  }
56543
56673
  async function apply(preview) {
56544
56674
  if (!onApply) return;
@@ -56550,7 +56680,8 @@ function GeneratedIconSetDialog({ open, onOpenChange, cards, styleGuideSummary,
56550
56680
  const result = await onApply(preview);
56551
56681
  if (result?.kind === "failed") {
56552
56682
  dispatch({
56553
- type: "failed",
56683
+ type: "apply_failed",
56684
+ preview,
56554
56685
  message: result.message
56555
56686
  });
56556
56687
  return;
@@ -56558,7 +56689,8 @@ function GeneratedIconSetDialog({ open, onOpenChange, cards, styleGuideSummary,
56558
56689
  close(false);
56559
56690
  } catch (error) {
56560
56691
  dispatch({
56561
- type: "failed",
56692
+ type: "apply_failed",
56693
+ preview,
56562
56694
  message: getGenerationErrorMessage(error)
56563
56695
  });
56564
56696
  }
@@ -56569,67 +56701,219 @@ function GeneratedIconSetDialog({ open, onOpenChange, cards, styleGuideSummary,
56569
56701
  children: /* @__PURE__ */ jsxs(DialogContent, {
56570
56702
  className: "sm:max-w-2xl",
56571
56703
  children: [
56572
- /* @__PURE__ */ jsxs(DialogHeader, { children: [/* @__PURE__ */ jsx(DialogTitle, { children: "Generate icon set" }), /* @__PURE__ */ jsx(DialogDescription, { children: state.kind === "preview_ready" ? state.preview.styleGuideSummary : `${cards.length} cards` })] }),
56704
+ /* @__PURE__ */ jsxs(DialogHeader, { children: [/* @__PURE__ */ jsx(DialogTitle, { children: "Choose icon set" }), /* @__PURE__ */ jsx(DialogDescription, { children: activePreview ? activePreview.styleGuideSummary : `${cards.length} cards` })] }),
56573
56705
  /* @__PURE__ */ jsxs("div", {
56574
56706
  className: "space-y-4",
56575
56707
  children: [
56576
- styleGuideSummary || styleGuideEditHref ? /* @__PURE__ */ jsxs("div", {
56577
- className: "rounded-md border bg-muted/20 px-3 py-2 text-sm",
56578
- children: [styleGuideSummary ? /* @__PURE__ */ jsx("p", {
56579
- className: "text-muted-foreground",
56580
- children: styleGuideSummary
56581
- }) : null, styleGuideEditHref ? /* @__PURE__ */ jsx("a", {
56582
- href: styleGuideEditHref,
56583
- className: "mt-1 inline-flex text-sm font-medium text-primary underline-offset-4 hover:underline",
56584
- children: "Edit icon style"
56585
- }) : null]
56586
- }) : null,
56587
- /* @__PURE__ */ jsx("label", {
56588
- className: "block text-sm font-medium",
56589
- htmlFor: "generated-icon-style-note",
56590
- children: "Icon style"
56591
- }),
56592
- /* @__PURE__ */ jsx(Textarea, {
56593
- id: "generated-icon-style-note",
56594
- value: styleNote,
56595
- maxLength: 240,
56596
- disabled: state.kind === "generating",
56597
- onChange: (event) => setStyleNote(event.currentTarget.value),
56598
- 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
+ })]
56599
56730
  }),
56600
- state.kind === "failed" ? /* @__PURE__ */ jsx("p", {
56731
+ state.kind === "failed" || state.kind === "apply_failed" ? /* @__PURE__ */ jsx("p", {
56601
56732
  role: "alert",
56602
56733
  className: "text-sm text-destructive",
56603
56734
  children: state.message
56604
56735
  }) : null,
56605
- /* @__PURE__ */ jsx("div", {
56606
- className: "grid gap-2 sm:grid-cols-2",
56607
- children: cards.map((card) => {
56608
- const previewAsset = state.kind === "preview_ready" || state.kind === "applying" ? state.preview.assets.find((asset) => asset.cardKey === card.cardKey) : null;
56609
- return /* @__PURE__ */ jsxs("div", {
56610
- className: "grid min-h-24 grid-cols-[3rem_1fr] gap-3 rounded-md border bg-muted/20 p-3",
56611
- children: [/* @__PURE__ */ jsx("div", {
56612
- className: "flex size-12 items-center justify-center rounded-md border bg-background",
56613
- children: previewAsset?.src ? /* @__PURE__ */ jsx("img", {
56614
- src: previewAsset.src,
56615
- alt: "",
56616
- className: "size-10 object-contain"
56617
- }) : /* @__PURE__ */ jsx(ImagePlus, {
56618
- className: "size-5 text-muted-foreground",
56619
- "aria-hidden": "true"
56620
- })
56621
- }), /* @__PURE__ */ jsxs("div", {
56622
- className: "min-w-0",
56623
- children: [/* @__PURE__ */ jsx("p", {
56624
- className: "truncate text-sm font-medium",
56625
- children: card.title
56626
- }), card.bodyText ? /* @__PURE__ */ jsx("p", {
56627
- className: "overflow-hidden text-ellipsis text-xs text-muted-foreground",
56628
- children: card.bodyText
56629
- }) : null]
56630
- })]
56631
- }, card.cardKey);
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
+ })
56632
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
+ ]
56633
56917
  })
56634
56918
  ]
56635
56919
  }),
@@ -56640,63 +56924,134 @@ function GeneratedIconSetDialog({ open, onOpenChange, cards, styleGuideSummary,
56640
56924
  onClick: () => close(false),
56641
56925
  children: "Cancel"
56642
56926
  }),
56643
- /* @__PURE__ */ jsxs(Button, {
56927
+ view === "create" ? /* @__PURE__ */ jsxs(Button, {
56644
56928
  type: "button",
56645
56929
  variant: "outline",
56646
56930
  disabled: !canGenerate,
56647
56931
  onClick: () => {
56648
56932
  generate();
56649
56933
  },
56650
- children: [state.kind === "preview_ready" ? /* @__PURE__ */ jsx(RotateCcw, {
56934
+ children: [activePreview ? /* @__PURE__ */ jsx(RotateCcw, {
56651
56935
  className: "mr-2 h-4 w-4",
56652
56936
  "aria-hidden": "true"
56653
56937
  }) : /* @__PURE__ */ jsx(Sparkles, {
56654
56938
  className: "mr-2 h-4 w-4",
56655
56939
  "aria-hidden": "true"
56656
- }), state.kind === "preview_ready" ? "Regenerate" : state.kind === "generating" ? "Generating" : "Generate"]
56657
- }),
56658
- /* @__PURE__ */ jsx(Button, {
56940
+ }), activePreview ? "Regenerate" : state.kind === "generating" ? "Generating" : "Generate"]
56941
+ }) : null,
56942
+ view === "create" ? /* @__PURE__ */ jsx(Button, {
56659
56943
  type: "button",
56660
56944
  disabled: !canApply,
56661
56945
  onClick: () => {
56662
- if (state.kind !== "preview_ready" || !onApply) return;
56946
+ if (state.kind !== "preview_ready" && state.kind !== "apply_failed" || !onApply) return;
56663
56947
  apply(state.preview);
56664
56948
  },
56665
56949
  children: state.kind === "applying" ? "Applying" : "Apply set"
56666
- })
56950
+ }) : null
56667
56951
  ] })
56668
56952
  ]
56669
56953
  })
56670
56954
  });
56671
56955
  }
56672
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
56673
57029
  //#region ../editor-blocks/src/block-editor/FeatureCardIconsPanel.tsx
56674
57030
  function supportsFeatureCardIconActions(blockKind) {
56675
57031
  return blockKind === "block.feature-cards";
56676
57032
  }
56677
- function FeatureCardIconsPanel({ block, uiStore, currentStyleGuideVersionId, iconStyleGuideSummary, iconStyleGuideEditHref, onGenerateIconSet, onApplyGeneratedIconSet }) {
57033
+ function FeatureCardIconsPanel({ block, uiStore, currentStyleGuideVersionId, iconStyleGuideSummary, iconStyleGuideEditHref, onGenerateIconSet }) {
56678
57034
  const [generateDialogOpen, setGenerateDialogOpen] = useState(false);
56679
57035
  const blockId = typeof block.id === "string" ? unsafeAsEditorBlockId(block.id) : null;
56680
57036
  const content = useStoreSelector(uiStore, (state) => blockId ? state.drafts.getCurrentValues(blockId) : null) ?? block.draftContent ?? block.content ?? null;
56681
57037
  const status = useMemo(() => getFeatureCardIconStatus(content), [content]);
56682
57038
  const dialogCards = useMemo(() => getFeatureCardIconDialogCards(content), [content]);
56683
57039
  const styleSummary = useMemo(() => getFeatureCardGeneratedIconStyleSummary(content, currentStyleGuideVersionId), [content, currentStyleGuideVersionId]);
56684
- const isComplete = status.totalCards > 0 && status.cardsWithIcons >= status.totalCards;
56685
57040
  const hasStaleGeneratedIcons = styleSummary.kind === "available" && styleSummary.staleCount > 0;
56686
57041
  async function applyGeneratedIconSetPreview(preview) {
56687
57042
  if (!blockId) return {
56688
57043
  kind: "failed",
56689
57044
  message: "Could not apply generated icon set"
56690
57045
  };
56691
- const previewToApply = await onApplyGeneratedIconSet?.(preview) ?? preview;
56692
- if (applyGeneratedFeatureCardIconSet({
57046
+ const result = await applyGeneratedIconSetToEditor({
56693
57047
  blockId,
56694
57048
  content,
56695
- drafts: uiStore.getState().drafts,
56696
- assets: previewToApply.assets
56697
- }).kind !== "applied") return {
57049
+ preview,
57050
+ uiStore
57051
+ });
57052
+ if (result.kind !== "applied") return {
56698
57053
  kind: "failed",
56699
- 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"
56700
57055
  };
56701
57056
  return { kind: "applied" };
56702
57057
  }
@@ -56707,51 +57062,31 @@ function FeatureCardIconsPanel({ block, uiStore, currentStyleGuideVersionId, ico
56707
57062
  "data-testid": "feature-card-icons-panel",
56708
57063
  children: [/* @__PURE__ */ jsxs("div", {
56709
57064
  className: "flex flex-wrap items-center gap-2",
56710
- children: [
56711
- /* @__PURE__ */ jsxs("div", {
56712
- className: "min-w-0 flex-1",
56713
- children: [/* @__PURE__ */ jsx("h3", {
56714
- className: "text-sm font-medium",
56715
- children: "Icons"
56716
- }), /* @__PURE__ */ jsxs("p", {
56717
- className: "text-xs text-muted-foreground",
56718
- children: [
56719
- status.cardsWithIcons,
56720
- " of ",
56721
- status.totalCards,
56722
- " cards"
56723
- ]
56724
- })]
56725
- }),
56726
- /* @__PURE__ */ jsxs(Button, {
56727
- type: "button",
56728
- variant: "outline",
56729
- size: "sm",
56730
- disabled: status.totalCards === 0 || isComplete,
56731
- onClick: () => {
56732
- applyCuratedFeatureCardIconSuggestions({
56733
- blockId,
56734
- content,
56735
- drafts: uiStore.getState().drafts
56736
- });
56737
- },
56738
- children: [/* @__PURE__ */ jsx(Sparkles, {
56739
- className: "mr-2 h-4 w-4",
56740
- "aria-hidden": "true"
56741
- }), "Suggest icons"]
56742
- }),
56743
- /* @__PURE__ */ jsxs(Button, {
56744
- type: "button",
56745
- variant: "outline",
56746
- size: "sm",
56747
- disabled: status.totalCards === 0,
56748
- onClick: () => setGenerateDialogOpen(true),
56749
- children: [/* @__PURE__ */ jsx(ImagePlus, {
56750
- className: "mr-2 h-4 w-4",
56751
- "aria-hidden": "true"
56752
- }), "Generate icon set"]
56753
- })
56754
- ]
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
+ })]
56755
57090
  }), hasStaleGeneratedIcons ? /* @__PURE__ */ jsxs(Callout, {
56756
57091
  tone: "warning",
56757
57092
  className: "mt-3 flex flex-wrap items-center gap-2",
@@ -56782,7 +57117,7 @@ function FeatureCardIconsPanel({ block, uiStore, currentStyleGuideVersionId, ico
56782
57117
  }
56783
57118
  //#endregion
56784
57119
  //#region ../editor-blocks/src/block-editor/BlockCardBody.tsx
56785
- function BlockCardBody({ siteId, block, manifest, uiStore, hasRecoveryConflict, focusSignal, onFocusHandled, onBlockSave, theme, widgetOverrides, hideThemeV2RawStyleFields = false, pageDesignBlock = null, currentStyleGuideVersionId, iconStyleGuideSummary, iconStyleGuideEditHref, onGenerateIconSet, onApplyGeneratedIconSet }) {
57120
+ function BlockCardBody({ siteId, block, manifest, uiStore, hasRecoveryConflict, focusSignal, onFocusHandled, onBlockSave, theme, widgetOverrides, hideThemeV2RawStyleFields = false, pageDesignBlock = null, currentStyleGuideVersionId, iconStyleGuideSummary, iconStyleGuideEditHref, onGenerateIconSet }) {
56786
57121
  return /* @__PURE__ */ jsxs(CardContent, {
56787
57122
  className: "space-y-4 pb-6",
56788
57123
  children: [/* @__PURE__ */ jsx(FeatureCardIconsPanel, {
@@ -56791,8 +57126,7 @@ function BlockCardBody({ siteId, block, manifest, uiStore, hasRecoveryConflict,
56791
57126
  currentStyleGuideVersionId,
56792
57127
  iconStyleGuideSummary,
56793
57128
  iconStyleGuideEditHref,
56794
- onGenerateIconSet,
56795
- onApplyGeneratedIconSet
57129
+ onGenerateIconSet
56796
57130
  }), /* @__PURE__ */ jsx(BlockForm, {
56797
57131
  siteId,
56798
57132
  block,
@@ -57015,7 +57349,7 @@ function useDraftContent(uiStore, blockId) {
57015
57349
  }
57016
57350
  //#endregion
57017
57351
  //#region ../editor-blocks/src/block-editor/blockHeaderActionPlan.ts
57018
- function deriveBlockHeaderActionPlan({ actionPresentation, blockId, settingsAvailable, featureCardIconActionsAvailable, featureCardIconsComplete, generatedIconSetActionsAvailable, hasStaleGeneratedIcons, featureCardIconDialogCardsCount, duplicateAvailable, duplicateDisabled, deleteAvailable, deleteDisabled }) {
57352
+ function deriveBlockHeaderActionPlan({ actionPresentation, blockId, settingsAvailable, featureCardIconActionsAvailable, generatedIconSetActionsAvailable, hasStaleGeneratedIcons, featureCardIconDialogCardsCount, duplicateAvailable, duplicateDisabled, deleteAvailable, deleteDisabled }) {
57019
57353
  const customizeAction = deriveCustomizeAction({
57020
57354
  actionPresentation,
57021
57355
  blockId,
@@ -57035,7 +57369,6 @@ function deriveBlockHeaderActionPlan({ actionPresentation, blockId, settingsAvai
57035
57369
  });
57036
57370
  const iconActions = deriveIconActions({
57037
57371
  featureCardIconActionsAvailable,
57038
- featureCardIconsComplete,
57039
57372
  generatedIconSetActionsAvailable,
57040
57373
  hasStaleGeneratedIcons,
57041
57374
  featureCardIconDialogCardsCount
@@ -57079,16 +57412,13 @@ function deriveCustomizeAction({ actionPresentation, blockId, settingsAvailable
57079
57412
  default: return assertNever$5(actionPresentation.customize);
57080
57413
  }
57081
57414
  }
57082
- function deriveIconActions({ featureCardIconActionsAvailable, featureCardIconsComplete, generatedIconSetActionsAvailable, hasStaleGeneratedIcons, featureCardIconDialogCardsCount }) {
57415
+ function deriveIconActions({ featureCardIconActionsAvailable, generatedIconSetActionsAvailable, hasStaleGeneratedIcons, featureCardIconDialogCardsCount }) {
57083
57416
  if (!featureCardIconActionsAvailable) return [];
57084
- return [{
57085
- kind: "suggest-icons",
57086
- disabled: featureCardIconsComplete
57087
- }, ...generatedIconSetActionsAvailable ? [{
57417
+ return generatedIconSetActionsAvailable ? [{
57088
57418
  kind: "generated-icon-set",
57089
57419
  disabled: featureCardIconDialogCardsCount === 0,
57090
57420
  stale: hasStaleGeneratedIcons
57091
- }] : []];
57421
+ }] : [];
57092
57422
  }
57093
57423
  function deriveStructureActions({ duplicateAvailable, duplicateDisabled, deleteAvailable, deleteDisabled }) {
57094
57424
  return [...duplicateAvailable ? [{
@@ -57101,7 +57431,7 @@ function deriveStructureActions({ duplicateAvailable, duplicateDisabled, deleteA
57101
57431
  }
57102
57432
  //#endregion
57103
57433
  //#region ../editor-blocks/src/block-editor/BlockCardHeader.tsx
57104
- 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, onApplyGeneratedIconSet }) {
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 }) {
57105
57435
  const [deleteDialogOpen, setDeleteDialogOpen] = useState(false);
57106
57436
  const [settingsDialogOpen, setSettingsDialogOpen] = useState(false);
57107
57437
  const [generateIconSetDialogOpen, setGenerateIconSetDialogOpen] = useState(false);
@@ -57113,7 +57443,6 @@ function BlockCardHeader({ block, manifest, isFirst, isLast, isMoving, onMove, o
57113
57443
  const currentContent = useStoreSelector(uiStore, (state) => supportsIconActions && blockId ? state.drafts.getCurrentValues(blockId) : null);
57114
57444
  const featureCardIconStatus = supportsIconActions ? getFeatureCardIconStatus(currentContent ?? block.draftContent ?? contentToUse) : null;
57115
57445
  const featureCardIconActionsAvailable = Boolean(blockId) && supportsIconActions && (featureCardIconStatus?.totalCards ?? 0) > 0;
57116
- const featureCardIconsComplete = featureCardIconStatus !== null && featureCardIconStatus.totalCards > 0 && featureCardIconStatus.cardsWithIcons >= featureCardIconStatus.totalCards;
57117
57446
  const generatedIconSetActionsAvailable = featureCardIconActionsAvailable && Boolean(onGenerateIconSet);
57118
57447
  const featureCardIconContent = currentContent ?? block.draftContent ?? contentToUse;
57119
57448
  const featureCardIconDialogCards = supportsIconActions ? getFeatureCardIconDialogCards(featureCardIconContent) : [];
@@ -57124,15 +57453,15 @@ function BlockCardHeader({ block, manifest, isFirst, isLast, isMoving, onMove, o
57124
57453
  kind: "failed",
57125
57454
  message: "Could not apply generated icon set"
57126
57455
  };
57127
- const previewToApply = await onApplyGeneratedIconSet?.(preview) ?? preview;
57128
- if (applyGeneratedFeatureCardIconSet({
57456
+ const result = await applyGeneratedIconSetToEditor({
57129
57457
  blockId,
57130
57458
  content: featureCardIconContent,
57131
- drafts: uiStore.getState().drafts,
57132
- assets: previewToApply.assets
57133
- }).kind !== "applied") return {
57459
+ preview,
57460
+ uiStore
57461
+ });
57462
+ if (result.kind !== "applied") return {
57134
57463
  kind: "failed",
57135
- 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"
57136
57465
  };
57137
57466
  return { kind: "applied" };
57138
57467
  }
@@ -57142,7 +57471,6 @@ function BlockCardHeader({ block, manifest, isFirst, isLast, isMoving, onMove, o
57142
57471
  blockId,
57143
57472
  settingsAvailable,
57144
57473
  featureCardIconActionsAvailable,
57145
- featureCardIconsComplete,
57146
57474
  generatedIconSetActionsAvailable,
57147
57475
  hasStaleGeneratedIcons,
57148
57476
  featureCardIconDialogCardsCount: featureCardIconDialogCards.length,
@@ -57173,14 +57501,6 @@ function BlockCardHeader({ block, manifest, isFirst, isLast, isMoving, onMove, o
57173
57501
  }
57174
57502
  setSettingsDialogOpen(true);
57175
57503
  return;
57176
- case "suggest-icons":
57177
- if (!blockId || action.disabled) return;
57178
- applyCuratedFeatureCardIconSuggestions({
57179
- blockId,
57180
- content: currentContent ?? block.draftContent ?? contentToUse,
57181
- drafts: uiStore.getState().drafts
57182
- });
57183
- return;
57184
57504
  case "generated-icon-set":
57185
57505
  if (action.disabled) return;
57186
57506
  setGenerateIconSetDialogOpen(true);
@@ -57342,7 +57662,6 @@ function BlockCardHeader({ block, manifest, isFirst, isLast, isMoving, onMove, o
57342
57662
  function menuActionIcon(action) {
57343
57663
  switch (action.kind) {
57344
57664
  case "customize": return /* @__PURE__ */ jsx(Settings, { className: "mr-2 h-4 w-4" });
57345
- case "suggest-icons": return /* @__PURE__ */ jsx(Sparkles, { className: "mr-2 h-4 w-4" });
57346
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" });
57347
57666
  case "duplicate": return /* @__PURE__ */ jsx(Copy, { className: "mr-2 h-4 w-4" });
57348
57667
  case "delete": return /* @__PURE__ */ jsx(Trash2, { className: "mr-2 h-4 w-4" });
@@ -57352,7 +57671,6 @@ function menuActionIcon(action) {
57352
57671
  function menuActionLabel(action) {
57353
57672
  switch (action.kind) {
57354
57673
  case "customize": return "Customize";
57355
- case "suggest-icons": return "Suggest icons";
57356
57674
  case "generated-icon-set": return action.stale ? "Regenerate icon set" : "Generate icon set";
57357
57675
  case "duplicate": return "Duplicate";
57358
57676
  case "delete": return "Delete";
@@ -57361,7 +57679,7 @@ function menuActionLabel(action) {
57361
57679
  }
57362
57680
  //#endregion
57363
57681
  //#region ../editor-blocks/src/block-editor/BlockCard.tsx
57364
- 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, onApplyGeneratedIconSet }) {
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 }) {
57365
57683
  const contentId = block.id ? `builder-block-content-${block.id}` : void 0;
57366
57684
  return /* @__PURE__ */ jsx(Card, {
57367
57685
  className: cn$1("w-full p-0 transition-shadow", highlighted ? "builder-editor-block-highlight" : ""),
@@ -57393,8 +57711,7 @@ function BlockCard({ siteId, block, manifest, isFirst, isLast, isMoving, onMove,
57393
57711
  currentStyleGuideVersionId,
57394
57712
  iconStyleGuideSummary,
57395
57713
  iconStyleGuideEditHref,
57396
- onGenerateIconSet,
57397
- onApplyGeneratedIconSet
57714
+ onGenerateIconSet
57398
57715
  }), /* @__PURE__ */ jsx(CollapsibleContent, {
57399
57716
  id: contentId,
57400
57717
  children: /* @__PURE__ */ jsx(BlockCardBody, {
@@ -57413,8 +57730,7 @@ function BlockCard({ siteId, block, manifest, isFirst, isLast, isMoving, onMove,
57413
57730
  currentStyleGuideVersionId,
57414
57731
  iconStyleGuideSummary,
57415
57732
  iconStyleGuideEditHref,
57416
- onGenerateIconSet,
57417
- onApplyGeneratedIconSet
57733
+ onGenerateIconSet
57418
57734
  })
57419
57735
  })]
57420
57736
  })
@@ -57422,7 +57738,7 @@ function BlockCard({ siteId, block, manifest, isFirst, isLast, isMoving, onMove,
57422
57738
  }
57423
57739
  //#endregion
57424
57740
  //#region ../editor-blocks/src/block-editor/SortableBlockItem.tsx
57425
- 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, onApplyGeneratedIconSet }) {
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 }) {
57426
57742
  const sortable = useSortable({
57427
57743
  id: block.id,
57428
57744
  disabled: !isDraggable
@@ -57495,14 +57811,39 @@ const SortableBlockItem = memo(function SortableBlockItem({ siteId, block, onMov
57495
57811
  currentStyleGuideVersionId,
57496
57812
  iconStyleGuideSummary,
57497
57813
  iconStyleGuideEditHref,
57498
- onGenerateIconSet,
57499
- onApplyGeneratedIconSet
57814
+ onGenerateIconSet
57500
57815
  })
57501
57816
  });
57502
57817
  });
57503
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
57504
57831
  //#region ../editor-blocks/src/BlockEditor.tsx
57505
- const BlockEditor = forwardRef(function BlockEditor({ siteId, 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) {
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) {
57506
57847
  const [blockList, setBlockList] = useState(() => normalizeBlockListInitial(blocks));
57507
57848
  const [errorMessage, setErrorMessage] = useState(null);
57508
57849
  const [highlightedBlockId, setHighlightedBlockId] = useState(null);
@@ -57516,6 +57857,11 @@ const BlockEditor = forwardRef(function BlockEditor({ siteId, owner, blocks, rec
57516
57857
  const [fetchedContentTypes, setFetchedContentTypes] = useState(enabledContentTypes);
57517
57858
  const [fetchingContentTypes, setFetchingContentTypes] = useState(false);
57518
57859
  const [iconStyleGuide, setIconStyleGuide] = useState(null);
57860
+ const [generatedIconLibrary, setGeneratedIconLibrary] = useState({
57861
+ kind: "loading",
57862
+ sets: [],
57863
+ nextCursor: null
57864
+ });
57519
57865
  const allowReordering = enableReordering;
57520
57866
  const allowCreation = enableCreation;
57521
57867
  const allowDeletion = enableDeletion;
@@ -57545,7 +57891,7 @@ const BlockEditor = forwardRef(function BlockEditor({ siteId, owner, blocks, rec
57545
57891
  setIconStyleGuide(versionId ? {
57546
57892
  versionId,
57547
57893
  summary: response.guide.displaySummary,
57548
- editHref: `/dashboard/sites/${siteId}/settings/icon-style-guide`
57894
+ editHref: buildDashboardPath(dashboardBaseUrl, `/dashboard/sites/${siteId}/settings/icon-style-guide`)
57549
57895
  } : null);
57550
57896
  }).catch(() => {
57551
57897
  if (!cancelled) setIconStyleGuide(null);
@@ -57553,7 +57899,81 @@ const BlockEditor = forwardRef(function BlockEditor({ siteId, owner, blocks, rec
57553
57899
  return () => {
57554
57900
  cancelled = true;
57555
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
+ };
57556
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
+ ]);
57557
57977
  const generateFeatureCardIconSet = useCallback(async (input) => {
57558
57978
  if (typeof apiClient !== "function") return {
57559
57979
  kind: "failed",
@@ -57576,53 +57996,37 @@ const BlockEditor = forwardRef(function BlockEditor({ siteId, owner, blocks, rec
57576
57996
  },
57577
57997
  options: input.signal ? { signal: input.signal } : void 0
57578
57998
  }));
57579
- const assets = response.preview.assets.map((asset) => {
57999
+ const assets = response.set.assets.map((asset) => {
57580
58000
  const iconValue = parseBlockIconValue(asset.iconValue);
57581
- if (iconValue.kind !== "generated") throw new Error("Generated icon response included an invalid icon reference");
58001
+ if (iconValue.kind !== "generated") throw new Error(GENERATED_ICON_SET_FRIENDLY_ERROR);
57582
58002
  return {
57583
58003
  cardKey: asset.cardKey,
57584
58004
  title: input.cards.find((card) => card.cardKey === asset.cardKey)?.title ?? asset.cardKey,
57585
- src: asset.src,
57586
- iconValue
58005
+ src: asset.renderAsset?.src ?? "",
58006
+ iconValue,
58007
+ renderAsset: asset.renderAsset
57587
58008
  };
57588
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
+ }));
57589
58015
  return {
57590
58016
  kind: "preview_ready",
57591
58017
  preview: {
57592
- setId: response.candidate.setId,
58018
+ setId: response.set.setId,
57593
58019
  styleGuideSummary: response.styleGuide.displaySummary,
57594
- candidate: response.candidate,
57595
58020
  assets
57596
58021
  }
57597
58022
  };
57598
58023
  } catch (error) {
57599
58024
  return {
57600
58025
  kind: "failed",
57601
- message: error instanceof Error && error.message ? error.message : "Failed to generate icon set"
58026
+ message: getGeneratedIconSetErrorMessage(error)
57602
58027
  };
57603
58028
  }
57604
58029
  }, [apiClient, siteId]);
57605
- const applyGeneratedFeatureCardIconSet = useCallback(async (preview) => {
57606
- if (typeof apiClient !== "function") return preview;
57607
- if (!preview.candidate) return preview;
57608
- const response = unwrapResponse(await apiClient({
57609
- endpoint: "applyGeneratedIconSet",
57610
- params: { siteId },
57611
- body: { candidate: preview.candidate }
57612
- }));
57613
- const iconValuesByCardKey = new Map(response.assets.map((asset) => [asset.cardKey, asset.iconValue]));
57614
- return {
57615
- ...preview,
57616
- assets: preview.assets.map((asset) => {
57617
- const iconValue = parseBlockIconValue(iconValuesByCardKey.get(asset.cardKey) ?? asset.iconValue);
57618
- if (iconValue.kind !== "generated") throw new Error("Generated icon apply response included an invalid icon reference");
57619
- return {
57620
- ...asset,
57621
- iconValue
57622
- };
57623
- })
57624
- };
57625
- }, [apiClient, siteId]);
57626
58030
  useEffect(() => {
57627
58031
  return uiStore.subscribe(() => {
57628
58032
  const structureList = uiStore.getState().structure.getList();
@@ -57797,133 +58201,139 @@ const BlockEditor = forwardRef(function BlockEditor({ siteId, owner, blocks, rec
57797
58201
  uiStore
57798
58202
  ]);
57799
58203
  const hasBlocks = blockList.length > 0;
57800
- return /* @__PURE__ */ jsx(BlockListProvider, {
57801
- value: useMemo(() => ({
57802
- blockList,
57803
- setBlockList,
57804
- reorderId,
57805
- focusRequest,
57806
- triggerFocus,
57807
- handleMove,
57808
- onDragEnd,
57809
- activeBlockId,
57810
- setActiveBlockId,
57811
- theme
57812
- }), [
57813
- blockList,
57814
- reorderId,
57815
- focusRequest,
57816
- triggerFocus,
57817
- handleMove,
57818
- onDragEnd,
57819
- activeBlockId,
57820
- setActiveBlockId,
57821
- theme
57822
- ]),
57823
- children: /* @__PURE__ */ jsxs("div", {
57824
- className: "space-y-3 touch-pan-y",
57825
- children: [
57826
- /* @__PURE__ */ jsx(HeaderActions, { headerLeftSlot }),
57827
- errorMessage ? /* @__PURE__ */ jsx("div", {
57828
- className: "rounded-md border border-destructive bg-destructive/10 px-4 py-2 text-sm text-destructive",
57829
- children: errorMessage
57830
- }) : null,
57831
- hasBlocks ? /* @__PURE__ */ jsx(DndContext, {
57832
- sensors: activeSensors,
57833
- collisionDetection: closestCenter,
57834
- onDragEnd,
57835
- children: /* @__PURE__ */ jsx(SortableContext, {
57836
- items: blockList.map((b) => b.id),
57837
- strategy: verticalListSortingStrategy,
57838
- children: /* @__PURE__ */ jsxs("div", {
57839
- className: "space-y-0",
57840
- children: [canCreateBlocks ? /* @__PURE__ */ jsx(AddBlockDivider, {
57841
- onOpen: openPicker,
57842
- position: 0
57843
- }) : null, blockList.map((block, index) => {
57844
- const focusSignal = focusRequest && block.id && focusRequest.blockId === unsafeAsEditorBlockId(block.id) ? focusRequest : null;
57845
- const collapsed = isCollapsed(block.id);
57846
- return /* @__PURE__ */ jsxs("div", {
57847
- className: "group",
57848
- ref: (node) => {
57849
- if (!block.id) return;
57850
- if (node) blockRefs.current.set(block.id, node);
57851
- else blockRefs.current.delete(block.id);
57852
- },
57853
- children: [/* @__PURE__ */ jsx(SortableBlockItem, {
57854
- siteId,
57855
- block,
57856
- onMove: handleMove,
57857
- onDuplicate: duplicateBlock,
57858
- onDelete: allowDeletion ? handleDelete : void 0,
57859
- isFirst: index === 0,
57860
- isLast: index === blockList.length - 1,
57861
- isMoving: reorderId === block.id || duplicatingBlockId === block.id,
57862
- isDraggable: allowReordering,
57863
- collapsed,
57864
- 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) => {
57865
58259
  if (!block.id) return;
57866
- setCollapsed(block.id, nextCollapsed);
57867
- if (nextCollapsed) {
57868
- if (activeBlockId === unsafeAsEditorBlockId(block.id)) uiStore.getState().setActiveBlockId(null);
57869
- return;
57870
- }
57871
- uiStore.getState().setActiveBlockId(unsafeAsEditorBlockId(block.id));
58260
+ if (node) blockRefs.current.set(block.id, node);
58261
+ else blockRefs.current.delete(block.id);
57872
58262
  },
57873
- highlighted: highlightedBlockId === block.id,
57874
- hasRecoveryConflict: typeof block.id === "string" && conflictedBlockIdSet.has(block.id),
57875
- focusSignal,
57876
- onFocusHandled: handleFocusHandled,
57877
- onBlockSave,
57878
- theme,
57879
- widgetOverrides,
57880
- uiStore,
57881
- sdkConfig,
57882
- customBlocks,
57883
- hideThemeV2RawStyleFields,
57884
- pageDesignBlock: block.id ? pageDesignBlockById.get(block.id) ?? null : null,
57885
- reorderControlMode,
57886
- actionPresentation,
57887
- currentStyleGuideVersionId: iconStyleGuide?.versionId ?? null,
57888
- iconStyleGuideSummary: iconStyleGuide?.summary ?? null,
57889
- iconStyleGuideEditHref: iconStyleGuide?.editHref ?? null,
57890
- onGenerateIconSet: generateFeatureCardIconSet,
57891
- onApplyGeneratedIconSet: applyGeneratedFeatureCardIconSet
57892
- }), canCreateBlocks && index < blockList.length - 1 ? /* @__PURE__ */ jsx(AddBlockDivider, {
57893
- onOpen: openPicker,
57894
- position: index + 1
57895
- }) : null]
57896
- }, block.id ?? index);
57897
- })]
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
+ })
57898
58308
  })
57899
- })
57900
- }) : hasBlocks ? /* @__PURE__ */ jsx("div", {
57901
- className: "rounded-md border border-dashed px-4 py-6 text-center text-sm text-muted-foreground",
57902
- children: "Loading block editor..."
57903
- }) : canCreateBlocks ? /* @__PURE__ */ jsx(EmptyState, { onAdd: () => openPicker(0) }) : /* @__PURE__ */ jsx("div", {
57904
- className: "rounded-md border border-dashed px-4 py-6 text-center text-sm text-muted-foreground",
57905
- children: emptyUnavailableMessage
57906
- }),
57907
- canCreateBlocks && hasBlocks ? /* @__PURE__ */ jsx("div", {
57908
- className: "flex justify-center",
57909
- children: /* @__PURE__ */ jsxs(Button, {
57910
- type: "button",
57911
- variant: "secondary",
57912
- onClick: () => openPicker(blockList.length),
57913
- children: [/* @__PURE__ */ jsx(Plus, { className: "mr-2 h-4 w-4" }), "Add block"]
57914
- })
57915
- }) : null,
57916
- canCreateBlocks ? /* @__PURE__ */ jsx(EnhancedBlockPickerDialog, {
57917
- open: pickerOpen,
57918
- onOpenChange: (open) => open ? openPicker(blockList.length) : closePicker(),
57919
- creatingBlockName,
57920
- descriptors: availableBlocks,
57921
- siteId,
57922
- existingBlockNames: blockList.map((b) => b.kind).filter(Boolean),
57923
- enabledContentTypes: fetchedContentTypes,
57924
- onSelect: (descriptor) => void handleCreateBlock(descriptor)
57925
- }) : null
57926
- ]
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
+ })
57927
58337
  })
57928
58338
  });
57929
58339
  });
@@ -59361,45 +59771,169 @@ function EntryPickerField({ path, backend, config }) {
59361
59771
  //#region ../editor-blocks/src/widgets/icon-picker/IconPickerField.tsx
59362
59772
  function IconPickerField({ path, backend, config }) {
59363
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("");
59364
59778
  const configuredPreset = config.ui?.iconPickerPreset;
59365
59779
  const preset = resolveIconPickerPreset(configuredPreset);
59366
59780
  if (configuredPreset && !isIconPickerPreset(configuredPreset) && true) console.warn(`[IconPickerField] Unknown iconPickerPreset at "${path}". Falling back to "cta".`);
59367
59781
  const options = getIconPickerOptionsForPreset(preset);
59368
- const selected = typeof value === "string" && isKnownIconName(value) && options.some((option) => option.id === value) ? value : void 0;
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);
59369
59792
  return /* @__PURE__ */ jsx(FieldFrame, {
59370
59793
  label: config.label,
59371
59794
  description: config.description,
59372
59795
  error: error?.message,
59373
- children: () => /* @__PURE__ */ jsx(Combobox, {
59374
- items: options.map((opt) => ({
59375
- id: opt.id,
59376
- label: opt.label,
59377
- searchText: opt.searchText,
59378
- item: opt
59379
- })),
59380
- value: selected,
59381
- onSelect: (entry) => {
59382
- if (!entry) {
59383
- setValue(null);
59384
- return;
59385
- }
59386
- setValue(entry.id);
59387
- },
59388
- placeholder: "Select icon…",
59389
- clearLabel: "Clear",
59390
- renderItem: (entry) => {
59391
- const Icon = getIconComponent(entry.id);
59392
- return /* @__PURE__ */ jsxs("div", {
59393
- className: "flex items-center gap-2",
59394
- children: [Icon ? /* @__PURE__ */ jsx(Icon, {
59395
- className: "h-4 w-4 shrink-0",
59396
- "aria-hidden": "true"
59397
- }) : null, /* @__PURE__ */ jsx("span", {
59398
- className: "truncate",
59399
- children: entry.label
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"
59400
59841
  })]
59401
- });
59402
- }
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
+ ]
59403
59937
  })
59404
59938
  });
59405
59939
  }
@@ -64315,10 +64849,84 @@ function ColorTokenButton({ token, label, swatchColor, selected, disabled, onCli
64315
64849
  });
64316
64850
  }
64317
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
64318
64925
  //#region ../preview-next/src/client/preview/SiteChromeCustomizeButton.tsx
64319
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" }) {
64320
64927
  const customize = useSiteChromeCustomizeOptional();
64321
64928
  const popover = useCustomizePopoverController();
64929
+ const [backgroundChooserOpen, setBackgroundChooserOpen] = useState(false);
64322
64930
  const popoverSide = useSiteChromeCustomizePopoverSide({
64323
64931
  open: popover.open,
64324
64932
  surface,
@@ -64338,52 +64946,39 @@ function SiteChromeCustomizeButton({ surface, containerClassName = "pointer-even
64338
64946
  }, [surfaceState]);
64339
64947
  const controlPlan = useMemo(() => {
64340
64948
  if (surfaceState.kind !== "available" || !background) return { cycleRows: [] };
64341
- return { cycleRows: [
64342
- ...surfaceState.surface === "header" || surfaceState.surface === "footer" ? [{
64343
- label: "Layout",
64344
- valueLabel: surfaceState.currentLayoutLabel,
64345
- previousLabel: `Previous ${surface} Layout`,
64346
- nextLabel: `Next ${surface} Layout`,
64347
- availability: cycleAvailabilityFromFlags({
64348
- canCycle: cycleableLayoutOptionCount > 1,
64349
- applyAllowed: surfaceState.applyAllowed
64350
- }),
64351
- onPrevious: () => customize?.cycleSurfaceLayout(surface, "prev"),
64352
- onNext: () => customize?.cycleSurfaceLayout(surface, "next")
64353
- }] : [],
64354
- {
64355
- label: "Look",
64356
- valueLabel: surfaceState.currentLabel,
64357
- previousLabel: `Previous ${surface} Look`,
64358
- nextLabel: `Next ${surface} Look`,
64359
- availability: cycleAvailabilityFromFlags({
64360
- canCycle: cycleableOptionCount > 1,
64361
- applyAllowed: surfaceState.applyAllowed
64362
- }),
64363
- onPrevious: () => customize?.cycleSurfaceLook(surface, "prev"),
64364
- onNext: () => customize?.cycleSurfaceLook(surface, "next")
64365
- },
64366
- ...background.available ? [{
64367
- label: "Background",
64368
- valueLabel: background.currentLabel,
64369
- previousLabel: `Previous ${surface} background`,
64370
- nextLabel: `Next ${surface} background`,
64371
- availability: cycleAvailabilityFromFlags({
64372
- canCycle: background.quickTokens.length > 0,
64373
- applyAllowed: surfaceState.applyAllowed
64374
- }),
64375
- onPrevious: () => customize?.cycleSurfaceBackground(surface, "prev"),
64376
- onNext: () => customize?.cycleSurfaceBackground(surface, "next")
64377
- }] : []
64378
- ] };
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
+ }] };
64379
64972
  }, [
64380
- background,
64381
64973
  customize,
64382
64974
  cycleableLayoutOptionCount,
64383
64975
  cycleableOptionCount,
64384
64976
  surface,
64385
64977
  surfaceState
64386
64978
  ]);
64979
+ useEffect(() => {
64980
+ if (!popover.open) setBackgroundChooserOpen(false);
64981
+ }, [popover.open]);
64387
64982
  return /* @__PURE__ */ jsxs(PreviewChromeFloatingControl, {
64388
64983
  anchorSelector: "[data-preview-site-chrome-surface]",
64389
64984
  anchorTargetSelector: surface === "header" ? SITE_CHROME_VISIBLE_HEADER_SELECTOR : void 0,
@@ -64413,9 +65008,29 @@ function SiteChromeCustomizeButton({ surface, containerClassName = "pointer-even
64413
65008
  side: popoverSide,
64414
65009
  children: [
64415
65010
  controlPlan.cycleRows.map((row) => /* @__PURE__ */ jsx(CustomizeCycleRow, { ...row }, row.label)),
64416
- background?.available ? /* @__PURE__ */ jsx(SiteChromeBackgroundPalette, {
65011
+ background?.available ? /* @__PURE__ */ jsx(SiteChromeBackgroundControl, {
64417
65012
  background,
64418
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
+ },
64419
65034
  onChoose: (override) => customize?.chooseSurfaceBackground(surfaceState.surface, override)
64420
65035
  }) : null,
64421
65036
  surfaceState.surface === "header" ? /* @__PURE__ */ jsxs("div", {
@@ -64550,34 +65165,75 @@ function chooseSiteChromeCustomizePopoverSide(input) {
64550
65165
  if (measuredPanelHeight <= availableBelow) return "below";
64551
65166
  return availableAbove > availableBelow ? "above" : "below";
64552
65167
  }
64553
- function SiteChromeBackgroundPalette({ background, applyAllowed, onChoose }) {
65168
+ function SiteChromeBackgroundControl({ background, applyAllowed, chooserOpen, onToggleChooser, onCycleMode, onCycleValue, onChoose }) {
64554
65169
  const choose = (override) => (event) => {
64555
65170
  event.preventDefault();
64556
65171
  event.stopPropagation();
64557
65172
  onChoose(override);
64558
65173
  };
65174
+ const canCycleMode = applyAllowed && (background.current.kind === "color" || background.quickTokens.length > 0);
65175
+ const canCycleValue = applyAllowed && background.current.kind === "color" && background.quickTokens.length > 1;
64559
65176
  return /* @__PURE__ */ jsx("div", {
64560
65177
  className: "border-t pt-3",
64561
- children: /* @__PURE__ */ jsx(CustomizeBackgroundColorPicker, {
64562
- title: "Background colors",
64563
- defaultSelected: background.current.kind === "default",
64564
- onChooseDefault: choose({ kind: "default" }),
64565
- selectedToken: background.current.kind === "color" ? background.current.token : null,
64566
- recommendedTokens: background.quickTokens,
64567
- advancedTokens: background.advancedTokens,
64568
- disabled: !applyAllowed,
64569
- columnsClassName: "grid-cols-3",
64570
- labelForToken: formatSiteChromeBackgroundTokenLabel,
64571
- swatchColorForToken: tokenSwatchCss$1,
64572
- onChooseToken: (token, event) => {
64573
- choose({
64574
- kind: "color",
64575
- token
64576
- })(event);
64577
- }
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,
65198
+ disabled: !applyAllowed,
65199
+ labelForToken: formatSiteChromeBackgroundTokenLabel,
65200
+ swatchColorForToken: tokenSwatchCss$1,
65201
+ onChooseToken: (token, event) => {
65202
+ choose({
65203
+ kind: "color",
65204
+ token
65205
+ })(event);
65206
+ }
65207
+ })
65208
+ })
64578
65209
  })
64579
65210
  });
64580
65211
  }
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) }
65235
+ });
65236
+ }
64581
65237
  function tokenSwatchCss$1(token) {
64582
65238
  return `rgb(var(--tb-${token}))`;
64583
65239
  }
@@ -64847,17 +65503,17 @@ function LinkedEntryEditEventBridge() {
64847
65503
  //#region ../preview-next/src/client/preview/PreviewShellLayout.tsx
64848
65504
  const previewContainerResponsiveEnabled = process.env.NEXT_PUBLIC_ENABLE_PREVIEW_CONTAINER_RESPONSIVE !== "false";
64849
65505
  const PreviewEditorSidebar = React.lazy(async () => {
64850
- return { default: (await import("./PreviewEditorSidebar-DkNpCPja.mjs")).PreviewEditorSidebar };
65506
+ return { default: (await import("./PreviewEditorSidebar-ywqcYjTB.mjs")).PreviewEditorSidebar };
64851
65507
  });
64852
65508
  const PreviewEditorUI = React.lazy(async () => {
64853
- return { default: (await import("./PreviewEditorUI-DeNKtqk3.mjs")).PreviewEditorUI };
65509
+ return { default: (await import("./PreviewEditorUI-DApUNF6g.mjs")).PreviewEditorUI };
64854
65510
  });
64855
65511
  const previewPaneContainmentStyle = {
64856
65512
  contain: "layout paint",
64857
65513
  isolation: "isolate",
64858
65514
  transform: "translateZ(0)"
64859
65515
  };
64860
- 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" } }) {
64861
65517
  const layout = useOptionalPreviewLayout();
64862
65518
  const headerNode = layout?.headerNode ?? null;
64863
65519
  const bannerNode = layout?.bannerNode ?? null;
@@ -65047,6 +65703,7 @@ function PreviewShellLayout({ children, theme, surfaceId, siteId, dashboardBaseU
65047
65703
  themeSelectionVersion,
65048
65704
  themeSelectionUpdatedAt,
65049
65705
  themeSelectionButtonPersonalityId,
65706
+ runtimePaletteState,
65050
65707
  themeSelectionPaletteVariantId,
65051
65708
  themeSelectionPaletteOverrides,
65052
65709
  themeSelectionHeaderLayoutId,
@@ -65106,6 +65763,7 @@ function PreviewShellLayout({ children, theme, surfaceId, siteId, dashboardBaseU
65106
65763
  selectionVersion: themeSelectionVersion,
65107
65764
  selectionUpdatedAt: themeSelectionUpdatedAt,
65108
65765
  buttonPersonalityId: themeSelectionButtonPersonalityId,
65766
+ runtimePaletteState,
65109
65767
  paletteVariantId: themeSelectionPaletteVariantId,
65110
65768
  paletteOverrides: themeSelectionPaletteOverrides,
65111
65769
  headerLayoutId: themeSelectionHeaderLayoutId,
@@ -65148,7 +65806,7 @@ function PreviewShellLayout({ children, theme, surfaceId, siteId, dashboardBaseU
65148
65806
  }
65149
65807
  //#endregion
65150
65808
  //#region ../preview-next/src/client/preview/PreviewShell.tsx
65151
- 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 }) {
65152
65810
  const apiClient = useMemo(() => createBearerAPIClient(previewToken, apiBaseUrl), [previewToken, apiBaseUrl]);
65153
65811
  const resolvedDesignEditorEligibility = designEditorEligibility ?? defaultDesignEditorEligibility({
65154
65812
  pageId,
@@ -65206,6 +65864,7 @@ function PreviewShell({ children, apiBaseUrl, blockApiConfig, siteId, siteSlug,
65206
65864
  themeSelectionVersion,
65207
65865
  themeSelectionUpdatedAt,
65208
65866
  themeSelectionButtonPersonalityId,
65867
+ runtimePaletteState,
65209
65868
  themeSelectionPaletteVariantId,
65210
65869
  themeSelectionPaletteOverrides,
65211
65870
  themeSelectionHeaderLayoutId,
@@ -66267,99 +66926,37 @@ function renderBlockCustomizeBuiltinRow(row, context) {
66267
66926
  }, "look");
66268
66927
  case "background":
66269
66928
  if (context.currentBackground.kind !== "supported" || !context.backgroundCapability) return null;
66270
- return /* @__PURE__ */ jsxs("div", {
66271
- className: "space-y-2",
66272
- children: [
66273
- /* @__PURE__ */ jsxs("div", {
66274
- className: "flex items-stretch overflow-hidden rounded-full border bg-background",
66275
- children: [
66276
- /* @__PURE__ */ jsx("button", {
66277
- type: "button",
66278
- onClick: context.handleBackgroundCycle({
66279
- kind: "cycle-mode",
66280
- direction: "prev"
66281
- }),
66282
- className: "grid h-8 w-8 place-items-center hover:bg-muted disabled:cursor-not-allowed disabled:opacity-50",
66283
- "aria-label": "Previous background mode",
66284
- disabled: !context.canCycleBackgroundMode,
66285
- children: /* @__PURE__ */ jsx(ChevronLeft, { size: 14 })
66286
- }),
66287
- /* @__PURE__ */ jsxs("div", {
66288
- className: "min-w-0 flex-1 border-x px-2 py-1 text-center",
66289
- children: [/* @__PURE__ */ jsx("div", {
66290
- className: "text-xs font-medium leading-3 text-muted-foreground",
66291
- children: "Background:"
66292
- }), /* @__PURE__ */ jsx("div", {
66293
- className: "truncate text-xs font-semibold leading-4",
66294
- children: backgroundModeLabel(context.currentBackground.override.kind)
66295
- })]
66296
- }),
66297
- /* @__PURE__ */ jsx("button", {
66298
- type: "button",
66299
- onClick: context.handleBackgroundCycle({
66300
- kind: "cycle-mode",
66301
- direction: "next"
66302
- }),
66303
- className: "grid h-8 w-8 place-items-center hover:bg-muted disabled:cursor-not-allowed disabled:opacity-50",
66304
- "aria-label": "Next background mode",
66305
- disabled: !context.canCycleBackgroundMode,
66306
- children: /* @__PURE__ */ jsx(ChevronRight, { size: 14 })
66307
- })
66308
- ]
66309
- }),
66310
- /* @__PURE__ */ jsxs("div", {
66311
- className: "flex items-stretch overflow-hidden rounded-full border bg-background",
66312
- children: [
66313
- /* @__PURE__ */ jsx("button", {
66314
- type: "button",
66315
- onClick: context.handleBackgroundCycle({
66316
- kind: "cycle-value",
66317
- direction: "prev"
66318
- }),
66319
- className: "grid h-8 w-8 place-items-center hover:bg-muted disabled:cursor-not-allowed disabled:opacity-50",
66320
- "aria-label": "Previous background value",
66321
- disabled: !context.canCycleBackgroundValue,
66322
- children: /* @__PURE__ */ jsx(ChevronLeft, { size: 14 })
66323
- }),
66324
- /* @__PURE__ */ jsxs("button", {
66325
- type: "button",
66326
- className: "flex min-w-0 flex-1 items-center justify-center gap-2 border-x px-2 py-1 text-center hover:bg-muted",
66327
- "aria-expanded": context.backgroundChooserOpen,
66328
- "aria-label": `Choose background ${backgroundOverrideLabel(context.currentBackground.override).toLowerCase()}`,
66329
- onClick: (event) => {
66330
- event.preventDefault();
66331
- event.stopPropagation();
66332
- context.onToggleBackgroundChooser();
66333
- },
66334
- children: [/* @__PURE__ */ jsx(BackgroundPreviewSwatch, {
66335
- override: context.currentBackground.override,
66336
- imagePool: context.mergedBackgroundImagePool
66337
- }), /* @__PURE__ */ jsx("span", {
66338
- className: "truncate text-xs font-medium",
66339
- children: backgroundOverrideValueLabel(context.currentBackground.override, context.mergedBackgroundImagePool)
66340
- })]
66341
- }),
66342
- /* @__PURE__ */ jsx("button", {
66343
- type: "button",
66344
- onClick: context.handleBackgroundCycle({
66345
- kind: "cycle-value",
66346
- direction: "next"
66347
- }),
66348
- className: "grid h-8 w-8 place-items-center hover:bg-muted disabled:cursor-not-allowed disabled:opacity-50",
66349
- "aria-label": "Next background value",
66350
- disabled: !context.canCycleBackgroundValue,
66351
- children: /* @__PURE__ */ jsx(ChevronRight, { size: 14 })
66352
- })
66353
- ]
66354
- }),
66355
- context.backgroundChooserOpen ? /* @__PURE__ */ jsx(BackgroundChooser, {
66356
- capability: context.backgroundCapability,
66357
- current: context.currentBackground.override,
66358
- imagePoolStatus: context.imagePoolStatus,
66359
- onChoose: context.onChooseBackgroundOverride
66360
- }) : null
66361
- ]
66362
- }, "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");
66363
66960
  case "facet": return /* @__PURE__ */ jsx(CustomizeCycleRow, {
66364
66961
  label: row.control.label,
66365
66962
  valueLabel: row.control.valueLabel,
@@ -67031,7 +67628,8 @@ function EditablePageRenderer(props) {
67031
67628
  return [
67032
67629
  snapshots.map((s) => `${s.id}:${s.version}`).join("|"),
67033
67630
  linkedEntries.map((entry) => `${entry.meta.entryId}:${entry.version}`).join("|"),
67034
- `overlay:${overlayRevision}`
67631
+ `overlay:${overlayRevision}`,
67632
+ `generated-icons:${state.generatedIconAssets?.revision ?? 0}`
67035
67633
  ].join("|");
67036
67634
  });
67037
67635
  const linkedEntryOverlays = useMemo(() => {
@@ -67153,7 +67751,24 @@ function EditablePageRenderer(props) {
67153
67751
  dataContext: linkedEntryDataContext,
67154
67752
  apiClient: blockDataApiClient
67155
67753
  });
67156
- const dataContext = useMemo(() => mergeResolvedDataContext(linkedEntryDataContext, liveResolvedData), [linkedEntryDataContext, liveResolvedData]);
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
+ ]);
67157
67772
  return /* @__PURE__ */ jsx(PageRenderer, {
67158
67773
  ...pageRendererProps,
67159
67774
  page: renderPage,
@@ -67216,14 +67831,16 @@ function usePreviewBlockResolvedData(args) {
67216
67831
  }
67217
67832
  let cancelled = false;
67218
67833
  const context = buildPreviewBlockDataContext(dataContext);
67219
- prefetchBlockData(page, context, {
67220
- apiClient: createPreviewBlockDataApiClient(apiClient, context),
67834
+ const loaderClient = createPreviewBlockDataApiClient(apiClient, context);
67835
+ Promise.all([prefetchBlockData(page, context, {
67836
+ apiClient: loaderClient,
67221
67837
  isValidEndpoint: isSupportedLoaderEndpoint,
67222
67838
  onError: () => {}
67223
- }).then((data) => {
67839
+ }), prefetchGeneratedIconAssets(page, dataContext.siteId, apiClient).catch(() => ({}))]).then(([data, generatedIconAssets]) => {
67840
+ const merged = mergeGeneratedIconAssets(data, generatedIconAssets);
67224
67841
  if (!cancelled) setResolvedData({
67225
67842
  key: cacheKey,
67226
- data
67843
+ data: merged
67227
67844
  });
67228
67845
  }).catch(() => {});
67229
67846
  return () => {
@@ -67237,6 +67854,25 @@ function usePreviewBlockResolvedData(args) {
67237
67854
  ]);
67238
67855
  return resolvedData?.data ?? null;
67239
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
+ }
67240
67876
  function buildPreviewBlockDataContext(dataContext) {
67241
67877
  return {
67242
67878
  siteId: dataContext.siteId,