@riverbankcms/sdk 0.64.0 → 0.67.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 (78) hide show
  1. package/dist/_dts/api/src/aiPlayground.d.ts +18 -11
  2. package/dist/_dts/api/src/apiEndpointTypes.d.ts +12 -0
  3. package/dist/_dts/api/src/bookingOperations.d.ts +1 -1
  4. package/dist/_dts/api/src/endpoints.d.ts +25 -0
  5. package/dist/_dts/api/src/sdkConfig/contracts.d.ts +0 -40
  6. package/dist/_dts/api/src/sdkContracts.d.ts +1 -1
  7. package/dist/_dts/api/src/siteMembers.d.ts +1 -1
  8. package/dist/_dts/api/src/siteOperations.d.ts +1 -1
  9. package/dist/_dts/billing/src/plans/types.d.ts +1 -1
  10. package/dist/_dts/blocks/src/bindings/index.d.ts +1 -1
  11. package/dist/_dts/blocks/src/system/node/validation-constants.d.ts +1 -1
  12. package/dist/_dts/blocks/src/system/transforms/registry/formatting.d.ts +1 -0
  13. package/dist/_dts/blocks/src/system/transforms/typed.d.ts +2 -1
  14. package/dist/_dts/db/src/generated/supabase/database.types.d.ts +81 -0
  15. package/dist/_dts/preview-next/src/client/blocks/pageDesignRuntimePreview.d.ts +7 -3
  16. package/dist/_dts/preview-next/src/client/blocks/previewProjection/runtimeContentDecoration.d.ts +2 -2
  17. package/dist/_dts/sdk/src/cli/commands/push/execute/footer.d.ts +33 -0
  18. package/dist/_dts/sdk/src/cli/commands/push-execute.d.ts +2 -1
  19. package/dist/_dts/sdk/src/cli/env.d.ts +2 -1
  20. package/dist/_dts/sdk/src/cli/merge-remote/entryMergePush.d.ts +2 -1
  21. package/dist/_dts/sdk/src/cli/site-commands/commandKeys.d.ts +13 -0
  22. package/dist/_dts/sdk/src/cli/site-commands/commandRuntime.d.ts +114 -0
  23. package/dist/_dts/sdk/src/cli/site-commands/entryCommands.d.ts +26 -48
  24. package/dist/_dts/sdk/src/cli/site-commands/footerCommands.d.ts +50 -0
  25. package/dist/_dts/sdk/src/cli/site-commands/formCommands.d.ts +57 -0
  26. package/dist/_dts/sdk/src/cli/site-commands/index.d.ts +5 -0
  27. package/dist/_dts/sdk/src/cli/site-commands/navigationCommands.d.ts +57 -0
  28. package/dist/_dts/sdk/src/cli/site-commands/pageCommands.d.ts +83 -0
  29. package/dist/_dts/sdk/src/cli/site-commands/pushExecution.d.ts +67 -14
  30. package/dist/_dts/sdk/src/cli/sync/executor.d.ts +10 -28
  31. package/dist/_dts/sdk/src/cli/sync/index.d.ts +1 -1
  32. package/dist/_dts/sdk/src/config/dashboard-validation.d.ts +0 -48
  33. package/dist/_dts/sdk/src/config/types.d.ts +1 -1
  34. package/dist/_dts/sdk/src/version.d.ts +1 -1
  35. package/dist/_dts/site-commands/src/adapter.d.ts +2 -2
  36. package/dist/_dts/site-commands/src/commands.d.ts +410 -13
  37. package/dist/_dts/site-commands/src/domain.d.ts +3 -3
  38. package/dist/_dts/site-commands/src/exposure.d.ts +41 -0
  39. package/dist/_dts/site-commands/src/index.d.ts +1 -0
  40. package/dist/_dts/site-commands/src/metadata.d.ts +93 -2
  41. package/dist/_dts/site-commands/src/planner.d.ts +13 -6
  42. package/dist/_dts/site-commands/src/refs.d.ts +13 -1
  43. package/dist/_dts/theme-core/src/palette/utils/index.d.ts +1 -0
  44. package/dist/_dts/theme-core/src/palette/utils/onColor.d.ts +2 -0
  45. package/dist/_dts/theme-core/src/site-styles/accessibleSurfaces.d.ts +83 -0
  46. package/dist/_dts/theme-core/src/site-styles/contentTemplateRuntimeCompiler.d.ts +2 -1
  47. package/dist/_dts/theme-core/src/site-styles/curatedSiteStyles.d.ts +89 -12
  48. package/dist/_dts/theme-core/src/site-styles/generatedSchemas.d.ts +8 -2
  49. package/dist/_dts/theme-core/src/site-styles/index.d.ts +1 -0
  50. package/dist/_dts/theme-core/src/site-styles/previewCompiler.d.ts +3 -2
  51. package/dist/_dts/theme-core/src/site-styles/runtimeCompiler.d.ts +9 -6
  52. package/dist/_dts/ui/src/callout.d.ts +1 -1
  53. package/dist/cli/index.mjs +4290 -2513
  54. package/dist/client/client.mjs +598 -372
  55. package/dist/client/hooks.mjs +311 -123
  56. package/dist/client/rendering/client.mjs +209 -68
  57. package/dist/client/rendering/islands.mjs +281 -150
  58. package/dist/client/rendering.mjs +416 -190
  59. package/dist/preview-next/before-render.mjs +61 -13
  60. package/dist/preview-next/client/runtime.mjs +930 -376
  61. package/dist/preview-next/middleware.mjs +61 -13
  62. package/dist/server/components.mjs +526 -325
  63. package/dist/server/config-validation.mjs +313 -125
  64. package/dist/server/config.mjs +313 -125
  65. package/dist/server/data.mjs +311 -123
  66. package/dist/server/index.mjs +78 -16
  67. package/dist/server/next.mjs +527 -326
  68. package/dist/server/page-converter.mjs +159 -41
  69. package/dist/server/prebuild.mjs +1 -1
  70. package/dist/server/rendering/server.mjs +526 -325
  71. package/dist/server/rendering.mjs +526 -325
  72. package/dist/server/routing.mjs +392 -131
  73. package/dist/server/server.mjs +312 -124
  74. package/dist/server/theme-bridge.mjs +155 -48
  75. package/package.json +1 -1
  76. package/dist/_dts/path-utils/src/index.d.ts +0 -8
  77. package/dist/_dts/path-utils/src/redirectPaths.d.ts +0 -26
  78. package/dist/_dts/path-utils/src/safeAppPath.d.ts +0 -26
