@riverbankcms/sdk 0.78.2 → 0.79.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +80 -0
- package/dist/{PreviewEditorSidebar-4DXLYX2V.mjs → PreviewEditorSidebar-56NMJMIK.mjs} +724 -47
- package/dist/{PreviewEditorUI-CS5P4N3P.mjs → PreviewEditorUI-27KJVEET.mjs} +3 -3
- package/dist/SdkPreviewModeRuntime-H4BSP6E7.mjs +8 -0
- package/dist/_dts/ai/src/contracts/proposals.d.ts +36 -0
- package/dist/_dts/api/src/endpoints.d.ts +55 -0
- package/dist/_dts/api/src/index.d.ts +5 -3
- package/dist/_dts/api/src/media.d.ts +8 -1
- package/dist/_dts/api/src/navigation/dashboardSettingsNav.d.ts +1 -1
- package/dist/_dts/api/src/navigation/dashboardSiteNav.d.ts +8 -8
- package/dist/_dts/api/src/navigation/identity.d.ts +59 -0
- package/dist/_dts/api/src/navigation.d.ts +2 -0
- package/dist/_dts/api/src/publicExperienceEndpoints.d.ts +4 -0
- package/dist/_dts/api/src/sdkContracts.d.ts +1 -0
- package/dist/_dts/api/src/siteIcons.d.ts +128 -0
- package/dist/_dts/api/src/siteManagementEndpoints.d.ts +16 -0
- package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +7 -0
- package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +6 -1
- package/dist/_dts/api/src/types.d.ts +1 -1
- package/dist/_dts/api/src/webhooks.d.ts +239 -0
- package/dist/_dts/blocks/src/index.d.ts +4 -0
- package/dist/_dts/blocks/src/system/blocks/appointment-booking.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/blog-listing.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/cart.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/checkout.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/collection.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/faq.d.ts +294 -289
- package/dist/_dts/blocks/src/system/blocks/feature-card-icons.d.ts +57 -0
- package/dist/_dts/blocks/src/system/blocks/feature-cards.d.ts +4 -0
- package/dist/_dts/blocks/src/system/blocks/gifting.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/index.d.ts +1 -0
- package/dist/_dts/blocks/src/system/blocks/location-map.d.ts +1 -1
- package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +22 -22
- package/dist/_dts/blocks/src/system/blocks/product-detail.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/product-list.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/shop.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/testimonials.d.ts +7 -1
- package/dist/_dts/blocks/src/system/customize/backgrounds.d.ts +170 -0
- package/dist/_dts/blocks/src/system/fragments/library/testimonialsCarousel.d.ts +5 -0
- package/dist/_dts/blocks/src/system/helpers/resolveBackground.d.ts +3 -1
- package/dist/_dts/blocks/src/system/icons/ids.d.ts +13 -0
- package/dist/_dts/blocks/src/system/icons/index.d.ts +6 -0
- package/dist/_dts/blocks/src/system/icons/presets.d.ts +4 -0
- package/dist/_dts/blocks/src/system/icons/registry.d.ts +18 -0
- package/dist/_dts/blocks/src/system/icons/semantic.d.ts +239 -0
- package/dist/_dts/blocks/src/system/icons/value.d.ts +94 -0
- package/dist/_dts/blocks/src/system/index.d.ts +1 -0
- package/dist/_dts/blocks/src/system/manifest/fieldValidation/index.d.ts +4 -1
- package/dist/_dts/blocks/src/system/manifest/schema.d.ts +23 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/feature-card-icon.d.ts +13 -0
- package/dist/_dts/content-model/src/contentManifest.d.ts +3 -1
- package/dist/_dts/core/src/branded.d.ts +6 -0
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +191 -0
- package/dist/_dts/editor-blocks/src/block-editor/BlockCard.d.ts +12 -1
- package/dist/_dts/editor-blocks/src/block-editor/BlockCardBody.d.ts +12 -1
- package/dist/_dts/editor-blocks/src/block-editor/BlockCardHeader.d.ts +12 -2
- package/dist/_dts/editor-blocks/src/block-editor/FeatureCardIconsPanel.d.ts +21 -0
- package/dist/_dts/editor-blocks/src/block-editor/GeneratedIconSetDialog.d.ts +40 -0
- package/dist/_dts/editor-blocks/src/block-editor/SortableBlockItem.d.ts +11 -1
- package/dist/_dts/editor-blocks/src/block-editor/featureCardIconActions.d.ts +82 -0
- package/dist/_dts/editor-blocks/src/widgets/icon-picker/IconPickerField.d.ts +1 -1
- package/dist/_dts/media-core/src/fileDomain.d.ts +8 -1
- package/dist/_dts/media-editor/src/MediaEditor.d.ts +3 -2
- package/dist/_dts/media-react/src/components/MediaLibrary.d.ts +2 -1
- package/dist/_dts/media-react/src/components/MediaPickerMini.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/blocks/previewCustomizeActions.d.ts +17 -0
- package/dist/_dts/preview-next/src/client/preview/PageDesignEditorStateContext.d.ts +4 -0
- package/dist/_dts/preview-next/src/client/preview/StyleConfigurator.state.d.ts +3 -2
- package/dist/_dts/preview-next/src/client/preview/previewCustomizeHistory.d.ts +6 -0
- package/dist/_dts/sdk/src/cli/navigationIdentity.d.ts +11 -0
- package/dist/_dts/sdk/src/cli/site-commands/navigationCommands.d.ts +4 -0
- package/dist/_dts/sdk/src/cli/site-commands/oneOffCommands.d.ts +1 -0
- package/dist/_dts/sdk/src/cli/sync/diff.d.ts +9 -0
- package/dist/_dts/sdk/src/client/management/types.d.ts +2 -0
- package/dist/_dts/sdk/src/config/field-definitions.d.ts +3 -1
- package/dist/_dts/sdk/src/contracts/index.d.ts +1 -1
- package/dist/_dts/sdk/src/contracts/system-block-content.d.ts +19 -2
- package/dist/_dts/sdk/src/next/index.d.ts +1 -1
- package/dist/_dts/sdk/src/next/revalidate.d.ts +26 -5
- package/dist/_dts/sdk/src/next/static-params.d.ts +28 -3
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +5 -1
- package/dist/_dts/sdk/src/public-api/runtime.d.ts +1 -1
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/sdk/src/webhooks/index.d.ts +1 -1
- package/dist/_dts/sdk/src/webhooks/verify.d.ts +6 -102
- package/dist/_dts/site-commands/src/commands.d.ts +3 -0
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/mock-themes/all.d.ts +3 -3
- package/dist/_dts/theme-core/src/schema.d.ts +5 -5
- package/dist/_dts/theme-core/src/site-styles/curatedSiteStyles.d.ts +25 -2
- package/dist/_dts/theme-core/src/site-styles/designState.d.ts +5 -5
- package/dist/_dts/theme-core/src/site-styles/generatedSchemas.d.ts +4 -2
- package/dist/_dts/theme-core/src/site-styles/previewCompiler.d.ts +4 -4
- package/dist/_dts/theme-core/src/tokens/themeColorTokens.d.ts +2 -0
- package/dist/_dts/ui/src/combobox.d.ts +1 -0
- package/dist/{chunk-RGTOD4AJ.mjs → chunk-4HCW7FHJ.mjs} +491 -56
- package/dist/{chunk-OKMBEAXY.mjs → chunk-A3HHFKVT.mjs} +1 -1
- package/dist/{chunk-6HYXHRAI.mjs → chunk-GP555I66.mjs} +177 -7
- package/dist/{chunk-CR5HKAGU.mjs → chunk-K2IIF34C.mjs} +55 -0
- package/dist/{chunk-4QEGTLK6.mjs → chunk-LCY32PXF.mjs} +1 -1
- package/dist/{chunk-MCRQMPET.mjs → chunk-V47ZU33I.mjs} +1745 -157
- package/dist/cli/index.mjs +1169 -171
- package/dist/cli/init-docs/content/workflow-editor-workflows.md +2 -0
- package/dist/cli/init-docs/content/workflow-isr-revalidation.md +138 -0
- package/dist/client/{accordion-PLYNJIIM.mjs → accordion-QLA7KBYO.mjs} +1 -1
- package/dist/client/{bookingForm-BXAP6AO7.mjs → bookingForm-PYZIPA5G.mjs} +3 -3
- package/dist/client/bookings.mjs +110 -2
- package/dist/client/{carousel-TRBXDHGF.mjs → carousel-5EIULWBI.mjs} +2 -2
- package/dist/client/{cart-Z7H3HJRS.mjs → cart-DOP3FNI4.mjs} +5 -5
- package/dist/client/{checkout-WAFCUBIX.mjs → checkout-BVMF6FBV.mjs} +5 -5
- package/dist/client/{chunk-JRDUHZCT.mjs → chunk-44K2U3QI.mjs} +4 -4
- package/dist/client/{chunk-UVQEJJTN.mjs → chunk-CCNTDRCF.mjs} +1 -1
- package/dist/client/{chunk-ZI3LLBPZ.mjs → chunk-GG4M2NP6.mjs} +1 -1
- package/dist/client/{chunk-JGXPTEI2.mjs → chunk-R5ESWNKX.mjs} +6 -3
- package/dist/client/{chunk-CWGTG37I.mjs → chunk-TYONZMST.mjs} +1 -1
- package/dist/client/{chunk-75OUS5MT.mjs → chunk-UDS3NTWA.mjs} +1 -1
- package/dist/client/{chunk-DNRGY432.mjs → chunk-V6M5FCR5.mjs} +1 -1
- package/dist/client/{chunk-FUXW6VW2.mjs → chunk-YLDYVRZL.mjs} +4 -4
- package/dist/client/client.mjs +21329 -19729
- package/dist/client/{courseRegistration-AHFQHWIJ.mjs → courseRegistration-E6EAA6NL.mjs} +3 -3
- package/dist/client/{eventCalendar-LDXTV5R7.mjs → eventCalendar-HBG3HAK6.mjs} +5 -5
- package/dist/client/{eventCombined-A4JGTNJO.mjs → eventCombined-6K5ZZWAK.mjs} +5 -5
- package/dist/client/{eventDetails-4YXTZ7EG.mjs → eventDetails-Q75ICXLT.mjs} +5 -5
- package/dist/client/{eventListing-P72TPFFM.mjs → eventListing-27P5F7DZ.mjs} +5 -5
- package/dist/client/{eventRegistration-LSYJHGMT.mjs → eventRegistration-IQ7AMASR.mjs} +5 -5
- package/dist/client/{form-AOPYOKOW.mjs → form-JRTD65FN.mjs} +1 -1
- package/dist/client/{headerSection-5TFYDFVQ.mjs → headerSection-7FPSSZHS.mjs} +2 -2
- package/dist/client/hooks.mjs +350 -35
- package/dist/client/{locationMap-QSZ3ZVAZ.mjs → locationMap-7NGFNYBH.mjs} +1 -1
- package/dist/client/{newsletterForm-KTRHZY52.mjs → newsletterForm-F3BADCI2.mjs} +1 -1
- package/dist/client/{productDetail-N4E775RG.mjs → productDetail-V3HP7ITJ.mjs} +5 -5
- package/dist/client/{productList-UGUQ2S45.mjs → productList-L3EGJUF2.mjs} +5 -5
- package/dist/client/rendering/client.mjs +2713 -1382
- package/dist/client/rendering/islands.mjs +18 -18
- package/dist/client/rendering.mjs +2014 -414
- package/dist/client/{shop-VHSZEEQ2.mjs → shop-DQUB5E2C.mjs} +5 -5
- package/dist/preview-next/before-render.mjs +55 -0
- package/dist/preview-next/client/runtime.mjs +5 -5
- package/dist/preview-next/middleware.mjs +55 -0
- package/dist/{sdk-runtime-WHPJEF5G.mjs → sdk-runtime-AF6KXJU4.mjs} +6 -6
- package/dist/server/components.mjs +2169 -781
- package/dist/server/config-validation.mjs +350 -35
- package/dist/server/config.mjs +350 -35
- package/dist/server/data.mjs +350 -35
- package/dist/server/index.mjs +64 -1
- package/dist/server/next/revalidate.mjs +229 -34
- package/dist/server/next.mjs +2307 -818
- package/dist/server/page-converter.mjs +275 -34
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +2174 -786
- package/dist/server/rendering.mjs +2187 -799
- package/dist/server/routing.mjs +767 -50
- package/dist/server/server.mjs +351 -36
- package/dist/server/theme-bridge.mjs +164 -2
- package/dist/server/theme.mjs +2 -2
- package/dist/server/webhooks.mjs +129 -25
- package/dist/styles/index.css +55 -0
- package/package.json +2 -1
- package/dist/SdkPreviewModeRuntime-IJDHTW4W.mjs +0 -8
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { ApiRequestError } from './chunk-
|
|
2
|
+
import { ApiRequestError } from './chunk-K2IIF34C.mjs';
|
|
3
3
|
import { __commonJS, __export, __toESM } from './chunk-R7POPVJR.mjs';
|
|
4
4
|
import * as React63 from 'react';
|
|
5
5
|
import React63__default, { forwardRef, createElement, createContext, useRef, useMemo, useEffect, useState, useCallback, useImperativeHandle, useLayoutEffect, useContext, memo, createRef, Component as Component$1, useDebugValue, useId as useId$1, useSyncExternalStore, isValidElement, cloneElement, useReducer, startTransition } from 'react';
|
|
@@ -135,6 +135,7 @@ var unsafeAsCustomerPassId = (id) => id;
|
|
|
135
135
|
var unsafeAsAppointmentServiceId = (id) => id;
|
|
136
136
|
var unsafeAsAppointmentResourceId = (id) => id;
|
|
137
137
|
var parseSiteId = (value) => parseUuidBrand(value, unsafeAsSiteId);
|
|
138
|
+
var parseMediaAssetId = (value) => parseUuidBrand(value, unsafeAsMediaAssetId);
|
|
138
139
|
|
|
139
140
|
// ../core/src/date-math.ts
|
|
140
141
|
function addDaysToDate(date, dayCount) {
|
|
@@ -29757,6 +29758,15 @@ function buildRepeaterGridDropTargets(input) {
|
|
|
29757
29758
|
return targets.sort((a2, b2) => a2.cell - b2.cell);
|
|
29758
29759
|
}
|
|
29759
29760
|
|
|
29761
|
+
// ../blocks/src/system/icons/presets.ts
|
|
29762
|
+
var ICON_PICKER_PRESETS = ["cta", "feature"];
|
|
29763
|
+
function isIconPickerPreset(value) {
|
|
29764
|
+
return typeof value === "string" && ICON_PICKER_PRESETS.includes(value);
|
|
29765
|
+
}
|
|
29766
|
+
function resolveIconPickerPreset(value) {
|
|
29767
|
+
return isIconPickerPreset(value) ? value : "cta";
|
|
29768
|
+
}
|
|
29769
|
+
|
|
29760
29770
|
// ../blocks/src/system/manifest/schema.ts
|
|
29761
29771
|
var visibilityLevels = ["admin", "designer", "author"];
|
|
29762
29772
|
var MEDIA_KINDS = [
|
|
@@ -29915,7 +29925,7 @@ var uiSchema = z.object({
|
|
|
29915
29925
|
layoutGridColumnField: z.string().optional(),
|
|
29916
29926
|
layoutGridMaxRows: z.number().int().positive().optional(),
|
|
29917
29927
|
// Icon picker configuration (used when ui.widget === 'iconPicker')
|
|
29918
|
-
iconPickerPreset: z.enum(
|
|
29928
|
+
iconPickerPreset: z.enum(ICON_PICKER_PRESETS).optional(),
|
|
29919
29929
|
// Entry picker configuration
|
|
29920
29930
|
contentTypeField: z.string().optional(),
|
|
29921
29931
|
fixedContentType: z.string().optional(),
|
|
@@ -30433,6 +30443,539 @@ z.object({
|
|
|
30433
30443
|
icon: z.string().optional()
|
|
30434
30444
|
});
|
|
30435
30445
|
|
|
30446
|
+
// ../blocks/src/system/icons/ids.ts
|
|
30447
|
+
var GENERATED_ICON_SET_ID_PATTERN = /^generated-icon-set:[a-z0-9][a-z0-9:_-]{0,107}$/u;
|
|
30448
|
+
var GENERATED_ICON_ASSET_ID_PATTERN = /^generated-icon-asset:[a-z0-9][a-z0-9:_-]{0,105}$/u;
|
|
30449
|
+
var SITE_ICON_STYLE_GUIDE_VERSION_ID_PATTERN = /^site-icon-style-guide:[a-f0-9]{16}$/u;
|
|
30450
|
+
function normalizeString(value) {
|
|
30451
|
+
if (typeof value !== "string") return null;
|
|
30452
|
+
const normalized = value.trim();
|
|
30453
|
+
return normalized.length > 0 ? normalized : null;
|
|
30454
|
+
}
|
|
30455
|
+
function unsafeAsGeneratedIconSetId(value) {
|
|
30456
|
+
return value;
|
|
30457
|
+
}
|
|
30458
|
+
function unsafeAsGeneratedIconAssetId(value) {
|
|
30459
|
+
return value;
|
|
30460
|
+
}
|
|
30461
|
+
function unsafeAsSiteIconStyleGuideVersionId(value) {
|
|
30462
|
+
return value;
|
|
30463
|
+
}
|
|
30464
|
+
function parseGeneratedIconSetId(value) {
|
|
30465
|
+
const normalized = normalizeString(value);
|
|
30466
|
+
return normalized !== null && GENERATED_ICON_SET_ID_PATTERN.test(normalized) ? unsafeAsGeneratedIconSetId(normalized) : null;
|
|
30467
|
+
}
|
|
30468
|
+
function parseGeneratedIconAssetId(value) {
|
|
30469
|
+
const normalized = normalizeString(value);
|
|
30470
|
+
return normalized !== null && GENERATED_ICON_ASSET_ID_PATTERN.test(normalized) ? unsafeAsGeneratedIconAssetId(normalized) : null;
|
|
30471
|
+
}
|
|
30472
|
+
function parseSiteIconStyleGuideVersionId(value) {
|
|
30473
|
+
if (typeof value !== "string") return null;
|
|
30474
|
+
const normalized = value.trim();
|
|
30475
|
+
return SITE_ICON_STYLE_GUIDE_VERSION_ID_PATTERN.test(normalized) ? unsafeAsSiteIconStyleGuideVersionId(normalized) : null;
|
|
30476
|
+
}
|
|
30477
|
+
|
|
30478
|
+
// ../blocks/src/system/icons/semantic.ts
|
|
30479
|
+
var SEMANTIC_ICON_IDS = [
|
|
30480
|
+
"protection-trust",
|
|
30481
|
+
"confidentiality",
|
|
30482
|
+
"care-support",
|
|
30483
|
+
"partnership",
|
|
30484
|
+
"warmth",
|
|
30485
|
+
"community",
|
|
30486
|
+
"personal-guidance",
|
|
30487
|
+
"conversation",
|
|
30488
|
+
"friendly-welcome",
|
|
30489
|
+
"insight-learning",
|
|
30490
|
+
"natural-wellbeing",
|
|
30491
|
+
"growth",
|
|
30492
|
+
"gentle-care",
|
|
30493
|
+
"special-touch",
|
|
30494
|
+
"ideas",
|
|
30495
|
+
"direction",
|
|
30496
|
+
"focus",
|
|
30497
|
+
"quality",
|
|
30498
|
+
"highlight",
|
|
30499
|
+
"verified-quality",
|
|
30500
|
+
"learning",
|
|
30501
|
+
"training",
|
|
30502
|
+
"programmes-dates",
|
|
30503
|
+
"place",
|
|
30504
|
+
"products",
|
|
30505
|
+
"packages",
|
|
30506
|
+
"time",
|
|
30507
|
+
"practical-service",
|
|
30508
|
+
"at-home",
|
|
30509
|
+
"worldwide",
|
|
30510
|
+
"professional-service"
|
|
30511
|
+
];
|
|
30512
|
+
var SEMANTIC_ICON_COMPONENTS = {
|
|
30513
|
+
"protection-trust": Shield,
|
|
30514
|
+
confidentiality: Lock,
|
|
30515
|
+
"care-support": HandHeart,
|
|
30516
|
+
partnership: HeartHandshake,
|
|
30517
|
+
warmth: Heart,
|
|
30518
|
+
community: Users,
|
|
30519
|
+
"personal-guidance": UserRoundCheck,
|
|
30520
|
+
conversation: MessageCircle,
|
|
30521
|
+
"friendly-welcome": Smile,
|
|
30522
|
+
"insight-learning": Brain,
|
|
30523
|
+
"natural-wellbeing": Leaf,
|
|
30524
|
+
growth: Sprout,
|
|
30525
|
+
"gentle-care": Flower2,
|
|
30526
|
+
"special-touch": Sparkles,
|
|
30527
|
+
ideas: Lightbulb,
|
|
30528
|
+
direction: Compass,
|
|
30529
|
+
focus: Target,
|
|
30530
|
+
quality: Award,
|
|
30531
|
+
highlight: Star,
|
|
30532
|
+
"verified-quality": BadgeCheck,
|
|
30533
|
+
learning: BookOpen,
|
|
30534
|
+
training: GraduationCap,
|
|
30535
|
+
"programmes-dates": CalendarDays,
|
|
30536
|
+
place: MapPin,
|
|
30537
|
+
products: ShoppingBag,
|
|
30538
|
+
packages: Package,
|
|
30539
|
+
time: Clock,
|
|
30540
|
+
"practical-service": Wrench,
|
|
30541
|
+
"at-home": House,
|
|
30542
|
+
worldwide: Globe,
|
|
30543
|
+
"professional-service": BriefcaseBusiness
|
|
30544
|
+
};
|
|
30545
|
+
var featurePreset = ["feature"];
|
|
30546
|
+
var SEMANTIC_ICON_DEFINITIONS = [
|
|
30547
|
+
{
|
|
30548
|
+
id: "protection-trust",
|
|
30549
|
+
label: "Protection and trust",
|
|
30550
|
+
tags: ["safe", "safety", "security", "trust", "privacy", "confidence"],
|
|
30551
|
+
domains: ["wellbeing", "services", "technology"],
|
|
30552
|
+
tone: ["trustworthy", "practical"],
|
|
30553
|
+
presets: featurePreset
|
|
30554
|
+
},
|
|
30555
|
+
{
|
|
30556
|
+
id: "confidentiality",
|
|
30557
|
+
label: "Confidentiality",
|
|
30558
|
+
tags: ["confidential", "privacy", "secure", "protected", "private"],
|
|
30559
|
+
domains: ["wellbeing", "coaching", "services", "technology"],
|
|
30560
|
+
tone: ["trustworthy", "calm"],
|
|
30561
|
+
presets: featurePreset
|
|
30562
|
+
},
|
|
30563
|
+
{
|
|
30564
|
+
id: "care-support",
|
|
30565
|
+
label: "Care and support",
|
|
30566
|
+
tags: ["care", "support", "therapy", "kindness", "help", "compassion"],
|
|
30567
|
+
domains: ["wellbeing", "coaching", "community"],
|
|
30568
|
+
tone: ["warm", "human"],
|
|
30569
|
+
presets: featurePreset
|
|
30570
|
+
},
|
|
30571
|
+
{
|
|
30572
|
+
id: "partnership",
|
|
30573
|
+
label: "Partnership",
|
|
30574
|
+
tags: ["partnership", "together", "support", "relationship", "collaboration"],
|
|
30575
|
+
domains: ["coaching", "community", "services"],
|
|
30576
|
+
tone: ["warm", "human", "trustworthy"],
|
|
30577
|
+
presets: featurePreset
|
|
30578
|
+
},
|
|
30579
|
+
{
|
|
30580
|
+
id: "warmth",
|
|
30581
|
+
label: "Warmth",
|
|
30582
|
+
tags: ["heart", "warmth", "care", "love", "wellbeing", "personal"],
|
|
30583
|
+
domains: ["wellbeing", "community", "hospitality"],
|
|
30584
|
+
tone: ["warm", "human"],
|
|
30585
|
+
presets: featurePreset
|
|
30586
|
+
},
|
|
30587
|
+
{
|
|
30588
|
+
id: "community",
|
|
30589
|
+
label: "Community",
|
|
30590
|
+
tags: ["community", "group", "people", "team", "members", "belonging"],
|
|
30591
|
+
domains: ["community", "education", "events"],
|
|
30592
|
+
tone: ["human", "warm"],
|
|
30593
|
+
presets: featurePreset
|
|
30594
|
+
},
|
|
30595
|
+
{
|
|
30596
|
+
id: "personal-guidance",
|
|
30597
|
+
label: "Personal guidance",
|
|
30598
|
+
tags: ["guidance", "personal", "coach", "expert", "one to one", "trusted"],
|
|
30599
|
+
domains: ["coaching", "services", "education"],
|
|
30600
|
+
tone: ["trustworthy", "human"],
|
|
30601
|
+
presets: featurePreset
|
|
30602
|
+
},
|
|
30603
|
+
{
|
|
30604
|
+
id: "conversation",
|
|
30605
|
+
label: "Conversation",
|
|
30606
|
+
tags: ["conversation", "talk", "chat", "communication", "support"],
|
|
30607
|
+
domains: ["coaching", "community", "services"],
|
|
30608
|
+
tone: ["human", "warm"],
|
|
30609
|
+
presets: featurePreset
|
|
30610
|
+
},
|
|
30611
|
+
{
|
|
30612
|
+
id: "friendly-welcome",
|
|
30613
|
+
label: "Friendly welcome",
|
|
30614
|
+
tags: ["friendly", "welcome", "positive", "happy", "approachable"],
|
|
30615
|
+
domains: ["hospitality", "community", "services"],
|
|
30616
|
+
tone: ["warm", "playful", "human"],
|
|
30617
|
+
presets: featurePreset
|
|
30618
|
+
},
|
|
30619
|
+
{
|
|
30620
|
+
id: "insight-learning",
|
|
30621
|
+
label: "Insight and learning",
|
|
30622
|
+
tags: ["mind", "insight", "learning", "clarity", "thinking", "therapy"],
|
|
30623
|
+
domains: ["wellbeing", "coaching", "education"],
|
|
30624
|
+
tone: ["calm", "practical"],
|
|
30625
|
+
presets: featurePreset
|
|
30626
|
+
},
|
|
30627
|
+
{
|
|
30628
|
+
id: "natural-wellbeing",
|
|
30629
|
+
label: "Natural wellbeing",
|
|
30630
|
+
tags: ["natural", "wellbeing", "growth", "eco", "calm", "organic"],
|
|
30631
|
+
domains: ["wellbeing", "hospitality", "creative"],
|
|
30632
|
+
tone: ["calm", "warm"],
|
|
30633
|
+
presets: featurePreset
|
|
30634
|
+
},
|
|
30635
|
+
{
|
|
30636
|
+
id: "growth",
|
|
30637
|
+
label: "Growth",
|
|
30638
|
+
tags: ["growth", "new", "progress", "development", "nurture"],
|
|
30639
|
+
domains: ["wellbeing", "coaching", "education", "community"],
|
|
30640
|
+
tone: ["warm", "calm"],
|
|
30641
|
+
presets: featurePreset
|
|
30642
|
+
},
|
|
30643
|
+
{
|
|
30644
|
+
id: "gentle-care",
|
|
30645
|
+
label: "Gentle care",
|
|
30646
|
+
tags: ["gentle", "soft", "care", "wellbeing", "beauty", "calm"],
|
|
30647
|
+
domains: ["wellbeing", "creative", "hospitality"],
|
|
30648
|
+
tone: ["warm", "calm", "premium"],
|
|
30649
|
+
presets: featurePreset
|
|
30650
|
+
},
|
|
30651
|
+
{
|
|
30652
|
+
id: "special-touch",
|
|
30653
|
+
label: "Special touch",
|
|
30654
|
+
tags: ["special", "sparkle", "magic", "polish", "delight", "creative"],
|
|
30655
|
+
domains: ["creative", "commerce", "hospitality"],
|
|
30656
|
+
tone: ["playful", "premium"],
|
|
30657
|
+
presets: featurePreset
|
|
30658
|
+
},
|
|
30659
|
+
{
|
|
30660
|
+
id: "ideas",
|
|
30661
|
+
label: "Ideas",
|
|
30662
|
+
tags: ["idea", "innovation", "clarity", "creative", "strategy"],
|
|
30663
|
+
domains: ["coaching", "education", "creative", "technology"],
|
|
30664
|
+
tone: ["practical", "playful"],
|
|
30665
|
+
presets: featurePreset
|
|
30666
|
+
},
|
|
30667
|
+
{
|
|
30668
|
+
id: "direction",
|
|
30669
|
+
label: "Direction",
|
|
30670
|
+
tags: ["direction", "navigation", "path", "journey", "guidance"],
|
|
30671
|
+
domains: ["coaching", "education", "services"],
|
|
30672
|
+
tone: ["trustworthy", "practical"],
|
|
30673
|
+
presets: featurePreset
|
|
30674
|
+
},
|
|
30675
|
+
{
|
|
30676
|
+
id: "focus",
|
|
30677
|
+
label: "Focus",
|
|
30678
|
+
tags: ["focus", "goal", "outcome", "aim", "strategy"],
|
|
30679
|
+
domains: ["coaching", "services", "technology"],
|
|
30680
|
+
tone: ["practical"],
|
|
30681
|
+
presets: featurePreset
|
|
30682
|
+
},
|
|
30683
|
+
{
|
|
30684
|
+
id: "quality",
|
|
30685
|
+
label: "Quality",
|
|
30686
|
+
tags: ["quality", "award", "standard", "achievement", "premium"],
|
|
30687
|
+
domains: ["services", "education", "commerce"],
|
|
30688
|
+
tone: ["premium", "trustworthy"],
|
|
30689
|
+
presets: featurePreset
|
|
30690
|
+
},
|
|
30691
|
+
{
|
|
30692
|
+
id: "highlight",
|
|
30693
|
+
label: "Highlight",
|
|
30694
|
+
tags: ["highlight", "featured", "favorite", "quality", "special"],
|
|
30695
|
+
domains: ["creative", "commerce", "services"],
|
|
30696
|
+
tone: ["playful", "premium"],
|
|
30697
|
+
presets: featurePreset
|
|
30698
|
+
},
|
|
30699
|
+
{
|
|
30700
|
+
id: "verified-quality",
|
|
30701
|
+
label: "Verified quality",
|
|
30702
|
+
tags: ["verified", "quality", "approved", "trusted", "check"],
|
|
30703
|
+
domains: ["services", "commerce", "education"],
|
|
30704
|
+
tone: ["trustworthy", "practical"],
|
|
30705
|
+
presets: featurePreset
|
|
30706
|
+
},
|
|
30707
|
+
{
|
|
30708
|
+
id: "learning",
|
|
30709
|
+
label: "Learning",
|
|
30710
|
+
tags: ["learning", "book", "course", "knowledge", "education"],
|
|
30711
|
+
domains: ["education", "coaching", "community"],
|
|
30712
|
+
tone: ["calm", "practical"],
|
|
30713
|
+
presets: featurePreset
|
|
30714
|
+
},
|
|
30715
|
+
{
|
|
30716
|
+
id: "training",
|
|
30717
|
+
label: "Training",
|
|
30718
|
+
tags: ["training", "course", "qualification", "school", "education"],
|
|
30719
|
+
domains: ["education", "coaching"],
|
|
30720
|
+
tone: ["trustworthy", "practical"],
|
|
30721
|
+
presets: featurePreset
|
|
30722
|
+
},
|
|
30723
|
+
{
|
|
30724
|
+
id: "programmes-dates",
|
|
30725
|
+
label: "Programmes and dates",
|
|
30726
|
+
tags: ["calendar", "dates", "schedule", "events", "programme", "classes"],
|
|
30727
|
+
domains: ["events", "education", "community"],
|
|
30728
|
+
tone: ["practical"],
|
|
30729
|
+
presets: featurePreset
|
|
30730
|
+
},
|
|
30731
|
+
{
|
|
30732
|
+
id: "place",
|
|
30733
|
+
label: "Place",
|
|
30734
|
+
tags: ["place", "location", "local", "venue", "destination"],
|
|
30735
|
+
domains: ["events", "hospitality", "services"],
|
|
30736
|
+
tone: ["practical"],
|
|
30737
|
+
presets: featurePreset
|
|
30738
|
+
},
|
|
30739
|
+
{
|
|
30740
|
+
id: "products",
|
|
30741
|
+
label: "Products",
|
|
30742
|
+
tags: ["products", "shop", "store", "retail", "commerce"],
|
|
30743
|
+
domains: ["commerce"],
|
|
30744
|
+
tone: ["practical", "premium"],
|
|
30745
|
+
presets: featurePreset
|
|
30746
|
+
},
|
|
30747
|
+
{
|
|
30748
|
+
id: "packages",
|
|
30749
|
+
label: "Packages",
|
|
30750
|
+
tags: ["package", "bundle", "delivery", "offer", "product"],
|
|
30751
|
+
domains: ["commerce", "services"],
|
|
30752
|
+
tone: ["practical"],
|
|
30753
|
+
presets: featurePreset
|
|
30754
|
+
},
|
|
30755
|
+
{
|
|
30756
|
+
id: "time",
|
|
30757
|
+
label: "Time",
|
|
30758
|
+
tags: ["time", "duration", "schedule", "availability", "appointment"],
|
|
30759
|
+
domains: ["events", "services", "wellbeing"],
|
|
30760
|
+
tone: ["practical", "calm"],
|
|
30761
|
+
presets: featurePreset
|
|
30762
|
+
},
|
|
30763
|
+
{
|
|
30764
|
+
id: "practical-service",
|
|
30765
|
+
label: "Practical service",
|
|
30766
|
+
tags: ["service", "repair", "setup", "practical", "tools", "support"],
|
|
30767
|
+
domains: ["services", "technology"],
|
|
30768
|
+
tone: ["practical"],
|
|
30769
|
+
presets: featurePreset
|
|
30770
|
+
},
|
|
30771
|
+
{
|
|
30772
|
+
id: "at-home",
|
|
30773
|
+
label: "At home",
|
|
30774
|
+
tags: ["home", "domestic", "comfort", "local", "space"],
|
|
30775
|
+
domains: ["hospitality", "services", "community"],
|
|
30776
|
+
tone: ["warm", "calm"],
|
|
30777
|
+
presets: featurePreset
|
|
30778
|
+
},
|
|
30779
|
+
{
|
|
30780
|
+
id: "worldwide",
|
|
30781
|
+
label: "Worldwide",
|
|
30782
|
+
tags: ["global", "online", "worldwide", "remote", "international"],
|
|
30783
|
+
domains: ["technology", "education", "services"],
|
|
30784
|
+
tone: ["practical"],
|
|
30785
|
+
presets: featurePreset
|
|
30786
|
+
},
|
|
30787
|
+
{
|
|
30788
|
+
id: "professional-service",
|
|
30789
|
+
label: "Professional service",
|
|
30790
|
+
tags: ["business", "professional", "consulting", "service", "work"],
|
|
30791
|
+
domains: ["services", "technology", "coaching"],
|
|
30792
|
+
tone: ["practical", "trustworthy"],
|
|
30793
|
+
presets: featurePreset
|
|
30794
|
+
}
|
|
30795
|
+
];
|
|
30796
|
+
SEMANTIC_ICON_DEFINITIONS.map(({ id, label }) => ({
|
|
30797
|
+
id,
|
|
30798
|
+
label
|
|
30799
|
+
}));
|
|
30800
|
+
function isSemanticIconId(value) {
|
|
30801
|
+
return typeof value === "string" && SEMANTIC_ICON_IDS.includes(value);
|
|
30802
|
+
}
|
|
30803
|
+
function getSemanticIconComponent(name) {
|
|
30804
|
+
if (!isSemanticIconId(name)) return null;
|
|
30805
|
+
return SEMANTIC_ICON_COMPONENTS[name] ?? null;
|
|
30806
|
+
}
|
|
30807
|
+
|
|
30808
|
+
// ../blocks/src/system/icons/value.ts
|
|
30809
|
+
var NO_BLOCK_ICON_VALUE = { kind: "none" };
|
|
30810
|
+
function isRecord2(value) {
|
|
30811
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
30812
|
+
}
|
|
30813
|
+
function parseBlockIconValue(value) {
|
|
30814
|
+
if (isSemanticIconId(value)) {
|
|
30815
|
+
return { kind: "semantic", iconId: value };
|
|
30816
|
+
}
|
|
30817
|
+
if (!isRecord2(value)) {
|
|
30818
|
+
return NO_BLOCK_ICON_VALUE;
|
|
30819
|
+
}
|
|
30820
|
+
switch (value.kind) {
|
|
30821
|
+
case "none":
|
|
30822
|
+
return NO_BLOCK_ICON_VALUE;
|
|
30823
|
+
case "semantic":
|
|
30824
|
+
return isSemanticIconId(value.iconId) ? { kind: "semantic", iconId: value.iconId } : NO_BLOCK_ICON_VALUE;
|
|
30825
|
+
case "generated": {
|
|
30826
|
+
const setId = parseGeneratedIconSetId(value.setId);
|
|
30827
|
+
const assetId = parseGeneratedIconAssetId(value.assetId);
|
|
30828
|
+
const styleGuideVersionId = parseSiteIconStyleGuideVersionId(value.styleGuideVersionId);
|
|
30829
|
+
if (setId !== null && assetId !== null && isSemanticIconId(value.semanticFallbackIconId) && styleGuideVersionId !== null) {
|
|
30830
|
+
return {
|
|
30831
|
+
kind: "generated",
|
|
30832
|
+
setId,
|
|
30833
|
+
assetId,
|
|
30834
|
+
semanticFallbackIconId: value.semanticFallbackIconId,
|
|
30835
|
+
styleGuideVersionId
|
|
30836
|
+
};
|
|
30837
|
+
}
|
|
30838
|
+
return NO_BLOCK_ICON_VALUE;
|
|
30839
|
+
}
|
|
30840
|
+
default:
|
|
30841
|
+
return NO_BLOCK_ICON_VALUE;
|
|
30842
|
+
}
|
|
30843
|
+
}
|
|
30844
|
+
function getBlockIconSemanticFallbackId(value) {
|
|
30845
|
+
const parsed = parseBlockIconValue(value);
|
|
30846
|
+
switch (parsed.kind) {
|
|
30847
|
+
case "none":
|
|
30848
|
+
return null;
|
|
30849
|
+
case "semantic":
|
|
30850
|
+
return parsed.iconId;
|
|
30851
|
+
case "generated":
|
|
30852
|
+
return parsed.semanticFallbackIconId;
|
|
30853
|
+
}
|
|
30854
|
+
}
|
|
30855
|
+
function hasRenderableBlockIcon(value) {
|
|
30856
|
+
return getBlockIconSemanticFallbackId(value) !== null;
|
|
30857
|
+
}
|
|
30858
|
+
function unsafeAsGeneratedBlockIconAssetSrc(value) {
|
|
30859
|
+
return value;
|
|
30860
|
+
}
|
|
30861
|
+
function parseGeneratedBlockIconAssetSrc(value) {
|
|
30862
|
+
if (typeof value !== "string") return null;
|
|
30863
|
+
const normalized = value.trim();
|
|
30864
|
+
return normalized.length > 0 ? unsafeAsGeneratedBlockIconAssetSrc(normalized) : null;
|
|
30865
|
+
}
|
|
30866
|
+
function generatedBlockIconRenderAssetKey(setId, assetId) {
|
|
30867
|
+
return `${setId}\0${assetId}`;
|
|
30868
|
+
}
|
|
30869
|
+
function buildGeneratedBlockIconRenderAssetLookup(assets) {
|
|
30870
|
+
const lookup = /* @__PURE__ */ new Map();
|
|
30871
|
+
for (const asset of assets) {
|
|
30872
|
+
const key = generatedBlockIconRenderAssetKey(asset.setId, asset.assetId);
|
|
30873
|
+
if (lookup.has(key)) {
|
|
30874
|
+
return {
|
|
30875
|
+
kind: "duplicate_asset",
|
|
30876
|
+
setId: asset.setId,
|
|
30877
|
+
assetId: asset.assetId
|
|
30878
|
+
};
|
|
30879
|
+
}
|
|
30880
|
+
const src = parseGeneratedBlockIconAssetSrc(asset.src);
|
|
30881
|
+
if (!src) {
|
|
30882
|
+
return {
|
|
30883
|
+
kind: "invalid_src",
|
|
30884
|
+
setId: asset.setId,
|
|
30885
|
+
assetId: asset.assetId,
|
|
30886
|
+
src: asset.src
|
|
30887
|
+
};
|
|
30888
|
+
}
|
|
30889
|
+
lookup.set(key, {
|
|
30890
|
+
...asset,
|
|
30891
|
+
src
|
|
30892
|
+
});
|
|
30893
|
+
}
|
|
30894
|
+
return { kind: "ok", lookup };
|
|
30895
|
+
}
|
|
30896
|
+
function parseOptionalGeneratedAssetDimension(value) {
|
|
30897
|
+
return typeof value === "number" && Number.isFinite(value) && value > 0 ? value : void 0;
|
|
30898
|
+
}
|
|
30899
|
+
function buildGeneratedBlockIconRenderAssetLookupFromUnknown(value) {
|
|
30900
|
+
if (typeof value === "undefined" || value === null) {
|
|
30901
|
+
return { kind: "ok", lookup: /* @__PURE__ */ new Map() };
|
|
30902
|
+
}
|
|
30903
|
+
if (!Array.isArray(value)) {
|
|
30904
|
+
return { kind: "invalid_asset_list" };
|
|
30905
|
+
}
|
|
30906
|
+
const inputs = [];
|
|
30907
|
+
for (const [index2, item] of value.entries()) {
|
|
30908
|
+
if (!isRecord2(item)) {
|
|
30909
|
+
return { kind: "invalid_asset_entry", index: index2, reason: "not_object" };
|
|
30910
|
+
}
|
|
30911
|
+
const setId = parseGeneratedIconSetId(item.setId);
|
|
30912
|
+
if (!setId) {
|
|
30913
|
+
return { kind: "invalid_asset_entry", index: index2, reason: "invalid_set_id" };
|
|
30914
|
+
}
|
|
30915
|
+
const assetId = parseGeneratedIconAssetId(item.assetId);
|
|
30916
|
+
if (!assetId) {
|
|
30917
|
+
return { kind: "invalid_asset_entry", index: index2, reason: "invalid_asset_id" };
|
|
30918
|
+
}
|
|
30919
|
+
if (typeof item.src !== "string") {
|
|
30920
|
+
return { kind: "invalid_asset_entry", index: index2, reason: "invalid_src" };
|
|
30921
|
+
}
|
|
30922
|
+
inputs.push({
|
|
30923
|
+
setId,
|
|
30924
|
+
assetId,
|
|
30925
|
+
src: item.src,
|
|
30926
|
+
width: parseOptionalGeneratedAssetDimension(item.width),
|
|
30927
|
+
height: parseOptionalGeneratedAssetDimension(item.height)
|
|
30928
|
+
});
|
|
30929
|
+
}
|
|
30930
|
+
return buildGeneratedBlockIconRenderAssetLookup(inputs);
|
|
30931
|
+
}
|
|
30932
|
+
function findGeneratedRenderAsset(value, assets) {
|
|
30933
|
+
return assets.get(generatedBlockIconRenderAssetKey(value.setId, value.assetId)) ?? null;
|
|
30934
|
+
}
|
|
30935
|
+
function resolveBlockIconRenderValue(value, generatedAssets = /* @__PURE__ */ new Map()) {
|
|
30936
|
+
const parsed = parseBlockIconValue(value);
|
|
30937
|
+
switch (parsed.kind) {
|
|
30938
|
+
case "none":
|
|
30939
|
+
return NO_BLOCK_ICON_VALUE;
|
|
30940
|
+
case "semantic":
|
|
30941
|
+
return { kind: "semantic", iconId: parsed.iconId };
|
|
30942
|
+
case "generated": {
|
|
30943
|
+
const asset = findGeneratedRenderAsset(parsed, generatedAssets);
|
|
30944
|
+
return asset ? {
|
|
30945
|
+
kind: "generated_asset",
|
|
30946
|
+
asset,
|
|
30947
|
+
semanticFallbackIconId: parsed.semanticFallbackIconId,
|
|
30948
|
+
styleGuideVersionId: parsed.styleGuideVersionId
|
|
30949
|
+
} : {
|
|
30950
|
+
kind: "generated_fallback",
|
|
30951
|
+
setId: parsed.setId,
|
|
30952
|
+
assetId: parsed.assetId,
|
|
30953
|
+
semanticFallbackIconId: parsed.semanticFallbackIconId,
|
|
30954
|
+
styleGuideVersionId: parsed.styleGuideVersionId,
|
|
30955
|
+
reason: "asset_unavailable"
|
|
30956
|
+
};
|
|
30957
|
+
}
|
|
30958
|
+
}
|
|
30959
|
+
}
|
|
30960
|
+
function getGeneratedBlockIconStyleState(value, currentStyleGuideVersionId) {
|
|
30961
|
+
if (isRecord2(value) && value.kind === "generated" && parseBlockIconValue(value).kind !== "generated") {
|
|
30962
|
+
return { kind: "invalid_generated" };
|
|
30963
|
+
}
|
|
30964
|
+
const parsed = parseBlockIconValue(value);
|
|
30965
|
+
if (parsed.kind !== "generated") return { kind: "not_generated" };
|
|
30966
|
+
if (parsed.styleGuideVersionId === currentStyleGuideVersionId) {
|
|
30967
|
+
return {
|
|
30968
|
+
kind: "current",
|
|
30969
|
+
styleGuideVersionId: parsed.styleGuideVersionId
|
|
30970
|
+
};
|
|
30971
|
+
}
|
|
30972
|
+
return {
|
|
30973
|
+
kind: "stale",
|
|
30974
|
+
previousStyleGuideVersionId: parsed.styleGuideVersionId,
|
|
30975
|
+
currentStyleGuideVersionId
|
|
30976
|
+
};
|
|
30977
|
+
}
|
|
30978
|
+
|
|
30436
30979
|
// ../blocks/src/system/manifest/fieldValidation/index.ts
|
|
30437
30980
|
var TEL_RE = /^[+()0-9\s-]{3,}$/;
|
|
30438
30981
|
var SLUG_PATTERN = /^(?:[a-z0-9]+(?:-[a-z0-9]+)*)(?:\/(?:[a-z0-9]+(?:-[a-z0-9]+)*))*$/;
|
|
@@ -30522,7 +31065,7 @@ function deriveFieldValidationPlan(field, path = [field.id]) {
|
|
|
30522
31065
|
return makePlan("number", "number", field, path, required, constraints2);
|
|
30523
31066
|
}
|
|
30524
31067
|
const constraints = commonConstraints(required, {
|
|
30525
|
-
kind: "textType"
|
|
31068
|
+
kind: field.ui?.widget === "iconPicker" ? "blockIconValue" : "textType"
|
|
30526
31069
|
});
|
|
30527
31070
|
if (inputType === "email") constraints.push({ kind: "emailFormat" });
|
|
30528
31071
|
if (inputType === "tel") constraints.push({ kind: "phoneFormat" });
|
|
@@ -30855,39 +31398,52 @@ function isMissingForPlan(plan, value) {
|
|
|
30855
31398
|
return false;
|
|
30856
31399
|
}
|
|
30857
31400
|
function validateStringPlan(plan, value) {
|
|
31401
|
+
if (plan.constraints.some((constraint) => constraint.kind === "blockIconValue")) {
|
|
31402
|
+
return plan.constraints.flatMap((constraint) => validateStringConstraint(plan, constraint, value));
|
|
31403
|
+
}
|
|
30858
31404
|
if (typeof value !== "string") return [issue(plan, "wrongType", { expected: "text" })];
|
|
30859
31405
|
return plan.constraints.flatMap((constraint) => validateStringConstraint(plan, constraint, value));
|
|
30860
31406
|
}
|
|
30861
31407
|
function validateStringConstraint(plan, constraint, value) {
|
|
30862
31408
|
switch (constraint.kind) {
|
|
30863
31409
|
case "required":
|
|
31410
|
+
return [];
|
|
30864
31411
|
case "textType":
|
|
30865
31412
|
case "referenceText":
|
|
30866
|
-
return [];
|
|
31413
|
+
return typeof value === "string" ? [] : [issue(plan, "wrongType", { expected: "text" })];
|
|
31414
|
+
case "blockIconValue":
|
|
31415
|
+
return isValidIconPickerValue(value) ? [] : [issue(plan, "wrongType", { expected: "text or icon" })];
|
|
30867
31416
|
case "maxLength":
|
|
30868
|
-
return value.length > constraint.maximum ? [issue(plan, "tooLong", { maximum: constraint.maximum })] : [];
|
|
31417
|
+
return typeof value === "string" && value.length > constraint.maximum ? [issue(plan, "tooLong", { maximum: constraint.maximum })] : [];
|
|
30869
31418
|
case "emailFormat":
|
|
30870
|
-
return isCanonicalEmailValue(value) ? [] : [issue(plan, "invalidEmail")];
|
|
31419
|
+
return typeof value === "string" && isCanonicalEmailValue(value) ? [] : [issue(plan, "invalidEmail")];
|
|
30871
31420
|
case "phoneFormat":
|
|
30872
|
-
return isCanonicalPhoneValue(value) ? [] : [issue(plan, "invalidPhone")];
|
|
31421
|
+
return typeof value === "string" && isCanonicalPhoneValue(value) ? [] : [issue(plan, "invalidPhone")];
|
|
30873
31422
|
case "patternFormat": {
|
|
31423
|
+
if (typeof value !== "string") return [issue(plan, "wrongType", { expected: "text" })];
|
|
30874
31424
|
const re2 = compilePattern(constraint.pattern);
|
|
30875
31425
|
return re2 && !re2.test(value) ? [issue(plan, "invalidPattern")] : [];
|
|
30876
31426
|
}
|
|
30877
31427
|
case "urlFormat":
|
|
30878
|
-
return isCanonicalUrlValue(value, { allowRelative: constraint.allowRelative }) ? [] : [issue(plan, "invalidUrl")];
|
|
31428
|
+
return typeof value === "string" && isCanonicalUrlValue(value, { allowRelative: constraint.allowRelative }) ? [] : [issue(plan, "invalidUrl")];
|
|
30879
31429
|
case "dateFormat":
|
|
30880
|
-
return isValidDateString(value) ? [] : [issue(plan, "invalidDate")];
|
|
31430
|
+
return typeof value === "string" && isValidDateString(value) ? [] : [issue(plan, "invalidDate")];
|
|
30881
31431
|
case "timeFormat":
|
|
30882
|
-
return isValidTimeString(value) ? [] : [issue(plan, "invalidTime")];
|
|
31432
|
+
return typeof value === "string" && isValidTimeString(value) ? [] : [issue(plan, "invalidTime")];
|
|
30883
31433
|
case "datetimeFormat":
|
|
30884
|
-
return isValidDateTimeInstantString(value) ? [] : [issue(plan, "invalidDateTime")];
|
|
31434
|
+
return typeof value === "string" && isValidDateTimeInstantString(value) ? [] : [issue(plan, "invalidDateTime")];
|
|
30885
31435
|
case "slugFormat":
|
|
30886
|
-
return SLUG_PATTERN.test(value) ? [] : [issue(plan, "invalidSlug")];
|
|
31436
|
+
return typeof value === "string" && SLUG_PATTERN.test(value) ? [] : [issue(plan, "invalidSlug")];
|
|
30887
31437
|
default:
|
|
30888
31438
|
return assertNever4(constraint);
|
|
30889
31439
|
}
|
|
30890
31440
|
}
|
|
31441
|
+
function isValidIconPickerValue(value) {
|
|
31442
|
+
if (typeof value === "string") return true;
|
|
31443
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) return false;
|
|
31444
|
+
if (value.kind === "none") return true;
|
|
31445
|
+
return parseBlockIconValue(value).kind !== "none";
|
|
31446
|
+
}
|
|
30891
31447
|
function validateNumberPlan(plan, value) {
|
|
30892
31448
|
if (!isValidNumber(value)) return [issue(plan, "invalidNumber")];
|
|
30893
31449
|
return plan.constraints.flatMap((constraint) => validateNumberConstraint(plan, constraint, Number(value)));
|
|
@@ -32805,7 +33361,7 @@ var themeColorBaseTokenNames = [
|
|
|
32805
33361
|
"accentForeground"
|
|
32806
33362
|
];
|
|
32807
33363
|
var themeColorBaseTokenSet = new Set(themeColorBaseTokenNames);
|
|
32808
|
-
var
|
|
33364
|
+
var themeColorShadeSteps = [
|
|
32809
33365
|
"50",
|
|
32810
33366
|
"100",
|
|
32811
33367
|
"200",
|
|
@@ -32818,7 +33374,7 @@ var SHADE_STEPS = [
|
|
|
32818
33374
|
"900",
|
|
32819
33375
|
"950"
|
|
32820
33376
|
];
|
|
32821
|
-
var shadeStepSet = new Set(
|
|
33377
|
+
var shadeStepSet = new Set(themeColorShadeSteps);
|
|
32822
33378
|
function isKnownBaseToken(value) {
|
|
32823
33379
|
return themeColorBaseTokenSet.has(value);
|
|
32824
33380
|
}
|
|
@@ -39485,6 +40041,7 @@ var curatedSiteStyleIdValues = [
|
|
|
39485
40041
|
"site-style:personal-retreat-journal",
|
|
39486
40042
|
"site-style:tactile-workshop",
|
|
39487
40043
|
"site-style:modern-wellness",
|
|
40044
|
+
"site-style:clarity-zen-blue",
|
|
39488
40045
|
SOFT_EARTH_SITE_STYLE_ID_VALUE,
|
|
39489
40046
|
"site-style:bold-launch",
|
|
39490
40047
|
"site-style:south-west-twerk-school"
|
|
@@ -40070,6 +40627,114 @@ var curatedSiteStyles = [
|
|
|
40070
40627
|
paletteChoice("warm-neutral-clay")
|
|
40071
40628
|
]
|
|
40072
40629
|
}),
|
|
40630
|
+
defineCuratedSiteStyle({
|
|
40631
|
+
id: "site-style:clarity-zen-blue",
|
|
40632
|
+
name: "Clarity Zen",
|
|
40633
|
+
description: "Calm, editorial, and reassuring for therapy, counselling, and wellbeing support practices.",
|
|
40634
|
+
generationBrief: "Use a calm, soft palette, editorial serif headings, warm grounded copy, rounded cards, calm proof sections, and clear booking routes. Keep the tone compassionate and straightforward, with professional trust rather than hard-sell wellness language.",
|
|
40635
|
+
siteCreatorSelection: {
|
|
40636
|
+
kind: "site_creator_keyword_heuristic",
|
|
40637
|
+
priority: 25
|
|
40638
|
+
},
|
|
40639
|
+
selectionKeywordRules: [
|
|
40640
|
+
{ kind: "substring", value: "psychotherap" },
|
|
40641
|
+
{ kind: "phrase", value: "mental health" },
|
|
40642
|
+
{ kind: "phrase", value: "talk therapy" },
|
|
40643
|
+
{ kind: "phrase", value: "therapy and wellbeing" }
|
|
40644
|
+
],
|
|
40645
|
+
tokenRecipes: {
|
|
40646
|
+
palette: "brand-led",
|
|
40647
|
+
contrast: "standard",
|
|
40648
|
+
radius: "rounded",
|
|
40649
|
+
shadow: "subtle",
|
|
40650
|
+
typography: "serif-editorial",
|
|
40651
|
+
spacing: "airy",
|
|
40652
|
+
motion: "subtle"
|
|
40653
|
+
},
|
|
40654
|
+
compositionBudget: balancedBudget,
|
|
40655
|
+
themeOverrides: {
|
|
40656
|
+
typography: {
|
|
40657
|
+
body: {
|
|
40658
|
+
family: "Inter, system-ui, sans-serif",
|
|
40659
|
+
size: "md",
|
|
40660
|
+
weight: "regular",
|
|
40661
|
+
lineHeight: "relaxed",
|
|
40662
|
+
letterSpacing: "normal"
|
|
40663
|
+
},
|
|
40664
|
+
headings: {
|
|
40665
|
+
default: {
|
|
40666
|
+
family: '"Cormorant Garamond", Georgia, serif',
|
|
40667
|
+
weight: "regular",
|
|
40668
|
+
lineHeight: "normal",
|
|
40669
|
+
letterSpacing: "normal",
|
|
40670
|
+
colorToken: "text",
|
|
40671
|
+
italic: null,
|
|
40672
|
+
case: null
|
|
40673
|
+
},
|
|
40674
|
+
h1: {
|
|
40675
|
+
size: "xl",
|
|
40676
|
+
weight: "regular",
|
|
40677
|
+
lineHeight: "normal",
|
|
40678
|
+
letterSpacing: "normal",
|
|
40679
|
+
italic: null
|
|
40680
|
+
},
|
|
40681
|
+
h2: {
|
|
40682
|
+
size: "lg",
|
|
40683
|
+
weight: "regular",
|
|
40684
|
+
lineHeight: "normal",
|
|
40685
|
+
letterSpacing: "normal",
|
|
40686
|
+
italic: null
|
|
40687
|
+
},
|
|
40688
|
+
h3: {
|
|
40689
|
+
size: "md",
|
|
40690
|
+
weight: "regular",
|
|
40691
|
+
lineHeight: "normal",
|
|
40692
|
+
letterSpacing: "normal",
|
|
40693
|
+
italic: null
|
|
40694
|
+
}
|
|
40695
|
+
},
|
|
40696
|
+
scale: "majorThird"
|
|
40697
|
+
},
|
|
40698
|
+
bodyText: {
|
|
40699
|
+
intro: {
|
|
40700
|
+
paragraphSize: "default",
|
|
40701
|
+
headingSize: "editorial"
|
|
40702
|
+
}
|
|
40703
|
+
}
|
|
40704
|
+
},
|
|
40705
|
+
defaultBlockVariants: {
|
|
40706
|
+
"block.faq": "split-heading-columns"
|
|
40707
|
+
},
|
|
40708
|
+
recommendedAppearancePresetIds: [
|
|
40709
|
+
"hero-split-editorial",
|
|
40710
|
+
"intro-organic-statement",
|
|
40711
|
+
"feature-cards-raised-rule",
|
|
40712
|
+
"media-text-quiet-story",
|
|
40713
|
+
"testimonials-brand-background-quotes",
|
|
40714
|
+
"faq-contained-help",
|
|
40715
|
+
"contact-form-panel"
|
|
40716
|
+
],
|
|
40717
|
+
recommendedHeaderLookIds: [
|
|
40718
|
+
"centered-calm",
|
|
40719
|
+
"serif-line",
|
|
40720
|
+
"minimal-transparent"
|
|
40721
|
+
],
|
|
40722
|
+
recommendedFooterLookIds: [
|
|
40723
|
+
"footer-muted-grounding",
|
|
40724
|
+
"site-footer-brand-two-band"
|
|
40725
|
+
],
|
|
40726
|
+
buttonPersonalityChoices: [
|
|
40727
|
+
buttonChoice("soft-pill"),
|
|
40728
|
+
buttonChoice("pebble"),
|
|
40729
|
+
buttonChoice("editorial-link")
|
|
40730
|
+
],
|
|
40731
|
+
paletteVariantChoices: [
|
|
40732
|
+
paletteChoice("brand-led-cool"),
|
|
40733
|
+
paletteChoice("soft-natural-watercolor"),
|
|
40734
|
+
paletteChoice("soft-natural-stone"),
|
|
40735
|
+
paletteChoice("warm-neutral-cream")
|
|
40736
|
+
]
|
|
40737
|
+
}),
|
|
40073
40738
|
defineCuratedSiteStyle({
|
|
40074
40739
|
id: "site-style:personal-retreat-journal",
|
|
40075
40740
|
name: "Personal Retreat Journal",
|
|
@@ -41321,12 +41986,12 @@ var tileTreatmentSchema = z.enum(tileTreatmentValues);
|
|
|
41321
41986
|
var eventListTreatmentSchema = z.enum(eventListTreatmentValues);
|
|
41322
41987
|
var eyebrowTreatmentSchema = z.enum(eyebrowTreatmentValues);
|
|
41323
41988
|
function uniqueNonEmpty(values) {
|
|
41324
|
-
const
|
|
41325
|
-
const firstValue =
|
|
41989
|
+
const uniqueValues2 = [...new Set(values)];
|
|
41990
|
+
const firstValue = uniqueValues2[0];
|
|
41326
41991
|
if (!firstValue) {
|
|
41327
41992
|
throw new Error("Expected at least one Theme V2 design state option.");
|
|
41328
41993
|
}
|
|
41329
|
-
return [firstValue, ...
|
|
41994
|
+
return [firstValue, ...uniqueValues2.slice(1)];
|
|
41330
41995
|
}
|
|
41331
41996
|
var userPanelTreatments = uniqueNonEmpty(
|
|
41332
41997
|
userDesignOptionCatalog.contentFrames.filter((frame) => frame.kind === "panel").map((frame) => frame.treatment)
|
|
@@ -42223,16 +42888,13 @@ function compileSiteThemeFromSelections(input) {
|
|
|
42223
42888
|
const personalityRequest = toCuratedRequest(
|
|
42224
42889
|
parsePersistedButtonPersonalityId(buttonPersonalityId)
|
|
42225
42890
|
);
|
|
42226
|
-
const paletteRequest = toCuratedRequest(
|
|
42227
|
-
parsePersistedPaletteVariantId(paletteVariantId)
|
|
42228
|
-
);
|
|
42229
42891
|
const personalityResult = resolveCuratedChoice(
|
|
42230
42892
|
personalityRequest,
|
|
42231
42893
|
siteStyle.buttonPersonalityChoices
|
|
42232
42894
|
);
|
|
42233
|
-
const paletteResult =
|
|
42234
|
-
|
|
42235
|
-
siteStyle
|
|
42895
|
+
const paletteResult = resolvePaletteVariantRequest(
|
|
42896
|
+
parsePersistedPaletteVariantId(paletteVariantId),
|
|
42897
|
+
siteStyle
|
|
42236
42898
|
);
|
|
42237
42899
|
const warnings = [];
|
|
42238
42900
|
if (personalityResult.kind === "defaulted-rejected") {
|
|
@@ -42242,12 +42904,8 @@ function compileSiteThemeFromSelections(input) {
|
|
|
42242
42904
|
fellBackTo: personalityResult.resolved
|
|
42243
42905
|
});
|
|
42244
42906
|
}
|
|
42245
|
-
if (paletteResult.
|
|
42246
|
-
warnings.push(
|
|
42247
|
-
kind: "rejected-palette",
|
|
42248
|
-
requested: paletteResult.requested,
|
|
42249
|
-
fellBackTo: paletteResult.resolved
|
|
42250
|
-
});
|
|
42907
|
+
if (paletteResult.warning) {
|
|
42908
|
+
warnings.push(paletteResult.warning);
|
|
42251
42909
|
}
|
|
42252
42910
|
const typographyResult = resolveTypographySelection({
|
|
42253
42911
|
siteStyle,
|
|
@@ -42259,7 +42917,7 @@ function compileSiteThemeFromSelections(input) {
|
|
|
42259
42917
|
warnings.push(...typographyResult.warnings);
|
|
42260
42918
|
const theme = compileTokenRecipes(siteStyle.template.tokenRecipes, {
|
|
42261
42919
|
buttonPersonalityId: personalityResult.resolved,
|
|
42262
|
-
paletteVariantId: paletteResult.
|
|
42920
|
+
paletteVariantId: paletteResult.paletteVariantId,
|
|
42263
42921
|
paletteOverrides: paletteOverrides ?? void 0
|
|
42264
42922
|
});
|
|
42265
42923
|
const themeWithTypography = applyTypographySelectionToTheme(
|
|
@@ -42290,7 +42948,7 @@ function compileSiteThemeFromSelections(input) {
|
|
|
42290
42948
|
},
|
|
42291
42949
|
resolvedSelections: {
|
|
42292
42950
|
buttonPersonalityId: personalityResult.resolved,
|
|
42293
|
-
paletteVariantId: paletteResult.
|
|
42951
|
+
paletteVariantId: paletteResult.paletteVariantId,
|
|
42294
42952
|
typographySelection: typographyResult.compiled.resolvedSelection,
|
|
42295
42953
|
typographyPresetId: typographyResult.compiled.resolvedSelection.kind === "preset" ? typographyResult.compiled.resolvedSelection.presetId : null,
|
|
42296
42954
|
typographyBodyFontOverride: typographyResult.compiled.resolvedSelection.kind === "preset" ? typographyResult.compiled.resolvedSelection.bodyFontOverride : null,
|
|
@@ -42332,6 +42990,27 @@ function resolveTypographySelection(input) {
|
|
|
42332
42990
|
warnings: resolved.warning ? [resolved.warning] : []
|
|
42333
42991
|
};
|
|
42334
42992
|
}
|
|
42993
|
+
function resolvePaletteVariantRequest(parsed, siteStyle) {
|
|
42994
|
+
const defaultPaletteVariantId = defaultCuratedChoice(siteStyle.paletteVariantChoices);
|
|
42995
|
+
switch (parsed.kind) {
|
|
42996
|
+
case "empty":
|
|
42997
|
+
return {
|
|
42998
|
+
paletteVariantId: defaultPaletteVariantId,
|
|
42999
|
+
warning: null
|
|
43000
|
+
};
|
|
43001
|
+
case "unknown":
|
|
43002
|
+
return {
|
|
43003
|
+
paletteVariantId: defaultPaletteVariantId,
|
|
43004
|
+
warning: {
|
|
43005
|
+
kind: "rejected-palette",
|
|
43006
|
+
requested: parsed.raw,
|
|
43007
|
+
fellBackTo: defaultPaletteVariantId
|
|
43008
|
+
}
|
|
43009
|
+
};
|
|
43010
|
+
case "known":
|
|
43011
|
+
return { paletteVariantId: parsed.id, warning: null };
|
|
43012
|
+
}
|
|
43013
|
+
}
|
|
42335
43014
|
function resolveTypographyPresetRequest(parsed, siteStyle) {
|
|
42336
43015
|
switch (parsed.kind) {
|
|
42337
43016
|
case "empty":
|
|
@@ -42513,12 +43192,12 @@ function runtimeCapabilitiesForBlocks(blocks) {
|
|
|
42513
43192
|
);
|
|
42514
43193
|
}
|
|
42515
43194
|
function uniqueNonEmpty2(values) {
|
|
42516
|
-
const
|
|
42517
|
-
const firstValue =
|
|
43195
|
+
const uniqueValues2 = [...new Set(values)];
|
|
43196
|
+
const firstValue = uniqueValues2[0];
|
|
42518
43197
|
if (!firstValue) {
|
|
42519
43198
|
throw new Error("Expected at least one generated schema option.");
|
|
42520
43199
|
}
|
|
42521
|
-
return [firstValue, ...
|
|
43200
|
+
return [firstValue, ...uniqueValues2.slice(1)];
|
|
42522
43201
|
}
|
|
42523
43202
|
var generatedPanelTreatments = uniqueNonEmpty2(
|
|
42524
43203
|
generatedDesignOptionCatalog.contentFrames.filter((frame) => frame.kind === "panel").map((frame) => frame.treatment)
|
|
@@ -45893,36 +46572,46 @@ function buildCarouselLayout() {
|
|
|
45893
46572
|
[buildTestimonialCard(repeat("data.entries", "testimonial"))]
|
|
45894
46573
|
);
|
|
45895
46574
|
}
|
|
46575
|
+
function buildResponsiveGridCards() {
|
|
46576
|
+
return [
|
|
46577
|
+
// 2 columns
|
|
46578
|
+
grid(
|
|
46579
|
+
{ gap: "lg", cols: { base: 1, sm: 2 } },
|
|
46580
|
+
[buildTestimonialCard(repeat("data.entries", "testimonial"))],
|
|
46581
|
+
when("gridColumns", { equals: "2" })
|
|
46582
|
+
),
|
|
46583
|
+
// 3 columns (default when unset)
|
|
46584
|
+
grid(
|
|
46585
|
+
{ gap: "lg", cols: { base: 1, sm: 2, lg: 3 } },
|
|
46586
|
+
[buildTestimonialCard(repeat("data.entries", "testimonial"))],
|
|
46587
|
+
when("gridColumns", { equals: "3" })
|
|
46588
|
+
),
|
|
46589
|
+
// 4 columns
|
|
46590
|
+
grid(
|
|
46591
|
+
{ gap: "lg", cols: { base: 1, sm: 2, lg: 3, xl: 4 } },
|
|
46592
|
+
[buildTestimonialCard(repeat("data.entries", "testimonial"))],
|
|
46593
|
+
when("gridColumns", { equals: "4" })
|
|
46594
|
+
),
|
|
46595
|
+
// Fallback to 3 columns when gridColumns is not set
|
|
46596
|
+
grid(
|
|
46597
|
+
{ gap: "lg", cols: { base: 1, sm: 2, lg: 3 } },
|
|
46598
|
+
[buildTestimonialCard(repeat("data.entries", "testimonial"))],
|
|
46599
|
+
when("gridColumns", { not: true })
|
|
46600
|
+
)
|
|
46601
|
+
];
|
|
46602
|
+
}
|
|
45896
46603
|
function buildGridLayout() {
|
|
45897
46604
|
return el(
|
|
45898
46605
|
"div",
|
|
45899
46606
|
{ className: "rb-mt-12 rb-testimonials-carousel" },
|
|
45900
|
-
|
|
45901
|
-
|
|
45902
|
-
|
|
45903
|
-
|
|
45904
|
-
|
|
45905
|
-
|
|
45906
|
-
|
|
45907
|
-
|
|
45908
|
-
grid(
|
|
45909
|
-
{ gap: "lg", cols: { base: 1, sm: 2, lg: 3 } },
|
|
45910
|
-
[buildTestimonialCard(repeat("data.entries", "testimonial"))],
|
|
45911
|
-
when("gridColumns", { equals: "3" })
|
|
45912
|
-
),
|
|
45913
|
-
// 4 columns
|
|
45914
|
-
grid(
|
|
45915
|
-
{ gap: "lg", cols: { base: 1, sm: 2, lg: 3, xl: 4 } },
|
|
45916
|
-
[buildTestimonialCard(repeat("data.entries", "testimonial"))],
|
|
45917
|
-
when("gridColumns", { equals: "4" })
|
|
45918
|
-
),
|
|
45919
|
-
// Fallback to 3 columns when gridColumns is not set
|
|
45920
|
-
grid(
|
|
45921
|
-
{ gap: "lg", cols: { base: 1, sm: 2, lg: 3 } },
|
|
45922
|
-
[buildTestimonialCard(repeat("data.entries", "testimonial"))],
|
|
45923
|
-
when("gridColumns", { not: true })
|
|
45924
|
-
)
|
|
45925
|
-
]
|
|
46607
|
+
buildResponsiveGridCards()
|
|
46608
|
+
);
|
|
46609
|
+
}
|
|
46610
|
+
function buildGridCardsLayout(className) {
|
|
46611
|
+
return el(
|
|
46612
|
+
"div",
|
|
46613
|
+
{ className },
|
|
46614
|
+
buildResponsiveGridCards()
|
|
45926
46615
|
);
|
|
45927
46616
|
}
|
|
45928
46617
|
var testimonialsCarouselFragment = defineFragment({
|
|
@@ -48890,6 +49579,24 @@ var questionColumnsLayout = styledSection({
|
|
|
48890
49579
|
}),
|
|
48891
49580
|
baseClass: ""
|
|
48892
49581
|
});
|
|
49582
|
+
var splitHeadingColumnsLayout = styledSection({
|
|
49583
|
+
children: styledContainer({
|
|
49584
|
+
baseClassName: "rb-relative rb-isolate",
|
|
49585
|
+
children: el(
|
|
49586
|
+
"div",
|
|
49587
|
+
{
|
|
49588
|
+
className: "rb-faq-split-heading-columns rb-grid rb-grid-cols-1 rb-gap-8 rb-lg-grid-cols-2 rb-lg-items-start"
|
|
49589
|
+
},
|
|
49590
|
+
[
|
|
49591
|
+
el("div", { className: "rb-faq-split-heading-columns-copy" }, [headingLayout]),
|
|
49592
|
+
el("div", { className: "rb-faq-split-heading-columns-accordion" }, [
|
|
49593
|
+
questionColumnsAccordionLayout
|
|
49594
|
+
])
|
|
49595
|
+
]
|
|
49596
|
+
)
|
|
49597
|
+
}),
|
|
49598
|
+
baseClass: ""
|
|
49599
|
+
});
|
|
48893
49600
|
var faqManifest = createBlockManifest({
|
|
48894
49601
|
id: "block.faq",
|
|
48895
49602
|
title: "FAQ",
|
|
@@ -48910,7 +49617,8 @@ var faqManifest = createBlockManifest({
|
|
|
48910
49617
|
variants: {
|
|
48911
49618
|
default: defaultLayout,
|
|
48912
49619
|
"two-column": twoColumnLayout,
|
|
48913
|
-
"question-columns": questionColumnsLayout
|
|
49620
|
+
"question-columns": questionColumnsLayout,
|
|
49621
|
+
"split-heading-columns": splitHeadingColumnsLayout
|
|
48914
49622
|
},
|
|
48915
49623
|
defaultVariant: "default",
|
|
48916
49624
|
variantOptions: {
|
|
@@ -48925,6 +49633,10 @@ var faqManifest = createBlockManifest({
|
|
|
48925
49633
|
"question-columns": {
|
|
48926
49634
|
label: "Question columns",
|
|
48927
49635
|
description: "A full-width heading above FAQ items split into two columns."
|
|
49636
|
+
},
|
|
49637
|
+
"split-heading-columns": {
|
|
49638
|
+
label: "Split heading columns",
|
|
49639
|
+
description: "A left heading column with FAQ items split into two columns on the right."
|
|
48928
49640
|
}
|
|
48929
49641
|
},
|
|
48930
49642
|
description: "Accordion of frequently asked questions and answers.",
|
|
@@ -50167,7 +50879,7 @@ var mediaFromUrl = {
|
|
|
50167
50879
|
var mediaTransforms = [mediaFromUrl];
|
|
50168
50880
|
|
|
50169
50881
|
// ../blocks/src/lib/typeGuards.ts
|
|
50170
|
-
function
|
|
50882
|
+
function isRecord4(value) {
|
|
50171
50883
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
50172
50884
|
}
|
|
50173
50885
|
function isObjectRecord2(value) {
|
|
@@ -50182,16 +50894,16 @@ var interpolateRichTextTokensOptionsSchema = z.object({
|
|
|
50182
50894
|
var richTextTokenPattern = /\{\{\s*([a-zA-Z0-9_]+)\s*\}\}/g;
|
|
50183
50895
|
function getSiteName(context) {
|
|
50184
50896
|
const viewModel = context.viewModel;
|
|
50185
|
-
if (!
|
|
50897
|
+
if (!isRecord4(viewModel)) return null;
|
|
50186
50898
|
const site = viewModel.site;
|
|
50187
|
-
if (
|
|
50899
|
+
if (isRecord4(site) && typeof site.title === "string") {
|
|
50188
50900
|
const title = site.title.trim();
|
|
50189
50901
|
return title.length > 0 ? title : null;
|
|
50190
50902
|
}
|
|
50191
50903
|
const root = viewModel.$root;
|
|
50192
|
-
if (
|
|
50904
|
+
if (isRecord4(root)) {
|
|
50193
50905
|
const rootSite = root.site;
|
|
50194
|
-
if (
|
|
50906
|
+
if (isRecord4(rootSite) && typeof rootSite.title === "string") {
|
|
50195
50907
|
const title = rootSite.title.trim();
|
|
50196
50908
|
if (title.length > 0) return title;
|
|
50197
50909
|
}
|
|
@@ -50213,7 +50925,7 @@ function replaceTokenText(input, allowedTokens, tokenValues) {
|
|
|
50213
50925
|
});
|
|
50214
50926
|
}
|
|
50215
50927
|
function visitRichTextNode(node, allowedTokens, tokenValues) {
|
|
50216
|
-
if (!
|
|
50928
|
+
if (!isRecord4(node)) return node;
|
|
50217
50929
|
let changed = false;
|
|
50218
50930
|
const nextNode = { ...node };
|
|
50219
50931
|
if (nextNode.type === "text" && typeof nextNode.text === "string") {
|
|
@@ -50239,13 +50951,13 @@ function visitRichTextNode(node, allowedTokens, tokenValues) {
|
|
|
50239
50951
|
return changed ? nextNode : node;
|
|
50240
50952
|
}
|
|
50241
50953
|
function interpolateRichTextTokens(value, options, context) {
|
|
50242
|
-
if (!
|
|
50954
|
+
if (!isRecord4(value)) return value;
|
|
50243
50955
|
const allowedTokens = new Set(options.tokens);
|
|
50244
50956
|
const tokenValues = {
|
|
50245
50957
|
year: String((/* @__PURE__ */ new Date()).getFullYear()),
|
|
50246
50958
|
site_name: getSiteName(context)
|
|
50247
50959
|
};
|
|
50248
|
-
if (
|
|
50960
|
+
if (isRecord4(value.doc)) {
|
|
50249
50961
|
const nextDoc = visitRichTextNode(value.doc, allowedTokens, tokenValues);
|
|
50250
50962
|
if (nextDoc === value.doc) return value;
|
|
50251
50963
|
return { ...value, doc: nextDoc };
|
|
@@ -51055,6 +51767,7 @@ var siteFooterBlockDefinition = {
|
|
|
51055
51767
|
};
|
|
51056
51768
|
|
|
51057
51769
|
// ../blocks/src/system/blocks/testimonials.tsx
|
|
51770
|
+
var backgroundImageClassName = "rb-absolute rb-inset-0 rb-z-neg-10 rb-h-full rb-w-full rb-object-cover rb-opacity-50";
|
|
51058
51771
|
var wrapVariant = (variantLayout) => styledSection({
|
|
51059
51772
|
children: styledContainer({
|
|
51060
51773
|
children: stack(
|
|
@@ -51068,10 +51781,53 @@ var wrapVariant = (variantLayout) => styledSection({
|
|
|
51068
51781
|
// styledContainer (rb-container) already provides horizontal padding
|
|
51069
51782
|
baseClass: "",
|
|
51070
51783
|
spacing: "comfortable",
|
|
51071
|
-
imageClassName:
|
|
51784
|
+
imageClassName: backgroundImageClassName
|
|
51072
51785
|
});
|
|
51073
51786
|
var carouselLayout = wrapVariant(buildCarouselLayout());
|
|
51074
51787
|
var gridLayout2 = wrapVariant(buildGridLayout());
|
|
51788
|
+
var splitHeading = stack(
|
|
51789
|
+
{ gap: "md", className: "rb-testimonials-split-heading-copy rb-max-w-xl" },
|
|
51790
|
+
[
|
|
51791
|
+
text(
|
|
51792
|
+
{ as: "h2" },
|
|
51793
|
+
when("content.heading"),
|
|
51794
|
+
bind("content.heading")
|
|
51795
|
+
),
|
|
51796
|
+
headingDecoration({
|
|
51797
|
+
family: "short-center-rule",
|
|
51798
|
+
placement: "after-heading"
|
|
51799
|
+
}),
|
|
51800
|
+
text(
|
|
51801
|
+
{
|
|
51802
|
+
as: "p",
|
|
51803
|
+
className: "rb-prose",
|
|
51804
|
+
style: textColorStyle("mutedText")
|
|
51805
|
+
},
|
|
51806
|
+
when("content.subheading"),
|
|
51807
|
+
bind("content.subheading")
|
|
51808
|
+
)
|
|
51809
|
+
]
|
|
51810
|
+
);
|
|
51811
|
+
var splitGridLayout = styledSection({
|
|
51812
|
+
children: styledContainer({
|
|
51813
|
+
baseClassName: "rb-relative rb-isolate",
|
|
51814
|
+
children: el(
|
|
51815
|
+
"div",
|
|
51816
|
+
{
|
|
51817
|
+
className: "rb-testimonials-split-grid rb-grid rb-grid-cols-1 rb-gap-8 rb-lg-grid-cols-2 rb-lg-items-start"
|
|
51818
|
+
},
|
|
51819
|
+
[
|
|
51820
|
+
el("div", { className: "rb-testimonials-split-grid-heading" }, [splitHeading]),
|
|
51821
|
+
el("div", { className: "rb-testimonials-split-grid-cards" }, [
|
|
51822
|
+
buildGridCardsLayout("rb-testimonials-split-grid-card-list")
|
|
51823
|
+
])
|
|
51824
|
+
]
|
|
51825
|
+
)
|
|
51826
|
+
}),
|
|
51827
|
+
baseClass: "",
|
|
51828
|
+
spacing: "comfortable",
|
|
51829
|
+
imageClassName: backgroundImageClassName
|
|
51830
|
+
});
|
|
51075
51831
|
var additionalFields = parseFieldDefinitions([
|
|
51076
51832
|
// Heading fields from fragment
|
|
51077
51833
|
...testimonialsHeadingFragment.fields,
|
|
@@ -51103,7 +51859,7 @@ var additionalFields = parseFieldDefinitions([
|
|
|
51103
51859
|
],
|
|
51104
51860
|
ui: {
|
|
51105
51861
|
intent: "display",
|
|
51106
|
-
visibleWhen: { field: "variant",
|
|
51862
|
+
visibleWhen: { field: "variant", oneOf: ["grid", "split-grid"] }
|
|
51107
51863
|
}
|
|
51108
51864
|
},
|
|
51109
51865
|
// Carousel-specific fields (from fragment)
|
|
@@ -51137,7 +51893,8 @@ var testimonialsManifest = createBlockManifest({
|
|
|
51137
51893
|
// Variant system - enables the variant switcher control in the editor
|
|
51138
51894
|
variants: {
|
|
51139
51895
|
carousel: carouselLayout,
|
|
51140
|
-
grid: gridLayout2
|
|
51896
|
+
grid: gridLayout2,
|
|
51897
|
+
"split-grid": splitGridLayout
|
|
51141
51898
|
},
|
|
51142
51899
|
defaultVariant: "carousel",
|
|
51143
51900
|
variantOptions: {
|
|
@@ -51150,6 +51907,11 @@ var testimonialsManifest = createBlockManifest({
|
|
|
51150
51907
|
label: "Grid",
|
|
51151
51908
|
description: "Responsive grid layout",
|
|
51152
51909
|
icon: "Grid"
|
|
51910
|
+
},
|
|
51911
|
+
"split-grid": {
|
|
51912
|
+
label: "Split grid",
|
|
51913
|
+
description: "Heading on the left with testimonial cards on the right",
|
|
51914
|
+
icon: "PanelLeft"
|
|
51153
51915
|
}
|
|
51154
51916
|
},
|
|
51155
51917
|
// Fields (variant field is auto-generated by augmentManifest)
|
|
@@ -51542,6 +52304,115 @@ var collectionBlockDefinition = {
|
|
|
51542
52304
|
manifest: collectionManifest
|
|
51543
52305
|
};
|
|
51544
52306
|
|
|
52307
|
+
// ../blocks/src/system/blocks/feature-card-icons.ts
|
|
52308
|
+
var FEATURE_CARD_ICON_TREATMENTS = [
|
|
52309
|
+
"plain",
|
|
52310
|
+
"soft-badge",
|
|
52311
|
+
"utility-badge"
|
|
52312
|
+
];
|
|
52313
|
+
function isRecord5(value) {
|
|
52314
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
52315
|
+
}
|
|
52316
|
+
function toPlainTextFromTipTap(value) {
|
|
52317
|
+
if (!isRecord5(value)) return "";
|
|
52318
|
+
if (typeof value.text === "string") return value.text;
|
|
52319
|
+
const content = value.content;
|
|
52320
|
+
if (!Array.isArray(content)) return "";
|
|
52321
|
+
return content.map(toPlainTextFromTipTap).filter(Boolean).join(" ");
|
|
52322
|
+
}
|
|
52323
|
+
function normalizeTokens(value) {
|
|
52324
|
+
return value.toLowerCase().split(/[^a-z0-9]+/u).map((token) => token.trim()).filter((token) => token.length >= 3);
|
|
52325
|
+
}
|
|
52326
|
+
function uniqueValues(values) {
|
|
52327
|
+
return [...new Set(values)];
|
|
52328
|
+
}
|
|
52329
|
+
function slugPart(value) {
|
|
52330
|
+
return normalizeTokens(value).slice(0, 6).join("-") || "card";
|
|
52331
|
+
}
|
|
52332
|
+
function createFeatureCardIconKey(card, index2) {
|
|
52333
|
+
return `${index2 + 1}:${slugPart(card.title ?? "")}`;
|
|
52334
|
+
}
|
|
52335
|
+
function getFeatureCardIconCompletion(cards) {
|
|
52336
|
+
const safeCards = cards ?? [];
|
|
52337
|
+
return {
|
|
52338
|
+
totalCards: safeCards.length,
|
|
52339
|
+
cardsWithIcons: safeCards.filter((card) => hasRenderableBlockIcon(card.icon)).length
|
|
52340
|
+
};
|
|
52341
|
+
}
|
|
52342
|
+
function shouldReserveFeatureCardIconZone(cards) {
|
|
52343
|
+
return getFeatureCardIconCompletion(cards).cardsWithIcons > 0;
|
|
52344
|
+
}
|
|
52345
|
+
function toFeatureCardIconSuggestionInputs(cards) {
|
|
52346
|
+
return (cards ?? []).map((card, index2) => ({
|
|
52347
|
+
key: createFeatureCardIconKey(card, index2),
|
|
52348
|
+
title: card.title ?? "",
|
|
52349
|
+
bodyText: toPlainTextFromTipTap(card.body),
|
|
52350
|
+
icon: parseBlockIconValue(card.icon)
|
|
52351
|
+
}));
|
|
52352
|
+
}
|
|
52353
|
+
function scoreDefinition(definition, tokens) {
|
|
52354
|
+
const haystack = uniqueValues([
|
|
52355
|
+
definition.id,
|
|
52356
|
+
definition.label,
|
|
52357
|
+
...definition.tags,
|
|
52358
|
+
...definition.domains,
|
|
52359
|
+
...definition.tone
|
|
52360
|
+
].flatMap(normalizeTokens));
|
|
52361
|
+
return tokens.reduce((score, token) => haystack.includes(token) ? score + 2 : score, 0);
|
|
52362
|
+
}
|
|
52363
|
+
function suggestSemanticIconForFeatureCard(card) {
|
|
52364
|
+
const tokens = uniqueValues(normalizeTokens(`${card.title} ${card.bodyText}`));
|
|
52365
|
+
const [best] = [...SEMANTIC_ICON_DEFINITIONS].sort((left, right) => {
|
|
52366
|
+
const scoreDelta = scoreDefinition(right, tokens) - scoreDefinition(left, tokens);
|
|
52367
|
+
return scoreDelta || left.label.localeCompare(right.label);
|
|
52368
|
+
});
|
|
52369
|
+
return best?.id ?? "highlight";
|
|
52370
|
+
}
|
|
52371
|
+
function suggestFeatureCardSemanticIcons(cards) {
|
|
52372
|
+
return toFeatureCardIconSuggestionInputs(cards).filter((card) => card.icon.kind === "none" || !hasRenderableBlockIcon(card.icon)).map((card) => ({
|
|
52373
|
+
cardKey: card.key,
|
|
52374
|
+
iconId: suggestSemanticIconForFeatureCard(card)
|
|
52375
|
+
}));
|
|
52376
|
+
}
|
|
52377
|
+
function applyFeatureCardIconSuggestions(cards, suggestions) {
|
|
52378
|
+
const cardKeys = cards.map(createFeatureCardIconKey);
|
|
52379
|
+
const duplicateCardKey = cardKeys.find((key, index2) => cardKeys.indexOf(key) !== index2);
|
|
52380
|
+
if (duplicateCardKey) {
|
|
52381
|
+
return { kind: "duplicate_card_key", cardKey: duplicateCardKey };
|
|
52382
|
+
}
|
|
52383
|
+
const requiredSuggestionKeys = toFeatureCardIconSuggestionInputs(cards).filter((card) => card.icon.kind === "none" || !hasRenderableBlockIcon(card.icon)).map((card) => card.key);
|
|
52384
|
+
const suggestionByKey = /* @__PURE__ */ new Map();
|
|
52385
|
+
const requiredSuggestionKeySet = new Set(requiredSuggestionKeys);
|
|
52386
|
+
const appliedSuggestions = [];
|
|
52387
|
+
for (const suggestion of suggestions) {
|
|
52388
|
+
if (suggestionByKey.has(suggestion.cardKey)) {
|
|
52389
|
+
return { kind: "duplicate_suggestion_card_key", cardKey: suggestion.cardKey };
|
|
52390
|
+
}
|
|
52391
|
+
if (!cardKeys.includes(suggestion.cardKey)) {
|
|
52392
|
+
return { kind: "unknown_card_key", cardKey: suggestion.cardKey };
|
|
52393
|
+
}
|
|
52394
|
+
if (!isSemanticIconId(suggestion.iconId)) {
|
|
52395
|
+
return { kind: "invalid_semantic_icon", iconId: suggestion.iconId };
|
|
52396
|
+
}
|
|
52397
|
+
suggestionByKey.set(suggestion.cardKey, suggestion.iconId);
|
|
52398
|
+
if (requiredSuggestionKeySet.has(suggestion.cardKey)) {
|
|
52399
|
+
appliedSuggestions.push({
|
|
52400
|
+
cardKey: suggestion.cardKey,
|
|
52401
|
+
iconId: suggestion.iconId
|
|
52402
|
+
});
|
|
52403
|
+
}
|
|
52404
|
+
}
|
|
52405
|
+
for (const cardKey of requiredSuggestionKeys) {
|
|
52406
|
+
if (!suggestionByKey.has(cardKey)) {
|
|
52407
|
+
return { kind: "missing_suggestion_card_key", cardKey };
|
|
52408
|
+
}
|
|
52409
|
+
}
|
|
52410
|
+
return {
|
|
52411
|
+
kind: "applied",
|
|
52412
|
+
appliedSuggestions
|
|
52413
|
+
};
|
|
52414
|
+
}
|
|
52415
|
+
|
|
51545
52416
|
// ../blocks/src/system/blocks/feature-cards.ts
|
|
51546
52417
|
function grid3(props2, children) {
|
|
51547
52418
|
return el("grid", props2 ?? void 0, children ?? void 0);
|
|
@@ -51584,6 +52455,15 @@ var featureCard = styledCard(
|
|
|
51584
52455
|
bind("card.media")
|
|
51585
52456
|
),
|
|
51586
52457
|
stack({ gap: "sm", className: "rb-feature-card-content rb-flex-1 rb-p-6" }, [
|
|
52458
|
+
el(
|
|
52459
|
+
"feature-card-icon",
|
|
52460
|
+
{
|
|
52461
|
+
treatment: { $bind: { from: "content._iconTreatment", fallback: "soft-badge" } },
|
|
52462
|
+
generatedAssets: { $bind: { from: "data.generatedIconAssets" } }
|
|
52463
|
+
},
|
|
52464
|
+
null,
|
|
52465
|
+
bind("card.icon")
|
|
52466
|
+
),
|
|
51587
52467
|
text(
|
|
51588
52468
|
{
|
|
51589
52469
|
as: "h3",
|
|
@@ -51705,6 +52585,16 @@ var featureCardsConfig = {
|
|
|
51705
52585
|
defaultValue: "4/3",
|
|
51706
52586
|
visibleWhen: { field: "media", notEquals: null }
|
|
51707
52587
|
}),
|
|
52588
|
+
{
|
|
52589
|
+
id: "icon",
|
|
52590
|
+
type: "text",
|
|
52591
|
+
label: "Icon",
|
|
52592
|
+
required: false,
|
|
52593
|
+
ui: {
|
|
52594
|
+
widget: "iconPicker",
|
|
52595
|
+
iconPickerPreset: "feature"
|
|
52596
|
+
}
|
|
52597
|
+
},
|
|
51708
52598
|
{
|
|
51709
52599
|
id: "title",
|
|
51710
52600
|
type: "text",
|
|
@@ -51740,6 +52630,19 @@ var featureCardsConfig = {
|
|
|
51740
52630
|
]
|
|
51741
52631
|
}
|
|
51742
52632
|
},
|
|
52633
|
+
{
|
|
52634
|
+
id: "_iconTreatment",
|
|
52635
|
+
type: "select",
|
|
52636
|
+
label: "Icon style",
|
|
52637
|
+
required: false,
|
|
52638
|
+
defaultValue: "soft-badge",
|
|
52639
|
+
multiple: false,
|
|
52640
|
+
options: FEATURE_CARD_ICON_TREATMENTS.map((value) => ({
|
|
52641
|
+
value,
|
|
52642
|
+
label: value === "plain" ? "Plain" : value === "soft-badge" ? "Soft badge" : "Utility badge"
|
|
52643
|
+
})),
|
|
52644
|
+
ui: { intent: "display" }
|
|
52645
|
+
},
|
|
51743
52646
|
cardStylesField({
|
|
51744
52647
|
id: "_cardStyles",
|
|
51745
52648
|
label: "Card styles"
|
|
@@ -61822,7 +62725,8 @@ var systemBlockDefinitionsRaw = [
|
|
|
61822
62725
|
layoutProfiles: [
|
|
61823
62726
|
layoutProfile({ variantKey: "default", family: "stack", weight: "standard" }),
|
|
61824
62727
|
layoutProfile({ variantKey: "two-column", family: "split", weight: "standard" }),
|
|
61825
|
-
layoutProfile({ variantKey: "question-columns", family: "grid", weight: "standard" })
|
|
62728
|
+
layoutProfile({ variantKey: "question-columns", family: "grid", weight: "standard" }),
|
|
62729
|
+
layoutProfile({ variantKey: "split-heading-columns", family: "split", weight: "standard" })
|
|
61826
62730
|
]
|
|
61827
62731
|
})),
|
|
61828
62732
|
withDesignCapability("block.site-header", siteHeaderBlockDefinition, declareNoBlockDesignCapability("site-chrome"), defineBlockDesignMetadata({
|
|
@@ -61853,6 +62757,12 @@ var systemBlockDefinitionsRaw = [
|
|
|
61853
62757
|
family: "grid",
|
|
61854
62758
|
weight: "standard",
|
|
61855
62759
|
bias: "soft"
|
|
62760
|
+
}),
|
|
62761
|
+
layoutProfile({
|
|
62762
|
+
variantKey: "split-grid",
|
|
62763
|
+
family: "split",
|
|
62764
|
+
weight: "featured",
|
|
62765
|
+
bias: "soft"
|
|
61856
62766
|
})
|
|
61857
62767
|
]
|
|
61858
62768
|
})),
|
|
@@ -63001,10 +63911,10 @@ z.object({
|
|
|
63001
63911
|
content: z.array(TipTapNodeSchema)
|
|
63002
63912
|
});
|
|
63003
63913
|
function unwrapRichTextRoot(value) {
|
|
63004
|
-
if (!
|
|
63914
|
+
if (!isRecord4(value)) return value;
|
|
63005
63915
|
if (!("doc" in value)) return value;
|
|
63006
63916
|
const inner = value.doc;
|
|
63007
|
-
if (
|
|
63917
|
+
if (isRecord4(inner) && inner.type === "doc") return inner;
|
|
63008
63918
|
return value;
|
|
63009
63919
|
}
|
|
63010
63920
|
function buildRichTextSchema(options) {
|
|
@@ -63013,11 +63923,11 @@ function buildRichTextSchema(options) {
|
|
|
63013
63923
|
const label = options.label ?? "This field";
|
|
63014
63924
|
schema = schema.refine(
|
|
63015
63925
|
(val) => {
|
|
63016
|
-
const doc3 =
|
|
63017
|
-
const content =
|
|
63926
|
+
const doc3 = isRecord4(val) && "doc" in val ? val.doc : val;
|
|
63927
|
+
const content = isRecord4(doc3) ? doc3.content : void 0;
|
|
63018
63928
|
if (!Array.isArray(content) || content.length === 0) return false;
|
|
63019
63929
|
const first2 = content[0];
|
|
63020
|
-
if (content.length === 1 &&
|
|
63930
|
+
if (content.length === 1 && isRecord4(first2) && first2.type === "paragraph" && (!("content" in first2) || first2.content == null)) {
|
|
63021
63931
|
return false;
|
|
63022
63932
|
}
|
|
63023
63933
|
return true;
|
|
@@ -63074,7 +63984,7 @@ function coerceRichTextDoc(value) {
|
|
|
63074
63984
|
if (typeof raw === "string") {
|
|
63075
63985
|
return markdownToTipTapDoc(raw);
|
|
63076
63986
|
}
|
|
63077
|
-
if (
|
|
63987
|
+
if (isRecord4(raw) && typeof raw.type === "string") {
|
|
63078
63988
|
return raw;
|
|
63079
63989
|
}
|
|
63080
63990
|
return null;
|
|
@@ -63232,6 +64142,47 @@ function getCtaIconComponent(name) {
|
|
|
63232
64142
|
if (!isCtaIconName(name)) return null;
|
|
63233
64143
|
return CTA_ICON_COMPONENTS[name] ?? null;
|
|
63234
64144
|
}
|
|
64145
|
+
|
|
64146
|
+
// ../blocks/src/system/icons/registry.ts
|
|
64147
|
+
function buildSearchText(parts) {
|
|
64148
|
+
return parts.map((part) => part.trim()).filter(Boolean).join(" ");
|
|
64149
|
+
}
|
|
64150
|
+
function semanticDefinitionToOption(definition, preset2) {
|
|
64151
|
+
return {
|
|
64152
|
+
id: definition.id,
|
|
64153
|
+
label: definition.label,
|
|
64154
|
+
searchText: buildSearchText([
|
|
64155
|
+
definition.label,
|
|
64156
|
+
definition.id,
|
|
64157
|
+
...definition.tags,
|
|
64158
|
+
...definition.domains,
|
|
64159
|
+
...definition.tone
|
|
64160
|
+
]),
|
|
64161
|
+
preset: preset2
|
|
64162
|
+
};
|
|
64163
|
+
}
|
|
64164
|
+
var CTA_PICKER_OPTIONS = CTA_ICON_OPTIONS.map((option) => ({
|
|
64165
|
+
id: option.id,
|
|
64166
|
+
label: option.label,
|
|
64167
|
+
searchText: buildSearchText([option.label, option.id]),
|
|
64168
|
+
preset: "cta"
|
|
64169
|
+
}));
|
|
64170
|
+
function semanticOptionsForPreset(preset2) {
|
|
64171
|
+
return SEMANTIC_ICON_DEFINITIONS.filter((definition) => definition.presets.includes(preset2)).map((definition) => semanticDefinitionToOption(definition, preset2));
|
|
64172
|
+
}
|
|
64173
|
+
var ICON_PICKER_OPTIONS_BY_PRESET = {
|
|
64174
|
+
cta: CTA_PICKER_OPTIONS,
|
|
64175
|
+
feature: semanticOptionsForPreset("feature")
|
|
64176
|
+
};
|
|
64177
|
+
function getIconPickerOptionsForPreset(preset2) {
|
|
64178
|
+
return ICON_PICKER_OPTIONS_BY_PRESET[preset2];
|
|
64179
|
+
}
|
|
64180
|
+
function isKnownIconName(value) {
|
|
64181
|
+
return isCtaIconName(value) || isSemanticIconId(value);
|
|
64182
|
+
}
|
|
64183
|
+
function getIconComponent(name) {
|
|
64184
|
+
return getCtaIconComponent(name) ?? getSemanticIconComponent(name);
|
|
64185
|
+
}
|
|
63235
64186
|
var IconNode = ({
|
|
63236
64187
|
value,
|
|
63237
64188
|
title,
|
|
@@ -63243,7 +64194,7 @@ var IconNode = ({
|
|
|
63243
64194
|
pathBase: _pathBase,
|
|
63244
64195
|
...rest
|
|
63245
64196
|
}) => {
|
|
63246
|
-
const Icon3 =
|
|
64197
|
+
const Icon3 = getIconComponent(getBlockIconSemanticFallbackId(value) ?? value);
|
|
63247
64198
|
if (!Icon3) return null;
|
|
63248
64199
|
const ariaLabel = rest["aria-label"];
|
|
63249
64200
|
const decorative = !ariaLabel && !title;
|
|
@@ -63257,6 +64208,60 @@ var IconNode = ({
|
|
|
63257
64208
|
}
|
|
63258
64209
|
);
|
|
63259
64210
|
};
|
|
64211
|
+
function joinClasses5(...values) {
|
|
64212
|
+
const className = values.filter(Boolean).join(" ");
|
|
64213
|
+
return className || void 0;
|
|
64214
|
+
}
|
|
64215
|
+
function resolveTreatment(value) {
|
|
64216
|
+
return value && FEATURE_CARD_ICON_TREATMENTS.includes(value) ? value : "soft-badge";
|
|
64217
|
+
}
|
|
64218
|
+
function buildRenderAssetLookupFromUnknown(value) {
|
|
64219
|
+
const result = buildGeneratedBlockIconRenderAssetLookupFromUnknown(value);
|
|
64220
|
+
return result.kind === "ok" ? result.lookup : /* @__PURE__ */ new Map();
|
|
64221
|
+
}
|
|
64222
|
+
var FeatureCardIconNode = ({
|
|
64223
|
+
value,
|
|
64224
|
+
treatment,
|
|
64225
|
+
className,
|
|
64226
|
+
generatedAssets,
|
|
64227
|
+
blockContent
|
|
64228
|
+
}) => {
|
|
64229
|
+
if (!shouldReserveFeatureCardIconZone(blockContent?.cards)) return null;
|
|
64230
|
+
const resolvedIcon = resolveBlockIconRenderValue(value, buildRenderAssetLookupFromUnknown(generatedAssets));
|
|
64231
|
+
const iconId = resolvedIcon.kind === "semantic" ? resolvedIcon.iconId : resolvedIcon.kind === "generated_fallback" ? resolvedIcon.semanticFallbackIconId : null;
|
|
64232
|
+
const resolvedTreatment = resolveTreatment(treatment);
|
|
64233
|
+
const hasIcon = resolvedIcon.kind !== "none";
|
|
64234
|
+
return /* @__PURE__ */ jsx(
|
|
64235
|
+
"div",
|
|
64236
|
+
{
|
|
64237
|
+
className: joinClasses5(
|
|
64238
|
+
"rb-feature-card-icon-zone",
|
|
64239
|
+
`rb-feature-card-icon-zone--${resolvedTreatment}`,
|
|
64240
|
+
hasIcon ? "rb-feature-card-icon-zone--filled" : "rb-feature-card-icon-zone--empty",
|
|
64241
|
+
className
|
|
64242
|
+
),
|
|
64243
|
+
"aria-hidden": "true",
|
|
64244
|
+
children: resolvedIcon.kind === "generated_asset" ? /* @__PURE__ */ jsx(
|
|
64245
|
+
"img",
|
|
64246
|
+
{
|
|
64247
|
+
src: resolvedIcon.asset.src,
|
|
64248
|
+
width: resolvedIcon.asset.width,
|
|
64249
|
+
height: resolvedIcon.asset.height,
|
|
64250
|
+
alt: "",
|
|
64251
|
+
loading: "lazy",
|
|
64252
|
+
decoding: "async",
|
|
64253
|
+
className: "rb-feature-card-icon rb-feature-card-icon--generated"
|
|
64254
|
+
}
|
|
64255
|
+
) : iconId ? /* @__PURE__ */ jsx(
|
|
64256
|
+
IconNode,
|
|
64257
|
+
{
|
|
64258
|
+
value: iconId,
|
|
64259
|
+
className: "rb-feature-card-icon"
|
|
64260
|
+
}
|
|
64261
|
+
) : null
|
|
64262
|
+
}
|
|
64263
|
+
);
|
|
64264
|
+
};
|
|
63260
64265
|
var FILE_DOWNLOAD_BUTTON_VARIANTS = [
|
|
63261
64266
|
"primary",
|
|
63262
64267
|
"secondary",
|
|
@@ -64200,12 +65205,12 @@ function resolveBookingSiteId(siteId, form2) {
|
|
|
64200
65205
|
return siteId || form2?.siteId || "";
|
|
64201
65206
|
}
|
|
64202
65207
|
function normalizeBookingFormConfig(form2) {
|
|
64203
|
-
if (!
|
|
65208
|
+
if (!isRecord6(form2)) return null;
|
|
64204
65209
|
const id = readNonEmptyString(form2.id);
|
|
64205
65210
|
const name = readNonEmptyString(form2.name);
|
|
64206
65211
|
if (!id || !name) return null;
|
|
64207
|
-
const schemaSource =
|
|
64208
|
-
const settingsSource =
|
|
65212
|
+
const schemaSource = isRecord6(form2.schema) ? form2.schema : isRecord6(form2.schemaJson) ? form2.schemaJson : null;
|
|
65213
|
+
const settingsSource = isRecord6(form2.settings) ? form2.settings : isRecord6(form2.settingsJson) ? form2.settingsJson : null;
|
|
64209
65214
|
return {
|
|
64210
65215
|
id,
|
|
64211
65216
|
name,
|
|
@@ -64229,10 +65234,10 @@ function normalizeBookingServices(services) {
|
|
|
64229
65234
|
if (Array.isArray(services)) {
|
|
64230
65235
|
return services.filter(isBookingFormService).map(normalizeService);
|
|
64231
65236
|
}
|
|
64232
|
-
if (
|
|
65237
|
+
if (isRecord6(services) && "services" in services) {
|
|
64233
65238
|
return Array.isArray(services.services) ? services.services.filter(isBookingFormService).map(normalizeService) : [];
|
|
64234
65239
|
}
|
|
64235
|
-
return
|
|
65240
|
+
return isRecord6(services) ? Object.values(services).filter(isBookingFormService).map(normalizeService) : [];
|
|
64236
65241
|
}
|
|
64237
65242
|
function normalizeBookingSchema(value) {
|
|
64238
65243
|
if (!value) return void 0;
|
|
@@ -64244,7 +65249,7 @@ function normalizeBookingSchema(value) {
|
|
|
64244
65249
|
};
|
|
64245
65250
|
}
|
|
64246
65251
|
function readBookingFormField(value) {
|
|
64247
|
-
if (!
|
|
65252
|
+
if (!isRecord6(value)) return null;
|
|
64248
65253
|
const id = readNonEmptyString(value.id);
|
|
64249
65254
|
const label = readNonEmptyString(value.label);
|
|
64250
65255
|
const type = readBookingFieldType(value.type);
|
|
@@ -64290,7 +65295,7 @@ function readBookingFieldOptions(value) {
|
|
|
64290
65295
|
return options.length > 0 ? options : void 0;
|
|
64291
65296
|
}
|
|
64292
65297
|
function readBookingFieldOption(value) {
|
|
64293
|
-
if (!
|
|
65298
|
+
if (!isRecord6(value)) return null;
|
|
64294
65299
|
const optionValue = readNonEmptyString(value.value);
|
|
64295
65300
|
const label = readNonEmptyString(value.label);
|
|
64296
65301
|
return optionValue && label ? { value: optionValue, label } : null;
|
|
@@ -64307,7 +65312,7 @@ function normalizeBookingSettings(value) {
|
|
|
64307
65312
|
};
|
|
64308
65313
|
}
|
|
64309
65314
|
function isBookingFormService(value) {
|
|
64310
|
-
return
|
|
65315
|
+
return isRecord6(value) && typeof value.id === "string" && typeof value.siteId === "string" && typeof value.title === "string";
|
|
64311
65316
|
}
|
|
64312
65317
|
function collectBookingCustomFields(data) {
|
|
64313
65318
|
const customFields = {};
|
|
@@ -64337,7 +65342,7 @@ function readStringArray(value) {
|
|
|
64337
65342
|
const strings = value.filter((item) => typeof item === "string");
|
|
64338
65343
|
return strings.length > 0 ? strings : void 0;
|
|
64339
65344
|
}
|
|
64340
|
-
function
|
|
65345
|
+
function isRecord6(value) {
|
|
64341
65346
|
return typeof value === "object" && value !== null;
|
|
64342
65347
|
}
|
|
64343
65348
|
function getBookingServicePaymentSelectionMode(service) {
|
|
@@ -66797,7 +67802,7 @@ function EventRegistrationSSR({
|
|
|
66797
67802
|
);
|
|
66798
67803
|
}
|
|
66799
67804
|
var event_registration_server_default = EventRegistrationSSR;
|
|
66800
|
-
function
|
|
67805
|
+
function joinClasses6(...parts) {
|
|
66801
67806
|
return parts.filter((part) => typeof part === "string" && part.length > 0).join(" ");
|
|
66802
67807
|
}
|
|
66803
67808
|
function FeedbackMessage({
|
|
@@ -66820,8 +67825,8 @@ function FeedbackMessage({
|
|
|
66820
67825
|
role,
|
|
66821
67826
|
"aria-live": resolvedLive === "off" ? void 0 : resolvedLive,
|
|
66822
67827
|
children: [
|
|
66823
|
-
title ? /* @__PURE__ */ jsx("p", { className:
|
|
66824
|
-
shouldWrapBody ? /* @__PURE__ */ jsx("div", { className:
|
|
67828
|
+
title ? /* @__PURE__ */ jsx("p", { className: joinClasses6(titleClassName), "data-feedback-title": true, children: title }) : null,
|
|
67829
|
+
shouldWrapBody ? /* @__PURE__ */ jsx("div", { className: joinClasses6(bodyClassName), "data-feedback-body": true, children }) : children
|
|
66825
67830
|
]
|
|
66826
67831
|
}
|
|
66827
67832
|
);
|
|
@@ -67299,6 +68304,7 @@ var serverComponentRegistry = {
|
|
|
67299
68304
|
richText: RichTextNode,
|
|
67300
68305
|
button: ButtonNode,
|
|
67301
68306
|
icon: IconNode,
|
|
68307
|
+
"feature-card-icon": FeatureCardIconNode,
|
|
67302
68308
|
media: MediaNodeServer,
|
|
67303
68309
|
"file-download": FileDownloadNode,
|
|
67304
68310
|
videoEmbed: VideoEmbedNode,
|
|
@@ -71636,7 +72642,7 @@ function hydrateValue(value, context) {
|
|
|
71636
72642
|
const isUnchanged = resolvedItems.every((item, index2) => item === value[index2]);
|
|
71637
72643
|
return isUnchanged ? value : resolvedItems;
|
|
71638
72644
|
}
|
|
71639
|
-
if (
|
|
72645
|
+
if (isRecord4(value)) {
|
|
71640
72646
|
if (isInternalLink(value)) {
|
|
71641
72647
|
return hydrateInternalLink(value, context.routes);
|
|
71642
72648
|
}
|
|
@@ -83205,6 +84211,60 @@ var containerResponsiveThemeCss = `/*
|
|
|
83205
84211
|
|
|
83206
84212
|
:where(.theme-scope) .rb-heading-decoration-color-muted {
|
|
83207
84213
|
color: rgb(var(--tb-mutedText));
|
|
84214
|
+
}
|
|
84215
|
+
|
|
84216
|
+
/* =============================================================================
|
|
84217
|
+
* Block: Feature Card Icons
|
|
84218
|
+
* =============================================================================
|
|
84219
|
+
*/
|
|
84220
|
+
|
|
84221
|
+
:where(.theme-scope) .rb-feature-card-icon-zone {
|
|
84222
|
+
display: inline-flex;
|
|
84223
|
+
align-items: center;
|
|
84224
|
+
justify-content: center;
|
|
84225
|
+
flex: 0 0 auto;
|
|
84226
|
+
margin-bottom: 0.125rem;
|
|
84227
|
+
color: rgb(var(--tb-primary));
|
|
84228
|
+
}
|
|
84229
|
+
|
|
84230
|
+
:where(.theme-scope) .rb-feature-card-icon-zone--empty {
|
|
84231
|
+
visibility: hidden;
|
|
84232
|
+
}
|
|
84233
|
+
|
|
84234
|
+
:where(.theme-scope) .rb-feature-card-icon-zone--plain {
|
|
84235
|
+
width: 1.5rem;
|
|
84236
|
+
height: 1.5rem;
|
|
84237
|
+
}
|
|
84238
|
+
|
|
84239
|
+
:where(.theme-scope) .rb-feature-card-icon-zone--soft-badge,
|
|
84240
|
+
:where(.theme-scope) .rb-feature-card-icon-zone--utility-badge {
|
|
84241
|
+
width: 2.5rem;
|
|
84242
|
+
height: 2.5rem;
|
|
84243
|
+
border-radius: var(--rb-block-radius, 0.75rem);
|
|
84244
|
+
}
|
|
84245
|
+
|
|
84246
|
+
:where(.theme-scope) .rb-feature-card-icon-zone--soft-badge {
|
|
84247
|
+
background-color: rgb(var(--tb-primary) / 10%);
|
|
84248
|
+
}
|
|
84249
|
+
|
|
84250
|
+
:where(.theme-scope) .rb-feature-card-icon-zone--utility-badge {
|
|
84251
|
+
background-color: rgb(var(--tb-surface));
|
|
84252
|
+
border: 1px solid rgb(var(--tb-border));
|
|
84253
|
+
box-shadow: 0 1px 2px rgba(var(--tb-shadow), 0.08);
|
|
84254
|
+
}
|
|
84255
|
+
|
|
84256
|
+
:where(.theme-scope) .rb-feature-card-icon {
|
|
84257
|
+
width: 1.25rem;
|
|
84258
|
+
height: 1.25rem;
|
|
84259
|
+
}
|
|
84260
|
+
|
|
84261
|
+
:where(.theme-scope) .rb-feature-card-icon--generated {
|
|
84262
|
+
object-fit: contain;
|
|
84263
|
+
}
|
|
84264
|
+
|
|
84265
|
+
:where(.theme-scope) .rb-feature-card-icon-zone--plain .rb-feature-card-icon {
|
|
84266
|
+
width: 1.5rem;
|
|
84267
|
+
height: 1.5rem;
|
|
83208
84268
|
}`;
|
|
83209
84269
|
function ThemeScopeCore({
|
|
83210
84270
|
cssVars,
|
|
@@ -83779,14 +84839,488 @@ function omitRecordKey(content, key) {
|
|
|
83779
84839
|
);
|
|
83780
84840
|
}
|
|
83781
84841
|
|
|
84842
|
+
// ../blocks/src/system/customize/backgrounds.ts
|
|
84843
|
+
var BACKGROUND_MODES = [
|
|
84844
|
+
"default",
|
|
84845
|
+
"color",
|
|
84846
|
+
"gradient",
|
|
84847
|
+
"image"
|
|
84848
|
+
];
|
|
84849
|
+
var DEFAULT_BACKGROUND_OVERRIDE = {
|
|
84850
|
+
kind: "default"
|
|
84851
|
+
};
|
|
84852
|
+
var BACKGROUND_CUSTOMIZABLE_BLOCK_KINDS = [
|
|
84853
|
+
"block.hero",
|
|
84854
|
+
"block.testimonials",
|
|
84855
|
+
"block.cta-full",
|
|
84856
|
+
"block.form"
|
|
84857
|
+
];
|
|
84858
|
+
var BACKGROUND_RICH_LAYOUT_FAMILIES = [
|
|
84859
|
+
"split"
|
|
84860
|
+
];
|
|
84861
|
+
var BACKGROUND_RICH_SECTION_SURFACES = [
|
|
84862
|
+
"hero-image"
|
|
84863
|
+
];
|
|
84864
|
+
function isBackgroundCustomizableBlockKind(blockKind) {
|
|
84865
|
+
return BACKGROUND_CUSTOMIZABLE_BLOCK_KINDS.includes(blockKind);
|
|
84866
|
+
}
|
|
84867
|
+
var backgroundShadeableTokenNames = [
|
|
84868
|
+
"primary",
|
|
84869
|
+
"secondary",
|
|
84870
|
+
"accent",
|
|
84871
|
+
"success",
|
|
84872
|
+
"warning",
|
|
84873
|
+
"destructive",
|
|
84874
|
+
"neutral"
|
|
84875
|
+
];
|
|
84876
|
+
var backgroundColorTokenNames = uniqueStrings([
|
|
84877
|
+
...themeColorBaseTokenNames,
|
|
84878
|
+
...backgroundShadeableTokenNames.flatMap(
|
|
84879
|
+
(name) => themeColorShadeSteps.map((shade) => `${name}-${shade}`)
|
|
84880
|
+
)
|
|
84881
|
+
]);
|
|
84882
|
+
var backgroundColorTokens = backgroundColorTokenNames.flatMap((name) => {
|
|
84883
|
+
const token = parseThemeColorToken(name);
|
|
84884
|
+
if (!token) {
|
|
84885
|
+
return [];
|
|
84886
|
+
}
|
|
84887
|
+
return [token];
|
|
84888
|
+
});
|
|
84889
|
+
var recommendedBackgroundColorTokenNames = [
|
|
84890
|
+
"surface",
|
|
84891
|
+
"muted",
|
|
84892
|
+
"primary",
|
|
84893
|
+
"secondary",
|
|
84894
|
+
"accent"
|
|
84895
|
+
];
|
|
84896
|
+
var recommendedBackgroundColorTokens = recommendedBackgroundColorTokenNames.flatMap((name) => {
|
|
84897
|
+
const token = parseThemeColorToken(name);
|
|
84898
|
+
if (!token) {
|
|
84899
|
+
return [];
|
|
84900
|
+
}
|
|
84901
|
+
return [token];
|
|
84902
|
+
});
|
|
84903
|
+
var advancedBackgroundColorTokens = backgroundColorTokens.filter(
|
|
84904
|
+
(token) => !recommendedBackgroundColorTokens.includes(token)
|
|
84905
|
+
);
|
|
84906
|
+
var TEXT_BACKGROUND_TREATMENT = {
|
|
84907
|
+
kind: "theme-foreground",
|
|
84908
|
+
minContrastRatio: 4.5
|
|
84909
|
+
};
|
|
84910
|
+
var IMAGE_BACKGROUND_TREATMENT = {
|
|
84911
|
+
kind: "look-owned-image-overlay",
|
|
84912
|
+
minContrastRatio: 4.5,
|
|
84913
|
+
minOverlayOpacity: 0.64
|
|
84914
|
+
};
|
|
84915
|
+
var gradientPresetIds = GRADIENT_PRESETS.map(
|
|
84916
|
+
(preset2) => preset2.id
|
|
84917
|
+
);
|
|
84918
|
+
var gradientPresetIdSet = new Set(gradientPresetIds);
|
|
84919
|
+
function parseGradientPresetId(value) {
|
|
84920
|
+
if (typeof value !== "string") return null;
|
|
84921
|
+
const normalized = value.trim();
|
|
84922
|
+
if (!gradientPresetIdSet.has(normalized)) return null;
|
|
84923
|
+
return normalized;
|
|
84924
|
+
}
|
|
84925
|
+
function backgroundModeForOverride(override) {
|
|
84926
|
+
return override.kind;
|
|
84927
|
+
}
|
|
84928
|
+
function backgroundOverrideEquals(left, right) {
|
|
84929
|
+
if (left.kind !== right.kind) return false;
|
|
84930
|
+
switch (left.kind) {
|
|
84931
|
+
case "default":
|
|
84932
|
+
return true;
|
|
84933
|
+
case "color":
|
|
84934
|
+
return right.kind === "color" && left.token === right.token;
|
|
84935
|
+
case "gradient":
|
|
84936
|
+
return right.kind === "gradient" && left.gradientId === right.gradientId;
|
|
84937
|
+
case "image":
|
|
84938
|
+
return right.kind === "image" && left.mediaId === right.mediaId;
|
|
84939
|
+
}
|
|
84940
|
+
}
|
|
84941
|
+
function imagePoolForOverride(override) {
|
|
84942
|
+
return override.kind === "image" ? [{ mediaId: override.mediaId, source: "current" }] : [];
|
|
84943
|
+
}
|
|
84944
|
+
function defaultBackgroundOverrideForMode(mode, capability) {
|
|
84945
|
+
switch (mode) {
|
|
84946
|
+
case "default":
|
|
84947
|
+
return DEFAULT_BACKGROUND_OVERRIDE;
|
|
84948
|
+
case "color": {
|
|
84949
|
+
const token = capability.colorTokens?.[0] ?? backgroundColorTokens[0];
|
|
84950
|
+
return token ? { kind: "color", token } : DEFAULT_BACKGROUND_OVERRIDE;
|
|
84951
|
+
}
|
|
84952
|
+
case "gradient": {
|
|
84953
|
+
const gradientId = capability.gradientIds?.[0];
|
|
84954
|
+
return gradientId ? { kind: "gradient", gradientId } : DEFAULT_BACKGROUND_OVERRIDE;
|
|
84955
|
+
}
|
|
84956
|
+
case "image": {
|
|
84957
|
+
const image = rankBackgroundImagePoolItems(capability.imagePool ?? [])[0];
|
|
84958
|
+
return image ? { kind: "image", mediaId: image.mediaId } : DEFAULT_BACKGROUND_OVERRIDE;
|
|
84959
|
+
}
|
|
84960
|
+
}
|
|
84961
|
+
}
|
|
84962
|
+
function resolveBackgroundCapability(input) {
|
|
84963
|
+
if (!isBackgroundCustomizableBlockKind(input.block.blockKind)) {
|
|
84964
|
+
return backgroundCapabilityFromModes([{ kind: "default" }]);
|
|
84965
|
+
}
|
|
84966
|
+
const richModesSupported = blockSupportsRichBackgroundModes(input.block);
|
|
84967
|
+
return backgroundCapabilityFromModes([
|
|
84968
|
+
{ kind: "default" },
|
|
84969
|
+
{
|
|
84970
|
+
kind: "color",
|
|
84971
|
+
recommendedTokens: recommendedBackgroundColorTokens,
|
|
84972
|
+
advancedTokens: advancedBackgroundColorTokens,
|
|
84973
|
+
selectableTokens: backgroundColorTokens,
|
|
84974
|
+
treatment: TEXT_BACKGROUND_TREATMENT
|
|
84975
|
+
},
|
|
84976
|
+
...richModesSupported ? [
|
|
84977
|
+
{
|
|
84978
|
+
kind: "gradient",
|
|
84979
|
+
gradientIds: gradientPresetIds,
|
|
84980
|
+
treatment: TEXT_BACKGROUND_TREATMENT
|
|
84981
|
+
},
|
|
84982
|
+
{
|
|
84983
|
+
kind: "image",
|
|
84984
|
+
imagePool: input.imagePool ?? [],
|
|
84985
|
+
treatment: IMAGE_BACKGROUND_TREATMENT
|
|
84986
|
+
}
|
|
84987
|
+
] : []
|
|
84988
|
+
]);
|
|
84989
|
+
}
|
|
84990
|
+
function backgroundCapabilityFromModes(modeCapabilities) {
|
|
84991
|
+
const color = modeCapabilities.find((mode) => mode.kind === "color");
|
|
84992
|
+
const gradient = modeCapabilities.find((mode) => mode.kind === "gradient");
|
|
84993
|
+
const image = modeCapabilities.find((mode) => mode.kind === "image");
|
|
84994
|
+
return {
|
|
84995
|
+
modeCapabilities,
|
|
84996
|
+
modes: modeCapabilities.map((mode) => mode.kind),
|
|
84997
|
+
...color?.kind === "color" ? {
|
|
84998
|
+
recommendedColorTokens: color.recommendedTokens,
|
|
84999
|
+
advancedColorTokens: color.advancedTokens,
|
|
85000
|
+
colorTokens: color.selectableTokens,
|
|
85001
|
+
colorTreatment: color.treatment
|
|
85002
|
+
} : {},
|
|
85003
|
+
...gradient?.kind === "gradient" ? {
|
|
85004
|
+
gradientIds: gradient.gradientIds,
|
|
85005
|
+
gradientTreatment: gradient.treatment
|
|
85006
|
+
} : {},
|
|
85007
|
+
...image?.kind === "image" ? {
|
|
85008
|
+
imagePool: image.imagePool,
|
|
85009
|
+
imageTreatment: image.treatment
|
|
85010
|
+
} : {}
|
|
85011
|
+
};
|
|
85012
|
+
}
|
|
85013
|
+
function parseBackgroundOverrideFromContent(content) {
|
|
85014
|
+
const sectionStyles = isRecord7(content._sectionStyles) ? content._sectionStyles : null;
|
|
85015
|
+
return parseBackgroundOverride(sectionStyles?.background);
|
|
85016
|
+
}
|
|
85017
|
+
function parseBackgroundOverride(value) {
|
|
85018
|
+
if (value === null || value === void 0) {
|
|
85019
|
+
return { kind: "supported", override: DEFAULT_BACKGROUND_OVERRIDE };
|
|
85020
|
+
}
|
|
85021
|
+
if (!isRecord7(value)) {
|
|
85022
|
+
return { kind: "legacy", reason: "unsupported-shape", background: {} };
|
|
85023
|
+
}
|
|
85024
|
+
if (Object.keys(value).length === 0) {
|
|
85025
|
+
return { kind: "supported", override: DEFAULT_BACKGROUND_OVERRIDE };
|
|
85026
|
+
}
|
|
85027
|
+
const type = typeof value.type === "string" ? value.type.trim() : null;
|
|
85028
|
+
switch (type) {
|
|
85029
|
+
case null:
|
|
85030
|
+
return { kind: "legacy", reason: "unsupported-mode", background: value };
|
|
85031
|
+
case "color": {
|
|
85032
|
+
const token = parseThemeColorToken(value.color);
|
|
85033
|
+
if (!token) {
|
|
85034
|
+
return { kind: "legacy", reason: "invalid-color-token", background: value };
|
|
85035
|
+
}
|
|
85036
|
+
return { kind: "supported", override: { kind: "color", token } };
|
|
85037
|
+
}
|
|
85038
|
+
case "gradient": {
|
|
85039
|
+
if (typeof value.gradient === "string" && value.gradient.trim()) {
|
|
85040
|
+
return { kind: "legacy", reason: "arbitrary-gradient-css", background: value };
|
|
85041
|
+
}
|
|
85042
|
+
if (value.gradientPresetId === void 0 || value.gradientPresetId === null) {
|
|
85043
|
+
return { kind: "legacy", reason: "missing-gradient-preset-id", background: value };
|
|
85044
|
+
}
|
|
85045
|
+
const gradientId = parseGradientPresetId(value.gradientPresetId);
|
|
85046
|
+
if (!gradientId) {
|
|
85047
|
+
return { kind: "legacy", reason: "invalid-gradient-preset-id", background: value };
|
|
85048
|
+
}
|
|
85049
|
+
return { kind: "supported", override: { kind: "gradient", gradientId } };
|
|
85050
|
+
}
|
|
85051
|
+
case "image": {
|
|
85052
|
+
const mediaIdResult = parseImageMediaAssetId(value.image);
|
|
85053
|
+
if (mediaIdResult.kind === "missing") {
|
|
85054
|
+
return { kind: "legacy", reason: "missing-image-media-id", background: value };
|
|
85055
|
+
}
|
|
85056
|
+
if (mediaIdResult.kind === "invalid") {
|
|
85057
|
+
return { kind: "legacy", reason: "invalid-image-media-id", background: value };
|
|
85058
|
+
}
|
|
85059
|
+
return {
|
|
85060
|
+
kind: "supported",
|
|
85061
|
+
override: { kind: "image", mediaId: mediaIdResult.mediaId }
|
|
85062
|
+
};
|
|
85063
|
+
}
|
|
85064
|
+
case "video":
|
|
85065
|
+
return { kind: "legacy", reason: "video-background", background: value };
|
|
85066
|
+
default:
|
|
85067
|
+
return { kind: "legacy", reason: "unsupported-mode", background: value };
|
|
85068
|
+
}
|
|
85069
|
+
}
|
|
85070
|
+
function serializeBackgroundOverride(override) {
|
|
85071
|
+
switch (override.kind) {
|
|
85072
|
+
case "default":
|
|
85073
|
+
return null;
|
|
85074
|
+
case "color":
|
|
85075
|
+
return {
|
|
85076
|
+
type: "color",
|
|
85077
|
+
color: override.token
|
|
85078
|
+
};
|
|
85079
|
+
case "gradient":
|
|
85080
|
+
return {
|
|
85081
|
+
type: "gradient",
|
|
85082
|
+
gradientPresetId: override.gradientId
|
|
85083
|
+
};
|
|
85084
|
+
case "image":
|
|
85085
|
+
return {
|
|
85086
|
+
type: "image",
|
|
85087
|
+
image: {
|
|
85088
|
+
type: "image",
|
|
85089
|
+
assetId: override.mediaId
|
|
85090
|
+
}
|
|
85091
|
+
};
|
|
85092
|
+
}
|
|
85093
|
+
}
|
|
85094
|
+
function applyBackgroundOverrideContentPatch(content, override) {
|
|
85095
|
+
const sectionStyles = isRecord7(content._sectionStyles) ? content._sectionStyles : {};
|
|
85096
|
+
const serialized = serializeBackgroundOverride(override);
|
|
85097
|
+
if (serialized === null) {
|
|
85098
|
+
const nextSectionStyles = omitRecordKey2(sectionStyles, "background");
|
|
85099
|
+
return withSectionStyles(content, nextSectionStyles);
|
|
85100
|
+
}
|
|
85101
|
+
return withSectionStyles(content, {
|
|
85102
|
+
...sectionStyles,
|
|
85103
|
+
background: serialized
|
|
85104
|
+
});
|
|
85105
|
+
}
|
|
85106
|
+
function planBackgroundTransition(current, capability, action) {
|
|
85107
|
+
switch (action.kind) {
|
|
85108
|
+
case "clear-default":
|
|
85109
|
+
return applyPlan(DEFAULT_BACKGROUND_OVERRIDE);
|
|
85110
|
+
case "choose-color":
|
|
85111
|
+
return valueAllowed(action.token, capability.colorTokens) ? applyPlan({ kind: "color", token: action.token }) : { kind: "blocked", reason: "value-unavailable" };
|
|
85112
|
+
case "choose-gradient":
|
|
85113
|
+
return valueAllowed(action.gradientId, capability.gradientIds) ? applyPlan({ kind: "gradient", gradientId: action.gradientId }) : { kind: "blocked", reason: "value-unavailable" };
|
|
85114
|
+
case "choose-image":
|
|
85115
|
+
return imageAllowed(action.mediaId, capability.imagePool) ? applyPlan({ kind: "image", mediaId: action.mediaId }) : { kind: "blocked", reason: "value-unavailable" };
|
|
85116
|
+
case "cycle-mode": {
|
|
85117
|
+
const nextMode = cycleInList(
|
|
85118
|
+
enabledBackgroundModes(capability),
|
|
85119
|
+
current.kind,
|
|
85120
|
+
action.direction
|
|
85121
|
+
);
|
|
85122
|
+
if (!nextMode) return { kind: "blocked", reason: "mode-unavailable" };
|
|
85123
|
+
return planApplyMode(current, capability, nextMode);
|
|
85124
|
+
}
|
|
85125
|
+
case "cycle-value":
|
|
85126
|
+
return planCycleValue(current, capability, action.direction);
|
|
85127
|
+
}
|
|
85128
|
+
}
|
|
85129
|
+
function planBackgroundOverride(current, capability, override) {
|
|
85130
|
+
if (current.kind !== "supported") {
|
|
85131
|
+
return { kind: "blocked", reason: "legacy-current-background" };
|
|
85132
|
+
}
|
|
85133
|
+
const mode = backgroundModeForOverride(override);
|
|
85134
|
+
if (!enabledBackgroundModes(capability).includes(mode)) {
|
|
85135
|
+
return { kind: "blocked", reason: "mode-unavailable" };
|
|
85136
|
+
}
|
|
85137
|
+
if (!overrideValueAllowed(override, capability)) {
|
|
85138
|
+
return { kind: "blocked", reason: "value-unavailable" };
|
|
85139
|
+
}
|
|
85140
|
+
if (backgroundOverrideEquals(current.override, override)) {
|
|
85141
|
+
return { kind: "unchanged", override };
|
|
85142
|
+
}
|
|
85143
|
+
return {
|
|
85144
|
+
kind: "apply",
|
|
85145
|
+
override,
|
|
85146
|
+
fromOverride: current.override,
|
|
85147
|
+
sideEffects: backgroundPersistenceSideEffects(override)
|
|
85148
|
+
};
|
|
85149
|
+
}
|
|
85150
|
+
function rankBackgroundImagePoolItems(items) {
|
|
85151
|
+
return [...items].sort(compareBackgroundImagePoolItems);
|
|
85152
|
+
}
|
|
85153
|
+
function enabledBackgroundModes(capability) {
|
|
85154
|
+
const declaredModes = capability.modes.length > 0 ? capability.modes : ["default"];
|
|
85155
|
+
return BACKGROUND_MODES.filter((mode) => {
|
|
85156
|
+
if (!declaredModes.includes(mode)) return false;
|
|
85157
|
+
switch (mode) {
|
|
85158
|
+
case "default":
|
|
85159
|
+
return true;
|
|
85160
|
+
case "color":
|
|
85161
|
+
return (capability.colorTokens?.length ?? 0) > 0;
|
|
85162
|
+
case "gradient":
|
|
85163
|
+
return (capability.gradientIds?.length ?? 0) > 0;
|
|
85164
|
+
case "image":
|
|
85165
|
+
return (capability.imagePool?.length ?? 0) > 0;
|
|
85166
|
+
}
|
|
85167
|
+
});
|
|
85168
|
+
}
|
|
85169
|
+
function planApplyMode(current, capability, mode) {
|
|
85170
|
+
switch (mode) {
|
|
85171
|
+
case "default":
|
|
85172
|
+
return applyPlan(DEFAULT_BACKGROUND_OVERRIDE);
|
|
85173
|
+
case "color": {
|
|
85174
|
+
const token = current.kind === "color" ? current.token : capability.colorTokens?.[0];
|
|
85175
|
+
return token && valueAllowed(token, capability.colorTokens) ? applyPlan({ kind: "color", token }) : { kind: "blocked", reason: "value-unavailable" };
|
|
85176
|
+
}
|
|
85177
|
+
case "gradient": {
|
|
85178
|
+
const gradientId = current.kind === "gradient" ? current.gradientId : capability.gradientIds?.[0];
|
|
85179
|
+
return gradientId && valueAllowed(gradientId, capability.gradientIds) ? applyPlan({ kind: "gradient", gradientId }) : { kind: "blocked", reason: "value-unavailable" };
|
|
85180
|
+
}
|
|
85181
|
+
case "image": {
|
|
85182
|
+
const rankedImages = rankBackgroundImagePoolItems(capability.imagePool ?? []);
|
|
85183
|
+
const mediaId = current.kind === "image" && imageAllowed(current.mediaId, rankedImages) ? current.mediaId : rankedImages[0]?.mediaId;
|
|
85184
|
+
return mediaId ? applyPlan({ kind: "image", mediaId }) : { kind: "blocked", reason: "empty-image-pool" };
|
|
85185
|
+
}
|
|
85186
|
+
}
|
|
85187
|
+
}
|
|
85188
|
+
function planCycleValue(current, capability, direction) {
|
|
85189
|
+
switch (current.kind) {
|
|
85190
|
+
case "default":
|
|
85191
|
+
return { kind: "blocked", reason: "current-value-not-cycleable" };
|
|
85192
|
+
case "color": {
|
|
85193
|
+
const token = cycleInList(capability.colorTokens ?? [], current.token, direction);
|
|
85194
|
+
return token ? applyPlan({ kind: "color", token }) : { kind: "blocked", reason: "value-unavailable" };
|
|
85195
|
+
}
|
|
85196
|
+
case "gradient": {
|
|
85197
|
+
const gradientId = cycleInList(capability.gradientIds ?? [], current.gradientId, direction);
|
|
85198
|
+
return gradientId ? applyPlan({ kind: "gradient", gradientId }) : { kind: "blocked", reason: "value-unavailable" };
|
|
85199
|
+
}
|
|
85200
|
+
case "image": {
|
|
85201
|
+
const rankedImages = rankBackgroundImagePoolItems(capability.imagePool ?? []);
|
|
85202
|
+
const mediaId = cycleInList(
|
|
85203
|
+
rankedImages.map((item) => item.mediaId),
|
|
85204
|
+
current.mediaId,
|
|
85205
|
+
direction
|
|
85206
|
+
);
|
|
85207
|
+
return mediaId ? applyPlan({ kind: "image", mediaId }) : { kind: "blocked", reason: "value-unavailable" };
|
|
85208
|
+
}
|
|
85209
|
+
}
|
|
85210
|
+
}
|
|
85211
|
+
function applyPlan(override) {
|
|
85212
|
+
return {
|
|
85213
|
+
kind: "apply",
|
|
85214
|
+
override,
|
|
85215
|
+
sideEffects: backgroundPersistenceSideEffects(override)
|
|
85216
|
+
};
|
|
85217
|
+
}
|
|
85218
|
+
function backgroundPersistenceSideEffects(override) {
|
|
85219
|
+
return override.kind === "image" ? [{ kind: "mark-background-used", mediaId: override.mediaId }] : [];
|
|
85220
|
+
}
|
|
85221
|
+
function overrideValueAllowed(override, capability) {
|
|
85222
|
+
switch (override.kind) {
|
|
85223
|
+
case "default":
|
|
85224
|
+
return true;
|
|
85225
|
+
case "color":
|
|
85226
|
+
return valueAllowed(override.token, capability.colorTokens);
|
|
85227
|
+
case "gradient":
|
|
85228
|
+
return valueAllowed(override.gradientId, capability.gradientIds);
|
|
85229
|
+
case "image":
|
|
85230
|
+
return imageAllowed(override.mediaId, capability.imagePool);
|
|
85231
|
+
}
|
|
85232
|
+
}
|
|
85233
|
+
function blockSupportsRichBackgroundModes(block) {
|
|
85234
|
+
return valueInList(effectiveLayoutFamily(block), BACKGROUND_RICH_LAYOUT_FAMILIES) || valueInList(
|
|
85235
|
+
effectiveLook(block)?.design.sectionSurface ?? null,
|
|
85236
|
+
BACKGROUND_RICH_SECTION_SURFACES
|
|
85237
|
+
);
|
|
85238
|
+
}
|
|
85239
|
+
function effectiveLayoutFamily(block) {
|
|
85240
|
+
const effectiveLayout = block.layout?.effectiveValue;
|
|
85241
|
+
if (!effectiveLayout) return null;
|
|
85242
|
+
return block.availableLayouts.find((layout) => layout.id === effectiveLayout)?.profile.layoutFamily ?? null;
|
|
85243
|
+
}
|
|
85244
|
+
function effectiveLook(block) {
|
|
85245
|
+
const effectiveLookId = block.look.effectiveValue;
|
|
85246
|
+
if (!effectiveLookId) return null;
|
|
85247
|
+
return block.availableLooks.find((look) => look.id === effectiveLookId) ?? null;
|
|
85248
|
+
}
|
|
85249
|
+
function cycleInList(values, current, direction) {
|
|
85250
|
+
const currentIndex = values.indexOf(current);
|
|
85251
|
+
if (currentIndex === -1 || values.length <= 1) return null;
|
|
85252
|
+
const nextIndex = direction === "next" ? (currentIndex + 1) % values.length : currentIndex === 0 ? values.length - 1 : currentIndex - 1;
|
|
85253
|
+
return values[nextIndex] ?? null;
|
|
85254
|
+
}
|
|
85255
|
+
function valueAllowed(value, allowedValues) {
|
|
85256
|
+
return allowedValues?.includes(value) ?? false;
|
|
85257
|
+
}
|
|
85258
|
+
function valueInList(value, values) {
|
|
85259
|
+
return value !== null && values.includes(value);
|
|
85260
|
+
}
|
|
85261
|
+
function imageAllowed(mediaId, pool) {
|
|
85262
|
+
return pool?.some((item) => item.mediaId === mediaId) ?? false;
|
|
85263
|
+
}
|
|
85264
|
+
function parseImageMediaAssetId(value) {
|
|
85265
|
+
if (!isRecord7(value)) return { kind: "missing" };
|
|
85266
|
+
if (value.type !== void 0 && value.type !== "image") return { kind: "missing" };
|
|
85267
|
+
const parsed = parseMediaAssetId(value.assetId);
|
|
85268
|
+
if (!parsed.ok) {
|
|
85269
|
+
return value.assetId === void 0 || value.assetId === null ? { kind: "missing" } : { kind: "invalid" };
|
|
85270
|
+
}
|
|
85271
|
+
return { kind: "valid", mediaId: parsed.value };
|
|
85272
|
+
}
|
|
85273
|
+
function compareBackgroundImagePoolItems(left, right) {
|
|
85274
|
+
const sourceDifference = sourceRank(left.source) - sourceRank(right.source);
|
|
85275
|
+
if (sourceDifference !== 0) return sourceDifference;
|
|
85276
|
+
const explicitRankDifference = (left.rank ?? 0) - (right.rank ?? 0);
|
|
85277
|
+
if (explicitRankDifference !== 0) return explicitRankDifference;
|
|
85278
|
+
return itemSortLabel(left).localeCompare(itemSortLabel(right));
|
|
85279
|
+
}
|
|
85280
|
+
function sourceRank(source) {
|
|
85281
|
+
switch (source) {
|
|
85282
|
+
case "current":
|
|
85283
|
+
return 0;
|
|
85284
|
+
case "generated-ambient":
|
|
85285
|
+
return 1;
|
|
85286
|
+
case "previous-background":
|
|
85287
|
+
return 2;
|
|
85288
|
+
case "general-media":
|
|
85289
|
+
return 3;
|
|
85290
|
+
}
|
|
85291
|
+
}
|
|
85292
|
+
function itemSortLabel(item) {
|
|
85293
|
+
return `${item.label ?? ""}:${item.mediaId}`;
|
|
85294
|
+
}
|
|
85295
|
+
function uniqueStrings(values) {
|
|
85296
|
+
return Array.from(new Set(values));
|
|
85297
|
+
}
|
|
85298
|
+
function withSectionStyles(content, sectionStyles) {
|
|
85299
|
+
if (Object.keys(sectionStyles).length === 0) {
|
|
85300
|
+
return omitRecordKey2(content, "_sectionStyles");
|
|
85301
|
+
}
|
|
85302
|
+
return {
|
|
85303
|
+
...content,
|
|
85304
|
+
_sectionStyles: sectionStyles
|
|
85305
|
+
};
|
|
85306
|
+
}
|
|
85307
|
+
function omitRecordKey2(content, key) {
|
|
85308
|
+
return Object.fromEntries(
|
|
85309
|
+
Object.entries(content).filter(([entryKey]) => entryKey !== key)
|
|
85310
|
+
);
|
|
85311
|
+
}
|
|
85312
|
+
function isRecord7(value) {
|
|
85313
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
85314
|
+
}
|
|
85315
|
+
|
|
83782
85316
|
// ../path-utils/src/index.ts
|
|
83783
85317
|
var PATH_SEPARATOR_REGEX2 = /\./g;
|
|
83784
85318
|
var BRACKET_ACCESS_REGEX2 = /\[([^\]]+)\]/g;
|
|
83785
|
-
function
|
|
85319
|
+
function isRecord8(value) {
|
|
83786
85320
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
83787
85321
|
}
|
|
83788
85322
|
function isPathContainer(value) {
|
|
83789
|
-
return Array.isArray(value) ||
|
|
85323
|
+
return Array.isArray(value) || isRecord8(value);
|
|
83790
85324
|
}
|
|
83791
85325
|
function createPathContainer(nextIsIndex) {
|
|
83792
85326
|
return nextIsIndex ? [] : {};
|
|
@@ -86479,16 +88013,16 @@ function unwrapResponse(result) {
|
|
|
86479
88013
|
}
|
|
86480
88014
|
|
|
86481
88015
|
// ../api/src/utils/isRecord.ts
|
|
86482
|
-
function
|
|
88016
|
+
function isRecord9(value) {
|
|
86483
88017
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
86484
88018
|
}
|
|
86485
88019
|
|
|
86486
88020
|
// ../api/src/utils/error-propagation.ts
|
|
86487
88021
|
function extractApiErrorMessage(body) {
|
|
86488
|
-
if (!
|
|
88022
|
+
if (!isRecord9(body)) {
|
|
86489
88023
|
return null;
|
|
86490
88024
|
}
|
|
86491
|
-
if (
|
|
88025
|
+
if (isRecord9(body.error)) {
|
|
86492
88026
|
if (typeof body.error.message === "string" && body.error.message.trim().length > 0) {
|
|
86493
88027
|
return body.error.message;
|
|
86494
88028
|
}
|
|
@@ -99836,7 +101370,7 @@ function Combobox({
|
|
|
99836
101370
|
return items;
|
|
99837
101371
|
}
|
|
99838
101372
|
const needle = query.trim().toLowerCase();
|
|
99839
|
-
return items.filter((entry) => entry.label.toLowerCase().includes(needle));
|
|
101373
|
+
return items.filter((entry) => `${entry.label} ${entry.searchText ?? ""}`.toLowerCase().includes(needle));
|
|
99840
101374
|
}, [items, query, search]);
|
|
99841
101375
|
const selected = value ? items.find((entry) => entry.id === value) : void 0;
|
|
99842
101376
|
const activeItem = activeItemId ? filtered.find((entry) => entry.id === activeItemId) ?? null : null;
|
|
@@ -100529,7 +102063,7 @@ ColorPicker.displayName = "ColorPicker";
|
|
|
100529
102063
|
function isObject2(subject) {
|
|
100530
102064
|
return Object.prototype.toString.call(subject) === "[object Object]";
|
|
100531
102065
|
}
|
|
100532
|
-
function
|
|
102066
|
+
function isRecord10(subject) {
|
|
100533
102067
|
return isObject2(subject) || Array.isArray(subject);
|
|
100534
102068
|
}
|
|
100535
102069
|
function canUseDOM2() {
|
|
@@ -100546,7 +102080,7 @@ function areOptionsEqual(optionsA, optionsB) {
|
|
|
100546
102080
|
const valueA = optionsA[key];
|
|
100547
102081
|
const valueB = optionsB[key];
|
|
100548
102082
|
if (typeof valueA === "function") return `${valueA}` === `${valueB}`;
|
|
100549
|
-
if (!
|
|
102083
|
+
if (!isRecord10(valueA) || !isRecord10(valueB)) return valueA === valueB;
|
|
100550
102084
|
return areOptionsEqual(valueA, valueB);
|
|
100551
102085
|
});
|
|
100552
102086
|
}
|
|
@@ -110140,7 +111674,7 @@ function ResizableSplitPane({
|
|
|
110140
111674
|
}
|
|
110141
111675
|
|
|
110142
111676
|
// ../block-form/src/utils/typeGuards.ts
|
|
110143
|
-
function
|
|
111677
|
+
function isRecord11(value) {
|
|
110144
111678
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
110145
111679
|
}
|
|
110146
111680
|
function isObjectRecord3(value) {
|
|
@@ -110390,9 +111924,9 @@ function createStoreBackend(options) {
|
|
|
110390
111924
|
},
|
|
110391
111925
|
reset: (values) => {
|
|
110392
111926
|
if (scope === "blocks") {
|
|
110393
|
-
getBlocksSlice().updateBlockBaseline?.(getBlockId(),
|
|
111927
|
+
getBlocksSlice().updateBlockBaseline?.(getBlockId(), isRecord11(values) ? values : null);
|
|
110394
111928
|
} else {
|
|
110395
|
-
const recordValues =
|
|
111929
|
+
const recordValues = isRecord11(values) ? values : null;
|
|
110396
111930
|
getRootSlice().hydrate?.(recordValues, recordValues);
|
|
110397
111931
|
}
|
|
110398
111932
|
},
|
|
@@ -112252,7 +113786,7 @@ function useRepeaterRowErrors(field, index2, backend, basePath) {
|
|
|
112252
113786
|
const rowErrorNode = getErrorAtPath(errorsRoot, rowPath);
|
|
112253
113787
|
if (!rowErrorNode) return [];
|
|
112254
113788
|
const rowValues = backend.getValue(rowPath);
|
|
112255
|
-
const valueContext =
|
|
113789
|
+
const valueContext = isRecord11(rowValues) ? rowValues : {};
|
|
112256
113790
|
const baseSegments = rowPath.split(".").filter((s2) => s2.length > 0);
|
|
112257
113791
|
const results = [];
|
|
112258
113792
|
let fieldsToTraverse = [];
|
|
@@ -112291,7 +113825,7 @@ function useRepeaterRowErrors(field, index2, backend, basePath) {
|
|
|
112291
113825
|
const itemError = errorArray[itemIndex];
|
|
112292
113826
|
let nestedFields = [];
|
|
112293
113827
|
if (childRepeater.polymorphic && childRepeater.itemTypes) {
|
|
112294
|
-
const itemType =
|
|
113828
|
+
const itemType = isRecord11(itemValue) && typeof itemValue._type === "string" ? itemValue._type : Object.keys(childRepeater.itemTypes)[0] ?? "";
|
|
112295
113829
|
const typeSchema = itemType ? childRepeater.itemTypes[itemType] : void 0;
|
|
112296
113830
|
if (typeSchema) {
|
|
112297
113831
|
nestedFields = typeSchema.fields;
|
|
@@ -112323,13 +113857,13 @@ function getErrorAtPath(errors, path) {
|
|
|
112323
113857
|
const segments = path.split(".").filter((s2) => s2.length > 0);
|
|
112324
113858
|
let current = errors;
|
|
112325
113859
|
for (const segment of segments) {
|
|
112326
|
-
if (!
|
|
113860
|
+
if (!isRecord11(current)) return void 0;
|
|
112327
113861
|
current = current[segment];
|
|
112328
113862
|
}
|
|
112329
113863
|
return current;
|
|
112330
113864
|
}
|
|
112331
113865
|
function getChildValue(node, key) {
|
|
112332
|
-
if (
|
|
113866
|
+
if (isRecord11(node)) {
|
|
112333
113867
|
return node[key];
|
|
112334
113868
|
}
|
|
112335
113869
|
return void 0;
|
|
@@ -112344,7 +113878,7 @@ function extractMessage(error) {
|
|
|
112344
113878
|
}
|
|
112345
113879
|
return void 0;
|
|
112346
113880
|
}
|
|
112347
|
-
if (
|
|
113881
|
+
if (isRecord11(error) && typeof error.message === "string") {
|
|
112348
113882
|
return error.message;
|
|
112349
113883
|
}
|
|
112350
113884
|
return void 0;
|
|
@@ -112807,7 +114341,7 @@ var BlockApiError = class extends Error {
|
|
|
112807
114341
|
this.name = "BlockApiError";
|
|
112808
114342
|
}
|
|
112809
114343
|
};
|
|
112810
|
-
function
|
|
114344
|
+
function isRecord12(value) {
|
|
112811
114345
|
return typeof value === "object" && value !== null;
|
|
112812
114346
|
}
|
|
112813
114347
|
function isJsonResponseContentType(contentType) {
|
|
@@ -112830,10 +114364,10 @@ async function parseJsonBody(response) {
|
|
|
112830
114364
|
}
|
|
112831
114365
|
}
|
|
112832
114366
|
function getBlockApiErrorDetails(data) {
|
|
112833
|
-
if (!
|
|
114367
|
+
if (!isRecord12(data)) {
|
|
112834
114368
|
return {};
|
|
112835
114369
|
}
|
|
112836
|
-
const nestedError =
|
|
114370
|
+
const nestedError = isRecord12(data.error) ? data.error : void 0;
|
|
112837
114371
|
const message2 = typeof nestedError?.message === "string" ? nestedError.message : typeof data.message === "string" ? data.message : void 0;
|
|
112838
114372
|
const code = typeof nestedError?.code === "string" ? nestedError.code : typeof data.code === "string" ? data.code : void 0;
|
|
112839
114373
|
return { message: message2, code };
|
|
@@ -114346,7 +115880,7 @@ function clearBookingFieldError(errors, fieldId) {
|
|
|
114346
115880
|
if (!(fieldId in errors.fieldErrors)) return errors;
|
|
114347
115881
|
return {
|
|
114348
115882
|
...errors,
|
|
114349
|
-
fieldErrors:
|
|
115883
|
+
fieldErrors: omitRecordKey3(errors.fieldErrors, fieldId)
|
|
114350
115884
|
};
|
|
114351
115885
|
}
|
|
114352
115886
|
function createInitialBookingFlowReducerState(input) {
|
|
@@ -115009,7 +116543,7 @@ function isBlankFieldValue(value) {
|
|
|
115009
116543
|
if (Array.isArray(value)) return value.length === 0;
|
|
115010
116544
|
return false;
|
|
115011
116545
|
}
|
|
115012
|
-
function
|
|
116546
|
+
function omitRecordKey3(record, key) {
|
|
115013
116547
|
if (!(key in record)) return record;
|
|
115014
116548
|
const { [key]: _removed, ...rest } = record;
|
|
115015
116549
|
return rest;
|
|
@@ -117003,7 +118537,7 @@ var alignmentClasses = {
|
|
|
117003
118537
|
end: "rb-justify-end",
|
|
117004
118538
|
between: "rb-justify-between"
|
|
117005
118539
|
};
|
|
117006
|
-
function
|
|
118540
|
+
function joinClasses7(...parts) {
|
|
117007
118541
|
return parts.filter((part) => typeof part === "string" && part.length > 0).join(" ");
|
|
117008
118542
|
}
|
|
117009
118543
|
function ActionRow({
|
|
@@ -117014,7 +118548,7 @@ function ActionRow({
|
|
|
117014
118548
|
return /* @__PURE__ */ jsx(
|
|
117015
118549
|
"div",
|
|
117016
118550
|
{
|
|
117017
|
-
className:
|
|
118551
|
+
className: joinClasses7("rb-flex rb-flex-wrap rb-items-center rb-gap-2", alignmentClasses[align], className),
|
|
117018
118552
|
"data-action-row": true,
|
|
117019
118553
|
children
|
|
117020
118554
|
}
|
|
@@ -117227,7 +118761,7 @@ function TabBarFragment({
|
|
|
117227
118761
|
}
|
|
117228
118762
|
);
|
|
117229
118763
|
}
|
|
117230
|
-
function
|
|
118764
|
+
function joinClasses8(...parts) {
|
|
117231
118765
|
return parts.filter((part) => typeof part === "string" && part.length > 0).join(" ");
|
|
117232
118766
|
}
|
|
117233
118767
|
function TerminalPanel({
|
|
@@ -117258,11 +118792,11 @@ function TerminalPanel({
|
|
|
117258
118792
|
role: resolvedRole,
|
|
117259
118793
|
"aria-live": resolvedLive === "off" ? void 0 : resolvedLive,
|
|
117260
118794
|
children: [
|
|
117261
|
-
icon2 ? /* @__PURE__ */ jsx("div", { className:
|
|
117262
|
-
/* @__PURE__ */ jsx(Title2, { className:
|
|
117263
|
-
body ? /* @__PURE__ */ jsx("div", { className:
|
|
117264
|
-
actions ? /* @__PURE__ */ jsx("div", { className:
|
|
117265
|
-
secondaryBody ? /* @__PURE__ */ jsx("div", { className:
|
|
118795
|
+
icon2 ? /* @__PURE__ */ jsx("div", { className: joinClasses8(iconClassName), "data-terminal-icon": true, children: icon2 }) : null,
|
|
118796
|
+
/* @__PURE__ */ jsx(Title2, { className: joinClasses8(titleClassName), "data-terminal-title": true, children: title }),
|
|
118797
|
+
body ? /* @__PURE__ */ jsx("div", { className: joinClasses8(bodyClassName), "data-terminal-body": true, children: body }) : null,
|
|
118798
|
+
actions ? /* @__PURE__ */ jsx("div", { className: joinClasses8(actionsClassName), "data-terminal-actions": true, children: actions }) : null,
|
|
118799
|
+
secondaryBody ? /* @__PURE__ */ jsx("div", { className: joinClasses8(secondaryBodyClassName), "data-terminal-secondary-body": true, children: secondaryBody }) : null
|
|
117266
118800
|
]
|
|
117267
118801
|
}
|
|
117268
118802
|
);
|
|
@@ -122243,7 +123777,7 @@ var LEAFLET_JS_INTEGRITY = "sha256-20nQCchB9co0qIjJZRGuk2/Z9VM+kNiyxNV1lvTlZBo="
|
|
|
122243
123777
|
var leafletLoaded = false;
|
|
122244
123778
|
var leafletLoadPromise = null;
|
|
122245
123779
|
function isLeafletApi(value) {
|
|
122246
|
-
if (!
|
|
123780
|
+
if (!isRecord4(value)) return false;
|
|
122247
123781
|
return typeof value.map === "function" && typeof value.tileLayer === "function" && typeof value.marker === "function";
|
|
122248
123782
|
}
|
|
122249
123783
|
function loadLeaflet() {
|
|
@@ -128434,7 +129968,7 @@ function NewsletterFormClient({
|
|
|
128434
129968
|
var newsletter_form_client_default = NewsletterFormClient;
|
|
128435
129969
|
|
|
128436
129970
|
// ../blocks/src/system/runtime/components/registry.client.tsx
|
|
128437
|
-
function
|
|
129971
|
+
function isRecord13(value) {
|
|
128438
129972
|
return typeof value === "object" && value !== null;
|
|
128439
129973
|
}
|
|
128440
129974
|
function buildRenderFromLooseProps(runtime, mode, props2) {
|
|
@@ -128454,14 +129988,14 @@ function withRuntimeBackedEnvelope(source, runtime, render) {
|
|
|
128454
129988
|
function normalizeLegacyInteractiveRenderProps(runtime, mode, props2) {
|
|
128455
129989
|
const source = props2;
|
|
128456
129990
|
const render = props2["render"];
|
|
128457
|
-
if (!
|
|
129991
|
+
if (!isRecord13(render)) {
|
|
128458
129992
|
return withRuntimeBackedEnvelope(
|
|
128459
129993
|
source,
|
|
128460
129994
|
runtime,
|
|
128461
129995
|
buildRenderFromLooseProps(runtime, mode, props2)
|
|
128462
129996
|
);
|
|
128463
129997
|
}
|
|
128464
|
-
if (
|
|
129998
|
+
if (isRecord13(render["hydration"])) {
|
|
128465
129999
|
return withRuntimeBackedEnvelope(
|
|
128466
130000
|
source,
|
|
128467
130001
|
runtime,
|
|
@@ -128471,7 +130005,7 @@ function normalizeLegacyInteractiveRenderProps(runtime, mode, props2) {
|
|
|
128471
130005
|
}
|
|
128472
130006
|
);
|
|
128473
130007
|
}
|
|
128474
|
-
if (!
|
|
130008
|
+
if (!isRecord13(render["display"])) {
|
|
128475
130009
|
return withRuntimeBackedEnvelope(
|
|
128476
130010
|
source,
|
|
128477
130011
|
runtime,
|
|
@@ -133587,6 +135121,20 @@ z.object({
|
|
|
133587
135121
|
monthlyAmountCents: z.number().int().nonnegative(),
|
|
133588
135122
|
monthlyCurrency: z.literal("gbp")
|
|
133589
135123
|
});
|
|
135124
|
+
|
|
135125
|
+
// ../api/src/media.ts
|
|
135126
|
+
var AMBIENT_BACKGROUND_ROLES2 = [
|
|
135127
|
+
"light-texture",
|
|
135128
|
+
"proof-band-dark",
|
|
135129
|
+
"cta-wash",
|
|
135130
|
+
"footer-detail",
|
|
135131
|
+
"style-atmosphere-1",
|
|
135132
|
+
"style-atmosphere-2"
|
|
135133
|
+
];
|
|
135134
|
+
[
|
|
135135
|
+
"selected-background",
|
|
135136
|
+
...AMBIENT_BACKGROUND_ROLES2
|
|
135137
|
+
];
|
|
133590
135138
|
var portalLinkPayloadSchema = z.object({
|
|
133591
135139
|
kind: z.literal("portal"),
|
|
133592
135140
|
path: z.string().trim().startsWith("/").optional(),
|
|
@@ -134713,7 +136261,7 @@ function sanitizeMarks(marks) {
|
|
|
134713
136261
|
if (mark.type === "bold" || mark.type === "strong" || mark.type === "italic" || mark.type === "em") {
|
|
134714
136262
|
return [{ type: mark.type }];
|
|
134715
136263
|
}
|
|
134716
|
-
if (mark.type === "link" &&
|
|
136264
|
+
if (mark.type === "link" && isRecord9(mark.attrs) && typeof mark.attrs.href === "string") {
|
|
134717
136265
|
const attrs = { href: mark.attrs.href };
|
|
134718
136266
|
if (typeof mark.attrs.target === "string" && mark.attrs.target.trim().length > 0) {
|
|
134719
136267
|
attrs.target = mark.attrs.target;
|
|
@@ -134728,10 +136276,10 @@ function sanitizeMarks(marks) {
|
|
|
134728
136276
|
return sanitized.length > 0 ? sanitized : void 0;
|
|
134729
136277
|
}
|
|
134730
136278
|
function unwrapRichTextValue(value) {
|
|
134731
|
-
if (
|
|
136279
|
+
if (isRecord9(value) && isRecord9(value.doc)) {
|
|
134732
136280
|
return unwrapRichTextValue(value.doc);
|
|
134733
136281
|
}
|
|
134734
|
-
if (
|
|
136282
|
+
if (isRecord9(value) && value.type === "doc") {
|
|
134735
136283
|
return {
|
|
134736
136284
|
type: "doc",
|
|
134737
136285
|
content: Array.isArray(value.content) ? value.content.filter(isTipTapNodeLike).map(coerceTipTapNode) : []
|
|
@@ -134740,7 +136288,7 @@ function unwrapRichTextValue(value) {
|
|
|
134740
136288
|
return EMPTY_SITE_BANNER_BODY;
|
|
134741
136289
|
}
|
|
134742
136290
|
function isTipTapNodeLike(value) {
|
|
134743
|
-
return
|
|
136291
|
+
return isRecord9(value) && typeof value.type === "string";
|
|
134744
136292
|
}
|
|
134745
136293
|
function coerceTipTapNode(value) {
|
|
134746
136294
|
return {
|
|
@@ -134748,9 +136296,9 @@ function coerceTipTapNode(value) {
|
|
|
134748
136296
|
...Array.isArray(value.content) ? { content: value.content.filter(isTipTapNodeLike).map(coerceTipTapNode) } : {},
|
|
134749
136297
|
...typeof value.text === "string" ? { text: value.text } : {},
|
|
134750
136298
|
...Array.isArray(value.marks) ? {
|
|
134751
|
-
marks: value.marks.filter((mark) =>
|
|
136299
|
+
marks: value.marks.filter((mark) => isRecord9(mark) && typeof mark.type === "string").map((mark) => ({
|
|
134752
136300
|
type: mark.type,
|
|
134753
|
-
...
|
|
136301
|
+
...isRecord9(mark.attrs) ? { attrs: mark.attrs } : {}
|
|
134754
136302
|
}))
|
|
134755
136303
|
} : {}
|
|
134756
136304
|
};
|
|
@@ -134828,7 +136376,6 @@ var websiteSurfaceIds = [
|
|
|
134828
136376
|
"site.footerBlocks",
|
|
134829
136377
|
"site.navigation",
|
|
134830
136378
|
"site.media",
|
|
134831
|
-
"site.style",
|
|
134832
136379
|
"site.performance"
|
|
134833
136380
|
];
|
|
134834
136381
|
new Set(
|
|
@@ -135202,11 +136749,24 @@ var FILE_USE_TAGS = [
|
|
|
135202
136749
|
"workflow-input",
|
|
135203
136750
|
"booking-evidence",
|
|
135204
136751
|
"site-brand-asset",
|
|
136752
|
+
"site-background-asset",
|
|
135205
136753
|
"site-font-file",
|
|
135206
136754
|
"temporary-ingestion"
|
|
135207
136755
|
];
|
|
135208
136756
|
var WORKFLOW_INPUT_KINDS = ["audio-enrichment", "generic-file-processing"];
|
|
135209
136757
|
var SITE_BRAND_ASSET_USES = ["logo", "social-image"];
|
|
136758
|
+
var AMBIENT_BACKGROUND_ROLES3 = [
|
|
136759
|
+
"light-texture",
|
|
136760
|
+
"proof-band-dark",
|
|
136761
|
+
"cta-wash",
|
|
136762
|
+
"footer-detail",
|
|
136763
|
+
"style-atmosphere-1",
|
|
136764
|
+
"style-atmosphere-2"
|
|
136765
|
+
];
|
|
136766
|
+
var SITE_BACKGROUND_ASSET_USES3 = [
|
|
136767
|
+
"selected-background",
|
|
136768
|
+
...AMBIENT_BACKGROUND_ROLES3
|
|
136769
|
+
];
|
|
135210
136770
|
var TEMPORARY_INGESTION_KINDS = ["backup-zip", "newsletter-csv", "instagram-zip"];
|
|
135211
136771
|
var ACCESS_POLICY_TAGS = [
|
|
135212
136772
|
"public-read",
|
|
@@ -135222,7 +136782,7 @@ function asPositiveSeconds(value) {
|
|
|
135222
136782
|
}
|
|
135223
136783
|
return ok3(value);
|
|
135224
136784
|
}
|
|
135225
|
-
function
|
|
136785
|
+
function isRecord14(value) {
|
|
135226
136786
|
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
135227
136787
|
}
|
|
135228
136788
|
function parseFileKindJson(value) {
|
|
@@ -135305,6 +136865,11 @@ function parseFileUseJson(value) {
|
|
|
135305
136865
|
if (!brandUse.ok) return brandUse;
|
|
135306
136866
|
return ok3({ tag: "site-brand-asset", brandUse: brandUse.value });
|
|
135307
136867
|
}
|
|
136868
|
+
case "site-background-asset": {
|
|
136869
|
+
const backgroundUse = parseOneOf(record.backgroundUse, SITE_BACKGROUND_ASSET_USES3);
|
|
136870
|
+
if (!backgroundUse.ok) return backgroundUse;
|
|
136871
|
+
return ok3({ tag: "site-background-asset", backgroundUse: backgroundUse.value });
|
|
136872
|
+
}
|
|
135308
136873
|
case "site-font-file": {
|
|
135309
136874
|
const fontId = requireNonEmptyString(record.fontId);
|
|
135310
136875
|
if (!fontId.ok) return fontId;
|
|
@@ -135390,7 +136955,7 @@ function parseEntitledCustomerAccessScopeJson(value) {
|
|
|
135390
136955
|
}
|
|
135391
136956
|
}
|
|
135392
136957
|
function requireRecord(value) {
|
|
135393
|
-
if (!
|
|
136958
|
+
if (!isRecord14(value)) return err3("expected-object");
|
|
135394
136959
|
return ok3(value);
|
|
135395
136960
|
}
|
|
135396
136961
|
function requireString(value) {
|
|
@@ -136084,7 +137649,8 @@ var MediaLibrary = ({
|
|
|
136084
137649
|
uploader,
|
|
136085
137650
|
maxParallelUploads,
|
|
136086
137651
|
children,
|
|
136087
|
-
getListOptions
|
|
137652
|
+
getListOptions,
|
|
137653
|
+
onUploadComplete
|
|
136088
137654
|
}) => {
|
|
136089
137655
|
const searchState = useMediaSearch({
|
|
136090
137656
|
repo,
|
|
@@ -136097,9 +137663,10 @@ var MediaLibrary = ({
|
|
|
136097
137663
|
repo.invalidate?.();
|
|
136098
137664
|
searchState.refresh();
|
|
136099
137665
|
}, [repo, searchState.refresh]);
|
|
136100
|
-
const handleUploadComplete = useCallback(() => {
|
|
137666
|
+
const handleUploadComplete = useCallback((asset) => {
|
|
136101
137667
|
refresh();
|
|
136102
|
-
|
|
137668
|
+
onUploadComplete?.(asset);
|
|
137669
|
+
}, [onUploadComplete, refresh]);
|
|
136103
137670
|
const uploadState = uploader ? useUploads({ uploader, maxParallel: maxParallelUploads ?? 3, onComplete: handleUploadComplete }) : void 0;
|
|
136104
137671
|
const selectAsset = useCallback(
|
|
136105
137672
|
(asset) => {
|
|
@@ -136170,7 +137737,8 @@ var MediaPickerMini = ({
|
|
|
136170
137737
|
autoCloseOnPick = true,
|
|
136171
137738
|
open,
|
|
136172
137739
|
onOpenChange,
|
|
136173
|
-
getListOptions
|
|
137740
|
+
getListOptions,
|
|
137741
|
+
onUploadComplete
|
|
136174
137742
|
}) => {
|
|
136175
137743
|
const [internalOpen, setInternalOpen] = useState(false);
|
|
136176
137744
|
const isControlled = open !== void 0;
|
|
@@ -136188,6 +137756,7 @@ var MediaPickerMini = ({
|
|
|
136188
137756
|
allowMultiSelect: false,
|
|
136189
137757
|
uploader,
|
|
136190
137758
|
getListOptions,
|
|
137759
|
+
onUploadComplete,
|
|
136191
137760
|
children: (state) => {
|
|
136192
137761
|
const selectAsset = (asset) => {
|
|
136193
137762
|
state.selectAsset(asset);
|
|
@@ -142851,6 +144420,7 @@ var MediaEditor = ({
|
|
|
142851
144420
|
showRemoveAction = true,
|
|
142852
144421
|
previewMaxWidth = "md",
|
|
142853
144422
|
preventPreviewUpscale = false,
|
|
144423
|
+
onUploadComplete,
|
|
142854
144424
|
uploadIntent,
|
|
142855
144425
|
videoPrepIntent,
|
|
142856
144426
|
videoSelectionIntent
|
|
@@ -143073,6 +144643,7 @@ var MediaEditor = ({
|
|
|
143073
144643
|
onPick: handleSelect,
|
|
143074
144644
|
pageSize: MEDIA_PICKER_PAGE_SIZE,
|
|
143075
144645
|
uploader,
|
|
144646
|
+
onUploadComplete,
|
|
143076
144647
|
getListOptions: listOptions,
|
|
143077
144648
|
open: pickerOpen,
|
|
143078
144649
|
onOpenChange: (open) => {
|
|
@@ -143167,10 +144738,27 @@ var DEFAULT_MESSAGES = {
|
|
|
143167
144738
|
update: "Failed to update media asset",
|
|
143168
144739
|
delete: "Failed to delete media asset"
|
|
143169
144740
|
};
|
|
143170
|
-
function
|
|
144741
|
+
function isRecord15(value) {
|
|
143171
144742
|
return typeof value === "object" && value !== null;
|
|
143172
144743
|
}
|
|
143173
144744
|
var normalizeLabels = (labels) => labels && labels.length ? labels.map((label) => label.trim()).filter(Boolean).join(",") : void 0;
|
|
144745
|
+
var fileFilterForMediaKinds = (mediaKinds) => {
|
|
144746
|
+
if (!mediaKinds || mediaKinds.length !== 1) return void 0;
|
|
144747
|
+
const [mediaKind] = mediaKinds;
|
|
144748
|
+
if (mediaKind === void 0) return void 0;
|
|
144749
|
+
switch (mediaKind) {
|
|
144750
|
+
case "image":
|
|
144751
|
+
return "images";
|
|
144752
|
+
case "video":
|
|
144753
|
+
return "videos";
|
|
144754
|
+
case "audio":
|
|
144755
|
+
return "audio";
|
|
144756
|
+
case "document":
|
|
144757
|
+
case "spreadsheet":
|
|
144758
|
+
case "archive":
|
|
144759
|
+
return "documents";
|
|
144760
|
+
}
|
|
144761
|
+
};
|
|
143174
144762
|
var filterUpdatePayload = (input) => {
|
|
143175
144763
|
const payload = {};
|
|
143176
144764
|
if (input.filename !== void 0) payload.filename = input.filename;
|
|
@@ -143188,7 +144776,7 @@ var filterUpdatePayload = (input) => {
|
|
|
143188
144776
|
return payload;
|
|
143189
144777
|
};
|
|
143190
144778
|
var extractErrorMessage = (body) => {
|
|
143191
|
-
if (!
|
|
144779
|
+
if (!isRecord15(body)) {
|
|
143192
144780
|
return typeof body === "string" && body.trim().length > 0 ? body : null;
|
|
143193
144781
|
}
|
|
143194
144782
|
const directKeys = ["error", "message", "detail", "reason"];
|
|
@@ -143204,7 +144792,7 @@ var extractErrorMessage = (body) => {
|
|
|
143204
144792
|
if (typeof entry === "string" && entry.trim().length > 0) {
|
|
143205
144793
|
return entry;
|
|
143206
144794
|
}
|
|
143207
|
-
if (
|
|
144795
|
+
if (isRecord15(entry) && typeof entry.message === "string" && entry.message.trim().length > 0) {
|
|
143208
144796
|
return entry.message;
|
|
143209
144797
|
}
|
|
143210
144798
|
}
|
|
@@ -143212,7 +144800,7 @@ var extractErrorMessage = (body) => {
|
|
|
143212
144800
|
const errors = body.errors;
|
|
143213
144801
|
if (Array.isArray(errors)) {
|
|
143214
144802
|
for (const entry of errors) {
|
|
143215
|
-
if (
|
|
144803
|
+
if (isRecord15(entry) && typeof entry.message === "string" && entry.message.trim().length > 0) {
|
|
143216
144804
|
return entry.message;
|
|
143217
144805
|
}
|
|
143218
144806
|
}
|
|
@@ -143266,7 +144854,7 @@ var createApiMediaRepo = ({ client }) => ({
|
|
|
143266
144854
|
limit: options.limit === void 0 ? void 0 : String(options.limit),
|
|
143267
144855
|
offset: options.offset === void 0 ? void 0 : String(options.offset),
|
|
143268
144856
|
labels: normalizeLabels(options.labels),
|
|
143269
|
-
fileFilter: options.fileFilter
|
|
144857
|
+
fileFilter: options.fileFilter ?? fileFilterForMediaKinds(options.mediaKinds)
|
|
143270
144858
|
}
|
|
143271
144859
|
},
|
|
143272
144860
|
(error) => toMediaStorageError(error, DEFAULT_MESSAGES.list)
|
|
@@ -145673,7 +147261,7 @@ function sanitizeSlugInput(value, maxLength) {
|
|
|
145673
147261
|
}
|
|
145674
147262
|
|
|
145675
147263
|
// ../block-form/src/widgets/SlugField/utils/slugUtils.ts
|
|
145676
|
-
function
|
|
147264
|
+
function isRecord16(value) {
|
|
145677
147265
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
145678
147266
|
}
|
|
145679
147267
|
function isUnknownArray6(value) {
|
|
@@ -145689,7 +147277,7 @@ function ensureUniqueSlug(candidate, backend, collectionPath, currentIndex, fiel
|
|
|
145689
147277
|
for (let i2 = 0; i2 < items.length; i2 += 1) {
|
|
145690
147278
|
if (i2 === currentIndex) continue;
|
|
145691
147279
|
const item = items[i2];
|
|
145692
|
-
if (
|
|
147280
|
+
if (isRecord16(item)) {
|
|
145693
147281
|
const value = item[fieldId];
|
|
145694
147282
|
if (typeof value === "string") {
|
|
145695
147283
|
const normalized = normalize2(value.trim());
|
|
@@ -168511,7 +170099,7 @@ function normaliseDoc(doc3) {
|
|
|
168511
170099
|
}
|
|
168512
170100
|
return EMPTY_DOC;
|
|
168513
170101
|
}
|
|
168514
|
-
function
|
|
170102
|
+
function isRecord17(value) {
|
|
168515
170103
|
return typeof value === "object" && value !== null;
|
|
168516
170104
|
}
|
|
168517
170105
|
function getFromMapLike(mapLike, name) {
|
|
@@ -168536,7 +170124,7 @@ function parentInlineContent(parentType) {
|
|
|
168536
170124
|
return Boolean(p2?.inlineContent);
|
|
168537
170125
|
}
|
|
168538
170126
|
function extractText(nodeJson) {
|
|
168539
|
-
if (!
|
|
170127
|
+
if (!isRecord17(nodeJson)) return "";
|
|
168540
170128
|
if (nodeJson.type === "text" && typeof nodeJson.text === "string") {
|
|
168541
170129
|
return nodeJson.text;
|
|
168542
170130
|
}
|
|
@@ -168547,13 +170135,13 @@ function sanitizeMarksJson(schema, marks, unsupported) {
|
|
|
168547
170135
|
if (!Array.isArray(marks)) return void 0;
|
|
168548
170136
|
const out = [];
|
|
168549
170137
|
for (const markJson of marks) {
|
|
168550
|
-
if (!
|
|
170138
|
+
if (!isRecord17(markJson) || typeof markJson.type !== "string") continue;
|
|
168551
170139
|
if (!schemaHasMark(schema, markJson.type)) {
|
|
168552
170140
|
unsupported.marks.add(markJson.type);
|
|
168553
170141
|
continue;
|
|
168554
170142
|
}
|
|
168555
170143
|
const next = { type: markJson.type };
|
|
168556
|
-
if (
|
|
170144
|
+
if (isRecord17(markJson.attrs)) next.attrs = markJson.attrs;
|
|
168557
170145
|
out.push(next);
|
|
168558
170146
|
}
|
|
168559
170147
|
return out.length > 0 ? out : void 0;
|
|
@@ -168562,7 +170150,7 @@ function coerceChildrenForParentJson(schema, parentType, children) {
|
|
|
168562
170150
|
if (parentInlineContent(parentType)) {
|
|
168563
170151
|
const inlines = [];
|
|
168564
170152
|
for (const child of children) {
|
|
168565
|
-
if (
|
|
170153
|
+
if (isRecord17(child) && typeof child.type === "string" && nodeTypeIsInline(schema, child.type)) {
|
|
168566
170154
|
inlines.push(child);
|
|
168567
170155
|
continue;
|
|
168568
170156
|
}
|
|
@@ -168585,7 +170173,7 @@ function coerceChildrenForParentJson(schema, parentType, children) {
|
|
|
168585
170173
|
inlineBuffer = [];
|
|
168586
170174
|
};
|
|
168587
170175
|
for (const child of children) {
|
|
168588
|
-
if (
|
|
170176
|
+
if (isRecord17(child) && typeof child.type === "string" && nodeTypeIsInline(schema, child.type)) {
|
|
168589
170177
|
inlineBuffer.push(child);
|
|
168590
170178
|
continue;
|
|
168591
170179
|
}
|
|
@@ -168596,7 +170184,7 @@ function coerceChildrenForParentJson(schema, parentType, children) {
|
|
|
168596
170184
|
return blocks;
|
|
168597
170185
|
}
|
|
168598
170186
|
function sanitizeNodeJson(schema, nodeJson, parentType, unsupported) {
|
|
168599
|
-
if (!
|
|
170187
|
+
if (!isRecord17(nodeJson) || typeof nodeJson.type !== "string") return [];
|
|
168600
170188
|
const type = nodeJson.type;
|
|
168601
170189
|
if (type === "text") {
|
|
168602
170190
|
const text2 = typeof nodeJson.text === "string" ? nodeJson.text : "";
|
|
@@ -168617,7 +170205,7 @@ function sanitizeNodeJson(schema, nodeJson, parentType, unsupported) {
|
|
|
168617
170205
|
const coercedChildren = coerceChildrenForParentJson(schema, nodeType, sanitizedChildren);
|
|
168618
170206
|
const marks = sanitizeMarksJson(schema, nodeJson.marks, unsupported);
|
|
168619
170207
|
const next = { type };
|
|
168620
|
-
if (
|
|
170208
|
+
if (isRecord17(nodeJson.attrs)) next.attrs = nodeJson.attrs;
|
|
168621
170209
|
if (marks) next.marks = marks;
|
|
168622
170210
|
if (hasRawChildren || coercedChildren.length > 0) next.content = coercedChildren;
|
|
168623
170211
|
return [next];
|
|
@@ -168637,7 +170225,7 @@ function sanitizeRichTextContentForSchema(schema, content) {
|
|
|
168637
170225
|
const coerced = coerceChildrenForParentJson(schema, topType, children);
|
|
168638
170226
|
const out = { type: "doc", content: coerced };
|
|
168639
170227
|
const maybeAttrs = docJson.attrs;
|
|
168640
|
-
if (
|
|
170228
|
+
if (isRecord17(maybeAttrs)) {
|
|
168641
170229
|
out.attrs = maybeAttrs;
|
|
168642
170230
|
}
|
|
168643
170231
|
return {
|
|
@@ -170836,4 +172424,4 @@ lucide-react/dist/esm/lucide-react.js:
|
|
|
170836
172424
|
*)
|
|
170837
172425
|
*/
|
|
170838
172426
|
|
|
170839
|
-
export { ArrowDown, ArrowUp, BackgroundColorField, BackgroundGradientField, Badge2 as Badge, BlockApiProvider, Box, Button, CSS2 as CSS,
|
|
172427
|
+
export { AMBIENT_BACKGROUND_ROLES2 as AMBIENT_BACKGROUND_ROLES, ArrowDown, ArrowUp, BackgroundColorField, BackgroundGradientField, Badge2 as Badge, BlockApiProvider, Box, Button, CSS2 as CSS, Callout, CalloutDescription, CalloutTitle, Card, CardContent, CardHeader, CardTitle, Check, ChevronDown, ChevronLeft, ChevronRight, Collapsible2 as Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleTrigger2 as CollapsibleTrigger, ColorPicker, Combobox, Content, ContentFieldsForm, Copy, DEFAULT_LAUNCH_READINESS_INPUT, Dialog2 as Dialog, DialogClose2 as DialogClose, DialogContent2 as DialogContent, DialogDescription2 as DialogDescription, DialogFooter, DialogHeader, DialogTitle2 as DialogTitle, DndContext, DropdownMenu2 as DropdownMenu, DropdownMenuContent2 as DropdownMenuContent, DropdownMenuItem2 as DropdownMenuItem, DropdownMenuLabel2 as DropdownMenuLabel, DropdownMenuSeparator2 as DropdownMenuSeparator, DropdownMenuTrigger2 as DropdownMenuTrigger, EDITABLE_SURFACE_FORWARDING_PROP, EMPTY_DOC, EditableBlockProvider, EditorChrome, EditorProvider, EllipsisVertical, EmptyState2 as EmptyState, EntryControllerProvider, FieldFrame, FixedBottomSurface, FormRenderer, GRADIENT_PRESETS, GripVertical, Image, ImagePlus, Input, KeyboardCode, Label4 as Label, List2 as List, LoaderCircle, ManifestForm, Maximize2, MediaEditor, MediaEditorProvider, MediaPickerDialog, MediaPickerMini, Monitor, PAGE_DESIGN_EDITOR_STATE_FETCH_ERROR_MESSAGE, PUBLIC_FILE_FIELD_KINDS, PageRenderer, Palette, PaletteProvider, Pencil, Plus, PointerSensor, PreviewRichTextEditor, PreviewTextEditor, ResizableSplitPane, RichText2 as RichText, RichTextEditorSurface, Root2, RotateCcw, SITE_CHROME_CLASS_NAMES, SITE_CHROME_VISIBLE_HEADER_SELECTOR, SUBROUTE_KINDS, ScrollableDialogContent, Search, Select2 as Select, SelectContent2 as SelectContent, SelectItem2 as SelectItem, SelectTrigger2 as SelectTrigger, SelectValue2 as SelectValue, Separator2 as Separator, Settings, SiteDocumentLayout, Smartphone, Sparkles, Surface, Tablet, Tabs2 as Tabs, TabsContent2 as TabsContent, TabsList2 as TabsList, TabsTrigger2 as TabsTrigger, Text2 as Text, Textarea, ThemeScope, Trash2, TriangleAlert, Trigger, Upload, X, applyBackgroundOverrideContentPatch, applyCompiledRuntimeFieldsToContent, applyFeatureCardIconSuggestions, applyPageDesignEditorAction, asDesignBlockId, asRecord, assertNever3 as assertNever, assertNever5 as assertNever2, augmentManifestWithStyleGroups, backgroundOverrideEquals, buildEditorModelRuntimeFieldsByBlockId, buildThemeRuntime, buttonPersonalities, canRedoHistory, canUndoHistory, classifyHistoryShortcut, classifyKnownMimeType, clientComponentRegistry, closestCenter, cn, compileSiteThemeFromSelections, createBlock, createCustomBlockRegistry, createEditorInsertBlockCommand, createEditorRemoveBlockCommand, createEditorReorderBlocksCommand, createFeatureCardIconKey, createHistoryState, createManifestFormAdapter, createManifestValidation, createRoutingHelpers, createSnapshotFromPageRecord, createStoreBackend, curatedSiteStyles, defaultBackgroundOverrideForMode, deleteBlock, deriveLaunchReadiness, deriveNearestCompatibleHeaderStyle, emitMediaCropDebug, enabledBackgroundModes, evaluateTypographyFontSlot, expectParsedBrandedId, findButtonPersonality, findFooterLook, findLegacyHeaderLookIdForSelection, findPaletteVariant, findTypographyPreset, foldSubroute, footerLookCatalog, footerLookRejectionReasonLabel, getBlockDefinition, getBlockIconSemanticFallbackId, getClientRect, getCuratedSiteStyle, getDirectImageUrlForMediaAsset, getFeatureCardIconCompletion, getFieldIntent, getGeneratedBlockIconStyleState, getHeaderLayout, getHeaderStyle, getIconComponent, getIconPickerOptionsForPreset, getModalConfig, getOrderedHeaderLayoutIdsForCuration, getOrderedHeaderStyleIdsForLayout, getPageDesignEditorState, getRichTextImagePositionFromTarget, getRouteMetadataManifestForType, imagePoolForOverride, insertOrReplaceRichTextImage, isHeaderField, isIconPickerPreset, isInternalResolvedLinkValue, isKeyboardEvent, isKnownIconName, isNonEmptyValue, isObjectRecord2 as isObjectRecord, isSvgMimeType, isThemeV2NormalEditorRawStyleFieldName, isThemeV2NormalEditorRawStylePath, listBlockDescriptors, listContentTypes, lucide_react_exports, mergeBlockDescriptorsWithRegistry, mergeManifestWithSdkOptions, mutateBlockContent, normalEditorCuratedPromotedFieldPaths, normalizePickerSearchThreshold, omitRouteTitleFieldFromManifest, paletteOverridesSchema, paletteVariants, parseAspectRatioValue, parseBackgroundOverrideFromContent, parseBlockIconValue, parseMediaAssetId, parseSiteIconStyleGuideVersionId, parseSiteId, planBackgroundOverride, planBackgroundTransition, planPageDesignLayoutLookCompatibility, planSiteDocument, previewAssistantEnabled, pushHistoryEntry, rankBackgroundImagePoolItems, recoveryConflictCopy, redoHistory, renderBlock, reorderBlocks, requireEntriesForCuratedChoices, resolveBackgroundCapability, resolveBlockTitle, resolveIconPickerPreset, resolveImageUrlWithContext, resolveMediaSlotContract, resolvePickerSelectionLabel, resolvePreviewSidebarTab, resolveVideoSelectionIntentForMediaField, resolveVisiblePromotedFieldPathsForEditorBlock, shouldShowPickerSearch, siteFooterManifest, siteHeaderManifest, siteStyleIdFromTheme, suggestFeatureCardSemanticIcons, suggestSemanticIconForFeatureCard, surfaceResolutionContextFromTheme, systemCustomizeFacetAppliesToLayoutVariant, systemCustomizeFacetApplyContentPatch, systemCustomizeFacetCurrentValue, systemCustomizeFacetDefinitionForBlock, systemCustomizeFacetDefinitionsForBlock, systemCustomizeFacetLabelForValue, systemCustomizeFacetNextValue, systemCustomizeFacetRollbackContentPatch, toFeatureCardIconSuggestionInputs, toRoutableLinkPayload, typographyPresets, undoHistory, unfinishedBlockCopy, unsafeAsEditorBlockId, unsafeAsEditorBlockValues, unwrapResponse, useAsyncPickerOptions, useBackendWatch, useBlockContext, useCombinedRefs, useDebouncedLatestSave, useDndContext, useDraggable, useDroppable, useEditor2 as useEditor, useEditorUiStore, useEditorUiStoreInstance, useEntryController, useEntryEditorController, useField, useIsomorphicLayoutEffect3 as useIsomorphicLayoutEffect, useMediaEditor, useMediaEditorOptional, useMultiAutosave, useOptionalEditorUiStoreInstance, useRichTextEditor, useSdkConfig, useSensor, useSensors, useUISelector, useUniqueId, validateBlockManifestIssues, visibleHeaderClearancePx, writePlanForLookCustomizationCommand };
|