@riverbankcms/sdk 0.104.1 → 0.107.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 +84 -51
- package/dist/{PreviewEditorSidebar-CmaPXdKu.mjs → PreviewEditorSidebar-DpAbAl08.mjs} +1811 -1179
- package/dist/{PreviewEditorUI-C5xRTh2b.mjs → PreviewEditorUI-O7cn6Xxv.mjs} +3 -3
- package/dist/{PreviewQueryProvider-CStABBUh.mjs → PreviewQueryProvider-D0tnKl0t.mjs} +1 -1
- package/dist/{SdkPreviewModeRuntime-Eks51NcN.mjs → SdkPreviewModeRuntime-CVB7urtl.mjs} +3244 -528
- package/dist/{SiteChromeCustomizeContext-Bt8zb3qu.mjs → SiteChromeCustomizeContext-C_sizso-.mjs} +4945 -3010
- package/dist/_dts/ai/src/contracts/proposals.d.ts +32945 -1329
- package/dist/_dts/api/src/bookingConfig.d.ts +2 -0
- package/dist/_dts/api/src/bookingManagementEndpoints.d.ts +5 -1
- package/dist/_dts/api/src/contentRuntime.d.ts +6 -15
- package/dist/_dts/api/src/courses.d.ts +68 -10
- package/dist/_dts/api/src/endpoints.d.ts +29 -0
- package/dist/_dts/api/src/index.d.ts +124 -124
- package/dist/_dts/api/src/publicExperienceEndpoints.d.ts +9 -0
- package/dist/_dts/api/src/sdkContracts.d.ts +116 -6
- package/dist/_dts/api/src/siteOperations.d.ts +1 -0
- package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +26 -4
- package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +31 -46
- package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +36 -4
- package/dist/_dts/blocks/src/definitions.d.ts +1 -1
- package/dist/_dts/blocks/src/portal/types.d.ts +25 -7
- package/dist/_dts/blocks/src/primitives/layout/Grid.d.ts +12 -8
- package/dist/_dts/blocks/src/system/blocks/course-registration.d.ts +2 -2
- package/dist/_dts/blocks/src/system/blocks/courses/shared/schemas.d.ts +2 -0
- package/dist/_dts/blocks/src/system/blocks/courses/shared/types.d.ts +2 -0
- package/dist/_dts/blocks/src/system/blocks/events/event-calendar.d.ts +7 -0
- package/dist/_dts/blocks/src/system/blocks/events/recurring-schedule-projection.d.ts +52 -0
- package/dist/_dts/blocks/src/system/blocks/events/recurring-schedule.d.ts +22 -0
- package/dist/_dts/blocks/src/system/blocks/events/shared/layout.d.ts +11 -1
- package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +45 -0
- package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +10 -0
- package/dist/_dts/blocks/src/system/blocks/feature-cards.d.ts +4 -1
- package/dist/_dts/blocks/src/system/blocks/index.d.ts +1 -0
- package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +9 -0
- package/dist/_dts/blocks/src/system/blocks/newsletter-signup.d.ts +8 -2
- package/dist/_dts/blocks/src/system/blocks/offerings-preview/index.d.ts +8 -8
- package/dist/_dts/blocks/src/system/blocks/offerings-preview/model.d.ts +24 -24
- package/dist/_dts/blocks/src/system/blocks/offerings-preview/scheduleSummary.d.ts +29 -0
- package/dist/_dts/blocks/src/system/blocks/shop.d.ts +2 -1
- package/dist/_dts/blocks/src/system/blocks/testimonials.d.ts +7 -1
- package/dist/_dts/blocks/src/system/constants/blockKinds.d.ts +1 -1
- package/dist/_dts/blocks/src/system/constants/events.d.ts +1 -1
- package/dist/_dts/blocks/src/system/customize/backgrounds.d.ts +2 -5
- package/dist/_dts/blocks/src/system/data/loaderEndpoints.d.ts +1 -1
- package/dist/_dts/blocks/src/system/designCapabilities.d.ts +1 -0
- package/dist/_dts/blocks/src/system/fragments/library/newsletterForm.d.ts +2 -2
- package/dist/_dts/blocks/src/system/fragments/library/testimonialsCarousel.d.ts +12 -0
- package/dist/_dts/blocks/src/system/node/fragments/styledCard.d.ts +3 -0
- package/dist/_dts/blocks/src/system/node/validation-constants.d.ts +2 -2
- package/dist/_dts/blocks/src/system/runtime/api/index.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/blockComposition.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +90 -6
- package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +45 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/basic.d.ts +15 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/buttonAffordance.d.ts +33 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/commerce/shared/display.d.ts +2 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/course-details/logic.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/course-details/view.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/course-details.server.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/course-page-surface-scope.d.ts +17 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/types.d.ts +3 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration.interactive.d.ts +5 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration.server.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/eventScope.d.ts +9 -18
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCalendar.interactive.d.ts +106 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/RecurringSchedule.d.ts +11 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/WeekBoardView.d.ts +32 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventCapacity.d.ts +32 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/media.d.ts +3 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.interactive.d.ts +11 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.server.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.types.d.ts +3 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/offerings-preview.d.ts +6 -6
- package/dist/_dts/blocks/src/system/runtime/nodes/shared/contract-schemas.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/shop.interactive.d.ts +11 -5
- package/dist/_dts/blocks/src/system/runtime/nodes/shop.types.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/svg.d.ts +84 -0
- package/dist/_dts/blocks/src/system/transforms/registry/_utils/surfaceForegroundStyles.d.ts +2 -0
- package/dist/_dts/blocks/src/system/transforms/registry/boxStyles.d.ts +3 -40
- package/dist/_dts/blocks/src/system/transforms/registry/formatting.d.ts +14 -0
- package/dist/_dts/blocks/src/system/transforms/registry/layout.d.ts +11 -0
- package/dist/_dts/core/src/branded.d.ts +49 -0
- package/dist/_dts/core/src/dated-offering-settlement.d.ts +47 -0
- package/dist/_dts/core/src/event-page-surface-subject.d.ts +44 -0
- package/dist/_dts/core/src/index.d.ts +49 -47
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +1469 -14
- package/dist/_dts/editor-blocks/src/block-editor/FeatureCardIconsPanel.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/block-editor/GeneratedIconSetDialog.d.ts +4 -1
- package/dist/_dts/media-core/src/index.d.ts +2 -1
- package/dist/_dts/media-core/src/storagePathDomain.d.ts +47 -0
- package/dist/_dts/media-core/src/url.d.ts +1 -21
- package/dist/_dts/preview-next/src/client/blocks/pageDesignRuntimePreview.d.ts +4 -2
- package/dist/_dts/preview-next/src/client/blocks/previewProjection/runtimeContentDecoration.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/preview/PageBlockEditorPanel.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/preview/PreviewEditorSidebar.d.ts +3 -9
- package/dist/_dts/preview-next/src/client/preview/PreviewShell.d.ts +7 -11
- package/dist/_dts/preview-next/src/client/preview/PreviewShellLayout.d.ts +3 -9
- package/dist/_dts/preview-next/src/client/preview/SiteChromeCustomizeContext.d.ts +2 -6
- package/dist/_dts/preview-next/src/client/preview/StyleConfigurator.d.ts +5 -9
- package/dist/_dts/preview-next/src/client/preview/StyleConfigurator.state.d.ts +81 -43
- package/dist/_dts/preview-next/src/client/preview/StyleConfigurator.typography.d.ts +61 -0
- package/dist/_dts/preview-next/src/client/preview/siteStylePreviewPlanner.d.ts +7 -17
- package/dist/_dts/preview-next/src/client/preview/styleConfiguratorSnapshot.d.ts +15 -8
- package/dist/_dts/preview-next/src/client/preview/typographyFontCatalog.d.ts +57 -0
- package/dist/_dts/sdk/src/cli/commands/pull.d.ts +1 -1
- package/dist/_dts/sdk/src/cli/commands/push/execute/theme.d.ts +4 -7
- package/dist/_dts/sdk/src/cli/commands/style.d.ts +24 -10
- package/dist/_dts/sdk/src/cli/site-commands/oneOffCommands.d.ts +3 -3
- package/dist/_dts/sdk/src/cli/sync/media.d.ts +16 -2
- package/dist/_dts/sdk/src/client/management/blocks.d.ts +1 -1
- package/dist/_dts/sdk/src/client/management/index.d.ts +1 -1
- package/dist/_dts/sdk/src/client/management/types.d.ts +132 -23
- package/dist/_dts/sdk/src/client/types.d.ts +2 -0
- package/dist/_dts/sdk/src/config/types.d.ts +1 -1
- package/dist/_dts/sdk/src/config/validation.d.ts +3 -0
- package/dist/_dts/sdk/src/contracts/index.d.ts +1 -1
- package/dist/_dts/sdk/src/contracts/system-block-content.d.ts +25 -5
- package/dist/_dts/sdk/src/data/dataLoaderContext.d.ts +17 -0
- package/dist/_dts/sdk/src/data/dataLoaderValue.d.ts +36 -0
- package/dist/_dts/sdk/src/data/defineOwnDataProperty.d.ts +2 -0
- package/dist/_dts/sdk/src/data/executeCodeLoaders.d.ts +36 -40
- package/dist/_dts/sdk/src/data/index.d.ts +3 -3
- package/dist/_dts/sdk/src/data/resolveBlockData.d.ts +54 -0
- package/dist/_dts/sdk/src/data/types.d.ts +43 -78
- package/dist/_dts/sdk/src/next/index.d.ts +1 -0
- package/dist/_dts/sdk/src/next/redirect-destination.d.ts +1 -1
- package/dist/_dts/sdk/src/next/resolveTheme.d.ts +2 -1
- package/dist/_dts/sdk/src/next/types.d.ts +10 -1
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +3 -8
- package/dist/_dts/sdk/src/rendering/helpers/loadContent.d.ts +9 -4
- package/dist/_dts/sdk/src/rendering/helpers/loadPage.d.ts +6 -10
- package/dist/_dts/sdk/src/rendering/index.d.ts +1 -0
- package/dist/_dts/sdk/src/server.d.ts +4 -3
- package/dist/_dts/sdk/src/types/block-kinds.d.ts +1 -1
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/site-commands/src/capabilityGaps.d.ts +2 -2
- package/dist/_dts/site-commands/src/commands.d.ts +921 -30
- package/dist/_dts/theme-core/src/ThemeScope.d.ts +1 -1
- package/dist/_dts/theme-core/src/buttons/affordanceIcons.d.ts +29 -0
- package/dist/_dts/theme-core/src/buttons/generateButtonCss.d.ts +6 -0
- package/dist/_dts/theme-core/src/buttons/generateDefaultButtonSystem.d.ts +5 -1
- package/dist/_dts/theme-core/src/buttons/index.d.ts +1 -0
- package/dist/_dts/theme-core/src/buttons/personalities/flat-ink.d.ts +20 -0
- package/dist/_dts/theme-core/src/buttons/personalities/index.d.ts +22 -0
- package/dist/_dts/theme-core/src/buttons/personalities/quiet-arrow.d.ts +17 -0
- package/dist/_dts/theme-core/src/buttons/personalities/types.d.ts +6 -2
- package/dist/_dts/theme-core/src/buttons/types.d.ts +43 -5
- package/dist/_dts/theme-core/src/data.d.ts +12 -0
- package/dist/_dts/theme-core/src/fonts/index.d.ts +1 -1
- package/dist/_dts/theme-core/src/fonts/types.d.ts +6 -0
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/gradients/types.d.ts +27 -3
- package/dist/_dts/theme-core/src/mock-themes/all.d.ts +87 -39
- package/dist/_dts/theme-core/src/palette/colors.d.ts +12 -0
- package/dist/_dts/theme-core/src/palette/curated/brand-led.d.ts +22 -4
- package/dist/_dts/theme-core/src/palette/curated/high-contrast.d.ts +6 -3
- package/dist/_dts/theme-core/src/palette/curated/index.d.ts +31 -224
- package/dist/_dts/theme-core/src/palette/curated/soft-natural.d.ts +8 -4
- package/dist/_dts/theme-core/src/palette/curated/types.d.ts +14 -12
- package/dist/_dts/theme-core/src/palette/curated/warm-dark.d.ts +4 -2
- package/dist/_dts/theme-core/src/palette/curated/warm-neutral.d.ts +8 -4
- package/dist/_dts/theme-core/src/palette/editorState.d.ts +33 -3
- package/dist/_dts/theme-core/src/palette/index.d.ts +0 -3
- package/dist/_dts/theme-core/src/palette/libraryModel.d.ts +12 -6
- package/dist/_dts/theme-core/src/palette/persistenceReadSource.d.ts +20 -57
- package/dist/_dts/theme-core/src/palette/resolveSelection.d.ts +29 -4
- package/dist/_dts/theme-core/src/palette/selection.d.ts +6 -4
- package/dist/_dts/theme-core/src/palette/themePaletteCompatibility.d.ts +3 -4
- package/dist/_dts/theme-core/src/runtime/themeCssVarNames.d.ts +1 -0
- package/dist/_dts/theme-core/src/schema.d.ts +229 -30
- package/dist/_dts/theme-core/src/site-styles/accessibleSurfaces.d.ts +2 -1
- package/dist/_dts/theme-core/src/site-styles/appearancePresetCatalog.d.ts +218 -158
- package/dist/_dts/theme-core/src/site-styles/appearancePresetTypes.d.ts +5 -6
- package/dist/_dts/theme-core/src/site-styles/blockAppearancePresets.d.ts +218 -158
- package/dist/_dts/theme-core/src/site-styles/compositionBudget.d.ts +1 -0
- package/dist/_dts/theme-core/src/site-styles/contentTemplateRuntimeCompiler.d.ts +2 -1
- package/dist/_dts/theme-core/src/site-styles/curatedSiteStyles.d.ts +208 -49
- package/dist/_dts/theme-core/src/site-styles/designState.d.ts +8 -2
- package/dist/_dts/theme-core/src/site-styles/generatedSchemas.d.ts +6 -2
- package/dist/_dts/theme-core/src/site-styles/headerLooks.d.ts +56 -1
- package/dist/_dts/theme-core/src/site-styles/index.d.ts +1 -1
- package/dist/_dts/theme-core/src/site-styles/pageDesignEditorModel.d.ts +24 -1
- package/dist/_dts/theme-core/src/site-styles/previewCompiler.d.ts +14 -48
- package/dist/_dts/theme-core/src/site-styles/runtimeCompiler.d.ts +10 -23
- package/dist/_dts/theme-core/src/site-styles/siteStyleThemeCompiler.d.ts +1 -2
- package/dist/_dts/theme-core/src/site-styles/siteStyleTypography.d.ts +456 -0
- package/dist/_dts/theme-core/src/site-styles/types.d.ts +52 -3
- package/dist/_dts/theme-core/src/status/index.d.ts +0 -1
- package/dist/_dts/theme-core/src/surfaces/foregroundContract.d.ts +19 -0
- package/dist/_dts/theme-core/src/surfaces/foregroundRoles.d.ts +9 -0
- package/dist/_dts/theme-core/src/surfaces/index.d.ts +2 -0
- package/dist/_dts/ui/src/button.d.ts +1 -1
- package/dist/cli/index.mjs +4146 -1602
- package/dist/client/{DiscountCodeDisclosure-Dit2aItR.mjs → DiscountCodeDisclosure-BwGkvmVH.mjs} +1 -1
- package/dist/client/{EventCombined.client-BnREyCjf.mjs → EventCombined.client-JnWE6Hzc.mjs} +4 -4
- package/dist/client/{EventListing.client-0uHld51x.mjs → EventListing.client-DQewc_kg.mjs} +2 -2
- package/dist/client/{LeafletStaticMap-DJcvSfmj.mjs → LeafletStaticMap-DPAU3SFt.mjs} +1 -1
- package/dist/client/{MagicLinkForm-EAsIktfw.mjs → MagicLinkForm-D4kpWCbW.mjs} +2 -2
- package/dist/client/{StepIndicator-CRR17tYI.mjs → StepIndicator-CBlkb4rA.mjs} +2 -2
- package/dist/client/{accordion-B47HIuuH.mjs → accordion-DAIBVpTS.mjs} +1 -1
- package/dist/client/{bookingForm-I1E-8F9P.mjs → bookingForm-DZ-4l5_1.mjs} +7 -7
- package/dist/client/bookings.mjs +360 -95
- package/dist/client/{buttons-BbPn8OKA.mjs → buttons-DJgynGHQ.mjs} +243 -43
- package/dist/client/{carousel-OlM7SyBs.mjs → carousel-D-SLfX8r.mjs} +1 -1
- package/dist/client/{cart-BKpG5jz6.mjs → cart-CEgbgJhX.mjs} +3 -3
- package/dist/client/{checkout-Dmmr6qoU.mjs → checkout-CXWrCRAA.mjs} +3 -3
- package/dist/client/client.mjs +6019 -1494
- package/dist/client/{colorStyles-DuW4Fjqd.mjs → colorStyles-jZS6KfkP.mjs} +46 -5
- package/dist/client/{colorTokenParts-dT8MISgJ.mjs → colorTokenParts-CMugwvX_.mjs} +3 -1
- package/dist/client/{courseRegistration-CflZiqGk.mjs → courseRegistration-DVmLrRVz.mjs} +56 -21
- package/dist/client/{eventCalendar-BvoLWcp-.mjs → eventCalendar-DCuyPY_c.mjs} +173 -5
- package/dist/client/{eventCombined-DsrO8t_t.mjs → eventCombined-kP2CA2D4.mjs} +2 -2
- package/dist/client/{eventDetails-C3hxgcJm.mjs → eventDetails-DU0LeF5e.mjs} +4 -4
- package/dist/client/{eventListing-C-hb237X.mjs → eventListing-CcHF87BI.mjs} +2 -2
- package/dist/client/{eventRegistration-B0gyzDGi.mjs → eventRegistration-DJnR0yFH.mjs} +8 -8
- package/dist/client/{form-C_RUi6oJ.mjs → form-CH1lCusH.mjs} +2 -2
- package/dist/client/{headerSection-IKQiD2U0.mjs → headerSection-CBPFZoku.mjs} +3 -3
- package/dist/client/hooks.mjs +3645 -1857
- package/dist/client/{locationMap-8ZBrMzRJ.mjs → locationMap-Cx1hBg5n.mjs} +3 -3
- package/dist/client/{media-CZJKL7fi.mjs → media-DHtSxS5V.mjs} +61 -56
- package/dist/client/{newsletterForm-CYk3ucwj.mjs → newsletterForm-1ZL_ti9u.mjs} +3 -3
- package/dist/client/{pricing-B5GmvfIH.mjs → pricing-BIbzmV0G.mjs} +1 -1
- package/dist/client/{productDetail-BjS2Dqzo.mjs → productDetail-BTh5gHBV.mjs} +3 -3
- package/dist/client/{productList-BOHvC8My.mjs → productList-Cc7OMrqN.mjs} +3 -3
- package/dist/client/{propsDecoder-WS6UEJwZ.mjs → propsDecoder-oR-M-ISN.mjs} +228 -60
- package/dist/client/rendering/client.mjs +3231 -1477
- package/dist/client/rendering/islands.mjs +20 -20
- package/dist/client/rendering.mjs +6889 -1927
- package/dist/client/{shop-CON03-wN.mjs → shop-CQ_YbCnn.mjs} +8 -8
- package/dist/client/{shop-commerce-DlqrFgH8.mjs → shop-commerce-BM-AoD3M.mjs} +6 -6
- package/dist/client/{shop-commerce-store-l74-Kne6.mjs → shop-commerce-store-DFMQhU5p.mjs} +1 -1
- package/dist/client/{shopShared-CQheEXSg.mjs → shopShared-D0SKO2Cu.mjs} +3 -3
- package/dist/client/{useDiscountCodeUi-v6OluyWl.mjs → useDiscountCodeUi-CrG4_ARt.mjs} +1 -1
- package/dist/client/{useEventFilters-BqSTcNOf.mjs → useEventFilters-CxK8Fekl.mjs} +6 -6
- package/dist/client/{usePolling-DMfADjIF.mjs → usePolling-jcVryNgZ.mjs} +2 -2
- package/dist/preview-next/before-render.mjs +40 -1
- package/dist/preview-next/client/runtime.mjs +4 -4
- package/dist/preview-next/middleware.mjs +40 -1
- package/dist/{previewAuthStore-CfquDtTh.mjs → previewAuthStore-BPcJPzdz.mjs} +40 -1
- package/dist/{sdk-runtime-BUmJ0DaT.mjs → sdk-runtime-C39Rsk-x.mjs} +2 -2
- package/dist/{separator-Dd-JYok7.mjs → separator-BoMSQnsP.mjs} +1 -1
- package/dist/server/components.mjs +6345 -2084
- package/dist/server/config-validation.mjs +3420 -1856
- package/dist/server/config.mjs +3420 -1856
- package/dist/server/data.mjs +4067 -1923
- package/dist/server/index.mjs +46 -4
- package/dist/server/next/middleware.mjs +1 -1
- package/dist/server/next.mjs +7239 -2147
- package/dist/server/page-converter.mjs +3189 -1619
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +6540 -2058
- package/dist/server/rendering.mjs +7339 -2377
- package/dist/server/routing.mjs +3373 -1101
- package/dist/server/server.mjs +4307 -2002
- package/dist/server/theme-bridge.mjs +9844 -7325
- package/dist/server/theme.mjs +300 -47
- package/dist/styles/index.css +1863 -94
- package/package.json +1 -1
- package/dist/_dts/blocks/src/system/transforms/registry/_utils/sectionForegroundStyles.d.ts +0 -2
- package/dist/_dts/preview-next/src/client/preview/typographySelectionInput.d.ts +0 -16
- package/dist/_dts/theme-core/src/palette/legacyRuntimeProjection.d.ts +0 -55
- package/dist/_dts/theme-core/src/palette/legacySelection.d.ts +0 -34
- package/dist/_dts/theme-core/src/palette/paletteCompatibilityTransition.d.ts +0 -232
- package/dist/_dts/theme-core/src/site-styles/typographyPresets.d.ts +0 -219
- package/dist/_dts/theme-core/src/status/contextualColors.d.ts +0 -6
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ApiClient } from '../../../../api/src/request';
|
|
3
|
+
import type { Theme } from '../../../../blocks/src/index';
|
|
4
|
+
import { type GoogleFontRecord, type SiteFontRecord, type TypographyFontSlot } from './typographyFontCatalog';
|
|
5
|
+
type ThemeTypography = Theme['typography'];
|
|
6
|
+
type BodyTypography = ThemeTypography['body'];
|
|
7
|
+
type HeadingTypography = ThemeTypography['headings']['default'];
|
|
8
|
+
type CatalogResource<T> = Readonly<{
|
|
9
|
+
kind: 'idle';
|
|
10
|
+
value: T;
|
|
11
|
+
}> | Readonly<{
|
|
12
|
+
kind: 'loading';
|
|
13
|
+
value: T;
|
|
14
|
+
}> | Readonly<{
|
|
15
|
+
kind: 'loaded';
|
|
16
|
+
value: T;
|
|
17
|
+
}> | Readonly<{
|
|
18
|
+
kind: 'failed';
|
|
19
|
+
value: T;
|
|
20
|
+
message: string;
|
|
21
|
+
}>;
|
|
22
|
+
export type TypographyFontCatalogState = Readonly<{
|
|
23
|
+
google: CatalogResource<readonly GoogleFontRecord[]>;
|
|
24
|
+
site: CatalogResource<readonly SiteFontRecord[]>;
|
|
25
|
+
}>;
|
|
26
|
+
export type TypographyEditorSurface = Readonly<{
|
|
27
|
+
kind: 'overview';
|
|
28
|
+
}> | Readonly<{
|
|
29
|
+
kind: 'font-picker';
|
|
30
|
+
slot: TypographyFontSlot;
|
|
31
|
+
}> | Readonly<{
|
|
32
|
+
kind: 'advanced';
|
|
33
|
+
}>;
|
|
34
|
+
export declare const typographyOverviewSurface: TypographyEditorSurface;
|
|
35
|
+
export declare function useTypographyFontCatalog(apiClient: ApiClient, siteId: string, enabled: boolean): TypographyFontCatalogState;
|
|
36
|
+
export declare function TypographyOverviewContent({ typography, catalog, onChooseFont, onOpenAdvanced, onReset, disabled, }: Readonly<{
|
|
37
|
+
typography: ThemeTypography;
|
|
38
|
+
catalog: TypographyFontCatalogState;
|
|
39
|
+
onChooseFont: (slot: TypographyFontSlot) => void;
|
|
40
|
+
onOpenAdvanced: () => void;
|
|
41
|
+
onReset: () => void;
|
|
42
|
+
disabled?: boolean;
|
|
43
|
+
}>): React.JSX.Element;
|
|
44
|
+
export declare function TypographyFontPickerTakeover({ slot, value, catalog, onBack, onChange, disabled, }: Readonly<{
|
|
45
|
+
slot: TypographyFontSlot;
|
|
46
|
+
value: string;
|
|
47
|
+
catalog: TypographyFontCatalogState;
|
|
48
|
+
onBack: () => void;
|
|
49
|
+
onChange: (family: string) => void;
|
|
50
|
+
disabled?: boolean;
|
|
51
|
+
}>): React.JSX.Element;
|
|
52
|
+
export declare function TypographyAdvancedTakeover({ typography, catalog, onBack, onHeadingChange, onBodyChange, onScaleChange, disabled, }: Readonly<{
|
|
53
|
+
typography: ThemeTypography;
|
|
54
|
+
catalog: TypographyFontCatalogState;
|
|
55
|
+
onBack: () => void;
|
|
56
|
+
onHeadingChange: (patch: Partial<HeadingTypography>) => void;
|
|
57
|
+
onBodyChange: (patch: Partial<BodyTypography>) => void;
|
|
58
|
+
onScaleChange: (scale: ThemeTypography['scale']) => void;
|
|
59
|
+
disabled?: boolean;
|
|
60
|
+
}>): React.JSX.Element;
|
|
61
|
+
export {};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import type { Theme } from '../../../../blocks/src/index';
|
|
2
2
|
import type { ButtonPersonalityId } from '../../../../theme-core/src/buttons/index';
|
|
3
|
-
import { type
|
|
4
|
-
import type { FooterLookId, FooterSelectionContext, HeaderLayoutId, HeaderLookId, HeaderSelectionContext, HeaderStyleId
|
|
5
|
-
import {
|
|
6
|
-
import type { PaletteSelectionSnapshot
|
|
3
|
+
import { type CompleteResolvedPaletteSelection } from '../../../../theme-core/src/palette/index';
|
|
4
|
+
import type { FooterLookId, FooterSelectionContext, HeaderLayoutId, HeaderLookId, HeaderSelectionContext, HeaderStyleId } from '../../../../theme-core/src/site-styles/index';
|
|
5
|
+
import { compileSiteThemeFromSelections, type CuratedSiteStyle, type SelectionFallbackWarning, type SiteStyleId } from '../../../../theme-core/src/site-styles/previewCompiler';
|
|
6
|
+
import type { PaletteSelectionSnapshot } from './StyleConfigurator.state';
|
|
7
7
|
export type SiteStylePreviewSelection = Readonly<{
|
|
8
8
|
siteStyleId: SiteStyleId;
|
|
9
9
|
buttonPersonalityId: ButtonPersonalityId;
|
|
10
10
|
palette: PaletteSelectionSnapshot;
|
|
11
|
-
|
|
11
|
+
typography: Theme['typography'];
|
|
12
12
|
headerLayoutId?: HeaderLayoutId | null;
|
|
13
13
|
headerStyleId?: HeaderStyleId | null;
|
|
14
14
|
headerLookId: HeaderLookId | null;
|
|
@@ -20,18 +20,7 @@ export type SiteStyleChromePreviewSelection = Readonly<{
|
|
|
20
20
|
}>;
|
|
21
21
|
export type SiteStylePreviewPlan = Readonly<{
|
|
22
22
|
themeOverlay: Theme;
|
|
23
|
-
resolvedSelections:
|
|
24
|
-
buttonPersonalityId: ButtonPersonalityId;
|
|
25
|
-
paletteVariantId: CuratedPaletteId;
|
|
26
|
-
typographySelection: CompiledTypographySelection['resolvedSelection'];
|
|
27
|
-
typographyPresetId: TypographyPresetId | null;
|
|
28
|
-
typographyBodyFontOverride: string | null;
|
|
29
|
-
typographyHeadingFontOverride: string | null;
|
|
30
|
-
headerLayoutId: HeaderLayoutId;
|
|
31
|
-
headerStyleId: HeaderStyleId;
|
|
32
|
-
headerLookId: HeaderLookId | null;
|
|
33
|
-
footerLookId: FooterLookId;
|
|
34
|
-
}>;
|
|
23
|
+
resolvedSelections: ReturnType<typeof compileSiteThemeFromSelections>['resolvedSelections'];
|
|
35
24
|
chromeSelection: SiteStyleChromePreviewSelection;
|
|
36
25
|
warnings: ReadonlyArray<SelectionFallbackWarning>;
|
|
37
26
|
}>;
|
|
@@ -43,3 +32,4 @@ export type SiteStylePreviewPlanInput = Readonly<{
|
|
|
43
32
|
footerSelectionContext?: Partial<FooterSelectionContext>;
|
|
44
33
|
}>;
|
|
45
34
|
export declare function planSiteStylePreviewChange(input: SiteStylePreviewPlanInput): SiteStylePreviewPlan;
|
|
35
|
+
export declare function resolvedPaletteForPreview(palette: PaletteSelectionSnapshot, siteStyle: CuratedSiteStyle): CompleteResolvedPaletteSelection;
|
|
@@ -1,28 +1,35 @@
|
|
|
1
1
|
import type { Theme } from '../../../../blocks/src/index';
|
|
2
2
|
import type { ButtonPersonalityId } from '../../../../theme-core/src/buttons/index';
|
|
3
|
-
import { type
|
|
4
|
-
import type { FooterLookId, FooterSelectionContext, HeaderLayoutId, HeaderLookId, HeaderSelectionContext, HeaderStyleId
|
|
3
|
+
import { type RuntimePaletteState } from '../../../../theme-core/src/palette/index';
|
|
4
|
+
import type { FooterLookId, FooterSelectionContext, HeaderLayoutId, HeaderLookId, HeaderSelectionContext, HeaderStyleId } from '../../../../theme-core/src/site-styles/index';
|
|
5
5
|
import type { SelectionSnapshot } from './StyleConfigurator.state';
|
|
6
|
+
export type PreviewRuntimePaletteState = Extract<RuntimePaletteState, Readonly<{
|
|
7
|
+
authority: 'curated';
|
|
8
|
+
}>> | Extract<RuntimePaletteState, Readonly<{
|
|
9
|
+
authority: 'site';
|
|
10
|
+
}>> | Extract<RuntimePaletteState, Readonly<{
|
|
11
|
+
kind: 'invalid';
|
|
12
|
+
}>>;
|
|
6
13
|
type StyleConfiguratorSnapshotInput = Readonly<{
|
|
7
14
|
theme?: Theme | null;
|
|
8
15
|
initialSelections: Readonly<{
|
|
9
16
|
selectionVersion?: number | null;
|
|
10
17
|
selectionUpdatedAt?: string | null;
|
|
11
18
|
buttonPersonalityId: ButtonPersonalityId | null;
|
|
12
|
-
runtimePaletteState
|
|
13
|
-
paletteVariantId?: CuratedPaletteId | null;
|
|
14
|
-
paletteOverrides?: PaletteOverrides | null;
|
|
19
|
+
runtimePaletteState: PreviewRuntimePaletteState;
|
|
15
20
|
headerLayoutId?: HeaderLayoutId | null;
|
|
16
21
|
headerStyleId?: HeaderStyleId | null;
|
|
17
|
-
typographyPresetId?: TypographyPresetId | null;
|
|
18
|
-
typographyBodyFontOverride?: string | null;
|
|
19
|
-
typographyHeadingFontOverride?: string | null;
|
|
20
22
|
headerLookId?: HeaderLookId | null;
|
|
21
23
|
footerLookId?: FooterLookId | null;
|
|
22
24
|
}>;
|
|
23
25
|
headerSelectionContext?: Partial<HeaderSelectionContext>;
|
|
24
26
|
footerSelectionContext?: Partial<FooterSelectionContext>;
|
|
25
27
|
}>;
|
|
28
|
+
/**
|
|
29
|
+
* Preview only accepts the modern, server-resolved palette runtime state. The
|
|
30
|
+
* old Theme-plus-overrides reconstruction belongs to migration tooling, never
|
|
31
|
+
* to a live editor where it could silently overwrite authoritative state.
|
|
32
|
+
*/
|
|
26
33
|
export declare function resolveStyleConfiguratorInitialSnapshot(input: Readonly<{
|
|
27
34
|
theme?: Theme | null;
|
|
28
35
|
initialSelections: StyleConfiguratorSnapshotInput['initialSelections'];
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { APIEndpoints } from '../../../../api/src/index';
|
|
2
|
+
export type GoogleFontRecord = NonNullable<APIEndpoints['listFonts']['response']>[number];
|
|
3
|
+
export type SiteFontRecord = NonNullable<APIEndpoints['listSiteFonts']['response']>['fonts'][number];
|
|
4
|
+
export type TypographyFontCategory = 'all' | 'sans-serif' | 'serif' | 'display' | 'handwriting' | 'monospace';
|
|
5
|
+
export type TypographyFontSlot = 'body' | 'heading';
|
|
6
|
+
export type TypographyFontOption = Readonly<{
|
|
7
|
+
source: 'site';
|
|
8
|
+
family: string;
|
|
9
|
+
label: string;
|
|
10
|
+
category: Exclude<TypographyFontCategory, 'all'> | null;
|
|
11
|
+
siteFont: SiteFontRecord;
|
|
12
|
+
}> | Readonly<{
|
|
13
|
+
source: 'google';
|
|
14
|
+
family: string;
|
|
15
|
+
label: string;
|
|
16
|
+
category: Exclude<TypographyFontCategory, 'all'> | null;
|
|
17
|
+
googleFont: GoogleFontRecord;
|
|
18
|
+
}>;
|
|
19
|
+
export declare const TYPOGRAPHY_INITIAL_GOOGLE_FONT_COUNT = 24;
|
|
20
|
+
export declare const typographyFontCategories: readonly [{
|
|
21
|
+
readonly value: "all";
|
|
22
|
+
readonly label: "All";
|
|
23
|
+
}, {
|
|
24
|
+
readonly value: "sans-serif";
|
|
25
|
+
readonly label: "Sans";
|
|
26
|
+
}, {
|
|
27
|
+
readonly value: "serif";
|
|
28
|
+
readonly label: "Serif";
|
|
29
|
+
}, {
|
|
30
|
+
readonly value: "display";
|
|
31
|
+
readonly label: "Display";
|
|
32
|
+
}, {
|
|
33
|
+
readonly value: "handwriting";
|
|
34
|
+
readonly label: "Handwriting";
|
|
35
|
+
}, {
|
|
36
|
+
readonly value: "monospace";
|
|
37
|
+
readonly label: "Mono";
|
|
38
|
+
}];
|
|
39
|
+
export declare function buildTypographyFontCatalog(input: Readonly<{
|
|
40
|
+
googleFonts: readonly GoogleFontRecord[];
|
|
41
|
+
siteFonts: readonly SiteFontRecord[];
|
|
42
|
+
query: string;
|
|
43
|
+
category: TypographyFontCategory;
|
|
44
|
+
}>): Readonly<{
|
|
45
|
+
site: readonly TypographyFontOption[];
|
|
46
|
+
google: readonly TypographyFontOption[];
|
|
47
|
+
}>;
|
|
48
|
+
export declare function visibleTypographyFontOptions(input: Readonly<{
|
|
49
|
+
options: readonly TypographyFontOption[];
|
|
50
|
+
selectedFamily: string;
|
|
51
|
+
limit: number;
|
|
52
|
+
}>): readonly TypographyFontOption[];
|
|
53
|
+
export declare function fontOptionForFamily(family: string, catalog: Readonly<{
|
|
54
|
+
googleFonts: readonly GoogleFontRecord[];
|
|
55
|
+
siteFonts: readonly SiteFontRecord[];
|
|
56
|
+
}>): TypographyFontOption | null;
|
|
57
|
+
export declare function primaryFontFamily(cssFamily: string): string;
|
|
@@ -27,7 +27,7 @@ export declare function entryBaseSnapshotTargetForPull(input: Readonly<{
|
|
|
27
27
|
* then remove canonical/owner-managed entry types before diffing or writing.
|
|
28
28
|
*/
|
|
29
29
|
export declare function pullAllContentWithCanonicalEntryPolicy(client: ManagementClient, output: OutputContext): Promise<PulledContent>;
|
|
30
|
-
export declare function createScopedPullContent(meta: PulledContent['meta'], overrides: Partial<Omit<PulledContent, 'meta'>>): PulledContent;
|
|
30
|
+
export declare function createScopedPullContent(meta: Omit<PulledContent['meta'], 'truncation'> & Partial<Pick<PulledContent['meta'], 'truncation'>>, overrides: Partial<Omit<PulledContent, 'meta'>>): PulledContent;
|
|
31
31
|
/**
|
|
32
32
|
* Determines whether the pull command should prompt for overwrite confirmation.
|
|
33
33
|
* Scoped pulls (e.g., `pull entries blog-post`) only modify their target subdirectory,
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import type { OutputContext } from '../../../output';
|
|
2
2
|
import type { Theme } from '../../../../contracts';
|
|
3
|
+
import type { ThemeUpsertUpdateInput } from '../../../../client/management/types';
|
|
3
4
|
export type ThemePushClient = {
|
|
4
5
|
theme: {
|
|
5
|
-
upsert: (params: {
|
|
6
|
-
theme: Theme;
|
|
7
|
-
themeId?: string;
|
|
8
|
-
selectionId?: string;
|
|
9
|
-
}) => Promise<{
|
|
6
|
+
upsert: (params: ThemeUpsertUpdateInput) => Promise<{
|
|
10
7
|
themeId: string;
|
|
11
8
|
selectionId: string;
|
|
12
9
|
savedAt: string;
|
|
@@ -33,7 +30,7 @@ export declare function pushThemeAndUpdateMeta(params: {
|
|
|
33
30
|
client: ThemePushClient;
|
|
34
31
|
contentDir: string;
|
|
35
32
|
themeName: string;
|
|
36
|
-
theme:
|
|
33
|
+
theme: ThemeUpsertUpdateInput['theme'];
|
|
37
34
|
existingMeta?: ThemeMetaEntry;
|
|
38
35
|
readThemesMeta: (contentDir: string) => Promise<ThemesMetaFile | null>;
|
|
39
36
|
writeThemesMeta: (contentDir: string, data: ThemesMetaFile) => Promise<void>;
|
|
@@ -66,7 +63,7 @@ export declare function handleThemePushForAllScope(params: {
|
|
|
66
63
|
themeSchema: {
|
|
67
64
|
safeParse: (value: unknown) => {
|
|
68
65
|
success: true;
|
|
69
|
-
data
|
|
66
|
+
data: ThemeUpsertUpdateInput['theme'];
|
|
70
67
|
} | {
|
|
71
68
|
success: false;
|
|
72
69
|
error: {
|
|
@@ -5,22 +5,29 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { Command } from 'commander';
|
|
7
7
|
import { type CuratedSiteStyle } from '../../../../theme-core/src/site-styles/index';
|
|
8
|
-
import type { ThemeStyleSelectionApplyInput } from '../../client/management';
|
|
9
|
-
|
|
8
|
+
import type { ManagementClient, ThemeStyleSelectionApplyInput } from '../../client/management';
|
|
9
|
+
import { type SiteStyleSelectionApplyCommand } from '../../client/management';
|
|
10
|
+
import type { OutputContext } from '../output';
|
|
11
|
+
type StyleSelectionOptions = Readonly<{
|
|
10
12
|
siteStyleId: string;
|
|
11
|
-
baseSelectionVersion: string;
|
|
12
|
-
selectionId?: string;
|
|
13
13
|
buttonPersonalityId?: string;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
typographyPresetId?: string;
|
|
17
|
-
typographyBodyFontOverride?: string;
|
|
18
|
-
typographyHeadingFontOverride?: string;
|
|
14
|
+
paletteCommand?: string;
|
|
15
|
+
typography?: string;
|
|
19
16
|
headerLookId?: string;
|
|
20
17
|
headerLayoutId?: string;
|
|
21
18
|
headerStyleId?: string;
|
|
22
19
|
footerLookId?: string;
|
|
23
20
|
}>;
|
|
21
|
+
export type StyleApplyOptions = StyleSelectionOptions & Readonly<{
|
|
22
|
+
baseSelectionVersion: string;
|
|
23
|
+
selectionId?: string;
|
|
24
|
+
}>;
|
|
25
|
+
export type StyleInitOptions = StyleSelectionOptions;
|
|
26
|
+
export type StyleInitCommandDeps = Readonly<{
|
|
27
|
+
upsertTheme: ManagementClient['theme']['upsert'];
|
|
28
|
+
info: OutputContext['info'];
|
|
29
|
+
success: OutputContext['success'];
|
|
30
|
+
}>;
|
|
24
31
|
export type StyleCatalogListOptions = Readonly<{
|
|
25
32
|
siteStyleId?: string;
|
|
26
33
|
}>;
|
|
@@ -33,13 +40,20 @@ export type StyleCatalogListRow = Readonly<{
|
|
|
33
40
|
name: string;
|
|
34
41
|
palettes: readonly StyleCatalogChoice[];
|
|
35
42
|
buttonPersonalities: readonly StyleCatalogChoice[];
|
|
36
|
-
|
|
43
|
+
typography: Readonly<{
|
|
44
|
+
body: string;
|
|
45
|
+
heading: string;
|
|
46
|
+
}>;
|
|
37
47
|
headerLayouts: readonly StyleCatalogChoice[];
|
|
38
48
|
headerStyles: readonly StyleCatalogChoice[];
|
|
39
49
|
headerLooks: readonly StyleCatalogChoice[];
|
|
40
50
|
footerLooks: readonly StyleCatalogChoice[];
|
|
41
51
|
}>;
|
|
42
52
|
export declare function buildStyleSelectionApplyInputFromOptions(options: StyleApplyOptions): ThemeStyleSelectionApplyInput;
|
|
53
|
+
/** Builds the complete first-theme command without reading current selection state. */
|
|
54
|
+
export declare function buildStyleSelectionInitializeCommandFromOptions(options: StyleInitOptions): SiteStyleSelectionApplyCommand;
|
|
43
55
|
export declare function buildStyleCatalogListRows(styles?: readonly CuratedSiteStyle[], options?: StyleCatalogListOptions): readonly StyleCatalogListRow[];
|
|
44
56
|
export declare function formatStyleCatalogListRow(row: StyleCatalogListRow): string[];
|
|
57
|
+
export declare function executeStyleInitWithDeps(deps: StyleInitCommandDeps, options: StyleInitOptions): Promise<void>;
|
|
45
58
|
export declare const styleCommand: Command;
|
|
59
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type Result, type SiteId } from '../../../../core/src/index';
|
|
2
|
-
import type { ManagementBlock, ManagementClient,
|
|
2
|
+
import type { ManagementBlock, ManagementClient, ManagementNavigationMenu, ManagementPage, NavigationItemInput, UpsertedManagementEntry } from '../../client/management/types';
|
|
3
3
|
import type { EnvTarget } from '../helpers';
|
|
4
4
|
import { type CliCommandCompileBatchSuccessWithReports, type CliCommandValidationCompileError } from './commandRuntime';
|
|
5
5
|
import { type EntryCommandReportSubject, type EntrySiteCommand, type EntrySiteCommandType } from './entryCommands';
|
|
@@ -73,8 +73,8 @@ export declare function executeOneOffNavigationCommand<TResult>(input: Readonly<
|
|
|
73
73
|
client: Pick<ManagementClient, 'navigation'>;
|
|
74
74
|
apply: (command: NavigationSiteCommand, client: Pick<ManagementClient, 'navigation'>) => Promise<TResult>;
|
|
75
75
|
}>): Promise<TResult>;
|
|
76
|
-
export declare function applyOneOffEntryCommand(command: EntrySiteCommand, client: Pick<ManagementClient, 'entries'>): Promise<
|
|
77
|
-
export declare function applyOneOffEntryCommandReturningEntry(command: EntrySiteCommand, client: Pick<ManagementClient, 'entries'>): Promise<
|
|
76
|
+
export declare function applyOneOffEntryCommand(command: EntrySiteCommand, client: Pick<ManagementClient, 'entries'>): Promise<UpsertedManagementEntry | void>;
|
|
77
|
+
export declare function applyOneOffEntryCommandReturningEntry(command: EntrySiteCommand, client: Pick<ManagementClient, 'entries'>): Promise<UpsertedManagementEntry>;
|
|
78
78
|
export declare function applyOneOffPageCommand(command: PageSiteCommand, client: Pick<ManagementClient, 'pages' | 'blocks'>): Promise<ManagementPage | ManagementBlock | void>;
|
|
79
79
|
export declare function applyOneOffPageCommandReturningPage(command: PageSiteCommand, client: Pick<ManagementClient, 'pages' | 'blocks'>): Promise<ManagementPage>;
|
|
80
80
|
export declare function applyOneOffPageCommandReturningBlock(command: PageSiteCommand, client: Pick<ManagementClient, 'pages' | 'blocks'>): Promise<ManagementBlock>;
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
*
|
|
14
14
|
* No path rewriting in content data is needed since paths are relative!
|
|
15
15
|
*/
|
|
16
|
+
import { type StoragePathParseError } from '../../../../media-core/src/index';
|
|
16
17
|
/**
|
|
17
18
|
* Extract all unique storagePath values from content data.
|
|
18
19
|
* Recursively walks through objects and arrays to find all media references.
|
|
@@ -30,7 +31,20 @@ export declare function extractMediaIdentifiers(data: unknown): Set<string>;
|
|
|
30
31
|
* @param siteId - The site ID context for relative paths
|
|
31
32
|
* @param bucket - Storage bucket name (default: "media")
|
|
32
33
|
*/
|
|
33
|
-
export
|
|
34
|
+
export type MediaStorageUrlBuildError = Readonly<{
|
|
35
|
+
tag: 'invalid_storage_path';
|
|
36
|
+
siteId: string;
|
|
37
|
+
storagePath: string;
|
|
38
|
+
cause: StoragePathParseError;
|
|
39
|
+
}>;
|
|
40
|
+
export type MediaStorageUrlBuildResult = Readonly<{
|
|
41
|
+
ok: true;
|
|
42
|
+
value: string;
|
|
43
|
+
}> | Readonly<{
|
|
44
|
+
ok: false;
|
|
45
|
+
error: MediaStorageUrlBuildError;
|
|
46
|
+
}>;
|
|
47
|
+
export declare function buildStorageUrl(supabaseUrl: string, storagePath: string, siteId: string, bucket?: string): MediaStorageUrlBuildResult;
|
|
34
48
|
/**
|
|
35
49
|
* Check if a file path is an image that can be transformed by Supabase.
|
|
36
50
|
* @param path - The file path or storage path
|
|
@@ -48,7 +62,7 @@ export declare function isTransformableImage(path: string): boolean;
|
|
|
48
62
|
export declare function buildImageTransformUrl(supabaseUrl: string, storagePath: string, siteId: string, options?: {
|
|
49
63
|
width?: number;
|
|
50
64
|
quality?: number;
|
|
51
|
-
}):
|
|
65
|
+
}): MediaStorageUrlBuildResult;
|
|
52
66
|
/**
|
|
53
67
|
* Download a file from a public Supabase storage URL.
|
|
54
68
|
* Returns the file data as a Buffer, or null if download fails after retries.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Block Operations for Management Client
|
|
3
3
|
*/
|
|
4
|
+
import { type HttpClient } from './http';
|
|
4
5
|
import type { BlockOperations } from './types';
|
|
5
|
-
import type { HttpClient } from './http';
|
|
6
6
|
export declare function createBlockOperations(http: HttpClient): BlockOperations;
|
|
@@ -36,7 +36,7 @@ import { CourseSessionConflictError } from './courses';
|
|
|
36
36
|
* @returns ManagementClient instance
|
|
37
37
|
*/
|
|
38
38
|
export declare function createManagementClient(config: ManagementClientConfig): ManagementClient;
|
|
39
|
-
export type { ManagementClient, ManagementClientConfig, ManagementEntry, ManagementPage, ManagementBlock, ManagementNavigationMenu, ManagementNavigationItem, ManagementSettings, ManagementForm, ManagementFormField, ManagementFormSchema, ManagementFormSettings, ManagementVenue, VenueAddress, VenueLocation, VenueUpsertInput, ManagementEventCategory, EventCategoryUpsertInput, ManagementEventSeries, EventSchedule, EventScheduleUpsertInput, EventStartDurationSchedule, EventStartEndSchedule, EventPricing, EventPaymentTerms, EventPaymentTermsInput, EventContent, EventSeriesUpsertInput, ManagementCourseRun, CourseRunUpsertInput, CourseSession, CourseProgramContent, CourseSessionConflict, EntryUpsertInput, PageUpsertInput, BlockUpsertInput, NavigationMenuUpsertInput, NavigationItemInput, FormUpsertInput, SiteStyleSelectionApplyCommand, SiteStyleSelectionApplyCommandInput, ThemeUpsertInput, ThemeUpsertResult, ThemeStyleSelectionApplyInput, ThemeStyleSelectionApplyResult, FooterContent, ManagementFooterContent, FooterContentUpsertInput, FooterOperations, PulledFooter, PulledEntries, PulledPages, PulledNavigation, PulledSettings, PulledForms, PulledTheme, PulledVenues, PulledEventCategories, PulledEvents, PulledCourses, PulledSiteInfo, PulledContentType, PulledContentTypes, PulledContent, PaginationOptions, PaginatedResult, EntryOperations, PageOperations, BlockOperations, NavigationOperations, SettingsOperations, SettingsUpdateInput, WebhookOperations, SetupRevalidationWebhookInput, SetupRevalidationWebhookResult, ManagementWebhookEndpoint, RevalidationWebhookPlannedEndpoint, FormOperations, ThemeOperations, VenueOperations, EventCategoryOperations, EventOperations, CourseOperations, PullOperations, IdentifiersOperations, BackfillResult, BackfillPageResult, BackfillBlockResult, BackfillEntryResult, MediaOperations, MediaUploadResult, } from './types';
|
|
39
|
+
export type { ManagementClient, ManagementClientConfig, ManagementEntry, ManagementPage, ManagementBlock, ManagementNavigationMenu, ManagementNavigationItem, ManagementSettings, ManagementForm, ManagementFormField, ManagementFormSchema, ManagementFormSettings, ManagementVenue, VenueAddress, VenueLocation, VenueUpsertInput, ManagementEventCategory, EventCategoryUpsertInput, ManagementEventSeries, EventSchedule, EventScheduleUpsertInput, EventStartDurationSchedule, EventStartEndSchedule, EventPricing, EventPaymentTerms, EventPaymentTermsInput, EventContent, EventSeriesUpsertInput, ManagementCourseRun, CourseRunUpsertInput, CourseSession, CourseProgramContent, CourseSessionConflict, EntryUpsertInput, EntryPublishUpsertResult, UpsertedManagementEntry, PageUpsertInput, PagePublishUpsertResult, BlockUpsertInput, NavigationMenuUpsertInput, NavigationItemInput, FormUpsertInput, SiteStyleSelectionApplyCommand, SiteStyleSelectionApplyCommandInput, ThemeUpsertInitializeInput, ThemeUpsertInput, ThemeUpsertResult, ThemeUpsertUpdateInput, ThemeStyleSelectionApplyInput, ThemeStyleSelectionApplyResult, FooterContent, ManagementFooterContent, FooterContentUpsertInput, FooterOperations, PulledFooter, PulledEntries, PulledPages, PulledDrafts, PulledNavigation, PulledSettings, PulledForms, PulledTheme, PulledVenues, PulledEventCategories, PulledEvents, PulledCourses, PulledSiteInfo, PulledContentType, PulledContentTypes, PulledContent, PaginationOptions, PaginatedResult, EntryOperations, PageOperations, BlockOperations, NavigationOperations, SettingsOperations, SettingsUpdateInput, WebhookOperations, SetupRevalidationWebhookInput, SetupRevalidationWebhookResult, ManagementWebhookEndpoint, RevalidationWebhookPlannedEndpoint, FormOperations, ThemeOperations, VenueOperations, EventCategoryOperations, EventOperations, CourseOperations, PullOperations, IdentifiersOperations, BackfillResult, BackfillPageResult, BackfillBlockResult, BackfillEntryResult, MediaOperations, MediaUploadResult, } from './types';
|
|
40
40
|
export { ManagementApiError, type ManagementApiErrorRequest } from './http';
|
|
41
41
|
export { applySiteStyleSelectionBodyFromCommand, buildApplySiteStyleSelectionCommand, } from './theme';
|
|
42
42
|
export { CourseSessionConflictError };
|
|
@@ -4,13 +4,21 @@
|
|
|
4
4
|
* Type definitions for the SDK management client used for write operations.
|
|
5
5
|
*/
|
|
6
6
|
import type { LinkPayload, NavigationLinkInput } from '../../public-api/contracts';
|
|
7
|
+
import type { APIEndpoints } from '../../../../api/src/index';
|
|
7
8
|
import type { SiteCommandOf } from '../../../../site-commands/src/index';
|
|
8
9
|
import type { SdkEventPricing, SdkEventPricingInput, SdkEventTicketTypeInput } from '../../../../api/src/sdk-event-pricing';
|
|
9
10
|
import type { SdkEventPaymentTerms, SdkEventPaymentTermsInput } from '../../../../api/src/sdk-event-payment-terms';
|
|
10
11
|
import type { SdkEventUpsertBody } from '../../../../api/src/sdk-event-upsert';
|
|
11
12
|
import type { SdkManagementEventSeries } from '../../../../api/src/sdkContracts';
|
|
13
|
+
import type { SdkPullTruncationMeta } from '../../../../api/src/sdkContracts';
|
|
14
|
+
import type { SdkEntryPublishErrorCode, SdkPagePublishErrorCode, SdkPublicationOutcome } from '../../../../api/src/sdkContracts';
|
|
12
15
|
import type { PaletteSelection } from '../../../../theme-core/src/palette/index';
|
|
13
16
|
import type { Theme } from '../../contracts';
|
|
17
|
+
export type SdkDeletePageResponse = NonNullable<APIEndpoints['sdkDeletePage']['response']>;
|
|
18
|
+
export type SdkGetPageBlockResponse = NonNullable<APIEndpoints['sdkGetPageBlock']['response']>;
|
|
19
|
+
export type SdkPullEntriesAllResponse = NonNullable<APIEndpoints['sdkPullEntriesAll']['response']>;
|
|
20
|
+
export type SdkUpsertEntryResponse = NonNullable<APIEndpoints['sdkUpsertEntry']['response']>;
|
|
21
|
+
export type SdkUpsertPageResponse = NonNullable<APIEndpoints['sdkUpsertPage']['response']>;
|
|
14
22
|
export interface ManagementClientConfig {
|
|
15
23
|
/**
|
|
16
24
|
* Dashboard URL (e.g., http://localhost:4000 or https://dashboard.riverbankcms.com)
|
|
@@ -66,6 +74,28 @@ export interface EntryUpsertInput {
|
|
|
66
74
|
slug?: string;
|
|
67
75
|
manualOrder?: number;
|
|
68
76
|
blocks?: EntrySlotBlocksInput;
|
|
77
|
+
/**
|
|
78
|
+
* Publication intent. 'draft' (default) writes a draft only; 'publish' runs
|
|
79
|
+
* the publish operation after a successful save. Save and publish are not
|
|
80
|
+
* atomic — a publish that fails after a successful save is reported in-band on
|
|
81
|
+
* the response, not as an error.
|
|
82
|
+
*/
|
|
83
|
+
publication?: 'draft' | 'publish';
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* The entry shape upsert responses carry — the wire envelope omits
|
|
87
|
+
* `publishedData` (the caller just wrote the draft; fetch with `get` when the
|
|
88
|
+
* published side is needed).
|
|
89
|
+
*/
|
|
90
|
+
export type UpsertedManagementEntry = Omit<ManagementEntry, 'publishedData'>;
|
|
91
|
+
/**
|
|
92
|
+
* Result of an entry upsert with `publication: 'publish'`. The promise resolves
|
|
93
|
+
* even when the publish stage failed — the save succeeded and the entry exists
|
|
94
|
+
* as a draft; branch on `publication.published`.
|
|
95
|
+
*/
|
|
96
|
+
export interface EntryPublishUpsertResult {
|
|
97
|
+
entry: UpsertedManagementEntry;
|
|
98
|
+
publication: SdkPublicationOutcome<SdkEntryPublishErrorCode>;
|
|
69
99
|
}
|
|
70
100
|
export interface ManagementPage {
|
|
71
101
|
id: string;
|
|
@@ -84,6 +114,20 @@ export interface PageUpsertInput {
|
|
|
84
114
|
path: string;
|
|
85
115
|
seoTitle?: string;
|
|
86
116
|
seoDescription?: string;
|
|
117
|
+
/**
|
|
118
|
+
* Publication intent. 'draft' (default) writes a draft only; 'publish' runs
|
|
119
|
+
* page publish after a successful save. Save and publish are non-atomic; a
|
|
120
|
+
* publish failure after a successful save is reported in-band, not as an error.
|
|
121
|
+
*/
|
|
122
|
+
publication?: 'draft' | 'publish';
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Result of a page upsert with `publication: 'publish'`. Resolves even when the
|
|
126
|
+
* publish stage failed — the save succeeded; branch on `publication.published`.
|
|
127
|
+
*/
|
|
128
|
+
export interface PagePublishUpsertResult {
|
|
129
|
+
page: ManagementPage;
|
|
130
|
+
publication: SdkPublicationOutcome<SdkPagePublishErrorCode>;
|
|
87
131
|
}
|
|
88
132
|
export interface ManagementBlock {
|
|
89
133
|
id: string;
|
|
@@ -487,16 +531,18 @@ export interface MediaResolveResponse {
|
|
|
487
531
|
missingAssetIds: string[];
|
|
488
532
|
}
|
|
489
533
|
/**
|
|
490
|
-
*
|
|
491
|
-
*
|
|
534
|
+
* Explicitly separates an existing-theme update from first-theme provisioning.
|
|
535
|
+
* Initialization never accepts a separately authoritative Theme payload.
|
|
492
536
|
*/
|
|
493
|
-
export
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
537
|
+
export type ThemeUpsertInput = NonNullable<APIEndpoints['sdkUpsertTheme']['body']>;
|
|
538
|
+
/** Updates an existing theme selection with a caller-supplied theme. */
|
|
539
|
+
export type ThemeUpsertUpdateInput = Extract<ThemeUpsertInput, {
|
|
540
|
+
kind: 'update';
|
|
541
|
+
}>;
|
|
542
|
+
/** Creates the first theme by compiling this complete style-selection command. */
|
|
543
|
+
export type ThemeUpsertInitializeInput = Extract<ThemeUpsertInput, {
|
|
544
|
+
kind: 'initialize';
|
|
545
|
+
}>;
|
|
500
546
|
/**
|
|
501
547
|
* Response from theme upsert operation.
|
|
502
548
|
*/
|
|
@@ -507,10 +553,29 @@ export interface ThemeUpsertResult {
|
|
|
507
553
|
}
|
|
508
554
|
export type SiteStyleSelectionApplyCommand = SiteCommandOf<'applySiteStyleSelection'>;
|
|
509
555
|
export type SiteStyleSelectionApplyCommandInput = SiteStyleSelectionApplyCommand['input'];
|
|
510
|
-
|
|
556
|
+
/**
|
|
557
|
+
* Public SDK input for style-selection apply, derived from the shared command
|
|
558
|
+
* IR so SDK, CLI, and AI proposal flows stay aligned. The IR permits the
|
|
559
|
+
* minimal request ({siteStyleId, baseSelectionVersion}); omitted choices
|
|
560
|
+
* default from the curated style server-side. Wire IDs are strings at this
|
|
561
|
+
* boundary; the server schema brands and validates them. The canonical header
|
|
562
|
+
* pair is atomic at the type level: both omitted (site-style default), both
|
|
563
|
+
* null (legacy default), or both supplied.
|
|
564
|
+
*/
|
|
565
|
+
export type ThemeStyleSelectionApplyInput = Omit<SiteStyleSelectionApplyCommandInput, 'siteStyleId' | 'headerLayoutId' | 'headerStyleId'> & Readonly<{
|
|
566
|
+
siteStyleId: string;
|
|
511
567
|
baseSelectionVersion: number;
|
|
512
568
|
selectionId?: string | null;
|
|
513
|
-
}
|
|
569
|
+
}> & (Readonly<{
|
|
570
|
+
headerLayoutId?: undefined;
|
|
571
|
+
headerStyleId?: undefined;
|
|
572
|
+
}> | Readonly<{
|
|
573
|
+
headerLayoutId: null;
|
|
574
|
+
headerStyleId: null;
|
|
575
|
+
}> | Readonly<{
|
|
576
|
+
headerLayoutId: string;
|
|
577
|
+
headerStyleId: string;
|
|
578
|
+
}>);
|
|
514
579
|
export interface ThemeStyleSelectionApplyResult {
|
|
515
580
|
success: boolean;
|
|
516
581
|
themeId: string;
|
|
@@ -521,16 +586,11 @@ export interface ThemeStyleSelectionApplyResult {
|
|
|
521
586
|
theme: Theme;
|
|
522
587
|
siteStyleId: string;
|
|
523
588
|
buttonPersonalityId: string;
|
|
524
|
-
paletteVariantId: string;
|
|
525
|
-
paletteOverrides: Record<string, string> | null;
|
|
526
589
|
activePaletteSelection: PaletteSelection;
|
|
527
590
|
activeSitePaletteVersion: number | null;
|
|
528
591
|
headerLookId: string | null;
|
|
529
592
|
headerLayoutId: string;
|
|
530
593
|
headerStyleId: string;
|
|
531
|
-
typographyPresetId: string | null;
|
|
532
|
-
typographyBodyFontOverride: string | null;
|
|
533
|
-
typographyHeadingFontOverride: string | null;
|
|
534
594
|
footerLookId: string;
|
|
535
595
|
}
|
|
536
596
|
/**
|
|
@@ -586,6 +646,7 @@ export interface PulledEntries {
|
|
|
586
646
|
updatedAt: string;
|
|
587
647
|
publishedAt: string | null;
|
|
588
648
|
}>;
|
|
649
|
+
truncation?: SdkPullTruncationMeta;
|
|
589
650
|
};
|
|
590
651
|
pagination: {
|
|
591
652
|
page: number;
|
|
@@ -625,6 +686,30 @@ export interface PulledNavigation {
|
|
|
625
686
|
pulledAt: string;
|
|
626
687
|
};
|
|
627
688
|
}
|
|
689
|
+
/**
|
|
690
|
+
* Cross-type overview of everything with pending (unpublished) changes.
|
|
691
|
+
* Mirrors `SdkPullDraftsResponse` in `@riverbankcms/api`; kept structurally in
|
|
692
|
+
* sync by the API↔SDK typetest.
|
|
693
|
+
*/
|
|
694
|
+
export interface PulledDrafts {
|
|
695
|
+
pages: Array<{
|
|
696
|
+
identifier: string;
|
|
697
|
+
hasUnpublishedChanges: boolean;
|
|
698
|
+
status: 'draft' | 'published';
|
|
699
|
+
}>;
|
|
700
|
+
entries: Array<{
|
|
701
|
+
contentType: string;
|
|
702
|
+
identifier: string;
|
|
703
|
+
status: 'draft' | 'published';
|
|
704
|
+
}>;
|
|
705
|
+
summary: {
|
|
706
|
+
pageCount: number;
|
|
707
|
+
entryCount: number;
|
|
708
|
+
};
|
|
709
|
+
meta: {
|
|
710
|
+
pulledAt: string;
|
|
711
|
+
};
|
|
712
|
+
}
|
|
628
713
|
export interface PulledSettings {
|
|
629
714
|
settings: ManagementSettings;
|
|
630
715
|
warnings?: string[];
|
|
@@ -783,10 +868,8 @@ export interface PulledContent {
|
|
|
783
868
|
meta: {
|
|
784
869
|
pulledAt: string;
|
|
785
870
|
settingsUpdatedAt?: string | null;
|
|
786
|
-
/** Whether the response was truncated due to size limits */
|
|
787
|
-
|
|
788
|
-
/** Message explaining what was truncated */
|
|
789
|
-
truncationMessage?: string;
|
|
871
|
+
/** Whether the response was truncated due to size limits and what was returned. */
|
|
872
|
+
truncation: SdkPullTruncationMeta;
|
|
790
873
|
entries?: Record<string, {
|
|
791
874
|
createdAt: string;
|
|
792
875
|
updatedAt: string;
|
|
@@ -828,7 +911,19 @@ export type ApiResponse<T> = ApiSuccessResponse<T> | ApiErrorResponse;
|
|
|
828
911
|
export interface EntryOperations {
|
|
829
912
|
list(contentType: string, options?: PaginationOptions): Promise<PaginatedResult<ManagementEntry>>;
|
|
830
913
|
get(contentType: string, identifier: string): Promise<ManagementEntry | null>;
|
|
831
|
-
|
|
914
|
+
/**
|
|
915
|
+
* Correlated overloads: a publish-intent upsert resolves to the entry plus
|
|
916
|
+
* the publication outcome (which may report a failed publish); a draft upsert
|
|
917
|
+
* resolves to the entry alone. Statically-unknown intent gets the honest
|
|
918
|
+
* union.
|
|
919
|
+
*/
|
|
920
|
+
upsert(input: EntryUpsertInput & {
|
|
921
|
+
publication: 'publish';
|
|
922
|
+
}): Promise<EntryPublishUpsertResult>;
|
|
923
|
+
upsert(input: EntryUpsertInput & {
|
|
924
|
+
publication?: 'draft';
|
|
925
|
+
}): Promise<UpsertedManagementEntry>;
|
|
926
|
+
upsert(input: EntryUpsertInput): Promise<UpsertedManagementEntry | EntryPublishUpsertResult>;
|
|
832
927
|
publish(contentType: string, identifier: string): Promise<void>;
|
|
833
928
|
unpublish(contentType: string, identifier: string): Promise<void>;
|
|
834
929
|
delete(contentType: string, identifier: string): Promise<void>;
|
|
@@ -836,13 +931,22 @@ export interface EntryOperations {
|
|
|
836
931
|
export interface PageOperations {
|
|
837
932
|
list(options?: PaginationOptions): Promise<PaginatedResult<ManagementPage>>;
|
|
838
933
|
get(identifier: string): Promise<ManagementPage | null>;
|
|
839
|
-
upsert
|
|
934
|
+
/** Correlated overloads — see {@link EntryOperations.upsert}. */
|
|
935
|
+
upsert(input: PageUpsertInput & {
|
|
936
|
+
publication: 'publish';
|
|
937
|
+
}): Promise<PagePublishUpsertResult>;
|
|
938
|
+
upsert(input: PageUpsertInput & {
|
|
939
|
+
publication?: 'draft';
|
|
940
|
+
}): Promise<ManagementPage>;
|
|
941
|
+
upsert(input: PageUpsertInput): Promise<ManagementPage | PagePublishUpsertResult>;
|
|
840
942
|
publish(identifier: string): Promise<void>;
|
|
841
943
|
unpublish(identifier: string): Promise<void>;
|
|
944
|
+
delete(identifier: string): Promise<void>;
|
|
842
945
|
}
|
|
946
|
+
export type ManagementPageBlock = SdkGetPageBlockResponse['block'];
|
|
843
947
|
export interface BlockOperations {
|
|
844
948
|
list(pageIdentifier: string): Promise<ManagementBlock[]>;
|
|
845
|
-
get(pageIdentifier: string, blockIdentifier: string): Promise<
|
|
949
|
+
get(pageIdentifier: string, blockIdentifier: string): Promise<ManagementPageBlock | null>;
|
|
846
950
|
upsert(pageIdentifier: string, input: BlockUpsertInput): Promise<ManagementBlock>;
|
|
847
951
|
reorder(pageIdentifier: string, blockIdentifiers: string[]): Promise<void>;
|
|
848
952
|
delete(pageIdentifier: string, blockIdentifier: string): Promise<void>;
|
|
@@ -903,6 +1007,11 @@ export interface CourseOperations {
|
|
|
903
1007
|
export interface PullOperations {
|
|
904
1008
|
entries(contentType?: string, options?: PaginationOptions): Promise<PulledEntries>;
|
|
905
1009
|
pages(): Promise<PulledPages>;
|
|
1010
|
+
/**
|
|
1011
|
+
* Cross-type overview of pages and entries with pending (unpublished) changes.
|
|
1012
|
+
* Server-side filtered and fully enumerated.
|
|
1013
|
+
*/
|
|
1014
|
+
drafts(): Promise<PulledDrafts>;
|
|
906
1015
|
navigation(): Promise<PulledNavigation>;
|
|
907
1016
|
settings(): Promise<PulledSettings>;
|
|
908
1017
|
forms(): Promise<PulledForms>;
|