@riverbankcms/sdk 0.102.0 → 0.104.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 +10 -2
- package/dist/{PreviewEditorSidebar-BKkhhkJk.mjs → PreviewEditorSidebar-ywqcYjTB.mjs} +217 -131
- package/dist/{PreviewEditorUI-DIvTqcqI.mjs → PreviewEditorUI-DApUNF6g.mjs} +3 -3
- package/dist/{PreviewQueryProvider-ZF6TXq5Q.mjs → PreviewQueryProvider-CStABBUh.mjs} +1 -1
- package/dist/{SdkPreviewModeRuntime-CA2k7Z_T.mjs → SdkPreviewModeRuntime-DmHCcIMO.mjs} +1738 -815
- package/dist/{SiteChromeCustomizeContext-Bh9-DtMQ.mjs → SiteChromeCustomizeContext-BV9GU-3C.mjs} +3517 -2524
- package/dist/_dts/ai/src/contracts/proposals.d.ts +298 -298
- package/dist/_dts/api/src/contentRuntime.d.ts +6 -3
- package/dist/_dts/api/src/endpoints.d.ts +10 -3
- package/dist/_dts/api/src/index.d.ts +2 -2
- package/dist/_dts/api/src/navigation/contracts.d.ts +6 -6
- package/dist/_dts/api/src/siteBanner.d.ts +2 -2
- package/dist/_dts/api/src/siteIcons.d.ts +39 -43
- package/dist/_dts/api/src/siteManagementEndpoints.d.ts +3 -3
- package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +36 -7
- package/dist/_dts/block-form/src/widgets/SliderField/SliderField.d.ts +3 -3
- package/dist/_dts/block-form/src/widgets/SliderField/sliderValue.d.ts +36 -0
- package/dist/_dts/block-form/src/widgets/utils/readNumericUiConfig.d.ts +3 -0
- package/dist/_dts/blocks/src/PageRenderer.d.ts +6 -1
- package/dist/_dts/blocks/src/bindings/index.d.ts +2 -2
- package/dist/_dts/blocks/src/index.d.ts +2 -2
- package/dist/_dts/blocks/src/server.d.ts +1 -1
- package/dist/_dts/blocks/src/system/blocks/courses/shared/schemas.d.ts +7 -7
- package/dist/_dts/blocks/src/system/blocks/events/event-calendar.d.ts +1 -1
- package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +14 -14
- package/dist/_dts/blocks/src/system/blocks/feature-card-icons.d.ts +29 -29
- package/dist/_dts/blocks/src/system/blocks/feature-cards.d.ts +1 -0
- package/dist/_dts/blocks/src/system/blocks/location-map.d.ts +8 -5
- package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +362 -227
- package/dist/_dts/blocks/src/system/blocks/offerings-preview/model.d.ts +1 -1
- package/dist/_dts/blocks/src/system/constants/background.d.ts +1 -1
- package/dist/_dts/blocks/src/system/customize/facets.d.ts +2 -2
- package/dist/_dts/blocks/src/system/icons/generatedAssets.d.ts +28 -0
- package/dist/_dts/blocks/src/system/icons/index.d.ts +1 -0
- package/dist/_dts/blocks/src/system/icons/value.d.ts +3 -6
- package/dist/_dts/blocks/src/system/inlineText.d.ts +2 -2
- package/dist/_dts/blocks/src/system/manifest/schema.d.ts +417 -177
- package/dist/_dts/blocks/src/system/node/schema.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/feature-card-icon.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/shared/contract-schemas.d.ts +7 -7
- package/dist/_dts/blocks/src/system/transforms/typed.d.ts +1 -1
- package/dist/_dts/content-editor/src/ui/editorUiStore.d.ts +2 -0
- package/dist/_dts/content-editor/src/ui/stores/generatedIconAssetsStore.d.ts +9 -0
- package/dist/_dts/content-model/src/content-types/schema.d.ts +8 -8
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +344 -0
- package/dist/_dts/db/src/schemas/forms.d.ts +15 -15
- package/dist/_dts/editor-blocks/src/BlockEditor.d.ts +7 -0
- package/dist/_dts/editor-blocks/src/BlockForm.d.ts +2 -1
- package/dist/_dts/editor-blocks/src/block-editor/BlockCard.d.ts +4 -4
- package/dist/_dts/editor-blocks/src/block-editor/BlockCardBody.d.ts +2 -3
- package/dist/_dts/editor-blocks/src/block-editor/BlockCardHeader.d.ts +4 -4
- package/dist/_dts/editor-blocks/src/block-editor/FeatureCardIconsPanel.d.ts +4 -4
- package/dist/_dts/editor-blocks/src/block-editor/GeneratedIconSetDialog.d.ts +3 -3
- package/dist/_dts/editor-blocks/src/block-editor/SortableBlockItem.d.ts +2 -3
- package/dist/_dts/editor-blocks/src/block-editor/blockHeaderActionPlan.d.ts +1 -5
- package/dist/_dts/editor-blocks/src/block-editor/featureCardIconActions.d.ts +25 -19
- package/dist/_dts/editor-blocks/src/block-editor/generatedIconApplyCoordination.d.ts +32 -0
- package/dist/_dts/editor-blocks/src/widgets/icon-picker/GeneratedIconLibraryContext.d.ts +28 -0
- package/dist/_dts/editor-blocks/src/widgets/icon-picker/index.d.ts +2 -0
- package/dist/_dts/editor-blocks/src/widgets/icon-picker/loaders.d.ts +7 -0
- package/dist/_dts/preview-next/src/client/blocks/previewProjection/types.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/preview/CustomizeBackgroundControlRows.d.ts +15 -0
- package/dist/_dts/preview-next/src/client/preview/CustomizeColorTokenPicker.d.ts +27 -0
- package/dist/_dts/preview-next/src/client/preview/EntryEditorPanel.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/preview/EntrySlotBlockEditorPanel.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/preview/PageBlockEditorPanel.d.ts +3 -1
- package/dist/_dts/preview-next/src/client/preview/PreviewEditorSidebar.d.ts +4 -3
- package/dist/_dts/preview-next/src/client/preview/PreviewShell.d.ts +4 -3
- package/dist/_dts/preview-next/src/client/preview/PreviewShellLayout.d.ts +4 -3
- package/dist/_dts/preview-next/src/client/preview/SiteChromeCustomizeContext.d.ts +13 -6
- package/dist/_dts/preview-next/src/client/preview/StyleConfigurator.d.ts +5 -4
- package/dist/_dts/preview-next/src/client/preview/StyleConfigurator.state.d.ts +44 -18
- package/dist/_dts/preview-next/src/client/preview/sidebarTabPreference.d.ts +1 -1
- package/dist/_dts/preview-next/src/client/preview/siteChromeQuickControlHistoryState.d.ts +16 -1
- package/dist/_dts/preview-next/src/client/preview/siteChromeSavePlan.d.ts +3 -2
- package/dist/_dts/preview-next/src/client/preview/siteStylePreviewPlanner.d.ts +4 -5
- package/dist/_dts/preview-next/src/client/preview/styleConfiguratorApplyPayload.d.ts +22 -1
- package/dist/_dts/preview-next/src/client/preview/styleConfiguratorSnapshot.d.ts +12 -4
- package/dist/_dts/sdk/src/client/management/types.d.ts +3 -0
- package/dist/_dts/sdk/src/config/validation.d.ts +3 -3
- package/dist/_dts/sdk/src/contracts/index.d.ts +1 -1
- package/dist/_dts/sdk/src/contracts/page.d.ts +2 -0
- package/dist/_dts/sdk/src/contracts/system-block-content.d.ts +0 -1
- package/dist/_dts/sdk/src/manifest/passes/pass1-fields.d.ts +10 -10
- package/dist/_dts/sdk/src/next/revalidate.d.ts +14 -1
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +9 -6
- package/dist/_dts/sdk/src/rendering/blocks-page-renderer.d.ts +2 -1
- package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +3 -2
- package/dist/_dts/sdk/src/rendering/helpers/loadContent.d.ts +3 -4
- package/dist/_dts/sdk/src/rendering/hooks/useContent.d.ts +1 -0
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/site-commands/src/commands.d.ts +19 -19
- package/dist/_dts/theme-core/src/accordions/types.d.ts +3 -3
- package/dist/_dts/theme-core/src/buttons/personalities/types.d.ts +3 -3
- package/dist/_dts/theme-core/src/buttons/types.d.ts +7 -7
- package/dist/_dts/theme-core/src/cards/types.d.ts +6 -6
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/inputs/types.d.ts +4 -4
- package/dist/_dts/theme-core/src/mock-themes/all.d.ts +156 -150
- package/dist/_dts/theme-core/src/navigation/types.d.ts +8 -6
- package/dist/_dts/theme-core/src/palette/colors.d.ts +84 -0
- package/dist/_dts/theme-core/src/palette/{variants → curated}/brand-led.d.ts +12 -24
- package/dist/_dts/theme-core/src/palette/{variants → curated}/high-contrast.d.ts +9 -18
- package/dist/_dts/theme-core/src/palette/{variants → curated}/index.d.ts +67 -119
- package/dist/_dts/theme-core/src/palette/{variants → curated}/soft-natural.d.ts +12 -24
- package/dist/_dts/theme-core/src/palette/{variants → curated}/types.d.ts +52 -62
- package/dist/_dts/theme-core/src/palette/{variants → curated}/warm-dark.d.ts +6 -12
- package/dist/_dts/theme-core/src/palette/{variants → curated}/warm-neutral.d.ts +12 -24
- package/dist/_dts/theme-core/src/palette/editorState.d.ts +45 -0
- package/dist/_dts/theme-core/src/palette/index.d.ts +25 -14
- package/dist/_dts/theme-core/src/palette/legacyRuntimeProjection.d.ts +38 -0
- package/dist/_dts/theme-core/src/palette/legacySelection.d.ts +34 -0
- package/dist/_dts/theme-core/src/palette/libraryModel.d.ts +58 -0
- package/dist/_dts/theme-core/src/palette/paletteCompatibilityTransition.d.ts +241 -0
- package/dist/_dts/theme-core/src/palette/persistenceReadSource.d.ts +118 -0
- package/dist/_dts/theme-core/src/palette/resolveSelection.d.ts +50 -0
- package/dist/_dts/theme-core/src/palette/selection.d.ts +72 -0
- package/dist/_dts/theme-core/src/palette/sitePalettePersistence.d.ts +34 -0
- package/dist/_dts/theme-core/src/palette/themePaletteCompatibility.d.ts +58 -0
- package/dist/_dts/theme-core/src/schema.d.ts +208 -169
- package/dist/_dts/theme-core/src/site-styles/backgroundAppearance.d.ts +2 -2
- package/dist/_dts/theme-core/src/site-styles/contentTemplateRuntimeCompiler.d.ts +2 -1
- package/dist/_dts/theme-core/src/site-styles/curatedSiteStyles.d.ts +22 -22
- package/dist/_dts/theme-core/src/site-styles/designState.d.ts +24 -24
- package/dist/_dts/theme-core/src/site-styles/generatedSchemas.d.ts +2 -2
- package/dist/_dts/theme-core/src/site-styles/index.d.ts +2 -0
- package/dist/_dts/theme-core/src/site-styles/previewCompiler.d.ts +35 -11
- package/dist/_dts/theme-core/src/site-styles/runtimeCompiler.d.ts +48 -17
- package/dist/_dts/theme-core/src/site-styles/sectionTransitions.d.ts +77 -0
- package/dist/_dts/theme-core/src/site-styles/siteChromeNavPreferences.d.ts +45 -0
- package/dist/_dts/theme-core/src/site-styles/styleTags.d.ts +1 -1
- package/dist/_dts/theme-core/src/site-styles/themeParity.d.ts +21 -0
- package/dist/_dts/theme-core/src/site-styles/tokenRecipes.d.ts +1 -1
- package/dist/_dts/theme-core/src/tokens/themeColorTokens.d.ts +3 -3
- package/dist/_dts/ui/src/badge.d.ts +1 -1
- package/dist/_dts/ui/src/button.d.ts +1 -1
- package/dist/_dts/ui/src/card.d.ts +1 -1
- package/dist/_dts/ui/src/palette/PaletteTokenEditor.d.ts +2 -1
- package/dist/_dts/ui/src/toggle.d.ts +2 -2
- package/dist/cli/index.mjs +7815 -7445
- package/dist/cli/init-docs/content/workflow-isr-revalidation.md +9 -1
- package/dist/client/{DiscountCodeDisclosure-ChVZwVtS.mjs → DiscountCodeDisclosure-Dit2aItR.mjs} +1 -1
- package/dist/client/{EventCombined.client-PZtXbH6R.mjs → EventCombined.client-BnREyCjf.mjs} +3 -3
- package/dist/client/{EventListing.client-C4AMTXec.mjs → EventListing.client-0uHld51x.mjs} +2 -2
- package/dist/client/{LeafletStaticMap-B0w8_i0u.mjs → LeafletStaticMap-DJcvSfmj.mjs} +1 -1
- package/dist/client/{MagicLinkForm-DF0ZGhIu.mjs → MagicLinkForm-EAsIktfw.mjs} +2 -2
- package/dist/client/{StepIndicator-PccQ89Ct.mjs → StepIndicator-CRR17tYI.mjs} +2 -2
- package/dist/client/{accordion-CTNWT1lk.mjs → accordion-B47HIuuH.mjs} +1 -1
- package/dist/client/{bookingForm-DYixwPqP.mjs → bookingForm-I1E-8F9P.mjs} +6 -6
- package/dist/client/{buttons-CySQwlFs.mjs → buttons-BbPn8OKA.mjs} +1 -1
- package/dist/client/{carousel-W75iYR0M.mjs → carousel-OlM7SyBs.mjs} +1 -1
- package/dist/client/{cart-Ca_DGWQq.mjs → cart-BKpG5jz6.mjs} +3 -3
- package/dist/client/{checkout-STgKTsNh.mjs → checkout-Dmmr6qoU.mjs} +3 -3
- package/dist/client/client.mjs +9000 -8353
- package/dist/client/{courseRegistration-DQI1cu1u.mjs → courseRegistration-CflZiqGk.mjs} +7 -7
- package/dist/client/{eventCalendar-BJrHpofg.mjs → eventCalendar-BvoLWcp-.mjs} +5 -5
- package/dist/client/{eventCombined-DPtqBHaH.mjs → eventCombined-DsrO8t_t.mjs} +2 -2
- package/dist/client/{eventDetails-Brt31CDo.mjs → eventDetails-C3hxgcJm.mjs} +3 -3
- package/dist/client/{eventListing-BrClHJOq.mjs → eventListing-C-hb237X.mjs} +2 -2
- package/dist/client/{eventRegistration-DxlNlVUC.mjs → eventRegistration-B0gyzDGi.mjs} +7 -7
- package/dist/client/{form-Vp5cGzDF.mjs → form-C_RUi6oJ.mjs} +2 -2
- package/dist/client/{headerSection-DL2xjRgW.mjs → headerSection-IKQiD2U0.mjs} +3 -3
- package/dist/client/hooks.mjs +4792 -4606
- package/dist/client/{locationMap-B0EjoXQS.mjs → locationMap-8ZBrMzRJ.mjs} +2 -2
- package/dist/client/{newsletterForm-BlV9VRlq.mjs → newsletterForm-CYk3ucwj.mjs} +2 -2
- package/dist/client/{pricing-DmRD7Tjx.mjs → pricing-B5GmvfIH.mjs} +1 -1
- package/dist/client/{productDetail-BLTQsY2f.mjs → productDetail-BjS2Dqzo.mjs} +3 -3
- package/dist/client/{productList-R8lsMpRs.mjs → productList-BOHvC8My.mjs} +3 -3
- package/dist/client/{propsDecoder-DgAshF92.mjs → propsDecoder-WS6UEJwZ.mjs} +7 -0
- package/dist/client/rendering/client.mjs +3565 -3218
- package/dist/client/rendering/islands.mjs +18 -18
- package/dist/client/rendering.mjs +8919 -8279
- package/dist/client/{shop-DWjyje1s.mjs → shop-CON03-wN.mjs} +6 -6
- package/dist/client/{shop-commerce-CSKCR87d.mjs → shop-commerce-DlqrFgH8.mjs} +5 -5
- package/dist/client/{shop-commerce-store-DxPnE-iN.mjs → shop-commerce-store-l74-Kne6.mjs} +1 -1
- package/dist/client/{shopShared-OOeAkFq7.mjs → shopShared-CQheEXSg.mjs} +2 -2
- package/dist/client/{useDiscountCodeUi-Bp6X7XgG.mjs → useDiscountCodeUi-v6OluyWl.mjs} +1 -1
- package/dist/client/{useEventFilters-B489x9TO.mjs → useEventFilters-BqSTcNOf.mjs} +3 -3
- package/dist/client/{usePolling-BKP66stL.mjs → usePolling-DMfADjIF.mjs} +2 -2
- package/dist/preview-next/before-render.mjs +10 -3
- package/dist/preview-next/client/runtime.mjs +4 -4
- package/dist/preview-next/middleware.mjs +10 -3
- package/dist/{previewAuthStore-ByPPZqmp.mjs → previewAuthStore-CfquDtTh.mjs} +10 -3
- package/dist/{sdk-runtime-K8Oqj97H.mjs → sdk-runtime-DWb08Xaz.mjs} +2 -2
- package/dist/{separator-CRoP34pT.mjs → separator--6yjc914.mjs} +1 -1
- package/dist/server/components.mjs +10183 -9621
- package/dist/server/config-validation.mjs +4871 -4686
- package/dist/server/config.mjs +4871 -4686
- package/dist/server/data.mjs +4848 -4663
- package/dist/server/index.mjs +11 -4
- package/dist/server/next/revalidate.mjs +31 -1
- package/dist/server/next.mjs +9894 -9322
- package/dist/server/page-converter.mjs +4758 -4573
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +10099 -9619
- package/dist/server/rendering.mjs +10195 -9631
- package/dist/server/routing.mjs +4985 -4701
- package/dist/server/server.mjs +4823 -4629
- package/dist/server/theme-bridge.mjs +360 -146
- package/dist/server/theme.mjs +94 -91
- package/dist/styles/index.css +143 -30
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Studio, Modern Wellness, Warm Editorial site styles.
|
|
4
4
|
*/
|
|
5
5
|
export declare const softNaturalSage: Readonly<{
|
|
6
|
-
id: import("../../../../blocks/src/index").
|
|
6
|
+
id: import("../../../../blocks/src/index").CuratedPaletteId<"soft-natural-sage">;
|
|
7
7
|
name: string;
|
|
8
8
|
description: string;
|
|
9
9
|
tags: Readonly<Partial<Readonly<{
|
|
@@ -12,14 +12,11 @@ export declare const softNaturalSage: Readonly<{
|
|
|
12
12
|
motion: import("../../../../blocks/src/index").StyleMotion;
|
|
13
13
|
era: import("../../../../blocks/src/index").StyleEra;
|
|
14
14
|
}>>>;
|
|
15
|
-
mode: "
|
|
16
|
-
colors:
|
|
17
|
-
name: import("../../../../blocks/src/index").PaletteTokenName;
|
|
18
|
-
hex: string;
|
|
19
|
-
}>[];
|
|
15
|
+
mode: import("../../../../blocks/src/index").PaletteMode;
|
|
16
|
+
colors: import("../../../../blocks/src/index").PaletteColors;
|
|
20
17
|
}>;
|
|
21
18
|
export declare const softNaturalStone: Readonly<{
|
|
22
|
-
id: import("../../../../blocks/src/index").
|
|
19
|
+
id: import("../../../../blocks/src/index").CuratedPaletteId<"soft-natural-stone">;
|
|
23
20
|
name: string;
|
|
24
21
|
description: string;
|
|
25
22
|
tags: Readonly<Partial<Readonly<{
|
|
@@ -28,14 +25,11 @@ export declare const softNaturalStone: Readonly<{
|
|
|
28
25
|
motion: import("../../../../blocks/src/index").StyleMotion;
|
|
29
26
|
era: import("../../../../blocks/src/index").StyleEra;
|
|
30
27
|
}>>>;
|
|
31
|
-
mode: "
|
|
32
|
-
colors:
|
|
33
|
-
name: import("../../../../blocks/src/index").PaletteTokenName;
|
|
34
|
-
hex: string;
|
|
35
|
-
}>[];
|
|
28
|
+
mode: import("../../../../blocks/src/index").PaletteMode;
|
|
29
|
+
colors: import("../../../../blocks/src/index").PaletteColors;
|
|
36
30
|
}>;
|
|
37
31
|
export declare const softNaturalWatercolor: Readonly<{
|
|
38
|
-
id: import("../../../../blocks/src/index").
|
|
32
|
+
id: import("../../../../blocks/src/index").CuratedPaletteId<"soft-natural-watercolor">;
|
|
39
33
|
name: string;
|
|
40
34
|
description: string;
|
|
41
35
|
tags: Readonly<Partial<Readonly<{
|
|
@@ -44,14 +38,11 @@ export declare const softNaturalWatercolor: Readonly<{
|
|
|
44
38
|
motion: import("../../../../blocks/src/index").StyleMotion;
|
|
45
39
|
era: import("../../../../blocks/src/index").StyleEra;
|
|
46
40
|
}>>>;
|
|
47
|
-
mode: "
|
|
48
|
-
colors:
|
|
49
|
-
name: import("../../../../blocks/src/index").PaletteTokenName;
|
|
50
|
-
hex: string;
|
|
51
|
-
}>[];
|
|
41
|
+
mode: import("../../../../blocks/src/index").PaletteMode;
|
|
42
|
+
colors: import("../../../../blocks/src/index").PaletteColors;
|
|
52
43
|
}>;
|
|
53
44
|
export declare const softNaturalLilac: Readonly<{
|
|
54
|
-
id: import("../../../../blocks/src/index").
|
|
45
|
+
id: import("../../../../blocks/src/index").CuratedPaletteId<"soft-natural-lilac">;
|
|
55
46
|
name: string;
|
|
56
47
|
description: string;
|
|
57
48
|
tags: Readonly<Partial<Readonly<{
|
|
@@ -60,9 +51,6 @@ export declare const softNaturalLilac: Readonly<{
|
|
|
60
51
|
motion: import("../../../../blocks/src/index").StyleMotion;
|
|
61
52
|
era: import("../../../../blocks/src/index").StyleEra;
|
|
62
53
|
}>>>;
|
|
63
|
-
mode: "
|
|
64
|
-
colors:
|
|
65
|
-
name: import("../../../../blocks/src/index").PaletteTokenName;
|
|
66
|
-
hex: string;
|
|
67
|
-
}>[];
|
|
54
|
+
mode: import("../../../../blocks/src/index").PaletteMode;
|
|
55
|
+
colors: import("../../../../blocks/src/index").PaletteColors;
|
|
68
56
|
}>;
|
|
@@ -1,48 +1,31 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { type StyleTags } from '../../site-styles/styleTags';
|
|
3
3
|
import { PALETTE_TOKEN_NAMES, paletteTokenNameSchema, type PaletteTokenName } from '../../tokens/themeColorTokens';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
*/
|
|
10
|
-
export type PaletteVariantId<T extends string = string> = T & {
|
|
11
|
-
readonly __brand: 'PaletteVariantId';
|
|
12
|
-
};
|
|
13
|
-
export declare function asPaletteVariantId<const T extends string>(value: T): PaletteVariantId<T>;
|
|
14
|
-
export declare const paletteVariantIdSchema: z.ZodPipe<z.ZodString, z.ZodTransform<PaletteVariantId<string>, string>>;
|
|
15
|
-
export type HexColor = string & {
|
|
16
|
-
readonly __brand: 'HexColor';
|
|
4
|
+
import { hexColorSchema, paletteColorsSchema, paletteModeSchema, type HexColor, type PaletteColorEntry, type PaletteColors, type PaletteMode } from '../colors';
|
|
5
|
+
export { PALETTE_TOKEN_NAMES, hexColorSchema, paletteColorsSchema, paletteModeSchema, paletteTokenNameSchema, type PaletteTokenName, };
|
|
6
|
+
export type { HexColor, PaletteColorEntry, PaletteColors, PaletteMode };
|
|
7
|
+
export type CuratedPaletteId<T extends string = string> = T & {
|
|
8
|
+
readonly __brand: 'CuratedPaletteId';
|
|
17
9
|
};
|
|
18
|
-
export declare const
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
* `PaletteTokenName` union so authoring typos (`'priamry'`) are caught at
|
|
22
|
-
* compile time; the value side stays as raw `string` (validated by
|
|
23
|
-
* `paletteColorSchema`'s less-strict regex for back-compat with existing data).
|
|
24
|
-
*/
|
|
25
|
-
export type PaletteColor = Readonly<{
|
|
26
|
-
name: PaletteTokenName;
|
|
27
|
-
hex: string;
|
|
28
|
-
}>;
|
|
29
|
-
export type PaletteVariant<TId extends PaletteVariantId = PaletteVariantId> = Readonly<{
|
|
10
|
+
export declare function asCuratedPaletteId<const T extends string>(value: T): CuratedPaletteId<T>;
|
|
11
|
+
export declare const curatedPaletteIdSchema: z.ZodPipe<z.ZodString, z.ZodTransform<CuratedPaletteId<string>, string>>;
|
|
12
|
+
export type CuratedPalette<TId extends CuratedPaletteId = CuratedPaletteId> = Readonly<{
|
|
30
13
|
id: TId;
|
|
31
14
|
name: string;
|
|
32
15
|
description: string;
|
|
33
16
|
tags: StyleTags;
|
|
34
|
-
mode:
|
|
35
|
-
colors:
|
|
17
|
+
mode: PaletteMode;
|
|
18
|
+
colors: PaletteColors;
|
|
36
19
|
}>;
|
|
37
|
-
export declare const
|
|
38
|
-
id: z.ZodPipe<z.ZodString, z.ZodTransform<
|
|
20
|
+
export declare const curatedPaletteSchema: z.ZodObject<{
|
|
21
|
+
id: z.ZodPipe<z.ZodString, z.ZodTransform<CuratedPaletteId<string>, string>>;
|
|
39
22
|
name: z.ZodString;
|
|
40
23
|
description: z.ZodString;
|
|
41
24
|
tags: z.ZodObject<{
|
|
42
25
|
tone: z.ZodOptional<z.ZodEnum<{
|
|
43
|
-
classic: "classic";
|
|
44
26
|
bold: "bold";
|
|
45
27
|
minimal: "minimal";
|
|
28
|
+
classic: "classic";
|
|
46
29
|
}>>;
|
|
47
30
|
energy: z.ZodOptional<z.ZodEnum<{
|
|
48
31
|
calm: "calm";
|
|
@@ -65,45 +48,52 @@ export declare const paletteVariantSchema: z.ZodObject<{
|
|
|
65
48
|
light: "light";
|
|
66
49
|
dark: "dark";
|
|
67
50
|
}>;
|
|
68
|
-
colors: z.
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
51
|
+
colors: z.ZodPipe<z.ZodObject<{
|
|
52
|
+
primary: z.ZodPipe<z.ZodString, z.ZodTransform<HexColor, string>>;
|
|
53
|
+
primaryForeground: z.ZodPipe<z.ZodString, z.ZodTransform<HexColor, string>>;
|
|
54
|
+
secondary: z.ZodPipe<z.ZodString, z.ZodTransform<HexColor, string>>;
|
|
55
|
+
accent: z.ZodPipe<z.ZodString, z.ZodTransform<HexColor, string>>;
|
|
56
|
+
success: z.ZodPipe<z.ZodString, z.ZodTransform<HexColor, string>>;
|
|
57
|
+
warning: z.ZodPipe<z.ZodString, z.ZodTransform<HexColor, string>>;
|
|
58
|
+
destructive: z.ZodPipe<z.ZodString, z.ZodTransform<HexColor, string>>;
|
|
59
|
+
background: z.ZodPipe<z.ZodString, z.ZodTransform<HexColor, string>>;
|
|
60
|
+
surface: z.ZodPipe<z.ZodString, z.ZodTransform<HexColor, string>>;
|
|
61
|
+
surfaceAlt: z.ZodPipe<z.ZodString, z.ZodTransform<HexColor, string>>;
|
|
62
|
+
muted: z.ZodPipe<z.ZodString, z.ZodTransform<HexColor, string>>;
|
|
63
|
+
text: z.ZodPipe<z.ZodString, z.ZodTransform<HexColor, string>>;
|
|
64
|
+
border: z.ZodPipe<z.ZodString, z.ZodTransform<HexColor, string>>;
|
|
65
|
+
}, z.core.$strict>, z.ZodTransform<Readonly<Record<"surface" | "success" | "text" | "warning" | "background" | "accent" | "muted" | "border" | "primary" | "secondary" | "destructive" | "surfaceAlt" | "primaryForeground", HexColor>>, {
|
|
66
|
+
primary: HexColor;
|
|
67
|
+
primaryForeground: HexColor;
|
|
68
|
+
secondary: HexColor;
|
|
69
|
+
accent: HexColor;
|
|
70
|
+
success: HexColor;
|
|
71
|
+
warning: HexColor;
|
|
72
|
+
destructive: HexColor;
|
|
73
|
+
background: HexColor;
|
|
74
|
+
surface: HexColor;
|
|
75
|
+
surfaceAlt: HexColor;
|
|
76
|
+
muted: HexColor;
|
|
77
|
+
text: HexColor;
|
|
78
|
+
border: HexColor;
|
|
79
|
+
}>>;
|
|
86
80
|
}, z.core.$strip>;
|
|
87
|
-
export declare function
|
|
81
|
+
export declare function defineCuratedPalette<const TId extends string>(input: {
|
|
88
82
|
id: TId;
|
|
89
83
|
name: string;
|
|
90
84
|
description: string;
|
|
91
85
|
tags: StyleTags;
|
|
92
|
-
mode:
|
|
93
|
-
colors: ReadonlyArray<
|
|
94
|
-
|
|
86
|
+
mode: PaletteMode;
|
|
87
|
+
colors: ReadonlyArray<Readonly<{
|
|
88
|
+
name: PaletteTokenName;
|
|
89
|
+
hex: string;
|
|
90
|
+
}>>;
|
|
91
|
+
}): CuratedPalette<CuratedPaletteId<TId>>;
|
|
95
92
|
/**
|
|
96
|
-
*
|
|
97
|
-
* `site_theme_selections.palette_overrides
|
|
98
|
-
* applied; the palette variant's own colours render unchanged."
|
|
93
|
+
* Migration-only sparse colours from the legacy
|
|
94
|
+
* `site_theme_selections.palette_overrides` contract.
|
|
99
95
|
*/
|
|
100
96
|
export type PaletteOverrides = Readonly<Partial<Record<PaletteTokenName, HexColor>>>;
|
|
101
|
-
/**
|
|
102
|
-
* Sparse object of known token names → hex colours. Unknown keys are
|
|
103
|
-
* rejected at parse time; missing keys mean "no override for that token".
|
|
104
|
-
* Built as an explicit partial-object schema (rather than `z.record(enum, …)`)
|
|
105
|
-
* for unambiguous closure under Zod 4.
|
|
106
|
-
*/
|
|
107
97
|
export declare const paletteOverridesSchema: z.ZodPipe<z.ZodObject<{
|
|
108
98
|
primary: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<HexColor, string>>>;
|
|
109
99
|
primaryForeground: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<HexColor, string>>>;
|
|
@@ -118,7 +108,7 @@ export declare const paletteOverridesSchema: z.ZodPipe<z.ZodObject<{
|
|
|
118
108
|
muted: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<HexColor, string>>>;
|
|
119
109
|
text: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<HexColor, string>>>;
|
|
120
110
|
border: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<HexColor, string>>>;
|
|
121
|
-
}, z.core.$strict>, z.ZodTransform<Readonly<Partial<Record<"surface" | "success" | "text" | "
|
|
111
|
+
}, z.core.$strict>, z.ZodTransform<Readonly<Partial<Record<"surface" | "success" | "text" | "warning" | "background" | "accent" | "muted" | "border" | "primary" | "secondary" | "destructive" | "surfaceAlt" | "primaryForeground", HexColor>>>, {
|
|
122
112
|
primary?: HexColor | undefined;
|
|
123
113
|
primaryForeground?: HexColor | undefined;
|
|
124
114
|
secondary?: HexColor | undefined;
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* scale, `mutedText`, and derived on-colors invert correctly.
|
|
11
11
|
*/
|
|
12
12
|
export declare const warmDarkEmber: Readonly<{
|
|
13
|
-
id: import("../../../../blocks/src/index").
|
|
13
|
+
id: import("../../../../blocks/src/index").CuratedPaletteId<"warm-dark-ember">;
|
|
14
14
|
name: string;
|
|
15
15
|
description: string;
|
|
16
16
|
tags: Readonly<Partial<Readonly<{
|
|
@@ -19,14 +19,11 @@ export declare const warmDarkEmber: Readonly<{
|
|
|
19
19
|
motion: import("../../../../blocks/src/index").StyleMotion;
|
|
20
20
|
era: import("../../../../blocks/src/index").StyleEra;
|
|
21
21
|
}>>>;
|
|
22
|
-
mode: "
|
|
23
|
-
colors:
|
|
24
|
-
name: import("../../../../blocks/src/index").PaletteTokenName;
|
|
25
|
-
hex: string;
|
|
26
|
-
}>[];
|
|
22
|
+
mode: import("../../../../blocks/src/index").PaletteMode;
|
|
23
|
+
colors: import("../../../../blocks/src/index").PaletteColors;
|
|
27
24
|
}>;
|
|
28
25
|
export declare const warmDarkKirtanGold: Readonly<{
|
|
29
|
-
id: import("../../../../blocks/src/index").
|
|
26
|
+
id: import("../../../../blocks/src/index").CuratedPaletteId<"warm-dark-kirtan-gold">;
|
|
30
27
|
name: string;
|
|
31
28
|
description: string;
|
|
32
29
|
tags: Readonly<Partial<Readonly<{
|
|
@@ -35,9 +32,6 @@ export declare const warmDarkKirtanGold: Readonly<{
|
|
|
35
32
|
motion: import("../../../../blocks/src/index").StyleMotion;
|
|
36
33
|
era: import("../../../../blocks/src/index").StyleEra;
|
|
37
34
|
}>>>;
|
|
38
|
-
mode: "
|
|
39
|
-
colors:
|
|
40
|
-
name: import("../../../../blocks/src/index").PaletteTokenName;
|
|
41
|
-
hex: string;
|
|
42
|
-
}>[];
|
|
35
|
+
mode: import("../../../../blocks/src/index").PaletteMode;
|
|
36
|
+
colors: import("../../../../blocks/src/index").PaletteColors;
|
|
43
37
|
}>;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Warm Editorial, Modern Wellness, Calm Studio site styles.
|
|
4
4
|
*/
|
|
5
5
|
export declare const warmNeutralClay: Readonly<{
|
|
6
|
-
id: import("../../../../blocks/src/index").
|
|
6
|
+
id: import("../../../../blocks/src/index").CuratedPaletteId<"warm-neutral-clay">;
|
|
7
7
|
name: string;
|
|
8
8
|
description: string;
|
|
9
9
|
tags: Readonly<Partial<Readonly<{
|
|
@@ -12,14 +12,11 @@ export declare const warmNeutralClay: Readonly<{
|
|
|
12
12
|
motion: import("../../../../blocks/src/index").StyleMotion;
|
|
13
13
|
era: import("../../../../blocks/src/index").StyleEra;
|
|
14
14
|
}>>>;
|
|
15
|
-
mode: "
|
|
16
|
-
colors:
|
|
17
|
-
name: import("../../../../blocks/src/index").PaletteTokenName;
|
|
18
|
-
hex: string;
|
|
19
|
-
}>[];
|
|
15
|
+
mode: import("../../../../blocks/src/index").PaletteMode;
|
|
16
|
+
colors: import("../../../../blocks/src/index").PaletteColors;
|
|
20
17
|
}>;
|
|
21
18
|
export declare const warmNeutralCream: Readonly<{
|
|
22
|
-
id: import("../../../../blocks/src/index").
|
|
19
|
+
id: import("../../../../blocks/src/index").CuratedPaletteId<"warm-neutral-cream">;
|
|
23
20
|
name: string;
|
|
24
21
|
description: string;
|
|
25
22
|
tags: Readonly<Partial<Readonly<{
|
|
@@ -28,14 +25,11 @@ export declare const warmNeutralCream: Readonly<{
|
|
|
28
25
|
motion: import("../../../../blocks/src/index").StyleMotion;
|
|
29
26
|
era: import("../../../../blocks/src/index").StyleEra;
|
|
30
27
|
}>>>;
|
|
31
|
-
mode: "
|
|
32
|
-
colors:
|
|
33
|
-
name: import("../../../../blocks/src/index").PaletteTokenName;
|
|
34
|
-
hex: string;
|
|
35
|
-
}>[];
|
|
28
|
+
mode: import("../../../../blocks/src/index").PaletteMode;
|
|
29
|
+
colors: import("../../../../blocks/src/index").PaletteColors;
|
|
36
30
|
}>;
|
|
37
31
|
export declare const warmNeutralSoftEarth: Readonly<{
|
|
38
|
-
id: import("../../../../blocks/src/index").
|
|
32
|
+
id: import("../../../../blocks/src/index").CuratedPaletteId<"warm-neutral-soft-earth">;
|
|
39
33
|
name: string;
|
|
40
34
|
description: string;
|
|
41
35
|
tags: Readonly<Partial<Readonly<{
|
|
@@ -44,14 +38,11 @@ export declare const warmNeutralSoftEarth: Readonly<{
|
|
|
44
38
|
motion: import("../../../../blocks/src/index").StyleMotion;
|
|
45
39
|
era: import("../../../../blocks/src/index").StyleEra;
|
|
46
40
|
}>>>;
|
|
47
|
-
mode: "
|
|
48
|
-
colors:
|
|
49
|
-
name: import("../../../../blocks/src/index").PaletteTokenName;
|
|
50
|
-
hex: string;
|
|
51
|
-
}>[];
|
|
41
|
+
mode: import("../../../../blocks/src/index").PaletteMode;
|
|
42
|
+
colors: import("../../../../blocks/src/index").PaletteColors;
|
|
52
43
|
}>;
|
|
53
44
|
export declare const warmNeutralForest: Readonly<{
|
|
54
|
-
id: import("../../../../blocks/src/index").
|
|
45
|
+
id: import("../../../../blocks/src/index").CuratedPaletteId<"warm-neutral-forest">;
|
|
55
46
|
name: string;
|
|
56
47
|
description: string;
|
|
57
48
|
tags: Readonly<Partial<Readonly<{
|
|
@@ -60,9 +51,6 @@ export declare const warmNeutralForest: Readonly<{
|
|
|
60
51
|
motion: import("../../../../blocks/src/index").StyleMotion;
|
|
61
52
|
era: import("../../../../blocks/src/index").StyleEra;
|
|
62
53
|
}>>>;
|
|
63
|
-
mode: "
|
|
64
|
-
colors:
|
|
65
|
-
name: import("../../../../blocks/src/index").PaletteTokenName;
|
|
66
|
-
hex: string;
|
|
67
|
-
}>[];
|
|
54
|
+
mode: import("../../../../blocks/src/index").PaletteMode;
|
|
55
|
+
colors: import("../../../../blocks/src/index").PaletteColors;
|
|
68
56
|
}>;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { PaletteColors, PaletteMode } from './colors';
|
|
2
|
+
import type { CuratedPaletteId } from './curated/types';
|
|
3
|
+
import type { ResolvedPaletteSelection } from './resolveSelection';
|
|
4
|
+
import type { PaletteCommand, SitePaletteId, SitePaletteVersion } from './selection';
|
|
5
|
+
export type PalettePreview = Readonly<{
|
|
6
|
+
kind: 'clean';
|
|
7
|
+
resolved: ResolvedPaletteSelection;
|
|
8
|
+
}> | Readonly<{
|
|
9
|
+
kind: 'selected';
|
|
10
|
+
resolved: ResolvedPaletteSelection;
|
|
11
|
+
}> | Readonly<{
|
|
12
|
+
kind: 'edited-curated';
|
|
13
|
+
sourcePaletteId: CuratedPaletteId;
|
|
14
|
+
colors: PaletteColors;
|
|
15
|
+
mode: PaletteMode;
|
|
16
|
+
}> | Readonly<{
|
|
17
|
+
kind: 'edited-site';
|
|
18
|
+
paletteId: SitePaletteId;
|
|
19
|
+
expectedVersion: SitePaletteVersion;
|
|
20
|
+
colors: PaletteColors;
|
|
21
|
+
mode: PaletteMode;
|
|
22
|
+
}> | Readonly<{
|
|
23
|
+
kind: 'new-site';
|
|
24
|
+
colors: PaletteColors;
|
|
25
|
+
mode: PaletteMode;
|
|
26
|
+
}>;
|
|
27
|
+
export type PaletteEditorState = Readonly<{
|
|
28
|
+
committed: ResolvedPaletteSelection;
|
|
29
|
+
preview: PalettePreview;
|
|
30
|
+
}>;
|
|
31
|
+
export type PaletteEditorAction = Readonly<{
|
|
32
|
+
kind: 'select';
|
|
33
|
+
resolved: ResolvedPaletteSelection;
|
|
34
|
+
}> | Readonly<{
|
|
35
|
+
kind: 'edit';
|
|
36
|
+
colors: PaletteColors;
|
|
37
|
+
mode: PaletteMode;
|
|
38
|
+
}> | Readonly<{
|
|
39
|
+
kind: 'create';
|
|
40
|
+
}> | Readonly<{
|
|
41
|
+
kind: 'cancel';
|
|
42
|
+
}>;
|
|
43
|
+
export declare function createPaletteEditorState(committed: ResolvedPaletteSelection): PaletteEditorState;
|
|
44
|
+
export declare function reducePaletteEditorState(state: PaletteEditorState, action: PaletteEditorAction): PaletteEditorState;
|
|
45
|
+
export declare function planPaletteCommand(state: PaletteEditorState): PaletteCommand;
|
|
@@ -1,14 +1,25 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
6
|
-
export * from
|
|
7
|
-
export * from
|
|
8
|
-
export * from
|
|
9
|
-
export * from
|
|
10
|
-
export * from
|
|
11
|
-
export * from
|
|
12
|
-
export * from
|
|
13
|
-
export * from
|
|
14
|
-
export * from
|
|
1
|
+
export * from '../mock-themes/all';
|
|
2
|
+
export * from './classifyColor';
|
|
3
|
+
export * from './expandPalette';
|
|
4
|
+
export * from './generateCssVars';
|
|
5
|
+
export * from './generateShades';
|
|
6
|
+
export * from './neutralScale';
|
|
7
|
+
export * from './types';
|
|
8
|
+
export * from './utils';
|
|
9
|
+
export * from './utils/paletteAccess';
|
|
10
|
+
export * from './extractPalette';
|
|
11
|
+
export * from './colors';
|
|
12
|
+
export * from './editorState';
|
|
13
|
+
export * from './libraryModel';
|
|
14
|
+
export * from './legacySelection';
|
|
15
|
+
export * from './legacyRuntimeProjection';
|
|
16
|
+
export * from './paletteCompatibilityTransition';
|
|
17
|
+
export * from './persistenceReadSource';
|
|
18
|
+
export * from './resolveSelection';
|
|
19
|
+
export * from './selection';
|
|
20
|
+
export * from './sitePalettePersistence';
|
|
21
|
+
export * from './themePaletteCompatibility';
|
|
22
|
+
export * from './utils/fromVibrant';
|
|
23
|
+
export * from './utils/suggestRecipes';
|
|
24
|
+
export * from './recipes/allRecipes';
|
|
25
|
+
export * from './curated';
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { CuratedPaletteId, PaletteOverrides } from './curated';
|
|
2
|
+
import type { PaletteColors, PaletteMode } from './colors';
|
|
3
|
+
import type { PalettePersistenceReadResult, RuntimePaletteState } from './persistenceReadSource';
|
|
4
|
+
import type { PaletteCompatibilityState } from './paletteCompatibilityTransition';
|
|
5
|
+
import type { PaletteSelection } from './selection';
|
|
6
|
+
export type LegacyPaletteResponseProjection = Readonly<{
|
|
7
|
+
paletteVariantId: CuratedPaletteId | null;
|
|
8
|
+
paletteOverrides: PaletteOverrides | null;
|
|
9
|
+
}>;
|
|
10
|
+
type ResolvedPaletteForLegacyProjection = Readonly<{
|
|
11
|
+
selection: PaletteSelection;
|
|
12
|
+
colors: PaletteColors;
|
|
13
|
+
mode: PaletteMode;
|
|
14
|
+
}>;
|
|
15
|
+
/**
|
|
16
|
+
* Projects a resolved authoritative selection to the bounded legacy
|
|
17
|
+
* curated-plus-overrides wire shape. Site palettes retain their complete
|
|
18
|
+
* colours, using a stable curated palette in the same mode as the base.
|
|
19
|
+
*/
|
|
20
|
+
export declare function projectResolvedPaletteForLegacyResponse(input: ResolvedPaletteForLegacyProjection & Readonly<{
|
|
21
|
+
preferredCuratedPaletteId?: CuratedPaletteId | null;
|
|
22
|
+
}>): LegacyPaletteResponseProjection;
|
|
23
|
+
/**
|
|
24
|
+
* One-way egress adapter for stale clients. It accepts canonical compatibility
|
|
25
|
+
* state only; its lossy curated-plus-overrides response is never a transition
|
|
26
|
+
* input.
|
|
27
|
+
*/
|
|
28
|
+
export declare function projectPaletteCompatibilityStateForLegacyResponse(state: PaletteCompatibilityState, preferredCuratedPaletteId?: CuratedPaletteId | null): LegacyPaletteResponseProjection;
|
|
29
|
+
/**
|
|
30
|
+
* Projects runtime state without letting stale legacy columns override an
|
|
31
|
+
* explicit new authority. Unmigrated rows preserve their validated legacy
|
|
32
|
+
* identity so mixed-version clients do not receive an unnecessary rewrite.
|
|
33
|
+
*/
|
|
34
|
+
export declare function projectRuntimePaletteStateForLegacyResponse(input: Readonly<{
|
|
35
|
+
runtimePaletteState: RuntimePaletteState | null;
|
|
36
|
+
persistenceRead: PalettePersistenceReadResult | null;
|
|
37
|
+
}>): LegacyPaletteResponseProjection;
|
|
38
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { Theme } from '../schema';
|
|
2
|
+
import { type PaletteTokenName } from '../tokens/themeColorTokens';
|
|
3
|
+
import { type HexColor, type PaletteColors, type PaletteMode } from './colors';
|
|
4
|
+
import type { CuratedPalette, CuratedPaletteId, PaletteOverrides } from './curated/types';
|
|
5
|
+
import type { SitePaletteOrigin } from './selection';
|
|
6
|
+
export type LegacyPaletteClassification = Readonly<{
|
|
7
|
+
kind: 'curated';
|
|
8
|
+
paletteId: CuratedPaletteId;
|
|
9
|
+
}> | Readonly<{
|
|
10
|
+
kind: 'site';
|
|
11
|
+
colors: PaletteColors;
|
|
12
|
+
mode: PaletteMode;
|
|
13
|
+
origin: Extract<SitePaletteOrigin, {
|
|
14
|
+
kind: 'onboarding' | 'legacy-customized';
|
|
15
|
+
}>;
|
|
16
|
+
}> | Readonly<{
|
|
17
|
+
kind: 'defaulted-curated';
|
|
18
|
+
paletteId: CuratedPaletteId;
|
|
19
|
+
reason: 'no-valid-legacy-palette';
|
|
20
|
+
}> | Readonly<{
|
|
21
|
+
kind: 'unresolved';
|
|
22
|
+
reason: 'missing-palette-sources' | 'invalid-saved-theme-palette' | 'overrides-without-base-palette';
|
|
23
|
+
}>;
|
|
24
|
+
export type LegacyOnboardingPaletteEvidence = Readonly<{
|
|
25
|
+
sourceKey: string | null;
|
|
26
|
+
candidateColors: Readonly<Partial<Record<PaletteTokenName, HexColor>>> | null;
|
|
27
|
+
}>;
|
|
28
|
+
export declare function classifyLegacyPaletteSelection(input: Readonly<{
|
|
29
|
+
basePalette: CuratedPalette | null;
|
|
30
|
+
overrides: PaletteOverrides | null;
|
|
31
|
+
savedThemePalette: Theme['palette'] | null;
|
|
32
|
+
fallbackPaletteId: CuratedPaletteId | null;
|
|
33
|
+
onboardingEvidence: LegacyOnboardingPaletteEvidence;
|
|
34
|
+
}>): LegacyPaletteClassification;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { CuratedPalette, CuratedPaletteId } from './curated/types';
|
|
2
|
+
import type { PaletteColors, PaletteMode } from './colors';
|
|
3
|
+
import type { PaletteSelection, SitePalette, SitePaletteId, SitePaletteOrigin, SitePaletteVersion } from './selection';
|
|
4
|
+
export type PaletteSwatch = readonly [
|
|
5
|
+
PaletteColors['background'],
|
|
6
|
+
PaletteColors['surface'],
|
|
7
|
+
PaletteColors['primary'],
|
|
8
|
+
PaletteColors['secondary'],
|
|
9
|
+
PaletteColors['accent']
|
|
10
|
+
];
|
|
11
|
+
export type CuratedPaletteLibraryItem = Readonly<{
|
|
12
|
+
kind: 'curated';
|
|
13
|
+
paletteId: CuratedPaletteId;
|
|
14
|
+
colors: PaletteColors;
|
|
15
|
+
mode: PaletteMode;
|
|
16
|
+
swatch: PaletteSwatch;
|
|
17
|
+
accessibleLabel: string;
|
|
18
|
+
selected: boolean;
|
|
19
|
+
}>;
|
|
20
|
+
export type SitePaletteLibraryItem = Readonly<{
|
|
21
|
+
kind: 'site';
|
|
22
|
+
paletteId: SitePaletteId;
|
|
23
|
+
colors: PaletteColors;
|
|
24
|
+
mode: PaletteMode;
|
|
25
|
+
origin: SitePaletteOrigin;
|
|
26
|
+
version: SitePaletteVersion;
|
|
27
|
+
swatch: PaletteSwatch;
|
|
28
|
+
accessibleLabel: string;
|
|
29
|
+
selected: boolean;
|
|
30
|
+
}>;
|
|
31
|
+
export type PaletteLibraryItem = CuratedPaletteLibraryItem | SitePaletteLibraryItem;
|
|
32
|
+
export type PaletteLibraryReadModel = Readonly<{
|
|
33
|
+
activeSelection: PaletteSelection;
|
|
34
|
+
yours: readonly SitePaletteLibraryItem[];
|
|
35
|
+
suggested: readonly CuratedPaletteLibraryItem[];
|
|
36
|
+
more: readonly CuratedPaletteLibraryItem[];
|
|
37
|
+
}>;
|
|
38
|
+
export type PaletteLibraryReadModelError = Readonly<{
|
|
39
|
+
kind: 'active-curated-palette-missing';
|
|
40
|
+
paletteId: CuratedPaletteId;
|
|
41
|
+
}> | Readonly<{
|
|
42
|
+
kind: 'active-site-palette-missing';
|
|
43
|
+
paletteId: SitePaletteId;
|
|
44
|
+
}>;
|
|
45
|
+
export type PaletteLibraryReadModelResult = Readonly<{
|
|
46
|
+
ok: true;
|
|
47
|
+
model: PaletteLibraryReadModel;
|
|
48
|
+
}> | Readonly<{
|
|
49
|
+
ok: false;
|
|
50
|
+
error: PaletteLibraryReadModelError;
|
|
51
|
+
}>;
|
|
52
|
+
export declare function buildPaletteLibraryReadModel(input: Readonly<{
|
|
53
|
+
activeSelection: PaletteSelection;
|
|
54
|
+
sitePalettes: readonly SitePalette[];
|
|
55
|
+
curatedPalettes: readonly CuratedPalette[];
|
|
56
|
+
recommendations: readonly CuratedPaletteId[];
|
|
57
|
+
}>): PaletteLibraryReadModelResult;
|
|
58
|
+
export declare function paletteSelectionForItem(item: PaletteLibraryItem): PaletteSelection;
|