@riverbankcms/sdk 0.81.0 → 0.82.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 +65 -3
- package/dist/{PreviewEditorSidebar-O4NDX5TP.css → PreviewEditorSidebar-JA4VIPSZ.css} +1 -1
- package/dist/{PreviewEditorSidebar-RDCMEXIJ.mjs → PreviewEditorSidebar-LHGK6RIO.mjs} +40 -499
- package/dist/{SdkPreviewModeRuntime-PBGALTMK.css → PreviewEditorUI-36T7QYV4.css} +1 -1
- package/dist/{PreviewEditorUI-NYGQ6K7B.mjs → PreviewEditorUI-AXZG2SDC.mjs} +4 -6
- package/dist/{PreviewEditorUI-4JVDBZBS.css → SdkPreviewModeRuntime-FXKI6XNL.css} +1 -1
- package/dist/SdkPreviewModeRuntime-RNVRHFFR.mjs +8 -0
- package/dist/_dts/ai/src/contracts/proposals.d.ts +838 -262
- package/dist/_dts/altcha/src/AltchaWidget.d.ts +1 -1
- package/dist/_dts/api/src/analytics.d.ts +1 -1
- package/dist/_dts/api/src/bookingConfig.d.ts +4 -0
- package/dist/_dts/api/src/contentRuntime.d.ts +3 -3
- package/dist/_dts/api/src/courses.d.ts +1 -1
- package/dist/_dts/api/src/event-destination-policy.d.ts +17 -0
- package/dist/_dts/api/src/index.d.ts +4 -0
- package/dist/_dts/api/src/navigation/boundaries.d.ts +64 -0
- package/dist/_dts/api/src/navigation.d.ts +2 -0
- package/dist/_dts/api/src/publicExperienceEndpoints.d.ts +6 -54
- package/dist/_dts/api/src/siteGeneration.d.ts +1 -1
- package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +7 -6
- package/dist/_dts/api/src/types.d.ts +1 -1
- package/dist/_dts/block-form/src/context/BlockContext.d.ts +1 -1
- package/dist/_dts/block-form/src/context/DisplayLabelResolverContext.d.ts +1 -1
- package/dist/_dts/block-form/src/context/FieldPreviewResolverContext.d.ts +2 -2
- package/dist/_dts/block-form/src/manifest/ManifestForm.d.ts +1 -1
- package/dist/_dts/block-form/src/palette/PaletteContext.d.ts +1 -1
- package/dist/_dts/block-form/src/sdk-config/SdkConfigContext.d.ts +1 -1
- package/dist/_dts/block-form/src/widgets/BackgroundColorWidget/BackgroundColorWidget.d.ts +2 -1
- package/dist/_dts/block-form/src/widgets/BackgroundGradientWidget/BackgroundGradientWidget.d.ts +1 -1
- package/dist/_dts/block-form/src/widgets/BooleanField/BooleanField.d.ts +1 -1
- package/dist/_dts/block-form/src/widgets/DateField/datePickerPopover.d.ts +1 -1
- package/dist/_dts/block-form/src/widgets/Field.d.ts +2 -2
- package/dist/_dts/block-form/src/widgets/FieldFrame.d.ts +3 -3
- package/dist/_dts/block-form/src/widgets/NumberField/NumberField.d.ts +1 -1
- package/dist/_dts/block-form/src/widgets/PresetOrCustomField/PresetOrCustomField.d.ts +1 -1
- package/dist/_dts/block-form/src/widgets/SdkSelectField/SdkSelectField.d.ts +1 -1
- package/dist/_dts/block-form/src/widgets/SelectField/SelectField.d.ts +1 -1
- package/dist/_dts/block-form/src/widgets/SelectWidget.d.ts +1 -1
- package/dist/_dts/block-form/src/widgets/SliderField/SliderField.d.ts +1 -1
- package/dist/_dts/block-form/src/widgets/TextField/TextField.d.ts +1 -1
- package/dist/_dts/block-form/src/widgets/TextInputWidget.d.ts +1 -1
- package/dist/_dts/block-form/src/widgets/ToggleWidget.d.ts +1 -1
- package/dist/_dts/block-form/src/widgets/stringDefaultValue.d.ts +1 -0
- package/dist/_dts/blocks/src/PageRenderer.d.ts +1 -1
- package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +8 -16
- package/dist/_dts/blocks/src/index.d.ts +2 -2
- package/dist/_dts/blocks/src/portal/types.d.ts +1 -1
- package/dist/_dts/blocks/src/primitives/content/components/Button.d.ts +7 -7
- package/dist/_dts/blocks/src/primitives/content/components/RichText.d.ts +2 -1
- package/dist/_dts/blocks/src/primitives/content/components/Text.d.ts +2 -1
- package/dist/_dts/blocks/src/primitives/content/primitives.d.ts +3 -0
- package/dist/_dts/blocks/src/primitives/layout/Grid.d.ts +2 -1
- package/dist/_dts/blocks/src/primitives/layout/Inline.d.ts +2 -1
- package/dist/_dts/blocks/src/primitives/layout/Stack.d.ts +2 -1
- package/dist/_dts/blocks/src/system/blocks/appointment-booking.d.ts +592 -592
- package/dist/_dts/blocks/src/system/blocks/blog-listing.d.ts +592 -592
- package/dist/_dts/blocks/src/system/blocks/cart.d.ts +592 -592
- package/dist/_dts/blocks/src/system/blocks/checkout.d.ts +592 -592
- package/dist/_dts/blocks/src/system/blocks/collection.d.ts +592 -592
- package/dist/_dts/blocks/src/system/blocks/courses/shared/types.d.ts +1 -1
- package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +302 -151
- package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +6 -20
- package/dist/_dts/blocks/src/system/blocks/faq.d.ts +592 -592
- package/dist/_dts/blocks/src/system/blocks/feature-card-icons.d.ts +1 -1
- package/dist/_dts/blocks/src/system/blocks/gifting.d.ts +592 -592
- package/dist/_dts/blocks/src/system/blocks/image-gallery.d.ts +3 -0
- package/dist/_dts/blocks/src/system/blocks/location-map.d.ts +3 -3
- package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +54 -54
- package/dist/_dts/blocks/src/system/blocks/offerings-preview/index.d.ts +4 -2
- package/dist/_dts/blocks/src/system/blocks/offerings-preview/model.d.ts +28 -0
- package/dist/_dts/blocks/src/system/blocks/product-detail.d.ts +592 -602
- package/dist/_dts/blocks/src/system/blocks/product-list.d.ts +592 -604
- package/dist/_dts/blocks/src/system/blocks/products/shared.d.ts +0 -4
- package/dist/_dts/blocks/src/system/blocks/shop.d.ts +592 -592
- package/dist/_dts/blocks/src/system/blocks/team-members.d.ts +2 -2
- package/dist/_dts/blocks/src/system/blocks/testimonials.d.ts +3 -0
- package/dist/_dts/blocks/src/system/customize/backgrounds.d.ts +6 -2
- package/dist/_dts/blocks/src/system/customize/facets.d.ts +2 -2
- package/dist/_dts/blocks/src/system/data/index.d.ts +2 -2
- package/dist/_dts/blocks/src/system/data/linkedContentEntries.d.ts +38 -0
- package/dist/_dts/blocks/src/system/defineBlock.d.ts +3 -1
- package/dist/_dts/blocks/src/system/manifest/schema.d.ts +71 -56
- package/dist/_dts/blocks/src/system/runtime/api/types.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +12 -24
- package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +6 -12
- package/dist/_dts/blocks/src/system/runtime/nodes/ImageResolveContext.d.ts +2 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/basic.d.ts +3 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.server.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-runtime-sources.d.ts +3 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/carousel.shared.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/cart.client.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/cart.server.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/checkout.client.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/checkout.server.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/commerce/shared/display.d.ts +1 -5
- package/dist/_dts/blocks/src/system/runtime/nodes/commerce/shared/view.d.ts +10 -13
- package/dist/_dts/blocks/src/system/runtime/nodes/course-details/view.d.ts +3 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/course-details.server.d.ts +2 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/BookingModeStep.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/CourseRegistrationWizard.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/ErrorStep.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/MembershipHero.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/PaymentFailedStep.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/PortalAuthSidebar.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/StepIndicator.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/SuccessStep.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/VerifyingTimeoutStep.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/WaitlistStep.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/components.d.ts +5 -4
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration.client.d.ts +3 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration.server.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-details/CoursePricingDisplay.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-details/view.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-details.client.d.ts +2 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-details.server.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/EventRegistrationSummaryBar.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/EventRegistrationWizard.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/EventRegistrationWizardActions.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/EventRegistrationWizardContent.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/EventSelectionStep.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/OrderSummary.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/PastOccurrenceNotice.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/SelectableOptionCard.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/StepIndicator.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationDerivations.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/types.d.ts +1 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/utils.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.interactive.d.ts +12 -5
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.server.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventListing.view.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/DateTimeTile.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/DayEventsModal.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/EventDetailModal.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/gifting.client.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/gifting.server.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/location-map.client.d.ts +2 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/location-map.server.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/location-map.shared.d.ts +4 -4
- package/dist/_dts/blocks/src/system/runtime/nodes/location-map.view.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.server.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/offerings-preview.d.ts +4 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/product-detail.client.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/product-detail.server.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/product-list.client.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/product-list.server.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/shared/MagicLinkForm.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/shop-add-feedback.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/shop-commerce.d.ts +5 -4
- package/dist/_dts/blocks/src/system/runtime/nodes/shop-commerce.server.d.ts +5 -4
- package/dist/_dts/blocks/src/system/runtime/nodes/shop.client.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/shop.interactive.d.ts +0 -17
- package/dist/_dts/blocks/src/system/runtime/nodes/shop.server.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/shop.types.d.ts +0 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/spinner.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/resolver.d.ts +6 -0
- package/dist/_dts/blocks/src/system/runtime/shared/components/ActionRow.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/shared/components/CheckIcon.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/shared/components/ClockIcon.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/shared/components/CrossIcon.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/shared/components/FeedbackMessage.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/shared/components/FieldValidationMessage.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/shared/components/MembershipHero.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/shared/components/StateIcon.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/shared/components/StepIndicator.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/shared/components/TerminalPanel.d.ts +1 -1
- package/dist/_dts/blocks/src/system/transforms/typed.d.ts +1 -1
- package/dist/_dts/content-editor/src/components/ContentFieldsForm.d.ts +1 -1
- package/dist/_dts/content-editor/src/components/EditableBlockProvider.d.ts +1 -1
- package/dist/_dts/content-editor/src/controller/EntryControllerProvider.d.ts +1 -1
- package/dist/_dts/content-editor/src/primitives/PreviewRichTextEditor.d.ts +6 -1
- package/dist/_dts/content-editor/src/primitives/PreviewTextEditor.d.ts +6 -1
- package/dist/_dts/content-editor/src/primitives/shared/activePreviewField.d.ts +2 -0
- package/dist/_dts/content-editor/src/primitives/shared/index.d.ts +1 -1
- package/dist/_dts/content-editor/src/primitives/shared/storeBinding.d.ts +3 -1
- package/dist/_dts/content-editor/src/primitives/shared/types.d.ts +5 -0
- package/dist/_dts/content-editor/src/ui/editorUiStore.d.ts +7 -2
- package/dist/_dts/content-model/src/content-types/builtin-schemas.d.ts +0 -40
- package/dist/_dts/content-model/src/content-types/builtins.d.ts +0 -40
- package/dist/_dts/content-model/src/templates/defaults.d.ts +0 -1
- package/dist/_dts/core/src/event-pricing.d.ts +72 -0
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +27 -2
- package/dist/_dts/db/src/schemas/forms.d.ts +4 -4
- package/dist/_dts/editor/src/chrome/EditorChrome.d.ts +1 -1
- package/dist/_dts/editor/src/inline/InlineTextEditor.d.ts +1 -1
- package/dist/_dts/editor/src/primitives/EditorPrimitivesProvider.d.ts +1 -1
- package/dist/_dts/editor/src/primitives/InlineFieldContext.d.ts +1 -1
- package/dist/_dts/editor/src/primitives/SaveContext.d.ts +1 -1
- package/dist/_dts/editor/src/primitives/rich-text/RichTextEditorSurface.d.ts +1 -1
- package/dist/_dts/editor/src/primitives/rich-text/RichTextToolbar.d.ts +1 -1
- package/dist/_dts/editor/src/primitives/rich-text/toolbar/BlockTypeDropdown.d.ts +1 -1
- package/dist/_dts/editor/src/primitives/rich-text/toolbar/LinkPopover.d.ts +1 -1
- package/dist/_dts/editor/src/primitives/rich-text/toolbar/ToolbarIconButton.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/BlockForm.d.ts +2 -1
- package/dist/_dts/editor-blocks/src/FormProvider.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/block-editor/AddBlockDivider.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/block-editor/BlockCard.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/block-editor/BlockCardBody.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/block-editor/BlockCardHeader.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/block-editor/BlockListContext.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/block-editor/BlockPickerDialog.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/block-editor/BlockThumbnail.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/block-editor/BlockTile.d.ts +2 -2
- package/dist/_dts/editor-blocks/src/block-editor/EmptyState.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/block-editor/EnhancedBlockPickerDialog.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/block-editor/FeatureCardIconsPanel.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/block-editor/GeneratedIconSetDialog.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/block-editor/HeaderActions.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/block-editor/SortableBlockItem.d.ts +2 -2
- package/dist/_dts/editor-blocks/src/block-editor/types.d.ts +1 -0
- package/dist/_dts/editor-blocks/src/media/MediaField.d.ts +2 -2
- package/dist/_dts/editor-blocks/src/widgets/button/ButtonField.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/widgets/button/ButtonVariantField.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/widgets/button/context.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/widgets/content-type-select/ContentTypeSelectField.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/widgets/content-type-select/ContentTypeWidgetProvider.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/widgets/entry-picker/EntryPickerField.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/widgets/entry-picker/EntryPickerWidgetProvider.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/widgets/icon-picker/IconPickerField.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/widgets/index.d.ts +1 -0
- package/dist/_dts/editor-blocks/src/widgets/link/LinkPicker.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/widgets/link/LinkPickerDialog.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/widgets/link/LinkSummary.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/widgets/link/LinkWidget.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/widgets/link/LinkWidgetContext.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/widgets/offerings-preview/OfferingsPreviewGroupOrderField.d.ts +2 -0
- package/dist/_dts/editor-blocks/src/widgets/offerings-preview/OfferingsPreviewWidgetProvider.d.ts +10 -0
- package/dist/_dts/editor-blocks/src/widgets/offerings-preview/index.d.ts +3 -0
- package/dist/_dts/editor-blocks/src/widgets/offerings-preview/orderDomain.d.ts +29 -0
- package/dist/_dts/editor-blocks/src/widgets/reference/ReferenceField.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/widgets/reference/ReferenceWidgetProvider.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/widgets/rich-text/RichTextField.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/widgets/rich-text/RichTextWidgetProvider.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/widgets/rich-text/useImagePicker.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/widgets/site-option-picker/SiteOptionPickerField.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/widgets/site-option-picker/SiteOptionWidgetProvider.d.ts +1 -1
- package/dist/_dts/media-editor/src/CropDialog.d.ts +1 -1
- package/dist/_dts/media-editor/src/CropDialogShell.d.ts +1 -1
- package/dist/_dts/media-editor/src/FileAssetPreview.d.ts +1 -1
- package/dist/_dts/media-editor/src/MediaEditor.d.ts +1 -1
- package/dist/_dts/media-editor/src/MediaPickerDialog.d.ts +1 -1
- package/dist/_dts/media-editor/src/MediaPreview.d.ts +1 -1
- package/dist/_dts/media-editor/src/context.d.ts +1 -1
- package/dist/_dts/media-editor/src/createMediaEditorProvider.d.ts +1 -1
- package/dist/_dts/media-editor/src/provider.d.ts +1 -1
- package/dist/_dts/media-react/src/components/AuthenticatedImage.d.ts +1 -1
- package/dist/_dts/media-react/src/components/MediaLibrary.d.ts +1 -1
- package/dist/_dts/media-react/src/components/MediaPickerMini.d.ts +1 -1
- package/dist/_dts/preview-next/src/client/PreviewShellSmoke.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/blocks/BlockToolbar.d.ts +5 -3
- package/dist/_dts/preview-next/src/client/blocks/BoundaryControl.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/blocks/EditablePageRenderer.d.ts +2 -2
- package/dist/_dts/preview-next/src/client/blocks/previewCustomizeControlPlan.d.ts +2 -2
- package/dist/_dts/preview-next/src/client/layout/PreviewLayoutContext.d.ts +1 -1
- package/dist/_dts/preview-next/src/client/preview/EntryEditorPanel.d.ts +2 -2
- package/dist/_dts/preview-next/src/client/preview/MaintenanceModeBadge.d.ts +1 -1
- package/dist/_dts/preview-next/src/client/preview/OnboardingThemeSwitcher.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/preview/PageBlockEditorPanel.d.ts +4 -3
- package/dist/_dts/preview-next/src/client/preview/PageDesignEditorStateContext.d.ts +2 -2
- package/dist/_dts/preview-next/src/client/preview/PreviewAuthBanner.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/preview/PreviewAuthInit.d.ts +1 -1
- package/dist/_dts/preview-next/src/client/preview/PreviewBlockCustomizeSelectionContext.d.ts +2 -2
- package/dist/_dts/preview-next/src/client/preview/PreviewChromeLayer.d.ts +3 -3
- package/dist/_dts/preview-next/src/client/preview/PreviewConfirmationDialog.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/preview/PreviewDesignCoordinatorContext.d.ts +2 -2
- package/dist/_dts/preview-next/src/client/preview/PreviewDesignHistoryOrderContext.d.ts +2 -2
- package/dist/_dts/preview-next/src/client/preview/PreviewEditorGuidanceCard.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/preview/PreviewEditorSidebar.d.ts +4 -3
- package/dist/_dts/preview-next/src/client/preview/PreviewEntryControllerProvider.d.ts +2 -2
- package/dist/_dts/preview-next/src/client/preview/PreviewOpenEditorButton.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/preview/PreviewQueryProvider.d.ts +2 -2
- package/dist/_dts/preview-next/src/client/preview/PreviewShell.d.ts +4 -3
- package/dist/_dts/preview-next/src/client/preview/PreviewShellLayout.d.ts +4 -3
- package/dist/_dts/preview-next/src/client/preview/PreviewSidebarSection.d.ts +2 -2
- package/dist/_dts/preview-next/src/client/preview/PreviewViewportControls.d.ts +1 -1
- package/dist/_dts/preview-next/src/client/preview/PreviewZoomControls.d.ts +1 -1
- package/dist/_dts/preview-next/src/client/preview/SelectedBlockCustomizePanel.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/preview/SiteChromeCustomizeButton.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/preview/SiteChromeCustomizeContext.d.ts +14 -3
- package/dist/_dts/preview-next/src/client/preview/StyleConfigurator.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/preview/SubrouteNoticePanel.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/preview/linkedEntryEditEvents.d.ts +5 -1
- package/dist/_dts/preview-next/src/client/preview/previewChromePlacement.d.ts +5 -0
- package/dist/_dts/preview-next/src/client/preview/previewCustomizeControls.d.ts +4 -4
- package/dist/_dts/preview-next/src/client/preview/siteChromeQuickControlHistoryState.d.ts +24 -5
- package/dist/_dts/preview-next/src/client/preview/siteChromeSavePlan.d.ts +3 -2
- package/dist/_dts/preview-next/src/client/preview/themeOverlay.d.ts +2 -2
- package/dist/_dts/preview-next/src/client/sdk/SdkPreviewModeRuntime.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/widgets/widgetOverrides.d.ts +5 -3
- package/dist/_dts/sdk/src/__mocks__/next-cache.d.ts +4 -3
- package/dist/_dts/sdk/src/cli/commands/pull-dry-run.d.ts +1 -1
- package/dist/_dts/sdk/src/cli/content/reader.d.ts +6 -14
- package/dist/_dts/sdk/src/cli/site-commands/commandSurfaceDispatch.d.ts +1 -1
- package/dist/_dts/sdk/src/cli/site-commands/localBlockManifestResolver.d.ts +31 -0
- package/dist/_dts/sdk/src/cli/site-commands/pageCommands.d.ts +2 -2
- package/dist/_dts/sdk/src/cli/site-commands/pushExecution.d.ts +1 -1
- package/dist/_dts/sdk/src/cli/sync/validation.d.ts +7 -7
- package/dist/_dts/sdk/src/client/types.d.ts +36 -4
- package/dist/_dts/sdk/src/client.d.ts +1 -1
- package/dist/_dts/sdk/src/config/content-types.d.ts +3 -14
- package/dist/_dts/sdk/src/config/content-validation.d.ts +9 -214
- package/dist/_dts/sdk/src/config/types.d.ts +9 -0
- package/dist/_dts/sdk/src/config/validation.d.ts +21 -21
- package/dist/_dts/sdk/src/contracts/system-block-content.d.ts +2 -2
- package/dist/_dts/sdk/src/index.d.ts +1 -1
- package/dist/_dts/sdk/src/preview-next/client/index.d.ts +6 -6
- package/dist/_dts/sdk/src/preview-next/client/runtime.d.ts +4 -3
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +29 -37
- package/dist/_dts/sdk/src/rendering/components/Block.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/components/Block.server.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/components/Layout.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/components/Page.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/components/Page.server.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/components/PageHydrationBootstrap.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/helpers/bindings.d.ts +10 -9
- package/dist/_dts/sdk/src/rendering/islands/enhancers/routeIslandApiConfig.d.ts +9 -0
- package/dist/_dts/sdk/src/rendering/islands/types.d.ts +6 -57
- package/dist/_dts/sdk/src/rendering/primitives/RichText.d.ts +2 -1
- package/dist/_dts/sdk/src/server.d.ts +1 -1
- package/dist/_dts/sdk/src/theme-bridge/ThemeBridgeProvider.d.ts +1 -1
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/site-commands/src/commands.d.ts +69 -21
- package/dist/_dts/theme-core/src/ClientThemeScope.d.ts +1 -1
- package/dist/_dts/theme-core/src/ThemeFontLoader.d.ts +3 -2
- package/dist/_dts/theme-core/src/ThemeScope.d.ts +1 -1
- package/dist/_dts/theme-core/src/ThemeScopeCore.d.ts +1 -1
- package/dist/_dts/theme-core/src/accordions/types.d.ts +5 -5
- package/dist/_dts/theme-core/src/buttons/personalities/types.d.ts +7 -7
- package/dist/_dts/theme-core/src/buttons/types.d.ts +17 -17
- package/dist/_dts/theme-core/src/cards/types.d.ts +5 -5
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/inputs/types.d.ts +2 -2
- package/dist/_dts/theme-core/src/interactive/baseSchema.d.ts +1 -1
- package/dist/_dts/theme-core/src/mock-themes/all.d.ts +201 -192
- package/dist/_dts/theme-core/src/mock-themes/components/PaletteCard.d.ts +1 -1
- package/dist/_dts/theme-core/src/mock-themes/components/swatch.d.ts +1 -1
- package/dist/_dts/theme-core/src/navigation/presets.d.ts +1 -1
- package/dist/_dts/theme-core/src/navigation/types.d.ts +1 -1
- package/dist/_dts/theme-core/src/palette/variants/types.d.ts +6 -6
- package/dist/_dts/theme-core/src/schema.d.ts +233 -223
- package/dist/_dts/theme-core/src/shared/componentStyles.d.ts +2 -2
- package/dist/_dts/theme-core/src/site-styles/backgroundAppearance.d.ts +27 -0
- package/dist/_dts/theme-core/src/site-styles/designState.d.ts +14 -14
- package/dist/_dts/theme-core/src/site-styles/generatedSchemas.d.ts +7 -7
- package/dist/_dts/theme-core/src/site-styles/index.d.ts +2 -0
- package/dist/_dts/theme-core/src/site-styles/logoBranding.d.ts +4 -4
- package/dist/_dts/theme-core/src/site-styles/rawStyleFields.d.ts +2 -0
- package/dist/_dts/theme-core/src/site-styles/siteChromeBackgrounds.d.ts +30 -0
- package/dist/_dts/theme-core/src/site-styles/styleTags.d.ts +1 -1
- package/dist/_dts/theme-core/src/site-styles/tokenRecipes.d.ts +1 -1
- package/dist/_dts/theme-core/src/site-styles/types.d.ts +2 -0
- package/dist/_dts/theme-core/src/tokens/themeColorTokens.d.ts +3 -3
- package/dist/_dts/ui/src/async-boundary.d.ts +1 -1
- package/dist/_dts/ui/src/badge.d.ts +1 -1
- package/dist/_dts/ui/src/button-group.d.ts +3 -3
- package/dist/_dts/ui/src/calendar.d.ts +2 -2
- package/dist/_dts/ui/src/card.d.ts +6 -6
- package/dist/_dts/ui/src/combobox.d.ts +1 -1
- package/dist/_dts/ui/src/command-multi-select.d.ts +1 -1
- package/dist/_dts/ui/src/content-spinner.d.ts +1 -1
- package/dist/_dts/ui/src/delayed-spinner.d.ts +1 -1
- package/dist/_dts/ui/src/dev-toolbar.d.ts +1 -1
- package/dist/_dts/ui/src/dialog.d.ts +10 -10
- package/dist/_dts/ui/src/dropdown-menu.d.ts +1 -1
- package/dist/_dts/ui/src/editor-drawer.d.ts +1 -1
- package/dist/_dts/ui/src/empty-state.d.ts +1 -1
- package/dist/_dts/ui/src/filter-button-group.d.ts +1 -1
- package/dist/_dts/ui/src/fixed-bottom-surface.d.ts +1 -1
- package/dist/_dts/ui/src/form.d.ts +7 -7
- package/dist/_dts/ui/src/label.d.ts +1 -1
- package/dist/_dts/ui/src/menubar.d.ts +16 -16
- package/dist/_dts/ui/src/navigation-tabs.d.ts +2 -2
- package/dist/_dts/ui/src/number-input.d.ts +1 -1
- package/dist/_dts/ui/src/palette/ColorChooserDialog.d.ts +1 -1
- package/dist/_dts/ui/src/palette/ColorSlotButton.d.ts +1 -1
- package/dist/_dts/ui/src/palette/ColorSwatchButton.d.ts +1 -1
- package/dist/_dts/ui/src/palette/PaletteTokenEditor.d.ts +1 -1
- package/dist/_dts/ui/src/resizable-split-pane.d.ts +1 -1
- package/dist/_dts/ui/src/select.d.ts +10 -10
- package/dist/_dts/ui/src/separator.d.ts +1 -1
- package/dist/_dts/ui/src/sheet.d.ts +9 -9
- package/dist/_dts/ui/src/spinner.d.ts +1 -1
- package/dist/_dts/ui/src/tooltip.d.ts +4 -4
- package/dist/{chunk-4T5JIPWY.mjs → chunk-2BUMISSH.mjs} +1 -1
- package/dist/{chunk-3PTVPAT4.mjs → chunk-6FWNF3DJ.mjs} +237 -43
- package/dist/{chunk-E3NZYEKF.mjs → chunk-FIREV57T.mjs} +13 -2
- package/dist/{chunk-3QWQ2MUQ.mjs → chunk-G35HOQEN.mjs} +2997 -2255
- package/dist/{chunk-3VT7LZY2.mjs → chunk-HKB6XVIP.mjs} +2 -2
- package/dist/{chunk-WUHKQBB6.mjs → chunk-XQR6THQJ.mjs} +20801 -17561
- package/dist/cli/index.mjs +3274 -2518
- package/dist/cli/init-docs/content/workflow-custom-block.md +5 -0
- package/dist/client/{accordion-SFIIZWNH.mjs → accordion-G34C45TW.mjs} +2 -2
- package/dist/client/{bookingForm-CFKZVWGA.mjs → bookingForm-BLBVKSAQ.mjs} +12 -12
- package/dist/client/bookings.mjs +40 -41
- package/dist/client/{carousel-ELXWSBLA.mjs → carousel-7ZVTBRMD.mjs} +3 -3
- package/dist/client/{cart-6SSCPYY5.mjs → cart-Q6S6LZUO.mjs} +8 -7
- package/dist/client/{checkout-UFQ34HPV.mjs → checkout-5QJLDE4I.mjs} +8 -7
- package/dist/client/{chunk-G56BSZAM.mjs → chunk-5PQH4Y75.mjs} +3 -3
- package/dist/client/{chunk-PA2LJH2M.mjs → chunk-CHAB5ACD.mjs} +5 -4
- package/dist/client/{chunk-IUEDYLFJ.mjs → chunk-CSZGLBYR.mjs} +1 -1
- package/dist/client/{chunk-3PEDD5KJ.mjs → chunk-DVNUDUVT.mjs} +1 -1
- package/dist/client/{chunk-76JUETXQ.mjs → chunk-EQKYMX4N.mjs} +215 -121
- package/dist/client/{chunk-YLMKMCSJ.mjs → chunk-GFSQNTRW.mjs} +1 -3
- package/dist/client/chunk-L4J5Y62O.mjs +18 -0
- package/dist/client/{chunk-NX6X3GRF.mjs → chunk-RJHTCTCZ.mjs} +226 -188
- package/dist/client/{chunk-7BXX7WXH.mjs → chunk-S3MKFGOG.mjs} +59 -1
- package/dist/client/{chunk-RMWMT3ZD.mjs → chunk-SBBSMFFG.mjs} +1 -1
- package/dist/client/{chunk-TCJS3NY5.mjs → chunk-U2EW7RSR.mjs} +1 -1
- package/dist/client/{chunk-NP47RHIX.mjs → chunk-WJFHDTYF.mjs} +17 -34
- package/dist/client/{chunk-V6XI4M2Q.mjs → chunk-ZF4XEWDM.mjs} +1 -1
- package/dist/client/client.mjs +61332 -60062
- package/dist/client/{courseRegistration-HJIISAAG.mjs → courseRegistration-VUG2JJDB.mjs} +13 -12
- package/dist/client/{eventCalendar-F6YVUCZR.mjs → eventCalendar-E7D2LD4N.mjs} +14 -14
- package/dist/client/{eventCombined-B5DSTIOK.mjs → eventCombined-FUZ2Z3CS.mjs} +14 -14
- package/dist/client/{eventDetails-SEJDDHQC.mjs → eventDetails-QRITJAOW.mjs} +9 -9
- package/dist/client/{eventListing-TPMWIIBO.mjs → eventListing-INMQMJZ5.mjs} +14 -14
- package/dist/client/{eventRegistration-QU6W2PV6.mjs → eventRegistration-TOOJD4WU.mjs} +17 -15
- package/dist/client/{form-LVTYNTDE.mjs → form-BOWN7ZNQ.mjs} +3 -3
- package/dist/client/{headerSection-SO3MFC4U.mjs → headerSection-HFQNZOUU.mjs} +4 -4
- package/dist/client/hooks.mjs +26534 -26159
- package/dist/client/{locationMap-5E5FLAKO.mjs → locationMap-VUZGC7Y5.mjs} +2 -2
- package/dist/client/{newsletterForm-GN32JEBQ.mjs → newsletterForm-X2XQTPCB.mjs} +3 -3
- package/dist/client/{productDetail-Q346KSVR.mjs → productDetail-TA7D2G2B.mjs} +8 -7
- package/dist/client/{productList-DTDMQYGZ.mjs → productList-AZOLOZKM.mjs} +8 -7
- package/dist/client/rendering/client.mjs +1534 -1185
- package/dist/client/rendering/islands.mjs +19 -19
- package/dist/client/rendering.mjs +10674 -9455
- package/dist/client/{shop-OFUW7KPN.mjs → shop-ZDLO7IIG.mjs} +8 -7
- package/dist/client/spam-protection.mjs +3 -5
- package/dist/preview-next/client/runtime.css +1 -1
- package/dist/preview-next/client/runtime.mjs +5 -5
- package/dist/{sdk-runtime-2GIX6I7X.mjs → sdk-runtime-CTWKNBDQ.mjs} +6 -6
- package/dist/{sdk-runtime-EEMNSB7J.css → sdk-runtime-JD4A6SU6.css} +1 -1
- package/dist/server/components.mjs +7129 -6548
- package/dist/server/config-validation.mjs +26217 -25941
- package/dist/server/config.mjs +26217 -25941
- package/dist/server/data.mjs +26514 -26139
- package/dist/server/index.mjs +108 -56
- package/dist/server/next.mjs +30233 -29506
- package/dist/server/page-converter.mjs +2325 -846
- package/dist/server/prebuild.mjs +2 -1
- package/dist/server/rendering/server.mjs +8133 -7457
- package/dist/server/rendering.mjs +12160 -11484
- package/dist/server/routing.mjs +29684 -29263
- package/dist/server/server.mjs +26525 -26099
- package/dist/server/theme-bridge.mjs +142 -79
- package/dist/server/theme.mjs +129 -130
- package/dist/styles/index.css +132 -68
- package/package.json +16 -16
- package/dist/SdkPreviewModeRuntime-AKCSCZEC.mjs +0 -8
|
@@ -936,6 +936,22 @@ var behaviourSchema = z2.object({
|
|
|
936
936
|
// Block manages its own wrapper (for sticky/fixed positioning)
|
|
937
937
|
managesOwnWrapper: z2.boolean().optional()
|
|
938
938
|
});
|
|
939
|
+
var quickFieldPrioritySchema = z2.array(z2.string().min(1)).min(1).superRefine((fieldIds, ctx) => {
|
|
940
|
+
const seenFieldIds = /* @__PURE__ */ new Set();
|
|
941
|
+
for (const [index, fieldId] of fieldIds.entries()) {
|
|
942
|
+
if (seenFieldIds.has(fieldId)) {
|
|
943
|
+
ctx.addIssue({
|
|
944
|
+
code: z2.ZodIssueCode.custom,
|
|
945
|
+
path: [index],
|
|
946
|
+
message: `Duplicate quick-field priority "${fieldId}"`
|
|
947
|
+
});
|
|
948
|
+
}
|
|
949
|
+
seenFieldIds.add(fieldId);
|
|
950
|
+
}
|
|
951
|
+
});
|
|
952
|
+
var previewCustomizeManifestCurationSchema = z2.object({
|
|
953
|
+
quickFieldPriority: quickFieldPrioritySchema
|
|
954
|
+
});
|
|
939
955
|
var blockCategoryEnum = z2.enum([
|
|
940
956
|
"marketing",
|
|
941
957
|
"content",
|
|
@@ -955,6 +971,7 @@ var manifestSchema = z2.object({
|
|
|
955
971
|
slots: slotSchema.array().default([]),
|
|
956
972
|
styleTokens: styleTokenSchema.optional(),
|
|
957
973
|
behaviours: behaviourSchema.optional(),
|
|
974
|
+
previewCustomize: previewCustomizeManifestCurationSchema.optional(),
|
|
958
975
|
layout: NodeTreeSchema.optional(),
|
|
959
976
|
/**
|
|
960
977
|
* Optional list of nested field paths that should be surfaced in the main form body
|
|
@@ -1144,6 +1161,7 @@ function defineBlockDesignCapability(capability) {
|
|
|
1144
1161
|
tileTreatments: capability.tileTreatments ?? ["default"],
|
|
1145
1162
|
eventListTreatments: capability.eventListTreatments ?? ["plain"],
|
|
1146
1163
|
eyebrowTreatments: capability.eyebrowTreatments ?? ["plain"],
|
|
1164
|
+
...capability.headingDecorations ? { headingDecorations: capability.headingDecorations } : {},
|
|
1147
1165
|
headingDecorationCapability: capability.headingDecorationCapability ?? {
|
|
1148
1166
|
kind: "unsupported"
|
|
1149
1167
|
},
|
|
@@ -2008,256 +2026,1282 @@ function assertUniqueLayoutProfileKeys(profiles) {
|
|
|
2008
2026
|
}
|
|
2009
2027
|
}
|
|
2010
2028
|
|
|
2011
|
-
// ../theme-core/src/
|
|
2012
|
-
import {
|
|
2013
|
-
|
|
2014
|
-
// ../theme-core/src/
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2029
|
+
// ../theme-core/src/mock-themes/components/swatch.tsx
|
|
2030
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2031
|
+
|
|
2032
|
+
// ../theme-core/src/mock-themes/components/PaletteCard.tsx
|
|
2033
|
+
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
2034
|
+
|
|
2035
|
+
// ../../node_modules/.pnpm/@vibrant+image@4.0.4/node_modules/@vibrant/image/dist/esm/histogram.js
|
|
2036
|
+
var Histogram = class {
|
|
2037
|
+
constructor(pixels, opts) {
|
|
2038
|
+
this.pixels = pixels;
|
|
2039
|
+
this.opts = opts;
|
|
2040
|
+
const { sigBits } = opts;
|
|
2041
|
+
const getColorIndex = (r2, g2, b2) => (r2 << 2 * sigBits) + (g2 << sigBits) + b2;
|
|
2042
|
+
this.getColorIndex = getColorIndex;
|
|
2043
|
+
const rshift = 8 - sigBits;
|
|
2044
|
+
const hn = 1 << 3 * sigBits;
|
|
2045
|
+
const hist = new Uint32Array(hn);
|
|
2046
|
+
let rmax;
|
|
2047
|
+
let rmin;
|
|
2048
|
+
let gmax;
|
|
2049
|
+
let gmin;
|
|
2050
|
+
let bmax;
|
|
2051
|
+
let bmin;
|
|
2052
|
+
let r;
|
|
2053
|
+
let g;
|
|
2054
|
+
let b;
|
|
2055
|
+
let a;
|
|
2056
|
+
rmax = gmax = bmax = 0;
|
|
2057
|
+
rmin = gmin = bmin = Number.MAX_VALUE;
|
|
2058
|
+
const n = pixels.length / 4;
|
|
2059
|
+
let i = 0;
|
|
2060
|
+
while (i < n) {
|
|
2061
|
+
const offset = i * 4;
|
|
2062
|
+
i++;
|
|
2063
|
+
r = pixels[offset + 0];
|
|
2064
|
+
g = pixels[offset + 1];
|
|
2065
|
+
b = pixels[offset + 2];
|
|
2066
|
+
a = pixels[offset + 3];
|
|
2067
|
+
if (a === 0) continue;
|
|
2068
|
+
r = r >> rshift;
|
|
2069
|
+
g = g >> rshift;
|
|
2070
|
+
b = b >> rshift;
|
|
2071
|
+
const index = getColorIndex(r, g, b);
|
|
2072
|
+
if (hist[index] === void 0) hist[index] = 0;
|
|
2073
|
+
hist[index] += 1;
|
|
2074
|
+
if (r > rmax) rmax = r;
|
|
2075
|
+
if (r < rmin) rmin = r;
|
|
2076
|
+
if (g > gmax) gmax = g;
|
|
2077
|
+
if (g < gmin) gmin = g;
|
|
2078
|
+
if (b > bmax) bmax = b;
|
|
2079
|
+
if (b < bmin) bmin = b;
|
|
2080
|
+
}
|
|
2081
|
+
this._colorCount = hist.reduce(
|
|
2082
|
+
(total, c) => c > 0 ? total + 1 : total,
|
|
2083
|
+
0
|
|
2084
|
+
);
|
|
2085
|
+
this.hist = hist;
|
|
2086
|
+
this.rmax = rmax;
|
|
2087
|
+
this.rmin = rmin;
|
|
2088
|
+
this.gmax = gmax;
|
|
2089
|
+
this.gmin = gmin;
|
|
2090
|
+
this.bmax = bmax;
|
|
2091
|
+
this.bmin = bmin;
|
|
2092
|
+
}
|
|
2093
|
+
get colorCount() {
|
|
2094
|
+
return this._colorCount;
|
|
2095
|
+
}
|
|
2038
2096
|
};
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2097
|
+
|
|
2098
|
+
// ../../node_modules/.pnpm/@vibrant+image@4.0.4/node_modules/@vibrant/image/dist/esm/index.js
|
|
2099
|
+
var ImageBase = class {
|
|
2100
|
+
scaleDown(opts) {
|
|
2101
|
+
const width = this.getWidth();
|
|
2102
|
+
const height = this.getHeight();
|
|
2103
|
+
let ratio = 1;
|
|
2104
|
+
if (opts.maxDimension > 0) {
|
|
2105
|
+
const maxSide = Math.max(width, height);
|
|
2106
|
+
if (maxSide > opts.maxDimension) ratio = opts.maxDimension / maxSide;
|
|
2107
|
+
} else {
|
|
2108
|
+
ratio = 1 / opts.quality;
|
|
2109
|
+
}
|
|
2110
|
+
if (ratio < 1) this.resize(width * ratio, height * ratio, ratio);
|
|
2049
2111
|
}
|
|
2050
2112
|
};
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2113
|
+
function applyFilters(imageData, filters) {
|
|
2114
|
+
if (filters.length > 0) {
|
|
2115
|
+
const pixels = imageData.data;
|
|
2116
|
+
const n = pixels.length / 4;
|
|
2117
|
+
let offset;
|
|
2118
|
+
let r;
|
|
2119
|
+
let g;
|
|
2120
|
+
let b;
|
|
2121
|
+
let a;
|
|
2122
|
+
for (let i = 0; i < n; i++) {
|
|
2123
|
+
offset = i * 4;
|
|
2124
|
+
r = pixels[offset + 0];
|
|
2125
|
+
g = pixels[offset + 1];
|
|
2126
|
+
b = pixels[offset + 2];
|
|
2127
|
+
a = pixels[offset + 3];
|
|
2128
|
+
for (let j = 0; j < filters.length; j++) {
|
|
2129
|
+
if (!filters[j]?.(r, g, b, a)) {
|
|
2130
|
+
pixels[offset + 3] = 0;
|
|
2131
|
+
break;
|
|
2132
|
+
}
|
|
2133
|
+
}
|
|
2134
|
+
}
|
|
2135
|
+
}
|
|
2136
|
+
return imageData;
|
|
2137
|
+
}
|
|
2138
|
+
|
|
2139
|
+
// ../../node_modules/.pnpm/@vibrant+image-browser@4.0.4/node_modules/@vibrant/image-browser/dist/esm/index.js
|
|
2140
|
+
function isRelativeUrl(url) {
|
|
2141
|
+
const u = new URL(url, location.href);
|
|
2142
|
+
return u.protocol === location.protocol && u.host === location.host && u.port === location.port;
|
|
2143
|
+
}
|
|
2144
|
+
function isSameOrigin(a, b) {
|
|
2145
|
+
const ua = new URL(a);
|
|
2146
|
+
const ub = new URL(b);
|
|
2147
|
+
return ua.protocol === ub.protocol && ua.hostname === ub.hostname && ua.port === ub.port;
|
|
2148
|
+
}
|
|
2149
|
+
var BrowserImage = class extends ImageBase {
|
|
2150
|
+
_getCanvas() {
|
|
2151
|
+
if (!this._canvas) {
|
|
2152
|
+
throw new Error("Canvas is not initialized");
|
|
2153
|
+
}
|
|
2154
|
+
return this._canvas;
|
|
2155
|
+
}
|
|
2156
|
+
_getContext() {
|
|
2157
|
+
if (!this._context) {
|
|
2158
|
+
throw new Error("Context is not initialized");
|
|
2159
|
+
}
|
|
2160
|
+
return this._context;
|
|
2161
|
+
}
|
|
2162
|
+
_getWidth() {
|
|
2163
|
+
if (!this._width) {
|
|
2164
|
+
throw new Error("Width is not initialized");
|
|
2165
|
+
}
|
|
2166
|
+
return this._width;
|
|
2167
|
+
}
|
|
2168
|
+
_getHeight() {
|
|
2169
|
+
if (!this._height) {
|
|
2170
|
+
throw new Error("Height is not initialized");
|
|
2171
|
+
}
|
|
2172
|
+
return this._height;
|
|
2173
|
+
}
|
|
2174
|
+
_initCanvas() {
|
|
2175
|
+
const img = this.image;
|
|
2176
|
+
if (!img) {
|
|
2177
|
+
throw new Error("Image is not initialized");
|
|
2178
|
+
}
|
|
2179
|
+
const canvas = this._canvas = document.createElement("canvas");
|
|
2180
|
+
const context = canvas.getContext("2d");
|
|
2181
|
+
if (!context) throw new ReferenceError("Failed to create canvas context");
|
|
2182
|
+
this._context = context;
|
|
2183
|
+
canvas.className = "@vibrant/canvas";
|
|
2184
|
+
canvas.style.display = "none";
|
|
2185
|
+
this._width = canvas.width = img.width;
|
|
2186
|
+
this._height = canvas.height = img.height;
|
|
2187
|
+
context.drawImage(img, 0, 0);
|
|
2188
|
+
document.body.appendChild(canvas);
|
|
2189
|
+
}
|
|
2190
|
+
load(image) {
|
|
2191
|
+
let img;
|
|
2192
|
+
let src;
|
|
2193
|
+
if (typeof image === "string") {
|
|
2194
|
+
img = document.createElement("img");
|
|
2195
|
+
src = image;
|
|
2196
|
+
if (!isRelativeUrl(src) && !isSameOrigin(window.location.href, src)) {
|
|
2197
|
+
img.crossOrigin = "anonymous";
|
|
2198
|
+
}
|
|
2199
|
+
img.src = src;
|
|
2200
|
+
} else if (image instanceof HTMLImageElement) {
|
|
2201
|
+
img = image;
|
|
2202
|
+
src = image.src;
|
|
2203
|
+
} else {
|
|
2204
|
+
return Promise.reject(
|
|
2205
|
+
new Error(`Cannot load buffer as an image in browser`)
|
|
2206
|
+
);
|
|
2207
|
+
}
|
|
2208
|
+
this.image = img;
|
|
2209
|
+
return new Promise((resolve, reject) => {
|
|
2210
|
+
const onImageLoad = () => {
|
|
2211
|
+
this._initCanvas();
|
|
2212
|
+
resolve(this);
|
|
2213
|
+
};
|
|
2214
|
+
if (img.complete) {
|
|
2215
|
+
onImageLoad();
|
|
2216
|
+
} else {
|
|
2217
|
+
img.onload = onImageLoad;
|
|
2218
|
+
img.onerror = (_e) => reject(new Error(`Fail to load image: ${src}`));
|
|
2219
|
+
}
|
|
2220
|
+
});
|
|
2221
|
+
}
|
|
2222
|
+
clear() {
|
|
2223
|
+
this._getContext().clearRect(0, 0, this._getWidth(), this._getHeight());
|
|
2224
|
+
}
|
|
2225
|
+
update(imageData) {
|
|
2226
|
+
this._getContext().putImageData(imageData, 0, 0);
|
|
2227
|
+
}
|
|
2228
|
+
getWidth() {
|
|
2229
|
+
return this._getWidth();
|
|
2230
|
+
}
|
|
2231
|
+
getHeight() {
|
|
2232
|
+
return this._getHeight();
|
|
2233
|
+
}
|
|
2234
|
+
resize(targetWidth, targetHeight, ratio) {
|
|
2235
|
+
if (!this.image) {
|
|
2236
|
+
throw new Error("Image is not initialized");
|
|
2237
|
+
}
|
|
2238
|
+
this._width = this._getCanvas().width = targetWidth;
|
|
2239
|
+
this._height = this._getCanvas().height = targetHeight;
|
|
2240
|
+
this._getContext().scale(ratio, ratio);
|
|
2241
|
+
this._getContext().drawImage(this.image, 0, 0);
|
|
2242
|
+
}
|
|
2243
|
+
getPixelCount() {
|
|
2244
|
+
return this._getWidth() * this._getHeight();
|
|
2245
|
+
}
|
|
2246
|
+
getImageData() {
|
|
2247
|
+
return this._getContext().getImageData(
|
|
2248
|
+
0,
|
|
2249
|
+
0,
|
|
2250
|
+
this._getWidth(),
|
|
2251
|
+
this._getHeight()
|
|
2252
|
+
);
|
|
2253
|
+
}
|
|
2254
|
+
remove() {
|
|
2255
|
+
if (this._canvas && this._canvas.parentNode) {
|
|
2256
|
+
this._canvas.parentNode.removeChild(this._canvas);
|
|
2257
|
+
}
|
|
2061
2258
|
}
|
|
2062
2259
|
};
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2260
|
+
|
|
2261
|
+
// ../../node_modules/.pnpm/@vibrant+core@4.0.4/node_modules/@vibrant/core/dist/esm/utils.js
|
|
2262
|
+
function assignDeep(target, ...sources) {
|
|
2263
|
+
sources.forEach((s) => {
|
|
2264
|
+
if (!s) return;
|
|
2265
|
+
for (const key in s) {
|
|
2266
|
+
if (s.hasOwnProperty(key)) {
|
|
2267
|
+
const v = s[key];
|
|
2268
|
+
if (Array.isArray(v)) {
|
|
2269
|
+
target[key] = v.slice(0);
|
|
2270
|
+
} else if (typeof v === "object") {
|
|
2271
|
+
if (!target[key]) target[key] = {};
|
|
2272
|
+
assignDeep(target[key], v);
|
|
2273
|
+
} else {
|
|
2274
|
+
target[key] = v;
|
|
2275
|
+
}
|
|
2276
|
+
}
|
|
2277
|
+
}
|
|
2278
|
+
});
|
|
2279
|
+
return target;
|
|
2280
|
+
}
|
|
2281
|
+
|
|
2282
|
+
// ../../node_modules/.pnpm/@vibrant+core@4.0.4/node_modules/@vibrant/core/dist/esm/options.js
|
|
2283
|
+
function buildProcessOptions(opts, override) {
|
|
2284
|
+
const { colorCount, quantizer, generators, filters } = opts;
|
|
2285
|
+
const commonQuantizerOpts = { colorCount };
|
|
2286
|
+
const q = typeof quantizer === "string" ? { name: quantizer, options: {} } : quantizer;
|
|
2287
|
+
q.options = assignDeep({}, commonQuantizerOpts, q.options);
|
|
2288
|
+
return assignDeep(
|
|
2289
|
+
{},
|
|
2290
|
+
{
|
|
2291
|
+
quantizer: q,
|
|
2292
|
+
generators,
|
|
2293
|
+
filters
|
|
2294
|
+
},
|
|
2295
|
+
override
|
|
2296
|
+
);
|
|
2297
|
+
}
|
|
2298
|
+
|
|
2299
|
+
// ../../node_modules/.pnpm/@vibrant+core@4.0.4/node_modules/@vibrant/core/dist/esm/builder.js
|
|
2300
|
+
var Builder = class {
|
|
2301
|
+
/**
|
|
2302
|
+
* Arguments are the same as `Vibrant.constructor`.
|
|
2303
|
+
*/
|
|
2304
|
+
constructor(src, opts = {}) {
|
|
2305
|
+
this._src = src;
|
|
2306
|
+
this._opts = assignDeep({}, Vibrant.DefaultOpts, opts);
|
|
2307
|
+
}
|
|
2308
|
+
/**
|
|
2309
|
+
* Sets `opts.colorCount` to `n`.
|
|
2310
|
+
* @returns this `Builder` instance.
|
|
2311
|
+
*/
|
|
2312
|
+
maxColorCount(n) {
|
|
2313
|
+
this._opts.colorCount = n;
|
|
2314
|
+
return this;
|
|
2315
|
+
}
|
|
2316
|
+
/**
|
|
2317
|
+
* Sets `opts.maxDimension` to `d`.
|
|
2318
|
+
* @returns this `Builder` instance.
|
|
2319
|
+
*/
|
|
2320
|
+
maxDimension(d) {
|
|
2321
|
+
this._opts.maxDimension = d;
|
|
2322
|
+
return this;
|
|
2323
|
+
}
|
|
2324
|
+
/**
|
|
2325
|
+
* Adds a filter function
|
|
2326
|
+
* @returns this `Builder` instance.
|
|
2327
|
+
*/
|
|
2328
|
+
addFilter(name) {
|
|
2329
|
+
if (!this._opts.filters) {
|
|
2330
|
+
this._opts.filters = [name];
|
|
2331
|
+
} else {
|
|
2332
|
+
this._opts.filters.push(name);
|
|
2333
|
+
}
|
|
2334
|
+
return this;
|
|
2335
|
+
}
|
|
2336
|
+
/**
|
|
2337
|
+
* Removes a filter function.
|
|
2338
|
+
* @returns this `Builder` instance.
|
|
2339
|
+
*/
|
|
2340
|
+
removeFilter(name) {
|
|
2341
|
+
if (this._opts.filters) {
|
|
2342
|
+
const i = this._opts.filters.indexOf(name);
|
|
2343
|
+
if (i > 0) this._opts.filters.splice(i);
|
|
2344
|
+
}
|
|
2345
|
+
return this;
|
|
2346
|
+
}
|
|
2347
|
+
/**
|
|
2348
|
+
* Clear all filters.
|
|
2349
|
+
* @returns this `Builder` instance.
|
|
2350
|
+
*/
|
|
2351
|
+
clearFilters() {
|
|
2352
|
+
this._opts.filters = [];
|
|
2353
|
+
return this;
|
|
2354
|
+
}
|
|
2355
|
+
/**
|
|
2356
|
+
* Sets `opts.quality` to `q`.
|
|
2357
|
+
* @returns this `Builder` instance.
|
|
2358
|
+
*/
|
|
2359
|
+
quality(q) {
|
|
2360
|
+
this._opts.quality = q;
|
|
2361
|
+
return this;
|
|
2362
|
+
}
|
|
2363
|
+
/**
|
|
2364
|
+
* Specifies which `Image` implementation class to use.
|
|
2365
|
+
* @returns this `Builder` instance.
|
|
2366
|
+
*/
|
|
2367
|
+
useImageClass(imageClass) {
|
|
2368
|
+
this._opts.ImageClass = imageClass;
|
|
2369
|
+
return this;
|
|
2370
|
+
}
|
|
2371
|
+
/**
|
|
2372
|
+
* Sets `opts.generator` to `generator`
|
|
2373
|
+
* @returns this `Builder` instance.
|
|
2374
|
+
*/
|
|
2375
|
+
useGenerator(generator, options) {
|
|
2376
|
+
if (!this._opts.generators) this._opts.generators = [];
|
|
2377
|
+
this._opts.generators.push(
|
|
2378
|
+
options ? { name: generator, options } : generator
|
|
2379
|
+
);
|
|
2380
|
+
return this;
|
|
2381
|
+
}
|
|
2382
|
+
/**
|
|
2383
|
+
* Specifies which `Quantizer` implementation class to use
|
|
2384
|
+
* @returns this `Builder` instance.
|
|
2385
|
+
*/
|
|
2386
|
+
useQuantizer(quantizer, options) {
|
|
2387
|
+
this._opts.quantizer = options ? { name: quantizer, options } : quantizer;
|
|
2388
|
+
return this;
|
|
2389
|
+
}
|
|
2390
|
+
/**
|
|
2391
|
+
* Builds and returns a `Vibrant` instance as configured.
|
|
2392
|
+
*/
|
|
2393
|
+
build() {
|
|
2394
|
+
return new Vibrant(this._src, this._opts);
|
|
2395
|
+
}
|
|
2396
|
+
/**
|
|
2397
|
+
* Builds a `Vibrant` instance as configured and calls its `getPalette` method.
|
|
2398
|
+
*/
|
|
2399
|
+
getPalette() {
|
|
2400
|
+
return this.build().getPalette();
|
|
2073
2401
|
}
|
|
2074
2402
|
};
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2403
|
+
|
|
2404
|
+
// ../../node_modules/.pnpm/@vibrant+core@4.0.4/node_modules/@vibrant/core/dist/esm/pipeline/index.js
|
|
2405
|
+
var Stage = class {
|
|
2406
|
+
constructor(pipeline2) {
|
|
2407
|
+
this.pipeline = pipeline2;
|
|
2408
|
+
this._map = {};
|
|
2409
|
+
}
|
|
2410
|
+
names() {
|
|
2411
|
+
return Object.keys(this._map);
|
|
2412
|
+
}
|
|
2413
|
+
has(name) {
|
|
2414
|
+
return !!this._map[name];
|
|
2415
|
+
}
|
|
2416
|
+
get(name) {
|
|
2417
|
+
return this._map[name];
|
|
2418
|
+
}
|
|
2419
|
+
register(name, stageFn) {
|
|
2420
|
+
this._map[name] = stageFn;
|
|
2421
|
+
return this.pipeline;
|
|
2085
2422
|
}
|
|
2086
2423
|
};
|
|
2087
|
-
var
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2424
|
+
var BasicPipeline = class {
|
|
2425
|
+
constructor() {
|
|
2426
|
+
this.filter = new Stage(this);
|
|
2427
|
+
this.quantizer = new Stage(this);
|
|
2428
|
+
this.generator = new Stage(this);
|
|
2429
|
+
}
|
|
2430
|
+
_buildProcessTasks({
|
|
2431
|
+
filters,
|
|
2432
|
+
quantizer,
|
|
2433
|
+
generators
|
|
2434
|
+
}) {
|
|
2435
|
+
if (generators.length === 1 && generators[0] === "*") {
|
|
2436
|
+
generators = this.generator.names();
|
|
2437
|
+
}
|
|
2438
|
+
return {
|
|
2439
|
+
filters: filters.map((f) => createTask(this.filter, f)),
|
|
2440
|
+
quantizer: createTask(this.quantizer, quantizer),
|
|
2441
|
+
generators: generators.map((g) => createTask(this.generator, g))
|
|
2442
|
+
};
|
|
2443
|
+
function createTask(stage, o) {
|
|
2444
|
+
let name;
|
|
2445
|
+
let options;
|
|
2446
|
+
if (typeof o === "string") {
|
|
2447
|
+
name = o;
|
|
2448
|
+
} else {
|
|
2449
|
+
name = o.name;
|
|
2450
|
+
options = o.options;
|
|
2451
|
+
}
|
|
2452
|
+
return {
|
|
2453
|
+
name,
|
|
2454
|
+
fn: stage.get(name),
|
|
2455
|
+
options
|
|
2456
|
+
};
|
|
2457
|
+
}
|
|
2458
|
+
}
|
|
2459
|
+
async process(imageData, opts) {
|
|
2460
|
+
const { filters, quantizer, generators } = this._buildProcessTasks(opts);
|
|
2461
|
+
const imageFilterData = await this._filterColors(filters, imageData);
|
|
2462
|
+
const colors = await this._generateColors(quantizer, imageFilterData);
|
|
2463
|
+
const palettes = await this._generatePalettes(generators, colors);
|
|
2464
|
+
return {
|
|
2465
|
+
colors,
|
|
2466
|
+
palettes
|
|
2467
|
+
};
|
|
2468
|
+
}
|
|
2469
|
+
_filterColors(filters, imageData) {
|
|
2470
|
+
return Promise.resolve(
|
|
2471
|
+
applyFilters(
|
|
2472
|
+
imageData,
|
|
2473
|
+
filters.map(({ fn }) => fn)
|
|
2474
|
+
)
|
|
2475
|
+
);
|
|
2476
|
+
}
|
|
2477
|
+
_generateColors(quantizer, imageData) {
|
|
2478
|
+
return Promise.resolve(quantizer.fn(imageData.data, quantizer.options));
|
|
2479
|
+
}
|
|
2480
|
+
async _generatePalettes(generators, colors) {
|
|
2481
|
+
const promiseArr = await Promise.all(
|
|
2482
|
+
generators.map(({ fn, options }) => Promise.resolve(fn(colors, options)))
|
|
2483
|
+
);
|
|
2484
|
+
return Promise.resolve(
|
|
2485
|
+
promiseArr.reduce(
|
|
2486
|
+
(promises, promiseVal, i) => {
|
|
2487
|
+
promises[generators[i].name] = promiseVal;
|
|
2488
|
+
return promises;
|
|
2489
|
+
},
|
|
2490
|
+
{}
|
|
2491
|
+
)
|
|
2492
|
+
);
|
|
2097
2493
|
}
|
|
2098
2494
|
};
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2495
|
+
|
|
2496
|
+
// ../../node_modules/.pnpm/@vibrant+color@4.0.4/node_modules/@vibrant/color/dist/esm/converter.js
|
|
2497
|
+
function rgbToHex(r, g, b) {
|
|
2498
|
+
return "#" + ((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1, 7);
|
|
2499
|
+
}
|
|
2500
|
+
function rgbToHsl(r, g, b) {
|
|
2501
|
+
r /= 255;
|
|
2502
|
+
g /= 255;
|
|
2503
|
+
b /= 255;
|
|
2504
|
+
const max = Math.max(r, g, b);
|
|
2505
|
+
const min = Math.min(r, g, b);
|
|
2506
|
+
let h = 0;
|
|
2507
|
+
let s = 0;
|
|
2508
|
+
const l = (max + min) / 2;
|
|
2509
|
+
if (max !== min) {
|
|
2510
|
+
const d = max - min;
|
|
2511
|
+
s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
|
|
2512
|
+
switch (max) {
|
|
2513
|
+
case r:
|
|
2514
|
+
h = (g - b) / d + (g < b ? 6 : 0);
|
|
2515
|
+
break;
|
|
2516
|
+
case g:
|
|
2517
|
+
h = (b - r) / d + 2;
|
|
2518
|
+
break;
|
|
2519
|
+
case b:
|
|
2520
|
+
h = (r - g) / d + 4;
|
|
2521
|
+
break;
|
|
2522
|
+
}
|
|
2523
|
+
h /= 6;
|
|
2524
|
+
}
|
|
2525
|
+
return [h, s, l];
|
|
2526
|
+
}
|
|
2527
|
+
function hslToRgb(h, s, l) {
|
|
2528
|
+
let r;
|
|
2529
|
+
let g;
|
|
2530
|
+
let b;
|
|
2531
|
+
function hue2rgb(p, q, t) {
|
|
2532
|
+
if (t < 0) t += 1;
|
|
2533
|
+
if (t > 1) t -= 1;
|
|
2534
|
+
if (t < 1 / 6) return p + (q - p) * 6 * t;
|
|
2535
|
+
if (t < 1 / 2) return q;
|
|
2536
|
+
if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;
|
|
2537
|
+
return p;
|
|
2538
|
+
}
|
|
2539
|
+
if (s === 0) {
|
|
2540
|
+
r = g = b = l;
|
|
2541
|
+
} else {
|
|
2542
|
+
const q = l < 0.5 ? l * (1 + s) : l + s - l * s;
|
|
2543
|
+
const p = 2 * l - q;
|
|
2544
|
+
r = hue2rgb(p, q, h + 1 / 3);
|
|
2545
|
+
g = hue2rgb(p, q, h);
|
|
2546
|
+
b = hue2rgb(p, q, h - 1 / 3);
|
|
2547
|
+
}
|
|
2548
|
+
return [r * 255, g * 255, b * 255];
|
|
2549
|
+
}
|
|
2550
|
+
|
|
2551
|
+
// ../../node_modules/.pnpm/@vibrant+color@4.0.4/node_modules/@vibrant/color/dist/esm/index.js
|
|
2552
|
+
var Swatch2 = class _Swatch {
|
|
2553
|
+
static applyFilters(colors, filters) {
|
|
2554
|
+
return filters.length > 0 ? colors.filter(({ r, g, b }) => {
|
|
2555
|
+
for (let j = 0; j < filters.length; j++) {
|
|
2556
|
+
if (!filters[j]?.(r, g, b, 255)) return false;
|
|
2557
|
+
}
|
|
2558
|
+
return true;
|
|
2559
|
+
}) : colors;
|
|
2560
|
+
}
|
|
2561
|
+
/**
|
|
2562
|
+
* Make a value copy of a swatch based on a previous one. Returns a new Swatch instance
|
|
2563
|
+
* @param {Swatch} swatch
|
|
2564
|
+
*/
|
|
2565
|
+
static clone(swatch) {
|
|
2566
|
+
return new _Swatch(swatch._rgb, swatch._population);
|
|
2567
|
+
}
|
|
2568
|
+
/**
|
|
2569
|
+
* The red value in the RGB value
|
|
2570
|
+
*/
|
|
2571
|
+
get r() {
|
|
2572
|
+
return this._rgb[0];
|
|
2573
|
+
}
|
|
2574
|
+
/**
|
|
2575
|
+
* The green value in the RGB value
|
|
2576
|
+
*/
|
|
2577
|
+
get g() {
|
|
2578
|
+
return this._rgb[1];
|
|
2579
|
+
}
|
|
2580
|
+
/**
|
|
2581
|
+
* The blue value in the RGB value
|
|
2582
|
+
*/
|
|
2583
|
+
get b() {
|
|
2584
|
+
return this._rgb[2];
|
|
2585
|
+
}
|
|
2586
|
+
/**
|
|
2587
|
+
* The color value as a rgb value
|
|
2588
|
+
*/
|
|
2589
|
+
get rgb() {
|
|
2590
|
+
return this._rgb;
|
|
2591
|
+
}
|
|
2592
|
+
/**
|
|
2593
|
+
* The color value as a hsl value
|
|
2594
|
+
*/
|
|
2595
|
+
get hsl() {
|
|
2596
|
+
if (!this._hsl) {
|
|
2597
|
+
const [r, g, b] = this._rgb;
|
|
2598
|
+
this._hsl = rgbToHsl(r, g, b);
|
|
2599
|
+
}
|
|
2600
|
+
return this._hsl;
|
|
2601
|
+
}
|
|
2602
|
+
/**
|
|
2603
|
+
* The color value as a hex string
|
|
2604
|
+
*/
|
|
2605
|
+
get hex() {
|
|
2606
|
+
if (!this._hex) {
|
|
2607
|
+
const [r, g, b] = this._rgb;
|
|
2608
|
+
this._hex = rgbToHex(r, g, b);
|
|
2609
|
+
}
|
|
2610
|
+
return this._hex;
|
|
2611
|
+
}
|
|
2612
|
+
get population() {
|
|
2613
|
+
return this._population;
|
|
2614
|
+
}
|
|
2615
|
+
/**
|
|
2616
|
+
* Get the JSON object for the swatch
|
|
2617
|
+
*/
|
|
2618
|
+
toJSON() {
|
|
2619
|
+
return {
|
|
2620
|
+
rgb: this.rgb,
|
|
2621
|
+
population: this.population
|
|
2622
|
+
};
|
|
2623
|
+
}
|
|
2624
|
+
getYiq() {
|
|
2625
|
+
if (!this._yiq) {
|
|
2626
|
+
const rgb = this._rgb;
|
|
2627
|
+
this._yiq = (rgb[0] * 299 + rgb[1] * 587 + rgb[2] * 114) / 1e3;
|
|
2628
|
+
}
|
|
2629
|
+
return this._yiq;
|
|
2630
|
+
}
|
|
2631
|
+
/**
|
|
2632
|
+
* Returns an appropriate color to use for any 'title' text which is displayed over this Swatch's color.
|
|
2633
|
+
*/
|
|
2634
|
+
get titleTextColor() {
|
|
2635
|
+
if (!this._titleTextColor) {
|
|
2636
|
+
this._titleTextColor = this.getYiq() < 200 ? "#fff" : "#000";
|
|
2637
|
+
}
|
|
2638
|
+
return this._titleTextColor;
|
|
2639
|
+
}
|
|
2640
|
+
/**
|
|
2641
|
+
* Returns an appropriate color to use for any 'body' text which is displayed over this Swatch's color.
|
|
2642
|
+
*/
|
|
2643
|
+
get bodyTextColor() {
|
|
2644
|
+
if (!this._bodyTextColor) {
|
|
2645
|
+
this._bodyTextColor = this.getYiq() < 150 ? "#fff" : "#000";
|
|
2646
|
+
}
|
|
2647
|
+
return this._bodyTextColor;
|
|
2648
|
+
}
|
|
2649
|
+
/**
|
|
2650
|
+
* Internal use.
|
|
2651
|
+
* @param rgb `[r, g, b]`
|
|
2652
|
+
* @param population Population of the color in an image
|
|
2653
|
+
*/
|
|
2654
|
+
constructor(rgb, population) {
|
|
2655
|
+
this._rgb = rgb;
|
|
2656
|
+
this._population = population;
|
|
2108
2657
|
}
|
|
2109
2658
|
};
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2659
|
+
|
|
2660
|
+
// ../../node_modules/.pnpm/@vibrant+core@4.0.4/node_modules/@vibrant/core/dist/esm/index.js
|
|
2661
|
+
var _Vibrant = class _Vibrant2 {
|
|
2662
|
+
/**
|
|
2663
|
+
*
|
|
2664
|
+
* @param _src Path to image file (supports HTTP/HTTPs)
|
|
2665
|
+
* @param opts Options (optional)
|
|
2666
|
+
*/
|
|
2667
|
+
constructor(_src, opts) {
|
|
2668
|
+
this._src = _src;
|
|
2669
|
+
this.opts = assignDeep({}, _Vibrant2.DefaultOpts, opts);
|
|
2670
|
+
}
|
|
2671
|
+
static use(pipeline2) {
|
|
2672
|
+
this._pipeline = pipeline2;
|
|
2673
|
+
}
|
|
2674
|
+
static from(src) {
|
|
2675
|
+
return new Builder(src);
|
|
2676
|
+
}
|
|
2677
|
+
get result() {
|
|
2678
|
+
return this._result;
|
|
2679
|
+
}
|
|
2680
|
+
_process(image, opts) {
|
|
2681
|
+
image.scaleDown(this.opts);
|
|
2682
|
+
const processOpts = buildProcessOptions(this.opts, opts);
|
|
2683
|
+
return _Vibrant2._pipeline.process(image.getImageData(), processOpts);
|
|
2684
|
+
}
|
|
2685
|
+
async getPalette() {
|
|
2686
|
+
const image = new this.opts.ImageClass();
|
|
2687
|
+
try {
|
|
2688
|
+
const image1 = await image.load(this._src);
|
|
2689
|
+
const result1 = await this._process(image1, {
|
|
2690
|
+
generators: ["default"]
|
|
2691
|
+
});
|
|
2692
|
+
this._result = result1;
|
|
2693
|
+
const res = result1.palettes["default"];
|
|
2694
|
+
if (!res) {
|
|
2695
|
+
throw new Error(
|
|
2696
|
+
`Something went wrong and a palette was not found, please file a bug against our GitHub repo: https://github.com/vibrant-Colors/node-vibrant/`
|
|
2697
|
+
);
|
|
2698
|
+
}
|
|
2699
|
+
image.remove();
|
|
2700
|
+
return res;
|
|
2701
|
+
} catch (err) {
|
|
2702
|
+
image.remove();
|
|
2703
|
+
return Promise.reject(err);
|
|
2704
|
+
}
|
|
2705
|
+
}
|
|
2706
|
+
async getPalettes() {
|
|
2707
|
+
const image = new this.opts.ImageClass();
|
|
2708
|
+
try {
|
|
2709
|
+
const image1 = await image.load(this._src);
|
|
2710
|
+
const result1 = await this._process(image1, {
|
|
2711
|
+
generators: ["*"]
|
|
2712
|
+
});
|
|
2713
|
+
this._result = result1;
|
|
2714
|
+
const res = result1.palettes;
|
|
2715
|
+
image.remove();
|
|
2716
|
+
return res;
|
|
2717
|
+
} catch (err) {
|
|
2718
|
+
image.remove();
|
|
2719
|
+
return Promise.reject(err);
|
|
2720
|
+
}
|
|
2119
2721
|
}
|
|
2120
2722
|
};
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2723
|
+
_Vibrant.DefaultOpts = {
|
|
2724
|
+
colorCount: 64,
|
|
2725
|
+
quality: 5,
|
|
2726
|
+
filters: []
|
|
2727
|
+
};
|
|
2728
|
+
var Vibrant = _Vibrant;
|
|
2729
|
+
|
|
2730
|
+
// ../../node_modules/.pnpm/node-vibrant@4.0.4/node_modules/node-vibrant/dist/esm/configs/config.js
|
|
2731
|
+
Vibrant.DefaultOpts.quantizer = "mmcq";
|
|
2732
|
+
Vibrant.DefaultOpts.generators = ["default"];
|
|
2733
|
+
Vibrant.DefaultOpts.filters = ["default"];
|
|
2734
|
+
|
|
2735
|
+
// ../../node_modules/.pnpm/node-vibrant@4.0.4/node_modules/node-vibrant/dist/esm/configs/browser.js
|
|
2736
|
+
Vibrant.DefaultOpts.ImageClass = BrowserImage;
|
|
2737
|
+
|
|
2738
|
+
// ../../node_modules/.pnpm/@vibrant+quantizer-mmcq@4.0.4/node_modules/@vibrant/quantizer-mmcq/dist/esm/vbox.js
|
|
2739
|
+
var SIGBITS = 5;
|
|
2740
|
+
var RSHIFT = 8 - SIGBITS;
|
|
2741
|
+
var VBox = class _VBox {
|
|
2742
|
+
constructor(r1, r2, g1, g2, b1, b2, histogram) {
|
|
2743
|
+
this.histogram = histogram;
|
|
2744
|
+
this._volume = -1;
|
|
2745
|
+
this._avg = null;
|
|
2746
|
+
this._count = -1;
|
|
2747
|
+
this.dimension = { r1, r2, g1, g2, b1, b2 };
|
|
2748
|
+
}
|
|
2749
|
+
static build(pixels) {
|
|
2750
|
+
const h = new Histogram(pixels, { sigBits: SIGBITS });
|
|
2751
|
+
const { rmin, rmax, gmin, gmax, bmin, bmax } = h;
|
|
2752
|
+
return new _VBox(rmin, rmax, gmin, gmax, bmin, bmax, h);
|
|
2753
|
+
}
|
|
2754
|
+
invalidate() {
|
|
2755
|
+
this._volume = this._count = -1;
|
|
2756
|
+
this._avg = null;
|
|
2757
|
+
}
|
|
2758
|
+
volume() {
|
|
2759
|
+
if (this._volume < 0) {
|
|
2760
|
+
const { r1, r2, g1, g2, b1, b2 } = this.dimension;
|
|
2761
|
+
this._volume = (r2 - r1 + 1) * (g2 - g1 + 1) * (b2 - b1 + 1);
|
|
2762
|
+
}
|
|
2763
|
+
return this._volume;
|
|
2764
|
+
}
|
|
2765
|
+
count() {
|
|
2766
|
+
if (this._count < 0) {
|
|
2767
|
+
const { hist, getColorIndex } = this.histogram;
|
|
2768
|
+
const { r1, r2, g1, g2, b1, b2 } = this.dimension;
|
|
2769
|
+
let c = 0;
|
|
2770
|
+
for (let r = r1; r <= r2; r++) {
|
|
2771
|
+
for (let g = g1; g <= g2; g++) {
|
|
2772
|
+
for (let b = b1; b <= b2; b++) {
|
|
2773
|
+
const index = getColorIndex(r, g, b);
|
|
2774
|
+
if (!hist[index]) {
|
|
2775
|
+
continue;
|
|
2776
|
+
}
|
|
2777
|
+
c += hist[index];
|
|
2778
|
+
}
|
|
2779
|
+
}
|
|
2780
|
+
}
|
|
2781
|
+
this._count = c;
|
|
2782
|
+
}
|
|
2783
|
+
return this._count;
|
|
2784
|
+
}
|
|
2785
|
+
clone() {
|
|
2786
|
+
const { histogram } = this;
|
|
2787
|
+
const { r1, r2, g1, g2, b1, b2 } = this.dimension;
|
|
2788
|
+
return new _VBox(r1, r2, g1, g2, b1, b2, histogram);
|
|
2789
|
+
}
|
|
2790
|
+
avg() {
|
|
2791
|
+
if (!this._avg) {
|
|
2792
|
+
const { hist, getColorIndex } = this.histogram;
|
|
2793
|
+
const { r1, r2, g1, g2, b1, b2 } = this.dimension;
|
|
2794
|
+
let ntot = 0;
|
|
2795
|
+
const mult = 1 << 8 - SIGBITS;
|
|
2796
|
+
let rsum;
|
|
2797
|
+
let gsum;
|
|
2798
|
+
let bsum;
|
|
2799
|
+
rsum = gsum = bsum = 0;
|
|
2800
|
+
for (let r = r1; r <= r2; r++) {
|
|
2801
|
+
for (let g = g1; g <= g2; g++) {
|
|
2802
|
+
for (let b = b1; b <= b2; b++) {
|
|
2803
|
+
const index = getColorIndex(r, g, b);
|
|
2804
|
+
const h = hist[index];
|
|
2805
|
+
if (!h) continue;
|
|
2806
|
+
ntot += h;
|
|
2807
|
+
rsum += h * (r + 0.5) * mult;
|
|
2808
|
+
gsum += h * (g + 0.5) * mult;
|
|
2809
|
+
bsum += h * (b + 0.5) * mult;
|
|
2810
|
+
}
|
|
2811
|
+
}
|
|
2812
|
+
}
|
|
2813
|
+
if (ntot) {
|
|
2814
|
+
this._avg = [~~(rsum / ntot), ~~(gsum / ntot), ~~(bsum / ntot)];
|
|
2815
|
+
} else {
|
|
2816
|
+
this._avg = [
|
|
2817
|
+
~~(mult * (r1 + r2 + 1) / 2),
|
|
2818
|
+
~~(mult * (g1 + g2 + 1) / 2),
|
|
2819
|
+
~~(mult * (b1 + b2 + 1) / 2)
|
|
2820
|
+
];
|
|
2821
|
+
}
|
|
2822
|
+
}
|
|
2823
|
+
return this._avg;
|
|
2824
|
+
}
|
|
2825
|
+
contains(rgb) {
|
|
2826
|
+
let [r, g, b] = rgb;
|
|
2827
|
+
const { r1, r2, g1, g2, b1, b2 } = this.dimension;
|
|
2828
|
+
r >>= RSHIFT;
|
|
2829
|
+
g >>= RSHIFT;
|
|
2830
|
+
b >>= RSHIFT;
|
|
2831
|
+
return r >= r1 && r <= r2 && g >= g1 && g <= g2 && b >= b1 && b <= b2;
|
|
2832
|
+
}
|
|
2833
|
+
split() {
|
|
2834
|
+
const { hist, getColorIndex } = this.histogram;
|
|
2835
|
+
const { r1, r2, g1, g2, b1, b2 } = this.dimension;
|
|
2836
|
+
const count = this.count();
|
|
2837
|
+
if (!count) return [];
|
|
2838
|
+
if (count === 1) return [this.clone()];
|
|
2839
|
+
const rw = r2 - r1 + 1;
|
|
2840
|
+
const gw = g2 - g1 + 1;
|
|
2841
|
+
const bw = b2 - b1 + 1;
|
|
2842
|
+
const maxw = Math.max(rw, gw, bw);
|
|
2843
|
+
let accSum = null;
|
|
2844
|
+
let sum;
|
|
2845
|
+
let total;
|
|
2846
|
+
sum = total = 0;
|
|
2847
|
+
let maxd = null;
|
|
2848
|
+
if (maxw === rw) {
|
|
2849
|
+
maxd = "r";
|
|
2850
|
+
accSum = new Uint32Array(r2 + 1);
|
|
2851
|
+
for (let r = r1; r <= r2; r++) {
|
|
2852
|
+
sum = 0;
|
|
2853
|
+
for (let g = g1; g <= g2; g++) {
|
|
2854
|
+
for (let b = b1; b <= b2; b++) {
|
|
2855
|
+
const index = getColorIndex(r, g, b);
|
|
2856
|
+
if (!hist[index]) continue;
|
|
2857
|
+
sum += hist[index];
|
|
2858
|
+
}
|
|
2859
|
+
}
|
|
2860
|
+
total += sum;
|
|
2861
|
+
accSum[r] = total;
|
|
2862
|
+
}
|
|
2863
|
+
} else if (maxw === gw) {
|
|
2864
|
+
maxd = "g";
|
|
2865
|
+
accSum = new Uint32Array(g2 + 1);
|
|
2866
|
+
for (let g = g1; g <= g2; g++) {
|
|
2867
|
+
sum = 0;
|
|
2868
|
+
for (let r = r1; r <= r2; r++) {
|
|
2869
|
+
for (let b = b1; b <= b2; b++) {
|
|
2870
|
+
const index = getColorIndex(r, g, b);
|
|
2871
|
+
if (!hist[index]) continue;
|
|
2872
|
+
sum += hist[index];
|
|
2873
|
+
}
|
|
2874
|
+
}
|
|
2875
|
+
total += sum;
|
|
2876
|
+
accSum[g] = total;
|
|
2877
|
+
}
|
|
2878
|
+
} else {
|
|
2879
|
+
maxd = "b";
|
|
2880
|
+
accSum = new Uint32Array(b2 + 1);
|
|
2881
|
+
for (let b = b1; b <= b2; b++) {
|
|
2882
|
+
sum = 0;
|
|
2883
|
+
for (let r = r1; r <= r2; r++) {
|
|
2884
|
+
for (let g = g1; g <= g2; g++) {
|
|
2885
|
+
const index = getColorIndex(r, g, b);
|
|
2886
|
+
if (!hist[index]) continue;
|
|
2887
|
+
sum += hist[index];
|
|
2888
|
+
}
|
|
2889
|
+
}
|
|
2890
|
+
total += sum;
|
|
2891
|
+
accSum[b] = total;
|
|
2892
|
+
}
|
|
2893
|
+
}
|
|
2894
|
+
let splitPoint = -1;
|
|
2895
|
+
const reverseSum = new Uint32Array(accSum.length);
|
|
2896
|
+
for (let i = 0; i < accSum.length; i++) {
|
|
2897
|
+
const d = accSum[i];
|
|
2898
|
+
if (!d) continue;
|
|
2899
|
+
if (splitPoint < 0 && d > total / 2) splitPoint = i;
|
|
2900
|
+
reverseSum[i] = total - d;
|
|
2901
|
+
}
|
|
2902
|
+
const vbox = this;
|
|
2903
|
+
function doCut(d) {
|
|
2904
|
+
const dim1 = d + "1";
|
|
2905
|
+
const dim2 = d + "2";
|
|
2906
|
+
const d1 = vbox.dimension[dim1];
|
|
2907
|
+
let d2 = vbox.dimension[dim2];
|
|
2908
|
+
const vbox1 = vbox.clone();
|
|
2909
|
+
const vbox2 = vbox.clone();
|
|
2910
|
+
const left = splitPoint - d1;
|
|
2911
|
+
const right = d2 - splitPoint;
|
|
2912
|
+
if (left <= right) {
|
|
2913
|
+
d2 = Math.min(d2 - 1, ~~(splitPoint + right / 2));
|
|
2914
|
+
d2 = Math.max(0, d2);
|
|
2915
|
+
} else {
|
|
2916
|
+
d2 = Math.max(d1, ~~(splitPoint - 1 - left / 2));
|
|
2917
|
+
d2 = Math.min(vbox.dimension[dim2], d2);
|
|
2918
|
+
}
|
|
2919
|
+
while (!accSum[d2]) d2++;
|
|
2920
|
+
let c2 = reverseSum[d2];
|
|
2921
|
+
while (!c2 && accSum[d2 - 1]) c2 = reverseSum[--d2];
|
|
2922
|
+
vbox1.dimension[dim2] = d2;
|
|
2923
|
+
vbox2.dimension[dim1] = d2 + 1;
|
|
2924
|
+
return [vbox1, vbox2];
|
|
2925
|
+
}
|
|
2926
|
+
return doCut(maxd);
|
|
2130
2927
|
}
|
|
2131
2928
|
};
|
|
2132
2929
|
|
|
2133
|
-
//
|
|
2134
|
-
var
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
value: z3.string().min(1).transform(asAppearancePresetId)
|
|
2140
|
-
}).strict();
|
|
2141
|
-
var pageDesignUserPinnedBoundaryChoiceSchema = z3.object({
|
|
2142
|
-
kind: z3.literal("user-pinned"),
|
|
2143
|
-
value: z3.string().min(1).transform(asBoundaryOptionId)
|
|
2144
|
-
}).strict();
|
|
2145
|
-
var pageDesignBoundaryTreatmentSchema = z3.discriminatedUnion("kind", [
|
|
2146
|
-
z3.object({ kind: z3.literal("none") }).strict(),
|
|
2147
|
-
z3.object({
|
|
2148
|
-
kind: z3.literal("soft-fade"),
|
|
2149
|
-
height: z3.enum(["compact", "medium", "large", "expansive"]),
|
|
2150
|
-
curve: z3.enum(["soft", "spacious", "expansive"])
|
|
2151
|
-
}).strict(),
|
|
2152
|
-
z3.object({
|
|
2153
|
-
kind: z3.literal("wave-edge"),
|
|
2154
|
-
height: z3.enum(["compact", "medium", "large"]),
|
|
2155
|
-
amplitude: z3.enum(["subtle", "balanced", "bold"]),
|
|
2156
|
-
rhythm: z3.enum(["single", "double"]),
|
|
2157
|
-
symmetry: z3.enum(["symmetrical", "asymmetrical", "drift"])
|
|
2158
|
-
}).strict(),
|
|
2159
|
-
z3.object({
|
|
2160
|
-
kind: z3.literal("angle-edge"),
|
|
2161
|
-
height: z3.enum(["compact", "medium", "large"]),
|
|
2162
|
-
slope: z3.enum(["subtle", "balanced", "steep"]),
|
|
2163
|
-
direction: z3.enum(["forward", "reverse"])
|
|
2164
|
-
}).strict(),
|
|
2165
|
-
z3.object({
|
|
2166
|
-
kind: z3.literal("legacy-unsupported"),
|
|
2167
|
-
boundaryOptionId: z3.string().min(1).transform(asBoundaryOptionId)
|
|
2168
|
-
}).strict()
|
|
2169
|
-
]);
|
|
2170
|
-
var pageDesignUserPinnedBoundaryTreatmentChoiceSchema = z3.object({
|
|
2171
|
-
kind: z3.literal("user-pinned"),
|
|
2172
|
-
value: pageDesignBoundaryTreatmentSchema
|
|
2173
|
-
}).strict();
|
|
2174
|
-
var pageDesignBlockLookPinSchema = z3.object({
|
|
2175
|
-
blockId: z3.string().min(1).transform(asDesignBlockId),
|
|
2176
|
-
blockKind: z3.string().min(1),
|
|
2177
|
-
choice: pageDesignUserPinnedAppearanceChoiceSchema
|
|
2178
|
-
}).strict();
|
|
2179
|
-
var pageDesignBoundaryPinSchema = z3.object({
|
|
2180
|
-
boundaryId: z3.string().min(1).transform(asDesignBoundaryId),
|
|
2181
|
-
previousBlockId: z3.string().min(1).transform(asDesignBlockId),
|
|
2182
|
-
nextBlockId: z3.string().min(1).transform(asDesignBlockId),
|
|
2183
|
-
choice: pageDesignUserPinnedBoundaryTreatmentChoiceSchema
|
|
2184
|
-
}).strict().superRefine(validateBoundaryPinIdMatchesBlocks);
|
|
2185
|
-
var legacyPageDesignBoundaryPinSchema = z3.object({
|
|
2186
|
-
boundaryId: z3.string().min(1).transform(asDesignBoundaryId),
|
|
2187
|
-
previousBlockId: z3.string().min(1).transform(asDesignBlockId),
|
|
2188
|
-
nextBlockId: z3.string().min(1).transform(asDesignBlockId),
|
|
2189
|
-
choice: pageDesignUserPinnedBoundaryChoiceSchema
|
|
2190
|
-
}).strict().superRefine(validateBoundaryPinIdMatchesBlocks);
|
|
2191
|
-
var pageDesignIntentV1Schema = z3.object({
|
|
2192
|
-
schemaVersion: z3.literal(legacyPageDesignIntentSchemaVersion),
|
|
2193
|
-
siteStyleId: z3.string().min(1).transform(asSiteStyleId),
|
|
2194
|
-
pageFlowPresetId: z3.string().min(1).transform(asPageFlowPresetId),
|
|
2195
|
-
blockLookPins: z3.array(pageDesignBlockLookPinSchema),
|
|
2196
|
-
boundaryPins: z3.array(legacyPageDesignBoundaryPinSchema)
|
|
2197
|
-
}).strict().superRefine(validateUniquePageDesignPins);
|
|
2198
|
-
var pageDesignIntentV2Schema = z3.object({
|
|
2199
|
-
schemaVersion: z3.literal(pageDesignIntentSchemaVersion),
|
|
2200
|
-
siteStyleId: z3.string().min(1).transform(asSiteStyleId),
|
|
2201
|
-
pageFlowPresetId: z3.string().min(1).transform(asPageFlowPresetId),
|
|
2202
|
-
blockLookPins: z3.array(pageDesignBlockLookPinSchema),
|
|
2203
|
-
boundaryPins: z3.array(pageDesignBoundaryPinSchema)
|
|
2204
|
-
}).strict().superRefine(validateUniquePageDesignPins);
|
|
2205
|
-
function addDuplicateStringIssues(ctx, input) {
|
|
2206
|
-
const seen = /* @__PURE__ */ new Set();
|
|
2207
|
-
const duplicates = /* @__PURE__ */ new Set();
|
|
2208
|
-
for (const value of input.values) {
|
|
2209
|
-
if (seen.has(value)) {
|
|
2210
|
-
duplicates.add(value);
|
|
2930
|
+
// ../../node_modules/.pnpm/@vibrant+quantizer-mmcq@4.0.4/node_modules/@vibrant/quantizer-mmcq/dist/esm/pqueue.js
|
|
2931
|
+
var PQueue = class {
|
|
2932
|
+
_sort() {
|
|
2933
|
+
if (!this._sorted) {
|
|
2934
|
+
this.contents.sort(this._comparator);
|
|
2935
|
+
this._sorted = true;
|
|
2211
2936
|
}
|
|
2212
|
-
seen.add(value);
|
|
2213
2937
|
}
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2938
|
+
constructor(comparator) {
|
|
2939
|
+
this._comparator = comparator;
|
|
2940
|
+
this.contents = [];
|
|
2941
|
+
this._sorted = false;
|
|
2942
|
+
}
|
|
2943
|
+
push(item) {
|
|
2944
|
+
this.contents.push(item);
|
|
2945
|
+
this._sorted = false;
|
|
2946
|
+
}
|
|
2947
|
+
peek(index) {
|
|
2948
|
+
this._sort();
|
|
2949
|
+
index = typeof index === "number" ? index : this.contents.length - 1;
|
|
2950
|
+
return this.contents[index];
|
|
2951
|
+
}
|
|
2952
|
+
pop() {
|
|
2953
|
+
this._sort();
|
|
2954
|
+
return this.contents.pop();
|
|
2955
|
+
}
|
|
2956
|
+
size() {
|
|
2957
|
+
return this.contents.length;
|
|
2958
|
+
}
|
|
2959
|
+
map(mapper) {
|
|
2960
|
+
this._sort();
|
|
2961
|
+
return this.contents.map(mapper);
|
|
2962
|
+
}
|
|
2963
|
+
};
|
|
2964
|
+
|
|
2965
|
+
// ../../node_modules/.pnpm/@vibrant+quantizer-mmcq@4.0.4/node_modules/@vibrant/quantizer-mmcq/dist/esm/index.js
|
|
2966
|
+
var fractByPopulations = 0.75;
|
|
2967
|
+
function _splitBoxes(pq, target) {
|
|
2968
|
+
let lastSize = pq.size();
|
|
2969
|
+
while (pq.size() < target) {
|
|
2970
|
+
const vbox = pq.pop();
|
|
2971
|
+
if (vbox && vbox.count() > 0) {
|
|
2972
|
+
const [vbox1, vbox2] = vbox.split();
|
|
2973
|
+
if (!vbox1) break;
|
|
2974
|
+
pq.push(vbox1);
|
|
2975
|
+
if (vbox2 && vbox2.count() > 0) pq.push(vbox2);
|
|
2976
|
+
if (pq.size() === lastSize) {
|
|
2977
|
+
break;
|
|
2978
|
+
} else {
|
|
2979
|
+
lastSize = pq.size();
|
|
2980
|
+
}
|
|
2981
|
+
} else {
|
|
2982
|
+
break;
|
|
2983
|
+
}
|
|
2220
2984
|
}
|
|
2221
2985
|
}
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
pin.nextBlockId
|
|
2226
|
-
);
|
|
2227
|
-
if (pin.boundaryId !== expectedBoundaryId) {
|
|
2228
|
-
ctx.addIssue({
|
|
2229
|
-
code: z3.ZodIssueCode.custom,
|
|
2230
|
-
path: ["boundaryId"],
|
|
2231
|
-
message: `Boundary id must match previousBlockId and nextBlockId. Expected ${expectedBoundaryId}.`
|
|
2232
|
-
});
|
|
2986
|
+
var MMCQ = (pixels, opts) => {
|
|
2987
|
+
if (pixels.length === 0 || opts.colorCount < 2 || opts.colorCount > 256) {
|
|
2988
|
+
throw new Error("Wrong MMCQ parameters");
|
|
2233
2989
|
}
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2990
|
+
const vbox = VBox.build(pixels);
|
|
2991
|
+
vbox.histogram.colorCount;
|
|
2992
|
+
const pq = new PQueue((a, b) => a.count() - b.count());
|
|
2993
|
+
pq.push(vbox);
|
|
2994
|
+
_splitBoxes(pq, fractByPopulations * opts.colorCount);
|
|
2995
|
+
const pq2 = new PQueue(
|
|
2996
|
+
(a, b) => a.count() * a.volume() - b.count() * b.volume()
|
|
2997
|
+
);
|
|
2998
|
+
pq2.contents = pq.contents;
|
|
2999
|
+
_splitBoxes(pq2, opts.colorCount - pq2.size());
|
|
3000
|
+
return generateSwatches(pq2);
|
|
3001
|
+
};
|
|
3002
|
+
function generateSwatches(pq) {
|
|
3003
|
+
const swatches = [];
|
|
3004
|
+
while (pq.size()) {
|
|
3005
|
+
const v = pq.pop();
|
|
3006
|
+
const color = v.avg();
|
|
3007
|
+
const [r, g, b] = color;
|
|
3008
|
+
swatches.push(new Swatch2(color, v.count()));
|
|
3009
|
+
}
|
|
3010
|
+
return swatches;
|
|
3011
|
+
}
|
|
3012
|
+
|
|
3013
|
+
// ../../node_modules/.pnpm/@vibrant+generator-default@4.0.4/node_modules/@vibrant/generator-default/dist/esm/index.js
|
|
3014
|
+
var DefaultOpts = {
|
|
3015
|
+
targetDarkLuma: 0.26,
|
|
3016
|
+
maxDarkLuma: 0.45,
|
|
3017
|
+
minLightLuma: 0.55,
|
|
3018
|
+
targetLightLuma: 0.74,
|
|
3019
|
+
minNormalLuma: 0.3,
|
|
3020
|
+
targetNormalLuma: 0.5,
|
|
3021
|
+
maxNormalLuma: 0.7,
|
|
3022
|
+
targetMutesSaturation: 0.3,
|
|
3023
|
+
maxMutesSaturation: 0.4,
|
|
3024
|
+
targetVibrantSaturation: 1,
|
|
3025
|
+
minVibrantSaturation: 0.35,
|
|
3026
|
+
weightSaturation: 3,
|
|
3027
|
+
weightLuma: 6.5,
|
|
3028
|
+
weightPopulation: 0.5
|
|
3029
|
+
};
|
|
3030
|
+
function _findMaxPopulation(swatches) {
|
|
3031
|
+
let p = 0;
|
|
3032
|
+
swatches.forEach((s) => {
|
|
3033
|
+
p = Math.max(p, s.population);
|
|
2247
3034
|
});
|
|
3035
|
+
return p;
|
|
3036
|
+
}
|
|
3037
|
+
function _isAlreadySelected(palette, s) {
|
|
3038
|
+
return palette.Vibrant === s || palette.DarkVibrant === s || palette.LightVibrant === s || palette.Muted === s || palette.DarkMuted === s || palette.LightMuted === s;
|
|
3039
|
+
}
|
|
3040
|
+
function _createComparisonValue(saturation, targetSaturation, luma, targetLuma, population, maxPopulation, opts) {
|
|
3041
|
+
function weightedMean(...values) {
|
|
3042
|
+
let sum = 0;
|
|
3043
|
+
let weightSum = 0;
|
|
3044
|
+
for (let i = 0; i < values.length; i += 2) {
|
|
3045
|
+
const value = values[i];
|
|
3046
|
+
const weight = values[i + 1];
|
|
3047
|
+
if (!value || !weight) continue;
|
|
3048
|
+
sum += value * weight;
|
|
3049
|
+
weightSum += weight;
|
|
3050
|
+
}
|
|
3051
|
+
return sum / weightSum;
|
|
3052
|
+
}
|
|
3053
|
+
function invertDiff(value, targetValue) {
|
|
3054
|
+
return 1 - Math.abs(value - targetValue);
|
|
3055
|
+
}
|
|
3056
|
+
return weightedMean(
|
|
3057
|
+
invertDiff(saturation, targetSaturation),
|
|
3058
|
+
opts.weightSaturation,
|
|
3059
|
+
invertDiff(luma, targetLuma),
|
|
3060
|
+
opts.weightLuma,
|
|
3061
|
+
population / maxPopulation,
|
|
3062
|
+
opts.weightPopulation
|
|
3063
|
+
);
|
|
2248
3064
|
}
|
|
2249
|
-
function
|
|
2250
|
-
|
|
2251
|
-
|
|
3065
|
+
function _findColorVariation(palette, swatches, maxPopulation, targetLuma, minLuma, maxLuma, targetSaturation, minSaturation, maxSaturation, opts) {
|
|
3066
|
+
let max = null;
|
|
3067
|
+
let maxValue = 0;
|
|
3068
|
+
swatches.forEach((swatch) => {
|
|
3069
|
+
const [, s, l] = swatch.hsl;
|
|
3070
|
+
if (s >= minSaturation && s <= maxSaturation && l >= minLuma && l <= maxLuma && !_isAlreadySelected(palette, swatch)) {
|
|
3071
|
+
const value = _createComparisonValue(
|
|
3072
|
+
s,
|
|
3073
|
+
targetSaturation,
|
|
3074
|
+
l,
|
|
3075
|
+
targetLuma,
|
|
3076
|
+
swatch.population,
|
|
3077
|
+
maxPopulation,
|
|
3078
|
+
opts
|
|
3079
|
+
);
|
|
3080
|
+
if (max === null || value > maxValue) {
|
|
3081
|
+
max = swatch;
|
|
3082
|
+
maxValue = value;
|
|
3083
|
+
}
|
|
3084
|
+
}
|
|
3085
|
+
});
|
|
3086
|
+
return max;
|
|
3087
|
+
}
|
|
3088
|
+
function _generateVariationColors(swatches, maxPopulation, opts) {
|
|
3089
|
+
const palette = {
|
|
3090
|
+
Vibrant: null,
|
|
3091
|
+
DarkVibrant: null,
|
|
3092
|
+
LightVibrant: null,
|
|
3093
|
+
Muted: null,
|
|
3094
|
+
DarkMuted: null,
|
|
3095
|
+
LightMuted: null
|
|
3096
|
+
};
|
|
3097
|
+
palette.Vibrant = _findColorVariation(
|
|
3098
|
+
palette,
|
|
3099
|
+
swatches,
|
|
3100
|
+
maxPopulation,
|
|
3101
|
+
opts.targetNormalLuma,
|
|
3102
|
+
opts.minNormalLuma,
|
|
3103
|
+
opts.maxNormalLuma,
|
|
3104
|
+
opts.targetVibrantSaturation,
|
|
3105
|
+
opts.minVibrantSaturation,
|
|
3106
|
+
1,
|
|
3107
|
+
opts
|
|
3108
|
+
);
|
|
3109
|
+
palette.LightVibrant = _findColorVariation(
|
|
3110
|
+
palette,
|
|
3111
|
+
swatches,
|
|
3112
|
+
maxPopulation,
|
|
3113
|
+
opts.targetLightLuma,
|
|
3114
|
+
opts.minLightLuma,
|
|
3115
|
+
1,
|
|
3116
|
+
opts.targetVibrantSaturation,
|
|
3117
|
+
opts.minVibrantSaturation,
|
|
3118
|
+
1,
|
|
3119
|
+
opts
|
|
3120
|
+
);
|
|
3121
|
+
palette.DarkVibrant = _findColorVariation(
|
|
3122
|
+
palette,
|
|
3123
|
+
swatches,
|
|
3124
|
+
maxPopulation,
|
|
3125
|
+
opts.targetDarkLuma,
|
|
3126
|
+
0,
|
|
3127
|
+
opts.maxDarkLuma,
|
|
3128
|
+
opts.targetVibrantSaturation,
|
|
3129
|
+
opts.minVibrantSaturation,
|
|
3130
|
+
1,
|
|
3131
|
+
opts
|
|
3132
|
+
);
|
|
3133
|
+
palette.Muted = _findColorVariation(
|
|
3134
|
+
palette,
|
|
3135
|
+
swatches,
|
|
3136
|
+
maxPopulation,
|
|
3137
|
+
opts.targetNormalLuma,
|
|
3138
|
+
opts.minNormalLuma,
|
|
3139
|
+
opts.maxNormalLuma,
|
|
3140
|
+
opts.targetMutesSaturation,
|
|
3141
|
+
0,
|
|
3142
|
+
opts.maxMutesSaturation,
|
|
3143
|
+
opts
|
|
3144
|
+
);
|
|
3145
|
+
palette.LightMuted = _findColorVariation(
|
|
3146
|
+
palette,
|
|
3147
|
+
swatches,
|
|
3148
|
+
maxPopulation,
|
|
3149
|
+
opts.targetLightLuma,
|
|
3150
|
+
opts.minLightLuma,
|
|
3151
|
+
1,
|
|
3152
|
+
opts.targetMutesSaturation,
|
|
3153
|
+
0,
|
|
3154
|
+
opts.maxMutesSaturation,
|
|
3155
|
+
opts
|
|
3156
|
+
);
|
|
3157
|
+
palette.DarkMuted = _findColorVariation(
|
|
3158
|
+
palette,
|
|
3159
|
+
swatches,
|
|
3160
|
+
maxPopulation,
|
|
3161
|
+
opts.targetDarkLuma,
|
|
3162
|
+
0,
|
|
3163
|
+
opts.maxDarkLuma,
|
|
3164
|
+
opts.targetMutesSaturation,
|
|
3165
|
+
0,
|
|
3166
|
+
opts.maxMutesSaturation,
|
|
3167
|
+
opts
|
|
3168
|
+
);
|
|
3169
|
+
return palette;
|
|
3170
|
+
}
|
|
3171
|
+
function _generateEmptySwatches(palette, _maxPopulation, opts) {
|
|
3172
|
+
if (!palette.Vibrant && !palette.DarkVibrant && !palette.LightVibrant) {
|
|
3173
|
+
if (!palette.DarkVibrant && palette.DarkMuted) {
|
|
3174
|
+
let [h, s, l] = palette.DarkMuted.hsl;
|
|
3175
|
+
l = opts.targetDarkLuma;
|
|
3176
|
+
palette.DarkVibrant = new Swatch2(hslToRgb(h, s, l), 0);
|
|
3177
|
+
}
|
|
3178
|
+
if (!palette.LightVibrant && palette.LightMuted) {
|
|
3179
|
+
let [h, s, l] = palette.LightMuted.hsl;
|
|
3180
|
+
l = opts.targetDarkLuma;
|
|
3181
|
+
palette.DarkVibrant = new Swatch2(hslToRgb(h, s, l), 0);
|
|
3182
|
+
}
|
|
3183
|
+
}
|
|
3184
|
+
if (!palette.Vibrant && palette.DarkVibrant) {
|
|
3185
|
+
let [h, s, l] = palette.DarkVibrant.hsl;
|
|
3186
|
+
l = opts.targetNormalLuma;
|
|
3187
|
+
palette.Vibrant = new Swatch2(hslToRgb(h, s, l), 0);
|
|
3188
|
+
} else if (!palette.Vibrant && palette.LightVibrant) {
|
|
3189
|
+
let [h, s, l] = palette.LightVibrant.hsl;
|
|
3190
|
+
l = opts.targetNormalLuma;
|
|
3191
|
+
palette.Vibrant = new Swatch2(hslToRgb(h, s, l), 0);
|
|
3192
|
+
}
|
|
3193
|
+
if (!palette.DarkVibrant && palette.Vibrant) {
|
|
3194
|
+
let [h, s, l] = palette.Vibrant.hsl;
|
|
3195
|
+
l = opts.targetDarkLuma;
|
|
3196
|
+
palette.DarkVibrant = new Swatch2(hslToRgb(h, s, l), 0);
|
|
3197
|
+
}
|
|
3198
|
+
if (!palette.LightVibrant && palette.Vibrant) {
|
|
3199
|
+
let [h, s, l] = palette.Vibrant.hsl;
|
|
3200
|
+
l = opts.targetLightLuma;
|
|
3201
|
+
palette.LightVibrant = new Swatch2(hslToRgb(h, s, l), 0);
|
|
3202
|
+
}
|
|
3203
|
+
if (!palette.Muted && palette.Vibrant) {
|
|
3204
|
+
let [h, s, l] = palette.Vibrant.hsl;
|
|
3205
|
+
l = opts.targetMutesSaturation;
|
|
3206
|
+
palette.Muted = new Swatch2(hslToRgb(h, s, l), 0);
|
|
3207
|
+
}
|
|
3208
|
+
if (!palette.DarkMuted && palette.DarkVibrant) {
|
|
3209
|
+
let [h, s, l] = palette.DarkVibrant.hsl;
|
|
3210
|
+
l = opts.targetMutesSaturation;
|
|
3211
|
+
palette.DarkMuted = new Swatch2(hslToRgb(h, s, l), 0);
|
|
3212
|
+
}
|
|
3213
|
+
if (!palette.LightMuted && palette.LightVibrant) {
|
|
3214
|
+
let [h, s, l] = palette.LightVibrant.hsl;
|
|
3215
|
+
l = opts.targetMutesSaturation;
|
|
3216
|
+
palette.LightMuted = new Swatch2(hslToRgb(h, s, l), 0);
|
|
3217
|
+
}
|
|
3218
|
+
}
|
|
3219
|
+
var DefaultGenerator = ((swatches, opts) => {
|
|
3220
|
+
opts = Object.assign({}, DefaultOpts, opts);
|
|
3221
|
+
const maxPopulation = _findMaxPopulation(swatches);
|
|
3222
|
+
const palette = _generateVariationColors(swatches, maxPopulation, opts);
|
|
3223
|
+
_generateEmptySwatches(palette, maxPopulation, opts);
|
|
3224
|
+
return palette;
|
|
3225
|
+
});
|
|
3226
|
+
|
|
3227
|
+
// ../../node_modules/.pnpm/node-vibrant@4.0.4/node_modules/node-vibrant/dist/esm/pipeline/index.js
|
|
3228
|
+
var pipeline = new BasicPipeline().filter.register(
|
|
3229
|
+
"default",
|
|
3230
|
+
(r, g, b, a) => a >= 125 && !(r > 250 && g > 250 && b > 250)
|
|
3231
|
+
).quantizer.register("mmcq", MMCQ).generator.register("default", DefaultGenerator);
|
|
2252
3232
|
|
|
2253
|
-
//
|
|
2254
|
-
|
|
3233
|
+
// ../../node_modules/.pnpm/node-vibrant@4.0.4/node_modules/node-vibrant/dist/esm/browser.js
|
|
3234
|
+
Vibrant.use(pipeline);
|
|
3235
|
+
|
|
3236
|
+
// ../theme-core/src/palette/variants/types.ts
|
|
3237
|
+
import { z as z20 } from "zod";
|
|
3238
|
+
|
|
3239
|
+
// ../theme-core/src/site-styles/styleTags.ts
|
|
3240
|
+
import { z as z3 } from "zod";
|
|
3241
|
+
var STYLE_AXIS_VALUES = {
|
|
3242
|
+
tone: ["minimal", "classic", "bold"],
|
|
3243
|
+
energy: ["calm", "vibrant"],
|
|
3244
|
+
motion: ["subtle", "standard", "expressive"],
|
|
3245
|
+
era: ["editorial", "modern", "organic", "technical", "retro"]
|
|
3246
|
+
};
|
|
3247
|
+
var styleTagsSchema = z3.object({
|
|
3248
|
+
tone: z3.enum(STYLE_AXIS_VALUES.tone).optional(),
|
|
3249
|
+
energy: z3.enum(STYLE_AXIS_VALUES.energy).optional(),
|
|
3250
|
+
motion: z3.enum(STYLE_AXIS_VALUES.motion).optional(),
|
|
3251
|
+
era: z3.enum(STYLE_AXIS_VALUES.era).optional()
|
|
3252
|
+
});
|
|
3253
|
+
|
|
3254
|
+
// ../theme-core/src/schema.ts
|
|
3255
|
+
import { z as z19 } from "zod";
|
|
3256
|
+
|
|
3257
|
+
// ../theme-core/src/lib/media.ts
|
|
3258
|
+
import z4 from "zod";
|
|
3259
|
+
var hotspotSchema = z4.object({
|
|
3260
|
+
x: z4.number().min(0).max(1),
|
|
3261
|
+
y: z4.number().min(0).max(1),
|
|
3262
|
+
radius: z4.number().optional()
|
|
3263
|
+
});
|
|
3264
|
+
var rotationSchema = z4.union([z4.literal(0), z4.literal(90), z4.literal(180), z4.literal(270)]);
|
|
3265
|
+
var rectSchema = z4.tuple([z4.number(), z4.number(), z4.number(), z4.number()]);
|
|
3266
|
+
var aspectCropSchema = z4.object({
|
|
3267
|
+
aspect: z4.preprocess((value) => value == null ? void 0 : value, z4.string().optional()),
|
|
3268
|
+
rect: z4.preprocess((value) => value == null ? void 0 : value, rectSchema.optional()),
|
|
3269
|
+
hotspot: z4.preprocess((value) => value == null ? void 0 : value, hotspotSchema.optional()),
|
|
3270
|
+
rotation: z4.preprocess((value) => value == null ? void 0 : value, rotationSchema.optional())
|
|
3271
|
+
});
|
|
3272
|
+
var transformSchema = z4.object({
|
|
3273
|
+
aspectCrops: z4.preprocess((value) => {
|
|
3274
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) {
|
|
3275
|
+
return void 0;
|
|
3276
|
+
}
|
|
3277
|
+
return value;
|
|
3278
|
+
}, z4.record(z4.string(), aspectCropSchema.catch({}))).optional(),
|
|
3279
|
+
rect: rectSchema.optional(),
|
|
3280
|
+
hotspot: hotspotSchema.optional(),
|
|
3281
|
+
rotation: rotationSchema.optional()
|
|
3282
|
+
});
|
|
3283
|
+
var mediaSchema = z4.object({
|
|
3284
|
+
type: z4.enum(["image", "video", "audio", "document", "spreadsheet", "archive"]),
|
|
3285
|
+
purpose: z4.string().optional(),
|
|
3286
|
+
placeholder: z4.boolean().default(true).optional(),
|
|
3287
|
+
assetId: z4.string().optional(),
|
|
3288
|
+
identifier: z4.string().optional(),
|
|
3289
|
+
src: z4.string().optional(),
|
|
3290
|
+
alt: z4.string().optional(),
|
|
3291
|
+
filename: z4.string().optional(),
|
|
3292
|
+
mimeType: z4.string().optional(),
|
|
3293
|
+
width: z4.number().optional(),
|
|
3294
|
+
height: z4.number().optional(),
|
|
3295
|
+
storageBucket: z4.string().optional(),
|
|
3296
|
+
storagePath: z4.string().optional(),
|
|
3297
|
+
transform: transformSchema.optional()
|
|
3298
|
+
});
|
|
2255
3299
|
|
|
2256
3300
|
// ../theme-core/src/buttons/types.ts
|
|
2257
|
-
import { z as
|
|
3301
|
+
import { z as z6 } from "zod";
|
|
2258
3302
|
|
|
2259
3303
|
// ../theme-core/src/tokens/themeColorTokens.ts
|
|
2260
|
-
import { z as
|
|
3304
|
+
import { z as z5 } from "zod";
|
|
2261
3305
|
|
|
2262
3306
|
// ../theme-core/src/tokens/colorTokenParts.ts
|
|
2263
3307
|
function parseOpacityPercent(source) {
|
|
@@ -2338,7 +3382,7 @@ var PALETTE_TOKEN_NAMES = [
|
|
|
2338
3382
|
"text",
|
|
2339
3383
|
"border"
|
|
2340
3384
|
];
|
|
2341
|
-
var paletteTokenNameSchema =
|
|
3385
|
+
var paletteTokenNameSchema = z5.enum(PALETTE_TOKEN_NAMES);
|
|
2342
3386
|
var themeColorBaseTokenNames = [
|
|
2343
3387
|
...PALETTE_TOKEN_NAMES,
|
|
2344
3388
|
...blockColorTokenNames,
|
|
@@ -2383,7 +3427,11 @@ function isThemeColorToken(value) {
|
|
|
2383
3427
|
const parts = parseColorTokenParts(value);
|
|
2384
3428
|
return parts.kind === "token" && isThemeColorTokenBase(parts.token);
|
|
2385
3429
|
}
|
|
2386
|
-
|
|
3430
|
+
function parseThemeColorToken(value) {
|
|
3431
|
+
if (!isThemeColorToken(value)) return null;
|
|
3432
|
+
return value.trim();
|
|
3433
|
+
}
|
|
3434
|
+
var themeColorTokenSchema = z5.string().min(1).refine((value) => Boolean(isThemeColorToken(value)), "Expected a known Theme V2 color token");
|
|
2387
3435
|
|
|
2388
3436
|
// ../theme-core/src/buttons/types.ts
|
|
2389
3437
|
var VARIANT_ROLES = [
|
|
@@ -2395,22 +3443,22 @@ var VARIANT_ROLES = [
|
|
|
2395
3443
|
"tertiary",
|
|
2396
3444
|
"accent"
|
|
2397
3445
|
];
|
|
2398
|
-
var cornerStyleSchema =
|
|
2399
|
-
var shadowSizeSchema =
|
|
2400
|
-
var textTransformSchema =
|
|
2401
|
-
var fontWeightSchema =
|
|
2402
|
-
var buttonTypographySchema =
|
|
2403
|
-
var letterSpacingSchema =
|
|
2404
|
-
var hoverTransformSchema =
|
|
2405
|
-
var hoverColorSchema =
|
|
2406
|
-
var buttonPaddingPresetSchema =
|
|
2407
|
-
var gradientStyleSchema =
|
|
2408
|
-
var gradientSharpnessSchema =
|
|
2409
|
-
var prioritySchema =
|
|
2410
|
-
var variantRoleSchema =
|
|
2411
|
-
var buttonSizeNameSchema =
|
|
3446
|
+
var cornerStyleSchema = z6.enum(["square", "rounded", "pill"]);
|
|
3447
|
+
var shadowSizeSchema = z6.enum(["none", "low", "medium", "high"]);
|
|
3448
|
+
var textTransformSchema = z6.enum(["none", "uppercase", "lowercase", "capitalize"]);
|
|
3449
|
+
var fontWeightSchema = z6.union([z6.literal(500), z6.literal(600), z6.literal(700)]);
|
|
3450
|
+
var buttonTypographySchema = z6.enum(["body", "heading"]);
|
|
3451
|
+
var letterSpacingSchema = z6.enum(["tight", "normal", "loose"]);
|
|
3452
|
+
var hoverTransformSchema = z6.enum(["none", "lift", "scale", "press"]);
|
|
3453
|
+
var hoverColorSchema = z6.enum(["none", "brighten", "darken", "saturate", "token"]);
|
|
3454
|
+
var buttonPaddingPresetSchema = z6.enum(["compact", "default", "spacious"]);
|
|
3455
|
+
var gradientStyleSchema = z6.enum(["linear", "radial", "conic"]);
|
|
3456
|
+
var gradientSharpnessSchema = z6.enum(["smooth", "medium", "hard"]);
|
|
3457
|
+
var prioritySchema = z6.union([z6.literal(1), z6.literal(2), z6.literal(3)]);
|
|
3458
|
+
var variantRoleSchema = z6.enum(VARIANT_ROLES);
|
|
3459
|
+
var buttonSizeNameSchema = z6.enum(["sm", "md", "lg", "xl"]);
|
|
2412
3460
|
var PADDING_TOKEN_PATTERN = /^(?:0|\d+(?:\.\d+)?(?:rem|em|px|%))$/;
|
|
2413
|
-
var paddingShorthandSchema =
|
|
3461
|
+
var paddingShorthandSchema = z6.string().refine(
|
|
2414
3462
|
(value) => {
|
|
2415
3463
|
const parts = value.split(/\s+/).filter(Boolean);
|
|
2416
3464
|
return parts.length === 2 && parts.every((token) => PADDING_TOKEN_PATTERN.test(token));
|
|
@@ -2419,11 +3467,11 @@ var paddingShorthandSchema = z5.string().refine(
|
|
|
2419
3467
|
message: 'Padding must be two space-separated CSS length tokens (e.g. "0.5rem 1rem"). Use `0` for zero.'
|
|
2420
3468
|
}
|
|
2421
3469
|
);
|
|
2422
|
-
var buttonSizeConfigSchema =
|
|
3470
|
+
var buttonSizeConfigSchema = z6.object({
|
|
2423
3471
|
padding: paddingShorthandSchema,
|
|
2424
|
-
fontSize:
|
|
3472
|
+
fontSize: z6.string().optional()
|
|
2425
3473
|
});
|
|
2426
|
-
var buttonSizesSchema =
|
|
3474
|
+
var buttonSizesSchema = z6.object({
|
|
2427
3475
|
sm: buttonSizeConfigSchema,
|
|
2428
3476
|
md: buttonSizeConfigSchema,
|
|
2429
3477
|
lg: buttonSizeConfigSchema,
|
|
@@ -2434,9 +3482,9 @@ var buttonSizesSchema = z5.object({
|
|
|
2434
3482
|
lg,
|
|
2435
3483
|
xl: xl ?? lg
|
|
2436
3484
|
}));
|
|
2437
|
-
var buttonGlobalSettingsSchema =
|
|
3485
|
+
var buttonGlobalSettingsSchema = z6.object({
|
|
2438
3486
|
cornerStyle: cornerStyleSchema,
|
|
2439
|
-
cornerRadius:
|
|
3487
|
+
cornerRadius: z6.number().min(0).max(24).optional(),
|
|
2440
3488
|
shadow: shadowSizeSchema,
|
|
2441
3489
|
textTransform: textTransformSchema,
|
|
2442
3490
|
fontWeight: fontWeightSchema,
|
|
@@ -2446,18 +3494,18 @@ var buttonGlobalSettingsSchema = z5.object({
|
|
|
2446
3494
|
* by the current generator and will be removed once the legacy
|
|
2447
3495
|
* `primitives/content/components/Button.tsx` slot exports are deleted.
|
|
2448
3496
|
*/
|
|
2449
|
-
borderWidth:
|
|
3497
|
+
borderWidth: z6.union([z6.literal(1), z6.literal(2), z6.literal(3)]),
|
|
2450
3498
|
// === Family-level typography ===
|
|
2451
3499
|
// Typography source (body or heading) — selects which theme typography pool to inherit
|
|
2452
3500
|
typography: buttonTypographySchema.optional(),
|
|
2453
3501
|
// Font size for all variants in the family (Tailwind token, e.g. "text-xs", "text-sm")
|
|
2454
3502
|
// Sized variants get this as default; fixed variants inherit unless they override.
|
|
2455
3503
|
// Size class CSS may still override at run time for sized variants.
|
|
2456
|
-
fontSize:
|
|
3504
|
+
fontSize: z6.string().optional(),
|
|
2457
3505
|
// Letter spacing applied to all variants
|
|
2458
3506
|
letterSpacing: letterSpacingSchema.optional(),
|
|
2459
3507
|
// Italic style
|
|
2460
|
-
italic:
|
|
3508
|
+
italic: z6.boolean().optional(),
|
|
2461
3509
|
// Padding preset (applies to sized variants without a sizes config)
|
|
2462
3510
|
paddingPreset: buttonPaddingPresetSchema.optional(),
|
|
2463
3511
|
hoverTransform: hoverTransformSchema,
|
|
@@ -2466,89 +3514,78 @@ var buttonGlobalSettingsSchema = z5.object({
|
|
|
2466
3514
|
hoverColorToken: themeColorTokenSchema.optional(),
|
|
2467
3515
|
// Gradient settings (if any variant uses gradients)
|
|
2468
3516
|
gradientStyle: gradientStyleSchema.optional(),
|
|
2469
|
-
gradientAngle:
|
|
3517
|
+
gradientAngle: z6.number().min(0).max(360).optional(),
|
|
2470
3518
|
gradientSharpness: gradientSharpnessSchema.optional()
|
|
2471
3519
|
});
|
|
2472
|
-
var gradientDirectionSchema =
|
|
2473
|
-
var buttonBackgroundSchema =
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
type:
|
|
2477
|
-
stops:
|
|
3520
|
+
var gradientDirectionSchema = z6.enum(["to-r", "to-l", "to-t", "to-b", "to-tr", "to-tl", "to-br", "to-bl"]);
|
|
3521
|
+
var buttonBackgroundSchema = z6.discriminatedUnion("type", [
|
|
3522
|
+
z6.object({ type: z6.literal("solid"), colorToken: themeColorTokenSchema }),
|
|
3523
|
+
z6.object({
|
|
3524
|
+
type: z6.literal("gradient"),
|
|
3525
|
+
stops: z6.array(themeColorTokenSchema).min(2),
|
|
2478
3526
|
direction: gradientDirectionSchema
|
|
2479
3527
|
}),
|
|
2480
|
-
|
|
3528
|
+
z6.object({ type: z6.literal("transparent") })
|
|
2481
3529
|
]);
|
|
2482
|
-
var effectApplicationSchema =
|
|
2483
|
-
effectId:
|
|
2484
|
-
options:
|
|
3530
|
+
var effectApplicationSchema = z6.object({
|
|
3531
|
+
effectId: z6.string(),
|
|
3532
|
+
options: z6.record(z6.string(), z6.any()).optional()
|
|
2485
3533
|
});
|
|
2486
|
-
var buttonBorderSchema =
|
|
2487
|
-
widthClass:
|
|
3534
|
+
var buttonBorderSchema = z6.object({
|
|
3535
|
+
widthClass: z6.string(),
|
|
2488
3536
|
colorToken: themeColorTokenSchema
|
|
2489
3537
|
});
|
|
2490
|
-
var variantShadowSchema =
|
|
2491
|
-
elevation:
|
|
2492
|
-
softness:
|
|
2493
|
-
position:
|
|
3538
|
+
var variantShadowSchema = z6.object({
|
|
3539
|
+
elevation: z6.enum(["none", "low", "medium", "high"]),
|
|
3540
|
+
softness: z6.enum(["crisp", "soft", "hard"]).nullable(),
|
|
3541
|
+
position: z6.enum(["bottom", "bottom-right"]).default("bottom"),
|
|
2494
3542
|
// Optional palette token for a coloured offset shadow; omit for neutral black.
|
|
2495
3543
|
colorToken: themeColorTokenSchema.optional()
|
|
2496
3544
|
});
|
|
2497
|
-
var variantEffectsSchema =
|
|
2498
|
-
base:
|
|
2499
|
-
hover:
|
|
2500
|
-
active:
|
|
2501
|
-
focus:
|
|
3545
|
+
var variantEffectsSchema = z6.object({
|
|
3546
|
+
base: z6.array(effectApplicationSchema).optional(),
|
|
3547
|
+
hover: z6.array(effectApplicationSchema).optional(),
|
|
3548
|
+
active: z6.array(effectApplicationSchema).optional(),
|
|
3549
|
+
focus: z6.array(effectApplicationSchema).optional()
|
|
2502
3550
|
});
|
|
2503
|
-
var variantSizeOverridesSchema =
|
|
3551
|
+
var variantSizeOverridesSchema = z6.object({
|
|
2504
3552
|
sm: buttonSizeConfigSchema.optional(),
|
|
2505
3553
|
md: buttonSizeConfigSchema.optional(),
|
|
2506
3554
|
lg: buttonSizeConfigSchema.optional(),
|
|
2507
3555
|
xl: buttonSizeConfigSchema.optional()
|
|
2508
3556
|
});
|
|
2509
|
-
var buttonVariantSchema =
|
|
2510
|
-
id:
|
|
2511
|
-
name:
|
|
2512
|
-
enabled:
|
|
3557
|
+
var buttonVariantSchema = z6.object({
|
|
3558
|
+
id: z6.string(),
|
|
3559
|
+
name: z6.string().min(1).max(20),
|
|
3560
|
+
enabled: z6.boolean(),
|
|
2513
3561
|
priority: prioritySchema,
|
|
2514
3562
|
// Base appearance (token-based)
|
|
2515
3563
|
background: buttonBackgroundSchema,
|
|
2516
3564
|
textColorToken: themeColorTokenSchema,
|
|
2517
3565
|
/** Tailwind radius token (e.g. `'rounded-md'`). Omit to inherit from `global.cornerStyle`. */
|
|
2518
|
-
borderRadius:
|
|
3566
|
+
borderRadius: z6.string().optional(),
|
|
2519
3567
|
// Optional shadow override (uses theme.shadow if not specified)
|
|
2520
3568
|
shadow: variantShadowSchema.optional(),
|
|
2521
3569
|
// Border (optional)
|
|
2522
3570
|
border: buttonBorderSchema.optional(),
|
|
2523
3571
|
// Hover background token (per-variant override, takes precedence over global hoverColorToken)
|
|
2524
|
-
hoverBackgroundToken:
|
|
3572
|
+
hoverBackgroundToken: z6.string().optional(),
|
|
2525
3573
|
// Effect composition
|
|
2526
3574
|
effects: variantEffectsSchema.optional(),
|
|
2527
3575
|
// Per-variant size overrides — see VariantSizeOverrides
|
|
2528
3576
|
sizes: variantSizeOverridesSchema.optional()
|
|
2529
3577
|
});
|
|
2530
|
-
var buttonSystemSchema =
|
|
3578
|
+
var buttonSystemSchema = z6.object({
|
|
2531
3579
|
global: buttonGlobalSettingsSchema,
|
|
2532
|
-
variants:
|
|
3580
|
+
variants: z6.array(buttonVariantSchema).min(1).max(6),
|
|
2533
3581
|
sizes: buttonSizesSchema.optional()
|
|
2534
3582
|
});
|
|
2535
3583
|
|
|
2536
|
-
// ../theme-core/src/
|
|
2537
|
-
|
|
2538
|
-
var STYLE_AXIS_VALUES = {
|
|
2539
|
-
tone: ["minimal", "classic", "bold"],
|
|
2540
|
-
energy: ["calm", "vibrant"],
|
|
2541
|
-
motion: ["subtle", "standard", "expressive"],
|
|
2542
|
-
era: ["editorial", "modern", "organic", "technical", "retro"]
|
|
2543
|
-
};
|
|
2544
|
-
var styleTagsSchema = z6.object({
|
|
2545
|
-
tone: z6.enum(STYLE_AXIS_VALUES.tone).optional(),
|
|
2546
|
-
energy: z6.enum(STYLE_AXIS_VALUES.energy).optional(),
|
|
2547
|
-
motion: z6.enum(STYLE_AXIS_VALUES.motion).optional(),
|
|
2548
|
-
era: z6.enum(STYLE_AXIS_VALUES.era).optional()
|
|
2549
|
-
});
|
|
3584
|
+
// ../theme-core/src/buttons/generateButtonCss.ts
|
|
3585
|
+
var BUTTON_SIZE_NAMES = buttonSizeNameSchema.options;
|
|
2550
3586
|
|
|
2551
3587
|
// ../theme-core/src/buttons/personalities/types.ts
|
|
3588
|
+
import { z as z7 } from "zod";
|
|
2552
3589
|
function asButtonPersonalityId(value) {
|
|
2553
3590
|
if (value.length === 0) {
|
|
2554
3591
|
throw new Error("ButtonPersonalityId must be a non-empty string");
|
|
@@ -3079,7 +4116,7 @@ var joyStamp = defineButtonPersonality({
|
|
|
3079
4116
|
var pebble = defineButtonPersonality({
|
|
3080
4117
|
id: "pebble",
|
|
3081
4118
|
name: "Pebble",
|
|
3082
|
-
description: "Generous pill buttons with a
|
|
4119
|
+
description: "Generous pill buttons with a quiet colour-softening hover.",
|
|
3083
4120
|
tags: { tone: "classic", energy: "calm", motion: "standard", era: "organic" },
|
|
3084
4121
|
buttonSystem: {
|
|
3085
4122
|
global: {
|
|
@@ -3108,8 +4145,7 @@ var pebble = defineButtonPersonality({
|
|
|
3108
4145
|
borderRadius: "rounded-full",
|
|
3109
4146
|
effects: {
|
|
3110
4147
|
hover: [
|
|
3111
|
-
{ effectId: "
|
|
3112
|
-
{ effectId: "drop-shadow", options: { intensity: "medium" } }
|
|
4148
|
+
{ effectId: "background-on-hover-alpha", options: { colorToken: "primary", opacity: 88 } }
|
|
3113
4149
|
]
|
|
3114
4150
|
}
|
|
3115
4151
|
},
|
|
@@ -3355,70 +4391,18 @@ var personalitiesById = new Map(
|
|
|
3355
4391
|
buttonPersonalities.map((p) => [p.id, p])
|
|
3356
4392
|
);
|
|
3357
4393
|
|
|
3358
|
-
// ../theme-core/src/palette/variants/types.ts
|
|
3359
|
-
import { z as z21 } from "zod";
|
|
3360
|
-
|
|
3361
|
-
// ../theme-core/src/schema.ts
|
|
3362
|
-
import { z as z20 } from "zod";
|
|
3363
|
-
|
|
3364
|
-
// ../theme-core/src/lib/media.ts
|
|
3365
|
-
import z8 from "zod";
|
|
3366
|
-
var hotspotSchema = z8.object({
|
|
3367
|
-
x: z8.number().min(0).max(1),
|
|
3368
|
-
y: z8.number().min(0).max(1),
|
|
3369
|
-
radius: z8.number().optional()
|
|
3370
|
-
});
|
|
3371
|
-
var rotationSchema = z8.union([z8.literal(0), z8.literal(90), z8.literal(180), z8.literal(270)]);
|
|
3372
|
-
var rectSchema = z8.tuple([z8.number(), z8.number(), z8.number(), z8.number()]);
|
|
3373
|
-
var aspectCropSchema = z8.object({
|
|
3374
|
-
aspect: z8.preprocess((value) => value == null ? void 0 : value, z8.string().optional()),
|
|
3375
|
-
rect: z8.preprocess((value) => value == null ? void 0 : value, rectSchema.optional()),
|
|
3376
|
-
hotspot: z8.preprocess((value) => value == null ? void 0 : value, hotspotSchema.optional()),
|
|
3377
|
-
rotation: z8.preprocess((value) => value == null ? void 0 : value, rotationSchema.optional())
|
|
3378
|
-
});
|
|
3379
|
-
var transformSchema = z8.object({
|
|
3380
|
-
aspectCrops: z8.preprocess((value) => {
|
|
3381
|
-
if (!value || typeof value !== "object" || Array.isArray(value)) {
|
|
3382
|
-
return void 0;
|
|
3383
|
-
}
|
|
3384
|
-
return value;
|
|
3385
|
-
}, z8.record(z8.string(), aspectCropSchema.catch({}))).optional(),
|
|
3386
|
-
rect: rectSchema.optional(),
|
|
3387
|
-
hotspot: hotspotSchema.optional(),
|
|
3388
|
-
rotation: rotationSchema.optional()
|
|
3389
|
-
});
|
|
3390
|
-
var mediaSchema = z8.object({
|
|
3391
|
-
type: z8.enum(["image", "video", "audio", "document", "spreadsheet", "archive"]),
|
|
3392
|
-
purpose: z8.string().optional(),
|
|
3393
|
-
placeholder: z8.boolean().default(true).optional(),
|
|
3394
|
-
assetId: z8.string().optional(),
|
|
3395
|
-
identifier: z8.string().optional(),
|
|
3396
|
-
src: z8.string().optional(),
|
|
3397
|
-
alt: z8.string().optional(),
|
|
3398
|
-
filename: z8.string().optional(),
|
|
3399
|
-
mimeType: z8.string().optional(),
|
|
3400
|
-
width: z8.number().optional(),
|
|
3401
|
-
height: z8.number().optional(),
|
|
3402
|
-
storageBucket: z8.string().optional(),
|
|
3403
|
-
storagePath: z8.string().optional(),
|
|
3404
|
-
transform: transformSchema.optional()
|
|
3405
|
-
});
|
|
3406
|
-
|
|
3407
|
-
// ../theme-core/src/buttons/generateButtonCss.ts
|
|
3408
|
-
var BUTTON_SIZE_NAMES = buttonSizeNameSchema.options;
|
|
3409
|
-
|
|
3410
4394
|
// ../theme-core/src/cards/types.ts
|
|
3411
|
-
import { z as
|
|
4395
|
+
import { z as z8 } from "zod";
|
|
3412
4396
|
var cardVariantRoleValues = ["default", "alternative"];
|
|
3413
4397
|
var boxlessCardVariantValue = "none";
|
|
3414
4398
|
var legacyCardVariantRoleAliases = {
|
|
3415
4399
|
variant1: "alternative",
|
|
3416
4400
|
variant2: "alternative"
|
|
3417
4401
|
};
|
|
3418
|
-
var cardSpacingSchema =
|
|
3419
|
-
var gradientDirectionSchema2 =
|
|
3420
|
-
var cardVariantRoleSchema =
|
|
3421
|
-
var boxStylesCardVariantSchema =
|
|
4402
|
+
var cardSpacingSchema = z8.enum(["none", "compact", "cozy", "medium", "comfortable", "spacious"]);
|
|
4403
|
+
var gradientDirectionSchema2 = z8.enum(["to-r", "to-l", "to-t", "to-b", "to-tr", "to-tl", "to-br", "to-bl"]);
|
|
4404
|
+
var cardVariantRoleSchema = z8.enum(cardVariantRoleValues);
|
|
4405
|
+
var boxStylesCardVariantSchema = z8.enum([
|
|
3422
4406
|
...cardVariantRoleValues,
|
|
3423
4407
|
boxlessCardVariantValue
|
|
3424
4408
|
]);
|
|
@@ -3430,55 +4414,55 @@ function normalizeCardVariantRole(value) {
|
|
|
3430
4414
|
if (typeof value !== "string") return null;
|
|
3431
4415
|
return legacyCardVariantRoleAliases[value] ?? null;
|
|
3432
4416
|
}
|
|
3433
|
-
var cardBackgroundSchema =
|
|
3434
|
-
|
|
3435
|
-
|
|
3436
|
-
type:
|
|
4417
|
+
var cardBackgroundSchema = z8.discriminatedUnion("type", [
|
|
4418
|
+
z8.object({ type: z8.literal("solid"), colorToken: themeColorTokenSchema }),
|
|
4419
|
+
z8.object({
|
|
4420
|
+
type: z8.literal("gradient"),
|
|
3437
4421
|
fromToken: themeColorTokenSchema,
|
|
3438
4422
|
toToken: themeColorTokenSchema,
|
|
3439
4423
|
direction: gradientDirectionSchema2
|
|
3440
4424
|
}),
|
|
3441
|
-
|
|
4425
|
+
z8.object({ type: z8.literal("transparent") })
|
|
3442
4426
|
]);
|
|
3443
|
-
var cardBorderSchema =
|
|
3444
|
-
widthClass:
|
|
4427
|
+
var cardBorderSchema = z8.object({
|
|
4428
|
+
widthClass: z8.string(),
|
|
3445
4429
|
colorToken: themeColorTokenSchema
|
|
3446
4430
|
});
|
|
3447
|
-
var cardCornerValueSchema =
|
|
4431
|
+
var cardCornerValueSchema = z8.enum([
|
|
3448
4432
|
"square",
|
|
3449
4433
|
"soft",
|
|
3450
4434
|
"rounded",
|
|
3451
4435
|
"pill",
|
|
3452
4436
|
"expressive"
|
|
3453
4437
|
]);
|
|
3454
|
-
var cardAccentEdgeSchema =
|
|
3455
|
-
edge:
|
|
4438
|
+
var cardAccentEdgeSchema = z8.object({
|
|
4439
|
+
edge: z8.enum(["left", "top", "right", "bottom"]),
|
|
3456
4440
|
colorToken: themeColorTokenSchema,
|
|
3457
|
-
width:
|
|
4441
|
+
width: z8.enum(["thin", "medium", "thick", "heavy"])
|
|
3458
4442
|
});
|
|
3459
|
-
var cardCornerRadiiSchema =
|
|
4443
|
+
var cardCornerRadiiSchema = z8.object({
|
|
3460
4444
|
topLeft: cardCornerValueSchema.optional(),
|
|
3461
4445
|
topRight: cardCornerValueSchema.optional(),
|
|
3462
4446
|
bottomLeft: cardCornerValueSchema.optional(),
|
|
3463
4447
|
bottomRight: cardCornerValueSchema.optional()
|
|
3464
4448
|
});
|
|
3465
|
-
var cardVariantSchema =
|
|
3466
|
-
id:
|
|
3467
|
-
name:
|
|
3468
|
-
enabled:
|
|
3469
|
-
priority:
|
|
4449
|
+
var cardVariantSchema = z8.object({
|
|
4450
|
+
id: z8.string(),
|
|
4451
|
+
name: z8.string().min(1).max(20),
|
|
4452
|
+
enabled: z8.boolean(),
|
|
4453
|
+
priority: z8.union([z8.literal(1), z8.literal(2), z8.literal(3)]),
|
|
3470
4454
|
// Appearance (token-based)
|
|
3471
4455
|
background: cardBackgroundSchema,
|
|
3472
4456
|
spacing: cardSpacingSchema,
|
|
3473
4457
|
// Optional foreground (card text) color, for cards on a strong fill.
|
|
3474
4458
|
foregroundToken: themeColorTokenSchema.optional(),
|
|
3475
4459
|
// Optional overrides (uses theme defaults if not specified)
|
|
3476
|
-
shadow:
|
|
3477
|
-
elevation:
|
|
3478
|
-
softness:
|
|
3479
|
-
position:
|
|
4460
|
+
shadow: z8.object({
|
|
4461
|
+
elevation: z8.enum(["none", "low", "medium", "high"]),
|
|
4462
|
+
softness: z8.enum(["crisp", "soft", "hard"]).nullable(),
|
|
4463
|
+
position: z8.enum(["bottom", "bottom-right"]).default("bottom")
|
|
3480
4464
|
}).optional(),
|
|
3481
|
-
corners:
|
|
4465
|
+
corners: z8.enum(["square", "soft", "rounded", "pill"]).optional(),
|
|
3482
4466
|
// Per-corner radius override; wins over `corners` when set.
|
|
3483
4467
|
cornerRadii: cardCornerRadiiSchema.optional(),
|
|
3484
4468
|
// Border (optional)
|
|
@@ -3486,13 +4470,13 @@ var cardVariantSchema = z9.object({
|
|
|
3486
4470
|
// Single accent edge; replaces `border` when set.
|
|
3487
4471
|
accentEdge: cardAccentEdgeSchema.optional()
|
|
3488
4472
|
});
|
|
3489
|
-
var cardSystemSchema =
|
|
3490
|
-
variants:
|
|
4473
|
+
var cardSystemSchema = z8.object({
|
|
4474
|
+
variants: z8.array(cardVariantSchema).min(1).max(3)
|
|
3491
4475
|
});
|
|
3492
4476
|
|
|
3493
4477
|
// ../theme-core/src/accordions/types.ts
|
|
3494
|
-
import { z as
|
|
3495
|
-
var accordionIconSchema =
|
|
4478
|
+
import { z as z9 } from "zod";
|
|
4479
|
+
var accordionIconSchema = z9.enum([
|
|
3496
4480
|
"plus-minus",
|
|
3497
4481
|
// + becomes - (swap or rotate 90°)
|
|
3498
4482
|
"chevron",
|
|
@@ -3504,192 +4488,192 @@ var accordionIconSchema = z10.enum([
|
|
|
3504
4488
|
"circle-plus-minus"
|
|
3505
4489
|
// ⊕ becomes ⊖ (swap with fade)
|
|
3506
4490
|
]);
|
|
3507
|
-
var accordionSystemSchema =
|
|
4491
|
+
var accordionSystemSchema = z9.object({
|
|
3508
4492
|
// Visual styling (solid color only - gradients can be added later if needed).
|
|
3509
4493
|
// null = no fill, so the accordion sits transparently on the section
|
|
3510
4494
|
// surface (used by open, boxless "divided" looks).
|
|
3511
|
-
background:
|
|
3512
|
-
type:
|
|
4495
|
+
background: z9.object({
|
|
4496
|
+
type: z9.literal("solid"),
|
|
3513
4497
|
colorToken: themeColorTokenSchema
|
|
3514
4498
|
}).nullable(),
|
|
3515
4499
|
// Spacing (padding inside items)
|
|
3516
|
-
spacing:
|
|
4500
|
+
spacing: z9.enum(["none", "compact", "cozy", "medium", "comfortable", "spacious"]),
|
|
3517
4501
|
// Border radius (null = inherit from theme.corners)
|
|
3518
|
-
corners:
|
|
4502
|
+
corners: z9.enum(["square", "soft", "rounded", "pill"]).nullable(),
|
|
3519
4503
|
// Border styling (null = inherit from theme.border)
|
|
3520
|
-
border:
|
|
3521
|
-
widthClass:
|
|
4504
|
+
border: z9.object({
|
|
4505
|
+
widthClass: z9.string(),
|
|
3522
4506
|
// e.g., 'border', 'border-2', 'border-0'
|
|
3523
4507
|
colorToken: themeColorTokenSchema
|
|
3524
4508
|
}).nullable(),
|
|
3525
4509
|
// Shadow (null = inherit from theme.shadow)
|
|
3526
|
-
shadow:
|
|
3527
|
-
elevation:
|
|
3528
|
-
softness:
|
|
3529
|
-
position:
|
|
4510
|
+
shadow: z9.object({
|
|
4511
|
+
elevation: z9.enum(["none", "low", "medium", "high"]),
|
|
4512
|
+
softness: z9.enum(["soft", "crisp", "hard"]).nullable(),
|
|
4513
|
+
position: z9.enum(["bottom", "bottom-right"])
|
|
3530
4514
|
}).nullable(),
|
|
3531
4515
|
// Icon style and animation
|
|
3532
|
-
icon:
|
|
4516
|
+
icon: z9.object({
|
|
3533
4517
|
style: accordionIconSchema,
|
|
3534
|
-
position:
|
|
3535
|
-
size:
|
|
4518
|
+
position: z9.enum(["left", "right"]),
|
|
4519
|
+
size: z9.enum(["sm", "md", "lg"]),
|
|
3536
4520
|
colorToken: themeColorTokenSchema.optional()
|
|
3537
4521
|
}),
|
|
3538
4522
|
// Trigger (question) styling
|
|
3539
|
-
trigger:
|
|
4523
|
+
trigger: z9.object({
|
|
3540
4524
|
textColorToken: themeColorTokenSchema,
|
|
3541
|
-
fontWeight:
|
|
4525
|
+
fontWeight: z9.enum(["regular", "medium", "semibold", "bold"]).nullable(),
|
|
3542
4526
|
// null = inherit from theme
|
|
3543
4527
|
// Question typography. Defaults keep the historical body-font look; set
|
|
3544
4528
|
// fontFamily 'heading' + a larger scale to give questions real presence.
|
|
3545
|
-
fontFamily:
|
|
4529
|
+
fontFamily: z9.enum(["body", "heading"]).optional(),
|
|
3546
4530
|
// default 'body'
|
|
3547
|
-
fontScale:
|
|
4531
|
+
fontScale: z9.enum(["body", "md", "lg"]).optional(),
|
|
3548
4532
|
// default 'body'
|
|
3549
|
-
letterSpacing:
|
|
3550
|
-
textTransform:
|
|
4533
|
+
letterSpacing: z9.enum(["normal", "tight", "wide"]).optional(),
|
|
4534
|
+
textTransform: z9.enum(["none", "uppercase"]).optional()
|
|
3551
4535
|
}),
|
|
3552
4536
|
// Hover state styling
|
|
3553
|
-
hover:
|
|
4537
|
+
hover: z9.object({
|
|
3554
4538
|
backgroundColorToken: themeColorTokenSchema.optional(),
|
|
3555
4539
|
textColorToken: themeColorTokenSchema.optional(),
|
|
3556
4540
|
borderColorToken: themeColorTokenSchema.optional()
|
|
3557
4541
|
}),
|
|
3558
4542
|
// Open-state emphasis: how an expanded item is visually rewarded. All
|
|
3559
4543
|
// optional; omit for the historical "only the text recolors" behaviour.
|
|
3560
|
-
openState:
|
|
4544
|
+
openState: z9.object({
|
|
3561
4545
|
backgroundColorToken: themeColorTokenSchema.optional(),
|
|
3562
4546
|
triggerColorToken: themeColorTokenSchema.optional(),
|
|
3563
|
-
accent:
|
|
3564
|
-
edge:
|
|
4547
|
+
accent: z9.object({
|
|
4548
|
+
edge: z9.enum(["left", "top", "bottom"]),
|
|
3565
4549
|
colorToken: themeColorTokenSchema,
|
|
3566
|
-
thickness:
|
|
4550
|
+
thickness: z9.enum(["thin", "medium", "thick"])
|
|
3567
4551
|
}).optional()
|
|
3568
4552
|
}).optional(),
|
|
3569
4553
|
// Content (answer) styling
|
|
3570
|
-
content:
|
|
4554
|
+
content: z9.object({
|
|
3571
4555
|
textColorToken: themeColorTokenSchema
|
|
3572
4556
|
})
|
|
3573
4557
|
});
|
|
3574
4558
|
|
|
3575
4559
|
// ../theme-core/src/inputs/types.ts
|
|
3576
|
-
import { z as
|
|
3577
|
-
var inputSystemSchema =
|
|
4560
|
+
import { z as z10 } from "zod";
|
|
4561
|
+
var inputSystemSchema = z10.object({
|
|
3578
4562
|
// Base styling (applied to all inputs)
|
|
3579
|
-
base:
|
|
3580
|
-
background:
|
|
3581
|
-
|
|
3582
|
-
type:
|
|
4563
|
+
base: z10.object({
|
|
4564
|
+
background: z10.union([
|
|
4565
|
+
z10.object({
|
|
4566
|
+
type: z10.literal("solid"),
|
|
3583
4567
|
colorToken: themeColorTokenSchema
|
|
3584
4568
|
}),
|
|
3585
|
-
|
|
3586
|
-
type:
|
|
4569
|
+
z10.object({
|
|
4570
|
+
type: z10.literal("transparent")
|
|
3587
4571
|
})
|
|
3588
4572
|
]),
|
|
3589
4573
|
textColorToken: themeColorTokenSchema,
|
|
3590
|
-
border:
|
|
3591
|
-
widthClass:
|
|
4574
|
+
border: z10.object({
|
|
4575
|
+
widthClass: z10.string(),
|
|
3592
4576
|
// e.g., 'border', 'border-2'
|
|
3593
4577
|
colorToken: themeColorTokenSchema,
|
|
3594
|
-
style:
|
|
4578
|
+
style: z10.enum(["all", "underline"]).optional()
|
|
3595
4579
|
}),
|
|
3596
|
-
corners:
|
|
4580
|
+
corners: z10.enum(["square", "soft", "rounded", "pill"]).nullable(),
|
|
3597
4581
|
// null = inherit from theme.corners
|
|
3598
|
-
shadow:
|
|
3599
|
-
elevation:
|
|
3600
|
-
softness:
|
|
4582
|
+
shadow: z10.object({
|
|
4583
|
+
elevation: z10.enum(["none", "low", "medium"]),
|
|
4584
|
+
softness: z10.enum(["soft", "crisp", "hard"]).nullable()
|
|
3601
4585
|
}).nullable(),
|
|
3602
|
-
spacing:
|
|
4586
|
+
spacing: z10.enum(["compact", "cozy", "medium", "comfortable"]),
|
|
3603
4587
|
// padding inside inputs
|
|
3604
|
-
fontSize:
|
|
4588
|
+
fontSize: z10.enum(["sm", "base", "lg"])
|
|
3605
4589
|
}),
|
|
3606
4590
|
// Label styling
|
|
3607
|
-
label:
|
|
4591
|
+
label: z10.object({
|
|
3608
4592
|
textColorToken: themeColorTokenSchema,
|
|
3609
|
-
fontWeight:
|
|
3610
|
-
fontSize:
|
|
3611
|
-
textTransform:
|
|
3612
|
-
letterSpacing:
|
|
3613
|
-
opacity:
|
|
4593
|
+
fontWeight: z10.enum(["regular", "medium", "semibold", "bold", "black"]),
|
|
4594
|
+
fontSize: z10.enum(["2xs", "xs", "sm", "base"]),
|
|
4595
|
+
textTransform: z10.enum(["none", "uppercase", "lowercase", "capitalize"]).optional(),
|
|
4596
|
+
letterSpacing: z10.enum(["normal", "wide", "wider", "widest"]).optional(),
|
|
4597
|
+
opacity: z10.number().min(0.2).max(1).optional()
|
|
3614
4598
|
}),
|
|
3615
4599
|
// Focus state
|
|
3616
|
-
focus:
|
|
4600
|
+
focus: z10.object({
|
|
3617
4601
|
ringColorToken: themeColorTokenSchema,
|
|
3618
|
-
ringWidth:
|
|
4602
|
+
ringWidth: z10.enum(["0", "1", "2", "3"]),
|
|
3619
4603
|
borderColorToken: themeColorTokenSchema.optional()
|
|
3620
4604
|
// Change border color on focus
|
|
3621
4605
|
}),
|
|
3622
4606
|
// Error state (for validation feedback)
|
|
3623
|
-
error:
|
|
4607
|
+
error: z10.object({
|
|
3624
4608
|
borderColorToken: themeColorTokenSchema,
|
|
3625
4609
|
textColorToken: themeColorTokenSchema
|
|
3626
4610
|
}),
|
|
3627
4611
|
// Disabled state
|
|
3628
|
-
disabled:
|
|
4612
|
+
disabled: z10.object({
|
|
3629
4613
|
backgroundColorToken: themeColorTokenSchema,
|
|
3630
4614
|
textColorToken: themeColorTokenSchema,
|
|
3631
|
-
opacity:
|
|
4615
|
+
opacity: z10.number().min(0.3).max(0.7)
|
|
3632
4616
|
})
|
|
3633
4617
|
});
|
|
3634
4618
|
|
|
3635
4619
|
// ../theme-core/src/gradients/types.ts
|
|
3636
|
-
import { z as
|
|
3637
|
-
var gradientStopSchema =
|
|
4620
|
+
import { z as z11 } from "zod";
|
|
4621
|
+
var gradientStopSchema = z11.object({
|
|
3638
4622
|
color: themeColorTokenSchema,
|
|
3639
|
-
position:
|
|
4623
|
+
position: z11.number().min(0).max(100)
|
|
3640
4624
|
// Percentage 0-100
|
|
3641
4625
|
});
|
|
3642
|
-
var gradientConfigSchema =
|
|
3643
|
-
type:
|
|
3644
|
-
angle:
|
|
4626
|
+
var gradientConfigSchema = z11.object({
|
|
4627
|
+
type: z11.enum(["linear", "radial"]),
|
|
4628
|
+
angle: z11.number().min(0).max(360).optional(),
|
|
3645
4629
|
// For linear gradients (degrees)
|
|
3646
|
-
position:
|
|
4630
|
+
position: z11.string().optional(),
|
|
3647
4631
|
// For radial gradients ('center', 'top left', etc.)
|
|
3648
|
-
stops:
|
|
4632
|
+
stops: z11.array(gradientStopSchema).min(2)
|
|
3649
4633
|
});
|
|
3650
4634
|
|
|
3651
4635
|
// ../theme-core/src/navigation/types.ts
|
|
3652
|
-
import { z as
|
|
4636
|
+
import { z as z13 } from "zod";
|
|
3653
4637
|
|
|
3654
4638
|
// ../theme-core/src/interactive/baseSchema.ts
|
|
3655
|
-
import { z as
|
|
3656
|
-
var interactiveTypographySchema =
|
|
4639
|
+
import { z as z12 } from "zod";
|
|
4640
|
+
var interactiveTypographySchema = z12.object({
|
|
3657
4641
|
/** Font family source */
|
|
3658
|
-
typography:
|
|
4642
|
+
typography: z12.enum(["body", "heading"]).default("body"),
|
|
3659
4643
|
/** Font weight */
|
|
3660
|
-
fontWeight:
|
|
4644
|
+
fontWeight: z12.enum(["regular", "medium", "semibold", "bold"]).default("medium"),
|
|
3661
4645
|
/** Text transform */
|
|
3662
|
-
textTransform:
|
|
4646
|
+
textTransform: z12.enum(["none", "uppercase", "capitalize"]).default("none"),
|
|
3663
4647
|
/** Italic style */
|
|
3664
|
-
italic:
|
|
4648
|
+
italic: z12.boolean().default(false)
|
|
3665
4649
|
});
|
|
3666
|
-
var effectApplicationSchema2 =
|
|
4650
|
+
var effectApplicationSchema2 = z12.object({
|
|
3667
4651
|
/** Effect preset ID */
|
|
3668
|
-
effectId:
|
|
4652
|
+
effectId: z12.string(),
|
|
3669
4653
|
/** User-provided customization options */
|
|
3670
|
-
options:
|
|
4654
|
+
options: z12.record(z12.string(), z12.any()).optional()
|
|
3671
4655
|
});
|
|
3672
|
-
var effectCompositionSchema =
|
|
4656
|
+
var effectCompositionSchema = z12.object({
|
|
3673
4657
|
/** Effects always applied */
|
|
3674
|
-
base:
|
|
4658
|
+
base: z12.array(effectApplicationSchema2).optional(),
|
|
3675
4659
|
/** Effects applied on hover */
|
|
3676
|
-
hover:
|
|
4660
|
+
hover: z12.array(effectApplicationSchema2).optional(),
|
|
3677
4661
|
/** Effects applied on active/pressed */
|
|
3678
|
-
active:
|
|
4662
|
+
active: z12.array(effectApplicationSchema2).optional(),
|
|
3679
4663
|
/** Effects applied on focus */
|
|
3680
|
-
focus:
|
|
4664
|
+
focus: z12.array(effectApplicationSchema2).optional()
|
|
3681
4665
|
});
|
|
3682
4666
|
|
|
3683
4667
|
// ../theme-core/src/navigation/types.ts
|
|
3684
|
-
var navLinkPaddingSchema =
|
|
3685
|
-
var navLinkPaddingXSchema =
|
|
3686
|
-
var navLinkBorderRadiusSchema =
|
|
3687
|
-
var navLinkTextSizeSchema =
|
|
3688
|
-
var navLinkLetterSpacingSchema =
|
|
3689
|
-
var navLinkContrastTreatmentSchema =
|
|
3690
|
-
var navLinkStyleSchema =
|
|
4668
|
+
var navLinkPaddingSchema = z13.enum(["none", "compact", "default"]);
|
|
4669
|
+
var navLinkPaddingXSchema = z13.enum(["none", "tight", "compact", "default", "relaxed", "spacious"]);
|
|
4670
|
+
var navLinkBorderRadiusSchema = z13.enum(["none", "sm", "md", "full"]);
|
|
4671
|
+
var navLinkTextSizeSchema = z13.enum(["xs", "sm", "base", "lg"]);
|
|
4672
|
+
var navLinkLetterSpacingSchema = z13.enum(["normal", "wide", "wider", "widest"]);
|
|
4673
|
+
var navLinkContrastTreatmentSchema = z13.enum(["none", "soft-glow"]);
|
|
4674
|
+
var navLinkStyleSchema = z13.object({
|
|
3691
4675
|
/** Display name for the style */
|
|
3692
|
-
name:
|
|
4676
|
+
name: z13.string().min(1).max(30).optional(),
|
|
3693
4677
|
/** Typography settings (inherited from interactive base) */
|
|
3694
4678
|
...interactiveTypographySchema.shape,
|
|
3695
4679
|
/** Text color token */
|
|
@@ -3713,7 +4697,7 @@ var navLinkStyleSchema = z14.object({
|
|
|
3713
4697
|
});
|
|
3714
4698
|
|
|
3715
4699
|
// ../theme-core/src/customCss/validation.ts
|
|
3716
|
-
import { z as
|
|
4700
|
+
import { z as z14 } from "zod";
|
|
3717
4701
|
var FORBIDDEN_SELECTORS = [":root", "html", "body"];
|
|
3718
4702
|
var UNIVERSAL_SELECTOR = "*";
|
|
3719
4703
|
var REMOTE_URL_PATTERN = /url\s*\(\s*['"]?(https?:|\/\/)/i;
|
|
@@ -3755,7 +4739,7 @@ function containsForbiddenSelector(selector) {
|
|
|
3755
4739
|
}
|
|
3756
4740
|
return false;
|
|
3757
4741
|
}
|
|
3758
|
-
var selectorSchema =
|
|
4742
|
+
var selectorSchema = z14.string().min(1, "Selector cannot be empty").max(200, "Selector too long (max 200 characters)").refine(
|
|
3759
4743
|
(s) => !containsForbiddenSelector(s),
|
|
3760
4744
|
{ message: "Global selectors (:root, html, body, *) are not allowed" }
|
|
3761
4745
|
);
|
|
@@ -3765,38 +4749,38 @@ function containsRemoteUrl(value) {
|
|
|
3765
4749
|
function containsJavascriptUrl(value) {
|
|
3766
4750
|
return JAVASCRIPT_URL_PATTERN.test(value);
|
|
3767
4751
|
}
|
|
3768
|
-
var declarationValueSchema =
|
|
4752
|
+
var declarationValueSchema = z14.string().max(500, "Declaration value too long (max 500 characters)").refine(
|
|
3769
4753
|
(v) => !containsRemoteUrl(v),
|
|
3770
4754
|
{ message: "Remote url() references are not allowed. Use local paths, data URIs, or fragment IDs." }
|
|
3771
4755
|
).refine(
|
|
3772
4756
|
(v) => !containsJavascriptUrl(v),
|
|
3773
4757
|
{ message: "javascript: URLs are not allowed" }
|
|
3774
4758
|
);
|
|
3775
|
-
var declarationsSchema =
|
|
3776
|
-
|
|
4759
|
+
var declarationsSchema = z14.record(
|
|
4760
|
+
z14.string().min(1).max(100),
|
|
3777
4761
|
// property name
|
|
3778
4762
|
declarationValueSchema
|
|
3779
4763
|
// property value
|
|
3780
4764
|
);
|
|
3781
|
-
var customCssRuleSchema =
|
|
3782
|
-
id:
|
|
4765
|
+
var customCssRuleSchema = z14.object({
|
|
4766
|
+
id: z14.string().min(1, "Rule ID is required").max(50, "Rule ID too long"),
|
|
3783
4767
|
selector: selectorSchema,
|
|
3784
4768
|
declarations: declarationsSchema
|
|
3785
4769
|
});
|
|
3786
4770
|
var blockCustomCssRuleSchema = customCssRuleSchema.extend({
|
|
3787
|
-
blockKind:
|
|
4771
|
+
blockKind: z14.string().min(1, "Block kind is required").max(50, "Block kind too long")
|
|
3788
4772
|
});
|
|
3789
|
-
var customCssRulesSchema =
|
|
3790
|
-
var blockCustomCssRulesSchema =
|
|
4773
|
+
var customCssRulesSchema = z14.array(customCssRuleSchema).optional();
|
|
4774
|
+
var blockCustomCssRulesSchema = z14.array(blockCustomCssRuleSchema).optional();
|
|
3791
4775
|
|
|
3792
4776
|
// ../theme-core/src/customCss/atRuleValidation.ts
|
|
3793
|
-
import { z as
|
|
4777
|
+
import { z as z15 } from "zod";
|
|
3794
4778
|
var KEYFRAME_OFFSET_PATTERN = /^(from|to|\d{1,3}%)$/i;
|
|
3795
4779
|
var ANIMATION_NAME_PATTERN = /^[a-zA-Z_-][a-zA-Z0-9_-]*$/;
|
|
3796
4780
|
var BLOCKED_AT_RULES = ["@import", "@charset"];
|
|
3797
4781
|
var BLOCKED_AT_RULE_PATTERN = /@(?:import|charset)\b/i;
|
|
3798
|
-
var ruleIdSchema =
|
|
3799
|
-
var nestedRuleSchema =
|
|
4782
|
+
var ruleIdSchema = z15.string().min(1, "Rule ID is required").max(50, "Rule ID too long");
|
|
4783
|
+
var nestedRuleSchema = z15.object({
|
|
3800
4784
|
selector: selectorSchema,
|
|
3801
4785
|
declarations: declarationsSchema
|
|
3802
4786
|
});
|
|
@@ -3808,88 +4792,88 @@ function isValidKeyframeOffset(offset) {
|
|
|
3808
4792
|
const value = parseInt(match[1], 10);
|
|
3809
4793
|
return value >= 0 && value <= 100;
|
|
3810
4794
|
}
|
|
3811
|
-
var keyframeOffsetSchema =
|
|
4795
|
+
var keyframeOffsetSchema = z15.string().transform((offset) => offset.trim()).refine(
|
|
3812
4796
|
(offset) => KEYFRAME_OFFSET_PATTERN.test(offset),
|
|
3813
4797
|
{ message: 'Invalid keyframe offset. Use percentages (0%, 50%, 100%) or "from"/"to"' }
|
|
3814
4798
|
).refine(
|
|
3815
4799
|
isValidKeyframeOffset,
|
|
3816
4800
|
{ message: "Keyframe offset must be between 0% and 100%" }
|
|
3817
4801
|
);
|
|
3818
|
-
var animationNameSchema =
|
|
4802
|
+
var animationNameSchema = z15.string().min(1, "Animation name is required").max(50, "Animation name too long").refine(
|
|
3819
4803
|
(name) => ANIMATION_NAME_PATTERN.test(name),
|
|
3820
4804
|
{ message: "Invalid animation name. Use letters, numbers, dashes, underscores (start with letter, dash, or underscore)" }
|
|
3821
4805
|
);
|
|
3822
|
-
var keyframeSchema =
|
|
4806
|
+
var keyframeSchema = z15.object({
|
|
3823
4807
|
offset: keyframeOffsetSchema,
|
|
3824
4808
|
declarations: declarationsSchema
|
|
3825
4809
|
});
|
|
3826
|
-
var keyframesAtRuleSchema =
|
|
4810
|
+
var keyframesAtRuleSchema = z15.object({
|
|
3827
4811
|
id: ruleIdSchema,
|
|
3828
|
-
type:
|
|
4812
|
+
type: z15.literal("keyframes"),
|
|
3829
4813
|
name: animationNameSchema,
|
|
3830
|
-
frames:
|
|
4814
|
+
frames: z15.array(keyframeSchema).min(1, "At least one keyframe is required")
|
|
3831
4815
|
});
|
|
3832
|
-
var fontFaceDeclarationsSchema =
|
|
4816
|
+
var fontFaceDeclarationsSchema = z15.record(z15.string().min(1).max(100), declarationValueSchema).refine(
|
|
3833
4817
|
(decls) => "fontFamily" in decls || "font-family" in decls,
|
|
3834
4818
|
{ message: "font-family is required in @font-face" }
|
|
3835
4819
|
);
|
|
3836
|
-
var fontFaceAtRuleSchema =
|
|
4820
|
+
var fontFaceAtRuleSchema = z15.object({
|
|
3837
4821
|
id: ruleIdSchema,
|
|
3838
|
-
type:
|
|
4822
|
+
type: z15.literal("font-face"),
|
|
3839
4823
|
declarations: fontFaceDeclarationsSchema
|
|
3840
4824
|
});
|
|
3841
|
-
var mediaQuerySchema =
|
|
3842
|
-
var mediaAtRuleSchema =
|
|
4825
|
+
var mediaQuerySchema = z15.string().min(1, "Media query is required").max(200, "Media query too long");
|
|
4826
|
+
var mediaAtRuleSchema = z15.object({
|
|
3843
4827
|
id: ruleIdSchema,
|
|
3844
|
-
type:
|
|
4828
|
+
type: z15.literal("media"),
|
|
3845
4829
|
query: mediaQuerySchema,
|
|
3846
|
-
rules:
|
|
4830
|
+
rules: z15.array(nestedRuleSchema).min(1, "At least one rule is required")
|
|
3847
4831
|
});
|
|
3848
|
-
var supportsConditionSchema =
|
|
3849
|
-
var supportsAtRuleSchema =
|
|
4832
|
+
var supportsConditionSchema = z15.string().min(1, "Supports condition is required").max(200, "Supports condition too long");
|
|
4833
|
+
var supportsAtRuleSchema = z15.object({
|
|
3850
4834
|
id: ruleIdSchema,
|
|
3851
|
-
type:
|
|
4835
|
+
type: z15.literal("supports"),
|
|
3852
4836
|
condition: supportsConditionSchema,
|
|
3853
|
-
rules:
|
|
4837
|
+
rules: z15.array(nestedRuleSchema).min(1, "At least one rule is required")
|
|
3854
4838
|
});
|
|
3855
4839
|
function containsBlockedAtRule(css) {
|
|
3856
4840
|
return BLOCKED_AT_RULE_PATTERN.test(css);
|
|
3857
4841
|
}
|
|
3858
|
-
var rawCssSchema =
|
|
4842
|
+
var rawCssSchema = z15.string().min(1, "CSS is required").max(5e3, "Raw CSS too long (max 5000 characters)").refine(
|
|
3859
4843
|
(css) => css.trim().startsWith("@"),
|
|
3860
4844
|
{ message: "Raw at-rule must start with @" }
|
|
3861
4845
|
).refine(
|
|
3862
4846
|
(css) => !containsBlockedAtRule(css),
|
|
3863
4847
|
{ message: `Blocked at-rules: ${BLOCKED_AT_RULES.join(", ")}. Use typed at-rules or local assets instead.` }
|
|
3864
4848
|
);
|
|
3865
|
-
var rawAtRuleSchema =
|
|
4849
|
+
var rawAtRuleSchema = z15.object({
|
|
3866
4850
|
id: ruleIdSchema,
|
|
3867
|
-
type:
|
|
4851
|
+
type: z15.literal("raw"),
|
|
3868
4852
|
css: rawCssSchema
|
|
3869
4853
|
});
|
|
3870
|
-
var customCssAtRuleSchema =
|
|
4854
|
+
var customCssAtRuleSchema = z15.discriminatedUnion("type", [
|
|
3871
4855
|
keyframesAtRuleSchema,
|
|
3872
4856
|
fontFaceAtRuleSchema,
|
|
3873
4857
|
mediaAtRuleSchema,
|
|
3874
4858
|
supportsAtRuleSchema,
|
|
3875
4859
|
rawAtRuleSchema
|
|
3876
4860
|
]);
|
|
3877
|
-
var customCssAtRulesSchema =
|
|
4861
|
+
var customCssAtRulesSchema = z15.array(customCssAtRuleSchema).optional();
|
|
3878
4862
|
|
|
3879
4863
|
// ../theme-core/src/shared/componentStyles.ts
|
|
3880
|
-
import { z as
|
|
3881
|
-
var componentBorderSchema =
|
|
3882
|
-
width:
|
|
3883
|
-
style:
|
|
4864
|
+
import { z as z16 } from "zod";
|
|
4865
|
+
var componentBorderSchema = z16.object({
|
|
4866
|
+
width: z16.enum(["none", "hairline", "thin", "medium", "thick"]).default("none"),
|
|
4867
|
+
style: z16.enum(["solid", "dashed"]).default("solid"),
|
|
3884
4868
|
colorToken: themeColorTokenSchema.optional()
|
|
3885
4869
|
// defaults to "border" if not set
|
|
3886
4870
|
});
|
|
3887
|
-
var componentShadowSchema =
|
|
3888
|
-
elevation:
|
|
4871
|
+
var componentShadowSchema = z16.object({
|
|
4872
|
+
elevation: z16.enum(["none", "sm", "md", "lg", "xl", "2xl"]).default("sm")
|
|
3889
4873
|
});
|
|
3890
4874
|
|
|
3891
4875
|
// ../theme-core/src/site-styles/logoBranding.ts
|
|
3892
|
-
import { z as
|
|
4876
|
+
import { z as z17 } from "zod";
|
|
3893
4877
|
var logoTextConfidenceValues = ["low", "medium", "high"];
|
|
3894
4878
|
var logoAssetShapeValues = [
|
|
3895
4879
|
"none",
|
|
@@ -3907,43 +4891,43 @@ var logoKindValues = [
|
|
|
3907
4891
|
"unknown"
|
|
3908
4892
|
];
|
|
3909
4893
|
var logoDensityValues = ["simple", "detailed", "unknown"];
|
|
3910
|
-
var logoContainsTextSchema =
|
|
3911
|
-
|
|
3912
|
-
kind:
|
|
3913
|
-
confidence:
|
|
3914
|
-
text:
|
|
4894
|
+
var logoContainsTextSchema = z17.discriminatedUnion("kind", [
|
|
4895
|
+
z17.object({
|
|
4896
|
+
kind: z17.literal("contains-text"),
|
|
4897
|
+
confidence: z17.enum(logoTextConfidenceValues),
|
|
4898
|
+
text: z17.string().trim().min(1).max(200).optional()
|
|
3915
4899
|
}),
|
|
3916
|
-
|
|
3917
|
-
kind:
|
|
3918
|
-
confidence:
|
|
4900
|
+
z17.object({
|
|
4901
|
+
kind: z17.literal("no-text"),
|
|
4902
|
+
confidence: z17.enum(logoTextConfidenceValues)
|
|
3919
4903
|
}),
|
|
3920
|
-
|
|
3921
|
-
kind:
|
|
3922
|
-
reason:
|
|
4904
|
+
z17.object({
|
|
4905
|
+
kind: z17.literal("unknown"),
|
|
4906
|
+
reason: z17.enum([
|
|
3923
4907
|
"analysis-unavailable",
|
|
3924
4908
|
"unsupported-file",
|
|
3925
4909
|
"low-confidence"
|
|
3926
4910
|
])
|
|
3927
4911
|
})
|
|
3928
4912
|
]);
|
|
3929
|
-
var logoAnalysisSourceSchema =
|
|
3930
|
-
|
|
3931
|
-
|
|
3932
|
-
kind:
|
|
3933
|
-
reason:
|
|
4913
|
+
var logoAnalysisSourceSchema = z17.discriminatedUnion("kind", [
|
|
4914
|
+
z17.object({ kind: z17.literal("none") }),
|
|
4915
|
+
z17.object({
|
|
4916
|
+
kind: z17.literal("deterministic"),
|
|
4917
|
+
reason: z17.enum(["dimensions", "fallback"])
|
|
3934
4918
|
}),
|
|
3935
|
-
|
|
3936
|
-
kind:
|
|
3937
|
-
model:
|
|
3938
|
-
analyzedAt:
|
|
4919
|
+
z17.object({
|
|
4920
|
+
kind: z17.literal("llm"),
|
|
4921
|
+
model: z17.literal("gpt-5.4-mini"),
|
|
4922
|
+
analyzedAt: z17.string().trim().min(1).max(80).optional()
|
|
3939
4923
|
}),
|
|
3940
|
-
|
|
4924
|
+
z17.object({ kind: z17.literal("manual-override") })
|
|
3941
4925
|
]);
|
|
3942
|
-
var logoFactsSchema =
|
|
3943
|
-
shape:
|
|
4926
|
+
var logoFactsSchema = z17.object({
|
|
4927
|
+
shape: z17.enum(logoAssetShapeValues),
|
|
3944
4928
|
containsText: logoContainsTextSchema,
|
|
3945
|
-
kind:
|
|
3946
|
-
density:
|
|
4929
|
+
kind: z17.enum(logoKindValues),
|
|
4930
|
+
density: z17.enum(logoDensityValues),
|
|
3947
4931
|
source: logoAnalysisSourceSchema
|
|
3948
4932
|
});
|
|
3949
4933
|
var brandDisplayModeValues = [
|
|
@@ -3998,9 +4982,10 @@ var themeV2CompilerOwnedFieldNames = [
|
|
|
3998
4982
|
...themeV2BlockSpecificRawStyleFieldNames
|
|
3999
4983
|
];
|
|
4000
4984
|
var pageDesignEditorBackgroundOverrideOwner = "page-design-editor";
|
|
4985
|
+
var siteChromeBackgroundOverrideOwner = "site-chrome-editor";
|
|
4001
4986
|
|
|
4002
4987
|
// ../theme-core/src/utils/tokenOrColor.ts
|
|
4003
|
-
import { z as
|
|
4988
|
+
import { z as z18 } from "zod";
|
|
4004
4989
|
|
|
4005
4990
|
// ../theme-core/src/utils/colorStyles.ts
|
|
4006
4991
|
var COLOR_VAR_PREFIX = "--tb-";
|
|
@@ -4047,77 +5032,77 @@ function mergeStyles(...styles) {
|
|
|
4047
5032
|
}
|
|
4048
5033
|
|
|
4049
5034
|
// ../theme-core/src/utils/tokenOrColor.ts
|
|
4050
|
-
var tokenOrCssColorValueSchema =
|
|
5035
|
+
var tokenOrCssColorValueSchema = z18.string();
|
|
4051
5036
|
|
|
4052
5037
|
// ../theme-core/src/schema.ts
|
|
4053
|
-
var axesSchema =
|
|
4054
|
-
tone:
|
|
4055
|
-
energy:
|
|
4056
|
-
density:
|
|
4057
|
-
mediaBias:
|
|
4058
|
-
conversionBias:
|
|
4059
|
-
motion:
|
|
4060
|
-
});
|
|
4061
|
-
var colourHexString =
|
|
4062
|
-
var paletteColorSchema =
|
|
4063
|
-
name:
|
|
5038
|
+
var axesSchema = z19.object({
|
|
5039
|
+
tone: z19.enum(["minimal", "classic", "bold"]),
|
|
5040
|
+
energy: z19.enum(["calm", "vibrant"]),
|
|
5041
|
+
density: z19.enum(["airy", "regular", "compact"]),
|
|
5042
|
+
mediaBias: z19.enum(["text", "media", "mixed"]),
|
|
5043
|
+
conversionBias: z19.enum(["low", "med", "high"]),
|
|
5044
|
+
motion: z19.enum(["subtle", "standard", "expressive"])
|
|
5045
|
+
});
|
|
5046
|
+
var colourHexString = z19.string().regex(/^#([0-9A-Fa-f]{3}){1,2}$/);
|
|
5047
|
+
var paletteColorSchema = z19.object({
|
|
5048
|
+
name: z19.string().min(1),
|
|
4064
5049
|
hex: colourHexString
|
|
4065
5050
|
});
|
|
4066
|
-
var paletteMetaSchema =
|
|
4067
|
-
mode:
|
|
5051
|
+
var paletteMetaSchema = z19.object({
|
|
5052
|
+
mode: z19.enum(["light", "dark"])
|
|
4068
5053
|
});
|
|
4069
|
-
var paletteSchema =
|
|
4070
|
-
colors:
|
|
5054
|
+
var paletteSchema = z19.object({
|
|
5055
|
+
colors: z19.array(paletteColorSchema),
|
|
4071
5056
|
meta: paletteMetaSchema
|
|
4072
5057
|
});
|
|
4073
|
-
var typographyStyleSchema =
|
|
4074
|
-
family:
|
|
4075
|
-
weight:
|
|
4076
|
-
letterSpacing:
|
|
4077
|
-
lineHeight:
|
|
5058
|
+
var typographyStyleSchema = z19.object({
|
|
5059
|
+
family: z19.string().min(1),
|
|
5060
|
+
weight: z19.enum(["light", "regular", "medium", "semibold", "bold"]),
|
|
5061
|
+
letterSpacing: z19.enum(["tight", "normal", "loose"]),
|
|
5062
|
+
lineHeight: z19.enum(["normal", "relaxed", "loose"])
|
|
4078
5063
|
});
|
|
4079
5064
|
var bodyTypographyStyleSchema = typographyStyleSchema.extend({
|
|
4080
|
-
size:
|
|
5065
|
+
size: z19.enum(["md", "lg", "xl"])
|
|
4081
5066
|
});
|
|
4082
|
-
var headingSizeSchema =
|
|
4083
|
-
var headingTypographyOverridesSchema =
|
|
4084
|
-
weight:
|
|
4085
|
-
letterSpacing:
|
|
5067
|
+
var headingSizeSchema = z19.enum(["xs", "sm", "md", "lg", "xl", "2xl"]);
|
|
5068
|
+
var headingTypographyOverridesSchema = z19.object({
|
|
5069
|
+
weight: z19.enum(["light", "regular", "medium", "semibold", "bold"]).nullable().optional(),
|
|
5070
|
+
letterSpacing: z19.enum(["tight", "normal", "loose"]).nullable().optional(),
|
|
4086
5071
|
size: headingSizeSchema.nullable().optional(),
|
|
4087
|
-
lineHeight:
|
|
4088
|
-
italic:
|
|
5072
|
+
lineHeight: z19.enum(["normal", "relaxed", "loose"]).nullable().optional(),
|
|
5073
|
+
italic: z19.boolean().nullable().optional(),
|
|
4089
5074
|
colorToken: themeColorTokenSchema.nullable().optional()
|
|
4090
5075
|
});
|
|
4091
5076
|
var headingTypographyStyleSchema = typographyStyleSchema.extend({
|
|
4092
|
-
case:
|
|
4093
|
-
italic:
|
|
5077
|
+
case: z19.enum(["uppercase", "normal", "smallCaps"]).nullable(),
|
|
5078
|
+
italic: z19.boolean().nullable(),
|
|
4094
5079
|
colorToken: themeColorTokenSchema.nullable().optional()
|
|
4095
5080
|
});
|
|
4096
|
-
var proseLinkUnderlineStyleSchema =
|
|
4097
|
-
var proseLinkUnderlineThicknessSchema =
|
|
5081
|
+
var proseLinkUnderlineStyleSchema = z19.enum(["solid", "dotted", "dashed"]);
|
|
5082
|
+
var proseLinkUnderlineThicknessSchema = z19.enum([
|
|
4098
5083
|
"auto",
|
|
4099
5084
|
"fromFont",
|
|
4100
5085
|
"thin",
|
|
4101
5086
|
"medium",
|
|
4102
5087
|
"thick"
|
|
4103
5088
|
]);
|
|
4104
|
-
var proseLinkUnderlineOffsetSchema =
|
|
5089
|
+
var proseLinkUnderlineOffsetSchema = z19.enum([
|
|
4105
5090
|
"auto",
|
|
4106
5091
|
"tight",
|
|
4107
5092
|
"normal",
|
|
4108
5093
|
"loose"
|
|
4109
5094
|
]);
|
|
4110
|
-
var proseLinkStyleSchema =
|
|
5095
|
+
var proseLinkStyleSchema = z19.object({
|
|
4111
5096
|
colorToken: themeColorTokenSchema.optional(),
|
|
4112
5097
|
hoverColorToken: themeColorTokenSchema.optional(),
|
|
4113
|
-
underline:
|
|
5098
|
+
underline: z19.boolean().optional(),
|
|
4114
5099
|
decorationColorToken: themeColorTokenSchema.optional(),
|
|
4115
5100
|
hoverDecorationColorToken: themeColorTokenSchema.optional(),
|
|
4116
5101
|
underlineStyle: proseLinkUnderlineStyleSchema.optional(),
|
|
4117
5102
|
underlineThickness: proseLinkUnderlineThicknessSchema.optional(),
|
|
4118
5103
|
underlineOffset: proseLinkUnderlineOffsetSchema.optional()
|
|
4119
5104
|
});
|
|
4120
|
-
var semanticSpacingSchema =
|
|
5105
|
+
var semanticSpacingSchema = z19.enum([
|
|
4121
5106
|
"none",
|
|
4122
5107
|
"compact",
|
|
4123
5108
|
"cozy",
|
|
@@ -4125,61 +5110,61 @@ var semanticSpacingSchema = z20.enum([
|
|
|
4125
5110
|
"comfortable",
|
|
4126
5111
|
"spacious"
|
|
4127
5112
|
]);
|
|
4128
|
-
var boxRoundedSchema =
|
|
4129
|
-
var boxBackgroundOverlaySchema =
|
|
4130
|
-
type:
|
|
5113
|
+
var boxRoundedSchema = z19.enum(["none", "sm", "md", "lg", "xl", "2xl", "full"]);
|
|
5114
|
+
var boxBackgroundOverlaySchema = z19.object({
|
|
5115
|
+
type: z19.enum(["none", "color", "gradient"]).nullable().optional(),
|
|
4131
5116
|
color: tokenOrCssColorValueSchema.nullable().optional(),
|
|
4132
|
-
gradient:
|
|
4133
|
-
opacity:
|
|
5117
|
+
gradient: z19.string().nullable().optional(),
|
|
5118
|
+
opacity: z19.number().min(0).max(1).nullable().optional()
|
|
4134
5119
|
});
|
|
4135
|
-
var boxBackgroundSchema =
|
|
4136
|
-
type:
|
|
4137
|
-
contentOwner:
|
|
5120
|
+
var boxBackgroundSchema = z19.object({
|
|
5121
|
+
type: z19.enum(["color", "gradient", "image"]).optional(),
|
|
5122
|
+
contentOwner: z19.literal(pageDesignEditorBackgroundOverrideOwner).optional(),
|
|
4138
5123
|
color: tokenOrCssColorValueSchema.nullable().optional(),
|
|
4139
|
-
gradient:
|
|
4140
|
-
gradientPresetId:
|
|
5124
|
+
gradient: z19.string().nullable().optional(),
|
|
5125
|
+
gradientPresetId: z19.string().min(1).nullable().optional(),
|
|
4141
5126
|
image: mediaSchema.nullable().optional(),
|
|
4142
|
-
objectFit:
|
|
4143
|
-
scale:
|
|
4144
|
-
position:
|
|
4145
|
-
opacity:
|
|
4146
|
-
motion:
|
|
5127
|
+
objectFit: z19.enum(["fill", "fit", "original", "custom"]).nullable().optional(),
|
|
5128
|
+
scale: z19.string().nullable().optional(),
|
|
5129
|
+
position: z19.string().nullable().optional(),
|
|
5130
|
+
opacity: z19.number().min(0).max(1).nullable().optional(),
|
|
5131
|
+
motion: z19.enum(["static", "fixed-frame"]).nullable().optional(),
|
|
4147
5132
|
overlay: boxBackgroundOverlaySchema.nullable().optional(),
|
|
4148
5133
|
textColor: tokenOrCssColorValueSchema.nullable().optional(),
|
|
4149
5134
|
headingColor: tokenOrCssColorValueSchema.nullable().optional(),
|
|
4150
5135
|
linkColor: tokenOrCssColorValueSchema.nullable().optional(),
|
|
4151
5136
|
supportingColor: tokenOrCssColorValueSchema.nullable().optional()
|
|
4152
5137
|
});
|
|
4153
|
-
var noHeadingDecorationSchema =
|
|
4154
|
-
family:
|
|
5138
|
+
var noHeadingDecorationSchema = z19.object({
|
|
5139
|
+
family: z19.literal("none")
|
|
4155
5140
|
});
|
|
4156
|
-
var visibleHeadingDecorationSchema =
|
|
4157
|
-
family:
|
|
4158
|
-
colorToken:
|
|
5141
|
+
var visibleHeadingDecorationSchema = z19.object({
|
|
5142
|
+
family: z19.enum(visibleHeadingDecorationFamilyValues),
|
|
5143
|
+
colorToken: z19.enum(headingDecorationColorTokenValues).optional()
|
|
4159
5144
|
});
|
|
4160
|
-
var headingDecorationSchema =
|
|
5145
|
+
var headingDecorationSchema = z19.union([
|
|
4161
5146
|
noHeadingDecorationSchema,
|
|
4162
5147
|
visibleHeadingDecorationSchema
|
|
4163
5148
|
]);
|
|
4164
|
-
var headingDecorationOverrideSchema =
|
|
4165
|
-
|
|
5149
|
+
var headingDecorationOverrideSchema = z19.union([
|
|
5150
|
+
z19.enum(headingDecorationOverrideValues),
|
|
4166
5151
|
// Legacy authoring value from the earlier model. In the render-time model
|
|
4167
5152
|
// "on" cannot force a fragment into a block, so it is equivalent to default.
|
|
4168
|
-
|
|
5153
|
+
z19.literal("on").transform(() => "site-default")
|
|
4169
5154
|
]);
|
|
4170
|
-
var accordionIconTreatmentSchema =
|
|
4171
|
-
iconSet:
|
|
4172
|
-
colorToken:
|
|
4173
|
-
openColorToken:
|
|
4174
|
-
motion:
|
|
5155
|
+
var accordionIconTreatmentSchema = z19.object({
|
|
5156
|
+
iconSet: z19.enum(accordionIconSetValues),
|
|
5157
|
+
colorToken: z19.enum(accordionIconColorTokenValues),
|
|
5158
|
+
openColorToken: z19.enum(accordionIconColorTokenValues).optional(),
|
|
5159
|
+
motion: z19.enum(accordionIconMotionValues)
|
|
4175
5160
|
});
|
|
4176
|
-
var sectionStylesOverrideSchema =
|
|
5161
|
+
var sectionStylesOverrideSchema = z19.object({
|
|
4177
5162
|
background: boxBackgroundSchema.nullable().optional(),
|
|
4178
5163
|
spacing: semanticSpacingSchema.nullable().optional(),
|
|
4179
|
-
minHeight:
|
|
4180
|
-
tileTreatment:
|
|
4181
|
-
eventListTreatment:
|
|
4182
|
-
eyebrowTreatment:
|
|
5164
|
+
minHeight: z19.enum(["none", "banner", "hero", "immersive"]).nullable().optional(),
|
|
5165
|
+
tileTreatment: z19.enum(tileTreatmentValues).nullable().optional(),
|
|
5166
|
+
eventListTreatment: z19.enum(eventListTreatmentValues).nullable().optional(),
|
|
5167
|
+
eyebrowTreatment: z19.enum(eyebrowTreatmentValues).nullable().optional(),
|
|
4183
5168
|
headingDecoration: headingDecorationSchema.nullable().optional(),
|
|
4184
5169
|
// Author-level opt-out consumed by render-time theme projection. Persisted
|
|
4185
5170
|
// content may also carry legacy `headingDecoration` / `on` values; those are
|
|
@@ -4188,25 +5173,25 @@ var sectionStylesOverrideSchema = z20.object({
|
|
|
4188
5173
|
headingDecorationOverride: headingDecorationOverrideSchema.nullable().optional(),
|
|
4189
5174
|
accordionIconTreatment: accordionIconTreatmentSchema.nullable().optional()
|
|
4190
5175
|
});
|
|
4191
|
-
var containerStylesOverrideSchema =
|
|
5176
|
+
var containerStylesOverrideSchema = z19.object({
|
|
4192
5177
|
background: boxBackgroundSchema.nullable().optional(),
|
|
4193
5178
|
spacing: semanticSpacingSchema.nullable().optional(),
|
|
4194
|
-
raised:
|
|
5179
|
+
raised: z19.boolean().nullable().optional(),
|
|
4195
5180
|
rounded: boxRoundedSchema.nullable().optional(),
|
|
4196
|
-
fullWidth:
|
|
5181
|
+
fullWidth: z19.boolean().nullable().optional()
|
|
4197
5182
|
});
|
|
4198
|
-
var cardBorderOverrideSchema =
|
|
4199
|
-
enabled:
|
|
4200
|
-
width:
|
|
5183
|
+
var cardBorderOverrideSchema = z19.object({
|
|
5184
|
+
enabled: z19.boolean().nullable().optional(),
|
|
5185
|
+
width: z19.enum(["none", "1", "2", "3"]).nullable().optional(),
|
|
4201
5186
|
colorToken: themeColorTokenSchema.nullable().optional()
|
|
4202
5187
|
});
|
|
4203
|
-
var cardStylesOverrideSchema =
|
|
5188
|
+
var cardStylesOverrideSchema = z19.object({
|
|
4204
5189
|
background: boxBackgroundSchema.nullable().optional(),
|
|
4205
5190
|
border: cardBorderOverrideSchema.nullable().optional(),
|
|
4206
5191
|
spacing: semanticSpacingSchema.nullable().optional(),
|
|
4207
|
-
raised:
|
|
5192
|
+
raised: z19.boolean().nullable().optional(),
|
|
4208
5193
|
rounded: boxRoundedSchema.nullable().optional(),
|
|
4209
|
-
treatment:
|
|
5194
|
+
treatment: z19.enum([
|
|
4210
5195
|
"accent-quote",
|
|
4211
5196
|
"editorial-rule",
|
|
4212
5197
|
"soft-panel",
|
|
@@ -4218,18 +5203,18 @@ var cardStylesOverrideSchema = z20.object({
|
|
|
4218
5203
|
// 'none' is boxless. Driven by the block look via testimonialCardTreatment.
|
|
4219
5204
|
cardVariant: boxStylesCardVariantSchema.nullable().optional()
|
|
4220
5205
|
});
|
|
4221
|
-
var blockStyleOverridesSchema =
|
|
5206
|
+
var blockStyleOverridesSchema = z19.object({
|
|
4222
5207
|
sectionStyles: sectionStylesOverrideSchema.nullable().optional(),
|
|
4223
5208
|
containerStyles: containerStylesOverrideSchema.nullable().optional(),
|
|
4224
5209
|
cardStyles: cardStylesOverrideSchema.nullable().optional()
|
|
4225
5210
|
});
|
|
4226
|
-
var blockThemeOverrideSchema =
|
|
4227
|
-
typography:
|
|
5211
|
+
var blockThemeOverrideSchema = z19.object({
|
|
5212
|
+
typography: z19.object({
|
|
4228
5213
|
proseLinkStyle: proseLinkStyleSchema.optional()
|
|
4229
5214
|
}).optional(),
|
|
4230
5215
|
styles: blockStyleOverridesSchema.optional()
|
|
4231
5216
|
});
|
|
4232
|
-
var typographyScaleSchema =
|
|
5217
|
+
var typographyScaleSchema = z19.enum([
|
|
4233
5218
|
// New intuitive names
|
|
4234
5219
|
"compact",
|
|
4235
5220
|
// ratio 1.2 (was minorThird)
|
|
@@ -4242,9 +5227,9 @@ var typographyScaleSchema = z20.enum([
|
|
|
4242
5227
|
"majorThird",
|
|
4243
5228
|
"perfectFourth"
|
|
4244
5229
|
]);
|
|
4245
|
-
var typographySchema =
|
|
5230
|
+
var typographySchema = z19.object({
|
|
4246
5231
|
body: bodyTypographyStyleSchema,
|
|
4247
|
-
headings:
|
|
5232
|
+
headings: z19.object({
|
|
4248
5233
|
default: headingTypographyStyleSchema,
|
|
4249
5234
|
h1: headingTypographyOverridesSchema,
|
|
4250
5235
|
h2: headingTypographyOverridesSchema,
|
|
@@ -4257,41 +5242,41 @@ var typographySchema = z20.object({
|
|
|
4257
5242
|
scale: typographyScaleSchema,
|
|
4258
5243
|
proseLinkStyle: proseLinkStyleSchema.optional()
|
|
4259
5244
|
});
|
|
4260
|
-
var spaceSchema =
|
|
4261
|
-
var corners =
|
|
4262
|
-
var shadow =
|
|
4263
|
-
elevation:
|
|
4264
|
-
softness:
|
|
4265
|
-
position:
|
|
5245
|
+
var spaceSchema = z19.enum(["comfortable", "standard", "dense"]);
|
|
5246
|
+
var corners = z19.enum(["square", "soft", "rounded", "pill"]);
|
|
5247
|
+
var shadow = z19.object({
|
|
5248
|
+
elevation: z19.enum(["none", "low", "medium", "high"]),
|
|
5249
|
+
softness: z19.enum(["crisp", "soft", "hard"]).nullable(),
|
|
5250
|
+
position: z19.enum(["bottom", "bottom-right"]).default("bottom")
|
|
4266
5251
|
});
|
|
4267
|
-
var border =
|
|
4268
|
-
width:
|
|
4269
|
-
style:
|
|
5252
|
+
var border = z19.object({
|
|
5253
|
+
width: z19.enum(["none", "hairline", "thin", "thick"]),
|
|
5254
|
+
style: z19.enum(["solid", "dashed"])
|
|
4270
5255
|
});
|
|
4271
|
-
var motion =
|
|
4272
|
-
level:
|
|
4273
|
-
easing:
|
|
5256
|
+
var motion = z19.object({
|
|
5257
|
+
level: z19.enum(["off", "low", "medium", "high"]),
|
|
5258
|
+
easing: z19.enum(["standard", "snappy", "gentle"]).nullable()
|
|
4274
5259
|
});
|
|
4275
|
-
var buttonStyle =
|
|
5260
|
+
var buttonStyle = z19.object({
|
|
4276
5261
|
shape: corners
|
|
4277
5262
|
// Used for --radius-control CSS variable
|
|
4278
5263
|
});
|
|
4279
|
-
var cardStyle =
|
|
4280
|
-
elevation:
|
|
4281
|
-
border:
|
|
5264
|
+
var cardStyle = z19.object({
|
|
5265
|
+
elevation: z19.enum(["none", "low", "medium", "high"]),
|
|
5266
|
+
border: z19.enum(["none", "subtle", "defined"]),
|
|
4282
5267
|
shape: corners,
|
|
4283
|
-
headerStyle:
|
|
4284
|
-
mediaTreatment:
|
|
5268
|
+
headerStyle: z19.enum(["plain", "accentBar", "subtleBg"]).nullable(),
|
|
5269
|
+
mediaTreatment: z19.enum(["square", "rounded", "bleed"]).nullable()
|
|
4285
5270
|
});
|
|
4286
|
-
var inputStyle =
|
|
5271
|
+
var inputStyle = z19.object({
|
|
4287
5272
|
shape: corners,
|
|
4288
|
-
border:
|
|
4289
|
-
focus:
|
|
4290
|
-
label:
|
|
5273
|
+
border: z19.enum(["subtle", "defined", "underline"]),
|
|
5274
|
+
focus: z19.enum(["glow", "ring", "underline"]),
|
|
5275
|
+
label: z19.enum(["inside", "above"])
|
|
4291
5276
|
});
|
|
4292
|
-
var headerVariant =
|
|
4293
|
-
var headerPositioning =
|
|
4294
|
-
var headerNavStyle =
|
|
5277
|
+
var headerVariant = z19.enum(["classic", "centered", "transparent", "floating"]);
|
|
5278
|
+
var headerPositioning = z19.enum(["static", "sticky", "fixed"]);
|
|
5279
|
+
var headerNavStyle = z19.enum([
|
|
4295
5280
|
"minimal",
|
|
4296
5281
|
"underline",
|
|
4297
5282
|
"underline-grow",
|
|
@@ -4300,57 +5285,57 @@ var headerNavStyle = z20.enum([
|
|
|
4300
5285
|
"frosted",
|
|
4301
5286
|
"solid"
|
|
4302
5287
|
]);
|
|
4303
|
-
var navFontWeight =
|
|
4304
|
-
var headerMaxWidth =
|
|
4305
|
-
var headerContainerSchema =
|
|
4306
|
-
rounded:
|
|
4307
|
-
border:
|
|
4308
|
-
shadow:
|
|
4309
|
-
padding:
|
|
4310
|
-
tint:
|
|
4311
|
-
opacity:
|
|
5288
|
+
var navFontWeight = z19.enum(["regular", "medium", "semibold", "bold"]);
|
|
5289
|
+
var headerMaxWidth = z19.enum(["container", "full"]);
|
|
5290
|
+
var headerContainerSchema = z19.object({
|
|
5291
|
+
rounded: z19.enum(["none", "sm", "md", "lg", "xl", "2xl"]).default("xl"),
|
|
5292
|
+
border: z19.boolean().default(true),
|
|
5293
|
+
shadow: z19.boolean().default(true),
|
|
5294
|
+
padding: z19.enum(["sm", "md", "lg"]).default("md"),
|
|
5295
|
+
tint: z19.string().nullable().optional(),
|
|
5296
|
+
opacity: z19.number().min(0).max(1).default(0.12)
|
|
4312
5297
|
}).optional();
|
|
4313
5298
|
var headerBorderSchema = componentBorderSchema.extend({
|
|
4314
|
-
position:
|
|
5299
|
+
position: z19.enum(["bottom", "top", "both", "none"]).default("bottom")
|
|
4315
5300
|
}).optional();
|
|
4316
|
-
var logoStyleSchema =
|
|
4317
|
-
fontFamily:
|
|
4318
|
-
letterSpacing:
|
|
4319
|
-
gradient:
|
|
4320
|
-
brandDisplay:
|
|
4321
|
-
size:
|
|
4322
|
-
accommodation:
|
|
5301
|
+
var logoStyleSchema = z19.object({
|
|
5302
|
+
fontFamily: z19.enum(["heading", "body"]).default("heading"),
|
|
5303
|
+
letterSpacing: z19.enum(["normal", "wide", "wider", "widest"]).default("normal"),
|
|
5304
|
+
gradient: z19.boolean().default(false),
|
|
5305
|
+
brandDisplay: z19.enum(brandDisplayModeValues).optional(),
|
|
5306
|
+
size: z19.enum(logoSizePolicyValues).optional(),
|
|
5307
|
+
accommodation: z19.enum(logoAccommodationPatternValues).optional()
|
|
4323
5308
|
}).optional();
|
|
4324
|
-
var headerLogoTextSchema =
|
|
4325
|
-
mobileWrapLines:
|
|
4326
|
-
mobileMaxWidth:
|
|
4327
|
-
hideOnShrink:
|
|
5309
|
+
var headerLogoTextSchema = z19.object({
|
|
5310
|
+
mobileWrapLines: z19.union([z19.literal(1), z19.literal(2)]).optional(),
|
|
5311
|
+
mobileMaxWidth: z19.enum(["xs", "sm", "md"]).optional(),
|
|
5312
|
+
hideOnShrink: z19.boolean().optional()
|
|
4328
5313
|
}).optional();
|
|
4329
|
-
var navEffectsSchema =
|
|
4330
|
-
underlineGradient:
|
|
4331
|
-
glow:
|
|
4332
|
-
glowColor:
|
|
4333
|
-
neumorphic:
|
|
5314
|
+
var navEffectsSchema = z19.object({
|
|
5315
|
+
underlineGradient: z19.boolean().default(false),
|
|
5316
|
+
glow: z19.boolean().default(false),
|
|
5317
|
+
glowColor: z19.string().optional(),
|
|
5318
|
+
neumorphic: z19.boolean().default(false)
|
|
4334
5319
|
}).optional();
|
|
4335
|
-
var dropdownStyleSchema =
|
|
5320
|
+
var dropdownStyleSchema = z19.object({
|
|
4336
5321
|
// Container styling
|
|
4337
5322
|
background: themeColorTokenSchema.default("surface"),
|
|
4338
5323
|
textColor: themeColorTokenSchema.default("text"),
|
|
4339
5324
|
borderColor: themeColorTokenSchema.nullable().default("border"),
|
|
4340
|
-
shadow:
|
|
4341
|
-
borderRadius:
|
|
5325
|
+
shadow: z19.enum(["none", "sm", "md", "lg"]).default("md"),
|
|
5326
|
+
borderRadius: z19.enum(["none", "sm", "md", "lg"]).default("md"),
|
|
4342
5327
|
// Link hover states (explicit control)
|
|
4343
5328
|
hoverBackground: themeColorTokenSchema.nullable().optional(),
|
|
4344
5329
|
hoverTextColor: themeColorTokenSchema.nullable().optional(),
|
|
4345
5330
|
// Typography
|
|
4346
|
-
textTransform:
|
|
4347
|
-
letterSpacing:
|
|
4348
|
-
fontWeight:
|
|
5331
|
+
textTransform: z19.enum(["none", "uppercase", "capitalize"]).default("none"),
|
|
5332
|
+
letterSpacing: z19.enum(["normal", "wide", "wider"]).default("normal"),
|
|
5333
|
+
fontWeight: z19.enum(["regular", "medium", "semibold", "bold"]).optional(),
|
|
4349
5334
|
// optional = inherit from navWeight
|
|
4350
|
-
textSize:
|
|
5335
|
+
textSize: z19.enum(["xs", "sm", "base", "lg"]).optional()
|
|
4351
5336
|
// optional = no override (browser default)
|
|
4352
5337
|
}).optional();
|
|
4353
|
-
var headerCtaGapSchema =
|
|
5338
|
+
var headerCtaGapSchema = z19.enum([
|
|
4354
5339
|
"none",
|
|
4355
5340
|
"tight",
|
|
4356
5341
|
"compact",
|
|
@@ -4358,7 +5343,7 @@ var headerCtaGapSchema = z20.enum([
|
|
|
4358
5343
|
"relaxed",
|
|
4359
5344
|
"spacious"
|
|
4360
5345
|
]);
|
|
4361
|
-
var headerCtaTreatmentSchema =
|
|
5346
|
+
var headerCtaTreatmentSchema = z19.enum([
|
|
4362
5347
|
"default",
|
|
4363
5348
|
"primary",
|
|
4364
5349
|
"secondary",
|
|
@@ -4366,22 +5351,23 @@ var headerCtaTreatmentSchema = z20.enum([
|
|
|
4366
5351
|
"outline",
|
|
4367
5352
|
"ghost"
|
|
4368
5353
|
]);
|
|
4369
|
-
var navContainerSchema =
|
|
4370
|
-
type:
|
|
4371
|
-
tint:
|
|
4372
|
-
opacity:
|
|
5354
|
+
var navContainerSchema = z19.object({
|
|
5355
|
+
type: z19.enum(["none", "pill", "glass"]).default("none"),
|
|
5356
|
+
tint: z19.string().nullable().optional(),
|
|
5357
|
+
opacity: z19.number().min(0).max(1).default(0.15)
|
|
4373
5358
|
}).default({ type: "none", tint: null, opacity: 0.15 });
|
|
4374
|
-
var headerBackgroundSchema =
|
|
4375
|
-
type:
|
|
5359
|
+
var headerBackgroundSchema = z19.object({
|
|
5360
|
+
type: z19.enum(["color", "gradient", "image"]),
|
|
5361
|
+
contentOwner: z19.literal(siteChromeBackgroundOverrideOwner).optional(),
|
|
4376
5362
|
color: tokenOrCssColorValueSchema.nullable().optional(),
|
|
4377
5363
|
gradient: gradientConfigSchema.nullable().optional(),
|
|
4378
5364
|
image: mediaSchema.nullable().optional(),
|
|
4379
5365
|
textColor: tokenOrCssColorValueSchema.nullable().optional()
|
|
4380
5366
|
});
|
|
4381
|
-
var headerSchema =
|
|
5367
|
+
var headerSchema = z19.object({
|
|
4382
5368
|
variant: headerVariant,
|
|
4383
5369
|
positioning: headerPositioning,
|
|
4384
|
-
shrinkOnScroll:
|
|
5370
|
+
shrinkOnScroll: z19.boolean(),
|
|
4385
5371
|
maxWidth: headerMaxWidth,
|
|
4386
5372
|
logoOverride: mediaSchema.nullable().optional(),
|
|
4387
5373
|
background: headerBackgroundSchema.default({
|
|
@@ -4411,16 +5397,16 @@ var headerSchema = z20.object({
|
|
|
4411
5397
|
// Optional theme-level CTA variant for header/nav CTA buttons.
|
|
4412
5398
|
// Internal runtime bridge for the block renderer; prefer ctaTreatment in
|
|
4413
5399
|
// authored Theme V2 concepts.
|
|
4414
|
-
ctaVariant:
|
|
5400
|
+
ctaVariant: z19.string().min(1).optional(),
|
|
4415
5401
|
// Dropdown menu styling (nav dropdowns and mobile drawer)
|
|
4416
5402
|
dropdownStyle: dropdownStyleSchema
|
|
4417
5403
|
});
|
|
4418
|
-
var footerVariant =
|
|
4419
|
-
var footerMaxWidth =
|
|
4420
|
-
var footerMode =
|
|
4421
|
-
var footerNavLayoutMode =
|
|
4422
|
-
var footerNavLayoutAlign =
|
|
4423
|
-
var footerSpacing =
|
|
5404
|
+
var footerVariant = z19.enum(["simple", "columns", "split"]);
|
|
5405
|
+
var footerMaxWidth = z19.enum(["container", "full"]);
|
|
5406
|
+
var footerMode = z19.enum(["default", "blocks", "default+blocks", "none"]);
|
|
5407
|
+
var footerNavLayoutMode = z19.enum(["stack", "inline", "inline-wrap"]);
|
|
5408
|
+
var footerNavLayoutAlign = z19.enum(["start", "center", "end", "space-between"]);
|
|
5409
|
+
var footerSpacing = z19.enum([
|
|
4424
5410
|
"none",
|
|
4425
5411
|
"tight",
|
|
4426
5412
|
"compact",
|
|
@@ -4428,44 +5414,44 @@ var footerSpacing = z20.enum([
|
|
|
4428
5414
|
"relaxed",
|
|
4429
5415
|
"spacious"
|
|
4430
5416
|
]);
|
|
4431
|
-
var footerLogoPlacement =
|
|
4432
|
-
var footerLogoSize =
|
|
4433
|
-
var footerLogoMaxHeight =
|
|
4434
|
-
var footerBottomTextLinkStyleSchema =
|
|
5417
|
+
var footerLogoPlacement = z19.enum(["left", "right", "above", "below"]);
|
|
5418
|
+
var footerLogoSize = z19.enum(["sm", "md", "lg", "xl"]);
|
|
5419
|
+
var footerLogoMaxHeight = z19.enum(["sm", "md", "lg", "xl"]);
|
|
5420
|
+
var footerBottomTextLinkStyleSchema = z19.object({
|
|
4435
5421
|
colorToken: themeColorTokenSchema.optional(),
|
|
4436
5422
|
hoverColorToken: themeColorTokenSchema.nullable().optional(),
|
|
4437
5423
|
decorationColorToken: themeColorTokenSchema.nullable().optional(),
|
|
4438
|
-
underline:
|
|
5424
|
+
underline: z19.boolean().optional()
|
|
4439
5425
|
});
|
|
4440
|
-
var footerBottomBarSchema =
|
|
4441
|
-
enabled:
|
|
4442
|
-
fullBleed:
|
|
5426
|
+
var footerBottomBarSchema = z19.object({
|
|
5427
|
+
enabled: z19.boolean().optional(),
|
|
5428
|
+
fullBleed: z19.boolean().optional(),
|
|
4443
5429
|
background: headerBackgroundSchema.optional(),
|
|
4444
5430
|
textColor: themeColorTokenSchema.nullable().optional(),
|
|
4445
|
-
textAlign:
|
|
5431
|
+
textAlign: z19.enum(["left", "center", "right"]).optional(),
|
|
4446
5432
|
paddingY: footerSpacing.optional(),
|
|
4447
5433
|
paddingX: footerSpacing.optional(),
|
|
4448
|
-
borderTop:
|
|
5434
|
+
borderTop: z19.object({
|
|
4449
5435
|
colorToken: themeColorTokenSchema.nullable().optional(),
|
|
4450
|
-
width:
|
|
5436
|
+
width: z19.enum(["none", "thin", "medium", "thick"]).optional()
|
|
4451
5437
|
}).optional()
|
|
4452
5438
|
});
|
|
4453
|
-
var footerNavLayoutSchema =
|
|
5439
|
+
var footerNavLayoutSchema = z19.object({
|
|
4454
5440
|
layout: footerNavLayoutMode.optional(),
|
|
4455
5441
|
align: footerNavLayoutAlign.optional(),
|
|
4456
5442
|
gapX: footerSpacing.optional(),
|
|
4457
5443
|
gapY: footerSpacing.optional(),
|
|
4458
|
-
columns:
|
|
5444
|
+
columns: z19.number().int().min(1).max(6).optional()
|
|
4459
5445
|
});
|
|
4460
|
-
var footerLogoSchema =
|
|
4461
|
-
showLogo:
|
|
4462
|
-
showLogoText:
|
|
5446
|
+
var footerLogoSchema = z19.object({
|
|
5447
|
+
showLogo: z19.boolean().default(true),
|
|
5448
|
+
showLogoText: z19.boolean().optional(),
|
|
4463
5449
|
placement: footerLogoPlacement.optional(),
|
|
4464
5450
|
size: footerLogoSize.optional(),
|
|
4465
5451
|
maxHeight: footerLogoMaxHeight.optional(),
|
|
4466
|
-
align:
|
|
5452
|
+
align: z19.enum(["start", "center", "end"]).optional()
|
|
4467
5453
|
});
|
|
4468
|
-
var footerSchema =
|
|
5454
|
+
var footerSchema = z19.object({
|
|
4469
5455
|
/**
|
|
4470
5456
|
* SDK-only footer rendering mode.
|
|
4471
5457
|
*
|
|
@@ -4474,7 +5460,7 @@ var footerSchema = z20.object({
|
|
|
4474
5460
|
mode: footerMode.optional(),
|
|
4475
5461
|
variant: footerVariant,
|
|
4476
5462
|
maxWidth: footerMaxWidth,
|
|
4477
|
-
showLogoText:
|
|
5463
|
+
showLogoText: z19.boolean().optional(),
|
|
4478
5464
|
background: headerBackgroundSchema.default({
|
|
4479
5465
|
type: "color",
|
|
4480
5466
|
color: "surface"
|
|
@@ -4492,20 +5478,20 @@ var footerSchema = z20.object({
|
|
|
4492
5478
|
logo: footerLogoSchema.optional(),
|
|
4493
5479
|
bottomBar: footerBottomBarSchema.optional()
|
|
4494
5480
|
});
|
|
4495
|
-
var containerPaddingPresetSchema =
|
|
5481
|
+
var containerPaddingPresetSchema = z19.enum([
|
|
4496
5482
|
"tight",
|
|
4497
5483
|
"compact",
|
|
4498
5484
|
"default",
|
|
4499
5485
|
"relaxed"
|
|
4500
5486
|
]);
|
|
4501
|
-
var layoutSchema =
|
|
4502
|
-
containerPadding:
|
|
5487
|
+
var layoutSchema = z19.object({
|
|
5488
|
+
containerPadding: z19.object({
|
|
4503
5489
|
mobile: containerPaddingPresetSchema.optional(),
|
|
4504
5490
|
tablet: containerPaddingPresetSchema.optional(),
|
|
4505
5491
|
desktop: containerPaddingPresetSchema.optional()
|
|
4506
5492
|
}).optional()
|
|
4507
5493
|
}).optional();
|
|
4508
|
-
var heroTypographySizeSchema =
|
|
5494
|
+
var heroTypographySizeSchema = z19.enum([
|
|
4509
5495
|
"sm",
|
|
4510
5496
|
"base",
|
|
4511
5497
|
"lg",
|
|
@@ -4517,19 +5503,19 @@ var heroTypographySizeSchema = z20.enum([
|
|
|
4517
5503
|
"6xl",
|
|
4518
5504
|
"editorial"
|
|
4519
5505
|
]);
|
|
4520
|
-
var heroTypographyLineHeightSchema =
|
|
5506
|
+
var heroTypographyLineHeightSchema = z19.enum([
|
|
4521
5507
|
"tight",
|
|
4522
5508
|
"snug",
|
|
4523
5509
|
"normal",
|
|
4524
5510
|
"relaxed"
|
|
4525
5511
|
]);
|
|
4526
|
-
var heroResponsiveTypographySchema =
|
|
5512
|
+
var heroResponsiveTypographySchema = z19.object({
|
|
4527
5513
|
headlineSize: heroTypographySizeSchema.optional(),
|
|
4528
5514
|
headlineLineHeight: heroTypographyLineHeightSchema.optional(),
|
|
4529
5515
|
subheadlineSize: heroTypographySizeSchema.optional(),
|
|
4530
5516
|
subheadlineLineHeight: heroTypographyLineHeightSchema.optional()
|
|
4531
5517
|
});
|
|
4532
|
-
var heroTypographySchema =
|
|
5518
|
+
var heroTypographySchema = z19.object({
|
|
4533
5519
|
headlineSize: heroTypographySizeSchema.optional(),
|
|
4534
5520
|
headlineLineHeight: heroTypographyLineHeightSchema.optional(),
|
|
4535
5521
|
subheadlineSize: heroTypographySizeSchema.optional(),
|
|
@@ -4538,38 +5524,38 @@ var heroTypographySchema = z20.object({
|
|
|
4538
5524
|
microHeadlineLineHeight: heroTypographyLineHeightSchema.optional(),
|
|
4539
5525
|
microSubheadlineSize: heroTypographySizeSchema.optional(),
|
|
4540
5526
|
microSubheadlineLineHeight: heroTypographyLineHeightSchema.optional(),
|
|
4541
|
-
responsive:
|
|
5527
|
+
responsive: z19.object({
|
|
4542
5528
|
tablet: heroResponsiveTypographySchema.optional(),
|
|
4543
5529
|
mobile: heroResponsiveTypographySchema.optional()
|
|
4544
5530
|
}).optional()
|
|
4545
5531
|
});
|
|
4546
|
-
var heroSchema =
|
|
5532
|
+
var heroSchema = z19.object({
|
|
4547
5533
|
typography: heroTypographySchema.optional()
|
|
4548
5534
|
}).optional();
|
|
4549
|
-
var bodyTextIntroTypographySizeSchema =
|
|
4550
|
-
var bodyTextSchema =
|
|
4551
|
-
intro:
|
|
5535
|
+
var bodyTextIntroTypographySizeSchema = z19.enum(["default", "editorial"]);
|
|
5536
|
+
var bodyTextSchema = z19.object({
|
|
5537
|
+
intro: z19.object({
|
|
4552
5538
|
paragraphSize: bodyTextIntroTypographySizeSchema.optional(),
|
|
4553
5539
|
headingSize: bodyTextIntroTypographySizeSchema.optional()
|
|
4554
5540
|
}).optional()
|
|
4555
5541
|
}).optional();
|
|
4556
|
-
var gradientsSchema =
|
|
4557
|
-
button:
|
|
4558
|
-
hero:
|
|
4559
|
-
background:
|
|
4560
|
-
});
|
|
4561
|
-
var testimonialQuoteTreatmentSchema =
|
|
4562
|
-
style:
|
|
4563
|
-
fontFamily:
|
|
4564
|
-
scale:
|
|
5542
|
+
var gradientsSchema = z19.object({
|
|
5543
|
+
button: z19.string().min(1).nullable().optional(),
|
|
5544
|
+
hero: z19.string().min(1).nullable().optional(),
|
|
5545
|
+
background: z19.string().min(1).nullable().optional()
|
|
5546
|
+
});
|
|
5547
|
+
var testimonialQuoteTreatmentSchema = z19.object({
|
|
5548
|
+
style: z19.enum(["serif-display", "accent-glyph", "none"]),
|
|
5549
|
+
fontFamily: z19.enum(["heading", "body"]).optional(),
|
|
5550
|
+
scale: z19.enum(["sm", "md", "lg", "xl"]).optional(),
|
|
4565
5551
|
colorToken: themeColorTokenSchema.optional(),
|
|
4566
|
-
opacity:
|
|
5552
|
+
opacity: z19.number().min(0).max(1).optional()
|
|
4567
5553
|
});
|
|
4568
|
-
var themeSchema =
|
|
4569
|
-
name:
|
|
4570
|
-
description:
|
|
4571
|
-
rationale:
|
|
4572
|
-
siteStyleId:
|
|
5554
|
+
var themeSchema = z19.object({
|
|
5555
|
+
name: z19.string().min(1).max(30),
|
|
5556
|
+
description: z19.string().min(1).max(400),
|
|
5557
|
+
rationale: z19.string().min(1).max(400),
|
|
5558
|
+
siteStyleId: z19.string().min(1).transform((value) => asSiteStyleId(value)).optional(),
|
|
4573
5559
|
axes: axesSchema,
|
|
4574
5560
|
palette: paletteSchema,
|
|
4575
5561
|
typography: typographySchema,
|
|
@@ -4599,15 +5585,15 @@ var themeSchema = z20.object({
|
|
|
4599
5585
|
// Block-specific customization (Tier 3)
|
|
4600
5586
|
// blockCustomVars: Per-block CSS variable overrides as bare values
|
|
4601
5587
|
// Example: { "event-registration": { "--step-color": "#6d28d9" } }
|
|
4602
|
-
blockCustomVars:
|
|
4603
|
-
|
|
5588
|
+
blockCustomVars: z19.record(
|
|
5589
|
+
z19.string(),
|
|
4604
5590
|
// block kind (matches data-block attribute)
|
|
4605
|
-
|
|
5591
|
+
z19.record(z19.string(), z19.string())
|
|
4606
5592
|
// { '--var-name': 'value' }
|
|
4607
5593
|
).optional(),
|
|
4608
5594
|
// Structured block-kind theme overrides (v1: typography prose-link style only)
|
|
4609
5595
|
// Keyed by block kind (usually data-block value like "hero"; "block.hero" also accepted)
|
|
4610
|
-
blockOverrides:
|
|
5596
|
+
blockOverrides: z19.record(z19.string(), blockThemeOverrideSchema).optional(),
|
|
4611
5597
|
// Site-wide heading decoration signature (family + colour). Set once per Look
|
|
4612
5598
|
// and projected transiently onto eligible block headings at render time.
|
|
4613
5599
|
// Alignment is inherited from the heading, so no placement is stored.
|
|
@@ -4645,11 +5631,11 @@ var themeSchema = z20.object({
|
|
|
4645
5631
|
* }
|
|
4646
5632
|
* ```
|
|
4647
5633
|
*/
|
|
4648
|
-
styleGroups:
|
|
5634
|
+
styleGroups: z19.record(z19.string(), z19.array(z19.string())).optional()
|
|
4649
5635
|
});
|
|
4650
|
-
var themesTurnSchema =
|
|
4651
|
-
message:
|
|
4652
|
-
themes:
|
|
5636
|
+
var themesTurnSchema = z19.object({
|
|
5637
|
+
message: z19.string().min(1),
|
|
5638
|
+
themes: z19.array(themeSchema).length(3)
|
|
4653
5639
|
});
|
|
4654
5640
|
|
|
4655
5641
|
// ../theme-core/src/palette/variants/types.ts
|
|
@@ -4659,19 +5645,19 @@ function asPaletteVariantId(value) {
|
|
|
4659
5645
|
}
|
|
4660
5646
|
return value;
|
|
4661
5647
|
}
|
|
4662
|
-
var paletteVariantIdSchema =
|
|
5648
|
+
var paletteVariantIdSchema = z20.string().min(1).transform((value) => asPaletteVariantId(value));
|
|
4663
5649
|
var HEX_COLOR_REGEX = /^#[0-9a-f]{6}$/;
|
|
4664
|
-
var hexColorSchema =
|
|
5650
|
+
var hexColorSchema = z20.string().regex(HEX_COLOR_REGEX, "Hex must be #RRGGBB (lowercase)").transform((value) => value);
|
|
4665
5651
|
var variantPaletteColorSchema = paletteColorSchema.extend({
|
|
4666
5652
|
name: paletteTokenNameSchema
|
|
4667
5653
|
});
|
|
4668
|
-
var paletteVariantSchema =
|
|
5654
|
+
var paletteVariantSchema = z20.object({
|
|
4669
5655
|
id: paletteVariantIdSchema,
|
|
4670
|
-
name:
|
|
4671
|
-
description:
|
|
5656
|
+
name: z20.string().min(1),
|
|
5657
|
+
description: z20.string().min(1),
|
|
4672
5658
|
tags: styleTagsSchema,
|
|
4673
|
-
mode:
|
|
4674
|
-
colors:
|
|
5659
|
+
mode: z20.enum(["light", "dark"]),
|
|
5660
|
+
colors: z20.array(variantPaletteColorSchema).min(1)
|
|
4675
5661
|
});
|
|
4676
5662
|
function definePaletteVariant(input) {
|
|
4677
5663
|
return {
|
|
@@ -4683,7 +5669,7 @@ function definePaletteVariant(input) {
|
|
|
4683
5669
|
colors: input.colors
|
|
4684
5670
|
};
|
|
4685
5671
|
}
|
|
4686
|
-
var paletteOverridesSchema =
|
|
5672
|
+
var paletteOverridesSchema = z20.object({
|
|
4687
5673
|
primary: hexColorSchema.optional(),
|
|
4688
5674
|
primaryForeground: hexColorSchema.optional(),
|
|
4689
5675
|
secondary: hexColorSchema.optional(),
|
|
@@ -5061,33 +6047,324 @@ var warmDarkEmber = definePaletteVariant({
|
|
|
5061
6047
|
]
|
|
5062
6048
|
});
|
|
5063
6049
|
|
|
5064
|
-
// ../theme-core/src/palette/variants/index.ts
|
|
5065
|
-
var paletteVariants = [
|
|
5066
|
-
// Brand-led family
|
|
5067
|
-
brandLedCool,
|
|
5068
|
-
brandLedWarm,
|
|
5069
|
-
brandLedJewel,
|
|
5070
|
-
brandLedBurgundyGold,
|
|
5071
|
-
// Warm-neutral family
|
|
5072
|
-
warmNeutralClay,
|
|
5073
|
-
warmNeutralCream,
|
|
5074
|
-
warmNeutralSoftEarth,
|
|
5075
|
-
warmNeutralForest,
|
|
5076
|
-
// High-contrast family
|
|
5077
|
-
highContrastInk,
|
|
5078
|
-
highContrastCharcoal,
|
|
5079
|
-
highContrastMonochrome,
|
|
5080
|
-
// Soft-natural family
|
|
5081
|
-
softNaturalSage,
|
|
5082
|
-
softNaturalStone,
|
|
5083
|
-
softNaturalWatercolor,
|
|
5084
|
-
softNaturalLilac,
|
|
5085
|
-
// Warm-dark family (dark mode)
|
|
5086
|
-
warmDarkEmber
|
|
5087
|
-
];
|
|
5088
|
-
var paletteVariantsById = new Map(
|
|
5089
|
-
paletteVariants.map((v) => [v.id, v])
|
|
5090
|
-
);
|
|
6050
|
+
// ../theme-core/src/palette/variants/index.ts
|
|
6051
|
+
var paletteVariants = [
|
|
6052
|
+
// Brand-led family
|
|
6053
|
+
brandLedCool,
|
|
6054
|
+
brandLedWarm,
|
|
6055
|
+
brandLedJewel,
|
|
6056
|
+
brandLedBurgundyGold,
|
|
6057
|
+
// Warm-neutral family
|
|
6058
|
+
warmNeutralClay,
|
|
6059
|
+
warmNeutralCream,
|
|
6060
|
+
warmNeutralSoftEarth,
|
|
6061
|
+
warmNeutralForest,
|
|
6062
|
+
// High-contrast family
|
|
6063
|
+
highContrastInk,
|
|
6064
|
+
highContrastCharcoal,
|
|
6065
|
+
highContrastMonochrome,
|
|
6066
|
+
// Soft-natural family
|
|
6067
|
+
softNaturalSage,
|
|
6068
|
+
softNaturalStone,
|
|
6069
|
+
softNaturalWatercolor,
|
|
6070
|
+
softNaturalLilac,
|
|
6071
|
+
// Warm-dark family (dark mode)
|
|
6072
|
+
warmDarkEmber
|
|
6073
|
+
];
|
|
6074
|
+
var paletteVariantsById = new Map(
|
|
6075
|
+
paletteVariants.map((v) => [v.id, v])
|
|
6076
|
+
);
|
|
6077
|
+
|
|
6078
|
+
// ../theme-core/src/site-styles/backgroundAppearance.ts
|
|
6079
|
+
var backgroundAppearanceQuickColorTokenNames = [
|
|
6080
|
+
"background",
|
|
6081
|
+
"surface",
|
|
6082
|
+
"muted",
|
|
6083
|
+
"primary",
|
|
6084
|
+
"secondary",
|
|
6085
|
+
"accent"
|
|
6086
|
+
];
|
|
6087
|
+
var backgroundAppearanceBaseColorTokenNames = [
|
|
6088
|
+
"background",
|
|
6089
|
+
"surface",
|
|
6090
|
+
"surfaceAlt",
|
|
6091
|
+
"muted",
|
|
6092
|
+
"primary",
|
|
6093
|
+
"secondary",
|
|
6094
|
+
"accent",
|
|
6095
|
+
"neutral"
|
|
6096
|
+
];
|
|
6097
|
+
var backgroundAppearanceShadeableColorTokenNames = [
|
|
6098
|
+
"primary",
|
|
6099
|
+
"secondary",
|
|
6100
|
+
"accent",
|
|
6101
|
+
"neutral"
|
|
6102
|
+
];
|
|
6103
|
+
var backgroundAppearanceColorTokenNames = uniqueStrings([
|
|
6104
|
+
...backgroundAppearanceBaseColorTokenNames,
|
|
6105
|
+
...backgroundAppearanceShadeableColorTokenNames.flatMap(
|
|
6106
|
+
(name) => themeColorShadeSteps.map((shade) => `${name}-${shade}`)
|
|
6107
|
+
)
|
|
6108
|
+
]);
|
|
6109
|
+
var backgroundAppearanceAdvancedColorTokenNames = backgroundAppearanceColorTokenNames.filter(
|
|
6110
|
+
(tokenName) => !backgroundAppearanceQuickColorTokenNames.includes(
|
|
6111
|
+
tokenName
|
|
6112
|
+
)
|
|
6113
|
+
);
|
|
6114
|
+
var backgroundAppearanceColorTokenNameSet = new Set(
|
|
6115
|
+
backgroundAppearanceColorTokenNames
|
|
6116
|
+
);
|
|
6117
|
+
function parseBackgroundAppearanceColorToken(value) {
|
|
6118
|
+
if (typeof value !== "string") return null;
|
|
6119
|
+
const normalized = value.trim();
|
|
6120
|
+
if (!backgroundAppearanceColorTokenNameSet.has(normalized)) return null;
|
|
6121
|
+
return parseThemeColorToken(normalized);
|
|
6122
|
+
}
|
|
6123
|
+
function uniqueStrings(values) {
|
|
6124
|
+
return Array.from(new Set(values));
|
|
6125
|
+
}
|
|
6126
|
+
|
|
6127
|
+
// ../theme-core/src/site-styles/pageDesignIntent.ts
|
|
6128
|
+
import { z as z21 } from "zod";
|
|
6129
|
+
|
|
6130
|
+
// ../theme-core/src/site-styles/sectionTransitions.ts
|
|
6131
|
+
var noneBoundaryOption = {
|
|
6132
|
+
id: asBoundaryOptionId("break:none"),
|
|
6133
|
+
label: "None",
|
|
6134
|
+
transitionAfter: "none",
|
|
6135
|
+
treatment: { kind: "none" }
|
|
6136
|
+
};
|
|
6137
|
+
var softBoundaryOption = {
|
|
6138
|
+
id: asBoundaryOptionId("break:soft"),
|
|
6139
|
+
label: "Soft",
|
|
6140
|
+
transitionAfter: "soft-fade-short",
|
|
6141
|
+
treatment: { kind: "soft-fade", height: "medium", curve: "soft" }
|
|
6142
|
+
};
|
|
6143
|
+
var spaciousBoundaryOption = {
|
|
6144
|
+
id: asBoundaryOptionId("break:spacious"),
|
|
6145
|
+
label: "Spacious",
|
|
6146
|
+
transitionAfter: "soft-fade-long",
|
|
6147
|
+
treatment: { kind: "soft-fade", height: "large", curve: "spacious" }
|
|
6148
|
+
};
|
|
6149
|
+
var expansiveBoundaryOption = {
|
|
6150
|
+
id: asBoundaryOptionId("break:expansive"),
|
|
6151
|
+
label: "Expansive",
|
|
6152
|
+
transitionAfter: "soft-fade-expansive",
|
|
6153
|
+
treatment: { kind: "soft-fade", height: "expansive", curve: "expansive" }
|
|
6154
|
+
};
|
|
6155
|
+
var waveBoundaryOption = {
|
|
6156
|
+
id: asBoundaryOptionId("break:wave"),
|
|
6157
|
+
label: "Classic wave",
|
|
6158
|
+
transitionAfter: "wave-edge",
|
|
6159
|
+
treatment: {
|
|
6160
|
+
kind: "wave-edge",
|
|
6161
|
+
height: "medium",
|
|
6162
|
+
amplitude: "balanced",
|
|
6163
|
+
rhythm: "double",
|
|
6164
|
+
symmetry: "asymmetrical"
|
|
6165
|
+
}
|
|
6166
|
+
};
|
|
6167
|
+
var balancedWaveBoundaryOption = {
|
|
6168
|
+
id: asBoundaryOptionId("break:wave-balanced"),
|
|
6169
|
+
label: "Balanced wave",
|
|
6170
|
+
transitionAfter: "wave-edge-balanced",
|
|
6171
|
+
treatment: {
|
|
6172
|
+
kind: "wave-edge",
|
|
6173
|
+
height: "medium",
|
|
6174
|
+
amplitude: "balanced",
|
|
6175
|
+
rhythm: "double",
|
|
6176
|
+
symmetry: "symmetrical"
|
|
6177
|
+
}
|
|
6178
|
+
};
|
|
6179
|
+
var gentleWaveBoundaryOption = {
|
|
6180
|
+
id: asBoundaryOptionId("break:wave-gentle"),
|
|
6181
|
+
label: "Gentle wave",
|
|
6182
|
+
transitionAfter: "wave-edge-gentle",
|
|
6183
|
+
treatment: {
|
|
6184
|
+
kind: "wave-edge",
|
|
6185
|
+
height: "compact",
|
|
6186
|
+
amplitude: "subtle",
|
|
6187
|
+
rhythm: "single",
|
|
6188
|
+
symmetry: "symmetrical"
|
|
6189
|
+
}
|
|
6190
|
+
};
|
|
6191
|
+
var boldWaveBoundaryOption = {
|
|
6192
|
+
id: asBoundaryOptionId("break:wave-bold"),
|
|
6193
|
+
label: "Bold wave",
|
|
6194
|
+
transitionAfter: "wave-edge-bold",
|
|
6195
|
+
treatment: {
|
|
6196
|
+
kind: "wave-edge",
|
|
6197
|
+
height: "large",
|
|
6198
|
+
amplitude: "bold",
|
|
6199
|
+
rhythm: "double",
|
|
6200
|
+
symmetry: "symmetrical"
|
|
6201
|
+
}
|
|
6202
|
+
};
|
|
6203
|
+
var driftWaveBoundaryOption = {
|
|
6204
|
+
id: asBoundaryOptionId("break:wave-drift"),
|
|
6205
|
+
label: "Drift wave",
|
|
6206
|
+
transitionAfter: "wave-edge-drift",
|
|
6207
|
+
treatment: {
|
|
6208
|
+
kind: "wave-edge",
|
|
6209
|
+
height: "medium",
|
|
6210
|
+
amplitude: "balanced",
|
|
6211
|
+
rhythm: "double",
|
|
6212
|
+
symmetry: "drift"
|
|
6213
|
+
}
|
|
6214
|
+
};
|
|
6215
|
+
var subtleAngleBoundaryOption = {
|
|
6216
|
+
id: asBoundaryOptionId("break:angle-subtle"),
|
|
6217
|
+
label: "Subtle angle",
|
|
6218
|
+
transitionAfter: "angle-edge-subtle",
|
|
6219
|
+
treatment: {
|
|
6220
|
+
kind: "angle-edge",
|
|
6221
|
+
height: "compact",
|
|
6222
|
+
slope: "subtle",
|
|
6223
|
+
direction: "forward"
|
|
6224
|
+
}
|
|
6225
|
+
};
|
|
6226
|
+
var balancedAngleBoundaryOption = {
|
|
6227
|
+
id: asBoundaryOptionId("break:angle-balanced"),
|
|
6228
|
+
label: "Balanced angle",
|
|
6229
|
+
transitionAfter: "angle-edge",
|
|
6230
|
+
treatment: {
|
|
6231
|
+
kind: "angle-edge",
|
|
6232
|
+
height: "medium",
|
|
6233
|
+
slope: "balanced",
|
|
6234
|
+
direction: "forward"
|
|
6235
|
+
}
|
|
6236
|
+
};
|
|
6237
|
+
var steepAngleBoundaryOption = {
|
|
6238
|
+
id: asBoundaryOptionId("break:angle-steep"),
|
|
6239
|
+
label: "Steep angle",
|
|
6240
|
+
transitionAfter: "angle-edge-steep",
|
|
6241
|
+
treatment: {
|
|
6242
|
+
kind: "angle-edge",
|
|
6243
|
+
height: "large",
|
|
6244
|
+
slope: "steep",
|
|
6245
|
+
direction: "forward"
|
|
6246
|
+
}
|
|
6247
|
+
};
|
|
6248
|
+
|
|
6249
|
+
// ../theme-core/src/site-styles/pageDesignIntent.ts
|
|
6250
|
+
var pageDesignIntentSchemaVersion = 2;
|
|
6251
|
+
var legacyPageDesignIntentSchemaVersion = 1;
|
|
6252
|
+
var unknownBoundaryOptionId = asBoundaryOptionId("break:unknown");
|
|
6253
|
+
var pageDesignUserPinnedAppearanceChoiceSchema = z21.object({
|
|
6254
|
+
kind: z21.literal("user-pinned"),
|
|
6255
|
+
value: z21.string().min(1).transform(asAppearancePresetId)
|
|
6256
|
+
}).strict();
|
|
6257
|
+
var pageDesignUserPinnedBoundaryChoiceSchema = z21.object({
|
|
6258
|
+
kind: z21.literal("user-pinned"),
|
|
6259
|
+
value: z21.string().min(1).transform(asBoundaryOptionId)
|
|
6260
|
+
}).strict();
|
|
6261
|
+
var pageDesignBoundaryTreatmentSchema = z21.discriminatedUnion("kind", [
|
|
6262
|
+
z21.object({ kind: z21.literal("none") }).strict(),
|
|
6263
|
+
z21.object({
|
|
6264
|
+
kind: z21.literal("soft-fade"),
|
|
6265
|
+
height: z21.enum(["compact", "medium", "large", "expansive"]),
|
|
6266
|
+
curve: z21.enum(["soft", "spacious", "expansive"])
|
|
6267
|
+
}).strict(),
|
|
6268
|
+
z21.object({
|
|
6269
|
+
kind: z21.literal("wave-edge"),
|
|
6270
|
+
height: z21.enum(["compact", "medium", "large"]),
|
|
6271
|
+
amplitude: z21.enum(["subtle", "balanced", "bold"]),
|
|
6272
|
+
rhythm: z21.enum(["single", "double"]),
|
|
6273
|
+
symmetry: z21.enum(["symmetrical", "asymmetrical", "drift"])
|
|
6274
|
+
}).strict(),
|
|
6275
|
+
z21.object({
|
|
6276
|
+
kind: z21.literal("angle-edge"),
|
|
6277
|
+
height: z21.enum(["compact", "medium", "large"]),
|
|
6278
|
+
slope: z21.enum(["subtle", "balanced", "steep"]),
|
|
6279
|
+
direction: z21.enum(["forward", "reverse"])
|
|
6280
|
+
}).strict(),
|
|
6281
|
+
z21.object({
|
|
6282
|
+
kind: z21.literal("legacy-unsupported"),
|
|
6283
|
+
boundaryOptionId: z21.string().min(1).transform(asBoundaryOptionId)
|
|
6284
|
+
}).strict()
|
|
6285
|
+
]);
|
|
6286
|
+
var pageDesignUserPinnedBoundaryTreatmentChoiceSchema = z21.object({
|
|
6287
|
+
kind: z21.literal("user-pinned"),
|
|
6288
|
+
value: pageDesignBoundaryTreatmentSchema
|
|
6289
|
+
}).strict();
|
|
6290
|
+
var pageDesignBlockLookPinSchema = z21.object({
|
|
6291
|
+
blockId: z21.string().min(1).transform(asDesignBlockId),
|
|
6292
|
+
blockKind: z21.string().min(1),
|
|
6293
|
+
choice: pageDesignUserPinnedAppearanceChoiceSchema
|
|
6294
|
+
}).strict();
|
|
6295
|
+
var pageDesignBoundaryPinSchema = z21.object({
|
|
6296
|
+
boundaryId: z21.string().min(1).transform(asDesignBoundaryId),
|
|
6297
|
+
previousBlockId: z21.string().min(1).transform(asDesignBlockId),
|
|
6298
|
+
nextBlockId: z21.string().min(1).transform(asDesignBlockId),
|
|
6299
|
+
choice: pageDesignUserPinnedBoundaryTreatmentChoiceSchema
|
|
6300
|
+
}).strict().superRefine(validateBoundaryPinIdMatchesBlocks);
|
|
6301
|
+
var legacyPageDesignBoundaryPinSchema = z21.object({
|
|
6302
|
+
boundaryId: z21.string().min(1).transform(asDesignBoundaryId),
|
|
6303
|
+
previousBlockId: z21.string().min(1).transform(asDesignBlockId),
|
|
6304
|
+
nextBlockId: z21.string().min(1).transform(asDesignBlockId),
|
|
6305
|
+
choice: pageDesignUserPinnedBoundaryChoiceSchema
|
|
6306
|
+
}).strict().superRefine(validateBoundaryPinIdMatchesBlocks);
|
|
6307
|
+
var pageDesignIntentV1Schema = z21.object({
|
|
6308
|
+
schemaVersion: z21.literal(legacyPageDesignIntentSchemaVersion),
|
|
6309
|
+
siteStyleId: z21.string().min(1).transform(asSiteStyleId),
|
|
6310
|
+
pageFlowPresetId: z21.string().min(1).transform(asPageFlowPresetId),
|
|
6311
|
+
blockLookPins: z21.array(pageDesignBlockLookPinSchema),
|
|
6312
|
+
boundaryPins: z21.array(legacyPageDesignBoundaryPinSchema)
|
|
6313
|
+
}).strict().superRefine(validateUniquePageDesignPins);
|
|
6314
|
+
var pageDesignIntentV2Schema = z21.object({
|
|
6315
|
+
schemaVersion: z21.literal(pageDesignIntentSchemaVersion),
|
|
6316
|
+
siteStyleId: z21.string().min(1).transform(asSiteStyleId),
|
|
6317
|
+
pageFlowPresetId: z21.string().min(1).transform(asPageFlowPresetId),
|
|
6318
|
+
blockLookPins: z21.array(pageDesignBlockLookPinSchema),
|
|
6319
|
+
boundaryPins: z21.array(pageDesignBoundaryPinSchema)
|
|
6320
|
+
}).strict().superRefine(validateUniquePageDesignPins);
|
|
6321
|
+
function addDuplicateStringIssues(ctx, input) {
|
|
6322
|
+
const seen = /* @__PURE__ */ new Set();
|
|
6323
|
+
const duplicates = /* @__PURE__ */ new Set();
|
|
6324
|
+
for (const value of input.values) {
|
|
6325
|
+
if (seen.has(value)) {
|
|
6326
|
+
duplicates.add(value);
|
|
6327
|
+
}
|
|
6328
|
+
seen.add(value);
|
|
6329
|
+
}
|
|
6330
|
+
for (const duplicate of duplicates) {
|
|
6331
|
+
ctx.addIssue({
|
|
6332
|
+
code: z21.ZodIssueCode.custom,
|
|
6333
|
+
path: [...input.path],
|
|
6334
|
+
message: `Duplicate ${input.label}: ${duplicate}.`
|
|
6335
|
+
});
|
|
6336
|
+
}
|
|
6337
|
+
}
|
|
6338
|
+
function validateBoundaryPinIdMatchesBlocks(pin, ctx) {
|
|
6339
|
+
const expectedBoundaryId = makeBoundaryId(
|
|
6340
|
+
pin.previousBlockId,
|
|
6341
|
+
pin.nextBlockId
|
|
6342
|
+
);
|
|
6343
|
+
if (pin.boundaryId !== expectedBoundaryId) {
|
|
6344
|
+
ctx.addIssue({
|
|
6345
|
+
code: z21.ZodIssueCode.custom,
|
|
6346
|
+
path: ["boundaryId"],
|
|
6347
|
+
message: `Boundary id must match previousBlockId and nextBlockId. Expected ${expectedBoundaryId}.`
|
|
6348
|
+
});
|
|
6349
|
+
}
|
|
6350
|
+
}
|
|
6351
|
+
function validateUniquePageDesignPins(intent, ctx) {
|
|
6352
|
+
addDuplicateStringIssues(ctx, {
|
|
6353
|
+
values: intent.blockLookPins.map((pin) => pin.blockId),
|
|
6354
|
+
path: ["blockLookPins"],
|
|
6355
|
+
label: "block Look pin"
|
|
6356
|
+
});
|
|
6357
|
+
addDuplicateStringIssues(ctx, {
|
|
6358
|
+
values: intent.boundaryPins.map(
|
|
6359
|
+
(pin) => boundaryKey(pin.previousBlockId, pin.nextBlockId)
|
|
6360
|
+
),
|
|
6361
|
+
path: ["boundaryPins"],
|
|
6362
|
+
label: "boundary pin"
|
|
6363
|
+
});
|
|
6364
|
+
}
|
|
6365
|
+
function boundaryKey(previousBlockId, nextBlockId) {
|
|
6366
|
+
return makeBoundaryId(previousBlockId, nextBlockId);
|
|
6367
|
+
}
|
|
5091
6368
|
|
|
5092
6369
|
// ../theme-core/src/accordions/siteStyleDefaults.ts
|
|
5093
6370
|
var editorialDividedAccordionSystem = {
|
|
@@ -8541,6 +9818,23 @@ function collectBlockSequenceIssues(snapshots) {
|
|
|
8541
9818
|
return issues;
|
|
8542
9819
|
}
|
|
8543
9820
|
|
|
9821
|
+
// ../theme-core/src/site-styles/siteChromeBackgrounds.ts
|
|
9822
|
+
var siteChromeBackgroundColorTokens = toSiteChromeBackgroundColorTokens(backgroundAppearanceColorTokenNames);
|
|
9823
|
+
var quickSiteChromeBackgroundColorTokens = toSiteChromeBackgroundColorTokens(backgroundAppearanceQuickColorTokenNames);
|
|
9824
|
+
var advancedSiteChromeBackgroundColorTokens = siteChromeBackgroundColorTokens.filter(
|
|
9825
|
+
(token) => !quickSiteChromeBackgroundColorTokens.includes(token)
|
|
9826
|
+
);
|
|
9827
|
+
function parseSiteChromeBackgroundColorToken(value) {
|
|
9828
|
+
const token = parseBackgroundAppearanceColorToken(value);
|
|
9829
|
+
return token ? token : null;
|
|
9830
|
+
}
|
|
9831
|
+
function toSiteChromeBackgroundColorTokens(tokenNames) {
|
|
9832
|
+
return tokenNames.flatMap((name) => {
|
|
9833
|
+
const token = parseSiteChromeBackgroundColorToken(name);
|
|
9834
|
+
return token ? [token] : [];
|
|
9835
|
+
});
|
|
9836
|
+
}
|
|
9837
|
+
|
|
8544
9838
|
// ../theme-core/src/site-styles/tokenRecipes.ts
|
|
8545
9839
|
import { z as z25 } from "zod";
|
|
8546
9840
|
var themeTokenRecipeOptions = {
|
|
@@ -12706,6 +14000,7 @@ function createBlockManifest(config) {
|
|
|
12706
14000
|
// Always empty
|
|
12707
14001
|
styleTokens: config.styleTokens,
|
|
12708
14002
|
behaviours,
|
|
14003
|
+
previewCustomize: config.previewCustomize,
|
|
12709
14004
|
category: config.category,
|
|
12710
14005
|
contentTypes: config.contentTypes ? [...config.contentTypes] : void 0,
|
|
12711
14006
|
tags: config.tags ? [...config.tags] : [],
|
|
@@ -12834,7 +14129,7 @@ function splitLayoutWith(children) {
|
|
|
12834
14129
|
type: "grid",
|
|
12835
14130
|
props: {
|
|
12836
14131
|
cols: { base: 1, md: 2 },
|
|
12837
|
-
gap: "
|
|
14132
|
+
gap: "comfortable",
|
|
12838
14133
|
className: {
|
|
12839
14134
|
$bind: {
|
|
12840
14135
|
from: "content",
|
|
@@ -15276,6 +16571,15 @@ var testimonialsManifest = createBlockManifest({
|
|
|
15276
16571
|
title: "Testimonials",
|
|
15277
16572
|
category: "marketing",
|
|
15278
16573
|
includeContainerStyles: true,
|
|
16574
|
+
previewCustomize: {
|
|
16575
|
+
quickFieldPriority: [
|
|
16576
|
+
"avatarLayout",
|
|
16577
|
+
"gridColumns",
|
|
16578
|
+
"slidesToShow",
|
|
16579
|
+
"maxEntries",
|
|
16580
|
+
"autoplay"
|
|
16581
|
+
]
|
|
16582
|
+
},
|
|
15279
16583
|
// Default layout (used when no variant specified)
|
|
15280
16584
|
layout: carouselLayout,
|
|
15281
16585
|
// Variant system - enables the variant switcher control in the editor
|
|
@@ -16700,6 +18004,7 @@ var publicCoursesArraySchema = z34.array(publicCourseSchema);
|
|
|
16700
18004
|
// ../blocks/src/system/blocks/events/shared/schemas.ts
|
|
16701
18005
|
var eventPresetSchema = z35.enum(["event", "class", "workshop", "retreat", "performance"]);
|
|
16702
18006
|
var eventScheduleScopeSchema = z35.enum(["recurring", "oneOff"]);
|
|
18007
|
+
var eventDestinationModeSchema = z35.enum(["cms-managed", "system-managed"]);
|
|
16703
18008
|
var eventVenueSchema = z35.object({
|
|
16704
18009
|
id: z35.string(),
|
|
16705
18010
|
name: z35.string(),
|
|
@@ -16714,7 +18019,7 @@ var eventCategorySchema = z35.object({
|
|
|
16714
18019
|
name: z35.string(),
|
|
16715
18020
|
color: z35.string().nullable()
|
|
16716
18021
|
});
|
|
16717
|
-
var pricingTypeSchema = z35.enum(["free", "paid"
|
|
18022
|
+
var pricingTypeSchema = z35.enum(["free", "paid"]);
|
|
16718
18023
|
var accessRestrictionSchema = z35.enum(["none", "category"]);
|
|
16719
18024
|
var eventPricingModeSchema = z35.enum(["single", "ticket_types"]);
|
|
16720
18025
|
var publicCoursePriceDisplaySchema = z35.discriminatedUnion("kind", [
|
|
@@ -16728,11 +18033,16 @@ var publicEventPriceDisplaySchema = z35.discriminatedUnion("kind", [
|
|
|
16728
18033
|
z35.object({ kind: z35.literal("exact"), amount: z35.number(), currency: z35.string() }),
|
|
16729
18034
|
z35.object({ kind: z35.literal("from"), amount: z35.number(), currency: z35.string() }),
|
|
16730
18035
|
z35.object({ kind: z35.literal("mixed"), paidFromAmount: z35.number(), currency: z35.string() }),
|
|
16731
|
-
z35.object({ kind: z35.literal("pass_only") }),
|
|
16732
|
-
z35.object({ kind: z35.literal("membership_only") }),
|
|
16733
18036
|
z35.object({ kind: z35.literal("unavailable"), currency: z35.string() }),
|
|
16734
18037
|
z35.object({ kind: z35.literal("course"), display: publicCoursePriceDisplaySchema })
|
|
16735
18038
|
]);
|
|
18039
|
+
var publicEventTicketTypePriceDisplaySchema = z35.union([
|
|
18040
|
+
z35.object({ kind: z35.literal("free"), currency: z35.string() }),
|
|
18041
|
+
z35.object({ kind: z35.literal("exact"), amount: z35.number(), currency: z35.string() }),
|
|
18042
|
+
z35.object({ kind: z35.literal("from"), amount: z35.number(), currency: z35.string() }),
|
|
18043
|
+
z35.object({ kind: z35.literal("mixed"), paidFromAmount: z35.number(), currency: z35.string() }),
|
|
18044
|
+
z35.object({ kind: z35.literal("unavailable"), currency: z35.string() })
|
|
18045
|
+
]);
|
|
16736
18046
|
var publicEventAttendanceModeSchema = z35.enum(["in_person", "online"]);
|
|
16737
18047
|
var publicEventAttendanceModeAvailabilitySchema = z35.object({
|
|
16738
18048
|
mode: publicEventAttendanceModeSchema,
|
|
@@ -16770,6 +18080,34 @@ var publicEventTicketTypeSchema = z35.object({
|
|
|
16770
18080
|
createdAt: z35.string(),
|
|
16771
18081
|
updatedAt: z35.string()
|
|
16772
18082
|
});
|
|
18083
|
+
var publicEventPricingSchema = z35.discriminatedUnion("kind", [
|
|
18084
|
+
z35.object({
|
|
18085
|
+
kind: z35.literal("drop_in"),
|
|
18086
|
+
currency: z35.string(),
|
|
18087
|
+
display: z35.object({ kind: z35.literal("free"), currency: z35.string() })
|
|
18088
|
+
}),
|
|
18089
|
+
z35.object({
|
|
18090
|
+
kind: z35.literal("free_registration"),
|
|
18091
|
+
currency: z35.string(),
|
|
18092
|
+
display: z35.object({ kind: z35.literal("free"), currency: z35.string() })
|
|
18093
|
+
}),
|
|
18094
|
+
z35.object({
|
|
18095
|
+
kind: z35.literal("single_paid"),
|
|
18096
|
+
amount: z35.number(),
|
|
18097
|
+
currency: z35.string(),
|
|
18098
|
+
display: z35.object({ kind: z35.literal("exact"), amount: z35.number(), currency: z35.string() })
|
|
18099
|
+
}),
|
|
18100
|
+
z35.object({
|
|
18101
|
+
kind: z35.literal("ticket_types"),
|
|
18102
|
+
currency: z35.string(),
|
|
18103
|
+
ticketTypes: z35.array(publicEventTicketTypeSchema),
|
|
18104
|
+
display: publicEventTicketTypePriceDisplaySchema
|
|
18105
|
+
}),
|
|
18106
|
+
z35.object({
|
|
18107
|
+
kind: z35.literal("course"),
|
|
18108
|
+
display: z35.object({ kind: z35.literal("course"), display: publicCoursePriceDisplaySchema })
|
|
18109
|
+
})
|
|
18110
|
+
]);
|
|
16773
18111
|
var publicTeamMemberSummarySchema = z35.object({
|
|
16774
18112
|
id: z35.string(),
|
|
16775
18113
|
name: z35.string(),
|
|
@@ -16780,6 +18118,7 @@ var publicTeamMemberSummarySchema = z35.object({
|
|
|
16780
18118
|
var publicEventSchema = z35.object({
|
|
16781
18119
|
kind: z35.enum(["event", "course_session"]).optional(),
|
|
16782
18120
|
eventPreset: eventPresetSchema.optional(),
|
|
18121
|
+
eventDestinationMode: eventDestinationModeSchema.optional(),
|
|
16783
18122
|
scheduleScope: eventScheduleScopeSchema.optional(),
|
|
16784
18123
|
id: z35.string(),
|
|
16785
18124
|
occurrenceId: z35.string(),
|
|
@@ -16789,10 +18128,7 @@ var publicEventSchema = z35.object({
|
|
|
16789
18128
|
presentation: z35.object({
|
|
16790
18129
|
cardTitleOverride: z35.string().nullable().optional(),
|
|
16791
18130
|
summary: z35.string().nullable().optional(),
|
|
16792
|
-
image: mediaSchema2.nullable().optional()
|
|
16793
|
-
tags: z35.array(z35.string()).optional(),
|
|
16794
|
-
ctaLabel: z35.string().nullable().optional(),
|
|
16795
|
-
badges: z35.array(z35.string()).optional()
|
|
18131
|
+
image: mediaSchema2.nullable().optional()
|
|
16796
18132
|
}).optional(),
|
|
16797
18133
|
slug: z35.string(),
|
|
16798
18134
|
path: z35.string(),
|
|
@@ -16810,14 +18146,8 @@ var publicEventSchema = z35.object({
|
|
|
16810
18146
|
teamMembers: z35.array(publicTeamMemberSummarySchema).optional(),
|
|
16811
18147
|
status: z35.enum(["active", "draft", "archived"]).optional(),
|
|
16812
18148
|
timeZone: z35.string(),
|
|
16813
|
-
|
|
16814
|
-
pricingType: pricingTypeSchema,
|
|
16815
|
-
price: z35.number().nullable(),
|
|
16816
|
-
currency: z35.string(),
|
|
16817
|
-
priceDisplay: publicEventPriceDisplaySchema,
|
|
18149
|
+
pricing: publicEventPricingSchema,
|
|
16818
18150
|
paymentTerms: blockBookingPaymentTermsSchema,
|
|
16819
|
-
pricingMode: eventPricingModeSchema.optional(),
|
|
16820
|
-
ticketTypes: z35.array(publicEventTicketTypeSchema).optional(),
|
|
16821
18151
|
accessRestriction: accessRestrictionSchema,
|
|
16822
18152
|
allowedCategoryIds: z35.array(z35.string()),
|
|
16823
18153
|
requireGuestDetails: z35.boolean().optional(),
|
|
@@ -17088,6 +18418,7 @@ var eventRegistrationSourceSchema = z38.object({
|
|
|
17088
18418
|
siteId: z38.string().optional(),
|
|
17089
18419
|
apiBaseUrl: z38.string().optional(),
|
|
17090
18420
|
portalToken: z38.string().nullable().optional(),
|
|
18421
|
+
previewToken: z38.string().nullable().optional(),
|
|
17091
18422
|
occurrenceContext: occurrenceContextSchema.optional(),
|
|
17092
18423
|
contentEntry: contentEntrySchema.nullable().optional(),
|
|
17093
18424
|
events: z38.array(publicEventSchema).nullable().optional(),
|
|
@@ -17130,12 +18461,14 @@ var eventRegistrationIslandMetaCodec = createZodCodec(z38.object({
|
|
|
17130
18461
|
siteId: z38.string().optional(),
|
|
17131
18462
|
apiBaseUrl: z38.string().optional(),
|
|
17132
18463
|
portalToken: z38.string().nullable().optional(),
|
|
18464
|
+
previewToken: z38.string().nullable().optional(),
|
|
17133
18465
|
stage: previewStageSchema.optional()
|
|
17134
18466
|
}));
|
|
17135
18467
|
var eventRegistrationIslandMetaKeys = defineInteractiveIslandMetaKeys(
|
|
17136
18468
|
"siteId",
|
|
17137
18469
|
"apiBaseUrl",
|
|
17138
18470
|
"portalToken",
|
|
18471
|
+
"previewToken",
|
|
17139
18472
|
"stage"
|
|
17140
18473
|
);
|
|
17141
18474
|
function buildEventRegistrationDisplay(source) {
|
|
@@ -17178,6 +18511,7 @@ var eventRegistrationInteractiveIslandPropsCodec = createInteractiveIslandCodec(
|
|
|
17178
18511
|
siteId: value.siteId,
|
|
17179
18512
|
apiBaseUrl: value.apiBaseUrl,
|
|
17180
18513
|
portalToken: value.portalToken,
|
|
18514
|
+
previewToken: value.previewToken,
|
|
17181
18515
|
stage: value.stage
|
|
17182
18516
|
})
|
|
17183
18517
|
});
|
|
@@ -18228,7 +19562,8 @@ function getContainerClass(layout, columns) {
|
|
|
18228
19562
|
if (layout === "stack") {
|
|
18229
19563
|
return "rb-flex rb-flex-col rb-gap-6";
|
|
18230
19564
|
}
|
|
18231
|
-
|
|
19565
|
+
const fallbackColumnClass = COLUMN_CLASSES["3"] ?? "";
|
|
19566
|
+
return `rb-grid rb-items-stretch rb-grid-cols-1 rb-gap-6 ${COLUMN_CLASSES[columns] ?? fallbackColumnClass}`;
|
|
18232
19567
|
}
|
|
18233
19568
|
function getCardOrientation(layout) {
|
|
18234
19569
|
switch (layout) {
|
|
@@ -18688,6 +20023,14 @@ var eventListingConfig = {
|
|
|
18688
20023
|
category: "interactive",
|
|
18689
20024
|
tags: ["events", "listing", "paginated", "archive", "all-events"],
|
|
18690
20025
|
icon: "List",
|
|
20026
|
+
previewCustomize: {
|
|
20027
|
+
quickFieldPriority: [
|
|
20028
|
+
"layout",
|
|
20029
|
+
"columns",
|
|
20030
|
+
"eventsPerPage",
|
|
20031
|
+
"eventSurface"
|
|
20032
|
+
]
|
|
20033
|
+
},
|
|
18691
20034
|
layout: eventListingLayout
|
|
18692
20035
|
};
|
|
18693
20036
|
var eventListingManifest = createBlockManifestWithContentShape(
|
|
@@ -19461,6 +20804,14 @@ var eventCalendarConfig = {
|
|
|
19461
20804
|
"filter"
|
|
19462
20805
|
],
|
|
19463
20806
|
icon: "CalendarDays",
|
|
20807
|
+
previewCustomize: {
|
|
20808
|
+
quickFieldPriority: [
|
|
20809
|
+
"listLayout",
|
|
20810
|
+
"eventsPerPage",
|
|
20811
|
+
"showFilters",
|
|
20812
|
+
"eventSurface"
|
|
20813
|
+
]
|
|
20814
|
+
},
|
|
19464
20815
|
layout: eventCalendarLayout,
|
|
19465
20816
|
variants: eventCalendarVariants,
|
|
19466
20817
|
defaultVariant: "combined",
|
|
@@ -19550,12 +20901,59 @@ var OFFERINGS_PREVIEW_AUTHORABLE_SOURCE_KEYS = [
|
|
|
19550
20901
|
...OFFERINGS_PREVIEW_EVENT_PRESET_DEFINITIONS.map((definition) => definition.sourceKey),
|
|
19551
20902
|
"course"
|
|
19552
20903
|
];
|
|
20904
|
+
var OFFERINGS_PREVIEW_SOURCE_KEYS = OFFERINGS_PREVIEW_AUTHORABLE_SOURCE_KEYS;
|
|
19553
20905
|
var eventPresetSourceByKey = Object.fromEntries(
|
|
19554
20906
|
OFFERINGS_PREVIEW_EVENT_PRESET_DEFINITIONS.map((definition) => [
|
|
19555
20907
|
definition.sourceKey,
|
|
19556
20908
|
{ kind: "eventPreset", preset: definition.preset }
|
|
19557
20909
|
])
|
|
19558
20910
|
);
|
|
20911
|
+
function isOfferingsPreviewSourceKey(value) {
|
|
20912
|
+
return typeof value === "string" && OFFERINGS_PREVIEW_SOURCE_KEYS.includes(value);
|
|
20913
|
+
}
|
|
20914
|
+
function normalizeOfferingsPreviewGroupOrder(value) {
|
|
20915
|
+
if (value == null) return { kind: "legacy" };
|
|
20916
|
+
if (value.length === 0) return { kind: "default" };
|
|
20917
|
+
const keys = uniqueOfferingsPreviewSourceKeys(value);
|
|
20918
|
+
return keys.length > 0 ? { kind: "custom", keys } : { kind: "default" };
|
|
20919
|
+
}
|
|
20920
|
+
function inferLegacyOfferingsPreviewGroupOrder(overrides) {
|
|
20921
|
+
const keys = uniqueOfferingsPreviewSourceKeys(
|
|
20922
|
+
(overrides ?? []).map((override) => override.sourceKey)
|
|
20923
|
+
);
|
|
20924
|
+
return keys.length >= 2 ? keys : [];
|
|
20925
|
+
}
|
|
20926
|
+
function normalizeOfferingsPreviewContentForWrite(value) {
|
|
20927
|
+
if (!isRecord2(value)) return null;
|
|
20928
|
+
const groupOrderValue = value.groupOrder;
|
|
20929
|
+
if (Array.isArray(groupOrderValue)) {
|
|
20930
|
+
const normalized = normalizeOfferingsPreviewGroupOrder(groupOrderValue);
|
|
20931
|
+
return {
|
|
20932
|
+
...value,
|
|
20933
|
+
groupOrder: normalized.kind === "custom" ? normalized.keys : []
|
|
20934
|
+
};
|
|
20935
|
+
}
|
|
20936
|
+
if (groupOrderValue != null) {
|
|
20937
|
+
return { ...value, groupOrder: [] };
|
|
20938
|
+
}
|
|
20939
|
+
const legacyOrder = inferLegacyOfferingsPreviewGroupOrder(
|
|
20940
|
+
Array.isArray(value.groupOverrides) ? value.groupOverrides.filter(isRecord2) : []
|
|
20941
|
+
);
|
|
20942
|
+
return legacyOrder.length > 0 ? { ...value, groupOrder: legacyOrder } : value;
|
|
20943
|
+
}
|
|
20944
|
+
function uniqueOfferingsPreviewSourceKeys(values) {
|
|
20945
|
+
const keys = [];
|
|
20946
|
+
for (const value of values) {
|
|
20947
|
+
if (!isOfferingsPreviewSourceKey(value)) continue;
|
|
20948
|
+
if (!keys.includes(value)) {
|
|
20949
|
+
keys.push(value);
|
|
20950
|
+
}
|
|
20951
|
+
}
|
|
20952
|
+
return keys;
|
|
20953
|
+
}
|
|
20954
|
+
function isRecord2(value) {
|
|
20955
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
20956
|
+
}
|
|
19559
20957
|
|
|
19560
20958
|
// ../blocks/src/system/blocks/offerings-preview/index.ts
|
|
19561
20959
|
var publicRouteCandidatesSchema = z46.object({
|
|
@@ -19674,11 +21072,24 @@ var offeringsPreviewFields = [
|
|
|
19674
21072
|
],
|
|
19675
21073
|
ui: { intent: "display" }
|
|
19676
21074
|
},
|
|
21075
|
+
{
|
|
21076
|
+
id: "groupOrder",
|
|
21077
|
+
type: "select",
|
|
21078
|
+
label: "Offering card order",
|
|
21079
|
+
description: "Reorder enabled offering cards for this block.",
|
|
21080
|
+
required: false,
|
|
21081
|
+
multiple: true,
|
|
21082
|
+
options: OFFERINGS_PREVIEW_AUTHORABLE_SOURCE_KEYS.map((sourceKey) => ({
|
|
21083
|
+
value: sourceKey,
|
|
21084
|
+
label: labelForOfferingPreviewSourceKey(sourceKey)
|
|
21085
|
+
})),
|
|
21086
|
+
ui: { intent: "display", widget: "offeringGroupOrder" }
|
|
21087
|
+
},
|
|
19677
21088
|
{
|
|
19678
21089
|
id: "groupOverrides",
|
|
19679
21090
|
type: "repeater",
|
|
19680
21091
|
label: "Card overrides",
|
|
19681
|
-
description: "Edit card copy,
|
|
21092
|
+
description: "Edit card copy, presentation, links, or visibility for enabled offering presets.",
|
|
19682
21093
|
required: false,
|
|
19683
21094
|
maxItems: 5,
|
|
19684
21095
|
itemLabel: "Offering card",
|
|
@@ -19756,6 +21167,7 @@ var offeringsPreviewLayout = [
|
|
|
19756
21167
|
$bind: { from: "$root.bookingOfferingPresets", fallback: [] }
|
|
19757
21168
|
},
|
|
19758
21169
|
groupOverrides: { $bind: { from: "content.groupOverrides", fallback: [] } },
|
|
21170
|
+
groupOrder: { $bind: { from: "content.groupOrder" } },
|
|
19759
21171
|
cardStyles: { $bind: { from: "content._cardStyles" } },
|
|
19760
21172
|
itemLimit: { $bind: { from: "content.itemLimit", fallback: OFFERINGS_PREVIEW_DEFAULT_ITEM_LIMIT } },
|
|
19761
21173
|
buttonVariant: { $bind: { from: "content.buttonVariant", fallback: "primary" } },
|
|
@@ -19812,6 +21224,7 @@ var offeringsPreviewEventDataLoaders = Object.fromEntries(
|
|
|
19812
21224
|
);
|
|
19813
21225
|
var offeringsPreviewBlockDefinition = {
|
|
19814
21226
|
manifest: offeringsPreviewManifest,
|
|
21227
|
+
normalizeContent: normalizeOfferingsPreviewBlockContent,
|
|
19815
21228
|
dataSchemas: {
|
|
19816
21229
|
...offeringsPreviewEventDataSchemas,
|
|
19817
21230
|
routeCandidates: publicRouteCandidatesSchema.optional(),
|
|
@@ -19850,6 +21263,101 @@ function eventPresetLoader(preset) {
|
|
|
19850
21263
|
mode: "server"
|
|
19851
21264
|
};
|
|
19852
21265
|
}
|
|
21266
|
+
function labelForOfferingPreviewSourceKey(sourceKey) {
|
|
21267
|
+
const eventDefinition = OFFERINGS_PREVIEW_EVENT_PRESET_DEFINITIONS.find(
|
|
21268
|
+
(definition) => definition.sourceKey === sourceKey
|
|
21269
|
+
);
|
|
21270
|
+
if (eventDefinition) return eventDefinition.label;
|
|
21271
|
+
return "Courses";
|
|
21272
|
+
}
|
|
21273
|
+
function normalizeOfferingsPreviewBlockContent(value) {
|
|
21274
|
+
const record = normalizeOfferingsPreviewContentForWrite(value);
|
|
21275
|
+
if (!record) return {};
|
|
21276
|
+
const normalized = {};
|
|
21277
|
+
if (typeof record.heading === "string" || record.heading === null) {
|
|
21278
|
+
normalized.heading = record.heading;
|
|
21279
|
+
}
|
|
21280
|
+
if ("description" in record) {
|
|
21281
|
+
normalized.description = record.description;
|
|
21282
|
+
}
|
|
21283
|
+
if (isOfferingsPreviewItemLimit(record.itemLimit)) {
|
|
21284
|
+
normalized.itemLimit = record.itemLimit;
|
|
21285
|
+
}
|
|
21286
|
+
if (Array.isArray(record.groupOrder)) {
|
|
21287
|
+
normalized.groupOrder = record.groupOrder.filter(isOfferingsPreviewSourceKey);
|
|
21288
|
+
} else if (record.groupOrder === null) {
|
|
21289
|
+
normalized.groupOrder = null;
|
|
21290
|
+
}
|
|
21291
|
+
if (Array.isArray(record.groupOverrides)) {
|
|
21292
|
+
normalized.groupOverrides = record.groupOverrides.flatMap(
|
|
21293
|
+
normalizeOfferingsPreviewGroupOverride
|
|
21294
|
+
);
|
|
21295
|
+
} else if (record.groupOverrides === null) {
|
|
21296
|
+
normalized.groupOverrides = null;
|
|
21297
|
+
}
|
|
21298
|
+
const cardStyles = normalizeCardStylesContent(record._cardStyles);
|
|
21299
|
+
if (cardStyles !== void 0) {
|
|
21300
|
+
normalized._cardStyles = cardStyles;
|
|
21301
|
+
}
|
|
21302
|
+
if (isButtonVariant(record.buttonVariant)) {
|
|
21303
|
+
normalized.buttonVariant = record.buttonVariant;
|
|
21304
|
+
}
|
|
21305
|
+
if (typeof record.buttonText === "string" || record.buttonText === null) {
|
|
21306
|
+
normalized.buttonText = record.buttonText;
|
|
21307
|
+
}
|
|
21308
|
+
if (typeof record.emptyMessage === "string" || record.emptyMessage === null) {
|
|
21309
|
+
normalized.emptyMessage = record.emptyMessage;
|
|
21310
|
+
}
|
|
21311
|
+
const sectionStyles = normalizeSectionStylesContent(record._sectionStyles);
|
|
21312
|
+
if (sectionStyles !== void 0) {
|
|
21313
|
+
normalized._sectionStyles = sectionStyles;
|
|
21314
|
+
}
|
|
21315
|
+
return normalized;
|
|
21316
|
+
}
|
|
21317
|
+
function isOfferingsPreviewItemLimit(value) {
|
|
21318
|
+
return value === "1" || value === "2" || value === "3" || value === "4" || value === "5" || value === "6" || value === null;
|
|
21319
|
+
}
|
|
21320
|
+
function normalizeOfferingsPreviewGroupOverride(value) {
|
|
21321
|
+
if (!isRecord3(value)) return [];
|
|
21322
|
+
const override = {};
|
|
21323
|
+
if (isOfferingsPreviewSourceKey(value.sourceKey) || value.sourceKey === null) {
|
|
21324
|
+
override.sourceKey = value.sourceKey;
|
|
21325
|
+
}
|
|
21326
|
+
if (typeof value.title === "string" || value.title === null) {
|
|
21327
|
+
override.title = value.title;
|
|
21328
|
+
}
|
|
21329
|
+
if (typeof value.intro === "string" || value.intro === null) {
|
|
21330
|
+
override.intro = value.intro;
|
|
21331
|
+
}
|
|
21332
|
+
if (typeof value.hidden === "boolean" || value.hidden === null) {
|
|
21333
|
+
override.hidden = value.hidden;
|
|
21334
|
+
}
|
|
21335
|
+
if (value.presentation === "compact-list" || value.presentation === "single-card" || value.presentation === null) {
|
|
21336
|
+
override.presentation = value.presentation;
|
|
21337
|
+
}
|
|
21338
|
+
if (value.ctaMode === "auto" || value.ctaMode === "custom" || value.ctaMode === "hidden" || value.ctaMode === null) {
|
|
21339
|
+
override.ctaMode = value.ctaMode;
|
|
21340
|
+
}
|
|
21341
|
+
if (typeof value.ctaHref === "string" || value.ctaHref === null) {
|
|
21342
|
+
override.ctaHref = value.ctaHref;
|
|
21343
|
+
}
|
|
21344
|
+
if (typeof value.ctaLabel === "string" || value.ctaLabel === null) {
|
|
21345
|
+
override.ctaLabel = value.ctaLabel;
|
|
21346
|
+
}
|
|
21347
|
+
return [override];
|
|
21348
|
+
}
|
|
21349
|
+
function isButtonVariant(value) {
|
|
21350
|
+
return value === "primary" || value === "secondary" || value === "outline" || value === "link" || value === null;
|
|
21351
|
+
}
|
|
21352
|
+
function normalizeCardStylesContent(value) {
|
|
21353
|
+
return isRecord3(value) || value === null ? value : void 0;
|
|
21354
|
+
}
|
|
21355
|
+
function normalizeSectionStylesContent(value) {
|
|
21356
|
+
return isRecord3(value) || value === null ? value : void 0;
|
|
21357
|
+
}
|
|
21358
|
+
function isRecord3(value) {
|
|
21359
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
21360
|
+
}
|
|
19853
21361
|
|
|
19854
21362
|
// ../blocks/src/system/blocks/embed.ts
|
|
19855
21363
|
import { z as z47 } from "zod";
|
|
@@ -20750,6 +22258,15 @@ var baseImageGalleryManifest = createBlockManifest({
|
|
|
20750
22258
|
id: "block.image-gallery",
|
|
20751
22259
|
title: "Image Gallery",
|
|
20752
22260
|
category: "content",
|
|
22261
|
+
previewCustomize: {
|
|
22262
|
+
quickFieldPriority: [
|
|
22263
|
+
"aspectRatio",
|
|
22264
|
+
"slidesToShow",
|
|
22265
|
+
"fullBleed",
|
|
22266
|
+
"marqueeSpeed",
|
|
22267
|
+
"marqueePauseOnHover"
|
|
22268
|
+
]
|
|
22269
|
+
},
|
|
20753
22270
|
additionalFields: fields,
|
|
20754
22271
|
layout: wrapVariant2(gridLayout3),
|
|
20755
22272
|
variants: {
|
|
@@ -21304,8 +22821,6 @@ var publicProductSchema = z48.object({
|
|
|
21304
22821
|
slug: z48.string()
|
|
21305
22822
|
}).nullable(),
|
|
21306
22823
|
summary: z48.string().nullable(),
|
|
21307
|
-
badges: z48.array(z48.string()),
|
|
21308
|
-
ctaLabel: z48.string().nullable(),
|
|
21309
22824
|
body: z48.unknown().nullable(),
|
|
21310
22825
|
gallery: z48.array(
|
|
21311
22826
|
z48.object({
|
|
@@ -21465,7 +22980,6 @@ function buildProductCardDisplay(product, options, selectedVariantId) {
|
|
|
21465
22980
|
path: product.path ?? null,
|
|
21466
22981
|
summary: options.showSummary ? product.summary : null,
|
|
21467
22982
|
priceLabel,
|
|
21468
|
-
badges: options.showBadges ? product.badges : [],
|
|
21469
22983
|
image: product.gallery[0] ? { url: product.gallery[0].url, alt: product.gallery[0].alt ?? null } : null,
|
|
21470
22984
|
variantOptions: product.variants.map((variant) => ({
|
|
21471
22985
|
id: variant.id,
|
|
@@ -21474,7 +22988,7 @@ function buildProductCardDisplay(product, options, selectedVariantId) {
|
|
|
21474
22988
|
})),
|
|
21475
22989
|
selectedVariantId: selectedVariant?.id ?? null,
|
|
21476
22990
|
selectionLabel,
|
|
21477
|
-
actionLabel:
|
|
22991
|
+
actionLabel: options.addButtonText,
|
|
21478
22992
|
soldOut
|
|
21479
22993
|
};
|
|
21480
22994
|
}
|
|
@@ -21511,7 +23025,6 @@ function buildProductDetailDisplay(product, options, selectedVariantId) {
|
|
|
21511
23025
|
title: product.title,
|
|
21512
23026
|
priceLabel: formatCommercePrice(selectedVariant?.priceCents ?? product.priceCents, product.currency),
|
|
21513
23027
|
summary: options.showSummary ? product.summary : null,
|
|
21514
|
-
badges: options.showBadges ? product.badges : [],
|
|
21515
23028
|
categoryLabel: product.category?.name ?? null,
|
|
21516
23029
|
gallery: product.gallery.map((image) => ({ url: image.url, alt: image.alt ?? null })),
|
|
21517
23030
|
variantOptions: product.variants.map((variant) => ({
|
|
@@ -21521,7 +23034,7 @@ function buildProductDetailDisplay(product, options, selectedVariantId) {
|
|
|
21521
23034
|
})),
|
|
21522
23035
|
selectedVariantId: selectedVariant?.id ?? null,
|
|
21523
23036
|
selectionLabel: selectedVariant ? `${product.title} \u2013 ${selectedVariant.title}` : product.title,
|
|
21524
|
-
actionLabel:
|
|
23037
|
+
actionLabel: options.addButtonText,
|
|
21525
23038
|
soldOut,
|
|
21526
23039
|
body: product.body
|
|
21527
23040
|
};
|
|
@@ -21656,7 +23169,6 @@ var shopSourceSchema = z50.object({
|
|
|
21656
23169
|
showDescriptions: z50.boolean().optional(),
|
|
21657
23170
|
showSummary: z50.boolean().optional(),
|
|
21658
23171
|
showBody: z50.boolean().optional(),
|
|
21659
|
-
showBadges: z50.boolean().optional(),
|
|
21660
23172
|
showPrices: z50.boolean().optional(),
|
|
21661
23173
|
showValidityPeriod: z50.boolean().optional(),
|
|
21662
23174
|
showPricePerCredit: z50.boolean().nullable().optional(),
|
|
@@ -21689,7 +23201,6 @@ var productCardDisplaySchema = z50.object({
|
|
|
21689
23201
|
path: z50.string().nullable(),
|
|
21690
23202
|
summary: z50.string().nullable(),
|
|
21691
23203
|
priceLabel: z50.string().nullable(),
|
|
21692
|
-
badges: z50.array(z50.string()),
|
|
21693
23204
|
image: z50.object({
|
|
21694
23205
|
url: z50.string(),
|
|
21695
23206
|
alt: z50.string().nullable()
|
|
@@ -21726,7 +23237,6 @@ var productDetailDisplaySchema = z50.discriminatedUnion("state", [
|
|
|
21726
23237
|
title: z50.string(),
|
|
21727
23238
|
priceLabel: z50.string(),
|
|
21728
23239
|
summary: z50.string().nullable(),
|
|
21729
|
-
badges: z50.array(z50.string()),
|
|
21730
23240
|
categoryLabel: z50.string().nullable(),
|
|
21731
23241
|
gallery: z50.array(z50.object({
|
|
21732
23242
|
url: z50.string(),
|
|
@@ -21805,7 +23315,6 @@ var passesMembershipsHydrationSchema = z50.object({
|
|
|
21805
23315
|
var productListHydrationSchema = z50.object({
|
|
21806
23316
|
products: z50.array(publicProductSchema),
|
|
21807
23317
|
showSummary: z50.boolean(),
|
|
21808
|
-
showBadges: z50.boolean(),
|
|
21809
23318
|
showPrices: z50.boolean(),
|
|
21810
23319
|
addButtonText: z50.string()
|
|
21811
23320
|
});
|
|
@@ -21813,7 +23322,6 @@ var productDetailHydrationSchema = z50.object({
|
|
|
21813
23322
|
products: z50.array(publicProductSchema),
|
|
21814
23323
|
productId: z50.string().nullable(),
|
|
21815
23324
|
showSummary: z50.boolean(),
|
|
21816
|
-
showBadges: z50.boolean(),
|
|
21817
23325
|
showBody: z50.boolean(),
|
|
21818
23326
|
addButtonText: z50.string()
|
|
21819
23327
|
});
|
|
@@ -21909,14 +23417,12 @@ var productListBlockRuntime = defineProgressiveBlockRuntime({
|
|
|
21909
23417
|
columns: source.columns,
|
|
21910
23418
|
emptyMessage: source.emptyStateText,
|
|
21911
23419
|
showSummary: source.showSummary !== false,
|
|
21912
|
-
showBadges: source.showBadges !== false,
|
|
21913
23420
|
showPrices: source.showPrices !== false,
|
|
21914
23421
|
addButtonText: source.addButtonText ?? "Add to cart"
|
|
21915
23422
|
}),
|
|
21916
23423
|
hydration: {
|
|
21917
23424
|
products: source.products ?? [],
|
|
21918
23425
|
showSummary: source.showSummary !== false,
|
|
21919
|
-
showBadges: source.showBadges !== false,
|
|
21920
23426
|
showPrices: source.showPrices !== false,
|
|
21921
23427
|
addButtonText: source.addButtonText ?? "Add to cart"
|
|
21922
23428
|
}
|
|
@@ -21940,14 +23446,12 @@ var productDetailBlockRuntime = defineProgressiveBlockRuntime({
|
|
|
21940
23446
|
className: source.className,
|
|
21941
23447
|
emptyMessage: source.emptyStateText,
|
|
21942
23448
|
showSummary: source.showSummary !== false,
|
|
21943
|
-
showBadges: source.showBadges !== false,
|
|
21944
23449
|
addButtonText: source.addButtonText ?? "Add to cart"
|
|
21945
23450
|
}),
|
|
21946
23451
|
hydration: {
|
|
21947
23452
|
products: source.products ?? [],
|
|
21948
23453
|
productId: product?.id ?? null,
|
|
21949
23454
|
showSummary: source.showSummary !== false,
|
|
21950
|
-
showBadges: source.showBadges !== false,
|
|
21951
23455
|
showBody: source.showBody !== false,
|
|
21952
23456
|
addButtonText: source.addButtonText ?? "Add to cart"
|
|
21953
23457
|
}
|
|
@@ -22311,14 +23815,6 @@ var productListManifest = createBlockManifest({
|
|
|
22311
23815
|
defaultValue: true,
|
|
22312
23816
|
ui: { intent: "display" }
|
|
22313
23817
|
},
|
|
22314
|
-
{
|
|
22315
|
-
id: "showBadges",
|
|
22316
|
-
type: "boolean",
|
|
22317
|
-
label: "Show badges",
|
|
22318
|
-
required: false,
|
|
22319
|
-
defaultValue: true,
|
|
22320
|
-
ui: { intent: "display" }
|
|
22321
|
-
},
|
|
22322
23818
|
{
|
|
22323
23819
|
id: "showPrices",
|
|
22324
23820
|
type: "boolean",
|
|
@@ -22369,7 +23865,6 @@ var productListManifest = createBlockManifest({
|
|
|
22369
23865
|
layout: { $bind: { from: "content.layout", fallback: "grid" } },
|
|
22370
23866
|
columns: { $bind: { from: "content.columns", fallback: "3" } },
|
|
22371
23867
|
showSummary: { $bind: { from: "content.showSummary", fallback: true } },
|
|
22372
|
-
showBadges: { $bind: { from: "content.showBadges", fallback: true } },
|
|
22373
23868
|
showPrices: { $bind: { from: "content.showPrices", fallback: true } },
|
|
22374
23869
|
addButtonText: { $bind: { from: "content.addButtonText", fallback: "Add to cart" } },
|
|
22375
23870
|
emptyStateText: { $bind: { from: "content.emptyStateText", fallback: "No products available right now." } },
|
|
@@ -22446,14 +23941,6 @@ var productDetailManifest = createBlockManifest({
|
|
|
22446
23941
|
defaultValue: true,
|
|
22447
23942
|
ui: { intent: "display" }
|
|
22448
23943
|
},
|
|
22449
|
-
{
|
|
22450
|
-
id: "showBadges",
|
|
22451
|
-
type: "boolean",
|
|
22452
|
-
label: "Show badges",
|
|
22453
|
-
required: false,
|
|
22454
|
-
defaultValue: true,
|
|
22455
|
-
ui: { intent: "display" }
|
|
22456
|
-
},
|
|
22457
23944
|
{
|
|
22458
23945
|
id: "addButtonText",
|
|
22459
23946
|
type: "text",
|
|
@@ -22496,7 +23983,6 @@ var productDetailManifest = createBlockManifest({
|
|
|
22496
23983
|
productSlug: { $bind: { from: "content.productSlug", fallback: null } },
|
|
22497
23984
|
showSummary: { $bind: { from: "content.showSummary", fallback: true } },
|
|
22498
23985
|
showBody: { $bind: { from: "content.showBody", fallback: true } },
|
|
22499
|
-
showBadges: { $bind: { from: "content.showBadges", fallback: true } },
|
|
22500
23986
|
addButtonText: { $bind: { from: "content.addButtonText", fallback: "Add to cart" } },
|
|
22501
23987
|
emptyStateText: { $bind: { from: "content.emptyStateText", fallback: "Product unavailable." } },
|
|
22502
23988
|
contentEntry: { $bind: { from: "$root.contentEntry", fallback: null } },
|
|
@@ -22946,8 +24432,7 @@ function getPresetFields(preset, options) {
|
|
|
22946
24432
|
includePhone
|
|
22947
24433
|
);
|
|
22948
24434
|
default: {
|
|
22949
|
-
|
|
22950
|
-
throw new Error(`Unknown newsletter preset: ${_exhaustive}`);
|
|
24435
|
+
throw new Error("Unknown newsletter preset");
|
|
22951
24436
|
}
|
|
22952
24437
|
}
|
|
22953
24438
|
}
|
|
@@ -24520,9 +26005,6 @@ function getBuiltInContentTypes() {
|
|
|
24520
26005
|
fields: [
|
|
24521
26006
|
{ id: "summary", type: "text", label: "Summary", required: false },
|
|
24522
26007
|
{ id: "image", type: "media", label: "Listing image", required: false },
|
|
24523
|
-
{ id: "tags", type: "text", label: "Tags", required: false },
|
|
24524
|
-
{ id: "badges", type: "text", label: "Badges", required: false },
|
|
24525
|
-
{ id: "ctaLabel", type: "text", label: "CTA label", required: false },
|
|
24526
26008
|
{ id: "body", type: "richText", label: "Details", required: false }
|
|
24527
26009
|
]
|
|
24528
26010
|
},
|
|
@@ -24534,9 +26016,6 @@ function getBuiltInContentTypes() {
|
|
|
24534
26016
|
fields: [
|
|
24535
26017
|
{ id: "summary", type: "text", label: "Summary", required: false },
|
|
24536
26018
|
{ id: "image", type: "media", label: "Listing image", required: false },
|
|
24537
|
-
{ id: "tags", type: "text", label: "Tags", required: false },
|
|
24538
|
-
{ id: "badges", type: "text", label: "Badges", required: false },
|
|
24539
|
-
{ id: "ctaLabel", type: "text", label: "CTA label", required: false },
|
|
24540
26019
|
{ id: "body", type: "richText", label: "Details", required: false }
|
|
24541
26020
|
]
|
|
24542
26021
|
},
|
|
@@ -25310,7 +26789,7 @@ function collectValidationErrors(output) {
|
|
|
25310
26789
|
errors.push({
|
|
25311
26790
|
path: `blocks["${block.id}"].fields`,
|
|
25312
26791
|
message: `Block "${block.id}": Fields defined but never used in layout: ${unusedTopLevelFields.join(", ")}`,
|
|
25313
|
-
suggestion: `Every field should be bound to a layout node. Add $bind: { from: "content.${unusedTopLevelFields[0]}" } to an appropriate node, or remove unused fields.`
|
|
26792
|
+
suggestion: `Every field should be bound to a layout node. Add $bind: { from: "content.${unusedTopLevelFields[0] ?? "fieldId"}" } to an appropriate node, or remove unused fields.`
|
|
25314
26793
|
});
|
|
25315
26794
|
}
|
|
25316
26795
|
for (const [
|
|
@@ -25327,7 +26806,7 @@ function collectValidationErrors(output) {
|
|
|
25327
26806
|
errors.push({
|
|
25328
26807
|
path: `blocks["${block.id}"].fields`,
|
|
25329
26808
|
message: `Block "${block.id}": Repeater field "${repeaterFieldId}": nested fields defined but never used in repeated layout: ${missingNested.join(", ")}`,
|
|
25330
|
-
suggestion: `Inside the $repeat subtree for content.${repeaterFieldId} (itemName "${itemName}"), add nodes with $bind.from like "${itemName}.${missingNested[0]}".`
|
|
26809
|
+
suggestion: `Inside the $repeat subtree for content.${repeaterFieldId} (itemName "${itemName}"), add nodes with $bind.from like "${itemName}.${missingNested[0] ?? "fieldId"}".`
|
|
25331
26810
|
});
|
|
25332
26811
|
}
|
|
25333
26812
|
const missingBindings = findMissingBindings(block.layout, block.id);
|
|
@@ -25755,7 +27234,7 @@ function buildClassHookAttachSuggestions(blockId, missingClassNames, nodes) {
|
|
|
25755
27234
|
}
|
|
25756
27235
|
if ((lower.includes("headline") || lower.includes("title")) && (headlineNode ?? firstStack)) {
|
|
25757
27236
|
lines.push(
|
|
25758
|
-
`- ${className} \u2192 add to ${headlineNode ?? firstStack}.props.className`
|
|
27237
|
+
`- ${className} \u2192 add to ${headlineNode ?? firstStack ?? rootPath}.props.className`
|
|
25759
27238
|
);
|
|
25760
27239
|
continue;
|
|
25761
27240
|
}
|
|
@@ -25765,7 +27244,7 @@ function buildClassHookAttachSuggestions(blockId, missingClassNames, nodes) {
|
|
|
25765
27244
|
}
|
|
25766
27245
|
if ((lower.includes("body") || lower.includes("copy") || lower.includes("paragraph")) && (paragraphNode ?? firstStack)) {
|
|
25767
27246
|
lines.push(
|
|
25768
|
-
`- ${className} \u2192 add to ${paragraphNode ?? firstStack}.props.className`
|
|
27247
|
+
`- ${className} \u2192 add to ${paragraphNode ?? firstStack ?? rootPath}.props.className`
|
|
25769
27248
|
);
|
|
25770
27249
|
continue;
|
|
25771
27250
|
}
|
|
@@ -26099,7 +27578,7 @@ function detectPotentialTruncation(node, maxAllowedDepth, currentDepth = 0, path
|
|
|
26099
27578
|
const truncatedPaths = [];
|
|
26100
27579
|
if (currentDepth === maxAllowedDepth && n.children === null) {
|
|
26101
27580
|
if (CONTAINER_NODE_TYPES.includes(n.type || "")) {
|
|
26102
|
-
truncatedPaths.push(`${path2} (${n.type} at depth ${currentDepth})`);
|
|
27581
|
+
truncatedPaths.push(`${path2} (${n.type ?? "node"} at depth ${currentDepth})`);
|
|
26103
27582
|
}
|
|
26104
27583
|
}
|
|
26105
27584
|
if (n.children && Array.isArray(n.children)) {
|
|
@@ -26607,7 +28086,7 @@ var combinedPassSchema = z60.object({
|
|
|
26607
28086
|
function buildSystemPrompt(availableBlocks, matchThreshold) {
|
|
26608
28087
|
const blockCatalog = availableBlocks.map((b) => {
|
|
26609
28088
|
const fieldsPreview = b.fieldSummary.map((f) => {
|
|
26610
|
-
let desc = ` - ${f.id} (${f.type}): ${f.label}`;
|
|
28089
|
+
let desc = ` - ${f.id} (${f.type}): ${f.label ?? ""}`;
|
|
26611
28090
|
if (f.required) desc += " [REQUIRED]";
|
|
26612
28091
|
if (f.description) desc += ` - ${f.description}`;
|
|
26613
28092
|
return desc;
|
|
@@ -26875,7 +28354,7 @@ function getCornerRadius(corners2) {
|
|
|
26875
28354
|
case "pill":
|
|
26876
28355
|
return "9999px";
|
|
26877
28356
|
default: {
|
|
26878
|
-
console.warn(
|
|
28357
|
+
console.warn("Unknown corner style, defaulting to soft (4px)");
|
|
26879
28358
|
return "4px";
|
|
26880
28359
|
}
|
|
26881
28360
|
}
|
|
@@ -28071,7 +29550,7 @@ function sanitizeExtractedContent(content) {
|
|
|
28071
29550
|
}
|
|
28072
29551
|
return result;
|
|
28073
29552
|
}
|
|
28074
|
-
function
|
|
29553
|
+
function isRecord4(value) {
|
|
28075
29554
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
28076
29555
|
}
|
|
28077
29556
|
function isBoxStylesField(fieldId) {
|
|
@@ -28101,7 +29580,7 @@ function getBoxStylesFieldDocs(fieldId) {
|
|
|
28101
29580
|
}
|
|
28102
29581
|
function buildBuiltinExtractionPrompt(block) {
|
|
28103
29582
|
const fieldList = block.fieldSummary.map((f) => {
|
|
28104
|
-
let fieldDesc = `- **${f.id}** (${f.type}): ${f.label}`;
|
|
29583
|
+
let fieldDesc = `- **${f.id}** (${f.type}): ${f.label ?? ""}`;
|
|
28105
29584
|
if (f.required) fieldDesc += " [REQUIRED]";
|
|
28106
29585
|
if (f.options) {
|
|
28107
29586
|
fieldDesc += `
|
|
@@ -28180,7 +29659,7 @@ async function populateBuiltinBlock(sectionIndex, section2, blockInfo, ctx) {
|
|
|
28180
29659
|
await ctx.debug.writeText(`pass2-builtin-${sectionIndex}-raw.txt`, rawText);
|
|
28181
29660
|
await ctx.debug.writeJson(`pass2-builtin-${sectionIndex}-output.json`, result);
|
|
28182
29661
|
const rawContent = result.content;
|
|
28183
|
-
const sanitizedContent =
|
|
29662
|
+
const sanitizedContent = isRecord4(rawContent) ? sanitizeExtractedContent(rawContent) : {};
|
|
28184
29663
|
return {
|
|
28185
29664
|
success: true,
|
|
28186
29665
|
block: {
|