@riverbankcms/sdk 0.125.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.
Files changed (121) hide show
  1. package/README.md +3 -1
  2. package/dist/{PreviewEditorSidebar-BezDOtQ7.mjs → PreviewEditorSidebar-DcYJxTgc.mjs} +67 -266
  3. package/dist/{PreviewEditorUI-CgSqmfo2.mjs → PreviewEditorUI-Ctt1yTJr.mjs} +3 -3
  4. package/dist/{PreviewQueryProvider-BH-3-jSj.mjs → PreviewQueryProvider-DgFDIwvK.mjs} +1 -1
  5. package/dist/{SdkPreviewModeRuntime-Co3AHfj0.mjs → SdkPreviewModeRuntime-CvW1vdQ4.mjs} +27 -27
  6. package/dist/{SiteChromeCustomizeContext-BHF-KANn.mjs → SiteChromeCustomizeContext-C87qlKWw.mjs} +412 -1301
  7. package/dist/_dts/ai/src/contracts/proposals.d.ts +1354 -202
  8. package/dist/_dts/api/src/common/envelope.d.ts +1 -1
  9. package/dist/_dts/api/src/contentRuntime.d.ts +0 -2
  10. package/dist/_dts/api/src/endpoints.d.ts +0 -7
  11. package/dist/_dts/api/src/sdk-event-upsert.d.ts +42 -0
  12. package/dist/_dts/api/src/sdkContracts.d.ts +11 -9
  13. package/dist/_dts/api/src/siteOperations.d.ts +18 -1
  14. package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +1 -14
  15. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationStripeReturn.d.ts +15 -2
  16. package/dist/_dts/db/src/generated/supabase/database.types.d.ts +182 -19
  17. package/dist/_dts/preview-next/src/client/preview/PreviewEditorSidebar.d.ts +1 -2
  18. package/dist/_dts/preview-next/src/client/preview/PreviewShell.d.ts +2 -3
  19. package/dist/_dts/preview-next/src/client/preview/PreviewShellLayout.d.ts +1 -2
  20. package/dist/_dts/preview-next/src/client/preview/SiteChromeCustomizeContext.d.ts +3 -12
  21. package/dist/_dts/preview-next/src/client/preview/StyleConfigurator.d.ts +3 -13
  22. package/dist/_dts/preview-next/src/client/preview/StyleConfigurator.state.d.ts +8 -100
  23. package/dist/_dts/preview-next/src/client/preview/siteStylePreviewPlanner.d.ts +1 -4
  24. package/dist/_dts/preview-next/src/client/preview/styleConfiguratorApplyPayload.d.ts +1 -15
  25. package/dist/_dts/preview-next/src/client/preview/styleConfiguratorSnapshot.d.ts +11 -21
  26. package/dist/_dts/sdk/src/cli/commands/event.d.ts +2 -2
  27. package/dist/_dts/sdk/src/cli/commands/eventOccurrenceSchedule.d.ts +12 -0
  28. package/dist/_dts/sdk/src/cli/commands/push/pushAllExtras.d.ts +6 -0
  29. package/dist/_dts/sdk/src/cli/commands/style.d.ts +1 -1
  30. package/dist/_dts/sdk/src/cli/content/legacyEventScheduleShapeError.d.ts +5 -0
  31. package/dist/_dts/sdk/src/cli/content/localEventSchedule.d.ts +17 -0
  32. package/dist/_dts/sdk/src/cli/content/reader.d.ts +5 -10
  33. package/dist/_dts/sdk/src/cli/migrations/events.d.ts +1 -1
  34. package/dist/_dts/sdk/src/cli/site-commands/eventScheduleCompiler.d.ts +24 -0
  35. package/dist/_dts/sdk/src/client/management/http.d.ts +1 -1
  36. package/dist/_dts/sdk/src/client/management/types.d.ts +3 -28
  37. package/dist/_dts/sdk/src/config/index.d.ts +1 -1
  38. package/dist/_dts/sdk/src/public-api/contracts.d.ts +5 -20
  39. package/dist/_dts/sdk/src/rendering/index.d.ts +1 -1
  40. package/dist/_dts/sdk/src/version.d.ts +1 -1
  41. package/dist/_dts/site-commands/src/commandContract.d.ts +33 -5
  42. package/dist/_dts/site-commands/src/commandDomain.d.ts +2 -2
  43. package/dist/_dts/site-commands/src/commands.d.ts +38 -9
  44. package/dist/_dts/site-commands/src/siteStyleCommandSchema.d.ts +28 -1
  45. package/dist/_dts/site-commands/src/siteStyleSelectionSchemaBuilder.d.ts +4 -4
  46. package/dist/_dts/theme-core/src/palette/concretePalette.d.ts +20 -0
  47. package/dist/_dts/theme-core/src/palette/curated/index.d.ts +2 -17
  48. package/dist/_dts/theme-core/src/palette/index.d.ts +1 -6
  49. package/dist/_dts/theme-core/src/palette/schema.d.ts +39 -0
  50. package/dist/_dts/theme-core/src/schema.d.ts +38 -26
  51. package/dist/_dts/theme-core/src/site-styles/previewCompiler.d.ts +4 -6
  52. package/dist/_dts/theme-core/src/site-styles/runtimeCompiler.d.ts +5 -6
  53. package/dist/cli/index.mjs +612 -522
  54. package/dist/cli/init-docs/content/cli-reference.md +6 -3
  55. package/dist/cli/init-docs/content/content-management.md +24 -13
  56. package/dist/client/{DiscountCodeDisclosure-CyPpekBp.mjs → DiscountCodeDisclosure-DS0AuFWW.mjs} +1 -1
  57. package/dist/client/{EventCombined.client-zywit-60.mjs → EventCombined.client-DtMxLr7q.mjs} +2 -2
  58. package/dist/client/{EventListing.client-J2nLhkKT.mjs → EventListing.client-BdLSRNg1.mjs} +2 -2
  59. package/dist/client/{LeafletStaticMap-CSubXWt6.mjs → LeafletStaticMap-BrpC6vsT.mjs} +1 -1
  60. package/dist/client/{MagicLinkForm-DDLIfiq9.mjs → MagicLinkForm-Bt3IuLMy.mjs} +1 -1
  61. package/dist/client/{StepIndicator-DE8EvHIp.mjs → StepIndicator-CBYPFVoy.mjs} +2 -2
  62. package/dist/client/{accordion-Ct5T5NiA.mjs → accordion-BqqwPJWM.mjs} +1 -1
  63. package/dist/client/{bookingForm-DMxtLPxw.mjs → bookingForm-SneP3yxC.mjs} +5 -6
  64. package/dist/client/bookings.mjs +190 -24
  65. package/dist/client/{carousel--FMqgvob.mjs → carousel-BTIR9L3I.mjs} +1 -1
  66. package/dist/client/{cart-BKX1bWiU.mjs → cart-bqiqd8SX.mjs} +3 -3
  67. package/dist/client/{checkout-B_jxi4WW.mjs → checkout-WbTFV5v4.mjs} +3 -3
  68. package/dist/client/client.mjs +156 -220
  69. package/dist/client/{courseRegistration-DH4MlkRD.mjs → courseRegistration-BcemLAdN.mjs} +6 -7
  70. package/dist/client/{eventCalendar-BQILwAcL.mjs → eventCalendar-CsxIw0V_.mjs} +4 -4
  71. package/dist/client/{eventCombined-DFFW_Vmo.mjs → eventCombined-B6XMoHfa.mjs} +2 -2
  72. package/dist/client/{eventDetails-B045CTSJ.mjs → eventDetails-BJaoPPfo.mjs} +3 -3
  73. package/dist/client/{eventListing-BDMYNVzS.mjs → eventListing-DgwdYHRT.mjs} +2 -2
  74. package/dist/client/{eventRegistration-CQ2-BSnB.mjs → eventRegistration-C0O3folu.mjs} +30 -22
  75. package/dist/client/{form-DJKuyZgN.mjs → form-Bk9txGFt.mjs} +1 -1
  76. package/dist/client/{headerSection-DeTjfiDo.mjs → headerSection-yIBt0yTv.mjs} +2 -2
  77. package/dist/client/hooks.mjs +50 -102
  78. package/dist/client/{locationMap-i2wDA8gB.mjs → locationMap-C-3KIpv-.mjs} +2 -2
  79. package/dist/client/{newsletterForm-DKiueauk.mjs → newsletterForm-CzB8g8h2.mjs} +1 -1
  80. package/dist/client/{pricing-C01J3Epx.mjs → pricing-C1QeDes_.mjs} +1 -1
  81. package/dist/client/{productDetail-Dfc1sZaX.mjs → productDetail-w7SBp5uc.mjs} +3 -3
  82. package/dist/client/{productList-BXbvXWTF.mjs → productList-D0tGKHGf.mjs} +3 -3
  83. package/dist/client/{propsDecoder-CIR5DQ1l.mjs → propsDecoder-Bcin2DB3.mjs} +167 -11
  84. package/dist/client/rendering/client.mjs +219 -276
  85. package/dist/client/rendering/islands.mjs +18 -18
  86. package/dist/client/rendering.mjs +128 -185
  87. package/dist/client/{useDiscountCodeUi-Bcyh4508.mjs → scrollToBlock-h-o_STf_.mjs} +18 -2
  88. package/dist/client/{shop-BbNwPKM-.mjs → shop-BGzmL8O_.mjs} +5 -6
  89. package/dist/client/{shop-commerce-XO-XMFEt.mjs → shop-commerce-lX8QxjX-.mjs} +4 -4
  90. package/dist/client/{shop-commerce-store-Byh6OUGK.mjs → shop-commerce-store-CEurARtu.mjs} +1 -1
  91. package/dist/client/{shopShared-Bbq39mwr.mjs → shopShared-DXxH8xxw.mjs} +2 -2
  92. package/dist/client/{useEventFilters-C8OOJ3el.mjs → useEventFilters-B591g9vd.mjs} +2 -2
  93. package/dist/client/{usePolling-CyJVo9kF.mjs → usePolling-BvnChV4m.mjs} +2 -2
  94. package/dist/preview-next/before-render.mjs +0 -7
  95. package/dist/preview-next/client/runtime.mjs +4 -4
  96. package/dist/preview-next/middleware.mjs +0 -7
  97. package/dist/{previewAuthStore-CJX21dGi.mjs → previewAuthStore-Dev9CdG9.mjs} +0 -7
  98. package/dist/{sdk-runtime-BGhyuE-E.mjs → sdk-runtime-M__i3Jce.mjs} +2 -2
  99. package/dist/{separator-BFs-Kmv5.mjs → separator-VSlnI9bc.mjs} +1 -1
  100. package/dist/server/components.mjs +87 -139
  101. package/dist/server/config-validation.mjs +50 -102
  102. package/dist/server/config.mjs +50 -102
  103. package/dist/server/data.mjs +50 -102
  104. package/dist/server/index.mjs +1 -8
  105. package/dist/server/next.mjs +91 -150
  106. package/dist/server/page-converter.mjs +50 -102
  107. package/dist/server/prebuild.mjs +1 -1
  108. package/dist/server/rendering/server.mjs +50 -102
  109. package/dist/server/rendering.mjs +88 -140
  110. package/dist/server/routing.mjs +71 -147
  111. package/dist/server/server.mjs +51 -110
  112. package/dist/server/theme-bridge.mjs +172 -162
  113. package/dist/server/theme.mjs +167 -11
  114. package/package.json +1 -1
  115. package/dist/_dts/theme-core/src/palette/editorState.d.ts +0 -75
  116. package/dist/_dts/theme-core/src/palette/libraryModel.d.ts +0 -64
  117. package/dist/_dts/theme-core/src/palette/persistenceReadSource.d.ts +0 -81
  118. package/dist/_dts/theme-core/src/palette/resolveSelection.d.ts +0 -75
  119. package/dist/_dts/theme-core/src/palette/selection.d.ts +0 -74
  120. package/dist/_dts/theme-core/src/palette/sitePalettePersistence.d.ts +0 -34
  121. package/dist/client/scrollToBlock-C86BYkyV.mjs +0 -17
