@riverbankcms/sdk 0.135.1 → 0.137.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/CHANGELOG.md +114 -0
- package/README.md +4 -8
- package/dist/{PreviewEditorSidebar-D4p_5TdY.mjs → PreviewEditorSidebar-Bn6cONPa.mjs} +8 -8
- package/dist/{PreviewEditorUI-D0cRoTX1.mjs → PreviewEditorUI-LAwXZPSx.mjs} +3 -3
- package/dist/{PreviewQueryProvider-DcgaESkm.mjs → PreviewQueryProvider-ztQUdsNo.mjs} +1 -1
- package/dist/{SdkPreviewModeRuntime-BKLtM3Nz.mjs → SdkPreviewModeRuntime-BbbGsI_v.mjs} +621 -238
- package/dist/{SiteChromeCustomizeContext-61X2m7QV.mjs → SiteChromeCustomizeContext-BbkNSt5a.mjs} +5041 -2407
- package/dist/_dts/ai/src/contracts/proposals.d.ts +18 -850
- package/dist/_dts/ai/src/contracts/siteStyleProposalSchemas.d.ts +412 -2316
- package/dist/_dts/ai/src/designer/themePatch.d.ts +5 -10
- package/dist/_dts/api/src/accessAdmin.d.ts +1 -9
- package/dist/_dts/api/src/accountApi.d.ts +49 -2
- package/dist/_dts/api/src/contentRuntime.d.ts +7 -4
- package/dist/_dts/api/src/domainConnection.d.ts +41 -0
- package/dist/_dts/api/src/endpoints.d.ts +201 -181
- package/dist/_dts/api/src/index.d.ts +5 -3
- package/dist/_dts/api/src/media.d.ts +19 -2
- package/dist/_dts/api/src/publicEventEndpointDefinitions.d.ts +7 -0
- package/dist/_dts/api/src/publicExperience/eventEndpoints.d.ts +26 -0
- package/dist/_dts/api/src/sdkBlockContentAdmission.d.ts +5 -0
- package/dist/_dts/api/src/sdkContracts.d.ts +2 -15
- package/dist/_dts/api/src/sdkMediaContracts.d.ts +40 -0
- package/dist/_dts/api/src/sdkMediaEndpointDefinitions.d.ts +61 -0
- package/dist/_dts/api/src/sdkThemeWire.d.ts +21 -436
- package/dist/_dts/api/src/siteInfrastructure.d.ts +17 -23
- package/dist/_dts/api/src/siteManagementEndpoints.d.ts +7 -21
- package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +27 -3
- package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +37 -17
- package/dist/_dts/api/src/types.d.ts +1 -1
- package/dist/_dts/block-form/src/blockDraftSaveability.d.ts +2 -3
- package/dist/_dts/block-form/src/utils/slug.d.ts +6 -0
- package/dist/_dts/blocks/src/PageRenderer.d.ts +13 -7
- package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +48 -0
- package/dist/_dts/blocks/src/definitions.d.ts +14 -0
- package/dist/_dts/blocks/src/index.d.ts +4 -3
- package/dist/_dts/blocks/src/pageRenderAdmission.d.ts +49 -0
- package/dist/_dts/blocks/src/pageRendererBlockSupport.d.ts +75 -0
- package/dist/_dts/blocks/src/pageRendererBoundaries.d.ts +2 -0
- package/dist/_dts/blocks/src/server.d.ts +2 -2
- package/dist/_dts/blocks/src/system/blocks/event-registration.d.ts +1 -1
- package/dist/_dts/blocks/src/system/data/index.d.ts +2 -0
- package/dist/_dts/blocks/src/system/data/publicLoaderCachePolicy.d.ts +78 -0
- package/dist/_dts/blocks/src/system/manifest/fieldValidation/index.d.ts +2 -18
- package/dist/_dts/blocks/src/system/manifest/validation.d.ts +103 -16
- package/dist/_dts/blocks/src/system/node/validation-constants.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/api/client.d.ts +4 -2
- package/dist/_dts/blocks/src/system/runtime/api/endpoints.d.ts +8 -0
- package/dist/_dts/blocks/src/system/runtime/api/index.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/api/types/events.d.ts +19 -0
- package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +52 -0
- package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +24 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/useCalendarEvents.d.ts +47 -21
- package/dist/_dts/blocks/src/system/runtime/hooks/useCalendarEvents.state.d.ts +38 -9
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/ErrorStep.d.ts +3 -5
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/VerifyingTimeoutStep.d.ts +3 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/event-registration.headless.contract.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/event-registration.headless.planning.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/hooks.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationErrorPresentation.d.ts +5 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationErrorRecovery.d.ts +25 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationWizardContext.d.ts +4 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationStripeReturn.d.ts +8 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationSubmit.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts +5 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useWaitlistClaimRestoration.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCalendar.client.d.ts +2 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCalendar.interactive.d.ts +40 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCombined.client.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCombined.interactive.d.ts +43 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/domain/capacity.d.ts +164 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/domain/cta.d.ts +29 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/domain/dates.d.ts +47 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/domain/index.d.ts +14 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/domain/people.d.ts +6 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/domain/pricing.d.ts +31 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/CalendarDayCell.d.ts +3 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/CalendarNavigationChevron.d.ts +4 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/DayEventsModal.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/EventModalContext.d.ts +3 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/OfferingTitle.d.ts +11 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/WeekAgendaView.d.ts +4 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/WeekBoardView.d.ts +31 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/WeekTimetableView.d.ts +3 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventCollectionContract.d.ts +9 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/index.d.ts +3 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/listingLayout.d.ts +23 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/timetableModel.d.ts +4 -3
- package/dist/_dts/blocks/src/system/transforms/registry/layout.d.ts +0 -1
- package/dist/_dts/calendar/src/grid.d.ts +24 -66
- package/dist/_dts/calendar/src/index.d.ts +2 -2
- package/dist/_dts/calendar/src/timetable.d.ts +5 -9
- package/dist/_dts/commerce/src/purchase/allocation.d.ts +11 -0
- package/dist/_dts/commerce/src/purchase/event-registration-errors.d.ts +57 -0
- package/dist/_dts/commerce/src/purchase/index.d.ts +3 -0
- package/dist/_dts/commerce/src/purchase/settlement.d.ts +33 -0
- package/dist/_dts/commerce/src/purchase/stripeCheckoutReturnUrl.d.ts +8 -0
- package/dist/_dts/content-model/src/templates/defaults.d.ts +6 -0
- package/dist/_dts/core/src/slug.d.ts +20 -5
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +8 -40
- package/dist/_dts/db/src/index.d.ts +1 -0
- package/dist/_dts/db/src/utils/postgrestFilter.d.ts +2 -0
- package/dist/_dts/media-core/src/bulkDeletePlanning.d.ts +4 -0
- package/dist/_dts/media-core/src/fileDomain.d.ts +3 -0
- package/dist/_dts/preview-next/src/client/blocks/EditablePageRenderer.d.ts +1 -1
- package/dist/_dts/preview-next/src/client/preview/PreviewShell.d.ts +1 -0
- package/dist/_dts/preview-next/src/client/preview/PreviewShellLayout.d.ts +1 -0
- package/dist/_dts/preview-next/src/client/preview/SiteChromeCustomizeContext.d.ts +3 -2
- package/dist/_dts/preview-next/src/client/preview/headerInteractionPaletteSurfaceState.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/preview/siteChromeBrandPreferences.d.ts +1 -1
- package/dist/_dts/preview-next/src/client/preview/siteChromeQuickControlHistoryState.d.ts +2 -0
- package/dist/_dts/preview-next/src/client/preview/siteChromeQuickControlSaveRequest.d.ts +51 -0
- package/dist/_dts/preview-next/src/client/preview/siteChromeSavePlan.d.ts +24 -2
- package/dist/_dts/preview-next/src/client/preview/siteStylePreviewPlanner.d.ts +23 -1
- package/dist/_dts/preview-next/src/client/preview/usePersistedHeaderPreferences.d.ts +8 -0
- package/dist/_dts/sdk/src/client/publicLoaderCacheAccess.d.ts +6 -0
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +7 -2
- package/dist/_dts/sdk/src/rendering/blocks-page-renderer.d.ts +10 -6
- package/dist/_dts/sdk/src/rendering/components/Block.shared.d.ts +0 -1
- package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +4 -4
- package/dist/_dts/sdk/src/rendering/helpers/footerPageOutline.d.ts +3 -0
- package/dist/_dts/sdk/src/rendering/helpers/loadContent.d.ts +3 -0
- package/dist/_dts/sdk/src/rendering/helpers/loadPage.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +17 -0
- package/dist/_dts/sdk/src/rendering/helpers/templateContent.d.ts +9 -3
- package/dist/_dts/sdk/src/rendering/hooks/usePage.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/index.d.ts +2 -2
- package/dist/_dts/sdk/src/rendering/overrideResolution.d.ts +7 -4
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/theme-core/src/cards/types.d.ts +8 -8
- package/dist/_dts/theme-core/src/data.d.ts +12 -0
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/gradients/types.d.ts +5 -0
- package/dist/_dts/theme-core/src/header/interactionPalette.d.ts +25 -2
- package/dist/_dts/theme-core/src/header/legacyHeaderVariant.d.ts +2 -6
- package/dist/_dts/theme-core/src/mock-themes/all.d.ts +9 -810
- package/dist/_dts/theme-core/src/schema.d.ts +460 -1285
- package/dist/_dts/theme-core/src/site-styles/compilationPlan.d.ts +43 -3
- package/dist/_dts/theme-core/src/site-styles/curatedSiteStyles.d.ts +223 -1
- package/dist/_dts/theme-core/src/site-styles/headerBrandPresentation.d.ts +63 -0
- package/dist/_dts/theme-core/src/site-styles/headerBytesComparison.d.ts +30 -0
- package/dist/_dts/theme-core/src/site-styles/headerInteractionPalette.d.ts +50 -1
- package/dist/_dts/theme-core/src/site-styles/headerLayoutCatalog.d.ts +48 -38
- package/dist/_dts/theme-core/src/site-styles/headerLayoutStyles.d.ts +10 -0
- package/dist/_dts/theme-core/src/site-styles/headerLayoutTypes.d.ts +8 -5
- package/dist/_dts/theme-core/src/site-styles/headerOpeningForeground.d.ts +4 -4
- package/dist/_dts/theme-core/src/site-styles/headerPreferences.d.ts +162 -0
- package/dist/_dts/theme-core/src/site-styles/headerPreferencesPersistence.d.ts +73 -0
- package/dist/_dts/theme-core/src/site-styles/headerRecompile.d.ts +118 -0
- package/dist/_dts/theme-core/src/site-styles/headerStyleCompiler.d.ts +25 -2
- package/dist/_dts/theme-core/src/site-styles/headerStyleDefaults.d.ts +465 -0
- package/dist/_dts/theme-core/src/site-styles/headerStyleRecipe.d.ts +168 -0
- package/dist/_dts/theme-core/src/site-styles/index.d.ts +5 -0
- package/dist/_dts/theme-core/src/site-styles/previewCompiler.d.ts +1 -1
- package/dist/_dts/theme-core/src/site-styles/siteChromeBackgrounds.d.ts +20 -1
- package/dist/_dts/theme-core/src/site-styles/siteChromeNavPreferences.d.ts +43 -2
- package/dist/client/{BookingConsentAgreement-Bz9znbpn.mjs → BookingConsentAgreement--_fUCZe-.mjs} +2 -2
- package/dist/client/{DiscountCodeDisclosure-35Ru8yB9.mjs → DiscountCodeDisclosure-BMipSoDJ.mjs} +1 -1
- package/dist/client/{EventCombined.client-BKB0ZxRR.mjs → EventCombined.client-CwJOxn7A.mjs} +274 -278
- package/dist/client/{EventListing.client-Dx8I21ok.mjs → EventListing.client-eVwiylPW.mjs} +2 -2
- package/dist/client/{LeafletStaticMap-CEWx-Bhe.mjs → LeafletStaticMap-IKenna5u.mjs} +1 -1
- package/dist/client/{accordion-KIDsKTwS.mjs → accordion-MGAO3PuE.mjs} +1 -1
- package/dist/client/{bookingForm-D96Rmp-5.mjs → bookingForm-CudlQPUu.mjs} +5 -5
- package/dist/client/bookings.mjs +476 -98
- package/dist/client/capacity-BW00PO7s.mjs +271 -0
- package/dist/client/{carousel-YwUgyL66.mjs → carousel-BrbGJ2Jl.mjs} +1 -1
- package/dist/client/{cart-BbwuNrUT.mjs → cart-Bq5eU0xZ.mjs} +3 -3
- package/dist/client/{checkout-hp1ucmEY.mjs → checkout-BAFVRdrK.mjs} +3 -3
- package/dist/client/client.mjs +4641 -2721
- package/dist/client/{context-DljQn8L5.mjs → context-DCkiHVdD.mjs} +20 -5
- package/dist/client/dates-2RPXHQy4.mjs +264 -0
- package/dist/client/{eventCalendar-DU4iNLpo.mjs → eventCalendar-B0O-hPF7.mjs} +261 -126
- package/dist/client/{eventCombined-CZuupW8m.mjs → eventCombined-DCkDaoDI.mjs} +3 -3
- package/dist/client/{eventDetails-DPQWwCIi.mjs → eventDetails-D8GG2dnD.mjs} +7 -4
- package/dist/client/{eventListing-C7oMidwS.mjs → eventListing-3ssV_bxz.mjs} +3 -3
- package/dist/client/{eventRegistration-zEiunlUs.mjs → eventRegistration-bPQo3kVw.mjs} +610 -313
- package/dist/client/{form-D2KIyCVJ.mjs → form-qMv8RDkk.mjs} +2 -2
- package/dist/client/{headerSection-CK5uChUK.mjs → headerSection-CH0Sc5hX.mjs} +2 -2
- package/dist/client/hooks.mjs +2514 -308
- package/dist/client/{locationMap-DLQNH1ln.mjs → locationMap-0_xlBnNI.mjs} +2 -2
- package/dist/client/{newsletterForm-ZuhIG7fZ.mjs → newsletterForm-NUW7m9RI.mjs} +2 -2
- package/dist/client/{productDetail-7hIcGeae.mjs → productDetail-FBEOM7jW.mjs} +3 -3
- package/dist/client/{productList-T4Cii1ot.mjs → productList-R0OSGhnn.mjs} +3 -3
- package/dist/client/{propsDecoder-mB0aC_Fi.mjs → propsDecoder-pYvx_Srl.mjs} +179 -401
- package/dist/client/rendering/client.mjs +3496 -2223
- package/dist/client/rendering/islands.mjs +17 -17
- package/dist/client/rendering.mjs +4400 -2510
- package/dist/client/{scrollToBlock-Du5mHgvL.mjs → scrollToBlock-ByQv96M2.mjs} +1 -1
- package/dist/client/{shop-B5zAcKZn.mjs → shop-RUG9DmRE.mjs} +6 -6
- package/dist/client/{shop-commerce-BKBZB6l5.mjs → shop-commerce-B76Jz23B.mjs} +5 -5
- package/dist/client/{shop-commerce-store-Cq4qlNtQ.mjs → shop-commerce-store-QuQNdDsD.mjs} +1 -1
- package/dist/client/{shopShared-DYGzEs9D.mjs → shopShared-vXU1omwJ.mjs} +3 -3
- package/dist/client/{useEventFilters-Bphkda8m.mjs → useEventFilters-ByuU6HLA.mjs} +33 -18
- package/dist/preview-next/before-render.mjs +86 -51
- package/dist/preview-next/client/runtime.mjs +4 -4
- package/dist/preview-next/keepAlive.mjs +86 -51
- package/dist/preview-next/middleware.mjs +86 -51
- package/dist/{previewAuthStore-C7ksxt5b.mjs → previewAuthStore-L_cKW8Sb.mjs} +86 -51
- package/dist/{sdk-runtime-BbIC8G4J.mjs → sdk-runtime-sUMr5d70.mjs} +2 -2
- package/dist/{separator-CadhAtI7.mjs → separator-BIHkie5i.mjs} +1 -1
- package/dist/server/components.mjs +4397 -2960
- package/dist/server/config-validation.mjs +354 -145
- package/dist/server/config.mjs +354 -145
- package/dist/server/data.mjs +354 -144
- package/dist/server/index.mjs +201 -55
- package/dist/server/manifest.mjs +0 -1
- package/dist/server/next.mjs +4046 -2611
- package/dist/server/page-converter.mjs +225 -122
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +4105 -2636
- package/dist/server/rendering.mjs +4522 -3087
- package/dist/server/routing.mjs +3289 -1637
- package/dist/server/server.mjs +23175 -21079
- package/dist/server/theme-bridge.mjs +708 -272
- package/dist/server/theme.mjs +29 -25
- package/dist/styles/index.css +624 -181
- package/package.json +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventCapacity.d.ts +0 -48
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/pricing.d.ts +0 -17
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/utils.d.ts +0 -100
- /package/dist/_dts/blocks/src/system/runtime/nodes/events/{shared → domain}/destination.d.ts +0 -0
|
@@ -1,15 +1,30 @@
|
|
|
1
|
+
export type SlugifyOptions = Readonly<{
|
|
2
|
+
/**
|
|
3
|
+
* Treat `/` as a path separator: each segment is slugified independently and
|
|
4
|
+
* empty segments are dropped, so `Blog / My Post` becomes `blog/my-post`.
|
|
5
|
+
*/
|
|
6
|
+
preserveSegments?: boolean;
|
|
7
|
+
/** Truncate the finished slug to at most this many characters. */
|
|
8
|
+
maxLength?: number;
|
|
9
|
+
}>;
|
|
1
10
|
/**
|
|
2
|
-
* Convert a string to a URL-safe slug
|
|
11
|
+
* Convert a string to a URL-safe slug.
|
|
3
12
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
13
|
+
* Every non-alphanumeric character (underscores included) is a separator and
|
|
14
|
+
* collapses to a single hyphen, which keeps output inside the `site_routes`
|
|
15
|
+
* slug constraint `^[a-z0-9]+([a-z0-9\-/]*[a-z0-9])?$`.
|
|
16
|
+
*
|
|
17
|
+
* This is the single slug implementation for the monorepo: block-form and the
|
|
18
|
+
* shop admin catalog delegate here rather than keeping their own variants.
|
|
6
19
|
*
|
|
7
20
|
* @example
|
|
8
21
|
* slugify("Initial Consultation") // "initial-consultation"
|
|
9
|
-
* slugify("90-Minute Deep Tissue") // "90-minute-deep-tissue"
|
|
10
22
|
* slugify("Reiki & Energy Healing") // "reiki-energy-healing"
|
|
23
|
+
* slugify("Don't Stop") // "dont-stop"
|
|
24
|
+
* slugify("draft_post") // "draft-post"
|
|
25
|
+
* slugify("Blog / My Post", { preserveSegments: true }) // "blog/my-post"
|
|
11
26
|
*/
|
|
12
|
-
export declare function slugify(text: string): string;
|
|
27
|
+
export declare function slugify(text: string, options?: SlugifyOptions): string;
|
|
13
28
|
/**
|
|
14
29
|
* Generate a unique slug by appending a number if needed
|
|
15
30
|
*
|
|
@@ -15968,6 +15968,7 @@ export type Database = {
|
|
|
15968
15968
|
created_at: string;
|
|
15969
15969
|
footer_look_id: string | null;
|
|
15970
15970
|
header_layout_id: string;
|
|
15971
|
+
header_preferences: Json | null;
|
|
15971
15972
|
header_style_id: string;
|
|
15972
15973
|
id: string;
|
|
15973
15974
|
is_current: boolean;
|
|
@@ -15984,6 +15985,7 @@ export type Database = {
|
|
|
15984
15985
|
created_at?: string;
|
|
15985
15986
|
footer_look_id?: string | null;
|
|
15986
15987
|
header_layout_id: string;
|
|
15988
|
+
header_preferences?: Json | null;
|
|
15987
15989
|
header_style_id: string;
|
|
15988
15990
|
id?: string;
|
|
15989
15991
|
is_current?: boolean;
|
|
@@ -16000,6 +16002,7 @@ export type Database = {
|
|
|
16000
16002
|
created_at?: string;
|
|
16001
16003
|
footer_look_id?: string | null;
|
|
16002
16004
|
header_layout_id?: string;
|
|
16005
|
+
header_preferences?: Json | null;
|
|
16003
16006
|
header_style_id?: string;
|
|
16004
16007
|
id?: string;
|
|
16005
16008
|
is_current?: boolean;
|
|
@@ -18422,6 +18425,7 @@ export type Database = {
|
|
|
18422
18425
|
p_button_style_options: Json;
|
|
18423
18426
|
p_footer_look_id?: string;
|
|
18424
18427
|
p_header_layout_id: string;
|
|
18428
|
+
p_header_preferences?: Json;
|
|
18425
18429
|
p_header_style_id: string;
|
|
18426
18430
|
p_selection_id?: string;
|
|
18427
18431
|
p_site_id: string;
|
|
@@ -20282,6 +20286,7 @@ export type Database = {
|
|
|
20282
20286
|
p_button_style_options: Json;
|
|
20283
20287
|
p_footer_look_id?: string;
|
|
20284
20288
|
p_header_layout_id: string;
|
|
20289
|
+
p_header_preferences?: Json;
|
|
20285
20290
|
p_header_style_id: string;
|
|
20286
20291
|
p_site_id: string;
|
|
20287
20292
|
p_theme: Json;
|
|
@@ -20293,34 +20298,10 @@ export type Database = {
|
|
|
20293
20298
|
theme_id: string;
|
|
20294
20299
|
}[];
|
|
20295
20300
|
};
|
|
20296
|
-
|
|
20301
|
+
publish_authoritative_page_surface_v2: {
|
|
20297
20302
|
Args: {
|
|
20298
|
-
p_expected_draft_version_id: string;
|
|
20299
|
-
p_expected_published_version_id: string;
|
|
20300
|
-
p_expected_source_data: Json;
|
|
20301
|
-
p_expected_source_updated_at: string;
|
|
20302
|
-
p_expected_source_version_id: string;
|
|
20303
|
-
p_owner_id: string;
|
|
20304
|
-
p_owner_kind: Database["public"]["Enums"]["content_owner_kind"];
|
|
20305
|
-
p_published_data: Json;
|
|
20306
|
-
p_site_id: string;
|
|
20307
|
-
p_source_kind: string;
|
|
20308
|
-
p_user_id: string;
|
|
20309
|
-
};
|
|
20310
|
-
Returns: Json;
|
|
20311
|
-
};
|
|
20312
|
-
publish_authoritative_surface_slot_snapshot_guarded: {
|
|
20313
|
-
Args: {
|
|
20314
|
-
p_blocks: Json;
|
|
20315
|
-
p_expected_draft_version_id: string;
|
|
20316
|
-
p_expected_published_version_id: string;
|
|
20317
|
-
p_expected_source_data: Json;
|
|
20318
|
-
p_expected_source_updated_at: string;
|
|
20319
|
-
p_expected_source_version_id: string;
|
|
20320
20303
|
p_page_surface_id: string;
|
|
20321
20304
|
p_site_id: string;
|
|
20322
|
-
p_source_kind: string;
|
|
20323
|
-
p_surface_slot_id: string;
|
|
20324
20305
|
p_user_id: string;
|
|
20325
20306
|
};
|
|
20326
20307
|
Returns: Json;
|
|
@@ -20661,6 +20642,7 @@ export type Database = {
|
|
|
20661
20642
|
p_expected_selection_version: number;
|
|
20662
20643
|
p_footer_look_id?: string;
|
|
20663
20644
|
p_header_layout_id: string;
|
|
20645
|
+
p_header_preferences?: Json;
|
|
20664
20646
|
p_header_style_id: string;
|
|
20665
20647
|
p_selection_id?: string;
|
|
20666
20648
|
p_selection_overrides: Json;
|
|
@@ -21033,21 +21015,7 @@ export type Database = {
|
|
|
21033
21015
|
transition_outcome: string;
|
|
21034
21016
|
}[];
|
|
21035
21017
|
};
|
|
21036
|
-
|
|
21037
|
-
Args: {
|
|
21038
|
-
p_event_offering_id: string;
|
|
21039
|
-
p_event_series_id?: string;
|
|
21040
|
-
p_expected_archived_at: string;
|
|
21041
|
-
p_expected_series_status?: string;
|
|
21042
|
-
p_first_live_at?: string;
|
|
21043
|
-
p_next_archived_at: string;
|
|
21044
|
-
p_next_series_status?: string;
|
|
21045
|
-
p_site_id: string;
|
|
21046
|
-
p_update_archive?: boolean;
|
|
21047
|
-
};
|
|
21048
|
-
Returns: boolean;
|
|
21049
|
-
};
|
|
21050
|
-
transition_managed_event_availability_v2: {
|
|
21018
|
+
transition_managed_event_availability_v3: {
|
|
21051
21019
|
Args: {
|
|
21052
21020
|
p_command: Json;
|
|
21053
21021
|
p_event_offering_id: string;
|
|
@@ -6,3 +6,4 @@ export type { CamelizeKeys, CamelToSnake, DecamelizeKeys, DeepCamelizeKeys, Deep
|
|
|
6
6
|
export { createPatchApplier } from './utils/patch';
|
|
7
7
|
export * from './schemas/forms';
|
|
8
8
|
export * from './schemas/standard-contact';
|
|
9
|
+
export { escapePostgrestFilterValue } from './utils/postgrestFilter';
|
|
@@ -7,6 +7,7 @@ export type MediaUsageCheckResponseWithCounts = Readonly<{
|
|
|
7
7
|
export type BulkDeleteResultLike = Readonly<{
|
|
8
8
|
deleted: number;
|
|
9
9
|
failed: number;
|
|
10
|
+
warnings?: readonly unknown[];
|
|
10
11
|
}>;
|
|
11
12
|
export type BulkDeleteOptions = Readonly<{
|
|
12
13
|
deleteObjects?: boolean;
|
|
@@ -16,6 +17,9 @@ export declare const BULK_DELETE_IN_PROGRESS_MESSAGE = "Delete already in progre
|
|
|
16
17
|
export type BulkDeleteCompletionToast = Readonly<{
|
|
17
18
|
kind: 'success';
|
|
18
19
|
message: string;
|
|
20
|
+
}> | Readonly<{
|
|
21
|
+
kind: 'warning';
|
|
22
|
+
message: string;
|
|
19
23
|
}> | Readonly<{
|
|
20
24
|
kind: 'error';
|
|
21
25
|
message: string;
|
|
@@ -426,6 +426,8 @@ export declare const FILE_SIZE_LIMITS: {
|
|
|
426
426
|
readonly instagramZip: PositiveByteCount;
|
|
427
427
|
readonly bookingEvidence: PositiveByteCount;
|
|
428
428
|
};
|
|
429
|
+
/** Shared admission ceiling for SDK-management media uploads before intent-specific finalization. */
|
|
430
|
+
export declare const MAX_MANAGEMENT_MEDIA_UPLOAD_BYTES: PositiveByteCount;
|
|
429
431
|
export declare const DEFAULT_PRIVATE_FILE_SIGNED_URL_EXPIRY_SECONDS: PositiveSeconds;
|
|
430
432
|
export declare const MAX_SAFE_DOWNLOAD_FILENAME_LENGTH = 180;
|
|
431
433
|
export declare function asPositiveByteCount(value: number): Result<PositiveByteCount, 'not-positive-byte-count'>;
|
|
@@ -438,6 +440,7 @@ export declare function asSafeDownloadFilename(value: string): Result<SafeDownlo
|
|
|
438
440
|
export declare const parseSafeDownloadFilename: typeof asSafeDownloadFilename;
|
|
439
441
|
export declare function deriveUploadPolicy(actor: FileActor, intent: UploadIntent): Result<UploadPolicy, UploadPolicyError>;
|
|
440
442
|
export declare function classifyKnownMimeType(mimeType: string | DeclaredMimeType | DetectedMimeType | undefined | null): Result<FileKind, MimeTypeClassificationError>;
|
|
443
|
+
export declare function managementMediaLibraryUploadLimitForMimeType(mimeType: string | DeclaredMimeType | DetectedMimeType | undefined | null): Result<PositiveByteCount, MimeTypeClassificationError>;
|
|
441
444
|
export declare function isMimeTypeAllowedForPolicy(mimeType: string | DeclaredMimeType | DetectedMimeType | undefined | null, policy: UploadPolicy): boolean;
|
|
442
445
|
export declare function isFileKindAllowed(kind: FileKind, policy: UploadPolicy): boolean;
|
|
443
446
|
export declare function isFileUseAllowed(requestedUse: FileUse, allowedUses: NonEmptyArray<FileUse>): boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PageRenderer } from '../../../../blocks/src/index';
|
|
1
|
+
import { EditorPageRenderer as PageRenderer } from '../../../../blocks/src/index';
|
|
2
2
|
import type { ApiClient as DashboardApiClient } from '../../../../api/src/request';
|
|
3
3
|
import React, { type ComponentProps } from 'react';
|
|
4
4
|
type PageRendererProps = ComponentProps<typeof PageRenderer>;
|
|
@@ -52,6 +52,7 @@ type PreviewShellCommonProps = {
|
|
|
52
52
|
*/
|
|
53
53
|
themeSelectionButtonStyleSelection?: ButtonStyleSelection | null;
|
|
54
54
|
themeSelectionButtonStyleRepairs?: readonly ButtonStyleSelectionRepair[];
|
|
55
|
+
themeSelectionHeaderPreferences?: import('../../../../theme-core/src/site-styles/index').HeaderPreferences | null;
|
|
55
56
|
themeSelectionHeaderSelection?: HeaderLayoutStyleSelection | null;
|
|
56
57
|
themeSelectionFooterLookId?: FooterLookId | null;
|
|
57
58
|
themeSelectionHeaderLogo?: HeaderLogoContext;
|
|
@@ -28,6 +28,7 @@ type PreviewShellLayoutCommonProps = {
|
|
|
28
28
|
themeSelectionUpdatedAt?: string | null;
|
|
29
29
|
themeSelectionButtonStyleSelection?: ButtonStyleSelection | null;
|
|
30
30
|
themeSelectionButtonStyleRepairs?: readonly ButtonStyleSelectionRepair[];
|
|
31
|
+
themeSelectionHeaderPreferences?: import('../../../../theme-core/src/site-styles/index').HeaderPreferences | null;
|
|
31
32
|
themeSelectionHeaderSelection?: HeaderLayoutStyleSelection | null;
|
|
32
33
|
themeSelectionFooterLookId?: FooterLookId | null;
|
|
33
34
|
themeSelectionHeaderLogo?: HeaderLogoContext;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { type ReactNode } from 'react';
|
|
2
2
|
import { type ApiClient } from '../../../../api/src/request';
|
|
3
3
|
import type { Theme } from '../../../../blocks/src/index';
|
|
4
|
-
import type { BrandDisplayMode, HeaderNavFontSizePreference, HeaderNavTypographyPreference, HeaderInteractionPalettePreference, HeaderLogoContext, LogoSizePolicy, SiteChromeBackgroundOverride } from '../../../../theme-core/src/site-styles/index';
|
|
4
|
+
import type { BrandDisplayMode, HeaderNavFontSizePreference, HeaderPreferences, HeaderNavTypographyPreference, HeaderInteractionPalettePreference, HeaderLogoContext, LogoSizePolicy, SiteChromeBackgroundOverride } from '../../../../theme-core/src/site-styles/index';
|
|
5
5
|
import { type StyleConfiguratorHistoryEntry } from './StyleConfigurator.state';
|
|
6
6
|
import type { SiteStyleAccess } from './siteStyleAccess';
|
|
7
7
|
import { type StyleConfiguratorInitialSelections } from './styleConfiguratorSnapshot';
|
|
@@ -63,6 +63,7 @@ export type SiteChromeCustomizeProviderProps = Readonly<{
|
|
|
63
63
|
siteId: string;
|
|
64
64
|
apiClient: ApiClient;
|
|
65
65
|
theme?: Theme | null;
|
|
66
|
+
headerPreferences?: HeaderPreferences | null;
|
|
66
67
|
themeId?: string | null;
|
|
67
68
|
selectionId?: string | null;
|
|
68
69
|
selectionVersion?: number | null;
|
|
@@ -72,5 +73,5 @@ export type SiteChromeCustomizeProviderProps = Readonly<{
|
|
|
72
73
|
siteStyleAccess?: SiteStyleAccess;
|
|
73
74
|
canOpenDesignEditor?: boolean;
|
|
74
75
|
}>;
|
|
75
|
-
export declare function SiteChromeCustomizeProvider({ children, siteId, apiClient, theme, themeId, selectionId, selectionVersion, selectionUpdatedAt, initialSelections, headerLogoContext, siteStyleAccess, canOpenDesignEditor, }: SiteChromeCustomizeProviderProps): React.JSX.Element;
|
|
76
|
+
export declare function SiteChromeCustomizeProvider({ children, siteId, apiClient, theme, headerPreferences, themeId, selectionId, selectionVersion, selectionUpdatedAt, initialSelections, headerLogoContext, siteStyleAccess, canOpenDesignEditor, }: SiteChromeCustomizeProviderProps): React.JSX.Element;
|
|
76
77
|
export declare function useSiteChromeCustomizeOptional(): SiteChromeCustomizeContextValue | null;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import type { Theme } from '../../../../theme-core/src/data';
|
|
1
2
|
import type { HeaderInteractionPalettePreference, HeaderStyleId } from '../../../../theme-core/src/site-styles/index';
|
|
2
3
|
import { resolveHeaderInteractionPaletteControl } from '../../../../theme-core/src/site-styles/index';
|
|
3
4
|
type HeaderInteractionPaletteSurfaceState = Readonly<{
|
|
4
5
|
interactionPalette: ReturnType<typeof resolveHeaderInteractionPaletteControl>;
|
|
5
6
|
diagnostics: readonly string[];
|
|
6
7
|
}>;
|
|
7
|
-
export declare function headerInteractionPaletteSurfaceState(styleId: HeaderStyleId, preference: HeaderInteractionPalettePreference): HeaderInteractionPaletteSurfaceState;
|
|
8
|
+
export declare function headerInteractionPaletteSurfaceState(styleId: HeaderStyleId, preference: HeaderInteractionPalettePreference, theme: Pick<Theme, 'siteStyleId'> | null): HeaderInteractionPaletteSurfaceState;
|
|
8
9
|
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Theme } from '../../../../blocks/src/index';
|
|
2
2
|
import type { BrandDisplayMode, HeaderBrandPreferences, HeaderLogoContext, LogoSizePolicy } from '../../../../theme-core/src/site-styles/index';
|
|
3
|
+
export { withHeaderBrandThemePreferences } from '../../../../theme-core/src/site-styles/index';
|
|
3
4
|
export type { HeaderBrandPreferences } from '../../../../theme-core/src/site-styles/index';
|
|
4
5
|
export type HeaderBrandDisplayOption = Readonly<{
|
|
5
6
|
value: BrandDisplayMode;
|
|
@@ -36,6 +37,5 @@ export declare function createHeaderBrandControlStateFromPreferences({ preferenc
|
|
|
36
37
|
}): HeaderBrandControlState;
|
|
37
38
|
export declare function readHeaderBrandPreferences(theme: Theme | null): HeaderBrandPreferences;
|
|
38
39
|
export declare function normalizeHeaderBrandPreferences(preferences: HeaderBrandPreferences, hasLogo: boolean): HeaderBrandPreferences;
|
|
39
|
-
export declare function withHeaderBrandThemePreferences(theme: Theme, preferences: HeaderBrandPreferences): Theme;
|
|
40
40
|
export declare function withHeaderBrandPreferences(context: HeaderLogoContext | undefined, preferences: HeaderBrandPreferences): HeaderLogoContext | undefined;
|
|
41
41
|
export declare function hasLogoInHeaderLogoContext(context: HeaderLogoContext | undefined): boolean;
|
|
@@ -70,6 +70,8 @@ export type SiteChromeQuickControlReplayPlan = Readonly<{
|
|
|
70
70
|
preferences: HeaderNavPreferences;
|
|
71
71
|
}> | Readonly<{
|
|
72
72
|
kind: 'background-preferences';
|
|
73
|
+
/** Which surface's background this replays — the save needs it (#1318 Phase 4d). */
|
|
74
|
+
surface: 'header' | 'footer';
|
|
73
75
|
preferences: SiteChromeBackgroundPreferences;
|
|
74
76
|
}>;
|
|
75
77
|
export type SiteChromeQuickControlHistoryMutation = Readonly<{
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { HeaderNavPreferences, SiteChromeBackgroundPreferences } from '../../../../theme-core/src/site-styles/index';
|
|
2
|
+
import type { SelectionSnapshot } from './StyleConfigurator.state';
|
|
3
|
+
import type { SiteChromeEditableSurfaceKind } from './SiteChromeEditableSurface';
|
|
4
|
+
import type { HeaderBrandPreferences } from './siteChromeBrandPreferences';
|
|
5
|
+
import { type SiteChromeQuickControlBackgroundTarget, type SiteChromeQuickControlBrandTarget, type SiteChromeQuickControlHistoryMutation, type SiteChromeQuickControlNavTarget, type SiteChromeQuickControlReplayPlan, type SiteChromeQuickControlSelectionTarget } from './siteChromeQuickControlHistoryState';
|
|
6
|
+
export type SiteChromeQuickControlPendingMutation = Extract<SiteChromeQuickControlHistoryMutation, {
|
|
7
|
+
kind: 'undoing' | 'redoing';
|
|
8
|
+
}>;
|
|
9
|
+
type ConfirmMutation = Readonly<{
|
|
10
|
+
kind: 'confirm-mutation';
|
|
11
|
+
mutation: SiteChromeQuickControlPendingMutation;
|
|
12
|
+
}>;
|
|
13
|
+
type History<TTarget> = ConfirmMutation | Readonly<{
|
|
14
|
+
kind: 'record';
|
|
15
|
+
target: TTarget;
|
|
16
|
+
}>;
|
|
17
|
+
/**
|
|
18
|
+
* What one quick-control save is asking for.
|
|
19
|
+
*
|
|
20
|
+
* `surface` travels with the requests that can name one. It has to, from
|
|
21
|
+
* #1318 Phase 4d: a header save carries no theme any more, so a footer
|
|
22
|
+
* background change sent under the header surface would have nowhere to be
|
|
23
|
+
* written.
|
|
24
|
+
*/
|
|
25
|
+
export type SiteChromeQuickControlSaveRequest = Readonly<{
|
|
26
|
+
kind: 'selection';
|
|
27
|
+
surface: SiteChromeEditableSurfaceKind;
|
|
28
|
+
selection: SelectionSnapshot;
|
|
29
|
+
history: History<SiteChromeQuickControlSelectionTarget>;
|
|
30
|
+
}> | Readonly<{
|
|
31
|
+
kind: 'brand-preferences';
|
|
32
|
+
preferences: HeaderBrandPreferences;
|
|
33
|
+
history: History<SiteChromeQuickControlBrandTarget>;
|
|
34
|
+
}> | Readonly<{
|
|
35
|
+
kind: 'background-preferences';
|
|
36
|
+
surface: SiteChromeEditableSurfaceKind;
|
|
37
|
+
preferences: SiteChromeBackgroundPreferences;
|
|
38
|
+
history: History<SiteChromeQuickControlBackgroundTarget>;
|
|
39
|
+
}> | Readonly<{
|
|
40
|
+
kind: 'nav-preferences';
|
|
41
|
+
preferences: HeaderNavPreferences;
|
|
42
|
+
history: History<SiteChromeQuickControlNavTarget>;
|
|
43
|
+
}>;
|
|
44
|
+
/**
|
|
45
|
+
* Which surface a save is for. Selection and background changes name their own;
|
|
46
|
+
* the brand and nav controls only ever edit the header.
|
|
47
|
+
*/
|
|
48
|
+
export declare function saveRequestSurface(request: SiteChromeQuickControlSaveRequest): SiteChromeEditableSurfaceKind;
|
|
49
|
+
/** Replaying an undo or redo is the same save, with a confirmation attached. */
|
|
50
|
+
export declare function saveRequestFromQuickControlReplayPlan(plan: SiteChromeQuickControlReplayPlan, mutation: SiteChromeQuickControlPendingMutation): SiteChromeQuickControlSaveRequest;
|
|
51
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { APIEndpoints } from '../../../../api/src/index';
|
|
2
2
|
import type { Theme } from '../../../../blocks/src/index';
|
|
3
|
-
import type { HeaderNavPreferences, HeaderLogoContext, SiteChromeBackgroundPreferences } from '../../../../theme-core/src/site-styles/index';
|
|
3
|
+
import type { HeaderNavPreferences, HeaderLogoContext, HeaderPreferences, SiteChromeBackgroundPreferences } from '../../../../theme-core/src/site-styles/index';
|
|
4
4
|
import type { CuratedSiteStyle } from '../../../../theme-core/src/site-styles/previewCompiler';
|
|
5
5
|
import type { SelectionSnapshot } from './StyleConfigurator.state';
|
|
6
6
|
import { type SiteStylePreviewPlan } from './siteStylePreviewPlanner';
|
|
@@ -25,8 +25,30 @@ export type BuildSiteChromeSavePlanInput = Readonly<{
|
|
|
25
25
|
themeId: string | null;
|
|
26
26
|
selectionId: string | null;
|
|
27
27
|
baseSelectionUpdatedAt: string | null;
|
|
28
|
+
/** Persisted intent, including the structural fields quick controls cannot edit. */
|
|
29
|
+
persistedHeaderPreferences: HeaderPreferences;
|
|
28
30
|
}>;
|
|
29
|
-
export declare function buildSiteChromeSavePlan({ surface, siteStyle, selection, baseTheme, headerLogoContext, headerBrandPreferences, headerNavPreferences, backgroundPreferences, themeId, selectionId, baseSelectionUpdatedAt, }: BuildSiteChromeSavePlanInput): SiteChromeSavePlan;
|
|
31
|
+
export declare function buildSiteChromeSavePlan({ surface, siteStyle, selection, baseTheme, headerLogoContext, headerBrandPreferences, headerNavPreferences, backgroundPreferences, themeId, selectionId, baseSelectionUpdatedAt, persistedHeaderPreferences, }: BuildSiteChromeSavePlanInput): SiteChromeSavePlan;
|
|
32
|
+
/**
|
|
33
|
+
* The nav half of the record the server persisted, read back rather than
|
|
34
|
+
* re-derived from the saved bytes. The theme is compiled output from 4b
|
|
35
|
+
* onward; the record is the intent, so it is the better answer to "what is the
|
|
36
|
+
* control set to". Falls back to the bytes while the column is still absent on
|
|
37
|
+
* a row the Phase 4c backfill has not reached.
|
|
38
|
+
*/
|
|
39
|
+
export declare function headerNavPreferencesFromSiteChromeSaveResponse(saved: SaveSiteChromeSelectionResponse): HeaderNavPreferences;
|
|
40
|
+
/**
|
|
41
|
+
* The header half comes from the persisted record; the footer half has no
|
|
42
|
+
* entry in `HeaderPreferences` and stays derived from the saved theme.
|
|
43
|
+
*/
|
|
44
|
+
export declare function backgroundPreferencesFromSiteChromeSaveResponse(saved: SaveSiteChromeSelectionResponse): SiteChromeBackgroundPreferences;
|
|
45
|
+
/**
|
|
46
|
+
* The brand half of the record the server persisted. Same rule as the nav and
|
|
47
|
+
* background halves: the record is the intent, the saved theme is compiled
|
|
48
|
+
* output, so the controls read the record when there is one and fall back to
|
|
49
|
+
* the bytes while the Phase 4c backfill is outstanding.
|
|
50
|
+
*/
|
|
51
|
+
export declare function headerBrandPreferencesFromSiteChromeSaveResponse(saved: SaveSiteChromeSelectionResponse, headerLogoContext: HeaderLogoContext | undefined): HeaderBrandPreferences;
|
|
30
52
|
export declare function siteChromeSavePlanBodyForBaseRevision(plan: SiteChromeSavePlan, baseSelectionUpdatedAt: string | null): SaveSiteChromeSelectionBody;
|
|
31
53
|
export declare function selectionSnapshotFromSiteChromeSaveResponse({ saved, fallback, savePlan, }: Readonly<{
|
|
32
54
|
saved: SaveSiteChromeSelectionResponse;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Theme } from '../../../../blocks/src/index';
|
|
2
2
|
import { type ButtonStyleSelection } from '../../../../theme-core/src/buttons/index';
|
|
3
|
-
import type { FooterLookId, HeaderLayoutId, HeaderLogoContext, HeaderStyleId, SiteChromeSurface } from '../../../../theme-core/src/site-styles/index';
|
|
3
|
+
import type { HeaderBrandPresentationPreference, FooterLookId, HeaderLayoutId, HeaderLogoContext, HeaderStyleId, SiteChromeSurface } from '../../../../theme-core/src/site-styles/index';
|
|
4
4
|
import { type CuratedSiteStyle, type SelectionFallbackWarning, type SiteThemeSelectionsResult, type SiteStyleId } from '../../../../theme-core/src/site-styles/previewCompiler';
|
|
5
5
|
export type SiteStylePreviewSelection = Readonly<{
|
|
6
6
|
siteStyleId: SiteStyleId;
|
|
@@ -20,6 +20,16 @@ type SiteStylePreviewPlanCommonInput = Readonly<{
|
|
|
20
20
|
siteStyle: CuratedSiteStyle;
|
|
21
21
|
selection: SiteStylePreviewSelection;
|
|
22
22
|
headerLogoContext?: HeaderLogoContext;
|
|
23
|
+
/**
|
|
24
|
+
* The row's brand-presentation mode, which the preview must honour or it
|
|
25
|
+
* renders a treatment the save will not persist (#1318 D24).
|
|
26
|
+
*
|
|
27
|
+
* Required, with no default, so a caller that does not hold the record has to
|
|
28
|
+
* say `'recommended'` in its own source rather than inherit it invisibly.
|
|
29
|
+
* That is the difference between a stated assumption and a silent one, and
|
|
30
|
+
* the assumption is wrong for exactly the rows D24 exists for.
|
|
31
|
+
*/
|
|
32
|
+
headerBrandPresentation: HeaderBrandPresentationPreference;
|
|
23
33
|
}>;
|
|
24
34
|
export type SiteStylePreviewPlanInput = SiteStylePreviewPlanCommonInput & (Readonly<{
|
|
25
35
|
compilation: Readonly<{
|
|
@@ -42,4 +52,16 @@ export declare function deriveSiteStylePreviewUpdate(baseTheme: Theme | null | u
|
|
|
42
52
|
kind: 'derive-update';
|
|
43
53
|
}>;
|
|
44
54
|
export declare function planSiteStylePreviewChange(input: SiteStylePreviewPlanInput): SiteStylePreviewPlan;
|
|
55
|
+
/**
|
|
56
|
+
* The configurator's previews, with the one assumption they make written down
|
|
57
|
+
* once instead of four times.
|
|
58
|
+
*
|
|
59
|
+
* `planSiteStylePreviewChange` requires the brand-presentation mode (#1318 D24)
|
|
60
|
+
* so that no caller inherits it invisibly. Nothing hands the site-style
|
|
61
|
+
* configurator the row's persisted record yet, so it states `'recommended'` —
|
|
62
|
+
* correct for every row except a `'plain'` one, where the preview is a round
|
|
63
|
+
* trip behind until the first save teaches it otherwise. The plan's closing
|
|
64
|
+
* checklist has what closing that costs.
|
|
65
|
+
*/
|
|
66
|
+
export declare function planConfiguratorPreview(input: SiteStylePreviewPlanInput extends infer TInput ? TInput extends unknown ? Omit<TInput, 'headerBrandPresentation'> : never : never): SiteStylePreviewPlan;
|
|
45
67
|
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type RefObject } from 'react';
|
|
2
|
+
import type { Theme } from '../../../../blocks/src/index';
|
|
3
|
+
import { type HeaderLogoContext, type HeaderPreferences } from '../../../../theme-core/src/site-styles/index';
|
|
4
|
+
import type { SelectionSnapshot } from './StyleConfigurator.state';
|
|
5
|
+
import type { SiteChromeCustomizeProviderProps } from './SiteChromeCustomizeContext';
|
|
6
|
+
/** Keep the row-owned intent across optimistic edits and server responses. */
|
|
7
|
+
export declare function usePersistedHeaderPreferences(stored: HeaderPreferences | null, theme: Theme | null | undefined, selection: SelectionSnapshot | null, logo: HeaderLogoContext | undefined): RefObject<HeaderPreferences>;
|
|
8
|
+
export declare function useSiteChromeInitialSnapshot({ theme, initialSelections, selectionVersion, selectionUpdatedAt, headerLogoContext, }: Pick<SiteChromeCustomizeProviderProps, 'theme' | 'initialSelections' | 'selectionVersion' | 'selectionUpdatedAt' | 'headerLogoContext'>): SelectionSnapshot | null;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type SupportedLoaderEndpoint } from '../../../blocks/src/system/data/index';
|
|
2
|
+
export declare function shouldWrite(cacheEnabled: boolean, force: boolean | undefined): boolean;
|
|
3
|
+
export declare function liveLoaderOptions(endpoint: SupportedLoaderEndpoint, signal: AbortSignal | undefined): Readonly<{
|
|
4
|
+
force: boolean;
|
|
5
|
+
signal: AbortSignal | undefined;
|
|
6
|
+
}>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { AddressedLocationValue, BookingConsent, BusinessAddress } from '../../../core/src/index';
|
|
2
2
|
import type { ResolvedInternalLinkEntityType } from '../../../blocks/src/index';
|
|
3
|
-
import type { APIEndpoints, RoutableContentItem as ApiRoutableContentItem, SdkRuntimePageSurfaceSubject as ApiSdkRuntimePageSurfaceSubject, SiteBySlugResponse as ApiSiteBySlugResponse, SiteBookingOfferingPresetSummary as ApiSiteBookingOfferingPresetSummary } from '../../../api/src/index';
|
|
3
|
+
import type { APIEndpoints, RoutableContentItem as ApiRoutableContentItem, SdkRuntimePageSurfaceSubject as ApiSdkRuntimePageSurfaceSubject, SiteBySlugResponse as ApiSiteBySlugResponse, SiteBookingOfferingPresetSummary as ApiSiteBookingOfferingPresetSummary, SdkBlockContentAdmission } from '../../../api/src/index';
|
|
4
4
|
import type { MediaAssetIndexItem, SiteFooterContent, SiteHeaderContent } from '../contracts';
|
|
5
5
|
import type { CompiledBoundaryRuntime } from '../../../theme-core/src/site-styles/index';
|
|
6
6
|
import type { BlockFieldConfig as SdkBlockFieldConfig, BlockFieldOptionsMap as SdkBlockFieldOptionsMap, ContentConfig as SdkContentConfig, ContainerOptionsConfig as SdkContainerOptionsConfig, FieldSelectOption as SdkFieldSelectOption, SdkCustomBlock, SdkThemeConfig, SdkThemePalette, SectionBackground as SdkSectionBackground, SectionOptionsConfig as SdkSectionOptionsConfig, SiteStyleConfig as SdkSiteStyleConfig } from '../config/types';
|
|
@@ -270,7 +270,8 @@ export type SiteRouteRecord = {
|
|
|
270
270
|
publishedAt?: string | null;
|
|
271
271
|
};
|
|
272
272
|
export type SiteBookingOfferingPresetSummary = ApiSiteBookingOfferingPresetSummary;
|
|
273
|
-
|
|
273
|
+
/** Keep the SDK's selection metadata aligned with the runtime response. */
|
|
274
|
+
type SiteSelectionResponse = Pick<ApiSiteBySlugResponse, 'theme' | 'themeId' | Extract<keyof ApiSiteBySlugResponse, `selection${string}`>>;
|
|
274
275
|
export type SiteResponse = SiteSelectionResponse & {
|
|
275
276
|
site: {
|
|
276
277
|
id: string;
|
|
@@ -295,6 +296,7 @@ export type SiteResponse = SiteSelectionResponse & {
|
|
|
295
296
|
portalEnabled?: boolean;
|
|
296
297
|
commerceEnabled?: boolean;
|
|
297
298
|
bookingOfferingPresets?: readonly SiteBookingOfferingPresetSummary[];
|
|
299
|
+
bookingTimeZone?: string;
|
|
298
300
|
analytics?: SiteAnalyticsSettingsPayload;
|
|
299
301
|
privacyPolicy?: SiteRuntimePrivacyPolicy;
|
|
300
302
|
routes: Record<string, SiteRouteRecord>;
|
|
@@ -337,6 +339,7 @@ export type SdkRuntimePage = {
|
|
|
337
339
|
kind: string;
|
|
338
340
|
purpose?: string;
|
|
339
341
|
content: Record<string, unknown>;
|
|
342
|
+
admission?: SdkBlockContentAdmission;
|
|
340
343
|
}>;
|
|
341
344
|
runtimeBoundaries?: readonly CompiledBoundaryRuntime<string>[];
|
|
342
345
|
};
|
|
@@ -361,6 +364,7 @@ export type SdkEntrySlotContent = {
|
|
|
361
364
|
purpose: string;
|
|
362
365
|
orderIndex?: number | null;
|
|
363
366
|
content: Record<string, unknown> | null;
|
|
367
|
+
admission?: SdkBlockContentAdmission;
|
|
364
368
|
}>;
|
|
365
369
|
};
|
|
366
370
|
export type SdkSurfaceSlotContent = {
|
|
@@ -380,6 +384,7 @@ export type SdkSurfaceSlotContent = {
|
|
|
380
384
|
publishedContent?: unknown;
|
|
381
385
|
draftContentId?: string | null;
|
|
382
386
|
publishedContentId?: string | null;
|
|
387
|
+
admission?: SdkBlockContentAdmission;
|
|
383
388
|
}>;
|
|
384
389
|
};
|
|
385
390
|
export type SdkRuntimePageSurfaceSubject = ApiSdkRuntimePageSurfaceSubject;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import type { RenderablePageOutline as BlocksRenderablePageOutline } from '../../../blocks/src/index';
|
|
2
3
|
import type { EntrySubrouteContextData, MediaAssetIndexItem, OccurrenceContextData, PageOutline, PageRuntimeBoundary, ResolveImageUrlContextInput, RouteMap, Theme, ThemeTokens } from '../contracts';
|
|
3
4
|
import type { SdkCustomBlock } from '../config/types';
|
|
4
5
|
import type { BlockOverrides } from './overrides';
|
|
@@ -6,6 +7,7 @@ import type { SiteBookingOfferingPresetSummary } from '../public-api/contracts';
|
|
|
6
7
|
import { type BlocksImageResolveContextInput, type BlocksMediaAssetIndexItem } from './mediaAssets';
|
|
7
8
|
import type { EventPageSurfaceSubjectWire } from '../../../core/src/index';
|
|
8
9
|
export type ComponentRegistry = Record<string, React.ElementType>;
|
|
10
|
+
export type RenderablePageOutline = BlocksRenderablePageOutline;
|
|
9
11
|
export type MissingBlockOverrideError = Error & Readonly<{
|
|
10
12
|
code: 'missing_block_override';
|
|
11
13
|
blockKind: string;
|
|
@@ -20,6 +22,7 @@ export type PageRendererDataContext = {
|
|
|
20
22
|
pageId?: string;
|
|
21
23
|
resolvedData?: Record<string, Record<string, unknown>>;
|
|
22
24
|
bookingOfferingPresets?: readonly SiteBookingOfferingPresetSummary[];
|
|
25
|
+
bookingTimeZone?: string;
|
|
23
26
|
previewStage?: 'published' | 'preview';
|
|
24
27
|
routes?: RouteMap;
|
|
25
28
|
pagesByIdentifier?: Record<string, string>;
|
|
@@ -45,10 +48,9 @@ export type BlocksPageRendererDataContext = Omit<PageRendererDataContext, 'media
|
|
|
45
48
|
export type SdkConfigForRenderer = {
|
|
46
49
|
customBlocks?: SdkCustomBlock[];
|
|
47
50
|
};
|
|
48
|
-
type PageRendererCommonProps = {
|
|
49
|
-
page:
|
|
51
|
+
type PageRendererCommonProps<TPage> = {
|
|
52
|
+
page: TPage | null;
|
|
50
53
|
runtimeBoundaries?: readonly PageRuntimeBoundary[];
|
|
51
|
-
usePlaceholders?: boolean;
|
|
52
54
|
dataContext?: PageRendererDataContext;
|
|
53
55
|
routeMap?: RouteMap;
|
|
54
56
|
wrapBlock?: (blockId: string, rendered: React.ReactNode) => React.ReactNode;
|
|
@@ -57,12 +59,12 @@ type PageRendererCommonProps = {
|
|
|
57
59
|
sdkConfig?: SdkConfigForRenderer | null;
|
|
58
60
|
customBlocks?: SdkCustomBlock[];
|
|
59
61
|
};
|
|
60
|
-
type ThemedPageRendererProps = PageRendererCommonProps & {
|
|
62
|
+
type ThemedPageRendererProps<TPage> = PageRendererCommonProps<TPage> & {
|
|
61
63
|
rendering?: never;
|
|
62
64
|
theme: Theme;
|
|
63
65
|
themeTokens?: ThemeTokens;
|
|
64
66
|
};
|
|
65
|
-
type OverrideOnlyPageRendererProps = PageRendererCommonProps & {
|
|
67
|
+
type OverrideOnlyPageRendererProps<TPage> = PageRendererCommonProps<TPage> & {
|
|
66
68
|
rendering: {
|
|
67
69
|
kind: 'overrides-only';
|
|
68
70
|
};
|
|
@@ -70,7 +72,9 @@ type OverrideOnlyPageRendererProps = PageRendererCommonProps & {
|
|
|
70
72
|
themeTokens?: never;
|
|
71
73
|
blockOverrides: BlockOverrides;
|
|
72
74
|
};
|
|
73
|
-
export type PageRendererProps = ThemedPageRendererProps | OverrideOnlyPageRendererProps
|
|
75
|
+
export type PageRendererProps = ThemedPageRendererProps<BlocksRenderablePageOutline> | OverrideOnlyPageRendererProps<BlocksRenderablePageOutline>;
|
|
76
|
+
export type EditorPageRendererProps = ThemedPageRendererProps<PageOutline> | OverrideOnlyPageRendererProps<PageOutline>;
|
|
74
77
|
export declare function toBlocksPageRendererDataContext(dataContext: PageRendererDataContext): BlocksPageRendererDataContext;
|
|
75
78
|
export declare function PageRenderer(props: PageRendererProps): React.ReactElement;
|
|
79
|
+
export declare function EditorPageRenderer(props: EditorPageRendererProps): React.ReactElement;
|
|
76
80
|
export {};
|
|
@@ -43,7 +43,6 @@ type BlockCommonProps = {
|
|
|
43
43
|
pageId?: string;
|
|
44
44
|
previewStage?: 'published' | 'preview';
|
|
45
45
|
client?: RiverbankClient;
|
|
46
|
-
usePlaceholders?: boolean;
|
|
47
46
|
/**
|
|
48
47
|
* Custom component to override default block rendering. When provided, renders
|
|
49
48
|
* this component instead of the manifest-based default. Override components
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import type { ReactElement } from 'react';
|
|
2
|
-
import type { EntrySubrouteContextData, MediaAssetIndexItem, OccurrenceContextData,
|
|
2
|
+
import type { EntrySubrouteContextData, MediaAssetIndexItem, OccurrenceContextData, PageRuntimeBoundary, RouteMap, Theme, ThemeTokens } from '../../contracts';
|
|
3
3
|
import type { ResolvedBlockData } from '../../data';
|
|
4
4
|
import type { SiteBookingOfferingPresetSummary } from '../../public-api/contracts';
|
|
5
5
|
import type { RuntimeSdkConfig } from '../helpers/loadPage';
|
|
6
|
-
import { type ComponentRegistry } from '../blocks-page-renderer';
|
|
6
|
+
import { type ComponentRegistry, type RenderablePageOutline } from '../blocks-page-renderer';
|
|
7
7
|
import { type SdkThemeRuntime } from '../themeRuntime';
|
|
8
8
|
import type { BlockOverrides } from '../overrides';
|
|
9
9
|
import type { SdkCustomBlock } from '../../config/types';
|
|
10
10
|
import type { SdkRenderingMode } from '../renderingMode';
|
|
11
11
|
type PageCommonProps = {
|
|
12
|
-
page:
|
|
12
|
+
page: RenderablePageOutline;
|
|
13
13
|
runtimeBoundaries?: readonly PageRuntimeBoundary[];
|
|
14
14
|
siteId: string;
|
|
15
15
|
resolvedData?: ResolvedBlockData;
|
|
16
16
|
bookingOfferingPresets?: readonly SiteBookingOfferingPresetSummary[];
|
|
17
|
+
bookingTimeZone?: string;
|
|
17
18
|
routeMap?: RouteMap;
|
|
18
19
|
/** Page identifier to routeId lookup for { kind: 'page' } CTA links */
|
|
19
20
|
pagesByIdentifier?: Record<string, string>;
|
|
@@ -75,7 +76,6 @@ type PageCommonProps = {
|
|
|
75
76
|
};
|
|
76
77
|
wrapBlock?: (blockId: string, rendered: React.ReactNode) => React.ReactNode;
|
|
77
78
|
registry?: ComponentRegistry;
|
|
78
|
-
usePlaceholders?: boolean;
|
|
79
79
|
/**
|
|
80
80
|
* Custom components to override default block rendering.
|
|
81
81
|
* Keys can be full block kind ("block.hero") or short form ("hero").
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { SiteResponse } from '../../client/types';
|
|
2
|
+
import type { SiteFooterBlock } from '../../public-api/contracts';
|
|
3
|
+
export declare function buildFooterRenderablePageOutline(siteData: SiteResponse, blocks: readonly SiteFooterBlock[]): import("../../../../blocks/src/index").RenderablePageOutline;
|
|
@@ -111,6 +111,7 @@ export type PageContentResult = {
|
|
|
111
111
|
resolvedData: ResolvedBlockData;
|
|
112
112
|
/** Selected booking offering presets exposed to SSR blocks. */
|
|
113
113
|
bookingOfferingPresets?: PageProps['bookingOfferingPresets'];
|
|
114
|
+
bookingTimeZone?: string;
|
|
114
115
|
/** Site data for metadata generation */
|
|
115
116
|
site: SiteData;
|
|
116
117
|
/**
|
|
@@ -146,6 +147,7 @@ export type EntryContentResult = {
|
|
|
146
147
|
resolvedData: ResolvedBlockData;
|
|
147
148
|
/** Selected booking offering presets exposed to SSR blocks. */
|
|
148
149
|
bookingOfferingPresets?: PageProps['bookingOfferingPresets'];
|
|
150
|
+
bookingTimeZone?: string;
|
|
149
151
|
/** Data context for template blocks (includes entry content for bindings) */
|
|
150
152
|
dataContext: {
|
|
151
153
|
contentEntry: Record<string, unknown>;
|
|
@@ -209,6 +211,7 @@ export type PageSurfaceContentResult = {
|
|
|
209
211
|
templatePage: PageProps['page'] | null;
|
|
210
212
|
resolvedData: ResolvedBlockData;
|
|
211
213
|
bookingOfferingPresets?: PageProps['bookingOfferingPresets'];
|
|
214
|
+
bookingTimeZone?: string;
|
|
212
215
|
dataContext: {
|
|
213
216
|
pageSurface: Record<string, unknown>;
|
|
214
217
|
subject: PageSurfaceContentData['subject'];
|
|
@@ -79,7 +79,7 @@ export type LoadPageParams = {
|
|
|
79
79
|
*/
|
|
80
80
|
searchParams?: DataLoaderSearchParams;
|
|
81
81
|
};
|
|
82
|
-
export type LoadPageResult = Omit<PageProps, 'registry' | 'wrapBlock' | '
|
|
82
|
+
export type LoadPageResult = Omit<PageProps, 'registry' | 'wrapBlock' | 'blockOverrides' | 'sdkConfig'> & {
|
|
83
83
|
/**
|
|
84
84
|
* SDK site configuration, if available.
|
|
85
85
|
* Contains SDK-defined theme palette, section backgrounds, and style options.
|