@riverbankcms/sdk 0.124.0 → 0.126.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 +3 -1
- package/dist/{PreviewEditorSidebar-DBmAJJkQ.mjs → PreviewEditorSidebar-DcYJxTgc.mjs} +67 -266
- package/dist/{PreviewEditorUI-CfGaz9cY.mjs → PreviewEditorUI-Ctt1yTJr.mjs} +3 -3
- package/dist/{PreviewQueryProvider-BH-3-jSj.mjs → PreviewQueryProvider-DgFDIwvK.mjs} +1 -1
- package/dist/{SdkPreviewModeRuntime-BW9Z8j8T.mjs → SdkPreviewModeRuntime-CvW1vdQ4.mjs} +38 -30
- package/dist/{SiteChromeCustomizeContext-2z8moxYf.mjs → SiteChromeCustomizeContext-C87qlKWw.mjs} +493 -1378
- package/dist/_dts/ai/src/contracts/proposals.d.ts +1354 -202
- package/dist/_dts/api/src/accessAdmin.d.ts +2 -14
- package/dist/_dts/api/src/common/envelope.d.ts +1 -1
- package/dist/_dts/api/src/contentRuntime.d.ts +0 -2
- package/dist/_dts/api/src/endpoints.d.ts +0 -7
- package/dist/_dts/api/src/sdk-event-upsert.d.ts +42 -0
- package/dist/_dts/api/src/sdkContracts.d.ts +11 -9
- package/dist/_dts/api/src/siteAccessAdmin.d.ts +23 -0
- package/dist/_dts/api/src/siteOperations.d.ts +18 -1
- package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +1 -14
- package/dist/_dts/billing/src/plans/types.d.ts +24 -5
- package/dist/_dts/blocks/src/contracts/non-block-islands.d.ts +4 -0
- package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-details/logic.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-details.client.d.ts +3 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-details.server.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationStripeReturn.d.ts +15 -2
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +331 -19
- package/dist/_dts/preview-next/src/client/preview/PreviewEditorSidebar.d.ts +1 -2
- package/dist/_dts/preview-next/src/client/preview/PreviewShell.d.ts +2 -3
- package/dist/_dts/preview-next/src/client/preview/PreviewShellLayout.d.ts +1 -2
- package/dist/_dts/preview-next/src/client/preview/SiteChromeCustomizeContext.d.ts +3 -12
- package/dist/_dts/preview-next/src/client/preview/StyleConfigurator.d.ts +3 -13
- package/dist/_dts/preview-next/src/client/preview/StyleConfigurator.state.d.ts +8 -100
- package/dist/_dts/preview-next/src/client/preview/siteStylePreviewPlanner.d.ts +1 -4
- package/dist/_dts/preview-next/src/client/preview/styleConfiguratorApplyPayload.d.ts +1 -15
- package/dist/_dts/preview-next/src/client/preview/styleConfiguratorSnapshot.d.ts +11 -21
- package/dist/_dts/sdk/src/cli/commands/event.d.ts +2 -2
- package/dist/_dts/sdk/src/cli/commands/eventOccurrenceSchedule.d.ts +12 -0
- package/dist/_dts/sdk/src/cli/commands/push/pushAllExtras.d.ts +6 -0
- package/dist/_dts/sdk/src/cli/commands/style.d.ts +1 -1
- package/dist/_dts/sdk/src/cli/content/legacyEventScheduleShapeError.d.ts +5 -0
- package/dist/_dts/sdk/src/cli/content/localEventSchedule.d.ts +17 -0
- package/dist/_dts/sdk/src/cli/content/reader.d.ts +5 -10
- package/dist/_dts/sdk/src/cli/migrations/events.d.ts +1 -1
- package/dist/_dts/sdk/src/cli/site-commands/eventScheduleCompiler.d.ts +24 -0
- package/dist/_dts/sdk/src/client/management/http.d.ts +1 -1
- package/dist/_dts/sdk/src/client/management/types.d.ts +3 -28
- package/dist/_dts/sdk/src/config/index.d.ts +1 -1
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +5 -20
- package/dist/_dts/sdk/src/rendering/index.d.ts +1 -1
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/site-commands/src/commandContract.d.ts +33 -5
- package/dist/_dts/site-commands/src/commandDomain.d.ts +2 -2
- package/dist/_dts/site-commands/src/commands.d.ts +38 -9
- package/dist/_dts/site-commands/src/siteStyleCommandSchema.d.ts +28 -1
- package/dist/_dts/site-commands/src/siteStyleSelectionSchemaBuilder.d.ts +4 -4
- package/dist/_dts/theme-core/src/palette/concretePalette.d.ts +20 -0
- package/dist/_dts/theme-core/src/palette/curated/index.d.ts +2 -17
- package/dist/_dts/theme-core/src/palette/index.d.ts +1 -6
- package/dist/_dts/theme-core/src/palette/schema.d.ts +39 -0
- package/dist/_dts/theme-core/src/schema.d.ts +38 -26
- package/dist/_dts/theme-core/src/site-styles/previewCompiler.d.ts +4 -6
- package/dist/_dts/theme-core/src/site-styles/runtimeCompiler.d.ts +5 -6
- package/dist/cli/index.mjs +631 -525
- package/dist/cli/init-docs/content/cli-reference.md +6 -3
- package/dist/cli/init-docs/content/content-management.md +24 -13
- package/dist/client/{DiscountCodeDisclosure-DxvjKvck.mjs → DiscountCodeDisclosure-DS0AuFWW.mjs} +1 -1
- package/dist/client/{EventCombined.client-BydMGc4c.mjs → EventCombined.client-DtMxLr7q.mjs} +2 -2
- package/dist/client/{EventListing.client-vpzhhysN.mjs → EventListing.client-BdLSRNg1.mjs} +2 -2
- package/dist/client/{LeafletStaticMap-CB07rpf8.mjs → LeafletStaticMap-BrpC6vsT.mjs} +1 -1
- package/dist/client/{MagicLinkForm-BzyRJ8VF.mjs → MagicLinkForm-Bt3IuLMy.mjs} +1 -1
- package/dist/client/{StepIndicator-CTcGf8Be.mjs → StepIndicator-CBYPFVoy.mjs} +2 -2
- package/dist/client/{accordion-B-DUDLRD.mjs → accordion-BqqwPJWM.mjs} +1 -1
- package/dist/client/{bookingForm-DSbClLcZ.mjs → bookingForm-SneP3yxC.mjs} +5 -6
- package/dist/client/bookings.mjs +190 -24
- package/dist/client/{carousel-B6Ccdx8M.mjs → carousel-BTIR9L3I.mjs} +1 -1
- package/dist/client/{cart-BZh8G8wM.mjs → cart-bqiqd8SX.mjs} +3 -3
- package/dist/client/{checkout-o6zaC-kM.mjs → checkout-WbTFV5v4.mjs} +3 -3
- package/dist/client/client.mjs +175 -223
- package/dist/client/{courseRegistration-Cf11pNDs.mjs → courseRegistration-BcemLAdN.mjs} +6 -7
- package/dist/client/{eventCalendar-BeXrdsSE.mjs → eventCalendar-CsxIw0V_.mjs} +4 -4
- package/dist/client/{eventCombined-DA76PZgG.mjs → eventCombined-B6XMoHfa.mjs} +2 -2
- package/dist/client/{eventDetails-BLxg0rok.mjs → eventDetails-BJaoPPfo.mjs} +10 -5
- package/dist/client/{eventListing-tO9LheBX.mjs → eventListing-DgwdYHRT.mjs} +2 -2
- package/dist/client/{eventRegistration-Cnene9D9.mjs → eventRegistration-C0O3folu.mjs} +30 -22
- package/dist/client/{form-DZf72CHB.mjs → form-Bk9txGFt.mjs} +1 -1
- package/dist/client/{headerSection-Hioja5Cr.mjs → headerSection-yIBt0yTv.mjs} +2 -2
- package/dist/client/hooks.mjs +54 -102
- package/dist/client/{locationMap-DwhUXEix.mjs → locationMap-C-3KIpv-.mjs} +2 -2
- package/dist/client/{newsletterForm-C350bEQf.mjs → newsletterForm-CzB8g8h2.mjs} +1 -1
- package/dist/client/{pricing-BYWN_ATa.mjs → pricing-C1QeDes_.mjs} +1 -1
- package/dist/client/{productDetail-CCqCyXgU.mjs → productDetail-w7SBp5uc.mjs} +3 -3
- package/dist/client/{productList-BAiNJrOU.mjs → productList-D0tGKHGf.mjs} +3 -3
- package/dist/client/{propsDecoder-DeunRj6m.mjs → propsDecoder-Bcin2DB3.mjs} +172 -11
- package/dist/client/rendering/client.mjs +322 -363
- package/dist/client/rendering/islands.mjs +18 -18
- package/dist/client/rendering.mjs +231 -272
- package/dist/client/{useDiscountCodeUi-I-92-x2V.mjs → scrollToBlock-h-o_STf_.mjs} +18 -2
- package/dist/client/{shop-DUmCdBtw.mjs → shop-BGzmL8O_.mjs} +5 -6
- package/dist/client/{shop-commerce-CY27mEUr.mjs → shop-commerce-lX8QxjX-.mjs} +4 -4
- package/dist/client/{shop-commerce-store-ChXPbWfa.mjs → shop-commerce-store-CEurARtu.mjs} +1 -1
- package/dist/client/{shopShared-q0kin1cv.mjs → shopShared-DXxH8xxw.mjs} +2 -2
- package/dist/client/{useEventFilters-DlcVluZh.mjs → useEventFilters-B591g9vd.mjs} +2 -2
- package/dist/client/{usePolling-Bz7GFV_a.mjs → usePolling-BvnChV4m.mjs} +2 -2
- package/dist/preview-next/before-render.mjs +0 -7
- package/dist/preview-next/client/runtime.mjs +4 -4
- package/dist/preview-next/middleware.mjs +0 -7
- package/dist/{previewAuthStore-CJX21dGi.mjs → previewAuthStore-Dev9CdG9.mjs} +0 -7
- package/dist/{sdk-runtime-OnPM8Z69.mjs → sdk-runtime-M__i3Jce.mjs} +2 -2
- package/dist/{separator-CPtfzHqA.mjs → separator-VSlnI9bc.mjs} +1 -1
- package/dist/server/components.mjs +99 -141
- package/dist/server/config-validation.mjs +54 -102
- package/dist/server/config.mjs +54 -102
- package/dist/server/data.mjs +54 -102
- package/dist/server/index.mjs +1 -8
- package/dist/server/next.mjs +103 -152
- package/dist/server/page-converter.mjs +54 -102
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +62 -104
- package/dist/server/rendering.mjs +100 -142
- package/dist/server/routing.mjs +75 -147
- package/dist/server/server.mjs +55 -110
- package/dist/server/theme-bridge.mjs +172 -162
- package/dist/server/theme.mjs +167 -11
- package/package.json +1 -1
- package/dist/_dts/theme-core/src/palette/editorState.d.ts +0 -75
- package/dist/_dts/theme-core/src/palette/libraryModel.d.ts +0 -64
- package/dist/_dts/theme-core/src/palette/persistenceReadSource.d.ts +0 -81
- package/dist/_dts/theme-core/src/palette/resolveSelection.d.ts +0 -75
- package/dist/_dts/theme-core/src/palette/selection.d.ts +0 -74
- package/dist/_dts/theme-core/src/palette/sitePalettePersistence.d.ts +0 -34
- package/dist/client/scrollToBlock-C86BYkyV.mjs +0 -17
|
@@ -2,8 +2,8 @@ export declare const navigationLocations: readonly ["main", "header", "footer"];
|
|
|
2
2
|
export type NavigationLocation = (typeof navigationLocations)[number];
|
|
3
3
|
export declare const navigationMenuRoles: readonly ["primary", "footer", "legal-policy"];
|
|
4
4
|
export type NavigationMenuRole = (typeof navigationMenuRoles)[number];
|
|
5
|
-
export declare const
|
|
6
|
-
export type
|
|
5
|
+
export declare const eventPresets: readonly ["event", "class", "course", "workshop", "retreat", "performance"];
|
|
6
|
+
export type EventPreset = (typeof eventPresets)[number];
|
|
7
7
|
export declare const offeringVisibilities: readonly ["draft", "unlisted", "listed", "published"];
|
|
8
8
|
export type OfferingVisibility = (typeof offeringVisibilities)[number];
|
|
9
9
|
export declare const bookingPassProductUseCases: readonly ["event_pass", "appointment_package"];
|
|
@@ -374,17 +374,18 @@ export declare const upsertEventSeriesCommandSchema: z.ZodObject<{
|
|
|
374
374
|
slug: z.ZodString;
|
|
375
375
|
path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
376
376
|
title: z.ZodString;
|
|
377
|
-
|
|
378
|
-
|
|
377
|
+
preset: z.ZodEnum<{
|
|
378
|
+
course: "course";
|
|
379
|
+
event: "event";
|
|
379
380
|
performance: "performance";
|
|
380
381
|
class: "class";
|
|
381
382
|
workshop: "workshop";
|
|
382
383
|
retreat: "retreat";
|
|
383
384
|
}>;
|
|
384
|
-
bookingScope: z.
|
|
385
|
+
bookingScope: z.ZodEnum<{
|
|
385
386
|
single_occurrence: "single_occurrence";
|
|
386
387
|
whole_series: "whole_series";
|
|
387
|
-
}
|
|
388
|
+
}>;
|
|
388
389
|
status: z.ZodOptional<z.ZodEnum<{
|
|
389
390
|
active: "active";
|
|
390
391
|
draft: "draft";
|
|
@@ -887,7 +888,34 @@ export declare const siteCommandSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
887
888
|
}, z.core.$strict>], "styleId">>;
|
|
888
889
|
}, z.core.$strict>, z.ZodObject<{
|
|
889
890
|
kind: z.ZodLiteral<"set-palette">;
|
|
890
|
-
|
|
891
|
+
palette: z.ZodPipe<z.ZodObject<{
|
|
892
|
+
colors: z.ZodArray<z.ZodObject<{
|
|
893
|
+
name: z.ZodString;
|
|
894
|
+
hex: z.ZodString;
|
|
895
|
+
}, z.core.$strip>>;
|
|
896
|
+
meta: z.ZodObject<{
|
|
897
|
+
mode: z.ZodEnum<{
|
|
898
|
+
light: "light";
|
|
899
|
+
dark: "dark";
|
|
900
|
+
}>;
|
|
901
|
+
}, z.core.$strip>;
|
|
902
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
903
|
+
colors: {
|
|
904
|
+
name: string;
|
|
905
|
+
hex: string;
|
|
906
|
+
}[];
|
|
907
|
+
meta: {
|
|
908
|
+
mode: "light" | "dark";
|
|
909
|
+
};
|
|
910
|
+
}, {
|
|
911
|
+
colors: {
|
|
912
|
+
name: string;
|
|
913
|
+
hex: string;
|
|
914
|
+
}[];
|
|
915
|
+
meta: {
|
|
916
|
+
mode: "light" | "dark";
|
|
917
|
+
};
|
|
918
|
+
}>>;
|
|
891
919
|
}, z.core.$strict>, z.ZodObject<{
|
|
892
920
|
kind: z.ZodLiteral<"set-typography">;
|
|
893
921
|
typography: z.ZodNullable<z.ZodObject<{
|
|
@@ -1517,17 +1545,18 @@ export declare const siteCommandSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1517
1545
|
slug: z.ZodString;
|
|
1518
1546
|
path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1519
1547
|
title: z.ZodString;
|
|
1520
|
-
|
|
1521
|
-
|
|
1548
|
+
preset: z.ZodEnum<{
|
|
1549
|
+
course: "course";
|
|
1550
|
+
event: "event";
|
|
1522
1551
|
performance: "performance";
|
|
1523
1552
|
class: "class";
|
|
1524
1553
|
workshop: "workshop";
|
|
1525
1554
|
retreat: "retreat";
|
|
1526
1555
|
}>;
|
|
1527
|
-
bookingScope: z.
|
|
1556
|
+
bookingScope: z.ZodEnum<{
|
|
1528
1557
|
single_occurrence: "single_occurrence";
|
|
1529
1558
|
whole_series: "whole_series";
|
|
1530
|
-
}
|
|
1559
|
+
}>;
|
|
1531
1560
|
status: z.ZodOptional<z.ZodEnum<{
|
|
1532
1561
|
active: "active";
|
|
1533
1562
|
draft: "draft";
|
|
@@ -53,7 +53,34 @@ export declare const applySiteStyleSelectionCommandSchema: z.ZodObject<{
|
|
|
53
53
|
}, z.core.$strict>], "styleId">>;
|
|
54
54
|
}, z.core.$strict>, z.ZodObject<{
|
|
55
55
|
kind: z.ZodLiteral<"set-palette">;
|
|
56
|
-
|
|
56
|
+
palette: z.ZodPipe<z.ZodObject<{
|
|
57
|
+
colors: z.ZodArray<z.ZodObject<{
|
|
58
|
+
name: z.ZodString;
|
|
59
|
+
hex: z.ZodString;
|
|
60
|
+
}, z.core.$strip>>;
|
|
61
|
+
meta: z.ZodObject<{
|
|
62
|
+
mode: z.ZodEnum<{
|
|
63
|
+
light: "light";
|
|
64
|
+
dark: "dark";
|
|
65
|
+
}>;
|
|
66
|
+
}, z.core.$strip>;
|
|
67
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
68
|
+
colors: {
|
|
69
|
+
name: string;
|
|
70
|
+
hex: string;
|
|
71
|
+
}[];
|
|
72
|
+
meta: {
|
|
73
|
+
mode: "light" | "dark";
|
|
74
|
+
};
|
|
75
|
+
}, {
|
|
76
|
+
colors: {
|
|
77
|
+
name: string;
|
|
78
|
+
hex: string;
|
|
79
|
+
}[];
|
|
80
|
+
meta: {
|
|
81
|
+
mode: "light" | "dark";
|
|
82
|
+
};
|
|
83
|
+
}>>;
|
|
57
84
|
}, z.core.$strict>, z.ZodObject<{
|
|
58
85
|
kind: z.ZodLiteral<"set-typography">;
|
|
59
86
|
typography: z.ZodNullable<z.ZodObject<{
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
type SiteStyleSelectionSchemaParts<TSiteStyleId extends z.ZodType, TButtonStyleSelection extends z.ZodType,
|
|
2
|
+
type SiteStyleSelectionSchemaParts<TSiteStyleId extends z.ZodType, TButtonStyleSelection extends z.ZodType, TPalette extends z.ZodType, TTypography extends z.ZodType, THeaderLookId extends z.ZodType, THeaderLayoutId extends z.ZodType, THeaderStyleId extends z.ZodType, TFooterLookId extends z.ZodType> = Readonly<{
|
|
3
3
|
siteStyleId: TSiteStyleId;
|
|
4
4
|
buttonStyleSelection: TButtonStyleSelection;
|
|
5
|
-
|
|
5
|
+
palette: TPalette;
|
|
6
6
|
typography: TTypography;
|
|
7
7
|
headerLookId: THeaderLookId;
|
|
8
8
|
headerLayoutId: THeaderLayoutId;
|
|
9
9
|
headerStyleId: THeaderStyleId;
|
|
10
10
|
footerLookId: TFooterLookId;
|
|
11
11
|
}>;
|
|
12
|
-
export declare function createSiteStyleSelectionChangeSchema<TSiteStyleId extends z.ZodType, TButtonStyleSelection extends z.ZodType,
|
|
12
|
+
export declare function createSiteStyleSelectionChangeSchema<TSiteStyleId extends z.ZodType, TButtonStyleSelection extends z.ZodType, TPalette extends z.ZodType, TTypography extends z.ZodType, THeaderLookId extends z.ZodType, THeaderLayoutId extends z.ZodType, THeaderStyleId extends z.ZodType, TFooterLookId extends z.ZodType>(parts: SiteStyleSelectionSchemaParts<TSiteStyleId, TButtonStyleSelection, TPalette, TTypography, THeaderLookId, THeaderLayoutId, THeaderStyleId, TFooterLookId>): z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
13
13
|
kind: z.ZodLiteral<"set-site-style">;
|
|
14
14
|
siteStyleId: TSiteStyleId;
|
|
15
15
|
}, z.core.$strict>, z.ZodObject<{
|
|
@@ -17,7 +17,7 @@ export declare function createSiteStyleSelectionChangeSchema<TSiteStyleId extend
|
|
|
17
17
|
buttonStyleSelection: z.ZodNullable<TButtonStyleSelection>;
|
|
18
18
|
}, z.core.$strict>, z.ZodObject<{
|
|
19
19
|
kind: z.ZodLiteral<"set-palette">;
|
|
20
|
-
|
|
20
|
+
palette: TPalette;
|
|
21
21
|
}, z.core.$strict>, z.ZodObject<{
|
|
22
22
|
kind: z.ZodLiteral<"set-typography">;
|
|
23
23
|
typography: z.ZodNullable<TTypography>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { Theme } from '../schema';
|
|
2
|
+
import { type PaletteColors, type PaletteMode } from './colors';
|
|
3
|
+
/**
|
|
4
|
+
* The complete palette value shared by curated authoring templates and themes.
|
|
5
|
+
* It carries no catalogue identity, persistence origin, or independent version.
|
|
6
|
+
*/
|
|
7
|
+
export type ConcretePalette = Readonly<{
|
|
8
|
+
colors: PaletteColors;
|
|
9
|
+
mode: PaletteMode;
|
|
10
|
+
}>;
|
|
11
|
+
/**
|
|
12
|
+
* Converts an already schema-validated theme palette into the canonical
|
|
13
|
+
* role-keyed representation. The theme boundary guarantees completeness and
|
|
14
|
+
* mode validity; colour notation is normalised by that boundary.
|
|
15
|
+
*/
|
|
16
|
+
export declare function concretePaletteFromTheme(palette: Theme['palette']): ConcretePalette;
|
|
17
|
+
export declare function concretePaletteToTheme(palette: ConcretePalette): Theme['palette'];
|
|
18
|
+
export declare function concretePalettesEqual(left: ConcretePalette, right: ConcretePalette): boolean;
|
|
19
|
+
/** Exact semantic equality for two schema-validated theme palette values. */
|
|
20
|
+
export declare function themePalettesEqual(left: Theme['palette'], right: Theme['palette']): boolean;
|
|
@@ -2,11 +2,9 @@
|
|
|
2
2
|
* Curated palette library.
|
|
3
3
|
*
|
|
4
4
|
* Authoring keys are readable source aliases. Value keys are derived from the
|
|
5
|
-
* complete mode and semantic colours
|
|
6
|
-
* persistence and runtime boundaries.
|
|
5
|
+
* complete mode and semantic colours for picker and catalogue identity.
|
|
7
6
|
*/
|
|
8
|
-
import {
|
|
9
|
-
import { type PaletteValueKey } from '../colors';
|
|
7
|
+
import type { PaletteValueKey } from '../colors';
|
|
10
8
|
import type { CuratedPaletteAuthoringKey, CuratedPaletteDefinition } from './types';
|
|
11
9
|
export type { CuratedPaletteAuthoringKey, CuratedPaletteDefinition, HexColor, PaletteColorEntry, PaletteColors, PaletteMode, PartialPaletteColors, PaletteTokenName, } from './types';
|
|
12
10
|
export type { PaletteValueKey } from '../colors';
|
|
@@ -28,16 +26,3 @@ export type KnownCuratedPaletteAuthoringKeyValue = Unbrand<KnownCuratedPaletteAu
|
|
|
28
26
|
export declare function findCuratedPalette(valueKey: PaletteValueKey): CuratedPalette | undefined;
|
|
29
27
|
export declare function findCuratedPaletteByAuthoringKey(authoringKey: CuratedPaletteAuthoringKey): CuratedPalette | undefined;
|
|
30
28
|
export declare function requireCuratedPaletteValueKey(authoringKey: CuratedPaletteAuthoringKey): KnownCuratedPaletteValueKey;
|
|
31
|
-
export declare function isKnownCuratedPaletteValueKey(value: unknown): value is KnownCuratedPaletteValueKey;
|
|
32
|
-
/** Parses a raw persisted key into catalogue-proven curated membership. */
|
|
33
|
-
export declare const knownCuratedPaletteValueKeySchema: z.ZodPipe<z.ZodString, z.ZodTransform<KnownCuratedPaletteValueKey, string>>;
|
|
34
|
-
export type PersistedCuratedPaletteValueKeyParseResult = Readonly<{
|
|
35
|
-
kind: 'known';
|
|
36
|
-
valueKey: KnownCuratedPaletteValueKey;
|
|
37
|
-
}> | Readonly<{
|
|
38
|
-
kind: 'unknown';
|
|
39
|
-
raw: string;
|
|
40
|
-
}> | Readonly<{
|
|
41
|
-
kind: 'empty';
|
|
42
|
-
}>;
|
|
43
|
-
export declare function parsePersistedCuratedPaletteValueKey(value: string | null | undefined): PersistedCuratedPaletteValueKeyParseResult;
|
|
@@ -9,12 +9,7 @@ export * from './utils';
|
|
|
9
9
|
export * from './utils/paletteAccess';
|
|
10
10
|
export * from './extractPalette';
|
|
11
11
|
export * from './colors';
|
|
12
|
-
export * from './
|
|
13
|
-
export * from './libraryModel';
|
|
14
|
-
export * from './persistenceReadSource';
|
|
15
|
-
export * from './resolveSelection';
|
|
16
|
-
export * from './selection';
|
|
17
|
-
export * from './sitePalettePersistence';
|
|
12
|
+
export * from './concretePalette';
|
|
18
13
|
export * from './utils/fromVibrant';
|
|
19
14
|
export * from './utils/suggestRecipes';
|
|
20
15
|
export * from './recipes/allRecipes';
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const paletteColorSchema: z.ZodObject<{
|
|
3
|
+
name: z.ZodString;
|
|
4
|
+
hex: z.ZodString;
|
|
5
|
+
}, z.core.$strip>;
|
|
6
|
+
export declare const paletteMetaSchema: z.ZodObject<{
|
|
7
|
+
mode: z.ZodEnum<{
|
|
8
|
+
light: "light";
|
|
9
|
+
dark: "dark";
|
|
10
|
+
}>;
|
|
11
|
+
}, z.core.$strip>;
|
|
12
|
+
export declare const paletteSchema: z.ZodPipe<z.ZodObject<{
|
|
13
|
+
colors: z.ZodArray<z.ZodObject<{
|
|
14
|
+
name: z.ZodString;
|
|
15
|
+
hex: z.ZodString;
|
|
16
|
+
}, z.core.$strip>>;
|
|
17
|
+
meta: z.ZodObject<{
|
|
18
|
+
mode: z.ZodEnum<{
|
|
19
|
+
light: "light";
|
|
20
|
+
dark: "dark";
|
|
21
|
+
}>;
|
|
22
|
+
}, z.core.$strip>;
|
|
23
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
24
|
+
colors: {
|
|
25
|
+
name: string;
|
|
26
|
+
hex: string;
|
|
27
|
+
}[];
|
|
28
|
+
meta: {
|
|
29
|
+
mode: "light" | "dark";
|
|
30
|
+
};
|
|
31
|
+
}, {
|
|
32
|
+
colors: {
|
|
33
|
+
name: string;
|
|
34
|
+
hex: string;
|
|
35
|
+
}[];
|
|
36
|
+
meta: {
|
|
37
|
+
mode: "light" | "dark";
|
|
38
|
+
};
|
|
39
|
+
}>>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import type { ExpandedPalette } from './palette/expandPalette';
|
|
3
|
+
import { paletteColorSchema, paletteMetaSchema, paletteSchema } from './palette/schema';
|
|
3
4
|
export declare const axesSchema: z.ZodObject<{
|
|
4
5
|
tone: z.ZodEnum<{
|
|
5
6
|
bold: "bold";
|
|
@@ -31,28 +32,7 @@ export declare const axesSchema: z.ZodObject<{
|
|
|
31
32
|
expressive: "expressive";
|
|
32
33
|
}>;
|
|
33
34
|
}, z.core.$strip>;
|
|
34
|
-
export
|
|
35
|
-
name: z.ZodString;
|
|
36
|
-
hex: z.ZodString;
|
|
37
|
-
}, z.core.$strip>;
|
|
38
|
-
export declare const paletteMetaSchema: z.ZodObject<{
|
|
39
|
-
mode: z.ZodEnum<{
|
|
40
|
-
light: "light";
|
|
41
|
-
dark: "dark";
|
|
42
|
-
}>;
|
|
43
|
-
}, z.core.$strip>;
|
|
44
|
-
export declare const paletteSchema: z.ZodObject<{
|
|
45
|
-
colors: z.ZodArray<z.ZodObject<{
|
|
46
|
-
name: z.ZodString;
|
|
47
|
-
hex: z.ZodString;
|
|
48
|
-
}, z.core.$strip>>;
|
|
49
|
-
meta: z.ZodObject<{
|
|
50
|
-
mode: z.ZodEnum<{
|
|
51
|
-
light: "light";
|
|
52
|
-
dark: "dark";
|
|
53
|
-
}>;
|
|
54
|
-
}, z.core.$strip>;
|
|
55
|
-
}, z.core.$strip>;
|
|
35
|
+
export { paletteColorSchema, paletteMetaSchema, paletteSchema };
|
|
56
36
|
declare const headingSizeSchema: z.ZodEnum<{
|
|
57
37
|
sm: "sm";
|
|
58
38
|
md: "md";
|
|
@@ -3339,7 +3319,7 @@ export declare const themeSchema: z.ZodObject<{
|
|
|
3339
3319
|
expressive: "expressive";
|
|
3340
3320
|
}>;
|
|
3341
3321
|
}, z.core.$strip>;
|
|
3342
|
-
palette: z.ZodObject<{
|
|
3322
|
+
palette: z.ZodPipe<z.ZodObject<{
|
|
3343
3323
|
colors: z.ZodArray<z.ZodObject<{
|
|
3344
3324
|
name: z.ZodString;
|
|
3345
3325
|
hex: z.ZodString;
|
|
@@ -3350,7 +3330,23 @@ export declare const themeSchema: z.ZodObject<{
|
|
|
3350
3330
|
dark: "dark";
|
|
3351
3331
|
}>;
|
|
3352
3332
|
}, z.core.$strip>;
|
|
3353
|
-
}, z.core.$strip
|
|
3333
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
3334
|
+
colors: {
|
|
3335
|
+
name: string;
|
|
3336
|
+
hex: string;
|
|
3337
|
+
}[];
|
|
3338
|
+
meta: {
|
|
3339
|
+
mode: "light" | "dark";
|
|
3340
|
+
};
|
|
3341
|
+
}, {
|
|
3342
|
+
colors: {
|
|
3343
|
+
name: string;
|
|
3344
|
+
hex: string;
|
|
3345
|
+
}[];
|
|
3346
|
+
meta: {
|
|
3347
|
+
mode: "light" | "dark";
|
|
3348
|
+
};
|
|
3349
|
+
}>>;
|
|
3354
3350
|
typography: z.ZodObject<{
|
|
3355
3351
|
body: z.ZodObject<{
|
|
3356
3352
|
family: z.ZodString;
|
|
@@ -6589,7 +6585,7 @@ export declare const themesTurnSchema: z.ZodObject<{
|
|
|
6589
6585
|
expressive: "expressive";
|
|
6590
6586
|
}>;
|
|
6591
6587
|
}, z.core.$strip>;
|
|
6592
|
-
palette: z.ZodObject<{
|
|
6588
|
+
palette: z.ZodPipe<z.ZodObject<{
|
|
6593
6589
|
colors: z.ZodArray<z.ZodObject<{
|
|
6594
6590
|
name: z.ZodString;
|
|
6595
6591
|
hex: z.ZodString;
|
|
@@ -6600,7 +6596,23 @@ export declare const themesTurnSchema: z.ZodObject<{
|
|
|
6600
6596
|
dark: "dark";
|
|
6601
6597
|
}>;
|
|
6602
6598
|
}, z.core.$strip>;
|
|
6603
|
-
}, z.core.$strip
|
|
6599
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
6600
|
+
colors: {
|
|
6601
|
+
name: string;
|
|
6602
|
+
hex: string;
|
|
6603
|
+
}[];
|
|
6604
|
+
meta: {
|
|
6605
|
+
mode: "light" | "dark";
|
|
6606
|
+
};
|
|
6607
|
+
}, {
|
|
6608
|
+
colors: {
|
|
6609
|
+
name: string;
|
|
6610
|
+
hex: string;
|
|
6611
|
+
}[];
|
|
6612
|
+
meta: {
|
|
6613
|
+
mode: "light" | "dark";
|
|
6614
|
+
};
|
|
6615
|
+
}>>;
|
|
6604
6616
|
typography: z.ZodObject<{
|
|
6605
6617
|
body: z.ZodObject<{
|
|
6606
6618
|
family: z.ZodString;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { PageDesignEditorReadModel } from './pageDesignEditorModel';
|
|
2
2
|
import { type Theme } from '../schema';
|
|
3
3
|
import { type ButtonStyleSelection } from '../buttons/styles';
|
|
4
|
-
import type { CompleteResolvedPaletteSelection, PaletteSelection } from '../palette';
|
|
5
4
|
import { type CuratedSiteStyle } from './curatedSiteStyles';
|
|
6
5
|
import { type FooterLookId, type FooterSelectionResult } from './footerLooks';
|
|
7
6
|
import type { HeaderSelectionIdentity, SiteThemeCompilationPlan } from './compilationPlan';
|
|
@@ -34,7 +33,7 @@ export declare const previewCustomizePurpose: "preview-customize";
|
|
|
34
33
|
* `compileSiteThemeFromSelections` with the style's default curated palette.
|
|
35
34
|
*/
|
|
36
35
|
export declare function compileCuratedSiteStyleTheme(siteStyle: CuratedSiteStyle): CuratedSiteStyleTheme;
|
|
37
|
-
export declare function
|
|
36
|
+
export declare function defaultConcretePaletteForSiteStyle(siteStyle: CuratedSiteStyle): Theme['palette'];
|
|
38
37
|
export declare function compileCuratedSiteStyleThemeById(siteStyleId: SiteStyleId): CuratedSiteStyleTheme | null;
|
|
39
38
|
export type SelectionFallbackWarning = Readonly<{
|
|
40
39
|
kind: 'rejected-button-style';
|
|
@@ -45,7 +44,7 @@ type SiteThemeSelectionsCommonInput = Readonly<{
|
|
|
45
44
|
siteStyle: CuratedSiteStyle;
|
|
46
45
|
buttonStyleSelection: ButtonStyleSelection | null;
|
|
47
46
|
typography?: Theme['typography'];
|
|
48
|
-
|
|
47
|
+
palette: Theme['palette'];
|
|
49
48
|
}>;
|
|
50
49
|
export type ReplacementSiteThemeSelectionsInput = SiteThemeSelectionsCommonInput & Readonly<{
|
|
51
50
|
compilationPlan: Extract<SiteThemeCompilationPlan, {
|
|
@@ -62,7 +61,6 @@ export type SiteThemeSelectionsInput = SiteThemeSelectionsCommonInput & Readonly
|
|
|
62
61
|
}>;
|
|
63
62
|
type ResolvedSiteThemeSelections = Readonly<{
|
|
64
63
|
buttonStyleSelection: ButtonStyleSelection;
|
|
65
|
-
paletteSelection: PaletteSelection | null;
|
|
66
64
|
headerLookId: HeaderLookId | null;
|
|
67
65
|
headerLayoutId: HeaderLayoutId | null;
|
|
68
66
|
headerStyleId: HeaderStyleId | null;
|
|
@@ -103,8 +101,8 @@ export type UpdateSiteThemeSelectionsResult = SiteThemeSelectionsBaseResult<Reso
|
|
|
103
101
|
export type SiteThemeSelectionsResult = ReplacementSiteThemeSelectionsResult | UpdateSiteThemeSelectionsResult;
|
|
104
102
|
/**
|
|
105
103
|
* High-level, site-style-aware compiler. Resolves the user's button style and
|
|
106
|
-
* palette
|
|
107
|
-
*
|
|
104
|
+
* palette values into theme tokens. Palette authority is always supplied as a
|
|
105
|
+
* complete concrete value.
|
|
108
106
|
*
|
|
109
107
|
* Returns the resolved IDs so the caller can persist auto-pick decisions, plus
|
|
110
108
|
* any fallback warnings the UI can surface as "we changed your selection"
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { type CardStylesOverride, type ContainerStylesOverride, type SectionStylesOverride, type Theme } from '../schema';
|
|
2
2
|
import { type ExpandedPalette } from '../palette/expandPalette';
|
|
3
3
|
import { type ButtonStyleSelection } from '../buttons/styles';
|
|
4
|
-
import type { CompleteResolvedPaletteSelection } from '../palette/resolveSelection';
|
|
5
4
|
import { type RuntimeStyleWriteResultForFields, type StyleAuthority } from './designState';
|
|
6
5
|
import { type ContentFrameIntent, type BlockCompositionIntent, type EyebrowTreatment, type FlushFrameTreatment, type DesignBoundaryId, type PanelFrameTreatment, type ResolvedBlockDesignPlan, type ResolvedPageDesignPlan, type SiteStyleItemSurfaceIntent, type SiteStyleSectionTransitionIntent, type SiteStyleSurfaceIntent, type ThemeTokenRecipes } from './types';
|
|
7
6
|
import { type SectionBoundaryRuntimeMetrics } from './sectionTransitions';
|
|
@@ -334,8 +333,8 @@ export declare function compilePageRuntimeFields<TBlockId extends string, TPurpo
|
|
|
334
333
|
terminalSectionAdjacency?: TerminalSectionAdjacency;
|
|
335
334
|
}>): CompiledPageRuntime<TBlockId>;
|
|
336
335
|
type PaletteCompileOptions = Readonly<{
|
|
337
|
-
/** A complete palette
|
|
338
|
-
|
|
336
|
+
/** A complete concrete palette supplied by the theme/editor boundary. */
|
|
337
|
+
palette?: Theme['palette'];
|
|
339
338
|
}>;
|
|
340
339
|
export type CompileTokenRecipesOptions = Readonly<{
|
|
341
340
|
/** Validated button style selection. When provided, emits `theme.buttons`. */
|
|
@@ -346,9 +345,9 @@ export type CompileTokenRecipesOptions = Readonly<{
|
|
|
346
345
|
* pure and schema-validated so generated Theme V2 choices have a concrete legacy
|
|
347
346
|
* Theme output before any persistence or Phase 5 integration consumes them.
|
|
348
347
|
*
|
|
349
|
-
* Optional `options` accept
|
|
350
|
-
*
|
|
351
|
-
*
|
|
348
|
+
* Optional `options` accept a complete concrete palette and button style.
|
|
349
|
+
* Sparse overrides and palette identities are deliberately not compiler
|
|
350
|
+
* inputs.
|
|
352
351
|
*/
|
|
353
352
|
export declare function compileTokenRecipes(recipes: ThemeTokenRecipes, options?: CompileTokenRecipesOptions): Theme;
|
|
354
353
|
export {};
|