@@ -5,6 +5,17 @@ import { use } from "react";
5
5
  // src/rendering/hooks/usePage.ts
6
6
  import { useState, useEffect } from "react";
7
7
 
8
+ // ../api/src/apiEndpointTypes.ts
9
+ function blockedDemoMutationPolicy(classification, publicMessage) {
10
+ if (publicMessage.trim() === "") {
11
+ throw new Error(`Demo mutation policy ${classification} requires publicMessage.`);
12
+ }
13
+ return {
14
+ classification,
15
+ publicMessage
16
+ };
17
+ }
18
+
8
19
  // ../api/src/cache-tags.ts
9
20
  var TAG_TEMPLATES = {
10
21
  siteCollection: "riverbank:site",
@@ -35,6 +46,18 @@ var TAG_TEMPLATES = {
35
46
  };
36
47
 
37
48
  // ../api/src/endpoints.ts
49
+ var DEMO_MUTATION_BLOCKED_HIDDEN = blockedDemoMutationPolicy(
50
+ "blocked-hidden",
51
+ "This action is not available in demo sites."
52
+ );
53
+ var DEMO_MUTATION_BLOCKED_DISABLED = blockedDemoMutationPolicy(
54
+ "blocked-disabled",
55
+ "This setting is disabled in demo sites."
56
+ );
57
+ var DEMO_MUTATION_INTERNAL_ONLY = blockedDemoMutationPolicy(
58
+ "internal-only",
59
+ "This internal operation is not available in demo sites."
60
+ );
38
61
  var ENDPOINT_DEFINITIONS = {
39
62
  // AI endpoints - no cache due to dynamic nature
40
63
  aiContentUpdateChat: {
@@ -151,7 +174,8 @@ var ENDPOINT_DEFINITIONS = {
151
174
  path: "/sites/{siteId}/ai/generate",
152
175
  method: "POST",
153
176
  auth: "user",
154
- responseKind: "json"
177
+ responseKind: "json",
178
+ demoMutation: DEMO_MUTATION_BLOCKED_HIDDEN
155
179
  },
156
180
  getOnboardingPreviewStatus: {
157
181
  path: "/public/sites/{siteId}/onboarding/preview-status",
@@ -172,7 +196,8 @@ var ENDPOINT_DEFINITIONS = {
172
196
  method: "POST",
173
197
  auth: "user",
174
198
  errors: [],
175
- responseKind: "json"
199
+ responseKind: "json",
200
+ demoMutation: DEMO_MUTATION_BLOCKED_DISABLED
176
201
  },
177
202
  goLiveSite: {
178
203
  path: "/sites/{siteId}/launch/go-live",
@@ -241,20 +266,23 @@ var ENDPOINT_DEFINITIONS = {
241
266
  path: "/sites/{siteId}/ai/site-wizard/goals",
242
267
  method: "POST",
243
268
  auth: "user",
244
- responseKind: "json"
269
+ responseKind: "json",
270
+ demoMutation: DEMO_MUTATION_BLOCKED_HIDDEN
245
271
  },
246
272
  aiSiteWizardIntakeTriage: {
247
273
  path: "/sites/{siteId}/ai/site-wizard/intake-triage",
248
274
  method: "POST",
249
275
  auth: "user",
250
- responseKind: "json"
276
+ responseKind: "json",
277
+ demoMutation: DEMO_MUTATION_BLOCKED_HIDDEN
251
278
  },
252
279
  aiSiteWizardTelemetry: {
253
280
  path: "/sites/{siteId}/ai/site-wizard/telemetry",
254
281
  method: "POST",
255
282
  auth: "user",
256
283
  errors: [],
257
- responseKind: "json"
284
+ responseKind: "json",
285
+ demoMutation: DEMO_MUTATION_BLOCKED_HIDDEN
258
286
  },
259
287
  // Admin SEO
260
288
  listGscPropertiesAdmin: {
@@ -461,7 +489,7 @@ var ENDPOINT_DEFINITIONS = {
461
489
  responseKind: "json",
462
490
  errors: ["resource:not_found", "server:internal_error"]
463
491
  },
464
- // Ops (event hosts/admins)
492
+ // Ops (staff event operators/admins)
465
493
  opsListUpcomingEventOccurrences: {
466
494
  path: "/ops/sites/{siteId}/events",
467
495
  method: "GET",
@@ -479,6 +507,7 @@ var ENDPOINT_DEFINITIONS = {
479
507
  method: "POST",
480
508
  auth: "user",
481
509
  responseKind: "json",
510
+ demoMutation: DEMO_MUTATION_INTERNAL_ONLY,
482
511
  errors: [
483
512
  "validation:invalid_input",
484
513
  "auth:forbidden",
@@ -491,6 +520,7 @@ var ENDPOINT_DEFINITIONS = {
491
520
  method: "POST",
492
521
  auth: "user",
493
522
  responseKind: "json",
523
+ demoMutation: DEMO_MUTATION_INTERNAL_ONLY,
494
524
  errors: [
495
525
  "validation:invalid_input",
496
526
  "auth:forbidden",
@@ -509,6 +539,7 @@ var ENDPOINT_DEFINITIONS = {
509
539
  method: "POST",
510
540
  auth: "user",
511
541
  responseKind: "json",
542
+ demoMutation: DEMO_MUTATION_INTERNAL_ONLY,
512
543
  errors: [
513
544
  "validation:invalid_input",
514
545
  "auth:forbidden",
@@ -542,6 +573,7 @@ var ENDPOINT_DEFINITIONS = {
542
573
  method: "POST",
543
574
  auth: "user",
544
575
  responseKind: "json",
576
+ demoMutation: DEMO_MUTATION_INTERNAL_ONLY,
545
577
  errors: [
546
578
  "validation:invalid_input",
547
579
  "auth:forbidden",
@@ -570,7 +602,8 @@ var ENDPOINT_DEFINITIONS = {
570
602
  method: "POST",
571
603
  tags: [TAG_TEMPLATES.site, TAG_TEMPLATES.siteEmailSettings],
572
604
  auth: "user",
573
- responseKind: "json"
605
+ responseKind: "json",
606
+ demoMutation: DEMO_MUTATION_BLOCKED_HIDDEN
574
607
  },
575
608
  previewEmailTemplate: {
576
609
  path: "/sites/{siteId}/settings/emails/preview",
@@ -621,14 +654,16 @@ var ENDPOINT_DEFINITIONS = {
621
654
  method: "POST",
622
655
  tags: [TAG_TEMPLATES.site, TAG_TEMPLATES.siteNewsletter],
623
656
  auth: "user",
624
- responseKind: "json"
657
+ responseKind: "json",
658
+ demoMutation: DEMO_MUTATION_BLOCKED_HIDDEN
625
659
  },
626
660
  createNewsletterSubscribersImportUploadUrl: {
627
661
  path: "/sites/{siteId}/newsletter/subscribers/import-url",
628
662
  method: "POST",
629
663
  tags: [TAG_TEMPLATES.site, TAG_TEMPLATES.siteNewsletter],
630
664
  auth: "user",
631
- responseKind: "json"
665
+ responseKind: "json",
666
+ demoMutation: DEMO_MUTATION_BLOCKED_HIDDEN
632
667
  },
633
668
  exportNewsletterSubscribersCsv: {
634
669
  path: "/sites/{siteId}/newsletter/subscribers/export.csv",
@@ -825,14 +860,16 @@ var ENDPOINT_DEFINITIONS = {
825
860
  method: "POST",
826
861
  tags: [TAG_TEMPLATES.site, TAG_TEMPLATES.siteNewsletter],
827
862
  auth: "user",
828
- responseKind: "json"
863
+ responseKind: "json",
864
+ demoMutation: DEMO_MUTATION_BLOCKED_HIDDEN
829
865
  },
830
866
  testSendNewsletterCampaign: {
831
867
  path: "/sites/{siteId}/newsletter/campaigns/{campaignId}/test-send",
832
868
  method: "POST",
833
869
  tags: [TAG_TEMPLATES.site, TAG_TEMPLATES.siteNewsletter],
834
870
  auth: "user",
835
- responseKind: "json"
871
+ responseKind: "json",
872
+ demoMutation: DEMO_MUTATION_BLOCKED_HIDDEN
836
873
  },
837
874
  listNewsletterSendJobs: {
838
875
  path: "/sites/{siteId}/newsletter/jobs",
@@ -1520,7 +1557,8 @@ var ENDPOINT_DEFINITIONS = {
1520
1557
  method: "DELETE",
1521
1558
  tags: ["site", "site-{siteId}"],
1522
1559
  auth: "user",
1523
- responseKind: "json"
1560
+ responseKind: "json",
1561
+ demoMutation: DEMO_MUTATION_BLOCKED_HIDDEN
1524
1562
  },
1525
1563
  listSiteMembers: {
1526
1564
  path: "/sites/{siteId}/members",
@@ -1976,7 +2014,8 @@ var ENDPOINT_DEFINITIONS = {
1976
2014
  method: "POST",
1977
2015
  tags: ["site-{siteId}", "content-{siteId}-{type}"],
1978
2016
  auth: "user",
1979
- responseKind: "json"
2017
+ responseKind: "json",
2018
+ demoMutation: DEMO_MUTATION_BLOCKED_HIDDEN
1980
2019
  },
1981
2020
  updateSiteGeneralSettings: {
1982
2021
  path: "/sites/{siteId}/settings/general",
@@ -4215,6 +4254,7 @@ var ENDPOINT_DEFINITIONS = {
4215
4254
  method: "POST",
4216
4255
  tags: ["site-{siteId}"],
4217
4256
  auth: "user",
4257
+ demoMutation: DEMO_MUTATION_BLOCKED_HIDDEN,
4218
4258
  errors: [
4219
4259
  "validation:invalid_input",
4220
4260
  "auth:forbidden",
@@ -4229,6 +4269,7 @@ var ENDPOINT_DEFINITIONS = {
4229
4269
  method: "POST",
4230
4270
  tags: ["site-{siteId}"],
4231
4271
  auth: "user",
4272
+ demoMutation: DEMO_MUTATION_BLOCKED_HIDDEN,
4232
4273
  errors: [
4233
4274
  "validation:invalid_input",
4234
4275
  "auth:forbidden",
@@ -4538,6 +4579,7 @@ var ENDPOINT_DEFINITIONS = {
4538
4579
  tags: ["site-{siteId}", "passes-{siteId}"],
4539
4580
  auth: "user",
4540
4581
  responseKind: "json",
4582
+ demoMutation: DEMO_MUTATION_BLOCKED_DISABLED,
4541
4583
  errors: ["validation:invalid_input", "server:internal_error"]
4542
4584
  },
4543
4585
  getBookingPass: {
@@ -4553,6 +4595,7 @@ var ENDPOINT_DEFINITIONS = {
4553
4595
  tags: ["site-{siteId}", "passes-{siteId}"],
4554
4596
  auth: "user",
4555
4597
  responseKind: "json",
4598
+ demoMutation: DEMO_MUTATION_BLOCKED_DISABLED,
4556
4599
  errors: [
4557
4600
  "validation:invalid_input",
4558
4601
  "resource:not_found",
@@ -4565,6 +4608,7 @@ var ENDPOINT_DEFINITIONS = {
4565
4608
  tags: ["site-{siteId}", "passes-{siteId}"],
4566
4609
  auth: "user",
4567
4610
  responseKind: "json",
4611
+ demoMutation: DEMO_MUTATION_BLOCKED_DISABLED,
4568
4612
  errors: [
4569
4613
  "validation:invalid_input",
4570
4614
  "resource:not_found",
@@ -4620,6 +4664,7 @@ var ENDPOINT_DEFINITIONS = {
4620
4664
  tags: ["site-{siteId}", "memberships-{siteId}"],
4621
4665
  auth: "user",
4622
4666
  responseKind: "json",
4667
+ demoMutation: DEMO_MUTATION_BLOCKED_DISABLED,
4623
4668
  errors: ["validation:invalid_input", "server:internal_error"]
4624
4669
  },
4625
4670
  getBookingMembership: {
@@ -4635,6 +4680,7 @@ var ENDPOINT_DEFINITIONS = {
4635
4680
  tags: ["site-{siteId}", "memberships-{siteId}"],
4636
4681
  auth: "user",
4637
4682
  responseKind: "json",
4683
+ demoMutation: DEMO_MUTATION_BLOCKED_DISABLED,
4638
4684
  errors: [
4639
4685
  "validation:invalid_input",
4640
4686
  "resource:not_found",
@@ -4647,6 +4693,7 @@ var ENDPOINT_DEFINITIONS = {
4647
4693
  tags: ["site-{siteId}", "memberships-{siteId}"],
4648
4694
  auth: "user",
4649
4695
  responseKind: "json",
4696
+ demoMutation: DEMO_MUTATION_BLOCKED_DISABLED,
4650
4697
  errors: [
4651
4698
  "validation:invalid_input",
4652
4699
  "resource:not_found",
@@ -4863,6 +4910,7 @@ var ENDPOINT_DEFINITIONS = {
4863
4910
  tags: ["site-{siteId}", "customers-{siteId}"],
4864
4911
  auth: "user",
4865
4912
  responseKind: "json",
4913
+ demoMutation: DEMO_MUTATION_BLOCKED_DISABLED,
4866
4914
  errors: [
4867
4915
  "validation:invalid_input",
4868
4916
  "auth:forbidden",
@@ -7122,8 +7170,7 @@ var dashboardNavVisibilityBaseSchema = z5.object({
7122
7170
  var dashboardNavVisibilityRolesSchema = z5.object({
7123
7171
  administrator: dashboardNavVisibilityBaseSchema.optional(),
7124
7172
  editor: dashboardNavVisibilityBaseSchema.optional(),
7125
- team_member: dashboardNavVisibilityBaseSchema.optional(),
7126
- event_host: dashboardNavVisibilityBaseSchema.optional()
7173
+ team_member: dashboardNavVisibilityBaseSchema.optional()
7127
7174
  }).strip().optional();
7128
7175
  var dashboardNavVisibilitySchema = dashboardNavVisibilityBaseSchema.extend({
7129
7176
  roles: dashboardNavVisibilityRolesSchema
@@ -7644,6 +7691,21 @@ var appointmentSetupServiceDraftSchema = z7.object({
7644
7691
  timezone: z7.string().trim().min(1).nullable(),
7645
7692
  payment: appointmentSetupPaymentDraftSchema,
7646
7693
  assignment: appointmentSetupServiceAssignmentDraftSchema
7694
+ }).superRefine((service, ctx) => {
7695
+ if (service.payment.priceType === "paid" && (service.priceAmount === null || service.priceAmount <= 0)) {
7696
+ ctx.addIssue({
7697
+ code: "custom",
7698
+ path: ["priceAmount"],
7699
+ message: "Paid appointment services need a positive price."
7700
+ });
7701
+ }
7702
+ if (service.payment.priceType === "free" && service.priceAmount !== null && service.priceAmount > 0) {
7703
+ ctx.addIssue({
7704
+ code: "custom",
7705
+ path: ["priceAmount"],
7706
+ message: "Free appointment services cannot carry a positive price."
7707
+ });
7708
+ }
7647
7709
  });
7648
7710
  var appointmentSetupPractitionerDraftSchema = z7.object({
7649
7711
  ref: appointmentSetupRefSchema,
@@ -8016,6 +8078,71 @@ function registerManifest(manifest) {
8016
8078
  return manifest;
8017
8079
  }
8018
8080
 
8081
+ // ../theme-core/src/palette/utils/colorConversion.ts
8082
+ var mod = (a, n) => (a % n + n) % n;
8083
+ var deg = (x) => mod(x, 360);
8084
+ function hexToRgb(hex) {
8085
+ const h = hex.replace(/^#/, "");
8086
+ const m = h.length === 3 ? h.split("").map((c) => c + c).join("") : h;
8087
+ if (m.length !== 6) throw new Error("Bad hex");
8088
+ const int = parseInt(m, 16);
8089
+ return { r: int >> 16 & 255, g: int >> 8 & 255, b: int & 255 };
8090
+ }
8091
+ function srgbToLinear(u) {
8092
+ const x = u / 255;
8093
+ return x <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4);
8094
+ }
8095
+ function rgbToHsl(r, g, b) {
8096
+ const R = r / 255, G = g / 255, B = b / 255;
8097
+ const max = Math.max(R, G, B), min = Math.min(R, G, B);
8098
+ const d = max - min;
8099
+ let h = 0;
8100
+ if (d !== 0) {
8101
+ switch (max) {
8102
+ case R:
8103
+ h = (G - B) / d + (G < B ? 6 : 0);
8104
+ break;
8105
+ case G:
8106
+ h = (B - R) / d + 2;
8107
+ break;
8108
+ case B:
8109
+ h = (R - G) / d + 4;
8110
+ break;
8111
+ }
8112
+ h *= 60;
8113
+ }
8114
+ const l = (max + min) / 2;
8115
+ const s = d === 0 ? 0 : d / (1 - Math.abs(2 * l - 1));
8116
+ return { h, s, l };
8117
+ }
8118
+ function srgbToOklab(r, g, b) {
8119
+ const R = srgbToLinear(r), G = srgbToLinear(g), B = srgbToLinear(b);
8120
+ const l = 0.4122214708 * R + 0.5363325363 * G + 0.0514459929 * B;
8121
+ const m = 0.2119034982 * R + 0.6806995451 * G + 0.1073969566 * B;
8122
+ const s = 0.0883024619 * R + 0.2817188376 * G + 0.6299787005 * B;
8123
+ const l_ = Math.cbrt(l), m_ = Math.cbrt(m), s_ = Math.cbrt(s);
8124
+ const L = 0.2104542553 * l_ + 0.793617785 * m_ - 0.0040720468 * s_;
8125
+ const a = 1.9779984951 * l_ - 2.428592205 * m_ + 0.4505937099 * s_;
8126
+ const b2 = 0.0259040371 * l_ + 0.7827717662 * m_ - 0.808675766 * s_;
8127
+ return { L, a, b: b2 };
8128
+ }
8129
+ function oklabToOklch(L, a, b) {
8130
+ const C = Math.sqrt(a * a + b * b);
8131
+ const h = C < 1e-7 ? 0 : deg(Math.atan2(b, a) * 180 / Math.PI);
8132
+ return { L, C, h };
8133
+ }
8134
+ function featuresFromHex(hex) {
8135
+ const { r, g, b } = hexToRgb(hex);
8136
+ const { h, s, l } = rgbToHsl(r, g, b);
8137
+ const { L, a, b: b2 } = srgbToOklab(r, g, b);
8138
+ const { L: okL, C: okC, h: okH } = oklabToOklch(L, a, b2);
8139
+ const max = Math.max(r, g, b);
8140
+ const v = max / 255;
8141
+ const Y = 0.2126 * srgbToLinear(r) + 0.7152 * srgbToLinear(g) + 0.0722 * srgbToLinear(b);
8142
+ const chroma = s;
8143
+ return { r, g, b, h, s, l, v, Y, chroma, okL, okC, okH, hex };
8144
+ }
8145
+
8019
8146
  // ../theme-core/src/site-styles/appearancePresetResolution.ts
8020
8147
  function assertValidOptionGroups(preset2) {
8021
8148
  preset2.optionGroups?.forEach((group) => {
@@ -11545,6 +11672,9 @@ var curatedSiteStyleIdValues = [
11545
11672
  "site-style:bright-community",
11546
11673
  "site-style:quiet-luxury",
11547
11674
  "site-style:practical-services",
11675
+ "site-style:quiet-practice",
11676
+ "site-style:personal-retreat-journal",
11677
+ "site-style:tactile-workshop",
11548
11678
  "site-style:modern-wellness",
11549
11679
  "site-style:bold-launch",
11550
11680
  "site-style:south-west-twerk-school"
@@ -11627,7 +11757,8 @@ function defineCuratedSiteStyle(input) {
11627
11757
  name: input.name,
11628
11758
  description: input.description,
11629
11759
  generationBrief: input.generationBrief,
11630
- selectionKeywords: input.selectionKeywords ?? [],
11760
+ selectionKeywordRules: input.selectionKeywordRules ?? [],
11761
+ siteCreatorSelection: input.siteCreatorSelection ?? { kind: "explicit_only" },
11631
11762
  template: {
11632
11763
  id: asDesignSystemTemplateId(`template:${input.id.replace("site-style:", "")}`),
11633
11764
  name: input.name,
@@ -11771,12 +11902,13 @@ var curatedSiteStyles = [
11771
11902
  name: "Quiet Luxury",
11772
11903
  description: "Minimal, confident, and refined for premium experiences and private services.",
11773
11904
  generationBrief: "Use fewer claims, more specificity, and restrained sensory detail. Favor elegant media and low repetition over dense panels.",
11774
- selectionKeywords: [
11775
- "luxury",
11776
- "premium",
11777
- "boutique",
11778
- "bespoke",
11779
- "exclusive"
11905
+ siteCreatorSelection: { kind: "site_creator_keyword_heuristic", priority: 20 },
11906
+ selectionKeywordRules: [
11907
+ { kind: "word", value: "luxury" },
11908
+ { kind: "word", value: "premium" },
11909
+ { kind: "word", value: "boutique" },
11910
+ { kind: "word", value: "bespoke" },
11911
+ { kind: "word", value: "exclusive" }
11780
11912
  ],
11781
11913
  tokenRecipes: {
11782
11914
  palette: "high-contrast",
@@ -11805,13 +11937,14 @@ var curatedSiteStyles = [
11805
11937
  name: "Practical Services",
11806
11938
  description: "Efficient, plainspoken, and conversion-focused for trades and everyday services.",
11807
11939
  generationBrief: "Make services, location, trust signals, and contact paths obvious. Keep copy brief and avoid ornate visual treatments.",
11808
- selectionKeywords: [
11809
- "repair",
11810
- "plumb",
11811
- "electric",
11812
- "cleaning",
11813
- "landscap",
11814
- "contractor"
11940
+ siteCreatorSelection: { kind: "primary_goal_support" },
11941
+ selectionKeywordRules: [
11942
+ { kind: "word", value: "repair" },
11943
+ { kind: "substring", value: "plumb" },
11944
+ { kind: "substring", value: "electric" },
11945
+ { kind: "word", value: "cleaning" },
11946
+ { kind: "substring", value: "landscap" },
11947
+ { kind: "substring", value: "contractor" }
11815
11948
  ],
11816
11949
  tokenRecipes: {
11817
11950
  palette: "brand-led",
@@ -11862,18 +11995,134 @@ var curatedSiteStyles = [
11862
11995
  paletteChoice("warm-neutral-forest")
11863
11996
  ]
11864
11997
  }),
11998
+ defineCuratedSiteStyle({
11999
+ id: "site-style:quiet-practice",
12000
+ name: "Quiet Practice",
12001
+ description: "Grounded, calm, and practical for small appointment-first practices.",
12002
+ generationBrief: "Make services, practitioner trust, preparation notes, and booking routes easy to scan. Keep the tone warm and specific, with quiet confidence rather than spa cliches or medical claims.",
12003
+ siteCreatorSelection: { kind: "site_creator_keyword_heuristic", priority: 30 },
12004
+ selectionKeywordRules: [
12005
+ { kind: "substring", value: "massage" },
12006
+ { kind: "word", value: "bodywork" },
12007
+ { kind: "phrase", value: "appointment practice" },
12008
+ { kind: "phrase", value: "appointment-first" },
12009
+ { kind: "substring", value: "practitioner" },
12010
+ { kind: "substring", value: "therap" },
12011
+ { kind: "substring", value: "clinic" },
12012
+ { kind: "phrase", value: "wellness practice" }
12013
+ ],
12014
+ tokenRecipes: {
12015
+ palette: "soft-natural",
12016
+ contrast: "standard",
12017
+ radius: "soft",
12018
+ shadow: "subtle",
12019
+ typography: "clean-sans",
12020
+ spacing: "regular",
12021
+ motion: "subtle"
12022
+ },
12023
+ compositionBudget: quietBudget,
12024
+ recommendedHeaderLookIds: ["practical-utility", "clean-base", "centered-calm"],
12025
+ buttonPersonalityChoices: [
12026
+ buttonChoice("pebble"),
12027
+ buttonChoice("soft-pill"),
12028
+ buttonChoice("editorial-link")
12029
+ ],
12030
+ paletteVariantChoices: [
12031
+ paletteChoice("soft-natural-stone"),
12032
+ paletteChoice("soft-natural-sage"),
12033
+ paletteChoice("warm-neutral-clay")
12034
+ ]
12035
+ }),
12036
+ defineCuratedSiteStyle({
12037
+ id: "site-style:personal-retreat-journal",
12038
+ name: "Personal Retreat Journal",
12039
+ description: "Warm, story-led, and readable for solo practitioners with mixed offers.",
12040
+ generationBrief: "Center the practitioner as the guide, then make private sessions, classes, retreats, and resources feel like clear pathways. Keep retreat copy grounded and practical, with enough editorial warmth for longer reading.",
12041
+ siteCreatorSelection: { kind: "site_creator_keyword_heuristic", priority: 40 },
12042
+ selectionKeywordRules: [
12043
+ { kind: "substring", value: "retreat" },
12044
+ { kind: "phrase", value: "solo practitioner" },
12045
+ { kind: "phrase", value: "personal brand" },
12046
+ { kind: "substring", value: "teacher" },
12047
+ { kind: "substring", value: "coach" },
12048
+ { kind: "phrase", value: "retreat resources" },
12049
+ { kind: "substring", value: "journal" }
12050
+ ],
12051
+ tokenRecipes: {
12052
+ palette: "warm-neutral",
12053
+ contrast: "standard",
12054
+ radius: "soft",
12055
+ shadow: "subtle",
12056
+ typography: "serif-editorial",
12057
+ spacing: "airy",
12058
+ motion: "subtle"
12059
+ },
12060
+ compositionBudget: balancedBudget,
12061
+ recommendedHeaderLookIds: ["editorial-line", "centered-calm", "minimal-transparent"],
12062
+ buttonPersonalityChoices: [
12063
+ buttonChoice("editorial-link"),
12064
+ buttonChoice("soft-pill"),
12065
+ buttonChoice("brushed-wash")
12066
+ ],
12067
+ paletteVariantChoices: [
12068
+ paletteChoice("warm-neutral-forest"),
12069
+ paletteChoice("warm-neutral-clay"),
12070
+ paletteChoice("soft-natural-stone")
12071
+ ]
12072
+ }),
12073
+ defineCuratedSiteStyle({
12074
+ id: "site-style:tactile-workshop",
12075
+ name: "Tactile Workshop",
12076
+ description: "Bright, hands-on, and image-led for maker studios, workshops, and creative classes.",
12077
+ generationBrief: "Lead with objects, materials, studio process, and practical booking detail. Keep the tone warm and direct, with useful mess, clear dates, and enough gallery rhythm to feel like a real creative studio.",
12078
+ siteCreatorSelection: { kind: "site_creator_keyword_heuristic", priority: 50 },
12079
+ selectionKeywordRules: [
12080
+ { kind: "substring", value: "ceramic" },
12081
+ { kind: "word", value: "pottery" },
12082
+ { kind: "phrase", value: "maker studio" },
12083
+ { kind: "phrase", value: "craft class" },
12084
+ { kind: "phrase", value: "craft workshop" },
12085
+ { kind: "word", value: "clay" },
12086
+ { kind: "word", value: "kiln" }
12087
+ ],
12088
+ tokenRecipes: {
12089
+ palette: "brand-led",
12090
+ contrast: "standard",
12091
+ radius: "soft",
12092
+ shadow: "subtle",
12093
+ typography: "friendly-sans",
12094
+ spacing: "regular",
12095
+ motion: "subtle"
12096
+ },
12097
+ compositionBudget: balancedBudget,
12098
+ recommendedHeaderLookIds: ["brand-solid", "practical-utility", "clean-base"],
12099
+ recommendedFooterLookIds: ["site-footer-brand-two-band", "footer-muted-grounding"],
12100
+ buttonPersonalityChoices: [
12101
+ buttonChoice("pebble"),
12102
+ buttonChoice("confident-chip"),
12103
+ buttonChoice("ink-stamp"),
12104
+ buttonChoice("editorial-link")
12105
+ ],
12106
+ paletteVariantChoices: [
12107
+ paletteChoice("brand-led-warm"),
12108
+ paletteChoice("brand-led-cool"),
12109
+ paletteChoice("soft-natural-watercolor"),
12110
+ paletteChoice("warm-neutral-clay")
12111
+ ]
12112
+ }),
11865
12113
  defineCuratedSiteStyle({
11866
12114
  id: "site-style:bold-launch",
11867
12115
  name: "Bold Launch",
11868
12116
  description: "High-energy and punchy for launches, campaigns, and creative offers.",
11869
12117
  generationBrief: "Use crisp positioning, bold hero structure, strong calls to action, and confident visual rhythm. Keep it precise, not shouty.",
11870
- selectionKeywords: [
11871
- "launch",
11872
- "campaign",
11873
- "preorder",
11874
- "pre-order",
11875
- "waitlist",
11876
- "drop"
12118
+ siteCreatorSelection: { kind: "site_creator_keyword_heuristic", priority: 10 },
12119
+ selectionKeywordRules: [
12120
+ { kind: "substring", value: "launch" },
12121
+ { kind: "substring", value: "campaign" },
12122
+ { kind: "word", value: "preorder" },
12123
+ { kind: "phrase", value: "pre-order" },
12124
+ { kind: "substring", value: "waitlist" },
12125
+ { kind: "word", value: "drop" }
11877
12126
  ],
11878
12127
  tokenRecipes: {
11879
12128
  palette: "high-contrast",
@@ -11904,15 +12153,6 @@ var curatedSiteStyles = [
11904
12153
  name: "South West Twerk School",
11905
12154
  description: "Energetic, editorial, and high-contrast for a branded dance school presence.",
11906
12155
  generationBrief: "Use confident rhythm, bold burgundy-and-gold accents, large editorial intro copy, strong booking routes, and dark feature sections where proof or forms need emphasis.",
11907
- selectionKeywords: [
11908
- "dance",
11909
- "classes",
11910
- "workshop",
11911
- "school",
11912
- "movement",
11913
- "performance",
11914
- "community"
11915
- ],
11916
12156
  tokenRecipes: {
11917
12157
  palette: "brand-led",
11918
12158
  contrast: "maximum",
@@ -12219,25 +12459,19 @@ var defaultDesignRuntimeRules = defineDesignRuntimeRules({
12219
12459
  "muted-band": {
12220
12460
  background: {
12221
12461
  type: "color",
12222
- color: "muted",
12223
- textColor: "text",
12224
- headingColor: "text"
12462
+ color: "muted"
12225
12463
  }
12226
12464
  },
12227
12465
  "accent-band": {
12228
12466
  background: {
12229
12467
  type: "color",
12230
- color: "primary",
12231
- textColor: "primaryForeground",
12232
- headingColor: "primaryForeground"
12468
+ color: "primary"
12233
12469
  }
12234
12470
  },
12235
12471
  "brand-depth-band": {
12236
12472
  background: {
12237
12473
  type: "color",
12238
- color: "primary-800",
12239
- textColor: "primaryForeground",
12240
- headingColor: "primaryForeground"
12474
+ color: "primary-800"
12241
12475
  }
12242
12476
  },
12243
12477
  "hero-image": {
@@ -18345,6 +18579,16 @@ var jsonArrayTransform = {
18345
18579
  return "";
18346
18580
  }
18347
18581
  };
18582
+ var csvTransform = {
18583
+ id: "value.csv",
18584
+ kind: "formatter",
18585
+ summary: "Normalize a string or array of strings into a comma-separated list",
18586
+ run: (value) => {
18587
+ const rawValues = Array.isArray(value) ? value : typeof value === "string" ? value.split(",") : [];
18588
+ const normalized = rawValues.filter((item) => typeof item === "string").map((item) => item.trim()).filter(Boolean);
18589
+ return normalized.length > 0 ? Array.from(new Set(normalized)).join(",") : "";
18590
+ }
18591
+ };
18348
18592
  var marqueeLoopOptionsSchema = z36.object({
18349
18593
  minItems: z36.number().int().min(1).default(10)
18350
18594
  });
@@ -18370,6 +18614,7 @@ var formattingTransforms = [
18370
18614
  dateFormatShort,
18371
18615
  arrayLengthTransform,
18372
18616
  jsonArrayTransform,
18617
+ csvTransform,
18373
18618
  marqueeLoopTransform
18374
18619
  ];
18375
18620
 
@@ -18853,73 +19098,6 @@ var uiTransforms = [
18853
19098
 
18854
19099
  // ../blocks/src/system/transforms/registry/layout.ts
18855
19100
  import { z as z38 } from "zod";
18856
-
18857
- // ../theme-core/src/palette/utils/colorConversion.ts
18858
- var mod = (a, n) => (a % n + n) % n;
18859
- var deg = (x) => mod(x, 360);
18860
- function hexToRgb(hex) {
18861
- const h = hex.replace(/^#/, "");
18862
- const m = h.length === 3 ? h.split("").map((c) => c + c).join("") : h;
18863
- if (m.length !== 6) throw new Error("Bad hex");
18864
- const int = parseInt(m, 16);
18865
- return { r: int >> 16 & 255, g: int >> 8 & 255, b: int & 255 };
18866
- }
18867
- function srgbToLinear(u) {
18868
- const x = u / 255;
18869
- return x <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4);
18870
- }
18871
- function rgbToHsl(r, g, b) {
18872
- const R = r / 255, G = g / 255, B = b / 255;
18873
- const max = Math.max(R, G, B), min = Math.min(R, G, B);
18874
- const d = max - min;
18875
- let h = 0;
18876
- if (d !== 0) {
18877
- switch (max) {
18878
- case R:
18879
- h = (G - B) / d + (G < B ? 6 : 0);
18880
- break;
18881
- case G:
18882
- h = (B - R) / d + 2;
18883
- break;
18884
- case B:
18885
- h = (R - G) / d + 4;
18886
- break;
18887
- }
18888
- h *= 60;
18889
- }
18890
- const l = (max + min) / 2;
18891
- const s = d === 0 ? 0 : d / (1 - Math.abs(2 * l - 1));
18892
- return { h, s, l };
18893
- }
18894
- function srgbToOklab(r, g, b) {
18895
- const R = srgbToLinear(r), G = srgbToLinear(g), B = srgbToLinear(b);
18896
- const l = 0.4122214708 * R + 0.5363325363 * G + 0.0514459929 * B;
18897
- const m = 0.2119034982 * R + 0.6806995451 * G + 0.1073969566 * B;
18898
- const s = 0.0883024619 * R + 0.2817188376 * G + 0.6299787005 * B;
18899
- const l_ = Math.cbrt(l), m_ = Math.cbrt(m), s_ = Math.cbrt(s);
18900
- const L = 0.2104542553 * l_ + 0.793617785 * m_ - 0.0040720468 * s_;
18901
- const a = 1.9779984951 * l_ - 2.428592205 * m_ + 0.4505937099 * s_;
18902
- const b2 = 0.0259040371 * l_ + 0.7827717662 * m_ - 0.808675766 * s_;
18903
- return { L, a, b: b2 };
18904
- }
18905
- function oklabToOklch(L, a, b) {
18906
- const C = Math.sqrt(a * a + b * b);
18907
- const h = C < 1e-7 ? 0 : deg(Math.atan2(b, a) * 180 / Math.PI);
18908
- return { L, C, h };
18909
- }
18910
- function featuresFromHex(hex) {
18911
- const { r, g, b } = hexToRgb(hex);
18912
- const { h, s, l } = rgbToHsl(r, g, b);
18913
- const { L, a, b: b2 } = srgbToOklab(r, g, b);
18914
- const { L: okL, C: okC, h: okH } = oklabToOklch(L, a, b2);
18915
- const max = Math.max(r, g, b);
18916
- const v = max / 255;
18917
- const Y = 0.2126 * srgbToLinear(r) + 0.7152 * srgbToLinear(g) + 0.0722 * srgbToLinear(b);
18918
- const chroma = s;
18919
- return { r, g, b, h, s, l, v, Y, chroma, okL, okC, okH, hex };
18920
- }
18921
-
18922
- // ../blocks/src/system/transforms/registry/layout.ts
18923
19101
  var joinClasses4 = (parts) => parts.filter(
18924
19102
  (part) => typeof part === "string" && part.trim().length > 0
18925
19103
  ).join(" ").replace(/\s+/g, " ").trim();
@@ -23603,7 +23781,12 @@ var eventListingBlockDefinition = {
23603
23781
  detailLevel: "listing",
23604
23782
  kind: { $bind: { from: "content.kind" } },
23605
23783
  eventSurface: { $bind: { from: "content.eventSurface" } },
23606
- eventPresets: { $bind: { from: "content.filterEventPresets" } },
23784
+ eventPresets: {
23785
+ $bind: {
23786
+ from: "content.filterEventPresets",
23787
+ transforms: [{ id: "value.csv" }]
23788
+ }
23789
+ },
23607
23790
  scheduleScope: { $bind: { from: "content.scheduleScope" } }
23608
23791
  },
23609
23792
  mode: "server"
@@ -24355,7 +24538,12 @@ var eventCalendarBlockDefinition = {
24355
24538
  // Pass filter params if configured
24356
24539
  kind: { $bind: { from: "content.kind" } },
24357
24540
  eventSurface: { $bind: { from: "content.eventSurface" } },
24358
- eventPresets: { $bind: { from: "content.filterEventPresets" } },
24541
+ eventPresets: {
24542
+ $bind: {
24543
+ from: "content.filterEventPresets",
24544
+ transforms: [{ id: "value.csv" }]
24545
+ }
24546
+ },
24359
24547
  scheduleScope: { $bind: { from: "content.scheduleScope" } },
24360
24548
  categoryIds: { $bind: { from: "content.filterCategoryIds" } },
24361
24549
  staffMemberId: { $bind: { from: "content.filterStaffMemberId" } },