@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.
- package/dist/_dts/api/src/aiPlayground.d.ts +18 -11
- package/dist/_dts/api/src/apiEndpointTypes.d.ts +12 -0
- package/dist/_dts/api/src/bookingOperations.d.ts +1 -1
- package/dist/_dts/api/src/endpoints.d.ts +25 -0
- package/dist/_dts/api/src/sdkConfig/contracts.d.ts +0 -40
- package/dist/_dts/api/src/sdkContracts.d.ts +1 -1
- package/dist/_dts/api/src/siteMembers.d.ts +1 -1
- package/dist/_dts/api/src/siteOperations.d.ts +1 -1
- package/dist/_dts/billing/src/plans/types.d.ts +1 -1
- package/dist/_dts/blocks/src/bindings/index.d.ts +1 -1
- package/dist/_dts/blocks/src/system/node/validation-constants.d.ts +1 -1
- package/dist/_dts/blocks/src/system/transforms/registry/formatting.d.ts +1 -0
- package/dist/_dts/blocks/src/system/transforms/typed.d.ts +2 -1
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +81 -0
- package/dist/_dts/preview-next/src/client/blocks/pageDesignRuntimePreview.d.ts +7 -3
- package/dist/_dts/preview-next/src/client/blocks/previewProjection/runtimeContentDecoration.d.ts +2 -2
- package/dist/_dts/sdk/src/cli/commands/push/execute/footer.d.ts +33 -0
- package/dist/_dts/sdk/src/cli/commands/push-execute.d.ts +2 -1
- package/dist/_dts/sdk/src/cli/env.d.ts +2 -1
- package/dist/_dts/sdk/src/cli/merge-remote/entryMergePush.d.ts +2 -1
- package/dist/_dts/sdk/src/cli/site-commands/commandKeys.d.ts +13 -0
- package/dist/_dts/sdk/src/cli/site-commands/commandRuntime.d.ts +114 -0
- package/dist/_dts/sdk/src/cli/site-commands/entryCommands.d.ts +26 -48
- package/dist/_dts/sdk/src/cli/site-commands/footerCommands.d.ts +50 -0
- package/dist/_dts/sdk/src/cli/site-commands/formCommands.d.ts +57 -0
- package/dist/_dts/sdk/src/cli/site-commands/index.d.ts +5 -0
- package/dist/_dts/sdk/src/cli/site-commands/navigationCommands.d.ts +57 -0
- package/dist/_dts/sdk/src/cli/site-commands/pageCommands.d.ts +83 -0
- package/dist/_dts/sdk/src/cli/site-commands/pushExecution.d.ts +67 -14
- package/dist/_dts/sdk/src/cli/sync/executor.d.ts +10 -28
- package/dist/_dts/sdk/src/cli/sync/index.d.ts +1 -1
- package/dist/_dts/sdk/src/config/dashboard-validation.d.ts +0 -48
- package/dist/_dts/sdk/src/config/types.d.ts +1 -1
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/site-commands/src/adapter.d.ts +2 -2
- package/dist/_dts/site-commands/src/commands.d.ts +410 -13
- package/dist/_dts/site-commands/src/domain.d.ts +3 -3
- package/dist/_dts/site-commands/src/exposure.d.ts +41 -0
- package/dist/_dts/site-commands/src/index.d.ts +1 -0
- package/dist/_dts/site-commands/src/metadata.d.ts +93 -2
- package/dist/_dts/site-commands/src/planner.d.ts +13 -6
- package/dist/_dts/site-commands/src/refs.d.ts +13 -1
- package/dist/_dts/theme-core/src/palette/utils/index.d.ts +1 -0
- package/dist/_dts/theme-core/src/palette/utils/onColor.d.ts +2 -0
- package/dist/_dts/theme-core/src/site-styles/accessibleSurfaces.d.ts +83 -0
- package/dist/_dts/theme-core/src/site-styles/contentTemplateRuntimeCompiler.d.ts +2 -1
- package/dist/_dts/theme-core/src/site-styles/curatedSiteStyles.d.ts +89 -12
- package/dist/_dts/theme-core/src/site-styles/generatedSchemas.d.ts +8 -2
- package/dist/_dts/theme-core/src/site-styles/index.d.ts +1 -0
- package/dist/_dts/theme-core/src/site-styles/previewCompiler.d.ts +3 -2
- package/dist/_dts/theme-core/src/site-styles/runtimeCompiler.d.ts +9 -6
- package/dist/_dts/ui/src/callout.d.ts +1 -1
- package/dist/cli/index.mjs +4290 -2513
- package/dist/client/client.mjs +598 -372
- package/dist/client/hooks.mjs +311 -123
- package/dist/client/rendering/client.mjs +209 -68
- package/dist/client/rendering/islands.mjs +281 -150
- package/dist/client/rendering.mjs +416 -190
- package/dist/preview-next/before-render.mjs +61 -13
- package/dist/preview-next/client/runtime.mjs +930 -376
- package/dist/preview-next/middleware.mjs +61 -13
- package/dist/server/components.mjs +526 -325
- package/dist/server/config-validation.mjs +313 -125
- package/dist/server/config.mjs +313 -125
- package/dist/server/data.mjs +311 -123
- package/dist/server/index.mjs +78 -16
- package/dist/server/next.mjs +527 -326
- package/dist/server/page-converter.mjs +159 -41
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +526 -325
- package/dist/server/rendering.mjs +526 -325
- package/dist/server/routing.mjs +392 -131
- package/dist/server/server.mjs +312 -124
- package/dist/server/theme-bridge.mjs +155 -48
- package/package.json +1 -1
- package/dist/_dts/path-utils/src/index.d.ts +0 -8
- package/dist/_dts/path-utils/src/redirectPaths.d.ts +0 -26
- package/dist/_dts/path-utils/src/safeAppPath.d.ts +0 -26
package/dist/server/server.mjs
CHANGED
|
@@ -53,6 +53,17 @@ function parsePublicProductCategorySelector(value) {
|
|
|
53
53
|
return void 0;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
+
// ../api/src/apiEndpointTypes.ts
|
|
57
|
+
function blockedDemoMutationPolicy(classification, publicMessage) {
|
|
58
|
+
if (publicMessage.trim() === "") {
|
|
59
|
+
throw new Error(`Demo mutation policy ${classification} requires publicMessage.`);
|
|
60
|
+
}
|
|
61
|
+
return {
|
|
62
|
+
classification,
|
|
63
|
+
publicMessage
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
|
|
56
67
|
// ../api/src/cache-tags.ts
|
|
57
68
|
var TAG_TEMPLATES = {
|
|
58
69
|
siteCollection: "riverbank:site",
|
|
@@ -83,6 +94,18 @@ var TAG_TEMPLATES = {
|
|
|
83
94
|
};
|
|
84
95
|
|
|
85
96
|
// ../api/src/endpoints.ts
|
|
97
|
+
var DEMO_MUTATION_BLOCKED_HIDDEN = blockedDemoMutationPolicy(
|
|
98
|
+
"blocked-hidden",
|
|
99
|
+
"This action is not available in demo sites."
|
|
100
|
+
);
|
|
101
|
+
var DEMO_MUTATION_BLOCKED_DISABLED = blockedDemoMutationPolicy(
|
|
102
|
+
"blocked-disabled",
|
|
103
|
+
"This setting is disabled in demo sites."
|
|
104
|
+
);
|
|
105
|
+
var DEMO_MUTATION_INTERNAL_ONLY = blockedDemoMutationPolicy(
|
|
106
|
+
"internal-only",
|
|
107
|
+
"This internal operation is not available in demo sites."
|
|
108
|
+
);
|
|
86
109
|
var ENDPOINT_DEFINITIONS = {
|
|
87
110
|
// AI endpoints - no cache due to dynamic nature
|
|
88
111
|
aiContentUpdateChat: {
|
|
@@ -199,7 +222,8 @@ var ENDPOINT_DEFINITIONS = {
|
|
|
199
222
|
path: "/sites/{siteId}/ai/generate",
|
|
200
223
|
method: "POST",
|
|
201
224
|
auth: "user",
|
|
202
|
-
responseKind: "json"
|
|
225
|
+
responseKind: "json",
|
|
226
|
+
demoMutation: DEMO_MUTATION_BLOCKED_HIDDEN
|
|
203
227
|
},
|
|
204
228
|
getOnboardingPreviewStatus: {
|
|
205
229
|
path: "/public/sites/{siteId}/onboarding/preview-status",
|
|
@@ -220,7 +244,8 @@ var ENDPOINT_DEFINITIONS = {
|
|
|
220
244
|
method: "POST",
|
|
221
245
|
auth: "user",
|
|
222
246
|
errors: [],
|
|
223
|
-
responseKind: "json"
|
|
247
|
+
responseKind: "json",
|
|
248
|
+
demoMutation: DEMO_MUTATION_BLOCKED_DISABLED
|
|
224
249
|
},
|
|
225
250
|
goLiveSite: {
|
|
226
251
|
path: "/sites/{siteId}/launch/go-live",
|
|
@@ -289,20 +314,23 @@ var ENDPOINT_DEFINITIONS = {
|
|
|
289
314
|
path: "/sites/{siteId}/ai/site-wizard/goals",
|
|
290
315
|
method: "POST",
|
|
291
316
|
auth: "user",
|
|
292
|
-
responseKind: "json"
|
|
317
|
+
responseKind: "json",
|
|
318
|
+
demoMutation: DEMO_MUTATION_BLOCKED_HIDDEN
|
|
293
319
|
},
|
|
294
320
|
aiSiteWizardIntakeTriage: {
|
|
295
321
|
path: "/sites/{siteId}/ai/site-wizard/intake-triage",
|
|
296
322
|
method: "POST",
|
|
297
323
|
auth: "user",
|
|
298
|
-
responseKind: "json"
|
|
324
|
+
responseKind: "json",
|
|
325
|
+
demoMutation: DEMO_MUTATION_BLOCKED_HIDDEN
|
|
299
326
|
},
|
|
300
327
|
aiSiteWizardTelemetry: {
|
|
301
328
|
path: "/sites/{siteId}/ai/site-wizard/telemetry",
|
|
302
329
|
method: "POST",
|
|
303
330
|
auth: "user",
|
|
304
331
|
errors: [],
|
|
305
|
-
responseKind: "json"
|
|
332
|
+
responseKind: "json",
|
|
333
|
+
demoMutation: DEMO_MUTATION_BLOCKED_HIDDEN
|
|
306
334
|
},
|
|
307
335
|
// Admin SEO
|
|
308
336
|
listGscPropertiesAdmin: {
|
|
@@ -509,7 +537,7 @@ var ENDPOINT_DEFINITIONS = {
|
|
|
509
537
|
responseKind: "json",
|
|
510
538
|
errors: ["resource:not_found", "server:internal_error"]
|
|
511
539
|
},
|
|
512
|
-
// Ops (event
|
|
540
|
+
// Ops (staff event operators/admins)
|
|
513
541
|
opsListUpcomingEventOccurrences: {
|
|
514
542
|
path: "/ops/sites/{siteId}/events",
|
|
515
543
|
method: "GET",
|
|
@@ -527,6 +555,7 @@ var ENDPOINT_DEFINITIONS = {
|
|
|
527
555
|
method: "POST",
|
|
528
556
|
auth: "user",
|
|
529
557
|
responseKind: "json",
|
|
558
|
+
demoMutation: DEMO_MUTATION_INTERNAL_ONLY,
|
|
530
559
|
errors: [
|
|
531
560
|
"validation:invalid_input",
|
|
532
561
|
"auth:forbidden",
|
|
@@ -539,6 +568,7 @@ var ENDPOINT_DEFINITIONS = {
|
|
|
539
568
|
method: "POST",
|
|
540
569
|
auth: "user",
|
|
541
570
|
responseKind: "json",
|
|
571
|
+
demoMutation: DEMO_MUTATION_INTERNAL_ONLY,
|
|
542
572
|
errors: [
|
|
543
573
|
"validation:invalid_input",
|
|
544
574
|
"auth:forbidden",
|
|
@@ -557,6 +587,7 @@ var ENDPOINT_DEFINITIONS = {
|
|
|
557
587
|
method: "POST",
|
|
558
588
|
auth: "user",
|
|
559
589
|
responseKind: "json",
|
|
590
|
+
demoMutation: DEMO_MUTATION_INTERNAL_ONLY,
|
|
560
591
|
errors: [
|
|
561
592
|
"validation:invalid_input",
|
|
562
593
|
"auth:forbidden",
|
|
@@ -590,6 +621,7 @@ var ENDPOINT_DEFINITIONS = {
|
|
|
590
621
|
method: "POST",
|
|
591
622
|
auth: "user",
|
|
592
623
|
responseKind: "json",
|
|
624
|
+
demoMutation: DEMO_MUTATION_INTERNAL_ONLY,
|
|
593
625
|
errors: [
|
|
594
626
|
"validation:invalid_input",
|
|
595
627
|
"auth:forbidden",
|
|
@@ -618,7 +650,8 @@ var ENDPOINT_DEFINITIONS = {
|
|
|
618
650
|
method: "POST",
|
|
619
651
|
tags: [TAG_TEMPLATES.site, TAG_TEMPLATES.siteEmailSettings],
|
|
620
652
|
auth: "user",
|
|
621
|
-
responseKind: "json"
|
|
653
|
+
responseKind: "json",
|
|
654
|
+
demoMutation: DEMO_MUTATION_BLOCKED_HIDDEN
|
|
622
655
|
},
|
|
623
656
|
previewEmailTemplate: {
|
|
624
657
|
path: "/sites/{siteId}/settings/emails/preview",
|
|
@@ -669,14 +702,16 @@ var ENDPOINT_DEFINITIONS = {
|
|
|
669
702
|
method: "POST",
|
|
670
703
|
tags: [TAG_TEMPLATES.site, TAG_TEMPLATES.siteNewsletter],
|
|
671
704
|
auth: "user",
|
|
672
|
-
responseKind: "json"
|
|
705
|
+
responseKind: "json",
|
|
706
|
+
demoMutation: DEMO_MUTATION_BLOCKED_HIDDEN
|
|
673
707
|
},
|
|
674
708
|
createNewsletterSubscribersImportUploadUrl: {
|
|
675
709
|
path: "/sites/{siteId}/newsletter/subscribers/import-url",
|
|
676
710
|
method: "POST",
|
|
677
711
|
tags: [TAG_TEMPLATES.site, TAG_TEMPLATES.siteNewsletter],
|
|
678
712
|
auth: "user",
|
|
679
|
-
responseKind: "json"
|
|
713
|
+
responseKind: "json",
|
|
714
|
+
demoMutation: DEMO_MUTATION_BLOCKED_HIDDEN
|
|
680
715
|
},
|
|
681
716
|
exportNewsletterSubscribersCsv: {
|
|
682
717
|
path: "/sites/{siteId}/newsletter/subscribers/export.csv",
|
|
@@ -873,14 +908,16 @@ var ENDPOINT_DEFINITIONS = {
|
|
|
873
908
|
method: "POST",
|
|
874
909
|
tags: [TAG_TEMPLATES.site, TAG_TEMPLATES.siteNewsletter],
|
|
875
910
|
auth: "user",
|
|
876
|
-
responseKind: "json"
|
|
911
|
+
responseKind: "json",
|
|
912
|
+
demoMutation: DEMO_MUTATION_BLOCKED_HIDDEN
|
|
877
913
|
},
|
|
878
914
|
testSendNewsletterCampaign: {
|
|
879
915
|
path: "/sites/{siteId}/newsletter/campaigns/{campaignId}/test-send",
|
|
880
916
|
method: "POST",
|
|
881
917
|
tags: [TAG_TEMPLATES.site, TAG_TEMPLATES.siteNewsletter],
|
|
882
918
|
auth: "user",
|
|
883
|
-
responseKind: "json"
|
|
919
|
+
responseKind: "json",
|
|
920
|
+
demoMutation: DEMO_MUTATION_BLOCKED_HIDDEN
|
|
884
921
|
},
|
|
885
922
|
listNewsletterSendJobs: {
|
|
886
923
|
path: "/sites/{siteId}/newsletter/jobs",
|
|
@@ -1568,7 +1605,8 @@ var ENDPOINT_DEFINITIONS = {
|
|
|
1568
1605
|
method: "DELETE",
|
|
1569
1606
|
tags: ["site", "site-{siteId}"],
|
|
1570
1607
|
auth: "user",
|
|
1571
|
-
responseKind: "json"
|
|
1608
|
+
responseKind: "json",
|
|
1609
|
+
demoMutation: DEMO_MUTATION_BLOCKED_HIDDEN
|
|
1572
1610
|
},
|
|
1573
1611
|
listSiteMembers: {
|
|
1574
1612
|
path: "/sites/{siteId}/members",
|
|
@@ -2024,7 +2062,8 @@ var ENDPOINT_DEFINITIONS = {
|
|
|
2024
2062
|
method: "POST",
|
|
2025
2063
|
tags: ["site-{siteId}", "content-{siteId}-{type}"],
|
|
2026
2064
|
auth: "user",
|
|
2027
|
-
responseKind: "json"
|
|
2065
|
+
responseKind: "json",
|
|
2066
|
+
demoMutation: DEMO_MUTATION_BLOCKED_HIDDEN
|
|
2028
2067
|
},
|
|
2029
2068
|
updateSiteGeneralSettings: {
|
|
2030
2069
|
path: "/sites/{siteId}/settings/general",
|
|
@@ -4263,6 +4302,7 @@ var ENDPOINT_DEFINITIONS = {
|
|
|
4263
4302
|
method: "POST",
|
|
4264
4303
|
tags: ["site-{siteId}"],
|
|
4265
4304
|
auth: "user",
|
|
4305
|
+
demoMutation: DEMO_MUTATION_BLOCKED_HIDDEN,
|
|
4266
4306
|
errors: [
|
|
4267
4307
|
"validation:invalid_input",
|
|
4268
4308
|
"auth:forbidden",
|
|
@@ -4277,6 +4317,7 @@ var ENDPOINT_DEFINITIONS = {
|
|
|
4277
4317
|
method: "POST",
|
|
4278
4318
|
tags: ["site-{siteId}"],
|
|
4279
4319
|
auth: "user",
|
|
4320
|
+
demoMutation: DEMO_MUTATION_BLOCKED_HIDDEN,
|
|
4280
4321
|
errors: [
|
|
4281
4322
|
"validation:invalid_input",
|
|
4282
4323
|
"auth:forbidden",
|
|
@@ -4586,6 +4627,7 @@ var ENDPOINT_DEFINITIONS = {
|
|
|
4586
4627
|
tags: ["site-{siteId}", "passes-{siteId}"],
|
|
4587
4628
|
auth: "user",
|
|
4588
4629
|
responseKind: "json",
|
|
4630
|
+
demoMutation: DEMO_MUTATION_BLOCKED_DISABLED,
|
|
4589
4631
|
errors: ["validation:invalid_input", "server:internal_error"]
|
|
4590
4632
|
},
|
|
4591
4633
|
getBookingPass: {
|
|
@@ -4601,6 +4643,7 @@ var ENDPOINT_DEFINITIONS = {
|
|
|
4601
4643
|
tags: ["site-{siteId}", "passes-{siteId}"],
|
|
4602
4644
|
auth: "user",
|
|
4603
4645
|
responseKind: "json",
|
|
4646
|
+
demoMutation: DEMO_MUTATION_BLOCKED_DISABLED,
|
|
4604
4647
|
errors: [
|
|
4605
4648
|
"validation:invalid_input",
|
|
4606
4649
|
"resource:not_found",
|
|
@@ -4613,6 +4656,7 @@ var ENDPOINT_DEFINITIONS = {
|
|
|
4613
4656
|
tags: ["site-{siteId}", "passes-{siteId}"],
|
|
4614
4657
|
auth: "user",
|
|
4615
4658
|
responseKind: "json",
|
|
4659
|
+
demoMutation: DEMO_MUTATION_BLOCKED_DISABLED,
|
|
4616
4660
|
errors: [
|
|
4617
4661
|
"validation:invalid_input",
|
|
4618
4662
|
"resource:not_found",
|
|
@@ -4668,6 +4712,7 @@ var ENDPOINT_DEFINITIONS = {
|
|
|
4668
4712
|
tags: ["site-{siteId}", "memberships-{siteId}"],
|
|
4669
4713
|
auth: "user",
|
|
4670
4714
|
responseKind: "json",
|
|
4715
|
+
demoMutation: DEMO_MUTATION_BLOCKED_DISABLED,
|
|
4671
4716
|
errors: ["validation:invalid_input", "server:internal_error"]
|
|
4672
4717
|
},
|
|
4673
4718
|
getBookingMembership: {
|
|
@@ -4683,6 +4728,7 @@ var ENDPOINT_DEFINITIONS = {
|
|
|
4683
4728
|
tags: ["site-{siteId}", "memberships-{siteId}"],
|
|
4684
4729
|
auth: "user",
|
|
4685
4730
|
responseKind: "json",
|
|
4731
|
+
demoMutation: DEMO_MUTATION_BLOCKED_DISABLED,
|
|
4686
4732
|
errors: [
|
|
4687
4733
|
"validation:invalid_input",
|
|
4688
4734
|
"resource:not_found",
|
|
@@ -4695,6 +4741,7 @@ var ENDPOINT_DEFINITIONS = {
|
|
|
4695
4741
|
tags: ["site-{siteId}", "memberships-{siteId}"],
|
|
4696
4742
|
auth: "user",
|
|
4697
4743
|
responseKind: "json",
|
|
4744
|
+
demoMutation: DEMO_MUTATION_BLOCKED_DISABLED,
|
|
4698
4745
|
errors: [
|
|
4699
4746
|
"validation:invalid_input",
|
|
4700
4747
|
"resource:not_found",
|
|
@@ -4911,6 +4958,7 @@ var ENDPOINT_DEFINITIONS = {
|
|
|
4911
4958
|
tags: ["site-{siteId}", "customers-{siteId}"],
|
|
4912
4959
|
auth: "user",
|
|
4913
4960
|
responseKind: "json",
|
|
4961
|
+
demoMutation: DEMO_MUTATION_BLOCKED_DISABLED,
|
|
4914
4962
|
errors: [
|
|
4915
4963
|
"validation:invalid_input",
|
|
4916
4964
|
"auth:forbidden",
|
|
@@ -6729,7 +6777,7 @@ var SimpleCache = class {
|
|
|
6729
6777
|
};
|
|
6730
6778
|
|
|
6731
6779
|
// src/version.ts
|
|
6732
|
-
var SDK_VERSION = "0.
|
|
6780
|
+
var SDK_VERSION = "0.67.0";
|
|
6733
6781
|
|
|
6734
6782
|
// src/client/error.ts
|
|
6735
6783
|
var RiverbankApiError = class _RiverbankApiError extends Error {
|
|
@@ -8906,8 +8954,7 @@ var dashboardNavVisibilityBaseSchema = z5.object({
|
|
|
8906
8954
|
var dashboardNavVisibilityRolesSchema = z5.object({
|
|
8907
8955
|
administrator: dashboardNavVisibilityBaseSchema.optional(),
|
|
8908
8956
|
editor: dashboardNavVisibilityBaseSchema.optional(),
|
|
8909
|
-
team_member: dashboardNavVisibilityBaseSchema.optional()
|
|
8910
|
-
event_host: dashboardNavVisibilityBaseSchema.optional()
|
|
8957
|
+
team_member: dashboardNavVisibilityBaseSchema.optional()
|
|
8911
8958
|
}).strip().optional();
|
|
8912
8959
|
var dashboardNavVisibilitySchema = dashboardNavVisibilityBaseSchema.extend({
|
|
8913
8960
|
roles: dashboardNavVisibilityRolesSchema
|
|
@@ -9421,6 +9468,21 @@ var appointmentSetupServiceDraftSchema = z7.object({
|
|
|
9421
9468
|
timezone: z7.string().trim().min(1).nullable(),
|
|
9422
9469
|
payment: appointmentSetupPaymentDraftSchema,
|
|
9423
9470
|
assignment: appointmentSetupServiceAssignmentDraftSchema
|
|
9471
|
+
}).superRefine((service, ctx) => {
|
|
9472
|
+
if (service.payment.priceType === "paid" && (service.priceAmount === null || service.priceAmount <= 0)) {
|
|
9473
|
+
ctx.addIssue({
|
|
9474
|
+
code: "custom",
|
|
9475
|
+
path: ["priceAmount"],
|
|
9476
|
+
message: "Paid appointment services need a positive price."
|
|
9477
|
+
});
|
|
9478
|
+
}
|
|
9479
|
+
if (service.payment.priceType === "free" && service.priceAmount !== null && service.priceAmount > 0) {
|
|
9480
|
+
ctx.addIssue({
|
|
9481
|
+
code: "custom",
|
|
9482
|
+
path: ["priceAmount"],
|
|
9483
|
+
message: "Free appointment services cannot carry a positive price."
|
|
9484
|
+
});
|
|
9485
|
+
}
|
|
9424
9486
|
});
|
|
9425
9487
|
var appointmentSetupPractitionerDraftSchema = z7.object({
|
|
9426
9488
|
ref: appointmentSetupRefSchema,
|
|
@@ -9758,6 +9820,71 @@ function registerManifest(manifest) {
|
|
|
9758
9820
|
return manifest;
|
|
9759
9821
|
}
|
|
9760
9822
|
|
|
9823
|
+
// ../theme-core/src/palette/utils/colorConversion.ts
|
|
9824
|
+
var mod = (a, n) => (a % n + n) % n;
|
|
9825
|
+
var deg = (x) => mod(x, 360);
|
|
9826
|
+
function hexToRgb(hex) {
|
|
9827
|
+
const h = hex.replace(/^#/, "");
|
|
9828
|
+
const m = h.length === 3 ? h.split("").map((c) => c + c).join("") : h;
|
|
9829
|
+
if (m.length !== 6) throw new Error("Bad hex");
|
|
9830
|
+
const int = parseInt(m, 16);
|
|
9831
|
+
return { r: int >> 16 & 255, g: int >> 8 & 255, b: int & 255 };
|
|
9832
|
+
}
|
|
9833
|
+
function srgbToLinear(u) {
|
|
9834
|
+
const x = u / 255;
|
|
9835
|
+
return x <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4);
|
|
9836
|
+
}
|
|
9837
|
+
function rgbToHsl(r, g, b) {
|
|
9838
|
+
const R = r / 255, G = g / 255, B = b / 255;
|
|
9839
|
+
const max = Math.max(R, G, B), min = Math.min(R, G, B);
|
|
9840
|
+
const d = max - min;
|
|
9841
|
+
let h = 0;
|
|
9842
|
+
if (d !== 0) {
|
|
9843
|
+
switch (max) {
|
|
9844
|
+
case R:
|
|
9845
|
+
h = (G - B) / d + (G < B ? 6 : 0);
|
|
9846
|
+
break;
|
|
9847
|
+
case G:
|
|
9848
|
+
h = (B - R) / d + 2;
|
|
9849
|
+
break;
|
|
9850
|
+
case B:
|
|
9851
|
+
h = (R - G) / d + 4;
|
|
9852
|
+
break;
|
|
9853
|
+
}
|
|
9854
|
+
h *= 60;
|
|
9855
|
+
}
|
|
9856
|
+
const l = (max + min) / 2;
|
|
9857
|
+
const s = d === 0 ? 0 : d / (1 - Math.abs(2 * l - 1));
|
|
9858
|
+
return { h, s, l };
|
|
9859
|
+
}
|
|
9860
|
+
function srgbToOklab(r, g, b) {
|
|
9861
|
+
const R = srgbToLinear(r), G = srgbToLinear(g), B = srgbToLinear(b);
|
|
9862
|
+
const l = 0.4122214708 * R + 0.5363325363 * G + 0.0514459929 * B;
|
|
9863
|
+
const m = 0.2119034982 * R + 0.6806995451 * G + 0.1073969566 * B;
|
|
9864
|
+
const s = 0.0883024619 * R + 0.2817188376 * G + 0.6299787005 * B;
|
|
9865
|
+
const l_ = Math.cbrt(l), m_ = Math.cbrt(m), s_ = Math.cbrt(s);
|
|
9866
|
+
const L = 0.2104542553 * l_ + 0.793617785 * m_ - 0.0040720468 * s_;
|
|
9867
|
+
const a = 1.9779984951 * l_ - 2.428592205 * m_ + 0.4505937099 * s_;
|
|
9868
|
+
const b2 = 0.0259040371 * l_ + 0.7827717662 * m_ - 0.808675766 * s_;
|
|
9869
|
+
return { L, a, b: b2 };
|
|
9870
|
+
}
|
|
9871
|
+
function oklabToOklch(L, a, b) {
|
|
9872
|
+
const C = Math.sqrt(a * a + b * b);
|
|
9873
|
+
const h = C < 1e-7 ? 0 : deg(Math.atan2(b, a) * 180 / Math.PI);
|
|
9874
|
+
return { L, C, h };
|
|
9875
|
+
}
|
|
9876
|
+
function featuresFromHex(hex) {
|
|
9877
|
+
const { r, g, b } = hexToRgb(hex);
|
|
9878
|
+
const { h, s, l } = rgbToHsl(r, g, b);
|
|
9879
|
+
const { L, a, b: b2 } = srgbToOklab(r, g, b);
|
|
9880
|
+
const { L: okL, C: okC, h: okH } = oklabToOklch(L, a, b2);
|
|
9881
|
+
const max = Math.max(r, g, b);
|
|
9882
|
+
const v = max / 255;
|
|
9883
|
+
const Y = 0.2126 * srgbToLinear(r) + 0.7152 * srgbToLinear(g) + 0.0722 * srgbToLinear(b);
|
|
9884
|
+
const chroma = s;
|
|
9885
|
+
return { r, g, b, h, s, l, v, Y, chroma, okL, okC, okH, hex };
|
|
9886
|
+
}
|
|
9887
|
+
|
|
9761
9888
|
// ../theme-core/src/site-styles/appearancePresetResolution.ts
|
|
9762
9889
|
function assertValidOptionGroups(preset2) {
|
|
9763
9890
|
preset2.optionGroups?.forEach((group) => {
|
|
@@ -13287,6 +13414,9 @@ var curatedSiteStyleIdValues = [
|
|
|
13287
13414
|
"site-style:bright-community",
|
|
13288
13415
|
"site-style:quiet-luxury",
|
|
13289
13416
|
"site-style:practical-services",
|
|
13417
|
+
"site-style:quiet-practice",
|
|
13418
|
+
"site-style:personal-retreat-journal",
|
|
13419
|
+
"site-style:tactile-workshop",
|
|
13290
13420
|
"site-style:modern-wellness",
|
|
13291
13421
|
"site-style:bold-launch",
|
|
13292
13422
|
"site-style:south-west-twerk-school"
|
|
@@ -13369,7 +13499,8 @@ function defineCuratedSiteStyle(input) {
|
|
|
13369
13499
|
name: input.name,
|
|
13370
13500
|
description: input.description,
|
|
13371
13501
|
generationBrief: input.generationBrief,
|
|
13372
|
-
|
|
13502
|
+
selectionKeywordRules: input.selectionKeywordRules ?? [],
|
|
13503
|
+
siteCreatorSelection: input.siteCreatorSelection ?? { kind: "explicit_only" },
|
|
13373
13504
|
template: {
|
|
13374
13505
|
id: asDesignSystemTemplateId(`template:${input.id.replace("site-style:", "")}`),
|
|
13375
13506
|
name: input.name,
|
|
@@ -13513,12 +13644,13 @@ var curatedSiteStyles = [
|
|
|
13513
13644
|
name: "Quiet Luxury",
|
|
13514
13645
|
description: "Minimal, confident, and refined for premium experiences and private services.",
|
|
13515
13646
|
generationBrief: "Use fewer claims, more specificity, and restrained sensory detail. Favor elegant media and low repetition over dense panels.",
|
|
13516
|
-
|
|
13517
|
-
|
|
13518
|
-
"
|
|
13519
|
-
"
|
|
13520
|
-
"
|
|
13521
|
-
"
|
|
13647
|
+
siteCreatorSelection: { kind: "site_creator_keyword_heuristic", priority: 20 },
|
|
13648
|
+
selectionKeywordRules: [
|
|
13649
|
+
{ kind: "word", value: "luxury" },
|
|
13650
|
+
{ kind: "word", value: "premium" },
|
|
13651
|
+
{ kind: "word", value: "boutique" },
|
|
13652
|
+
{ kind: "word", value: "bespoke" },
|
|
13653
|
+
{ kind: "word", value: "exclusive" }
|
|
13522
13654
|
],
|
|
13523
13655
|
tokenRecipes: {
|
|
13524
13656
|
palette: "high-contrast",
|
|
@@ -13547,13 +13679,14 @@ var curatedSiteStyles = [
|
|
|
13547
13679
|
name: "Practical Services",
|
|
13548
13680
|
description: "Efficient, plainspoken, and conversion-focused for trades and everyday services.",
|
|
13549
13681
|
generationBrief: "Make services, location, trust signals, and contact paths obvious. Keep copy brief and avoid ornate visual treatments.",
|
|
13550
|
-
|
|
13551
|
-
|
|
13552
|
-
"
|
|
13553
|
-
"
|
|
13554
|
-
"
|
|
13555
|
-
"
|
|
13556
|
-
"
|
|
13682
|
+
siteCreatorSelection: { kind: "primary_goal_support" },
|
|
13683
|
+
selectionKeywordRules: [
|
|
13684
|
+
{ kind: "word", value: "repair" },
|
|
13685
|
+
{ kind: "substring", value: "plumb" },
|
|
13686
|
+
{ kind: "substring", value: "electric" },
|
|
13687
|
+
{ kind: "word", value: "cleaning" },
|
|
13688
|
+
{ kind: "substring", value: "landscap" },
|
|
13689
|
+
{ kind: "substring", value: "contractor" }
|
|
13557
13690
|
],
|
|
13558
13691
|
tokenRecipes: {
|
|
13559
13692
|
palette: "brand-led",
|
|
@@ -13604,18 +13737,134 @@ var curatedSiteStyles = [
|
|
|
13604
13737
|
paletteChoice("warm-neutral-forest")
|
|
13605
13738
|
]
|
|
13606
13739
|
}),
|
|
13740
|
+
defineCuratedSiteStyle({
|
|
13741
|
+
id: "site-style:quiet-practice",
|
|
13742
|
+
name: "Quiet Practice",
|
|
13743
|
+
description: "Grounded, calm, and practical for small appointment-first practices.",
|
|
13744
|
+
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.",
|
|
13745
|
+
siteCreatorSelection: { kind: "site_creator_keyword_heuristic", priority: 30 },
|
|
13746
|
+
selectionKeywordRules: [
|
|
13747
|
+
{ kind: "substring", value: "massage" },
|
|
13748
|
+
{ kind: "word", value: "bodywork" },
|
|
13749
|
+
{ kind: "phrase", value: "appointment practice" },
|
|
13750
|
+
{ kind: "phrase", value: "appointment-first" },
|
|
13751
|
+
{ kind: "substring", value: "practitioner" },
|
|
13752
|
+
{ kind: "substring", value: "therap" },
|
|
13753
|
+
{ kind: "substring", value: "clinic" },
|
|
13754
|
+
{ kind: "phrase", value: "wellness practice" }
|
|
13755
|
+
],
|
|
13756
|
+
tokenRecipes: {
|
|
13757
|
+
palette: "soft-natural",
|
|
13758
|
+
contrast: "standard",
|
|
13759
|
+
radius: "soft",
|
|
13760
|
+
shadow: "subtle",
|
|
13761
|
+
typography: "clean-sans",
|
|
13762
|
+
spacing: "regular",
|
|
13763
|
+
motion: "subtle"
|
|
13764
|
+
},
|
|
13765
|
+
compositionBudget: quietBudget,
|
|
13766
|
+
recommendedHeaderLookIds: ["practical-utility", "clean-base", "centered-calm"],
|
|
13767
|
+
buttonPersonalityChoices: [
|
|
13768
|
+
buttonChoice("pebble"),
|
|
13769
|
+
buttonChoice("soft-pill"),
|
|
13770
|
+
buttonChoice("editorial-link")
|
|
13771
|
+
],
|
|
13772
|
+
paletteVariantChoices: [
|
|
13773
|
+
paletteChoice("soft-natural-stone"),
|
|
13774
|
+
paletteChoice("soft-natural-sage"),
|
|
13775
|
+
paletteChoice("warm-neutral-clay")
|
|
13776
|
+
]
|
|
13777
|
+
}),
|
|
13778
|
+
defineCuratedSiteStyle({
|
|
13779
|
+
id: "site-style:personal-retreat-journal",
|
|
13780
|
+
name: "Personal Retreat Journal",
|
|
13781
|
+
description: "Warm, story-led, and readable for solo practitioners with mixed offers.",
|
|
13782
|
+
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.",
|
|
13783
|
+
siteCreatorSelection: { kind: "site_creator_keyword_heuristic", priority: 40 },
|
|
13784
|
+
selectionKeywordRules: [
|
|
13785
|
+
{ kind: "substring", value: "retreat" },
|
|
13786
|
+
{ kind: "phrase", value: "solo practitioner" },
|
|
13787
|
+
{ kind: "phrase", value: "personal brand" },
|
|
13788
|
+
{ kind: "substring", value: "teacher" },
|
|
13789
|
+
{ kind: "substring", value: "coach" },
|
|
13790
|
+
{ kind: "phrase", value: "retreat resources" },
|
|
13791
|
+
{ kind: "substring", value: "journal" }
|
|
13792
|
+
],
|
|
13793
|
+
tokenRecipes: {
|
|
13794
|
+
palette: "warm-neutral",
|
|
13795
|
+
contrast: "standard",
|
|
13796
|
+
radius: "soft",
|
|
13797
|
+
shadow: "subtle",
|
|
13798
|
+
typography: "serif-editorial",
|
|
13799
|
+
spacing: "airy",
|
|
13800
|
+
motion: "subtle"
|
|
13801
|
+
},
|
|
13802
|
+
compositionBudget: balancedBudget,
|
|
13803
|
+
recommendedHeaderLookIds: ["editorial-line", "centered-calm", "minimal-transparent"],
|
|
13804
|
+
buttonPersonalityChoices: [
|
|
13805
|
+
buttonChoice("editorial-link"),
|
|
13806
|
+
buttonChoice("soft-pill"),
|
|
13807
|
+
buttonChoice("brushed-wash")
|
|
13808
|
+
],
|
|
13809
|
+
paletteVariantChoices: [
|
|
13810
|
+
paletteChoice("warm-neutral-forest"),
|
|
13811
|
+
paletteChoice("warm-neutral-clay"),
|
|
13812
|
+
paletteChoice("soft-natural-stone")
|
|
13813
|
+
]
|
|
13814
|
+
}),
|
|
13815
|
+
defineCuratedSiteStyle({
|
|
13816
|
+
id: "site-style:tactile-workshop",
|
|
13817
|
+
name: "Tactile Workshop",
|
|
13818
|
+
description: "Bright, hands-on, and image-led for maker studios, workshops, and creative classes.",
|
|
13819
|
+
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.",
|
|
13820
|
+
siteCreatorSelection: { kind: "site_creator_keyword_heuristic", priority: 50 },
|
|
13821
|
+
selectionKeywordRules: [
|
|
13822
|
+
{ kind: "substring", value: "ceramic" },
|
|
13823
|
+
{ kind: "word", value: "pottery" },
|
|
13824
|
+
{ kind: "phrase", value: "maker studio" },
|
|
13825
|
+
{ kind: "phrase", value: "craft class" },
|
|
13826
|
+
{ kind: "phrase", value: "craft workshop" },
|
|
13827
|
+
{ kind: "word", value: "clay" },
|
|
13828
|
+
{ kind: "word", value: "kiln" }
|
|
13829
|
+
],
|
|
13830
|
+
tokenRecipes: {
|
|
13831
|
+
palette: "brand-led",
|
|
13832
|
+
contrast: "standard",
|
|
13833
|
+
radius: "soft",
|
|
13834
|
+
shadow: "subtle",
|
|
13835
|
+
typography: "friendly-sans",
|
|
13836
|
+
spacing: "regular",
|
|
13837
|
+
motion: "subtle"
|
|
13838
|
+
},
|
|
13839
|
+
compositionBudget: balancedBudget,
|
|
13840
|
+
recommendedHeaderLookIds: ["brand-solid", "practical-utility", "clean-base"],
|
|
13841
|
+
recommendedFooterLookIds: ["site-footer-brand-two-band", "footer-muted-grounding"],
|
|
13842
|
+
buttonPersonalityChoices: [
|
|
13843
|
+
buttonChoice("pebble"),
|
|
13844
|
+
buttonChoice("confident-chip"),
|
|
13845
|
+
buttonChoice("ink-stamp"),
|
|
13846
|
+
buttonChoice("editorial-link")
|
|
13847
|
+
],
|
|
13848
|
+
paletteVariantChoices: [
|
|
13849
|
+
paletteChoice("brand-led-warm"),
|
|
13850
|
+
paletteChoice("brand-led-cool"),
|
|
13851
|
+
paletteChoice("soft-natural-watercolor"),
|
|
13852
|
+
paletteChoice("warm-neutral-clay")
|
|
13853
|
+
]
|
|
13854
|
+
}),
|
|
13607
13855
|
defineCuratedSiteStyle({
|
|
13608
13856
|
id: "site-style:bold-launch",
|
|
13609
13857
|
name: "Bold Launch",
|
|
13610
13858
|
description: "High-energy and punchy for launches, campaigns, and creative offers.",
|
|
13611
13859
|
generationBrief: "Use crisp positioning, bold hero structure, strong calls to action, and confident visual rhythm. Keep it precise, not shouty.",
|
|
13612
|
-
|
|
13613
|
-
|
|
13614
|
-
"
|
|
13615
|
-
"
|
|
13616
|
-
"
|
|
13617
|
-
"
|
|
13618
|
-
"
|
|
13860
|
+
siteCreatorSelection: { kind: "site_creator_keyword_heuristic", priority: 10 },
|
|
13861
|
+
selectionKeywordRules: [
|
|
13862
|
+
{ kind: "substring", value: "launch" },
|
|
13863
|
+
{ kind: "substring", value: "campaign" },
|
|
13864
|
+
{ kind: "word", value: "preorder" },
|
|
13865
|
+
{ kind: "phrase", value: "pre-order" },
|
|
13866
|
+
{ kind: "substring", value: "waitlist" },
|
|
13867
|
+
{ kind: "word", value: "drop" }
|
|
13619
13868
|
],
|
|
13620
13869
|
tokenRecipes: {
|
|
13621
13870
|
palette: "high-contrast",
|
|
@@ -13646,15 +13895,6 @@ var curatedSiteStyles = [
|
|
|
13646
13895
|
name: "South West Twerk School",
|
|
13647
13896
|
description: "Energetic, editorial, and high-contrast for a branded dance school presence.",
|
|
13648
13897
|
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.",
|
|
13649
|
-
selectionKeywords: [
|
|
13650
|
-
"dance",
|
|
13651
|
-
"classes",
|
|
13652
|
-
"workshop",
|
|
13653
|
-
"school",
|
|
13654
|
-
"movement",
|
|
13655
|
-
"performance",
|
|
13656
|
-
"community"
|
|
13657
|
-
],
|
|
13658
13898
|
tokenRecipes: {
|
|
13659
13899
|
palette: "brand-led",
|
|
13660
13900
|
contrast: "maximum",
|
|
@@ -13961,25 +14201,19 @@ var defaultDesignRuntimeRules = defineDesignRuntimeRules({
|
|
|
13961
14201
|
"muted-band": {
|
|
13962
14202
|
background: {
|
|
13963
14203
|
type: "color",
|
|
13964
|
-
color: "muted"
|
|
13965
|
-
textColor: "text",
|
|
13966
|
-
headingColor: "text"
|
|
14204
|
+
color: "muted"
|
|
13967
14205
|
}
|
|
13968
14206
|
},
|
|
13969
14207
|
"accent-band": {
|
|
13970
14208
|
background: {
|
|
13971
14209
|
type: "color",
|
|
13972
|
-
color: "primary"
|
|
13973
|
-
textColor: "primaryForeground",
|
|
13974
|
-
headingColor: "primaryForeground"
|
|
14210
|
+
color: "primary"
|
|
13975
14211
|
}
|
|
13976
14212
|
},
|
|
13977
14213
|
"brand-depth-band": {
|
|
13978
14214
|
background: {
|
|
13979
14215
|
type: "color",
|
|
13980
|
-
color: "primary-800"
|
|
13981
|
-
textColor: "primaryForeground",
|
|
13982
|
-
headingColor: "primaryForeground"
|
|
14216
|
+
color: "primary-800"
|
|
13983
14217
|
}
|
|
13984
14218
|
},
|
|
13985
14219
|
"hero-image": {
|
|
@@ -20087,6 +20321,16 @@ var jsonArrayTransform = {
|
|
|
20087
20321
|
return "";
|
|
20088
20322
|
}
|
|
20089
20323
|
};
|
|
20324
|
+
var csvTransform = {
|
|
20325
|
+
id: "value.csv",
|
|
20326
|
+
kind: "formatter",
|
|
20327
|
+
summary: "Normalize a string or array of strings into a comma-separated list",
|
|
20328
|
+
run: (value) => {
|
|
20329
|
+
const rawValues = Array.isArray(value) ? value : typeof value === "string" ? value.split(",") : [];
|
|
20330
|
+
const normalized = rawValues.filter((item) => typeof item === "string").map((item) => item.trim()).filter(Boolean);
|
|
20331
|
+
return normalized.length > 0 ? Array.from(new Set(normalized)).join(",") : "";
|
|
20332
|
+
}
|
|
20333
|
+
};
|
|
20090
20334
|
var marqueeLoopOptionsSchema = z36.object({
|
|
20091
20335
|
minItems: z36.number().int().min(1).default(10)
|
|
20092
20336
|
});
|
|
@@ -20112,6 +20356,7 @@ var formattingTransforms = [
|
|
|
20112
20356
|
dateFormatShort,
|
|
20113
20357
|
arrayLengthTransform,
|
|
20114
20358
|
jsonArrayTransform,
|
|
20359
|
+
csvTransform,
|
|
20115
20360
|
marqueeLoopTransform
|
|
20116
20361
|
];
|
|
20117
20362
|
|
|
@@ -20595,73 +20840,6 @@ var uiTransforms = [
|
|
|
20595
20840
|
|
|
20596
20841
|
// ../blocks/src/system/transforms/registry/layout.ts
|
|
20597
20842
|
import { z as z38 } from "zod";
|
|
20598
|
-
|
|
20599
|
-
// ../theme-core/src/palette/utils/colorConversion.ts
|
|
20600
|
-
var mod = (a, n) => (a % n + n) % n;
|
|
20601
|
-
var deg = (x) => mod(x, 360);
|
|
20602
|
-
function hexToRgb(hex) {
|
|
20603
|
-
const h = hex.replace(/^#/, "");
|
|
20604
|
-
const m = h.length === 3 ? h.split("").map((c) => c + c).join("") : h;
|
|
20605
|
-
if (m.length !== 6) throw new Error("Bad hex");
|
|
20606
|
-
const int = parseInt(m, 16);
|
|
20607
|
-
return { r: int >> 16 & 255, g: int >> 8 & 255, b: int & 255 };
|
|
20608
|
-
}
|
|
20609
|
-
function srgbToLinear(u) {
|
|
20610
|
-
const x = u / 255;
|
|
20611
|
-
return x <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4);
|
|
20612
|
-
}
|
|
20613
|
-
function rgbToHsl(r, g, b) {
|
|
20614
|
-
const R = r / 255, G = g / 255, B = b / 255;
|
|
20615
|
-
const max = Math.max(R, G, B), min = Math.min(R, G, B);
|
|
20616
|
-
const d = max - min;
|
|
20617
|
-
let h = 0;
|
|
20618
|
-
if (d !== 0) {
|
|
20619
|
-
switch (max) {
|
|
20620
|
-
case R:
|
|
20621
|
-
h = (G - B) / d + (G < B ? 6 : 0);
|
|
20622
|
-
break;
|
|
20623
|
-
case G:
|
|
20624
|
-
h = (B - R) / d + 2;
|
|
20625
|
-
break;
|
|
20626
|
-
case B:
|
|
20627
|
-
h = (R - G) / d + 4;
|
|
20628
|
-
break;
|
|
20629
|
-
}
|
|
20630
|
-
h *= 60;
|
|
20631
|
-
}
|
|
20632
|
-
const l = (max + min) / 2;
|
|
20633
|
-
const s = d === 0 ? 0 : d / (1 - Math.abs(2 * l - 1));
|
|
20634
|
-
return { h, s, l };
|
|
20635
|
-
}
|
|
20636
|
-
function srgbToOklab(r, g, b) {
|
|
20637
|
-
const R = srgbToLinear(r), G = srgbToLinear(g), B = srgbToLinear(b);
|
|
20638
|
-
const l = 0.4122214708 * R + 0.5363325363 * G + 0.0514459929 * B;
|
|
20639
|
-
const m = 0.2119034982 * R + 0.6806995451 * G + 0.1073969566 * B;
|
|
20640
|
-
const s = 0.0883024619 * R + 0.2817188376 * G + 0.6299787005 * B;
|
|
20641
|
-
const l_ = Math.cbrt(l), m_ = Math.cbrt(m), s_ = Math.cbrt(s);
|
|
20642
|
-
const L = 0.2104542553 * l_ + 0.793617785 * m_ - 0.0040720468 * s_;
|
|
20643
|
-
const a = 1.9779984951 * l_ - 2.428592205 * m_ + 0.4505937099 * s_;
|
|
20644
|
-
const b2 = 0.0259040371 * l_ + 0.7827717662 * m_ - 0.808675766 * s_;
|
|
20645
|
-
return { L, a, b: b2 };
|
|
20646
|
-
}
|
|
20647
|
-
function oklabToOklch(L, a, b) {
|
|
20648
|
-
const C = Math.sqrt(a * a + b * b);
|
|
20649
|
-
const h = C < 1e-7 ? 0 : deg(Math.atan2(b, a) * 180 / Math.PI);
|
|
20650
|
-
return { L, C, h };
|
|
20651
|
-
}
|
|
20652
|
-
function featuresFromHex(hex) {
|
|
20653
|
-
const { r, g, b } = hexToRgb(hex);
|
|
20654
|
-
const { h, s, l } = rgbToHsl(r, g, b);
|
|
20655
|
-
const { L, a, b: b2 } = srgbToOklab(r, g, b);
|
|
20656
|
-
const { L: okL, C: okC, h: okH } = oklabToOklch(L, a, b2);
|
|
20657
|
-
const max = Math.max(r, g, b);
|
|
20658
|
-
const v = max / 255;
|
|
20659
|
-
const Y = 0.2126 * srgbToLinear(r) + 0.7152 * srgbToLinear(g) + 0.0722 * srgbToLinear(b);
|
|
20660
|
-
const chroma = s;
|
|
20661
|
-
return { r, g, b, h, s, l, v, Y, chroma, okL, okC, okH, hex };
|
|
20662
|
-
}
|
|
20663
|
-
|
|
20664
|
-
// ../blocks/src/system/transforms/registry/layout.ts
|
|
20665
20843
|
var joinClasses4 = (parts) => parts.filter(
|
|
20666
20844
|
(part) => typeof part === "string" && part.trim().length > 0
|
|
20667
20845
|
).join(" ").replace(/\s+/g, " ").trim();
|
|
@@ -25345,7 +25523,12 @@ var eventListingBlockDefinition = {
|
|
|
25345
25523
|
detailLevel: "listing",
|
|
25346
25524
|
kind: { $bind: { from: "content.kind" } },
|
|
25347
25525
|
eventSurface: { $bind: { from: "content.eventSurface" } },
|
|
25348
|
-
eventPresets: {
|
|
25526
|
+
eventPresets: {
|
|
25527
|
+
$bind: {
|
|
25528
|
+
from: "content.filterEventPresets",
|
|
25529
|
+
transforms: [{ id: "value.csv" }]
|
|
25530
|
+
}
|
|
25531
|
+
},
|
|
25349
25532
|
scheduleScope: { $bind: { from: "content.scheduleScope" } }
|
|
25350
25533
|
},
|
|
25351
25534
|
mode: "server"
|
|
@@ -26097,7 +26280,12 @@ var eventCalendarBlockDefinition = {
|
|
|
26097
26280
|
// Pass filter params if configured
|
|
26098
26281
|
kind: { $bind: { from: "content.kind" } },
|
|
26099
26282
|
eventSurface: { $bind: { from: "content.eventSurface" } },
|
|
26100
|
-
eventPresets: {
|
|
26283
|
+
eventPresets: {
|
|
26284
|
+
$bind: {
|
|
26285
|
+
from: "content.filterEventPresets",
|
|
26286
|
+
transforms: [{ id: "value.csv" }]
|
|
26287
|
+
}
|
|
26288
|
+
},
|
|
26101
26289
|
scheduleScope: { $bind: { from: "content.scheduleScope" } },
|
|
26102
26290
|
categoryIds: { $bind: { from: "content.filterCategoryIds" } },
|
|
26103
26291
|
staffMemberId: { $bind: { from: "content.filterStaffMemberId" } },
|