@riverbankcms/sdk 0.136.0 → 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 +101 -0
- package/dist/{PreviewEditorSidebar-BU5ZlhQR.mjs → PreviewEditorSidebar-Bn6cONPa.mjs} +8 -8
- package/dist/{PreviewEditorUI-9XkHL-bC.mjs → PreviewEditorUI-LAwXZPSx.mjs} +3 -3
- package/dist/{PreviewQueryProvider-wbEpXryy.mjs → PreviewQueryProvider-ztQUdsNo.mjs} +1 -1
- package/dist/{SdkPreviewModeRuntime-CnWmj-2B.mjs → SdkPreviewModeRuntime-BbbGsI_v.mjs} +596 -164
- package/dist/{SiteChromeCustomizeContext-B6d5zkog.mjs → SiteChromeCustomizeContext-BbkNSt5a.mjs} +2888 -1404
- package/dist/_dts/ai/src/contracts/proposals.d.ts +12 -298
- package/dist/_dts/ai/src/contracts/siteStyleProposalSchemas.d.ts +21 -14
- 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 +1 -4
- package/dist/_dts/api/src/domainConnection.d.ts +41 -0
- package/dist/_dts/api/src/endpoints.d.ts +194 -181
- package/dist/_dts/api/src/index.d.ts +4 -3
- package/dist/_dts/api/src/media.d.ts +19 -2
- 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 +15 -4
- 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/blocks/src/PageRenderer.d.ts +2 -2
- package/dist/_dts/blocks/src/index.d.ts +1 -1
- package/dist/_dts/blocks/src/pageRenderAdmission.d.ts +9 -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 +1 -1
- package/dist/_dts/blocks/src/system/blocks/event-registration.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/api/client.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/hooks/useCalendarEvents.d.ts +3 -3
- package/dist/_dts/blocks/src/system/runtime/hooks/useCalendarEvents.state.d.ts +34 -22
- 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/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 +7 -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/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/OfferingTitle.d.ts +11 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/WeekAgendaView.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/WeekBoardView.d.ts +1 -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/commerce/src/purchase/event-registration-errors.d.ts +57 -0
- package/dist/_dts/commerce/src/purchase/index.d.ts +1 -0
- 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/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/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/public-api/contracts.d.ts +2 -1
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- 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/mock-themes/all.d.ts +3 -3
- package/dist/_dts/theme-core/src/schema.d.ts +12 -11
- package/dist/_dts/theme-core/src/site-styles/compilationPlan.d.ts +43 -3
- package/dist/_dts/theme-core/src/site-styles/curatedSiteStyles.d.ts +10 -0
- 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 -9
- 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 +10 -1
- package/dist/_dts/theme-core/src/site-styles/headerStyleDefaults.d.ts +1 -1
- package/dist/_dts/theme-core/src/site-styles/headerStyleRecipe.d.ts +7 -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-DCch21a6.mjs → BookingConsentAgreement--_fUCZe-.mjs} +2 -2
- package/dist/client/{DiscountCodeDisclosure-DIj1T59K.mjs → DiscountCodeDisclosure-BMipSoDJ.mjs} +1 -1
- package/dist/client/{EventCombined.client-BWVNlXTx.mjs → EventCombined.client-CwJOxn7A.mjs} +154 -178
- package/dist/client/{EventListing.client-DVFCDe3i.mjs → EventListing.client-eVwiylPW.mjs} +2 -2
- package/dist/client/{LeafletStaticMap-BY5mIHw9.mjs → LeafletStaticMap-IKenna5u.mjs} +1 -1
- package/dist/client/{accordion-CK29E8rG.mjs → accordion-MGAO3PuE.mjs} +1 -1
- package/dist/client/{bookingForm-DFvnet-N.mjs → bookingForm-CudlQPUu.mjs} +5 -5
- package/dist/client/bookings.mjs +418 -79
- package/dist/client/capacity-BW00PO7s.mjs +271 -0
- package/dist/client/{carousel-BVU5NQlb.mjs → carousel-BrbGJ2Jl.mjs} +1 -1
- package/dist/client/{cart-BNItcZVa.mjs → cart-Bq5eU0xZ.mjs} +3 -3
- package/dist/client/{checkout-Bu6iCdkP.mjs → checkout-BAFVRdrK.mjs} +3 -3
- package/dist/client/client.mjs +2919 -1918
- package/dist/client/{context-BImarOAq.mjs → context-DCkiHVdD.mjs} +8 -5
- package/dist/client/dates-2RPXHQy4.mjs +264 -0
- package/dist/client/{eventCalendar-DS2h-UXD.mjs → eventCalendar-B0O-hPF7.mjs} +10 -17
- package/dist/client/{eventCombined-Drt4Oq9p.mjs → eventCombined-DCkDaoDI.mjs} +3 -3
- package/dist/client/{eventDetails-Bl2vWgTX.mjs → eventDetails-D8GG2dnD.mjs} +5 -3
- package/dist/client/{eventListing-CS7PHY7v.mjs → eventListing-3ssV_bxz.mjs} +3 -3
- package/dist/client/{eventRegistration-D-j8eNy2.mjs → eventRegistration-bPQo3kVw.mjs} +562 -309
- package/dist/client/{form-RMpoLTyr.mjs → form-qMv8RDkk.mjs} +2 -2
- package/dist/client/{headerSection-BYE3Lb3k.mjs → headerSection-CH0Sc5hX.mjs} +2 -2
- package/dist/client/hooks.mjs +289 -32
- package/dist/client/{locationMap-BxSr7Kkh.mjs → locationMap-0_xlBnNI.mjs} +2 -2
- package/dist/client/{newsletterForm-DerbXwFC.mjs → newsletterForm-NUW7m9RI.mjs} +2 -2
- package/dist/client/{productDetail-4SZCLhAf.mjs → productDetail-FBEOM7jW.mjs} +3 -3
- package/dist/client/{productList-D7AP4GNq.mjs → productList-R0OSGhnn.mjs} +3 -3
- package/dist/client/{propsDecoder-pzBeCh14.mjs → propsDecoder-pYvx_Srl.mjs} +88 -380
- package/dist/client/rendering/client.mjs +2616 -1637
- package/dist/client/rendering/islands.mjs +17 -17
- package/dist/client/rendering.mjs +2710 -1702
- package/dist/client/{scrollToBlock-CduAKf8T.mjs → scrollToBlock-ByQv96M2.mjs} +1 -1
- package/dist/client/{shop-Cp5p_kGe.mjs → shop-RUG9DmRE.mjs} +6 -6
- package/dist/client/{shop-commerce-DicXYaYX.mjs → shop-commerce-B76Jz23B.mjs} +5 -5
- package/dist/client/{shop-commerce-store-CGWnpY4K.mjs → shop-commerce-store-QuQNdDsD.mjs} +1 -1
- package/dist/client/{shopShared-BDf9ljkm.mjs → shopShared-vXU1omwJ.mjs} +3 -3
- package/dist/client/{useEventFilters-DeeyGYuk.mjs → useEventFilters-ByuU6HLA.mjs} +33 -18
- package/dist/preview-next/before-render.mjs +79 -51
- package/dist/preview-next/client/runtime.mjs +4 -4
- package/dist/preview-next/keepAlive.mjs +79 -51
- package/dist/preview-next/middleware.mjs +79 -51
- package/dist/{previewAuthStore-DbqBol0V.mjs → previewAuthStore-L_cKW8Sb.mjs} +79 -51
- package/dist/{sdk-runtime-19MO27F0.mjs → sdk-runtime-sUMr5d70.mjs} +2 -2
- package/dist/{separator-DaPLtJ1f.mjs → separator-BIHkie5i.mjs} +1 -1
- package/dist/server/components.mjs +2077 -1274
- package/dist/server/config-validation.mjs +289 -32
- package/dist/server/config.mjs +289 -32
- package/dist/server/data.mjs +289 -32
- package/dist/server/index.mjs +80 -52
- package/dist/server/next.mjs +1822 -1111
- package/dist/server/page-converter.mjs +167 -31
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +1988 -1286
- package/dist/server/rendering.mjs +1943 -1182
- package/dist/server/routing.mjs +351 -86
- package/dist/server/server.mjs +293 -128
- package/dist/server/theme-bridge.mjs +52 -8
- package/dist/server/theme.mjs +27 -8
- package/dist/styles/index.css +15 -0
- 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
|
@@ -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;
|
|
@@ -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,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;
|
|
@@ -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;
|