@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.
- package/README.md +3 -1
- package/dist/{PreviewEditorSidebar-BezDOtQ7.mjs → PreviewEditorSidebar-DcYJxTgc.mjs} +67 -266
- package/dist/{PreviewEditorUI-CgSqmfo2.mjs → PreviewEditorUI-Ctt1yTJr.mjs} +3 -3
- package/dist/{PreviewQueryProvider-BH-3-jSj.mjs → PreviewQueryProvider-DgFDIwvK.mjs} +1 -1
- package/dist/{SdkPreviewModeRuntime-Co3AHfj0.mjs → SdkPreviewModeRuntime-CvW1vdQ4.mjs} +27 -27
- package/dist/{SiteChromeCustomizeContext-BHF-KANn.mjs → SiteChromeCustomizeContext-C87qlKWw.mjs} +412 -1301
- package/dist/_dts/ai/src/contracts/proposals.d.ts +1354 -202
- package/dist/_dts/api/src/common/envelope.d.ts +1 -1
- package/dist/_dts/api/src/contentRuntime.d.ts +0 -2
- package/dist/_dts/api/src/endpoints.d.ts +0 -7
- package/dist/_dts/api/src/sdk-event-upsert.d.ts +42 -0
- package/dist/_dts/api/src/sdkContracts.d.ts +11 -9
- package/dist/_dts/api/src/siteOperations.d.ts +18 -1
- package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +1 -14
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationStripeReturn.d.ts +15 -2
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +182 -19
- package/dist/_dts/preview-next/src/client/preview/PreviewEditorSidebar.d.ts +1 -2
- package/dist/_dts/preview-next/src/client/preview/PreviewShell.d.ts +2 -3
- package/dist/_dts/preview-next/src/client/preview/PreviewShellLayout.d.ts +1 -2
- package/dist/_dts/preview-next/src/client/preview/SiteChromeCustomizeContext.d.ts +3 -12
- package/dist/_dts/preview-next/src/client/preview/StyleConfigurator.d.ts +3 -13
- package/dist/_dts/preview-next/src/client/preview/StyleConfigurator.state.d.ts +8 -100
- package/dist/_dts/preview-next/src/client/preview/siteStylePreviewPlanner.d.ts +1 -4
- package/dist/_dts/preview-next/src/client/preview/styleConfiguratorApplyPayload.d.ts +1 -15
- package/dist/_dts/preview-next/src/client/preview/styleConfiguratorSnapshot.d.ts +11 -21
- package/dist/_dts/sdk/src/cli/commands/event.d.ts +2 -2
- package/dist/_dts/sdk/src/cli/commands/eventOccurrenceSchedule.d.ts +12 -0
- package/dist/_dts/sdk/src/cli/commands/push/pushAllExtras.d.ts +6 -0
- package/dist/_dts/sdk/src/cli/commands/style.d.ts +1 -1
- package/dist/_dts/sdk/src/cli/content/legacyEventScheduleShapeError.d.ts +5 -0
- package/dist/_dts/sdk/src/cli/content/localEventSchedule.d.ts +17 -0
- package/dist/_dts/sdk/src/cli/content/reader.d.ts +5 -10
- package/dist/_dts/sdk/src/cli/migrations/events.d.ts +1 -1
- package/dist/_dts/sdk/src/cli/site-commands/eventScheduleCompiler.d.ts +24 -0
- package/dist/_dts/sdk/src/client/management/http.d.ts +1 -1
- package/dist/_dts/sdk/src/client/management/types.d.ts +3 -28
- package/dist/_dts/sdk/src/config/index.d.ts +1 -1
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +5 -20
- package/dist/_dts/sdk/src/rendering/index.d.ts +1 -1
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/site-commands/src/commandContract.d.ts +33 -5
- package/dist/_dts/site-commands/src/commandDomain.d.ts +2 -2
- package/dist/_dts/site-commands/src/commands.d.ts +38 -9
- package/dist/_dts/site-commands/src/siteStyleCommandSchema.d.ts +28 -1
- package/dist/_dts/site-commands/src/siteStyleSelectionSchemaBuilder.d.ts +4 -4
- package/dist/_dts/theme-core/src/palette/concretePalette.d.ts +20 -0
- package/dist/_dts/theme-core/src/palette/curated/index.d.ts +2 -17
- package/dist/_dts/theme-core/src/palette/index.d.ts +1 -6
- package/dist/_dts/theme-core/src/palette/schema.d.ts +39 -0
- package/dist/_dts/theme-core/src/schema.d.ts +38 -26
- package/dist/_dts/theme-core/src/site-styles/previewCompiler.d.ts +4 -6
- package/dist/_dts/theme-core/src/site-styles/runtimeCompiler.d.ts +5 -6
- package/dist/cli/index.mjs +612 -522
- package/dist/cli/init-docs/content/cli-reference.md +6 -3
- package/dist/cli/init-docs/content/content-management.md +24 -13
- package/dist/client/{DiscountCodeDisclosure-CyPpekBp.mjs → DiscountCodeDisclosure-DS0AuFWW.mjs} +1 -1
- package/dist/client/{EventCombined.client-zywit-60.mjs → EventCombined.client-DtMxLr7q.mjs} +2 -2
- package/dist/client/{EventListing.client-J2nLhkKT.mjs → EventListing.client-BdLSRNg1.mjs} +2 -2
- package/dist/client/{LeafletStaticMap-CSubXWt6.mjs → LeafletStaticMap-BrpC6vsT.mjs} +1 -1
- package/dist/client/{MagicLinkForm-DDLIfiq9.mjs → MagicLinkForm-Bt3IuLMy.mjs} +1 -1
- package/dist/client/{StepIndicator-DE8EvHIp.mjs → StepIndicator-CBYPFVoy.mjs} +2 -2
- package/dist/client/{accordion-Ct5T5NiA.mjs → accordion-BqqwPJWM.mjs} +1 -1
- package/dist/client/{bookingForm-DMxtLPxw.mjs → bookingForm-SneP3yxC.mjs} +5 -6
- package/dist/client/bookings.mjs +190 -24
- package/dist/client/{carousel--FMqgvob.mjs → carousel-BTIR9L3I.mjs} +1 -1
- package/dist/client/{cart-BKX1bWiU.mjs → cart-bqiqd8SX.mjs} +3 -3
- package/dist/client/{checkout-B_jxi4WW.mjs → checkout-WbTFV5v4.mjs} +3 -3
- package/dist/client/client.mjs +156 -220
- package/dist/client/{courseRegistration-DH4MlkRD.mjs → courseRegistration-BcemLAdN.mjs} +6 -7
- package/dist/client/{eventCalendar-BQILwAcL.mjs → eventCalendar-CsxIw0V_.mjs} +4 -4
- package/dist/client/{eventCombined-DFFW_Vmo.mjs → eventCombined-B6XMoHfa.mjs} +2 -2
- package/dist/client/{eventDetails-B045CTSJ.mjs → eventDetails-BJaoPPfo.mjs} +3 -3
- package/dist/client/{eventListing-BDMYNVzS.mjs → eventListing-DgwdYHRT.mjs} +2 -2
- package/dist/client/{eventRegistration-CQ2-BSnB.mjs → eventRegistration-C0O3folu.mjs} +30 -22
- package/dist/client/{form-DJKuyZgN.mjs → form-Bk9txGFt.mjs} +1 -1
- package/dist/client/{headerSection-DeTjfiDo.mjs → headerSection-yIBt0yTv.mjs} +2 -2
- package/dist/client/hooks.mjs +50 -102
- package/dist/client/{locationMap-i2wDA8gB.mjs → locationMap-C-3KIpv-.mjs} +2 -2
- package/dist/client/{newsletterForm-DKiueauk.mjs → newsletterForm-CzB8g8h2.mjs} +1 -1
- package/dist/client/{pricing-C01J3Epx.mjs → pricing-C1QeDes_.mjs} +1 -1
- package/dist/client/{productDetail-Dfc1sZaX.mjs → productDetail-w7SBp5uc.mjs} +3 -3
- package/dist/client/{productList-BXbvXWTF.mjs → productList-D0tGKHGf.mjs} +3 -3
- package/dist/client/{propsDecoder-CIR5DQ1l.mjs → propsDecoder-Bcin2DB3.mjs} +167 -11
- package/dist/client/rendering/client.mjs +219 -276
- package/dist/client/rendering/islands.mjs +18 -18
- package/dist/client/rendering.mjs +128 -185
- package/dist/client/{useDiscountCodeUi-Bcyh4508.mjs → scrollToBlock-h-o_STf_.mjs} +18 -2
- package/dist/client/{shop-BbNwPKM-.mjs → shop-BGzmL8O_.mjs} +5 -6
- package/dist/client/{shop-commerce-XO-XMFEt.mjs → shop-commerce-lX8QxjX-.mjs} +4 -4
- package/dist/client/{shop-commerce-store-Byh6OUGK.mjs → shop-commerce-store-CEurARtu.mjs} +1 -1
- package/dist/client/{shopShared-Bbq39mwr.mjs → shopShared-DXxH8xxw.mjs} +2 -2
- package/dist/client/{useEventFilters-C8OOJ3el.mjs → useEventFilters-B591g9vd.mjs} +2 -2
- package/dist/client/{usePolling-CyJVo9kF.mjs → usePolling-BvnChV4m.mjs} +2 -2
- package/dist/preview-next/before-render.mjs +0 -7
- package/dist/preview-next/client/runtime.mjs +4 -4
- package/dist/preview-next/middleware.mjs +0 -7
- package/dist/{previewAuthStore-CJX21dGi.mjs → previewAuthStore-Dev9CdG9.mjs} +0 -7
- package/dist/{sdk-runtime-BGhyuE-E.mjs → sdk-runtime-M__i3Jce.mjs} +2 -2
- package/dist/{separator-BFs-Kmv5.mjs → separator-VSlnI9bc.mjs} +1 -1
- package/dist/server/components.mjs +87 -139
- package/dist/server/config-validation.mjs +50 -102
- package/dist/server/config.mjs +50 -102
- package/dist/server/data.mjs +50 -102
- package/dist/server/index.mjs +1 -8
- package/dist/server/next.mjs +91 -150
- package/dist/server/page-converter.mjs +50 -102
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +50 -102
- package/dist/server/rendering.mjs +88 -140
- package/dist/server/routing.mjs +71 -147
- package/dist/server/server.mjs +51 -110
- package/dist/server/theme-bridge.mjs +172 -162
- package/dist/server/theme.mjs +167 -11
- package/package.json +1 -1
- package/dist/_dts/theme-core/src/palette/editorState.d.ts +0 -75
- package/dist/_dts/theme-core/src/palette/libraryModel.d.ts +0 -64
- package/dist/_dts/theme-core/src/palette/persistenceReadSource.d.ts +0 -81
- package/dist/_dts/theme-core/src/palette/resolveSelection.d.ts +0 -75
- package/dist/_dts/theme-core/src/palette/selection.d.ts +0 -74
- package/dist/_dts/theme-core/src/palette/sitePalettePersistence.d.ts +0 -34
- package/dist/client/scrollToBlock-C86BYkyV.mjs +0 -17
|
@@ -99,7 +99,7 @@ const parseEventOfferingId = (value) => parseUuidBrand$1(value, unsafeAsEventOff
|
|
|
99
99
|
const parseEventSeriesId = (value) => parseUuidBrand$1(value, unsafeAsEventSeriesId);
|
|
100
100
|
//#endregion
|
|
101
101
|
//#region ../core/src/assert-never.ts
|
|
102
|
-
function assertNever$
|
|
102
|
+
function assertNever$24(value, message = "Unexpected variant") {
|
|
103
103
|
throw new Error(`${message}: ${String(value)}`);
|
|
104
104
|
}
|
|
105
105
|
const CURRENCY_LOCALE_BY_CODE = {
|
|
@@ -190,7 +190,7 @@ function formatCoursePriceDisplayLabel(display, options) {
|
|
|
190
190
|
case "exact": return `Course (${formatCurrencyAmount(display.amount, display.currency, options)})`;
|
|
191
191
|
case "from": return `Course (From ${formatCurrencyAmount(display.amount, display.currency, options)})`;
|
|
192
192
|
case "range": return `Course (${formatCurrencyAmount(display.minAmount, display.currency, options)} - ${formatCurrencyAmount(display.maxAmount, display.currency, options)})`;
|
|
193
|
-
default: return assertNever$
|
|
193
|
+
default: return assertNever$24(display);
|
|
194
194
|
}
|
|
195
195
|
}
|
|
196
196
|
/**
|
|
@@ -210,7 +210,7 @@ function formatBookingPriceDisplay(display, options = {}) {
|
|
|
210
210
|
case "unavailable": return "Pricing unavailable";
|
|
211
211
|
case "external": return display.label;
|
|
212
212
|
case "course": return formatCoursePriceDisplayLabel(display.display, options);
|
|
213
|
-
default: return assertNever$
|
|
213
|
+
default: return assertNever$24(display);
|
|
214
214
|
}
|
|
215
215
|
}
|
|
216
216
|
/** Render an event's price directly from its pricing value. */
|
|
@@ -3602,7 +3602,7 @@ const ALLOWED_URL_PROTOCOLS = ["http:", "https:"];
|
|
|
3602
3602
|
const DATE_PATTERN = /^(?<year>[1-9]\d{3})-(?<month>\d{2})-(?<day>\d{2})$/;
|
|
3603
3603
|
const TIME_PATTERN = /^(?<hours>[01]\d|2[0-3]):(?<minutes>[0-5]\d)$/;
|
|
3604
3604
|
const DATETIME_PATTERN = /^(?<date>[1-9]\d{3}-\d{2}-\d{2})T(?<time>(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d)(?:\.\d+)?(?<offset>Z|[+-](?:[01]\d|2[0-3]):[0-5]\d)$/;
|
|
3605
|
-
function assertNever$
|
|
3605
|
+
function assertNever$16(value) {
|
|
3606
3606
|
throw new Error(`Unhandled field validation variant: ${JSON.stringify(value)}`);
|
|
3607
3607
|
}
|
|
3608
3608
|
function validationContext(options = {}) {
|
|
@@ -3655,7 +3655,7 @@ function fieldIssueToMessage(issue) {
|
|
|
3655
3655
|
case "invalidMedia": return `${issue.label} must be a media object with an identifier`;
|
|
3656
3656
|
case "invalidLink": return `${issue.label} must be a valid link`;
|
|
3657
3657
|
case "invalidReference": return `${issue.label} must reference a valid item`;
|
|
3658
|
-
default: return assertNever$
|
|
3658
|
+
default: return assertNever$16(issue);
|
|
3659
3659
|
}
|
|
3660
3660
|
}
|
|
3661
3661
|
function pluralize(label, count) {
|
|
@@ -3775,7 +3775,7 @@ function deriveFieldValidationPlan(field, path = [field.id]) {
|
|
|
3775
3775
|
case "presetOrCustom":
|
|
3776
3776
|
case "contentTypeSelect":
|
|
3777
3777
|
case "entryPicker": return makePlan("passthrough", "unknown", field, path, false, []);
|
|
3778
|
-
default: return assertNever$
|
|
3778
|
+
default: return assertNever$16(field);
|
|
3779
3779
|
}
|
|
3780
3780
|
}
|
|
3781
3781
|
function deriveFieldValidationPlans(fields, parentPath = []) {
|
|
@@ -3850,7 +3850,7 @@ function resolveSelectConstraintSource(field) {
|
|
|
3850
3850
|
kind: "runtime",
|
|
3851
3851
|
source: source.kind
|
|
3852
3852
|
};
|
|
3853
|
-
default: return assertNever$
|
|
3853
|
+
default: return assertNever$16(source);
|
|
3854
3854
|
}
|
|
3855
3855
|
}
|
|
3856
3856
|
function normalizeStoredContentValues(plans, content, options = {}) {
|
|
@@ -3869,7 +3869,7 @@ function allGroupChildPlans(plan) {
|
|
|
3869
3869
|
switch (plan.childSelection.kind) {
|
|
3870
3870
|
case "all": return plan.childSelection.fields;
|
|
3871
3871
|
case "discriminatedTabs": return plan.childSelection.tabs.flatMap((tab) => tab.fields);
|
|
3872
|
-
default: return assertNever$
|
|
3872
|
+
default: return assertNever$16(plan.childSelection);
|
|
3873
3873
|
}
|
|
3874
3874
|
}
|
|
3875
3875
|
function selectedGroupChildPlans(plan, value) {
|
|
@@ -3902,7 +3902,7 @@ function canonicalizeFieldValueForWrite(plan, value) {
|
|
|
3902
3902
|
case "link":
|
|
3903
3903
|
case "select":
|
|
3904
3904
|
case "passthrough": return value;
|
|
3905
|
-
default: return assertNever$
|
|
3905
|
+
default: return assertNever$16(plan);
|
|
3906
3906
|
}
|
|
3907
3907
|
}
|
|
3908
3908
|
function canonicalizeObjectForWrite(plans, value) {
|
|
@@ -3928,7 +3928,7 @@ function normalizeStoredFieldValueWithContext(plan, value, ctx) {
|
|
|
3928
3928
|
case "link":
|
|
3929
3929
|
case "select":
|
|
3930
3930
|
case "passthrough": return normalizeFieldValue(plan, value, ctx);
|
|
3931
|
-
default: return assertNever$
|
|
3931
|
+
default: return assertNever$16(plan);
|
|
3932
3932
|
}
|
|
3933
3933
|
}
|
|
3934
3934
|
function normalizeStoredObjectChildren(children, value, ctx) {
|
|
@@ -3965,7 +3965,7 @@ function normalizeFieldValue(plan, value, ctx) {
|
|
|
3965
3965
|
case "select":
|
|
3966
3966
|
case "passthrough": return value;
|
|
3967
3967
|
case "media": return value;
|
|
3968
|
-
default: return assertNever$
|
|
3968
|
+
default: return assertNever$16(plan);
|
|
3969
3969
|
}
|
|
3970
3970
|
}
|
|
3971
3971
|
function normalizeObjectChildren(children, value, ctx) {
|
|
@@ -4024,7 +4024,7 @@ function validateNormalizedFieldValue(plan, value, ctx) {
|
|
|
4024
4024
|
case "repeater": return validateRepeaterPlan(plan, value, ctx);
|
|
4025
4025
|
case "group": return validateGroupPlan(plan, value, ctx);
|
|
4026
4026
|
case "passthrough": return [];
|
|
4027
|
-
default: return assertNever$
|
|
4027
|
+
default: return assertNever$16(plan);
|
|
4028
4028
|
}
|
|
4029
4029
|
}
|
|
4030
4030
|
function shouldRequireValue(plan, value, ctx) {
|
|
@@ -4066,7 +4066,7 @@ function validateStringConstraint(plan, constraint, value) {
|
|
|
4066
4066
|
case "timeFormat": return typeof value === "string" && isValidTimeString(value) ? [] : [issue(plan, "invalidTime")];
|
|
4067
4067
|
case "datetimeFormat": return typeof value === "string" && isValidDateTimeInstantString(value) ? [] : [issue(plan, "invalidDateTime")];
|
|
4068
4068
|
case "slugFormat": return typeof value === "string" && SLUG_PATTERN.test(value) ? [] : [issue(plan, "invalidSlug")];
|
|
4069
|
-
default: return assertNever$
|
|
4069
|
+
default: return assertNever$16(constraint);
|
|
4070
4070
|
}
|
|
4071
4071
|
}
|
|
4072
4072
|
function isValidIconPickerValue(value) {
|
|
@@ -4085,7 +4085,7 @@ function validateNumberConstraint(plan, constraint, value) {
|
|
|
4085
4085
|
case "numberType": return [];
|
|
4086
4086
|
case "numberMin": return value < constraint.minimum ? [issue(plan, "tooSmall", { minimum: constraint.minimum })] : [];
|
|
4087
4087
|
case "numberMax": return value > constraint.maximum ? [issue(plan, "tooLarge", { maximum: constraint.maximum })] : [];
|
|
4088
|
-
default: return assertNever$
|
|
4088
|
+
default: return assertNever$16(constraint);
|
|
4089
4089
|
}
|
|
4090
4090
|
}
|
|
4091
4091
|
function validateSelectPlan(plan, value) {
|
|
@@ -4107,7 +4107,7 @@ function validateRepeaterPlan(plan, value, ctx) {
|
|
|
4107
4107
|
maximum: constraint.maximum,
|
|
4108
4108
|
itemLabel: "item"
|
|
4109
4109
|
})] : [];
|
|
4110
|
-
default: return assertNever$
|
|
4110
|
+
default: return assertNever$16(constraint);
|
|
4111
4111
|
}
|
|
4112
4112
|
}), ...value.flatMap((item, index) => validateRepeaterItem(plan, item, index, ctx))];
|
|
4113
4113
|
}
|
|
@@ -4198,7 +4198,7 @@ function rebaseFieldPlanPath(plan, fromPrefix, toPrefix) {
|
|
|
4198
4198
|
...plan,
|
|
4199
4199
|
path
|
|
4200
4200
|
};
|
|
4201
|
-
default: return assertNever$
|
|
4201
|
+
default: return assertNever$16(plan);
|
|
4202
4202
|
}
|
|
4203
4203
|
}
|
|
4204
4204
|
function validateInlineTextPlan(plan, value) {
|
|
@@ -4245,7 +4245,7 @@ function fieldPlanToObjectPropertyZod(plan, options = {}) {
|
|
|
4245
4245
|
switch (presence.kind) {
|
|
4246
4246
|
case "required": return schema;
|
|
4247
4247
|
case "optional": return schema.optional();
|
|
4248
|
-
default: return assertNever$
|
|
4248
|
+
default: return assertNever$16(presence);
|
|
4249
4249
|
}
|
|
4250
4250
|
}
|
|
4251
4251
|
function addFieldIssueToZodContext(zodCtx, validationIssue, rootPath) {
|
|
@@ -4315,7 +4315,7 @@ function addFieldIssueToZodContext(zodCtx, validationIssue, rootPath) {
|
|
|
4315
4315
|
message
|
|
4316
4316
|
});
|
|
4317
4317
|
return;
|
|
4318
|
-
default: assertNever$
|
|
4318
|
+
default: assertNever$16(validationIssue);
|
|
4319
4319
|
}
|
|
4320
4320
|
}
|
|
4321
4321
|
function relativeZodIssuePath(path, rootPath) {
|
|
@@ -4346,7 +4346,7 @@ function findNestedFieldValidationPlan(plan, path) {
|
|
|
4346
4346
|
case "link":
|
|
4347
4347
|
case "select":
|
|
4348
4348
|
case "passthrough": return null;
|
|
4349
|
-
default: return assertNever$
|
|
4349
|
+
default: return assertNever$16(plan);
|
|
4350
4350
|
}
|
|
4351
4351
|
}
|
|
4352
4352
|
function sameFieldPath(left, right) {
|
|
@@ -4370,7 +4370,7 @@ function validateExplicitNullForPushPlan(plan, value, ctx) {
|
|
|
4370
4370
|
case "link":
|
|
4371
4371
|
case "select":
|
|
4372
4372
|
case "passthrough": return [];
|
|
4373
|
-
default: return assertNever$
|
|
4373
|
+
default: return assertNever$16(plan);
|
|
4374
4374
|
}
|
|
4375
4375
|
}
|
|
4376
4376
|
function validateExplicitNullsForPushRepeater(plan, value, ctx) {
|
|
@@ -4790,7 +4790,7 @@ function asDesignSystemTemplateId(value) {
|
|
|
4790
4790
|
function makeBoundaryId(previousBlockId, nextBlockId) {
|
|
4791
4791
|
return asDesignBoundaryId(`boundary:${encodeURIComponent(previousBlockId)}:${encodeURIComponent(nextBlockId)}`);
|
|
4792
4792
|
}
|
|
4793
|
-
function assertNever$
|
|
4793
|
+
function assertNever$15(value, message = "Unhandled Theme V2 variant") {
|
|
4794
4794
|
throw new Error(`${message}: ${String(value)}`);
|
|
4795
4795
|
}
|
|
4796
4796
|
function brandNonEmptyString(value, label) {
|
|
@@ -7052,6 +7052,21 @@ const themeColorTokenSchema = z$1.string().min(1).refine((value) => Boolean(isTh
|
|
|
7052
7052
|
//#region ../theme-core/src/palette/colors.ts
|
|
7053
7053
|
const HEX_COLOR_REGEX = /^#[0-9a-f]{6}$/;
|
|
7054
7054
|
const NORMALIZABLE_HEX_REGEX = /^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i;
|
|
7055
|
+
const THEME_PALETTE_COLOR_ORDER = [
|
|
7056
|
+
"primary",
|
|
7057
|
+
"secondary",
|
|
7058
|
+
"accent",
|
|
7059
|
+
"success",
|
|
7060
|
+
"warning",
|
|
7061
|
+
"destructive",
|
|
7062
|
+
"background",
|
|
7063
|
+
"surface",
|
|
7064
|
+
"surfaceAlt",
|
|
7065
|
+
"muted",
|
|
7066
|
+
"text",
|
|
7067
|
+
"primaryForeground",
|
|
7068
|
+
"border"
|
|
7069
|
+
];
|
|
7055
7070
|
const hexColorSchema = z$1.string().regex(HEX_COLOR_REGEX, "Hex must be #RRGGBB (lowercase)").transform((value) => value);
|
|
7056
7071
|
const paletteModeSchema = z$1.enum(["light", "dark"]);
|
|
7057
7072
|
const PALETTE_VALUE_KEY_PREFIX = "palette-value:v1|";
|
|
@@ -7129,6 +7144,12 @@ function requirePaletteColorsFromEntries(entries) {
|
|
|
7129
7144
|
if (result.ok) return result.colors;
|
|
7130
7145
|
throw new Error(`Invalid complete palette: ${result.error.kind}`);
|
|
7131
7146
|
}
|
|
7147
|
+
function paletteColorEntries(colors) {
|
|
7148
|
+
return THEME_PALETTE_COLOR_ORDER.map((name) => ({
|
|
7149
|
+
name,
|
|
7150
|
+
hex: colors[name]
|
|
7151
|
+
}));
|
|
7152
|
+
}
|
|
7132
7153
|
function paletteColorFingerprint(colors) {
|
|
7133
7154
|
return PALETTE_TOKEN_NAMES.map((name) => `${name}:${colors[name]}`).join("|");
|
|
7134
7155
|
}
|
|
@@ -8462,13 +8483,6 @@ const warmDarkKirtanGold = defineCuratedPalette({
|
|
|
8462
8483
|
});
|
|
8463
8484
|
//#endregion
|
|
8464
8485
|
//#region ../theme-core/src/palette/curated/index.ts
|
|
8465
|
-
/**
|
|
8466
|
-
* Curated palette library.
|
|
8467
|
-
*
|
|
8468
|
-
* Authoring keys are readable source aliases. Value keys are derived from the
|
|
8469
|
-
* complete mode and semantic colours and are the only curated identity used at
|
|
8470
|
-
* persistence and runtime boundaries.
|
|
8471
|
-
*/
|
|
8472
8486
|
function admitCuratedPaletteDefinition(definition) {
|
|
8473
8487
|
return {
|
|
8474
8488
|
...definition,
|
|
@@ -8495,11 +8509,8 @@ const curatedPalettes = [
|
|
|
8495
8509
|
admitCuratedPaletteDefinition(warmDarkEmber),
|
|
8496
8510
|
admitCuratedPaletteDefinition(warmDarkKirtanGold)
|
|
8497
8511
|
];
|
|
8498
|
-
|
|
8512
|
+
new Map(curatedPalettes.map((palette) => [palette.valueKey, palette]));
|
|
8499
8513
|
const curatedPalettesByAuthoringKey = new Map(curatedPalettes.map((palette) => [palette.authoringKey, palette]));
|
|
8500
|
-
function findCuratedPalette(valueKey) {
|
|
8501
|
-
return curatedPalettesByValueKey.get(valueKey);
|
|
8502
|
-
}
|
|
8503
8514
|
function findCuratedPaletteByAuthoringKey(authoringKey) {
|
|
8504
8515
|
return curatedPalettesByAuthoringKey.get(authoringKey);
|
|
8505
8516
|
}
|
|
@@ -8508,87 +8519,6 @@ function requireCuratedPaletteValueKey(authoringKey) {
|
|
|
8508
8519
|
if (!palette) throw new Error(`Unknown curated palette authoring key "${authoringKey}"`);
|
|
8509
8520
|
return palette.valueKey;
|
|
8510
8521
|
}
|
|
8511
|
-
/** Parses a raw persisted key into catalogue-proven curated membership. */
|
|
8512
|
-
const knownCuratedPaletteValueKeySchema = z$1.string().transform((value, ctx) => {
|
|
8513
|
-
const valueKey = parsePaletteValueKey(value);
|
|
8514
|
-
if (!valueKey) {
|
|
8515
|
-
ctx.addIssue({
|
|
8516
|
-
code: "custom",
|
|
8517
|
-
message: "Invalid canonical palette value key"
|
|
8518
|
-
});
|
|
8519
|
-
return z$1.NEVER;
|
|
8520
|
-
}
|
|
8521
|
-
const palette = findCuratedPalette(valueKey);
|
|
8522
|
-
if (!palette) {
|
|
8523
|
-
ctx.addIssue({
|
|
8524
|
-
code: "custom",
|
|
8525
|
-
message: "Unknown curated palette value key"
|
|
8526
|
-
});
|
|
8527
|
-
return z$1.NEVER;
|
|
8528
|
-
}
|
|
8529
|
-
return palette.valueKey;
|
|
8530
|
-
});
|
|
8531
|
-
//#endregion
|
|
8532
|
-
//#region ../theme-core/src/palette/selection.ts
|
|
8533
|
-
const sitePaletteIdSchema = z$1.string().uuid().transform((value) => value);
|
|
8534
|
-
const sitePaletteVersionSchema = z$1.number().int().nonnegative().transform((value) => value);
|
|
8535
|
-
const paletteSelectionSchema = z$1.discriminatedUnion("kind", [z$1.object({
|
|
8536
|
-
kind: z$1.literal("curated"),
|
|
8537
|
-
valueKey: knownCuratedPaletteValueKeySchema
|
|
8538
|
-
}), z$1.object({
|
|
8539
|
-
kind: z$1.literal("site"),
|
|
8540
|
-
paletteId: sitePaletteIdSchema
|
|
8541
|
-
})]);
|
|
8542
|
-
const onboardingPaletteOriginSchema = z$1.object({
|
|
8543
|
-
kind: z$1.literal("onboarding"),
|
|
8544
|
-
sourceKey: z$1.string().min(1).nullable()
|
|
8545
|
-
});
|
|
8546
|
-
const curatedForkPaletteOriginSchema = z$1.object({
|
|
8547
|
-
kind: z$1.literal("curated-fork"),
|
|
8548
|
-
sourceValueKey: paletteValueKeySchema
|
|
8549
|
-
});
|
|
8550
|
-
const manualPaletteOriginSchema = z$1.object({ kind: z$1.literal("manual") });
|
|
8551
|
-
const legacyCustomizedPaletteOriginSchema = z$1.object({
|
|
8552
|
-
kind: z$1.literal("legacy-customized"),
|
|
8553
|
-
sourceKey: z$1.string().min(1).nullable()
|
|
8554
|
-
});
|
|
8555
|
-
const sitePaletteOriginSchema = z$1.discriminatedUnion("kind", [
|
|
8556
|
-
onboardingPaletteOriginSchema,
|
|
8557
|
-
curatedForkPaletteOriginSchema,
|
|
8558
|
-
manualPaletteOriginSchema,
|
|
8559
|
-
legacyCustomizedPaletteOriginSchema
|
|
8560
|
-
]);
|
|
8561
|
-
const editorSitePaletteOriginSchema = z$1.discriminatedUnion("kind", [z$1.object({
|
|
8562
|
-
kind: z$1.literal("curated-fork"),
|
|
8563
|
-
sourceValueKey: knownCuratedPaletteValueKeySchema
|
|
8564
|
-
}), manualPaletteOriginSchema]);
|
|
8565
|
-
z$1.object({
|
|
8566
|
-
id: sitePaletteIdSchema,
|
|
8567
|
-
colors: paletteColorsSchema,
|
|
8568
|
-
mode: paletteModeSchema,
|
|
8569
|
-
origin: sitePaletteOriginSchema,
|
|
8570
|
-
version: sitePaletteVersionSchema
|
|
8571
|
-
});
|
|
8572
|
-
z$1.discriminatedUnion("kind", [
|
|
8573
|
-
z$1.object({ kind: z$1.literal("preserve") }),
|
|
8574
|
-
z$1.object({
|
|
8575
|
-
kind: z$1.literal("select"),
|
|
8576
|
-
selection: paletteSelectionSchema
|
|
8577
|
-
}),
|
|
8578
|
-
z$1.object({
|
|
8579
|
-
kind: z$1.literal("create-site"),
|
|
8580
|
-
colors: paletteColorsSchema,
|
|
8581
|
-
mode: paletteModeSchema,
|
|
8582
|
-
origin: editorSitePaletteOriginSchema
|
|
8583
|
-
}),
|
|
8584
|
-
z$1.object({
|
|
8585
|
-
kind: z$1.literal("update-site"),
|
|
8586
|
-
paletteId: sitePaletteIdSchema,
|
|
8587
|
-
expectedVersion: sitePaletteVersionSchema,
|
|
8588
|
-
colors: paletteColorsSchema,
|
|
8589
|
-
mode: paletteModeSchema
|
|
8590
|
-
})
|
|
8591
|
-
]);
|
|
8592
8522
|
const defaultThemeTokens = {
|
|
8593
8523
|
color: {
|
|
8594
8524
|
"background/base": "#ffffff",
|
|
@@ -9452,7 +9382,7 @@ function applyNavTypography(style, typography) {
|
|
|
9452
9382
|
textSize: "sm",
|
|
9453
9383
|
letterSpacing: "wider"
|
|
9454
9384
|
};
|
|
9455
|
-
default: return assertNever$
|
|
9385
|
+
default: return assertNever$15(typography, "Unhandled header nav typography");
|
|
9456
9386
|
}
|
|
9457
9387
|
}
|
|
9458
9388
|
function underlineNavLinkStyle(colorToken, underlineColorToken, typography = "plain") {
|
|
@@ -9481,7 +9411,7 @@ function themedHeaderShadow(theme) {
|
|
|
9481
9411
|
case "low": return { elevation: "sm" };
|
|
9482
9412
|
case "medium": return { elevation: "md" };
|
|
9483
9413
|
case "high": return { elevation: "lg" };
|
|
9484
|
-
default: return assertNever$
|
|
9414
|
+
default: return assertNever$15(theme.shadow.elevation, "Unhandled theme shadow elevation");
|
|
9485
9415
|
}
|
|
9486
9416
|
}
|
|
9487
9417
|
function solidBrandHeader(theme) {
|
|
@@ -13357,6 +13287,34 @@ const mediaSchema$1 = z.object({
|
|
|
13357
13287
|
transform: transformSchema$1.optional()
|
|
13358
13288
|
});
|
|
13359
13289
|
//#endregion
|
|
13290
|
+
//#region ../theme-core/src/palette/schema.ts
|
|
13291
|
+
const colourHexString = z$1.string().regex(/^#([0-9A-Fa-f]{3}){1,2}$/);
|
|
13292
|
+
const paletteColorSchema = z$1.object({
|
|
13293
|
+
name: z$1.string().min(1),
|
|
13294
|
+
hex: colourHexString
|
|
13295
|
+
});
|
|
13296
|
+
const paletteMetaSchema = z$1.object({ mode: z$1.enum(["light", "dark"]) });
|
|
13297
|
+
const paletteSchema = z$1.object({
|
|
13298
|
+
colors: z$1.array(paletteColorSchema),
|
|
13299
|
+
meta: paletteMetaSchema
|
|
13300
|
+
}).transform((palette, ctx) => {
|
|
13301
|
+
const colors = paletteColorsFromEntries(palette.colors);
|
|
13302
|
+
if (!colors.ok) {
|
|
13303
|
+
ctx.addIssue({
|
|
13304
|
+
code: "custom",
|
|
13305
|
+
message: `Invalid complete palette: ${colors.error.kind}`
|
|
13306
|
+
});
|
|
13307
|
+
return z$1.NEVER;
|
|
13308
|
+
}
|
|
13309
|
+
return {
|
|
13310
|
+
colors: paletteColorEntries(colors.colors).map(({ name, hex }) => ({
|
|
13311
|
+
name: String(name),
|
|
13312
|
+
hex: String(hex)
|
|
13313
|
+
})),
|
|
13314
|
+
meta: palette.meta
|
|
13315
|
+
};
|
|
13316
|
+
});
|
|
13317
|
+
//#endregion
|
|
13360
13318
|
//#region ../theme-core/src/surfaces/foregroundRoles.ts
|
|
13361
13319
|
const SURFACE_FOREGROUND_ROLES = [
|
|
13362
13320
|
"text",
|
|
@@ -17447,16 +17405,6 @@ const axesSchema = z$1.object({
|
|
|
17447
17405
|
"expressive"
|
|
17448
17406
|
])
|
|
17449
17407
|
});
|
|
17450
|
-
const colourHexString = z$1.string().regex(/^#([0-9A-Fa-f]{3}){1,2}$/);
|
|
17451
|
-
const paletteColorSchema = z$1.object({
|
|
17452
|
-
name: z$1.string().min(1),
|
|
17453
|
-
hex: colourHexString
|
|
17454
|
-
});
|
|
17455
|
-
const paletteMetaSchema = z$1.object({ mode: z$1.enum(["light", "dark"]) });
|
|
17456
|
-
const paletteSchema = z$1.object({
|
|
17457
|
-
colors: z$1.array(paletteColorSchema),
|
|
17458
|
-
meta: paletteMetaSchema
|
|
17459
|
-
});
|
|
17460
17408
|
const typographyStyleSchema = z$1.object({
|
|
17461
17409
|
family: z$1.string().min(1),
|
|
17462
17410
|
weight: z$1.enum([
|
|
@@ -28223,7 +28171,7 @@ function planSiteChromePlacement(positioning) {
|
|
|
28223
28171
|
headerRootClassName: "rb-fixed rb-top-0 rb-left-0 rb-right-0",
|
|
28224
28172
|
standaloneShellClassName: "fixed left-0 right-0 top-0 z-40 w-full"
|
|
28225
28173
|
};
|
|
28226
|
-
default: return assertNever$
|
|
28174
|
+
default: return assertNever$15(positioning);
|
|
28227
28175
|
}
|
|
28228
28176
|
}
|
|
28229
28177
|
function splitSiteChromePlacementClasses(className) {
|
|
@@ -38591,10 +38539,10 @@ function preferredPathsForSource(source) {
|
|
|
38591
38539
|
case "workshop": return ["/workshops", "/workshop"];
|
|
38592
38540
|
case "retreat": return ["/retreats", "/retreat"];
|
|
38593
38541
|
case "performance": return ["/performances", "/performance"];
|
|
38594
|
-
default: return assertNever$
|
|
38542
|
+
default: return assertNever$24(source.preset, "Unhandled offerings preview event preset");
|
|
38595
38543
|
}
|
|
38596
38544
|
case "course": return ["/courses", "/course"];
|
|
38597
|
-
default: return assertNever$
|
|
38545
|
+
default: return assertNever$24(source, "Unhandled offerings preview source");
|
|
38598
38546
|
}
|
|
38599
38547
|
}
|
|
38600
38548
|
function normalizeRoutePath(value) {
|
|
@@ -44744,7 +44692,7 @@ function resolveLinkedContentEditSupport(contentType) {
|
|
|
44744
44692
|
kind: "unsupported-domain-backed",
|
|
44745
44693
|
reason: metadata.reason
|
|
44746
44694
|
};
|
|
44747
|
-
default: return assertNever$
|
|
44695
|
+
default: return assertNever$24(metadata);
|
|
44748
44696
|
}
|
|
44749
44697
|
}
|
|
44750
44698
|
function contentTypeKeyToLabel(key) {
|
|
@@ -47341,7 +47289,7 @@ function eventSeriesIdsForSubject(subject) {
|
|
|
47341
47289
|
switch (subject.kind) {
|
|
47342
47290
|
case "eventSeries": return [subject.eventSeriesId];
|
|
47343
47291
|
case "eventOffering": return subject.availableEventSeriesIds;
|
|
47344
|
-
default: return assertNever$
|
|
47292
|
+
default: return assertNever$24(subject);
|
|
47345
47293
|
}
|
|
47346
47294
|
}
|
|
47347
47295
|
//#endregion
|
|
@@ -48058,7 +48006,7 @@ function renderOfferingGroupItems(presentation, items, options) {
|
|
|
48058
48006
|
children: items.map((item) => renderOfferingCompactItem(item, options))
|
|
48059
48007
|
})
|
|
48060
48008
|
});
|
|
48061
|
-
default: return assertNever$
|
|
48009
|
+
default: return assertNever$24(presentation, "Unhandled offerings preview presentation");
|
|
48062
48010
|
}
|
|
48063
48011
|
}
|
|
48064
48012
|
function compareCoursesByNextSession(left, right) {
|
|
@@ -48103,7 +48051,7 @@ function featuredSummaryDetails(item) {
|
|
|
48103
48051
|
const summary = deriveCourseScheduleSummary(item.course);
|
|
48104
48052
|
return summary ? formatFeaturedSummary(summary, item.course.venue?.name ?? null) : null;
|
|
48105
48053
|
}
|
|
48106
|
-
default: return assertNever$
|
|
48054
|
+
default: return assertNever$24(item, "Unhandled offerings preview item");
|
|
48107
48055
|
}
|
|
48108
48056
|
}
|
|
48109
48057
|
function formatFeaturedSummary(summary, venue) {
|
|
@@ -48112,7 +48060,7 @@ function formatFeaturedSummary(summary, venue) {
|
|
|
48112
48060
|
case "multi-day-span": return detailsFromOccurrences(summary.occurrence, summary.occurrence, venue, null, null, true);
|
|
48113
48061
|
case "fixed-recurring-run": return detailsFromOccurrences(summary.first, summary.last, venue, summary.recurrenceLabel, null);
|
|
48114
48062
|
case "irregular-multi-session-run": return detailsFromOccurrences(summary.first, summary.last, venue, null, `${summary.sessionCount} dates`);
|
|
48115
|
-
default: return assertNever$
|
|
48063
|
+
default: return assertNever$24(summary, "Unhandled offerings preview schedule summary");
|
|
48116
48064
|
}
|
|
48117
48065
|
}
|
|
48118
48066
|
function detailsFromOccurrences(first, last, venue, recurrence, sessionCount, spanUsesEndDate = false) {
|
|
@@ -48509,7 +48457,7 @@ function bookingActionContent(input) {
|
|
|
48509
48457
|
children: input.buttonText
|
|
48510
48458
|
});
|
|
48511
48459
|
case "unavailable": return null;
|
|
48512
|
-
default: return assertNever$
|
|
48460
|
+
default: return assertNever$24(input.booking);
|
|
48513
48461
|
}
|
|
48514
48462
|
}
|
|
48515
48463
|
function RecurringSchedule({ schedule, buttonText = "Book", buttonVariant = "primary", showVenue = true, emptyMessage = "Regular schedule details will be added shortly." }) {
|
|
@@ -50687,7 +50635,7 @@ function previewEditableTargetToPath(target) {
|
|
|
50687
50635
|
case "current-entry-field":
|
|
50688
50636
|
case "current-entry-metadata": return target.path;
|
|
50689
50637
|
case "read-only": return;
|
|
50690
|
-
default: return assertNever$
|
|
50638
|
+
default: return assertNever$24(target);
|
|
50691
50639
|
}
|
|
50692
50640
|
}
|
|
50693
50641
|
function previewEditableTargetToFieldKey(target) {
|
|
@@ -51762,7 +51710,7 @@ function collectNestedPreviewFieldConstraintEntries(field, path) {
|
|
|
51762
51710
|
case "text":
|
|
51763
51711
|
case "time":
|
|
51764
51712
|
case "url": return [];
|
|
51765
|
-
default: return assertNever$
|
|
51713
|
+
default: return assertNever$24(field);
|
|
51766
51714
|
}
|
|
51767
51715
|
}
|
|
51768
51716
|
function makeDefaultBlockComponent(args) {
|
|
@@ -55917,7 +55865,7 @@ function sourceLabel(source) {
|
|
|
55917
55865
|
case "managed-database": return "DB";
|
|
55918
55866
|
case "sdk-synced": return "SDK-synced DB";
|
|
55919
55867
|
case "sdk-config": return "SDK config";
|
|
55920
|
-
default: return assertNever$
|
|
55868
|
+
default: return assertNever$24(source);
|
|
55921
55869
|
}
|
|
55922
55870
|
}
|
|
55923
55871
|
//#endregion
|
|
@@ -69664,7 +69612,7 @@ function renderWithSdkThemeRuntime({ themeRuntime, theme, children }) {
|
|
|
69664
69612
|
children
|
|
69665
69613
|
});
|
|
69666
69614
|
case "none": return /* @__PURE__ */ jsx(Fragment, { children });
|
|
69667
|
-
default: return assertNever$
|
|
69615
|
+
default: return assertNever$24(themeRuntime);
|
|
69668
69616
|
}
|
|
69669
69617
|
}
|
|
69670
69618
|
//#endregion
|
|
@@ -72300,7 +72248,7 @@ function navigationAuthoringLinkToCommandLink(link) {
|
|
|
72300
72248
|
badge: link.badge,
|
|
72301
72249
|
label: link.label
|
|
72302
72250
|
};
|
|
72303
|
-
default: return assertNever$
|
|
72251
|
+
default: return assertNever$24(link);
|
|
72304
72252
|
}
|
|
72305
72253
|
}
|
|
72306
72254
|
function portalLabelsForCommand(labels) {
|
|
@@ -72343,7 +72291,7 @@ function navigationReadLinkToLocalLink(item) {
|
|
|
72343
72291
|
badge: link.badge,
|
|
72344
72292
|
label: link.label
|
|
72345
72293
|
};
|
|
72346
|
-
default: return assertNever$
|
|
72294
|
+
default: return assertNever$24(link);
|
|
72347
72295
|
}
|
|
72348
72296
|
}
|
|
72349
72297
|
function internalNavigationLinkToLocalLink(item) {
|