@riverbankcms/sdk 0.68.0 → 0.70.2
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/dist/_dts/ai/src/contracts/commandExposure.d.ts +8 -0
- package/dist/_dts/ai/src/contracts/feedback.d.ts +55 -0
- package/dist/_dts/ai/src/contracts/proposals.d.ts +34764 -0
- package/dist/_dts/ai/src/contracts.d.ts +5 -0
- package/dist/_dts/ai/src/designer/rfc6902.d.ts +16 -0
- package/dist/_dts/ai/src/designer/themePatch.d.ts +50 -0
- package/dist/_dts/api/src/accessAdmin.d.ts +3 -3
- package/dist/_dts/api/src/admin/types.d.ts +1 -1
- package/dist/_dts/api/src/aiPlayground.d.ts +13 -87
- package/dist/_dts/api/src/appointmentSetup.d.ts +23 -0
- package/dist/_dts/api/src/availability.d.ts +84 -2
- package/dist/_dts/api/src/billing.d.ts +1 -1
- package/dist/_dts/api/src/bookingConfig.d.ts +2 -2
- package/dist/_dts/api/src/bookingManagementEndpoints.d.ts +10 -1
- package/dist/_dts/api/src/bookingRecords.d.ts +1 -1
- package/dist/_dts/api/src/bookings.d.ts +1 -1
- package/dist/_dts/api/src/commercePortalEndpoints.d.ts +1 -1
- package/dist/_dts/api/src/communications.d.ts +1 -1
- package/dist/_dts/api/src/contentRuntime.d.ts +3 -2
- package/dist/_dts/api/src/contentTypes.d.ts +1 -1
- package/dist/_dts/api/src/endpoints.d.ts +29 -0
- package/dist/_dts/api/src/navigation/contracts.d.ts +9 -9
- package/dist/_dts/api/src/navigation/linkValue.d.ts +1 -1
- package/dist/_dts/api/src/navigation/types.d.ts +1 -1
- package/dist/_dts/api/src/public/index.d.ts +2 -2
- package/dist/_dts/api/src/public/types.d.ts +2 -2
- package/dist/_dts/api/src/sdkConfig/contracts.d.ts +1 -2
- package/dist/_dts/api/src/sdkContracts.d.ts +1 -1
- package/dist/_dts/api/src/siteBanner.d.ts +9 -9
- package/dist/_dts/api/src/siteManagementEndpoints.d.ts +2 -2
- package/dist/_dts/api/src/siteOnboarding.d.ts +1 -1
- package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +5 -1
- package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +33 -5
- package/dist/_dts/api/src/siteSettings.d.ts +3 -3
- package/dist/_dts/api/src/teamMembers.d.ts +1 -1
- package/dist/_dts/api/src/types.d.ts +2 -2
- package/dist/_dts/api/src/url.d.ts +1 -1
- package/dist/_dts/billing/src/components/index.d.ts +102 -3
- package/dist/_dts/block-form/src/backend/store-backend.d.ts +1 -1
- package/dist/_dts/block-form/src/backend/types.d.ts +2 -2
- package/dist/_dts/block-form/src/blockDraftSaveability.d.ts +2 -2
- package/dist/_dts/block-form/src/context/ImageResolveContext.d.ts +1 -1
- package/dist/_dts/block-form/src/fields/types.d.ts +1 -1
- package/dist/_dts/block-form/src/manifest/ManifestForm.d.ts +1 -1
- package/dist/_dts/block-form/src/manifest/canonicalValidation.d.ts +1 -1
- package/dist/_dts/block-form/src/manifest/manifestFormAdapter.d.ts +1 -1
- package/dist/_dts/block-form/src/manifest/mergeManifestWithSdkOptions.d.ts +1 -1
- package/dist/_dts/block-form/src/sdk-config/SdkConfigContext.d.ts +1 -1
- package/dist/_dts/block-form/src/shared/disclosure.d.ts +1 -1
- package/dist/_dts/block-form/src/widgets/BackgroundGradientWidget/BackgroundGradientWidget.d.ts +1 -1
- package/dist/_dts/block-form/src/widgets/DateField/datePickerPopover.d.ts +1 -1
- package/dist/_dts/block-form/src/widgets/RepeaterField/components/RepeaterLayoutGrid.d.ts +1 -1
- package/dist/_dts/block-form/src/widgets/RepeaterField/components/layoutGridDomain.d.ts +1 -1
- package/dist/_dts/block-form/src/widgets/RepeaterField/hooks/useRepeaterPointerDragCapability.d.ts +1 -1
- package/dist/_dts/block-form/src/widgets/RepeaterField/utils/repeaterDndDomain.d.ts +1 -1
- package/dist/_dts/block-form/src/widgets/RepeaterField/utils/repeaterPresentation.d.ts +1 -1
- package/dist/_dts/block-form/src/widgets/RepeaterField/utils/resolveThumbnail.d.ts +1 -1
- package/dist/_dts/block-form/src/widgets/RichTextField/richTextFieldSchema.d.ts +4 -4
- package/dist/_dts/block-form/src/widgets/constants.d.ts +1 -1
- package/dist/_dts/blocks/src/PageRenderer.d.ts +1 -1
- package/dist/_dts/blocks/src/bindings/index.d.ts +2 -2
- package/dist/_dts/blocks/src/client.d.ts +6 -4
- package/dist/_dts/blocks/src/index.d.ts +28 -27
- package/dist/_dts/blocks/src/portal/types.d.ts +1 -1
- package/dist/_dts/blocks/src/primitives/content/components/Button.d.ts +1 -1
- package/dist/_dts/blocks/src/rendering/server.d.ts +1 -1
- package/dist/_dts/blocks/src/server.d.ts +1 -1
- package/dist/_dts/blocks/src/structure/schema.d.ts +1 -1
- package/dist/_dts/blocks/src/system/blocks/appointment-booking.d.ts +1665 -1665
- package/dist/_dts/blocks/src/system/blocks/blog-listing.d.ts +1666 -1666
- package/dist/_dts/blocks/src/system/blocks/blog-post.d.ts +1 -1
- package/dist/_dts/blocks/src/system/blocks/cart.d.ts +1665 -1665
- package/dist/_dts/blocks/src/system/blocks/checkout.d.ts +1665 -1665
- package/dist/_dts/blocks/src/system/blocks/collection.d.ts +1666 -1666
- package/dist/_dts/blocks/src/system/blocks/columns.d.ts +1 -1
- package/dist/_dts/blocks/src/system/blocks/courses/shared/pricing.d.ts +3 -2
- package/dist/_dts/blocks/src/system/blocks/courses/shared/schemas.d.ts +42 -42
- package/dist/_dts/blocks/src/system/blocks/cta-full.d.ts +1761 -1761
- package/dist/_dts/blocks/src/system/blocks/events/event-calendar.d.ts +2 -2
- package/dist/_dts/blocks/src/system/blocks/events/event-spotlight.d.ts +1764 -1764
- package/dist/_dts/blocks/src/system/blocks/events/shared/filtering.d.ts +1 -1
- package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +44 -44
- package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +1 -1
- package/dist/_dts/blocks/src/system/blocks/faq.d.ts +1665 -1665
- package/dist/_dts/blocks/src/system/blocks/file-download.d.ts +1 -1
- package/dist/_dts/blocks/src/system/blocks/gifting.d.ts +1665 -1665
- package/dist/_dts/blocks/src/system/blocks/image-gallery.d.ts +1 -1
- package/dist/_dts/blocks/src/system/blocks/index.d.ts +1 -1
- package/dist/_dts/blocks/src/system/blocks/location-map.d.ts +9 -9
- package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +139 -139
- package/dist/_dts/blocks/src/system/blocks/product-detail.d.ts +1665 -1665
- package/dist/_dts/blocks/src/system/blocks/product-list.d.ts +1665 -1665
- package/dist/_dts/blocks/src/system/blocks/shared/bookingPaymentTerms.d.ts +19 -19
- package/dist/_dts/blocks/src/system/blocks/shop.d.ts +1665 -1665
- package/dist/_dts/blocks/src/system/blocks/team-members.d.ts +3 -3
- package/dist/_dts/blocks/src/system/blocks/testimonials.d.ts +1 -1
- package/dist/_dts/blocks/src/system/blocks/video-grid.d.ts +1 -1
- package/dist/_dts/blocks/src/system/componentFactory.d.ts +1 -1
- package/dist/_dts/blocks/src/system/constants/background.d.ts +1 -1
- package/dist/_dts/blocks/src/system/customize/facets.d.ts +5 -5
- package/dist/_dts/blocks/src/system/designCapabilities.d.ts +1 -1
- package/dist/_dts/blocks/src/system/fields/boxStyles.d.ts +1 -1
- package/dist/_dts/blocks/src/system/fragments/library/card.d.ts +1761 -1761
- package/dist/_dts/blocks/src/system/fragments/library/ctaRow.d.ts +1761 -1761
- package/dist/_dts/blocks/src/system/fragments/library/feedbackCallout.d.ts +1761 -1761
- package/dist/_dts/blocks/src/system/fragments/library/heroCtaRow.d.ts +1761 -1761
- package/dist/_dts/blocks/src/system/fragments/library/sectionState.d.ts +1761 -1761
- package/dist/_dts/blocks/src/system/frame/frameStyles.d.ts +3 -3
- package/dist/_dts/blocks/src/system/helpers/resolveBackground.d.ts +2 -2
- package/dist/_dts/blocks/src/system/manifest/augmentManifest.d.ts +1 -1
- package/dist/_dts/blocks/src/system/manifest/schema.d.ts +201 -201
- package/dist/_dts/blocks/src/system/media/constrainedVideoMedia.d.ts +1 -1
- package/dist/_dts/blocks/src/system/media/slotContracts.d.ts +1 -1
- package/dist/_dts/blocks/src/system/node/fragments/ctaButton.d.ts +1 -1
- package/dist/_dts/blocks/src/system/node/fragments/typography.d.ts +1 -1
- package/dist/_dts/blocks/src/system/node/schema.d.ts +5 -5
- package/dist/_dts/blocks/src/system/registry.d.ts +2 -2
- package/dist/_dts/blocks/src/system/runtime/api/types.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/header/shared.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessBookingFlow.d.ts +2 -2
- package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessBookingFlow.state.d.ts +2 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/accordion.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/accordion.server.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/basic.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.headless.state.d.ts +45 -29
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.reserved-fields.d.ts +27 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.state.d.ts +11 -7
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/timetableModel.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/utils.d.ts +3 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/location-map.shared.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/media.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/shared/LeafletStaticMap.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/shared/contract-schemas.d.ts +6 -6
- package/dist/_dts/blocks/src/system/runtime/shared/bookingPaymentOptionCopy.d.ts +1 -1
- package/dist/_dts/blocks/src/system/theme/index.d.ts +1 -1
- package/dist/_dts/blocks/src/system/transforms/registry/layout.d.ts +1 -1
- package/dist/_dts/blocks/src/system/transforms/registry/ui.d.ts +1 -1
- package/dist/_dts/blocks/src/system/transforms/typed.d.ts +3 -3
- package/dist/_dts/blocks/src/system/types/link.d.ts +3 -3
- package/dist/_dts/content-editor/src/components/ContentFieldsForm.d.ts +3 -3
- package/dist/_dts/content-editor/src/controller/EntryControllerProvider.d.ts +3 -3
- package/dist/_dts/content-editor/src/controller/buildBlockPublishedBaselines.d.ts +2 -2
- package/dist/_dts/content-editor/src/controller/buildPublishSuccessTransition.d.ts +2 -2
- package/dist/_dts/content-editor/src/controller/deriveRecoveryConflict.d.ts +1 -1
- package/dist/_dts/content-editor/src/controller/invalidBlockRecovery.d.ts +1 -1
- package/dist/_dts/content-editor/src/controller/seedDraftBaselinesFromBlocks.d.ts +1 -1
- package/dist/_dts/content-editor/src/controller/useBlocksList.d.ts +1 -1
- package/dist/_dts/content-editor/src/controller/useEntrySyncHelpers.d.ts +3 -3
- package/dist/_dts/content-editor/src/controller/useInvalidBlockRecovery.d.ts +1 -1
- package/dist/_dts/content-editor/src/hooks/blockedPublishPlan.d.ts +1 -1
- package/dist/_dts/content-editor/src/hooks/useEntryActions.d.ts +1 -1
- package/dist/_dts/content-editor/src/hooks/useEntryMutations.d.ts +2 -2
- package/dist/_dts/content-editor/src/hooks/useStoreAutosave.d.ts +1 -1
- package/dist/_dts/content-editor/src/hooks/validateBlocksForPublish.d.ts +1 -1
- package/dist/_dts/content-editor/src/primitives/PreviewRichTextEditor.d.ts +1 -1
- package/dist/_dts/content-editor/src/primitives/PreviewTextEditor.d.ts +1 -1
- package/dist/_dts/content-editor/src/registry.d.ts +1 -1
- package/dist/_dts/content-editor/src/services/contentEntryServices.d.ts +2 -2
- package/dist/_dts/content-editor/src/types.d.ts +2 -2
- package/dist/_dts/content-editor/src/ui/blockValidationView.d.ts +3 -3
- package/dist/_dts/content-editor/src/ui/editorSnapshot.d.ts +1 -1
- package/dist/_dts/content-editor/src/ui/stores/types.d.ts +1 -1
- package/dist/_dts/content-editor/src/ui/stores/utils.d.ts +1 -1
- package/dist/_dts/content-model/src/content-types/schema.d.ts +8 -8
- package/dist/_dts/core/src/branded.d.ts +2 -0
- package/dist/_dts/core/src/index.d.ts +2 -0
- package/dist/_dts/core/src/planner.d.ts +64 -0
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +236 -18
- package/dist/_dts/db/src/schemas/forms.d.ts +62 -62
- package/dist/_dts/editor-blocks/src/BlockEditor.d.ts +5 -5
- package/dist/_dts/editor-blocks/src/BlockForm.d.ts +5 -5
- package/dist/_dts/editor-blocks/src/FormProvider.d.ts +2 -2
- package/dist/_dts/editor-blocks/src/block-editor/BlockCard.d.ts +6 -6
- package/dist/_dts/editor-blocks/src/block-editor/BlockCardBody.d.ts +3 -3
- package/dist/_dts/editor-blocks/src/block-editor/BlockCardHeader.d.ts +2 -2
- package/dist/_dts/editor-blocks/src/block-editor/BlockListContext.d.ts +2 -2
- package/dist/_dts/editor-blocks/src/block-editor/BlockPickerDialog.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/block-editor/BlockSettingsModal.d.ts +2 -2
- package/dist/_dts/editor-blocks/src/block-editor/BlockThumbnail.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/block-editor/BlockTile.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/SortableBlockItem.d.ts +3 -3
- package/dist/_dts/editor-blocks/src/block-editor/blockDiscovery.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/block-editor/hooks/buildInsertBlockHistoryCommand.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/block-editor/hooks/useBlockBaselineSync.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/block-editor/hooks/useBlockCreation.d.ts +3 -3
- package/dist/_dts/editor-blocks/src/block-editor/hooks/useBlockDuplication.d.ts +2 -2
- package/dist/_dts/editor-blocks/src/block-editor/hooks/useBlockReorder.d.ts +2 -2
- package/dist/_dts/editor-blocks/src/block-editor/hooks/useDraftContent.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/block-editor/preparedManifest.d.ts +2 -2
- package/dist/_dts/editor-blocks/src/block-editor/sdkBlockMerger.d.ts +3 -3
- package/dist/_dts/editor-blocks/src/block-editor/settingsIntent.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/block-editor/types.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/block-form/debug.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/blockPayload.d.ts +2 -2
- package/dist/_dts/editor-blocks/src/index.d.ts +2 -2
- package/dist/_dts/editor-blocks/src/media/MediaField.d.ts +6 -6
- 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/button/index.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/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/entry-picker/index.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/widgets/entry-picker/loaders.d.ts +2 -2
- package/dist/_dts/editor-blocks/src/widgets/entry-picker/types.d.ts +2 -2
- package/dist/_dts/editor-blocks/src/widgets/icon-picker/IconPickerField.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/widgets/link/LinkField.d.ts +2 -2
- package/dist/_dts/editor-blocks/src/widgets/link/LinkPicker.d.ts +3 -3
- 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 +3 -3
- package/dist/_dts/editor-blocks/src/widgets/link/LinkWidgetContext.d.ts +2 -2
- package/dist/_dts/editor-blocks/src/widgets/link/loaders.d.ts +3 -3
- package/dist/_dts/editor-blocks/src/widgets/link/types.d.ts +2 -2
- package/dist/_dts/editor-blocks/src/widgets/link/utils.d.ts +2 -2
- package/dist/_dts/editor-blocks/src/widgets/reference/ReferenceField.d.ts +2 -2
- package/dist/_dts/editor-blocks/src/widgets/reference/ReferenceWidgetProvider.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/widgets/reference/dynamicAdapters.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/widgets/reference/loaders.d.ts +3 -3
- package/dist/_dts/editor-blocks/src/widgets/reference/types.d.ts +3 -3
- package/dist/_dts/editor-blocks/src/widgets/rich-text/RichTextField.d.ts +2 -2
- package/dist/_dts/editor-blocks/src/widgets/rich-text/RichTextWidgetProvider.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/widgets/rich-text/ensureRichTextImageAssetIdentifier.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/widgets/rich-text/richTextImageHydration.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/widgets/shared/Combobox.d.ts +1 -1
- package/dist/_dts/media-core/src/fileAssetCompatibility.d.ts +1 -1
- package/dist/_dts/media-core/src/fileAssetDeletion.d.ts +1 -1
- package/dist/_dts/media-core/src/fileDomain.d.ts +1 -1
- package/dist/_dts/media-core/src/fileDownloadResolution.d.ts +1 -1
- package/dist/_dts/media-core/src/filePersistence.d.ts +1 -1
- package/dist/_dts/media-core/src/fileStorage.d.ts +1 -1
- package/dist/_dts/media-core/src/fileUploadAssetBuilder.d.ts +1 -1
- package/dist/_dts/media-core/src/fileUploadCleanup.d.ts +1 -1
- package/dist/_dts/media-core/src/fileUploadCompletion.d.ts +1 -1
- package/dist/_dts/media-core/src/fileUploadDurableFinalization.d.ts +1 -1
- package/dist/_dts/media-core/src/fileUploadFinalization.d.ts +1 -1
- package/dist/_dts/media-core/src/fileUploadSessionCreation.d.ts +1 -1
- package/dist/_dts/media-core/src/types.d.ts +2 -2
- package/dist/_dts/media-core/src/url.d.ts +1 -1
- package/dist/_dts/media-core/src/videoPrep.d.ts +1 -1
- package/dist/_dts/media-editor/src/CropDialog.d.ts +1 -1
- package/dist/_dts/media-editor/src/MediaEditor.d.ts +2 -2
- package/dist/_dts/media-editor/src/MediaPickerDialog.d.ts +1 -1
- package/dist/_dts/media-editor/src/context.d.ts +3 -3
- package/dist/_dts/media-editor/src/createMediaEditorProvider.d.ts +1 -1
- package/dist/_dts/media-editor/src/cropEditorSource.d.ts +1 -1
- package/dist/_dts/media-editor/src/debug.d.ts +1 -1
- package/dist/_dts/media-editor/src/provider.d.ts +3 -3
- package/dist/_dts/media-editor/src/runtimeMediaAssetState.d.ts +1 -1
- package/dist/_dts/media-editor/src/transformModel.d.ts +1 -1
- package/dist/_dts/media-editor/src/types.d.ts +2 -2
- package/dist/_dts/media-editor/src/utils.d.ts +1 -1
- package/dist/_dts/media-react/src/components/ImageCropper.d.ts +1 -1
- package/dist/_dts/media-react/src/components/cropDraftModel.d.ts +1 -1
- package/dist/_dts/media-react/src/components/cropGeometry.d.ts +1 -1
- package/dist/_dts/media-react/src/components/cropSessionState.d.ts +1 -1
- package/dist/_dts/media-react/src/components/useImageCropperController.d.ts +1 -1
- package/dist/_dts/media-react/src/ffmpegLoader.d.ts +1 -1
- package/dist/_dts/media-react/src/hooks/internal/classification.d.ts +1 -1
- package/dist/_dts/media-react/src/hooks/mediaAssetResponseMapper.d.ts +1 -1
- package/dist/_dts/media-react/src/hooks/useApiMediaUploader.d.ts +4 -4
- package/dist/_dts/media-react/src/utils/rotation.d.ts +1 -1
- package/dist/_dts/media-react/src/videoFrameExtraction.d.ts +1 -1
- package/dist/_dts/media-react/src/videoPrepBrowser.d.ts +2 -2
- package/dist/_dts/preview-next/src/client/blocks/BoundaryControl.d.ts +1 -1
- package/dist/_dts/preview-next/src/client/blocks/EditablePageRenderer.d.ts +1 -1
- package/dist/_dts/preview-next/src/client/blocks/composer/composePageFromBlocks.d.ts +1 -1
- package/dist/_dts/preview-next/src/client/blocks/composer/mergeDrafts.d.ts +2 -2
- package/dist/_dts/preview-next/src/client/blocks/composer/types.d.ts +3 -3
- package/dist/_dts/preview-next/src/client/blocks/customizeFacetControls.d.ts +2 -2
- package/dist/_dts/preview-next/src/client/blocks/editorRegistry.d.ts +1 -1
- package/dist/_dts/preview-next/src/client/blocks/pageDesignRuntimePreview.d.ts +2 -2
- package/dist/_dts/preview-next/src/client/blocks/previewCustomizeActions.d.ts +2 -2
- package/dist/_dts/preview-next/src/client/blocks/previewProjection/aiProposalProjection.d.ts +2 -2
- package/dist/_dts/preview-next/src/client/blocks/previewProjection/applyPreviewProjections.d.ts +2 -2
- package/dist/_dts/preview-next/src/client/blocks/previewProjection/runtimeContentDecoration.d.ts +2 -2
- package/dist/_dts/preview-next/src/client/blocks/previewProjection/types.d.ts +3 -3
- package/dist/_dts/preview-next/src/client/preview/EntryEditorPanel.d.ts +5 -5
- package/dist/_dts/preview-next/src/client/preview/OnboardingThemeSwitcher.d.ts +2 -2
- package/dist/_dts/preview-next/src/client/preview/PageBlockEditorPanel.d.ts +5 -5
- package/dist/_dts/preview-next/src/client/preview/PageDesignEditorStateContext.d.ts +1 -1
- package/dist/_dts/preview-next/src/client/preview/PreviewAuthBanner.d.ts +1 -1
- package/dist/_dts/preview-next/src/client/preview/PreviewEditorSidebar.d.ts +11 -10
- package/dist/_dts/preview-next/src/client/preview/PreviewEditorUI.d.ts +2 -2
- package/dist/_dts/preview-next/src/client/preview/PreviewEntryControllerProvider.d.ts +2 -2
- package/dist/_dts/preview-next/src/client/preview/PreviewShell.d.ts +10 -9
- package/dist/_dts/preview-next/src/client/preview/PreviewShellLayout.d.ts +10 -9
- 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/SiteChromeCustomizeContext.d.ts +8 -6
- package/dist/_dts/preview-next/src/client/preview/StyleConfigurator.d.ts +8 -6
- package/dist/_dts/preview-next/src/client/preview/StyleConfigurator.state.d.ts +5 -4
- package/dist/_dts/preview-next/src/client/preview/pageSchema.d.ts +1 -1
- package/dist/_dts/preview-next/src/client/preview/previewChromeSurface.d.ts +1 -1
- package/dist/_dts/preview-next/src/client/preview/previewChromeSurfacePolicy.d.ts +1 -1
- package/dist/_dts/preview-next/src/client/preview/previewCustomizeHistory.d.ts +3 -3
- package/dist/_dts/preview-next/src/client/preview/previewCustomizeRuntimePatch.d.ts +2 -2
- package/dist/_dts/preview-next/src/client/preview/previewCustomizeWorkflowState.d.ts +1 -1
- package/dist/_dts/preview-next/src/client/preview/previewSurface.d.ts +1 -1
- package/dist/_dts/preview-next/src/client/preview/sidebarTabPreference.d.ts +1 -1
- package/dist/_dts/preview-next/src/client/preview/siteChromeLookRows.d.ts +2 -2
- package/dist/_dts/preview-next/src/client/preview/styleConfiguratorApplyPayload.d.ts +8 -0
- package/dist/_dts/preview-next/src/client/preview/styleConfiguratorSnapshot.d.ts +5 -4
- package/dist/_dts/preview-next/src/client/preview/subrouteNotice.d.ts +1 -1
- package/dist/_dts/preview-next/src/client/preview/themeOverlay.d.ts +1 -1
- package/dist/_dts/preview-next/src/client/sdk/SdkPreviewMode.d.ts +2 -2
- package/dist/_dts/preview-next/src/client/widgets/PreviewMediaField.d.ts +2 -2
- package/dist/_dts/preview-next/src/client/widgets/widgetAdapters.d.ts +3 -3
- package/dist/_dts/preview-next/src/client/widgets/widgetOverrides.d.ts +3 -3
- package/dist/_dts/sdk/src/bookings/index.d.ts +3 -2
- package/dist/_dts/sdk/src/bookings/types.d.ts +16 -10
- package/dist/_dts/sdk/src/cli/commands/push/scopes/commandBackedDatedOfferingScope.d.ts +1 -1
- package/dist/_dts/sdk/src/cli/commands/push/scopes/types.d.ts +1 -1
- package/dist/_dts/sdk/src/cli/commands/style.d.ts +19 -0
- package/dist/_dts/sdk/src/cli/content/reader.d.ts +1 -1
- package/dist/_dts/sdk/src/cli/env.d.ts +1 -1
- package/dist/_dts/sdk/src/cli/merge-remote/entryMergePush.d.ts +1 -1
- package/dist/_dts/sdk/src/cli/push-config.d.ts +1 -1
- package/dist/_dts/sdk/src/cli/site-commands/commandKeys.d.ts +1 -1
- package/dist/_dts/sdk/src/cli/site-commands/commandRuntime.d.ts +2 -2
- package/dist/_dts/sdk/src/cli/site-commands/commandSurfaceDispatch.d.ts +1 -1
- package/dist/_dts/sdk/src/cli/site-commands/datedOfferingCommands.d.ts +1 -1
- package/dist/_dts/sdk/src/cli/site-commands/entryCommands.d.ts +2 -2
- package/dist/_dts/sdk/src/cli/site-commands/footerCommands.d.ts +2 -2
- package/dist/_dts/sdk/src/cli/site-commands/formCommands.d.ts +2 -2
- package/dist/_dts/sdk/src/cli/site-commands/navigationCommands.d.ts +2 -2
- 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/site-commands/pushExecutionTypes.d.ts +1 -1
- package/dist/_dts/sdk/src/client/management/index.d.ts +2 -1
- package/dist/_dts/sdk/src/client/management/theme.d.ts +3 -1
- package/dist/_dts/sdk/src/client/management/types.d.ts +23 -0
- package/dist/_dts/sdk/src/config/validation.d.ts +37 -43
- package/dist/_dts/sdk/src/contracts/system-block-content.d.ts +1 -1
- package/dist/_dts/sdk/src/manifest/passes/pass1-fields.d.ts +19 -19
- package/dist/_dts/sdk/src/portal/config.d.ts +1 -1
- package/dist/_dts/sdk/src/portal/index.d.ts +1 -1
- package/dist/_dts/sdk/src/preview-next/client/index.d.ts +1 -1
- package/dist/_dts/sdk/src/preview-next/client/runtime.d.ts +1 -1
- package/dist/_dts/sdk/src/preview-next/constants.d.ts +1 -1
- package/dist/_dts/sdk/src/preview-next/cookies.d.ts +1 -1
- package/dist/_dts/sdk/src/preview-next/index.d.ts +2 -2
- package/dist/_dts/sdk/src/preview-next/middleware.d.ts +1 -1
- package/dist/_dts/sdk/src/preview-next/session.d.ts +1 -1
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +19 -4
- package/dist/_dts/sdk/src/rendering/islands/blocksContracts.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/islands/types.d.ts +3 -3
- package/dist/_dts/sdk/src/spam-protection/index.d.ts +3 -3
- package/dist/_dts/sdk/src/theme-bridge/ThemeBridgeProvider.d.ts +2 -2
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/site-commands/src/adapter.d.ts +1 -1
- package/dist/_dts/site-commands/src/commands.d.ts +95 -46
- package/dist/_dts/site-commands/src/domain.d.ts +2 -2
- package/dist/_dts/site-commands/src/exposure.d.ts +3 -3
- package/dist/_dts/site-commands/src/metadata.d.ts +15 -2
- package/dist/_dts/site-commands/src/planner.d.ts +1 -1
- package/dist/_dts/site-commands/src/refs.d.ts +1 -1
- package/dist/_dts/theme-core/src/accordions/types.d.ts +9 -9
- package/dist/_dts/theme-core/src/blocks/index.d.ts +2 -2
- package/dist/_dts/theme-core/src/blocks/types.d.ts +3 -2
- package/dist/_dts/theme-core/src/buttons/personalities/brushed-wash.d.ts +5 -5
- package/dist/_dts/theme-core/src/buttons/personalities/confident-chip.d.ts +5 -5
- package/dist/_dts/theme-core/src/buttons/personalities/editorial-link.d.ts +5 -5
- package/dist/_dts/theme-core/src/buttons/personalities/index.d.ts +35 -35
- package/dist/_dts/theme-core/src/buttons/personalities/ink-stamp.d.ts +5 -5
- package/dist/_dts/theme-core/src/buttons/personalities/pebble.d.ts +5 -5
- package/dist/_dts/theme-core/src/buttons/personalities/showtime-pill.d.ts +5 -5
- package/dist/_dts/theme-core/src/buttons/personalities/soft-pill.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 +18 -18
- package/dist/_dts/theme-core/src/cards/types.d.ts +17 -17
- package/dist/_dts/theme-core/src/inputs/types.d.ts +13 -13
- package/dist/_dts/theme-core/src/interactive/baseSchema.d.ts +1 -1
- package/dist/_dts/theme-core/src/mock-themes/all.d.ts +351 -351
- package/dist/_dts/theme-core/src/navigation/types.d.ts +15 -15
- package/dist/_dts/theme-core/src/palette/recipes/allRecipes.d.ts +1 -1
- package/dist/_dts/theme-core/src/palette/variants/brand-led.d.ts +24 -24
- package/dist/_dts/theme-core/src/palette/variants/high-contrast.d.ts +18 -18
- package/dist/_dts/theme-core/src/palette/variants/index.d.ts +65 -65
- package/dist/_dts/theme-core/src/palette/variants/soft-natural.d.ts +18 -18
- package/dist/_dts/theme-core/src/palette/variants/types.d.ts +7 -7
- package/dist/_dts/theme-core/src/palette/variants/warm-neutral.d.ts +18 -18
- package/dist/_dts/theme-core/src/progress/generateProgressCss.d.ts +2 -1
- package/dist/_dts/theme-core/src/recommend/generateThemes.d.ts +1 -1
- package/dist/_dts/theme-core/src/runtime/buildThemeRuntimeFromBridge.d.ts +4 -0
- package/dist/_dts/theme-core/src/schema.d.ts +568 -568
- package/dist/_dts/theme-core/src/shared/componentStyles.d.ts +2 -2
- package/dist/_dts/theme-core/src/site-styles/appearancePresetCatalog.d.ts +1 -1
- package/dist/_dts/theme-core/src/site-styles/blockAppearancePresets.d.ts +1 -1
- package/dist/_dts/theme-core/src/site-styles/designState.d.ts +34 -34
- package/dist/_dts/theme-core/src/site-styles/generatedSchemas.d.ts +4 -4
- package/dist/_dts/theme-core/src/site-styles/pageDesignAuthority.d.ts +1 -1
- package/dist/_dts/theme-core/src/site-styles/siteStyleBlockPolicies.d.ts +1 -1
- package/dist/_dts/theme-core/src/site-styles/sourceCatalogs.d.ts +14 -14
- package/dist/_dts/theme-core/src/site-styles/styleTags.d.ts +1 -1
- package/dist/_dts/theme-core/src/site-styles/tokenRecipes.d.ts +4 -4
- package/dist/_dts/theme-core/src/status/generateStatusCss.d.ts +2 -1
- package/dist/_dts/theme-core/src/tokens/themeColorTokens.d.ts +5 -5
- package/dist/_dts/ui/src/badge.d.ts +1 -1
- package/dist/_dts/ui/src/button.d.ts +2 -2
- package/dist/_dts/ui/src/card.d.ts +1 -1
- package/dist/_dts/ui/src/color-picker.d.ts +1 -1
- package/dist/_dts/ui/src/surface.d.ts +2 -2
- package/dist/_dts/ui/src/toggle.d.ts +4 -4
- package/dist/cli/index.mjs +5989 -5678
- package/dist/client/bookings.mjs +104 -34
- package/dist/client/client.mjs +4482 -4298
- package/dist/client/hooks.mjs +5783 -3847
- package/dist/client/rendering/client.mjs +164 -35
- package/dist/client/rendering/islands.mjs +164 -35
- package/dist/client/rendering.mjs +530 -346
- package/dist/preview-next/before-render.mjs +39 -0
- package/dist/preview-next/client/runtime.mjs +339 -92
- package/dist/preview-next/middleware.mjs +39 -0
- package/dist/server/components.mjs +418 -310
- package/dist/server/config-validation.mjs +6899 -4883
- package/dist/server/config.mjs +6890 -4883
- package/dist/server/data.mjs +5783 -3847
- package/dist/server/index.mjs +199 -1762
- package/dist/server/next.mjs +6577 -5268
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +420 -312
- package/dist/server/rendering.mjs +420 -312
- package/dist/server/routing.mjs +11475 -7881
- package/dist/server/server.mjs +5770 -3834
- package/dist/server/theme-bridge.mjs +249 -15
- package/package.json +1 -3
|
@@ -1558,6 +1558,31 @@ var blockCustomCssRuleSchema = customCssRuleSchema.extend({
|
|
|
1558
1558
|
});
|
|
1559
1559
|
var customCssRulesSchema = z12.array(customCssRuleSchema).optional();
|
|
1560
1560
|
var blockCustomCssRulesSchema = z12.array(blockCustomCssRuleSchema).optional();
|
|
1561
|
+
function toValidatedCssSelector(value) {
|
|
1562
|
+
return value;
|
|
1563
|
+
}
|
|
1564
|
+
function toValidatedCssDeclarationValue(value) {
|
|
1565
|
+
return value;
|
|
1566
|
+
}
|
|
1567
|
+
function toValidatedCssDeclarations(declarations) {
|
|
1568
|
+
return Object.fromEntries(
|
|
1569
|
+
Object.entries(declarations).map(([property, value]) => [
|
|
1570
|
+
property,
|
|
1571
|
+
toValidatedCssDeclarationValue(value)
|
|
1572
|
+
])
|
|
1573
|
+
);
|
|
1574
|
+
}
|
|
1575
|
+
function parseCustomCssRule(rule) {
|
|
1576
|
+
const parsed = customCssRuleSchema.parse(rule);
|
|
1577
|
+
return {
|
|
1578
|
+
id: parsed.id,
|
|
1579
|
+
selector: toValidatedCssSelector(parsed.selector),
|
|
1580
|
+
declarations: toValidatedCssDeclarations(parsed.declarations)
|
|
1581
|
+
};
|
|
1582
|
+
}
|
|
1583
|
+
function parseCustomCssRules(rules) {
|
|
1584
|
+
return rules?.map((rule) => parseCustomCssRule(rule));
|
|
1585
|
+
}
|
|
1561
1586
|
|
|
1562
1587
|
// ../theme-core/src/customCss/atRuleValidation.ts
|
|
1563
1588
|
import { z as z13 } from "zod";
|
|
@@ -3006,10 +3031,48 @@ function generateAllBlockVarsCss(context) {
|
|
|
3006
3031
|
}
|
|
3007
3032
|
|
|
3008
3033
|
// ../theme-core/src/customCss/selectorUtils.ts
|
|
3034
|
+
function prefixSelector(selector, scopePrefix) {
|
|
3035
|
+
return selector.split(",").map((s) => s.trim()).filter(Boolean).map((s) => {
|
|
3036
|
+
const themeScopeAliases = [".theme-scope", ":where(.theme-scope)"];
|
|
3037
|
+
for (const alias of themeScopeAliases) {
|
|
3038
|
+
if (s === alias) {
|
|
3039
|
+
return scopePrefix;
|
|
3040
|
+
}
|
|
3041
|
+
if (s.startsWith(alias)) {
|
|
3042
|
+
return scopePrefix + s.slice(alias.length);
|
|
3043
|
+
}
|
|
3044
|
+
}
|
|
3045
|
+
if (s === "&") {
|
|
3046
|
+
return scopePrefix;
|
|
3047
|
+
}
|
|
3048
|
+
if (s.startsWith("&")) {
|
|
3049
|
+
return scopePrefix + s.slice(1);
|
|
3050
|
+
}
|
|
3051
|
+
return `${scopePrefix} ${s}`;
|
|
3052
|
+
}).join(", ");
|
|
3053
|
+
}
|
|
3054
|
+
function toKebabCase(str) {
|
|
3055
|
+
return str.replace(/[A-Z]/g, (letter) => `-${letter.toLowerCase()}`);
|
|
3056
|
+
}
|
|
3009
3057
|
function escapeStyleContent(css) {
|
|
3010
3058
|
return css.replace(/<\/style/gi, "<\\/style");
|
|
3011
3059
|
}
|
|
3012
3060
|
|
|
3061
|
+
// ../theme-core/src/customCss/compile.ts
|
|
3062
|
+
function compileCustomCssRules(rules, themeId) {
|
|
3063
|
+
if (!rules || rules.length === 0) return "";
|
|
3064
|
+
const scopePrefix = `:where([data-theme-scope="${themeId}"])`;
|
|
3065
|
+
return rules.map((rule) => compileRule(rule.selector, rule.declarations, scopePrefix)).filter(Boolean).join("\n\n");
|
|
3066
|
+
}
|
|
3067
|
+
function compileRule(selector, declarations, scopePrefix) {
|
|
3068
|
+
const declarationLines = Object.entries(declarations).map(([prop, value]) => ` ${toKebabCase(prop)}: ${value};`).join("\n");
|
|
3069
|
+
if (!declarationLines) return "";
|
|
3070
|
+
const scopedSelector = prefixSelector(selector, scopePrefix);
|
|
3071
|
+
return `${scopedSelector} {
|
|
3072
|
+
${declarationLines}
|
|
3073
|
+
}`;
|
|
3074
|
+
}
|
|
3075
|
+
|
|
3013
3076
|
// ../theme-core/src/responsiveMode.ts
|
|
3014
3077
|
var DEFAULT_THEME_RESPONSIVE_MODE = "viewport";
|
|
3015
3078
|
var THEME_RESPONSIVE_CONTAINER_NAME = "rb-site";
|
|
@@ -12203,6 +12266,9 @@ import { Fragment, jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
|
12203
12266
|
// ../theme-core/src/siteChrome.tsx
|
|
12204
12267
|
import { Fragment as Fragment2, jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
12205
12268
|
|
|
12269
|
+
// ../theme-core/src/runtime/buildThemeRuntimeFromBridge.ts
|
|
12270
|
+
import { z as z17 } from "zod";
|
|
12271
|
+
|
|
12206
12272
|
// ../theme-core/src/inputs/core.ts
|
|
12207
12273
|
var CORNER_RADIUS_MAP4 = {
|
|
12208
12274
|
square: "0",
|
|
@@ -12387,6 +12453,41 @@ var BRIDGE_DEFAULT_TOKENS = {
|
|
|
12387
12453
|
"neutral-100": "241 245 249",
|
|
12388
12454
|
"neutral-400": "148 163 184"
|
|
12389
12455
|
};
|
|
12456
|
+
var TOKEN_NAME_PATTERN = /^[a-zA-Z][a-zA-Z0-9-]*$/;
|
|
12457
|
+
var CSS_VARIABLE_REFERENCE_PATTERN = /^var\(\s*--[a-zA-Z][a-zA-Z0-9-]*(?:\s*,\s*[^{};<>]+)?\s*\)$/;
|
|
12458
|
+
var RGB_CHANNELS_PATTERN = /^(\d{1,3})\s+(\d{1,3})\s+(\d{1,3})(?:\s*\/\s*(0|1|0?\.\d+|\d{1,3}%))?$/;
|
|
12459
|
+
var CSS_DECLARATION_PROPERTY_PATTERN = /^(?:-[a-zA-Z][a-zA-Z0-9-]*|[a-zA-Z][a-zA-Z0-9-]*|--[a-zA-Z][a-zA-Z0-9-]*)$/;
|
|
12460
|
+
var UNSAFE_CSS_MARKUP_PATTERN = /[{}<>]|<\/|<script/i;
|
|
12461
|
+
var EXTERNAL_URL_PATTERN = /url\s*\(\s*['"]?(?:https?:|\/\/)/i;
|
|
12462
|
+
var JAVASCRIPT_URL_PATTERN2 = /javascript\s*:/i;
|
|
12463
|
+
var themeBridgeConfigSchema = z17.object({
|
|
12464
|
+
tokens: z17.record(z17.string(), z17.string()),
|
|
12465
|
+
typography: z17.object({
|
|
12466
|
+
headingFamily: z17.string().optional(),
|
|
12467
|
+
bodyFamily: z17.string().optional(),
|
|
12468
|
+
headingWeight: z17.number().optional(),
|
|
12469
|
+
bodyWeight: z17.number().optional()
|
|
12470
|
+
}).optional(),
|
|
12471
|
+
spacing: z17.enum(["comfortable", "standard", "dense"]).optional(),
|
|
12472
|
+
corners: z17.enum(["square", "soft", "rounded", "pill"]).optional(),
|
|
12473
|
+
shadows: z17.enum(["none", "low", "medium", "high"]).optional(),
|
|
12474
|
+
components: z17.object({
|
|
12475
|
+
buttons: z17.union([
|
|
12476
|
+
z17.boolean(),
|
|
12477
|
+
z17.object({
|
|
12478
|
+
variants: z17.array(z17.enum(["primary", "secondary", "outline", "ghost"])).optional()
|
|
12479
|
+
})
|
|
12480
|
+
]).optional(),
|
|
12481
|
+
cards: z17.union([
|
|
12482
|
+
z17.boolean(),
|
|
12483
|
+
z17.object({
|
|
12484
|
+
variants: z17.array(z17.enum(["default", "elevated", "outlined"])).optional()
|
|
12485
|
+
})
|
|
12486
|
+
]).optional(),
|
|
12487
|
+
inputs: z17.boolean().optional()
|
|
12488
|
+
}).optional(),
|
|
12489
|
+
overrides: z17.record(z17.string(), z17.string()).optional()
|
|
12490
|
+
}).passthrough();
|
|
12390
12491
|
var TOKEN_ALIASES = [
|
|
12391
12492
|
{ source: "text", target: "foreground" },
|
|
12392
12493
|
{ source: "foreground", target: "text" },
|
|
@@ -12402,17 +12503,25 @@ function hexToRgbChannels(hex) {
|
|
|
12402
12503
|
const { r, g, b } = hexToRgb(hex);
|
|
12403
12504
|
return `${r} ${g} ${b}`;
|
|
12404
12505
|
} catch {
|
|
12405
|
-
|
|
12506
|
+
throw new Error(
|
|
12507
|
+
`[ThemeBridge] Invalid token value "${hex}": expected a valid hex colour, CSS var(), or RGB channel value.`
|
|
12508
|
+
);
|
|
12406
12509
|
}
|
|
12407
12510
|
}
|
|
12408
12511
|
function normalizeTokenValue(value) {
|
|
12409
|
-
|
|
12410
|
-
|
|
12512
|
+
const trimmedValue = value.trim();
|
|
12513
|
+
if (!isSafeBridgeTokenValue(trimmedValue)) {
|
|
12514
|
+
throw new Error(
|
|
12515
|
+
`[ThemeBridge] Invalid token value "${value}": expected a hex colour, CSS var(), or RGB channel value.`
|
|
12516
|
+
);
|
|
12411
12517
|
}
|
|
12412
|
-
if (
|
|
12413
|
-
return
|
|
12518
|
+
if (trimmedValue.startsWith("var(")) {
|
|
12519
|
+
return trimmedValue;
|
|
12414
12520
|
}
|
|
12415
|
-
|
|
12521
|
+
if (trimmedValue.startsWith("#")) {
|
|
12522
|
+
return hexToRgbChannels(trimmedValue);
|
|
12523
|
+
}
|
|
12524
|
+
return trimmedValue;
|
|
12416
12525
|
}
|
|
12417
12526
|
function buildThemeBridgeRuntime(config) {
|
|
12418
12527
|
validateThemeBridgeConfig(config);
|
|
@@ -12430,7 +12539,7 @@ function buildThemeBridgeRuntime(config) {
|
|
|
12430
12539
|
statusCss: generateStatusCss({ themeId, theme: generatorTheme }),
|
|
12431
12540
|
progressCss: generateProgressCss({ themeId, theme: generatorTheme }),
|
|
12432
12541
|
blockVarsCss: generateAllBlockVarsCss({ themeId, theme: generatorTheme }),
|
|
12433
|
-
customCss: config.overrides ? generateOverrideCss(config.overrides) : void 0
|
|
12542
|
+
customCss: hasBridgeOverrides(config.overrides) ? generateOverrideCss(config.overrides) : void 0
|
|
12434
12543
|
};
|
|
12435
12544
|
}
|
|
12436
12545
|
function buildBridgeCssVars(config) {
|
|
@@ -12552,6 +12661,8 @@ function buildShadowCssVars(shadows) {
|
|
|
12552
12661
|
cssVars["--tb-shadow-sm"] = cssVars["--shadow-sm"] ?? shadowElev;
|
|
12553
12662
|
cssVars["--tb-shadow-md"] = cssVars["--shadow-md"] ?? shadowElev;
|
|
12554
12663
|
cssVars["--tb-shadow-lg"] = cssVars["--shadow-lg"] ?? shadowElev;
|
|
12664
|
+
cssVars["--tb-shadow-xl"] = cssVars["--shadow-xl"] ?? shadowElev;
|
|
12665
|
+
cssVars["--tb-shadow-2xl"] = cssVars["--shadow-2xl"] ?? shadowElev;
|
|
12555
12666
|
return cssVars;
|
|
12556
12667
|
}
|
|
12557
12668
|
function buildMotionCssVars() {
|
|
@@ -12574,6 +12685,17 @@ function validateThemeBridgeConfig(config) {
|
|
|
12574
12685
|
'[ThemeBridge] Missing "tokens" property in config. ThemeBridgeConfig requires a "tokens" object with color definitions. Example: { tokens: { primary: "#6d28d9", background: "#ffffff" } }'
|
|
12575
12686
|
);
|
|
12576
12687
|
}
|
|
12688
|
+
const parsedConfig = themeBridgeConfigSchema.safeParse(config);
|
|
12689
|
+
if (!parsedConfig.success) {
|
|
12690
|
+
const firstIssue = parsedConfig.error.issues[0];
|
|
12691
|
+
throw new Error(
|
|
12692
|
+
`[ThemeBridge] Invalid config: ${firstIssue?.message ?? "failed validation"}.`
|
|
12693
|
+
);
|
|
12694
|
+
}
|
|
12695
|
+
validateBridgeTokens(config.tokens);
|
|
12696
|
+
if (config.overrides !== void 0) {
|
|
12697
|
+
parseBridgeOverrideRules(config.overrides);
|
|
12698
|
+
}
|
|
12577
12699
|
}
|
|
12578
12700
|
function resolveBridgeTokens(tokens) {
|
|
12579
12701
|
const resolved = {};
|
|
@@ -12597,13 +12719,125 @@ function resolveBridgeTokens(tokens) {
|
|
|
12597
12719
|
function isPresentTokenValue(value) {
|
|
12598
12720
|
return typeof value === "string" && value.trim().length > 0;
|
|
12599
12721
|
}
|
|
12722
|
+
function isSafeBridgeTokenName(name) {
|
|
12723
|
+
return TOKEN_NAME_PATTERN.test(name);
|
|
12724
|
+
}
|
|
12725
|
+
function isSafeBridgeTokenValue(value) {
|
|
12726
|
+
const trimmedValue = value.trim();
|
|
12727
|
+
if (trimmedValue.length === 0) {
|
|
12728
|
+
return true;
|
|
12729
|
+
}
|
|
12730
|
+
if (trimmedValue.startsWith("#")) {
|
|
12731
|
+
return true;
|
|
12732
|
+
}
|
|
12733
|
+
if (trimmedValue.startsWith("var(")) {
|
|
12734
|
+
return CSS_VARIABLE_REFERENCE_PATTERN.test(trimmedValue);
|
|
12735
|
+
}
|
|
12736
|
+
return isRgbChannelValue(trimmedValue);
|
|
12737
|
+
}
|
|
12738
|
+
function isRgbChannelValue(value) {
|
|
12739
|
+
const match = value.match(RGB_CHANNELS_PATTERN);
|
|
12740
|
+
if (!match) {
|
|
12741
|
+
return false;
|
|
12742
|
+
}
|
|
12743
|
+
const [, red, green, blue, alpha] = match;
|
|
12744
|
+
const channels = [red, green, blue].map((channel) => Number(channel));
|
|
12745
|
+
const channelsInRange = channels.every(
|
|
12746
|
+
(channel) => Number.isInteger(channel) && channel >= 0 && channel <= 255
|
|
12747
|
+
);
|
|
12748
|
+
if (!channelsInRange) {
|
|
12749
|
+
return false;
|
|
12750
|
+
}
|
|
12751
|
+
if (alpha === void 0) {
|
|
12752
|
+
return true;
|
|
12753
|
+
}
|
|
12754
|
+
if (alpha.endsWith("%")) {
|
|
12755
|
+
const percent = Number(alpha.slice(0, -1));
|
|
12756
|
+
return Number.isFinite(percent) && percent >= 0 && percent <= 100;
|
|
12757
|
+
}
|
|
12758
|
+
const alphaNumber = Number(alpha);
|
|
12759
|
+
return Number.isFinite(alphaNumber) && alphaNumber >= 0 && alphaNumber <= 1;
|
|
12760
|
+
}
|
|
12761
|
+
function validateBridgeTokens(tokens) {
|
|
12762
|
+
for (const [name, value] of Object.entries(tokens)) {
|
|
12763
|
+
if (!isSafeBridgeTokenName(name)) {
|
|
12764
|
+
throw new Error(
|
|
12765
|
+
`[ThemeBridge] Invalid token name "${name}": token names must match ${TOKEN_NAME_PATTERN}.`
|
|
12766
|
+
);
|
|
12767
|
+
}
|
|
12768
|
+
if (typeof value !== "string" || !isSafeBridgeTokenValue(value)) {
|
|
12769
|
+
throw new Error(
|
|
12770
|
+
`[ThemeBridge] Invalid token value for "${name}": expected a hex colour, CSS var(), or RGB channel value.`
|
|
12771
|
+
);
|
|
12772
|
+
}
|
|
12773
|
+
}
|
|
12774
|
+
}
|
|
12775
|
+
function parseBridgeOverrideRules(overrides) {
|
|
12776
|
+
if (!overrides || typeof overrides !== "object" || Array.isArray(overrides)) {
|
|
12777
|
+
throw new Error("[ThemeBridge] Invalid overrides: expected a selector-to-rules object.");
|
|
12778
|
+
}
|
|
12779
|
+
return Object.entries(overrides).map(([selector, rules], index) => {
|
|
12780
|
+
if (hasUnsafeCssFragment(selector)) {
|
|
12781
|
+
throw new Error(
|
|
12782
|
+
`[ThemeBridge] Invalid override selector "${selector}": selectors contain unsafe CSS markup or external URLs.`
|
|
12783
|
+
);
|
|
12784
|
+
}
|
|
12785
|
+
return {
|
|
12786
|
+
id: `theme-bridge-override-${index + 1}`,
|
|
12787
|
+
selector,
|
|
12788
|
+
declarations: parseBridgeOverrideDeclarations(selector, rules)
|
|
12789
|
+
};
|
|
12790
|
+
});
|
|
12791
|
+
}
|
|
12792
|
+
function parseBridgeOverrideDeclarations(selector, rules) {
|
|
12793
|
+
if (typeof rules !== "string") {
|
|
12794
|
+
throw new Error(
|
|
12795
|
+
`[ThemeBridge] Invalid override for "${selector}": expected a CSS declaration string.`
|
|
12796
|
+
);
|
|
12797
|
+
}
|
|
12798
|
+
if (hasUnsafeCssFragment(rules)) {
|
|
12799
|
+
throw new Error(
|
|
12800
|
+
`[ThemeBridge] Invalid override for "${selector}": rules contain unsafe CSS markup or external URLs.`
|
|
12801
|
+
);
|
|
12802
|
+
}
|
|
12803
|
+
const declarations = {};
|
|
12804
|
+
for (const declaration of rules.split(";")) {
|
|
12805
|
+
const trimmedDeclaration = declaration.trim();
|
|
12806
|
+
if (trimmedDeclaration.length === 0) {
|
|
12807
|
+
continue;
|
|
12808
|
+
}
|
|
12809
|
+
const colonIndex = trimmedDeclaration.indexOf(":");
|
|
12810
|
+
if (colonIndex <= 0) {
|
|
12811
|
+
throw new Error(
|
|
12812
|
+
`[ThemeBridge] Invalid override for "${selector}": expected "property: value" declarations.`
|
|
12813
|
+
);
|
|
12814
|
+
}
|
|
12815
|
+
const property = trimmedDeclaration.slice(0, colonIndex).trim();
|
|
12816
|
+
const value = trimmedDeclaration.slice(colonIndex + 1).trim();
|
|
12817
|
+
if (!CSS_DECLARATION_PROPERTY_PATTERN.test(property) || value.length === 0) {
|
|
12818
|
+
throw new Error(
|
|
12819
|
+
`[ThemeBridge] Invalid override for "${selector}": expected safe CSS declaration names and values.`
|
|
12820
|
+
);
|
|
12821
|
+
}
|
|
12822
|
+
if (hasUnsafeCssFragment(value)) {
|
|
12823
|
+
throw new Error(
|
|
12824
|
+
`[ThemeBridge] Invalid override for "${selector}": declaration value contains unsafe CSS.`
|
|
12825
|
+
);
|
|
12826
|
+
}
|
|
12827
|
+
declarations[property] = value;
|
|
12828
|
+
}
|
|
12829
|
+
return declarations;
|
|
12830
|
+
}
|
|
12831
|
+
function hasUnsafeCssFragment(value) {
|
|
12832
|
+
return UNSAFE_CSS_MARKUP_PATTERN.test(value) || /@import/i.test(value) || EXTERNAL_URL_PATTERN.test(value) || JAVASCRIPT_URL_PATTERN2.test(value);
|
|
12833
|
+
}
|
|
12600
12834
|
function shouldGenerateComponent(value) {
|
|
12601
|
-
return value
|
|
12835
|
+
return value !== void 0 && value !== false;
|
|
12602
12836
|
}
|
|
12603
12837
|
function generateButtonsCss(config, corners2, shadows) {
|
|
12604
12838
|
let variants = getDefaultButtonVariants();
|
|
12605
12839
|
const buttonConfig = config.components?.buttons;
|
|
12606
|
-
if (
|
|
12840
|
+
if (buttonConfig !== void 0 && buttonConfig !== true && buttonConfig !== false && buttonConfig.variants) {
|
|
12607
12841
|
const requestedIds = new Set(buttonConfig.variants);
|
|
12608
12842
|
variants = variants.filter((variant) => requestedIds.has(variant.id));
|
|
12609
12843
|
}
|
|
@@ -12619,7 +12853,7 @@ function generateButtonsCss(config, corners2, shadows) {
|
|
|
12619
12853
|
function generateCardsCss(config, corners2, shadows) {
|
|
12620
12854
|
let variants = getDefaultCardVariants();
|
|
12621
12855
|
const cardConfig = config.components?.cards;
|
|
12622
|
-
if (
|
|
12856
|
+
if (cardConfig !== void 0 && cardConfig !== true && cardConfig !== false && cardConfig.variants) {
|
|
12623
12857
|
const requestedIds = new Set(cardConfig.variants);
|
|
12624
12858
|
variants = variants.filter((variant) => requestedIds.has(variant.id));
|
|
12625
12859
|
}
|
|
@@ -12637,12 +12871,12 @@ function generateInputsCss(corners2, shadows) {
|
|
|
12637
12871
|
shadow: shadows === "none" ? "none" : "low"
|
|
12638
12872
|
});
|
|
12639
12873
|
}
|
|
12874
|
+
function hasBridgeOverrides(overrides) {
|
|
12875
|
+
return overrides !== void 0 && Object.keys(overrides).length > 0;
|
|
12876
|
+
}
|
|
12640
12877
|
function generateOverrideCss(overrides) {
|
|
12641
|
-
|
|
12642
|
-
|
|
12643
|
-
${rules}
|
|
12644
|
-
}`
|
|
12645
|
-
).join("\n\n");
|
|
12878
|
+
const parsedRules = parseCustomCssRules(parseBridgeOverrideRules(overrides));
|
|
12879
|
+
return compileCustomCssRules(parsedRules, THEME_BRIDGE_SCOPE_ID);
|
|
12646
12880
|
}
|
|
12647
12881
|
function buildBridgeGeneratorTheme(corners2) {
|
|
12648
12882
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riverbankcms/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.70.2",
|
|
4
4
|
"description": "Riverbank CMS SDK for headless content consumption",
|
|
5
5
|
"main": "./dist/server/index.mjs",
|
|
6
6
|
"module": "./dist/server/index.mjs",
|
|
@@ -230,8 +230,6 @@
|
|
|
230
230
|
},
|
|
231
231
|
"dependencies": {
|
|
232
232
|
"@tanstack/react-query": "^5.90.20",
|
|
233
|
-
"@riverbankcms/content-model": "workspace:*",
|
|
234
|
-
"@riverbankcms/site-commands": "workspace:*",
|
|
235
233
|
"commander": "^12.1.0",
|
|
236
234
|
"dotenv": "^16.4.5",
|
|
237
235
|
"fast-deep-equal": "^3.1.3",
|