@@ -2513,7 +2513,7 @@ var init_contracts$1 = __esmMin((() => {
2513
2513
  //#endregion
2514
2514
  //#region ../blocks/src/subroutes/index.ts
2515
2515
  var init_subroutes = __esmMin((() => {})), BlockKind, blockSchema, pagePath;
2516
- var init_schema$3 = __esmMin((() => {
2516
+ var init_schema$4 = __esmMin((() => {
2517
2517
  BlockKind = z$2.string();
2518
2518
  blockSchema = z$2.object({
2519
2519
  id: z$2.string().nullable(),
@@ -4077,6 +4077,12 @@ function requirePaletteColorsFromEntries(entries) {
4077
4077
  if (result.ok) return result.colors;
4078
4078
  throw new Error(`Invalid complete palette: ${result.error.kind}`);
4079
4079
  }
4080
+ function paletteColorEntries(colors) {
4081
+ return THEME_PALETTE_COLOR_ORDER.map((name) => ({
4082
+ name,
4083
+ hex: colors[name]
4084
+ }));
4085
+ }
4080
4086
  function paletteColorFingerprint(colors) {
4081
4087
  return PALETTE_TOKEN_NAMES.map((name) => `${name}:${colors[name]}`).join("|");
4082
4088
  }
@@ -4109,11 +4115,26 @@ function parsePaletteValueKey(value) {
4109
4115
  if (!colors.ok || paletteValueKey(colors.colors, mode.data) !== value) return null;
4110
4116
  return value;
4111
4117
  }
4112
- var HEX_COLOR_REGEX, NORMALIZABLE_HEX_REGEX, hexColorSchema, paletteModeSchema, PALETTE_VALUE_KEY_PREFIX, paletteColorsSchema, paletteValueKeySchema;
4118
+ var HEX_COLOR_REGEX, NORMALIZABLE_HEX_REGEX, THEME_PALETTE_COLOR_ORDER, hexColorSchema, paletteModeSchema, PALETTE_VALUE_KEY_PREFIX, paletteColorsSchema, paletteValueKeySchema;
4113
4119
  var init_colors = __esmMin((() => {
4114
4120
  init_themeColorTokens();
4115
4121
  HEX_COLOR_REGEX = /^#[0-9a-f]{6}$/;
4116
4122
  NORMALIZABLE_HEX_REGEX = /^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i;
4123
+ THEME_PALETTE_COLOR_ORDER = [
4124
+ "primary",
4125
+ "secondary",
4126
+ "accent",
4127
+ "success",
4128
+ "warning",
4129
+ "destructive",
4130
+ "background",
4131
+ "surface",
4132
+ "surfaceAlt",
4133
+ "muted",
4134
+ "text",
4135
+ "primaryForeground",
4136
+ "border"
4137
+ ];
4117
4138
  hexColorSchema = z$1.string().regex(HEX_COLOR_REGEX, "Hex must be #RRGGBB (lowercase)").transform((value) => value);
4118
4139
  paletteModeSchema = z$1.enum(["light", "dark"]);
4119
4140
  PALETTE_VALUE_KEY_PREFIX = "palette-value:v1|";
@@ -4144,11 +4165,15 @@ var init_colors = __esmMin((() => {
4144
4165
  });
4145
4166
  }));
4146
4167
  //#endregion
4147
- //#region ../theme-core/src/palette/editorState.ts
4148
- var init_editorState = __esmMin((() => {}));
4168
+ //#region ../theme-core/src/palette/concretePalette.ts
4169
+ var init_concretePalette = __esmMin((() => {
4170
+ init_colors();
4171
+ }));
4149
4172
  //#endregion
4150
- //#region ../theme-core/src/palette/libraryModel.ts
4151
- var init_libraryModel = __esmMin((() => {}));
4173
+ //#region ../theme-core/src/palette/utils/fromVibrant.ts
4174
+ var init_fromVibrant = __esmMin((() => {
4175
+ init_utils$4();
4176
+ }));
4152
4177
  //#endregion
4153
4178
  //#region ../theme-core/src/site-styles/styleTags.ts
4154
4179
  var STYLE_AXIS_VALUES, styleTagsSchema;
@@ -5438,22 +5463,12 @@ var init_warm_dark = __esmMin((() => {
5438
5463
  }));
5439
5464
  //#endregion
5440
5465
  //#region ../theme-core/src/palette/curated/index.ts
5441
- /**
5442
- * Curated palette library.
5443
- *
5444
- * Authoring keys are readable source aliases. Value keys are derived from the
5445
- * complete mode and semantic colours and are the only curated identity used at
5446
- * persistence and runtime boundaries.
5447
- */
5448
5466
  function admitCuratedPaletteDefinition(definition) {
5449
5467
  return {
5450
5468
  ...definition,
5451
5469
  valueKey: definition.valueKey
5452
5470
  };
5453
5471
  }
5454
- function findCuratedPalette(valueKey) {
5455
- return curatedPalettesByValueKey.get(valueKey);
5456
- }
5457
5472
  function findCuratedPaletteByAuthoringKey(authoringKey) {
5458
5473
  return curatedPalettesByAuthoringKey.get(authoringKey);
5459
5474
  }
@@ -5462,9 +5477,8 @@ function requireCuratedPaletteValueKey(authoringKey) {
5462
5477
  if (!palette) throw new Error(`Unknown curated palette authoring key "${authoringKey}"`);
5463
5478
  return palette.valueKey;
5464
5479
  }
5465
- var curatedPalettes, curatedPalettesByValueKey, curatedPalettesByAuthoringKey, knownCuratedPaletteValueKeySchema;
5480
+ var curatedPalettes, curatedPalettesByAuthoringKey;
5466
5481
  var init_curated = __esmMin((() => {
5467
- init_colors();
5468
5482
  init_brand_led();
5469
5483
  init_high_contrast();
5470
5484
  init_soft_natural();
@@ -5491,115 +5505,8 @@ var init_curated = __esmMin((() => {
5491
5505
  admitCuratedPaletteDefinition(warmDarkEmber),
5492
5506
  admitCuratedPaletteDefinition(warmDarkKirtanGold)
5493
5507
  ];
5494
- curatedPalettesByValueKey = new Map(curatedPalettes.map((palette) => [palette.valueKey, palette]));
5508
+ new Map(curatedPalettes.map((palette) => [palette.valueKey, palette]));
5495
5509
  curatedPalettesByAuthoringKey = new Map(curatedPalettes.map((palette) => [palette.authoringKey, palette]));
5496
- knownCuratedPaletteValueKeySchema = z$1.string().transform((value, ctx) => {
5497
- const valueKey = parsePaletteValueKey(value);
5498
- if (!valueKey) {
5499
- ctx.addIssue({
5500
- code: "custom",
5501
- message: "Invalid canonical palette value key"
5502
- });
5503
- return z$1.NEVER;
5504
- }
5505
- const palette = findCuratedPalette(valueKey);
5506
- if (!palette) {
5507
- ctx.addIssue({
5508
- code: "custom",
5509
- message: "Unknown curated palette value key"
5510
- });
5511
- return z$1.NEVER;
5512
- }
5513
- return palette.valueKey;
5514
- });
5515
- }));
5516
- //#endregion
5517
- //#region ../theme-core/src/palette/resolveSelection.ts
5518
- var init_resolveSelection = __esmMin((() => {
5519
- init_curated();
5520
- })), sitePaletteIdSchema, sitePaletteVersionSchema, paletteSelectionSchema, onboardingPaletteOriginSchema, curatedForkPaletteOriginSchema, manualPaletteOriginSchema, legacyCustomizedPaletteOriginSchema, sitePaletteOriginSchema, editorSitePaletteOriginSchema;
5521
- var init_selection$1 = __esmMin((() => {
5522
- init_colors();
5523
- init_curated();
5524
- sitePaletteIdSchema = z$1.string().uuid().transform((value) => value);
5525
- sitePaletteVersionSchema = z$1.number().int().nonnegative().transform((value) => value);
5526
- paletteSelectionSchema = z$1.discriminatedUnion("kind", [z$1.object({
5527
- kind: z$1.literal("curated"),
5528
- valueKey: knownCuratedPaletteValueKeySchema
5529
- }), z$1.object({
5530
- kind: z$1.literal("site"),
5531
- paletteId: sitePaletteIdSchema
5532
- })]);
5533
- onboardingPaletteOriginSchema = z$1.object({
5534
- kind: z$1.literal("onboarding"),
5535
- sourceKey: z$1.string().min(1).nullable()
5536
- });
5537
- curatedForkPaletteOriginSchema = z$1.object({
5538
- kind: z$1.literal("curated-fork"),
5539
- sourceValueKey: paletteValueKeySchema
5540
- });
5541
- manualPaletteOriginSchema = z$1.object({ kind: z$1.literal("manual") });
5542
- legacyCustomizedPaletteOriginSchema = z$1.object({
5543
- kind: z$1.literal("legacy-customized"),
5544
- sourceKey: z$1.string().min(1).nullable()
5545
- });
5546
- sitePaletteOriginSchema = z$1.discriminatedUnion("kind", [
5547
- onboardingPaletteOriginSchema,
5548
- curatedForkPaletteOriginSchema,
5549
- manualPaletteOriginSchema,
5550
- legacyCustomizedPaletteOriginSchema
5551
- ]);
5552
- editorSitePaletteOriginSchema = z$1.discriminatedUnion("kind", [z$1.object({
5553
- kind: z$1.literal("curated-fork"),
5554
- sourceValueKey: knownCuratedPaletteValueKeySchema
5555
- }), manualPaletteOriginSchema]);
5556
- z$1.object({
5557
- id: sitePaletteIdSchema,
5558
- colors: paletteColorsSchema,
5559
- mode: paletteModeSchema,
5560
- origin: sitePaletteOriginSchema,
5561
- version: sitePaletteVersionSchema
5562
- });
5563
- z$1.discriminatedUnion("kind", [
5564
- z$1.object({ kind: z$1.literal("preserve") }),
5565
- z$1.object({
5566
- kind: z$1.literal("select"),
5567
- selection: paletteSelectionSchema
5568
- }),
5569
- z$1.object({
5570
- kind: z$1.literal("create-site"),
5571
- colors: paletteColorsSchema,
5572
- mode: paletteModeSchema,
5573
- origin: editorSitePaletteOriginSchema
5574
- }),
5575
- z$1.object({
5576
- kind: z$1.literal("update-site"),
5577
- paletteId: sitePaletteIdSchema,
5578
- expectedVersion: sitePaletteVersionSchema,
5579
- colors: paletteColorsSchema,
5580
- mode: paletteModeSchema
5581
- })
5582
- ]);
5583
- }));
5584
- //#endregion
5585
- //#region ../theme-core/src/palette/persistenceReadSource.ts
5586
- var init_persistenceReadSource = __esmMin((() => {
5587
- init_curated();
5588
- init_colors();
5589
- init_resolveSelection();
5590
- init_selection$1();
5591
- }));
5592
- //#endregion
5593
- //#region ../theme-core/src/palette/sitePalettePersistence.ts
5594
- var init_sitePalettePersistence = __esmMin((() => {
5595
- init_curated();
5596
- init_colors();
5597
- init_selection$1();
5598
- }));
5599
- //#endregion
5600
- //#region ../theme-core/src/palette/utils/fromVibrant.ts
5601
- var init_fromVibrant = __esmMin((() => {
5602
- init_utils$4();
5603
5510
  }));
5604
5511
  //#endregion
5605
5512
  //#region ../theme-core/src/palette/index.ts
@@ -5615,12 +5522,7 @@ var init_palette = __esmMin((() => {
5615
5522
  init_paletteAccess();
5616
5523
  init_extractPalette();
5617
5524
  init_colors();
5618
- init_editorState();
5619
- init_libraryModel();
5620
- init_persistenceReadSource();
5621
- init_resolveSelection();
5622
- init_selection$1();
5623
- init_sitePalettePersistence();
5525
+ init_concretePalette();
5624
5526
  init_fromVibrant();
5625
5527
  init_suggestRecipes();
5626
5528
  init_allRecipes();
@@ -5696,6 +5598,38 @@ var init_media$3 = __esmMin((() => {
5696
5598
  });
5697
5599
  }));
5698
5600
  //#endregion
5601
+ //#region ../theme-core/src/palette/schema.ts
5602
+ var colourHexString, paletteColorSchema, paletteMetaSchema, paletteSchema;
5603
+ var init_schema$3 = __esmMin((() => {
5604
+ init_colors();
5605
+ colourHexString = z$1.string().regex(/^#([0-9A-Fa-f]{3}){1,2}$/);
5606
+ paletteColorSchema = z$1.object({
5607
+ name: z$1.string().min(1),
5608
+ hex: colourHexString
5609
+ });
5610
+ paletteMetaSchema = z$1.object({ mode: z$1.enum(["light", "dark"]) });
5611
+ paletteSchema = z$1.object({
5612
+ colors: z$1.array(paletteColorSchema),
5613
+ meta: paletteMetaSchema
5614
+ }).transform((palette, ctx) => {
5615
+ const colors = paletteColorsFromEntries(palette.colors);
5616
+ if (!colors.ok) {
5617
+ ctx.addIssue({
5618
+ code: "custom",
5619
+ message: `Invalid complete palette: ${colors.error.kind}`
5620
+ });
5621
+ return z$1.NEVER;
5622
+ }
5623
+ return {
5624
+ colors: paletteColorEntries(colors.colors).map(({ name, hex }) => ({
5625
+ name: String(name),
5626
+ hex: String(hex)
5627
+ })),
5628
+ meta: palette.meta
5629
+ };
5630
+ });
5631
+ }));
5632
+ //#endregion
5699
5633
  //#region ../theme-core/src/buttons/types.ts
5700
5634
  function parseOpaqueButtonColourToken(value) {
5701
5635
  const token = parseThemeColorToken(value);
@@ -8962,9 +8896,10 @@ function normaliseHeaderNavFontRole(header) {
8962
8896
  navFontRole: navTypography
8963
8897
  } : rest;
8964
8898
  }
8965
- var axesSchema, colourHexString, paletteColorSchema, paletteMetaSchema, paletteSchema, typographyStyleSchema, bodyTypographyStyleSchema, headingSizeSchema, headingTypographyOverridesSchema, headingTypographyStyleSchema, proseLinkUnderlineStyleSchema, proseLinkUnderlineThicknessSchema, proseLinkUnderlineOffsetSchema, proseLinkStyleSchema, semanticSpacingSchema, boxRoundedSchema, boxBackgroundOverlaySchema, boxBackgroundSchema, noHeadingDecorationSchema, visibleHeadingDecorationSchema, headingDecorationSchema, headingDecorationOverrideSchema, accordionIconTreatmentSchema, sectionStylesOverrideSchema, containerStylesOverrideSchema, cardBorderOverrideSchema, cardStylesOverrideSchema, blockStyleOverridesSchema, blockThemeOverrideSchema, typographyScaleSchema, eyebrowTypographyStyleSchema, typographySchema, spaceSchema, corners, shadow, border, motion, inputStyle, headerVariant, headerPositioning, headerNavStyle, navFontWeight, headerMaxWidth, headerBarFrame, headerContainerSchema, headerBorderSchema, logoStyleSchema, headerLogoTextSchema, navEffectsSchema, dropdownStyleSchema, headerCtaGapSchema, headerCtaTreatmentSchema, navContainerSchema, headerBackgroundSchema, headerSchema, footerVariant, footerMaxWidth, footerMode, footerNavLayoutMode, footerNavLayoutAlign, footerSpacing, footerLogoPlacement, footerLogoSize, footerLogoMaxHeight, footerBottomTextLinkStyleSchema, footerBottomBarSchema, footerNavLayoutSchema, footerLogoSchema, footerSchema, containerPaddingPresetSchema, layoutSchema, heroTypographySizeSchema, heroTypographyLineHeightSchema, heroResponsiveTypographySchema, heroTypographySchema, heroSchema, bodyTextIntroTypographySizeSchema, bodyTextSchema, gradientsSchema, testimonialQuoteTreatmentSchema, themeSchema;
8899
+ var axesSchema, typographyStyleSchema, bodyTypographyStyleSchema, headingSizeSchema, headingTypographyOverridesSchema, headingTypographyStyleSchema, proseLinkUnderlineStyleSchema, proseLinkUnderlineThicknessSchema, proseLinkUnderlineOffsetSchema, proseLinkStyleSchema, semanticSpacingSchema, boxRoundedSchema, boxBackgroundOverlaySchema, boxBackgroundSchema, noHeadingDecorationSchema, visibleHeadingDecorationSchema, headingDecorationSchema, headingDecorationOverrideSchema, accordionIconTreatmentSchema, sectionStylesOverrideSchema, containerStylesOverrideSchema, cardBorderOverrideSchema, cardStylesOverrideSchema, blockStyleOverridesSchema, blockThemeOverrideSchema, typographyScaleSchema, eyebrowTypographyStyleSchema, typographySchema, spaceSchema, corners, shadow, border, motion, inputStyle, headerVariant, headerPositioning, headerNavStyle, navFontWeight, headerMaxWidth, headerBarFrame, headerContainerSchema, headerBorderSchema, logoStyleSchema, headerLogoTextSchema, navEffectsSchema, dropdownStyleSchema, headerCtaGapSchema, headerCtaTreatmentSchema, navContainerSchema, headerBackgroundSchema, headerSchema, footerVariant, footerMaxWidth, footerMode, footerNavLayoutMode, footerNavLayoutAlign, footerSpacing, footerLogoPlacement, footerLogoSize, footerLogoMaxHeight, footerBottomTextLinkStyleSchema, footerBottomBarSchema, footerNavLayoutSchema, footerLogoSchema, footerSchema, containerPaddingPresetSchema, layoutSchema, heroTypographySizeSchema, heroTypographyLineHeightSchema, heroResponsiveTypographySchema, heroTypographySchema, heroSchema, bodyTextIntroTypographySizeSchema, bodyTextSchema, gradientsSchema, testimonialQuoteTreatmentSchema, themeSchema;
8966
8900
  var init_schema$2 = __esmMin((() => {
8967
8901
  init_media$3();
8902
+ init_schema$3();
8968
8903
  init_buttons();
8969
8904
  init_cards();
8970
8905
  init_types$11();
@@ -9007,16 +8942,6 @@ var init_schema$2 = __esmMin((() => {
9007
8942
  "expressive"
9008
8943
  ])
9009
8944
  });
9010
- colourHexString = z$1.string().regex(/^#([0-9A-Fa-f]{3}){1,2}$/);
9011
- paletteColorSchema = z$1.object({
9012
- name: z$1.string().min(1),
9013
- hex: colourHexString
9014
- });
9015
- paletteMetaSchema = z$1.object({ mode: z$1.enum(["light", "dark"]) });
9016
- paletteSchema = z$1.object({
9017
- colors: z$1.array(paletteColorSchema),
9018
- meta: paletteMetaSchema
9019
- });
9020
8945
  typographyStyleSchema = z$1.object({
9021
8946
  family: z$1.string().min(1),
9022
8947
  weight: z$1.enum([
@@ -13369,7 +13294,6 @@ var defaultDesignRuntimeRules, defaultComponentRuntimeRules;
13369
13294
  var init_runtimeCompiler = __esmMin((() => {
13370
13295
  init_schema$2();
13371
13296
  init_styles();
13372
- init_colors();
13373
13297
  init_designState();
13374
13298
  init_sectionTransitions();
13375
13299
  init_tokens();
@@ -15234,7 +15158,7 @@ var init_siteStyleThemeCompiler = __esmMin((() => {
15234
15158
  init_curatedSiteStyles();
15235
15159
  init_runtimeCompiler();
15236
15160
  init_curated();
15237
- init_resolveSelection();
15161
+ init_concretePalette();
15238
15162
  }));
15239
15163
  //#endregion
15240
15164
  //#region ../theme-core/src/site-styles/previewCustomization.ts
@@ -15245,7 +15169,7 @@ var init_previewCompiler = __esmMin((() => {
15245
15169
  init_schema$2();
15246
15170
  init_tokens();
15247
15171
  init_curated();
15248
- init_resolveSelection();
15172
+ init_concretePalette();
15249
15173
  init_curatedSiteStyles();
15250
15174
  init_footerLooks();
15251
15175
  init_compilationPlan();
@@ -41536,7 +41460,7 @@ var init_data = __esmMin((() => {
41536
41460
  //#region ../blocks/src/index.ts
41537
41461
  var init_src$2 = __esmMin((() => {
41538
41462
  init_subroutes();
41539
- init_schema$3();
41463
+ init_schema$4();
41540
41464
  init_palette();
41541
41465
  init_generateShades();
41542
41466
  init_utils$4();
@@ -6225,13 +6225,6 @@ const API_ENDPOINTS$1 = {
6225
6225
  auth: "user",
6226
6226
  responseKind: "json"
6227
6227
  },
6228
- listSiteThemePalettes: {
6229
- path: "/sites/{siteId}/theme/palettes",
6230
- method: "GET",
6231
- auth: "user",
6232
- errors: [],
6233
- responseKind: "json"
6234
- },
6235
6228
  createSiteFontUploadUrl: {
6236
6229
  path: "/sites/{siteId}/fonts/upload-url",
6237
6230
  method: "POST",
@@ -7949,7 +7942,7 @@ var SimpleCache = class {
7949
7942
  * 1. This constant
7950
7943
  * 2. The "version" field in package.json
7951
7944
  */
7952
- const SDK_VERSION = "0.125.0";
7945
+ const SDK_VERSION = "0.126.0";
7953
7946
  //#endregion
7954
7947
  //#region src/client/error.ts
7955
7948
  let _Symbol$for;
@@ -11991,6 +11984,21 @@ const themeColorTokenSchema = z$1.string().min(1).refine((value) => Boolean(isTh
11991
11984
  //#region ../theme-core/src/palette/colors.ts
11992
11985
  const HEX_COLOR_REGEX = /^#[0-9a-f]{6}$/;
11993
11986
  const NORMALIZABLE_HEX_REGEX = /^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i;
11987
+ const THEME_PALETTE_COLOR_ORDER = [
11988
+ "primary",
11989
+ "secondary",
11990
+ "accent",
11991
+ "success",
11992
+ "warning",
11993
+ "destructive",
11994
+ "background",
11995
+ "surface",
11996
+ "surfaceAlt",
11997
+ "muted",
11998
+ "text",
11999
+ "primaryForeground",
12000
+ "border"
12001
+ ];
11994
12002
  const hexColorSchema = z$1.string().regex(HEX_COLOR_REGEX, "Hex must be #RRGGBB (lowercase)").transform((value) => value);
11995
12003
  const paletteModeSchema = z$1.enum(["light", "dark"]);
11996
12004
  const PALETTE_VALUE_KEY_PREFIX = "palette-value:v1|";
@@ -12068,6 +12076,12 @@ function requirePaletteColorsFromEntries(entries) {
12068
12076
  if (result.ok) return result.colors;
12069
12077
  throw new Error(`Invalid complete palette: ${result.error.kind}`);
12070
12078
  }
12079
+ function paletteColorEntries(colors) {
12080
+ return THEME_PALETTE_COLOR_ORDER.map((name) => ({
12081
+ name,
12082
+ hex: colors[name]
12083
+ }));
12084
+ }
12071
12085
  function paletteColorFingerprint(colors) {
12072
12086
  return PALETTE_TOKEN_NAMES.map((name) => `${name}:${colors[name]}`).join("|");
12073
12087
  }
@@ -13401,13 +13415,6 @@ const warmDarkKirtanGold = defineCuratedPalette({
13401
13415
  });
13402
13416
  //#endregion
13403
13417
  //#region ../theme-core/src/palette/curated/index.ts
13404
- /**
13405
- * Curated palette library.
13406
- *
13407
- * Authoring keys are readable source aliases. Value keys are derived from the
13408
- * complete mode and semantic colours and are the only curated identity used at
13409
- * persistence and runtime boundaries.
13410
- */
13411
13418
  function admitCuratedPaletteDefinition(definition) {
13412
13419
  return {
13413
13420
  ...definition,
@@ -13434,11 +13441,8 @@ const curatedPalettes = [
13434
13441
  admitCuratedPaletteDefinition(warmDarkEmber),
13435
13442
  admitCuratedPaletteDefinition(warmDarkKirtanGold)
13436
13443
  ];
13437
- const curatedPalettesByValueKey = new Map(curatedPalettes.map((palette) => [palette.valueKey, palette]));
13444
+ new Map(curatedPalettes.map((palette) => [palette.valueKey, palette]));
13438
13445
  const curatedPalettesByAuthoringKey = new Map(curatedPalettes.map((palette) => [palette.authoringKey, palette]));
13439
- function findCuratedPalette(valueKey) {
13440
- return curatedPalettesByValueKey.get(valueKey);
13441
- }
13442
13446
  function findCuratedPaletteByAuthoringKey(authoringKey) {
13443
13447
  return curatedPalettesByAuthoringKey.get(authoringKey);
13444
13448
  }
@@ -13447,87 +13451,6 @@ function requireCuratedPaletteValueKey(authoringKey) {
13447
13451
  if (!palette) throw new Error(`Unknown curated palette authoring key "${authoringKey}"`);
13448
13452
  return palette.valueKey;
13449
13453
  }
13450
- /** Parses a raw persisted key into catalogue-proven curated membership. */
13451
- const knownCuratedPaletteValueKeySchema = z$1.string().transform((value, ctx) => {
13452
- const valueKey = parsePaletteValueKey(value);
13453
- if (!valueKey) {
13454
- ctx.addIssue({
13455
- code: "custom",
13456
- message: "Invalid canonical palette value key"
13457
- });
13458
- return z$1.NEVER;
13459
- }
13460
- const palette = findCuratedPalette(valueKey);
13461
- if (!palette) {
13462
- ctx.addIssue({
13463
- code: "custom",
13464
- message: "Unknown curated palette value key"
13465
- });
13466
- return z$1.NEVER;
13467
- }
13468
- return palette.valueKey;
13469
- });
13470
- //#endregion
13471
- //#region ../theme-core/src/palette/selection.ts
13472
- const sitePaletteIdSchema = z$1.string().uuid().transform((value) => value);
13473
- const sitePaletteVersionSchema = z$1.number().int().nonnegative().transform((value) => value);
13474
- const paletteSelectionSchema = z$1.discriminatedUnion("kind", [z$1.object({
13475
- kind: z$1.literal("curated"),
13476
- valueKey: knownCuratedPaletteValueKeySchema
13477
- }), z$1.object({
13478
- kind: z$1.literal("site"),
13479
- paletteId: sitePaletteIdSchema
13480
- })]);
13481
- const onboardingPaletteOriginSchema = z$1.object({
13482
- kind: z$1.literal("onboarding"),
13483
- sourceKey: z$1.string().min(1).nullable()
13484
- });
13485
- const curatedForkPaletteOriginSchema = z$1.object({
13486
- kind: z$1.literal("curated-fork"),
13487
- sourceValueKey: paletteValueKeySchema
13488
- });
13489
- const manualPaletteOriginSchema = z$1.object({ kind: z$1.literal("manual") });
13490
- const legacyCustomizedPaletteOriginSchema = z$1.object({
13491
- kind: z$1.literal("legacy-customized"),
13492
- sourceKey: z$1.string().min(1).nullable()
13493
- });
13494
- const sitePaletteOriginSchema = z$1.discriminatedUnion("kind", [
13495
- onboardingPaletteOriginSchema,
13496
- curatedForkPaletteOriginSchema,
13497
- manualPaletteOriginSchema,
13498
- legacyCustomizedPaletteOriginSchema
13499
- ]);
13500
- const editorSitePaletteOriginSchema = z$1.discriminatedUnion("kind", [z$1.object({
13501
- kind: z$1.literal("curated-fork"),
13502
- sourceValueKey: knownCuratedPaletteValueKeySchema
13503
- }), manualPaletteOriginSchema]);
13504
- z$1.object({
13505
- id: sitePaletteIdSchema,
13506
- colors: paletteColorsSchema,
13507
- mode: paletteModeSchema,
13508
- origin: sitePaletteOriginSchema,
13509
- version: sitePaletteVersionSchema
13510
- });
13511
- z$1.discriminatedUnion("kind", [
13512
- z$1.object({ kind: z$1.literal("preserve") }),
13513
- z$1.object({
13514
- kind: z$1.literal("select"),
13515
- selection: paletteSelectionSchema
13516
- }),
13517
- z$1.object({
13518
- kind: z$1.literal("create-site"),
13519
- colors: paletteColorsSchema,
13520
- mode: paletteModeSchema,
13521
- origin: editorSitePaletteOriginSchema
13522
- }),
13523
- z$1.object({
13524
- kind: z$1.literal("update-site"),
13525
- paletteId: sitePaletteIdSchema,
13526
- expectedVersion: sitePaletteVersionSchema,
13527
- colors: paletteColorsSchema,
13528
- mode: paletteModeSchema
13529
- })
13530
- ]);
13531
13454
  //#endregion
13532
13455
  //#region ../theme-core/src/lib/media.ts
13533
13456
  const hotspotSchema$1 = z.object({
@@ -13586,6 +13509,34 @@ const mediaSchema$1 = z.object({
13586
13509
  transform: transformSchema$1.optional()
13587
13510
  });
13588
13511
  //#endregion
13512
+ //#region ../theme-core/src/palette/schema.ts
13513
+ const colourHexString = z$1.string().regex(/^#([0-9A-Fa-f]{3}){1,2}$/);
13514
+ const paletteColorSchema = z$1.object({
13515
+ name: z$1.string().min(1),
13516
+ hex: colourHexString
13517
+ });
13518
+ const paletteMetaSchema = z$1.object({ mode: z$1.enum(["light", "dark"]) });
13519
+ const paletteSchema = z$1.object({
13520
+ colors: z$1.array(paletteColorSchema),
13521
+ meta: paletteMetaSchema
13522
+ }).transform((palette, ctx) => {
13523
+ const colors = paletteColorsFromEntries(palette.colors);
13524
+ if (!colors.ok) {
13525
+ ctx.addIssue({
13526
+ code: "custom",
13527
+ message: `Invalid complete palette: ${colors.error.kind}`
13528
+ });
13529
+ return z$1.NEVER;
13530
+ }
13531
+ return {
13532
+ colors: paletteColorEntries(colors.colors).map(({ name, hex }) => ({
13533
+ name: String(name),
13534
+ hex: String(hex)
13535
+ })),
13536
+ meta: palette.meta
13537
+ };
13538
+ });
13539
+ //#endregion
13589
13540
  //#region ../theme-core/src/buttons/types.ts
13590
13541
  /**
13591
13542
  * Standard semantic variant roles a theme exposes.
@@ -16855,16 +16806,6 @@ const axesSchema = z$1.object({
16855
16806
  "expressive"
16856
16807
  ])
16857
16808
  });
16858
- const colourHexString = z$1.string().regex(/^#([0-9A-Fa-f]{3}){1,2}$/);
16859
- const paletteColorSchema = z$1.object({
16860
- name: z$1.string().min(1),
16861
- hex: colourHexString
16862
- });
16863
- const paletteMetaSchema = z$1.object({ mode: z$1.enum(["light", "dark"]) });
16864
- const paletteSchema = z$1.object({
16865
- colors: z$1.array(paletteColorSchema),
16866
- meta: paletteMetaSchema
16867
- });
16868
16809
  const typographyStyleSchema = z$1.object({
16869
16810
  family: z$1.string().min(1),
16870
16811
  weight: z$1.enum([