@riverbankcms/sdk 0.124.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-DBmAJJkQ.mjs → PreviewEditorSidebar-DcYJxTgc.mjs} +67 -266
- package/dist/{PreviewEditorUI-CfGaz9cY.mjs → PreviewEditorUI-Ctt1yTJr.mjs} +3 -3
- package/dist/{PreviewQueryProvider-BH-3-jSj.mjs → PreviewQueryProvider-DgFDIwvK.mjs} +1 -1
- package/dist/{SdkPreviewModeRuntime-BW9Z8j8T.mjs → SdkPreviewModeRuntime-CvW1vdQ4.mjs} +38 -30
- package/dist/{SiteChromeCustomizeContext-2z8moxYf.mjs → SiteChromeCustomizeContext-C87qlKWw.mjs} +493 -1378
- package/dist/_dts/ai/src/contracts/proposals.d.ts +1354 -202
- package/dist/_dts/api/src/accessAdmin.d.ts +2 -14
- 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/siteAccessAdmin.d.ts +23 -0
- package/dist/_dts/api/src/siteOperations.d.ts +18 -1
- package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +1 -14
- package/dist/_dts/billing/src/plans/types.d.ts +24 -5
- package/dist/_dts/blocks/src/contracts/non-block-islands.d.ts +4 -0
- package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-details/logic.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-details.client.d.ts +3 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-details.server.d.ts +2 -1
- 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 +331 -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 +631 -525
- 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-DxvjKvck.mjs → DiscountCodeDisclosure-DS0AuFWW.mjs} +1 -1
- package/dist/client/{EventCombined.client-BydMGc4c.mjs → EventCombined.client-DtMxLr7q.mjs} +2 -2
- package/dist/client/{EventListing.client-vpzhhysN.mjs → EventListing.client-BdLSRNg1.mjs} +2 -2
- package/dist/client/{LeafletStaticMap-CB07rpf8.mjs → LeafletStaticMap-BrpC6vsT.mjs} +1 -1
- package/dist/client/{MagicLinkForm-BzyRJ8VF.mjs → MagicLinkForm-Bt3IuLMy.mjs} +1 -1
- package/dist/client/{StepIndicator-CTcGf8Be.mjs → StepIndicator-CBYPFVoy.mjs} +2 -2
- package/dist/client/{accordion-B-DUDLRD.mjs → accordion-BqqwPJWM.mjs} +1 -1
- package/dist/client/{bookingForm-DSbClLcZ.mjs → bookingForm-SneP3yxC.mjs} +5 -6
- package/dist/client/bookings.mjs +190 -24
- package/dist/client/{carousel-B6Ccdx8M.mjs → carousel-BTIR9L3I.mjs} +1 -1
- package/dist/client/{cart-BZh8G8wM.mjs → cart-bqiqd8SX.mjs} +3 -3
- package/dist/client/{checkout-o6zaC-kM.mjs → checkout-WbTFV5v4.mjs} +3 -3
- package/dist/client/client.mjs +175 -223
- package/dist/client/{courseRegistration-Cf11pNDs.mjs → courseRegistration-BcemLAdN.mjs} +6 -7
- package/dist/client/{eventCalendar-BeXrdsSE.mjs → eventCalendar-CsxIw0V_.mjs} +4 -4
- package/dist/client/{eventCombined-DA76PZgG.mjs → eventCombined-B6XMoHfa.mjs} +2 -2
- package/dist/client/{eventDetails-BLxg0rok.mjs → eventDetails-BJaoPPfo.mjs} +10 -5
- package/dist/client/{eventListing-tO9LheBX.mjs → eventListing-DgwdYHRT.mjs} +2 -2
- package/dist/client/{eventRegistration-Cnene9D9.mjs → eventRegistration-C0O3folu.mjs} +30 -22
- package/dist/client/{form-DZf72CHB.mjs → form-Bk9txGFt.mjs} +1 -1
- package/dist/client/{headerSection-Hioja5Cr.mjs → headerSection-yIBt0yTv.mjs} +2 -2
- package/dist/client/hooks.mjs +54 -102
- package/dist/client/{locationMap-DwhUXEix.mjs → locationMap-C-3KIpv-.mjs} +2 -2
- package/dist/client/{newsletterForm-C350bEQf.mjs → newsletterForm-CzB8g8h2.mjs} +1 -1
- package/dist/client/{pricing-BYWN_ATa.mjs → pricing-C1QeDes_.mjs} +1 -1
- package/dist/client/{productDetail-CCqCyXgU.mjs → productDetail-w7SBp5uc.mjs} +3 -3
- package/dist/client/{productList-BAiNJrOU.mjs → productList-D0tGKHGf.mjs} +3 -3
- package/dist/client/{propsDecoder-DeunRj6m.mjs → propsDecoder-Bcin2DB3.mjs} +172 -11
- package/dist/client/rendering/client.mjs +322 -363
- package/dist/client/rendering/islands.mjs +18 -18
- package/dist/client/rendering.mjs +231 -272
- package/dist/client/{useDiscountCodeUi-I-92-x2V.mjs → scrollToBlock-h-o_STf_.mjs} +18 -2
- package/dist/client/{shop-DUmCdBtw.mjs → shop-BGzmL8O_.mjs} +5 -6
- package/dist/client/{shop-commerce-CY27mEUr.mjs → shop-commerce-lX8QxjX-.mjs} +4 -4
- package/dist/client/{shop-commerce-store-ChXPbWfa.mjs → shop-commerce-store-CEurARtu.mjs} +1 -1
- package/dist/client/{shopShared-q0kin1cv.mjs → shopShared-DXxH8xxw.mjs} +2 -2
- package/dist/client/{useEventFilters-DlcVluZh.mjs → useEventFilters-B591g9vd.mjs} +2 -2
- package/dist/client/{usePolling-Bz7GFV_a.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-OnPM8Z69.mjs → sdk-runtime-M__i3Jce.mjs} +2 -2
- package/dist/{separator-CPtfzHqA.mjs → separator-VSlnI9bc.mjs} +1 -1
- package/dist/server/components.mjs +99 -141
- package/dist/server/config-validation.mjs +54 -102
- package/dist/server/config.mjs +54 -102
- package/dist/server/data.mjs +54 -102
- package/dist/server/index.mjs +1 -8
- package/dist/server/next.mjs +103 -152
- package/dist/server/page-converter.mjs +54 -102
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +62 -104
- package/dist/server/rendering.mjs +100 -142
- package/dist/server/routing.mjs +75 -147
- package/dist/server/server.mjs +55 -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
package/dist/cli/index.mjs
CHANGED
|
@@ -950,7 +950,7 @@ var init_demo_runtime = __esmMin((() => {}));
|
|
|
950
950
|
var init_collections = __esmMin((() => {}));
|
|
951
951
|
//#endregion
|
|
952
952
|
//#region ../core/src/assert-never.ts
|
|
953
|
-
function assertNever$
|
|
953
|
+
function assertNever$24(value, message = "Unexpected variant") {
|
|
954
954
|
throw new Error(`${message}: ${String(value)}`);
|
|
955
955
|
}
|
|
956
956
|
var init_assert_never = __esmMin((() => {}));
|
|
@@ -1062,7 +1062,7 @@ function formatCoursePriceDisplayLabel(display, options) {
|
|
|
1062
1062
|
case "exact": return `Course (${formatCurrencyAmount(display.amount, display.currency, options)})`;
|
|
1063
1063
|
case "from": return `Course (From ${formatCurrencyAmount(display.amount, display.currency, options)})`;
|
|
1064
1064
|
case "range": return `Course (${formatCurrencyAmount(display.minAmount, display.currency, options)} - ${formatCurrencyAmount(display.maxAmount, display.currency, options)})`;
|
|
1065
|
-
default: return assertNever$
|
|
1065
|
+
default: return assertNever$24(display);
|
|
1066
1066
|
}
|
|
1067
1067
|
}
|
|
1068
1068
|
/**
|
|
@@ -1082,7 +1082,7 @@ function formatBookingPriceDisplay(display, options = {}) {
|
|
|
1082
1082
|
case "unavailable": return "Pricing unavailable";
|
|
1083
1083
|
case "external": return display.label;
|
|
1084
1084
|
case "course": return formatCoursePriceDisplayLabel(display.display, options);
|
|
1085
|
-
default: return assertNever$
|
|
1085
|
+
default: return assertNever$24(display);
|
|
1086
1086
|
}
|
|
1087
1087
|
}
|
|
1088
1088
|
/** Render an event's price directly from its pricing value. */
|
|
@@ -1161,10 +1161,10 @@ function resolveFlexibleBalanceDueAt(input) {
|
|
|
1161
1161
|
switch (input.dueDateRule.kind) {
|
|
1162
1162
|
case "relative_to_start_date": return subtractDaysFromIso(input.bookingStartAt, input.dueDateRule.daysBeforeStart);
|
|
1163
1163
|
case "fixed_calendar_date": return input.dueDateRule.dueAt;
|
|
1164
|
-
default: return assertNever$
|
|
1164
|
+
default: return assertNever$23(input.dueDateRule);
|
|
1165
1165
|
}
|
|
1166
1166
|
}
|
|
1167
|
-
function assertNever$
|
|
1167
|
+
function assertNever$23(value) {
|
|
1168
1168
|
throw new Error(`Unexpected value: ${String(value)}`);
|
|
1169
1169
|
}
|
|
1170
1170
|
var init_booking_flexible_balance = __esmMin((() => {
|
|
@@ -1178,7 +1178,7 @@ function isDepositBearingBookingInstalmentPlan(plan) {
|
|
|
1178
1178
|
case "deposit_plus_one_remainder":
|
|
1179
1179
|
case "deposit_plus_scheduled_instalments": return true;
|
|
1180
1180
|
case "equal_scheduled_instalments": return false;
|
|
1181
|
-
default: return assertNever$
|
|
1181
|
+
default: return assertNever$22(plan);
|
|
1182
1182
|
}
|
|
1183
1183
|
}
|
|
1184
1184
|
function getBookingInstalmentDepositRefundability(plan) {
|
|
@@ -1204,7 +1204,7 @@ function addIntervalPreservingMonthAnchor(isoString, intervalCount, intervalUnit
|
|
|
1204
1204
|
date.setUTCDate(date.getUTCDate() + intervalCount * 7);
|
|
1205
1205
|
return date.toISOString();
|
|
1206
1206
|
case "month": return addMonthsPreservingAnchorDay(date, intervalCount).toISOString();
|
|
1207
|
-
default: return assertNever$
|
|
1207
|
+
default: return assertNever$22(intervalUnit);
|
|
1208
1208
|
}
|
|
1209
1209
|
}
|
|
1210
1210
|
function getBookingInstalmentPlanIntervalCount(plan) {
|
|
@@ -1212,7 +1212,7 @@ function getBookingInstalmentPlanIntervalCount(plan) {
|
|
|
1212
1212
|
case "deposit_plus_one_remainder": return plan.remainderDueCount;
|
|
1213
1213
|
case "deposit_plus_scheduled_instalments":
|
|
1214
1214
|
case "equal_scheduled_instalments": return plan.intervalCount;
|
|
1215
|
-
default: return assertNever$
|
|
1215
|
+
default: return assertNever$22(plan);
|
|
1216
1216
|
}
|
|
1217
1217
|
}
|
|
1218
1218
|
function omitZeroAmountFutureRows(rows) {
|
|
@@ -1228,7 +1228,7 @@ function addMonthsPreservingAnchorDay(date, intervalCount) {
|
|
|
1228
1228
|
nextMonth.setUTCDate(Math.min(anchorDay, lastDayOfTargetMonth));
|
|
1229
1229
|
return nextMonth;
|
|
1230
1230
|
}
|
|
1231
|
-
function assertNever$
|
|
1231
|
+
function assertNever$22(value) {
|
|
1232
1232
|
throw new Error(`Unexpected value: ${String(value)}`);
|
|
1233
1233
|
}
|
|
1234
1234
|
var init_booking_instalments = __esmMin((() => {}));
|
|
@@ -1472,9 +1472,20 @@ function getLocalScheduleDate(date, timeZone) {
|
|
|
1472
1472
|
day: parts.day
|
|
1473
1473
|
};
|
|
1474
1474
|
}
|
|
1475
|
+
function getLocalScheduleTime(date, timeZone) {
|
|
1476
|
+
const parts = getZonedDateTimeParts(date, getSafeTimeZone(timeZone));
|
|
1477
|
+
return {
|
|
1478
|
+
hour: parts.hour,
|
|
1479
|
+
minute: parts.minute,
|
|
1480
|
+
second: parts.second
|
|
1481
|
+
};
|
|
1482
|
+
}
|
|
1475
1483
|
function formatLocalScheduleDate(date) {
|
|
1476
1484
|
return formatDateKey$1(date);
|
|
1477
1485
|
}
|
|
1486
|
+
function formatLocalScheduleTime(time) {
|
|
1487
|
+
return `${String(time.hour).padStart(2, "0")}:${String(time.minute).padStart(2, "0")}`;
|
|
1488
|
+
}
|
|
1478
1489
|
function addLocalScheduleDays(date, days) {
|
|
1479
1490
|
const utcDate = new Date(Date.UTC(date.year, date.month - 1, date.day + days, 12, 0, 0));
|
|
1480
1491
|
return {
|
|
@@ -8887,13 +8898,6 @@ const API_ENDPOINTS$1 = {
|
|
|
8887
8898
|
auth: "user",
|
|
8888
8899
|
responseKind: "json"
|
|
8889
8900
|
},
|
|
8890
|
-
listSiteThemePalettes: {
|
|
8891
|
-
path: "/sites/{siteId}/theme/palettes",
|
|
8892
|
-
method: "GET",
|
|
8893
|
-
auth: "user",
|
|
8894
|
-
errors: [],
|
|
8895
|
-
responseKind: "json"
|
|
8896
|
-
},
|
|
8897
8901
|
createSiteFontUploadUrl: {
|
|
8898
8902
|
path: "/sites/{siteId}/fonts/upload-url",
|
|
8899
8903
|
method: "POST",
|
|
@@ -10251,7 +10255,7 @@ function navigationAuthoringLinkToCommandLink(link) {
|
|
|
10251
10255
|
badge: link.badge,
|
|
10252
10256
|
label: link.label
|
|
10253
10257
|
};
|
|
10254
|
-
default: return assertNever$
|
|
10258
|
+
default: return assertNever$24(link);
|
|
10255
10259
|
}
|
|
10256
10260
|
}
|
|
10257
10261
|
function portalLabelsForCommand(labels) {
|
|
@@ -10294,7 +10298,7 @@ function navigationReadLinkToLocalLink(item) {
|
|
|
10294
10298
|
badge: link.badge,
|
|
10295
10299
|
label: link.label
|
|
10296
10300
|
};
|
|
10297
|
-
default: return assertNever$
|
|
10301
|
+
default: return assertNever$24(link);
|
|
10298
10302
|
}
|
|
10299
10303
|
}
|
|
10300
10304
|
function internalNavigationLinkToLocalLink(item) {
|
|
@@ -11379,7 +11383,7 @@ const linkSchema = z$1.union([
|
|
|
11379
11383
|
//#endregion
|
|
11380
11384
|
//#region ../blocks/src/system/node/schema.ts
|
|
11381
11385
|
var transformStepSchema, bindingPathSchema, bindingSchema, repeatSchema, conditionalAuthoringPresenceSchema, conditionSchema, dataScopeSchema, nodePropsSchema, nodeSchema, nodeTreeSchema, NodeSchema, NodeTreeSchema;
|
|
11382
|
-
var init_schema$
|
|
11386
|
+
var init_schema$3 = __esmMin((() => {
|
|
11383
11387
|
transformStepSchema = z$1.object({
|
|
11384
11388
|
id: z$1.string().min(1, "Transform requires an identifier"),
|
|
11385
11389
|
options: z$1.record(z$1.string(), z$1.unknown()).optional()
|
|
@@ -11584,7 +11588,7 @@ var init_validation_constants = __esmMin((() => {
|
|
|
11584
11588
|
//#endregion
|
|
11585
11589
|
//#region ../blocks/src/system/node/index.ts
|
|
11586
11590
|
var init_node = __esmMin((() => {
|
|
11587
|
-
init_schema$
|
|
11591
|
+
init_schema$3();
|
|
11588
11592
|
init_typeBasedLayout();
|
|
11589
11593
|
init_validation_constants();
|
|
11590
11594
|
}));
|
|
@@ -11735,7 +11739,7 @@ function createSdkSelectField(input) {
|
|
|
11735
11739
|
}));
|
|
11736
11740
|
}
|
|
11737
11741
|
var visibilityLevels, MEDIA_KINDS, DISPLAY_MEDIA_KINDS$2, DEFAULT_MEDIA_FIELD_KINDS, PUBLIC_FILE_FIELD_KINDS, siteOptionSources, mediaDeliverySchema, selectOptionSchema, selectSourceSchema, visibleWhenPredicateSchema, visibleWhenSchema, uiSchema, baseFieldSchema, textFieldSchema, richTextFieldSchema, inlineTextFieldSchema, mediaFieldSchema, fileFieldSchema, booleanFieldSchema, dateFieldSchema, timeFieldSchema, dateTimeFieldSchema, slugFieldSchema, urlFieldSchema, linkFieldSchema, selectFieldSchema, referenceFieldSchema, itemTypeSchema, repeaterFieldSchema$1, groupFieldSchema$1, modalFieldSchema, numberFieldSchema, tabDefinitionSchema, tabGroupFieldSchema, presetOptionSchema, presetOrCustomFieldSchema, contentTypeSelectFieldSchema, entryPickerFieldSchema, _fieldSchemaInternal, fieldSchema, slotSchema, typographyTokens$1, colorTokens$1, spacingTokens$1, radiusTokens$1, styleTokenSchema, behaviourSchema, quickFieldPrioritySchema, previewCustomizeManifestCurationSchema, blockCategoryEnum$1, blockContentSourceKinds, blockContentSourceSchema;
|
|
11738
|
-
var init_schema$
|
|
11742
|
+
var init_schema$2 = __esmMin((() => {
|
|
11739
11743
|
init_node();
|
|
11740
11744
|
init_repeaterGrid();
|
|
11741
11745
|
init_presets$2();
|
|
@@ -12322,7 +12326,7 @@ var init_schema$1 = __esmMin((() => {
|
|
|
12322
12326
|
}));
|
|
12323
12327
|
//#endregion
|
|
12324
12328
|
//#region ../blocks/src/system/inlineText.ts
|
|
12325
|
-
init_schema$
|
|
12329
|
+
init_schema$2();
|
|
12326
12330
|
const inlineTextMarkSchema = z$1.discriminatedUnion("kind", [
|
|
12327
12331
|
z$1.object({ kind: z$1.literal("strong") }),
|
|
12328
12332
|
z$1.object({ kind: z$1.literal("emphasis") }),
|
|
@@ -13765,7 +13769,7 @@ const ALLOWED_URL_PROTOCOLS = ["http:", "https:"];
|
|
|
13765
13769
|
const DATE_PATTERN = /^(?<year>[1-9]\d{3})-(?<month>\d{2})-(?<day>\d{2})$/;
|
|
13766
13770
|
const TIME_PATTERN = /^(?<hours>[01]\d|2[0-3]):(?<minutes>[0-5]\d)$/;
|
|
13767
13771
|
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)$/;
|
|
13768
|
-
function assertNever$
|
|
13772
|
+
function assertNever$16(value) {
|
|
13769
13773
|
throw new Error(`Unhandled field validation variant: ${JSON.stringify(value)}`);
|
|
13770
13774
|
}
|
|
13771
13775
|
function validationContext(options = {}) {
|
|
@@ -13818,7 +13822,7 @@ function fieldIssueToMessage(issue) {
|
|
|
13818
13822
|
case "invalidMedia": return `${issue.label} must be a media object with an identifier`;
|
|
13819
13823
|
case "invalidLink": return `${issue.label} must be a valid link`;
|
|
13820
13824
|
case "invalidReference": return `${issue.label} must reference a valid item`;
|
|
13821
|
-
default: return assertNever$
|
|
13825
|
+
default: return assertNever$16(issue);
|
|
13822
13826
|
}
|
|
13823
13827
|
}
|
|
13824
13828
|
function pluralize(label, count) {
|
|
@@ -13938,7 +13942,7 @@ function deriveFieldValidationPlan(field, path = [field.id]) {
|
|
|
13938
13942
|
case "presetOrCustom":
|
|
13939
13943
|
case "contentTypeSelect":
|
|
13940
13944
|
case "entryPicker": return makePlan("passthrough", "unknown", field, path, false, []);
|
|
13941
|
-
default: return assertNever$
|
|
13945
|
+
default: return assertNever$16(field);
|
|
13942
13946
|
}
|
|
13943
13947
|
}
|
|
13944
13948
|
function deriveFieldValidationPlans(fields, parentPath = []) {
|
|
@@ -14013,7 +14017,7 @@ function resolveSelectConstraintSource(field) {
|
|
|
14013
14017
|
kind: "runtime",
|
|
14014
14018
|
source: source.kind
|
|
14015
14019
|
};
|
|
14016
|
-
default: return assertNever$
|
|
14020
|
+
default: return assertNever$16(source);
|
|
14017
14021
|
}
|
|
14018
14022
|
}
|
|
14019
14023
|
function normalizeStoredContentValues(plans, content, options = {}) {
|
|
@@ -14032,7 +14036,7 @@ function allGroupChildPlans(plan) {
|
|
|
14032
14036
|
switch (plan.childSelection.kind) {
|
|
14033
14037
|
case "all": return plan.childSelection.fields;
|
|
14034
14038
|
case "discriminatedTabs": return plan.childSelection.tabs.flatMap((tab) => tab.fields);
|
|
14035
|
-
default: return assertNever$
|
|
14039
|
+
default: return assertNever$16(plan.childSelection);
|
|
14036
14040
|
}
|
|
14037
14041
|
}
|
|
14038
14042
|
function selectedGroupChildPlans(plan, value) {
|
|
@@ -14065,7 +14069,7 @@ function canonicalizeFieldValueForWrite(plan, value) {
|
|
|
14065
14069
|
case "link":
|
|
14066
14070
|
case "select":
|
|
14067
14071
|
case "passthrough": return value;
|
|
14068
|
-
default: return assertNever$
|
|
14072
|
+
default: return assertNever$16(plan);
|
|
14069
14073
|
}
|
|
14070
14074
|
}
|
|
14071
14075
|
function canonicalizeObjectForWrite(plans, value) {
|
|
@@ -14091,7 +14095,7 @@ function normalizeStoredFieldValueWithContext(plan, value, ctx) {
|
|
|
14091
14095
|
case "link":
|
|
14092
14096
|
case "select":
|
|
14093
14097
|
case "passthrough": return normalizeFieldValue(plan, value, ctx);
|
|
14094
|
-
default: return assertNever$
|
|
14098
|
+
default: return assertNever$16(plan);
|
|
14095
14099
|
}
|
|
14096
14100
|
}
|
|
14097
14101
|
function normalizeStoredObjectChildren(children, value, ctx) {
|
|
@@ -14128,7 +14132,7 @@ function normalizeFieldValue(plan, value, ctx) {
|
|
|
14128
14132
|
case "select":
|
|
14129
14133
|
case "passthrough": return value;
|
|
14130
14134
|
case "media": return value;
|
|
14131
|
-
default: return assertNever$
|
|
14135
|
+
default: return assertNever$16(plan);
|
|
14132
14136
|
}
|
|
14133
14137
|
}
|
|
14134
14138
|
function normalizeObjectChildren(children, value, ctx) {
|
|
@@ -14187,7 +14191,7 @@ function validateNormalizedFieldValue(plan, value, ctx) {
|
|
|
14187
14191
|
case "repeater": return validateRepeaterPlan(plan, value, ctx);
|
|
14188
14192
|
case "group": return validateGroupPlan(plan, value, ctx);
|
|
14189
14193
|
case "passthrough": return [];
|
|
14190
|
-
default: return assertNever$
|
|
14194
|
+
default: return assertNever$16(plan);
|
|
14191
14195
|
}
|
|
14192
14196
|
}
|
|
14193
14197
|
function shouldRequireValue(plan, value, ctx) {
|
|
@@ -14229,7 +14233,7 @@ function validateStringConstraint(plan, constraint, value) {
|
|
|
14229
14233
|
case "timeFormat": return typeof value === "string" && isValidTimeString(value) ? [] : [issue$3(plan, "invalidTime")];
|
|
14230
14234
|
case "datetimeFormat": return typeof value === "string" && isValidDateTimeInstantString(value) ? [] : [issue$3(plan, "invalidDateTime")];
|
|
14231
14235
|
case "slugFormat": return typeof value === "string" && SLUG_PATTERN.test(value) ? [] : [issue$3(plan, "invalidSlug")];
|
|
14232
|
-
default: return assertNever$
|
|
14236
|
+
default: return assertNever$16(constraint);
|
|
14233
14237
|
}
|
|
14234
14238
|
}
|
|
14235
14239
|
function isValidIconPickerValue(value) {
|
|
@@ -14248,7 +14252,7 @@ function validateNumberConstraint(plan, constraint, value) {
|
|
|
14248
14252
|
case "numberType": return [];
|
|
14249
14253
|
case "numberMin": return value < constraint.minimum ? [issue$3(plan, "tooSmall", { minimum: constraint.minimum })] : [];
|
|
14250
14254
|
case "numberMax": return value > constraint.maximum ? [issue$3(plan, "tooLarge", { maximum: constraint.maximum })] : [];
|
|
14251
|
-
default: return assertNever$
|
|
14255
|
+
default: return assertNever$16(constraint);
|
|
14252
14256
|
}
|
|
14253
14257
|
}
|
|
14254
14258
|
function validateSelectPlan(plan, value) {
|
|
@@ -14270,7 +14274,7 @@ function validateRepeaterPlan(plan, value, ctx) {
|
|
|
14270
14274
|
maximum: constraint.maximum,
|
|
14271
14275
|
itemLabel: "item"
|
|
14272
14276
|
})] : [];
|
|
14273
|
-
default: return assertNever$
|
|
14277
|
+
default: return assertNever$16(constraint);
|
|
14274
14278
|
}
|
|
14275
14279
|
}), ...value.flatMap((item, index) => validateRepeaterItem(plan, item, index, ctx))];
|
|
14276
14280
|
}
|
|
@@ -14361,7 +14365,7 @@ function rebaseFieldPlanPath(plan, fromPrefix, toPrefix) {
|
|
|
14361
14365
|
...plan,
|
|
14362
14366
|
path
|
|
14363
14367
|
};
|
|
14364
|
-
default: return assertNever$
|
|
14368
|
+
default: return assertNever$16(plan);
|
|
14365
14369
|
}
|
|
14366
14370
|
}
|
|
14367
14371
|
function validateInlineTextPlan(plan, value) {
|
|
@@ -14408,7 +14412,7 @@ function fieldPlanToObjectPropertyZod(plan, options = {}) {
|
|
|
14408
14412
|
switch (presence.kind) {
|
|
14409
14413
|
case "required": return schema;
|
|
14410
14414
|
case "optional": return schema.optional();
|
|
14411
|
-
default: return assertNever$
|
|
14415
|
+
default: return assertNever$16(presence);
|
|
14412
14416
|
}
|
|
14413
14417
|
}
|
|
14414
14418
|
function addFieldIssueToZodContext(zodCtx, validationIssue, rootPath) {
|
|
@@ -14478,7 +14482,7 @@ function addFieldIssueToZodContext(zodCtx, validationIssue, rootPath) {
|
|
|
14478
14482
|
message
|
|
14479
14483
|
});
|
|
14480
14484
|
return;
|
|
14481
|
-
default: assertNever$
|
|
14485
|
+
default: assertNever$16(validationIssue);
|
|
14482
14486
|
}
|
|
14483
14487
|
}
|
|
14484
14488
|
function relativeZodIssuePath(path, rootPath) {
|
|
@@ -14509,7 +14513,7 @@ function findNestedFieldValidationPlan(plan, path) {
|
|
|
14509
14513
|
case "link":
|
|
14510
14514
|
case "select":
|
|
14511
14515
|
case "passthrough": return null;
|
|
14512
|
-
default: return assertNever$
|
|
14516
|
+
default: return assertNever$16(plan);
|
|
14513
14517
|
}
|
|
14514
14518
|
}
|
|
14515
14519
|
function sameFieldPath(left, right) {
|
|
@@ -14550,7 +14554,7 @@ function validateExplicitNullForPushPlan(plan, value, ctx) {
|
|
|
14550
14554
|
case "link":
|
|
14551
14555
|
case "select":
|
|
14552
14556
|
case "passthrough": return [];
|
|
14553
|
-
default: return assertNever$
|
|
14557
|
+
default: return assertNever$16(plan);
|
|
14554
14558
|
}
|
|
14555
14559
|
}
|
|
14556
14560
|
function validateExplicitNullsForPushRepeater(plan, value, ctx) {
|
|
@@ -14742,7 +14746,7 @@ function resolveVariantKey(manifest, content) {
|
|
|
14742
14746
|
//#endregion
|
|
14743
14747
|
//#region ../blocks/src/system/manifest/index.ts
|
|
14744
14748
|
init_augmentManifest();
|
|
14745
|
-
init_schema$
|
|
14749
|
+
init_schema$2();
|
|
14746
14750
|
//#endregion
|
|
14747
14751
|
//#region ../theme-core/src/palette/utils/colorConversion.ts
|
|
14748
14752
|
function hexToRgb$1(hex) {
|
|
@@ -15007,7 +15011,7 @@ function asDesignSystemTemplateId(value) {
|
|
|
15007
15011
|
function makeBoundaryId(previousBlockId, nextBlockId) {
|
|
15008
15012
|
return asDesignBoundaryId(`boundary:${encodeURIComponent(previousBlockId)}:${encodeURIComponent(nextBlockId)}`);
|
|
15009
15013
|
}
|
|
15010
|
-
function assertNever$
|
|
15014
|
+
function assertNever$15(value, message = "Unhandled Theme V2 variant") {
|
|
15011
15015
|
throw new Error(`${message}: ${String(value)}`);
|
|
15012
15016
|
}
|
|
15013
15017
|
function brandNonEmptyString(value, label) {
|
|
@@ -17578,6 +17582,12 @@ function requirePaletteColorsFromEntries(entries) {
|
|
|
17578
17582
|
if (result.ok) return result.colors;
|
|
17579
17583
|
throw new Error(`Invalid complete palette: ${result.error.kind}`);
|
|
17580
17584
|
}
|
|
17585
|
+
function paletteColorEntries(colors) {
|
|
17586
|
+
return THEME_PALETTE_COLOR_ORDER.map((name) => ({
|
|
17587
|
+
name,
|
|
17588
|
+
hex: colors[name]
|
|
17589
|
+
}));
|
|
17590
|
+
}
|
|
17581
17591
|
function paletteColorFingerprint(colors) {
|
|
17582
17592
|
return PALETTE_TOKEN_NAMES.map((name) => `${name}:${colors[name]}`).join("|");
|
|
17583
17593
|
}
|
|
@@ -17610,11 +17620,26 @@ function parsePaletteValueKey(value) {
|
|
|
17610
17620
|
if (!colors.ok || paletteValueKey(colors.colors, mode.data) !== value) return null;
|
|
17611
17621
|
return value;
|
|
17612
17622
|
}
|
|
17613
|
-
var HEX_COLOR_REGEX, NORMALIZABLE_HEX_REGEX, hexColorSchema, paletteModeSchema, PALETTE_VALUE_KEY_PREFIX, paletteColorsSchema, paletteValueKeySchema;
|
|
17623
|
+
var HEX_COLOR_REGEX, NORMALIZABLE_HEX_REGEX, THEME_PALETTE_COLOR_ORDER, hexColorSchema, paletteModeSchema, PALETTE_VALUE_KEY_PREFIX, paletteColorsSchema, paletteValueKeySchema;
|
|
17614
17624
|
var init_colors = __esmMin((() => {
|
|
17615
17625
|
init_themeColorTokens();
|
|
17616
17626
|
HEX_COLOR_REGEX = /^#[0-9a-f]{6}$/;
|
|
17617
17627
|
NORMALIZABLE_HEX_REGEX = /^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i;
|
|
17628
|
+
THEME_PALETTE_COLOR_ORDER = [
|
|
17629
|
+
"primary",
|
|
17630
|
+
"secondary",
|
|
17631
|
+
"accent",
|
|
17632
|
+
"success",
|
|
17633
|
+
"warning",
|
|
17634
|
+
"destructive",
|
|
17635
|
+
"background",
|
|
17636
|
+
"surface",
|
|
17637
|
+
"surfaceAlt",
|
|
17638
|
+
"muted",
|
|
17639
|
+
"text",
|
|
17640
|
+
"primaryForeground",
|
|
17641
|
+
"border"
|
|
17642
|
+
];
|
|
17618
17643
|
hexColorSchema = z$1.string().regex(HEX_COLOR_REGEX, "Hex must be #RRGGBB (lowercase)").transform((value) => value);
|
|
17619
17644
|
paletteModeSchema = z$1.enum(["light", "dark"]);
|
|
17620
17645
|
PALETTE_VALUE_KEY_PREFIX = "palette-value:v1|";
|
|
@@ -17644,8 +17669,18 @@ var init_colors = __esmMin((() => {
|
|
|
17644
17669
|
return z$1.NEVER;
|
|
17645
17670
|
});
|
|
17646
17671
|
}));
|
|
17647
|
-
|
|
17648
|
-
|
|
17672
|
+
function concretePaletteToTheme(palette) {
|
|
17673
|
+
return {
|
|
17674
|
+
colors: paletteColorEntries(palette.colors),
|
|
17675
|
+
meta: { mode: palette.mode }
|
|
17676
|
+
};
|
|
17677
|
+
}
|
|
17678
|
+
var init_concretePalette = __esmMin((() => {
|
|
17679
|
+
init_colors();
|
|
17680
|
+
}));
|
|
17681
|
+
var init_fromVibrant = __esmMin((() => {
|
|
17682
|
+
init_utils$6();
|
|
17683
|
+
}));
|
|
17649
17684
|
//#endregion
|
|
17650
17685
|
//#region ../theme-core/src/site-styles/styleTags.ts
|
|
17651
17686
|
var STYLE_AXIS_VALUES, styleTagsSchema;
|
|
@@ -18935,13 +18970,6 @@ var init_warm_dark = __esmMin((() => {
|
|
|
18935
18970
|
}));
|
|
18936
18971
|
//#endregion
|
|
18937
18972
|
//#region ../theme-core/src/palette/curated/index.ts
|
|
18938
|
-
/**
|
|
18939
|
-
* Curated palette library.
|
|
18940
|
-
*
|
|
18941
|
-
* Authoring keys are readable source aliases. Value keys are derived from the
|
|
18942
|
-
* complete mode and semantic colours and are the only curated identity used at
|
|
18943
|
-
* persistence and runtime boundaries.
|
|
18944
|
-
*/
|
|
18945
18973
|
function admitCuratedPaletteDefinition(definition) {
|
|
18946
18974
|
return {
|
|
18947
18975
|
...definition,
|
|
@@ -18959,9 +18987,8 @@ function requireCuratedPaletteValueKey(authoringKey) {
|
|
|
18959
18987
|
if (!palette) throw new Error(`Unknown curated palette authoring key "${authoringKey}"`);
|
|
18960
18988
|
return palette.valueKey;
|
|
18961
18989
|
}
|
|
18962
|
-
var curatedPalettes, curatedPalettesByValueKey, curatedPalettesByAuthoringKey
|
|
18990
|
+
var curatedPalettes, curatedPalettesByValueKey, curatedPalettesByAuthoringKey;
|
|
18963
18991
|
var init_curated = __esmMin((() => {
|
|
18964
|
-
init_colors();
|
|
18965
18992
|
init_brand_led();
|
|
18966
18993
|
init_high_contrast();
|
|
18967
18994
|
init_soft_natural();
|
|
@@ -18990,105 +19017,6 @@ var init_curated = __esmMin((() => {
|
|
|
18990
19017
|
];
|
|
18991
19018
|
curatedPalettesByValueKey = new Map(curatedPalettes.map((palette) => [palette.valueKey, palette]));
|
|
18992
19019
|
curatedPalettesByAuthoringKey = new Map(curatedPalettes.map((palette) => [palette.authoringKey, palette]));
|
|
18993
|
-
knownCuratedPaletteValueKeySchema = z$1.string().transform((value, ctx) => {
|
|
18994
|
-
const valueKey = parsePaletteValueKey(value);
|
|
18995
|
-
if (!valueKey) {
|
|
18996
|
-
ctx.addIssue({
|
|
18997
|
-
code: "custom",
|
|
18998
|
-
message: "Invalid canonical palette value key"
|
|
18999
|
-
});
|
|
19000
|
-
return z$1.NEVER;
|
|
19001
|
-
}
|
|
19002
|
-
const palette = findCuratedPalette(valueKey);
|
|
19003
|
-
if (!palette) {
|
|
19004
|
-
ctx.addIssue({
|
|
19005
|
-
code: "custom",
|
|
19006
|
-
message: "Unknown curated palette value key"
|
|
19007
|
-
});
|
|
19008
|
-
return z$1.NEVER;
|
|
19009
|
-
}
|
|
19010
|
-
return palette.valueKey;
|
|
19011
|
-
});
|
|
19012
|
-
}));
|
|
19013
|
-
var init_resolveSelection = __esmMin((() => {
|
|
19014
|
-
init_curated();
|
|
19015
|
-
})), sitePaletteIdSchema, sitePaletteVersionSchema, paletteSelectionSchema, onboardingPaletteOriginSchema, curatedForkPaletteOriginSchema, manualPaletteOriginSchema, legacyCustomizedPaletteOriginSchema, sitePaletteOriginSchema, editorSitePaletteOriginSchema, paletteCommandSchema;
|
|
19016
|
-
var init_selection$1 = __esmMin((() => {
|
|
19017
|
-
init_colors();
|
|
19018
|
-
init_curated();
|
|
19019
|
-
sitePaletteIdSchema = z$1.string().uuid().transform((value) => value);
|
|
19020
|
-
sitePaletteVersionSchema = z$1.number().int().nonnegative().transform((value) => value);
|
|
19021
|
-
paletteSelectionSchema = z$1.discriminatedUnion("kind", [z$1.object({
|
|
19022
|
-
kind: z$1.literal("curated"),
|
|
19023
|
-
valueKey: knownCuratedPaletteValueKeySchema
|
|
19024
|
-
}), z$1.object({
|
|
19025
|
-
kind: z$1.literal("site"),
|
|
19026
|
-
paletteId: sitePaletteIdSchema
|
|
19027
|
-
})]);
|
|
19028
|
-
onboardingPaletteOriginSchema = z$1.object({
|
|
19029
|
-
kind: z$1.literal("onboarding"),
|
|
19030
|
-
sourceKey: z$1.string().min(1).nullable()
|
|
19031
|
-
});
|
|
19032
|
-
curatedForkPaletteOriginSchema = z$1.object({
|
|
19033
|
-
kind: z$1.literal("curated-fork"),
|
|
19034
|
-
sourceValueKey: paletteValueKeySchema
|
|
19035
|
-
});
|
|
19036
|
-
manualPaletteOriginSchema = z$1.object({ kind: z$1.literal("manual") });
|
|
19037
|
-
legacyCustomizedPaletteOriginSchema = z$1.object({
|
|
19038
|
-
kind: z$1.literal("legacy-customized"),
|
|
19039
|
-
sourceKey: z$1.string().min(1).nullable()
|
|
19040
|
-
});
|
|
19041
|
-
sitePaletteOriginSchema = z$1.discriminatedUnion("kind", [
|
|
19042
|
-
onboardingPaletteOriginSchema,
|
|
19043
|
-
curatedForkPaletteOriginSchema,
|
|
19044
|
-
manualPaletteOriginSchema,
|
|
19045
|
-
legacyCustomizedPaletteOriginSchema
|
|
19046
|
-
]);
|
|
19047
|
-
editorSitePaletteOriginSchema = z$1.discriminatedUnion("kind", [z$1.object({
|
|
19048
|
-
kind: z$1.literal("curated-fork"),
|
|
19049
|
-
sourceValueKey: knownCuratedPaletteValueKeySchema
|
|
19050
|
-
}), manualPaletteOriginSchema]);
|
|
19051
|
-
z$1.object({
|
|
19052
|
-
id: sitePaletteIdSchema,
|
|
19053
|
-
colors: paletteColorsSchema,
|
|
19054
|
-
mode: paletteModeSchema,
|
|
19055
|
-
origin: sitePaletteOriginSchema,
|
|
19056
|
-
version: sitePaletteVersionSchema
|
|
19057
|
-
});
|
|
19058
|
-
paletteCommandSchema = z$1.discriminatedUnion("kind", [
|
|
19059
|
-
z$1.object({ kind: z$1.literal("preserve") }),
|
|
19060
|
-
z$1.object({
|
|
19061
|
-
kind: z$1.literal("select"),
|
|
19062
|
-
selection: paletteSelectionSchema
|
|
19063
|
-
}),
|
|
19064
|
-
z$1.object({
|
|
19065
|
-
kind: z$1.literal("create-site"),
|
|
19066
|
-
colors: paletteColorsSchema,
|
|
19067
|
-
mode: paletteModeSchema,
|
|
19068
|
-
origin: editorSitePaletteOriginSchema
|
|
19069
|
-
}),
|
|
19070
|
-
z$1.object({
|
|
19071
|
-
kind: z$1.literal("update-site"),
|
|
19072
|
-
paletteId: sitePaletteIdSchema,
|
|
19073
|
-
expectedVersion: sitePaletteVersionSchema,
|
|
19074
|
-
colors: paletteColorsSchema,
|
|
19075
|
-
mode: paletteModeSchema
|
|
19076
|
-
})
|
|
19077
|
-
]);
|
|
19078
|
-
}));
|
|
19079
|
-
var init_persistenceReadSource = __esmMin((() => {
|
|
19080
|
-
init_curated();
|
|
19081
|
-
init_colors();
|
|
19082
|
-
init_resolveSelection();
|
|
19083
|
-
init_selection$1();
|
|
19084
|
-
}));
|
|
19085
|
-
var init_sitePalettePersistence = __esmMin((() => {
|
|
19086
|
-
init_curated();
|
|
19087
|
-
init_colors();
|
|
19088
|
-
init_selection$1();
|
|
19089
|
-
}));
|
|
19090
|
-
var init_fromVibrant = __esmMin((() => {
|
|
19091
|
-
init_utils$6();
|
|
19092
19020
|
}));
|
|
19093
19021
|
//#endregion
|
|
19094
19022
|
//#region ../theme-core/src/palette/index.ts
|
|
@@ -19104,12 +19032,7 @@ var init_palette = __esmMin((() => {
|
|
|
19104
19032
|
init_paletteAccess();
|
|
19105
19033
|
init_extractPalette();
|
|
19106
19034
|
init_colors();
|
|
19107
|
-
|
|
19108
|
-
init_libraryModel();
|
|
19109
|
-
init_persistenceReadSource();
|
|
19110
|
-
init_resolveSelection();
|
|
19111
|
-
init_selection$1();
|
|
19112
|
-
init_sitePalettePersistence();
|
|
19035
|
+
init_concretePalette();
|
|
19113
19036
|
init_fromVibrant();
|
|
19114
19037
|
init_suggestRecipes();
|
|
19115
19038
|
init_allRecipes();
|
|
@@ -19446,7 +19369,7 @@ function applyNavTypography(style, typography) {
|
|
|
19446
19369
|
textSize: "sm",
|
|
19447
19370
|
letterSpacing: "wider"
|
|
19448
19371
|
};
|
|
19449
|
-
default: return assertNever$
|
|
19372
|
+
default: return assertNever$15(typography, "Unhandled header nav typography");
|
|
19450
19373
|
}
|
|
19451
19374
|
}
|
|
19452
19375
|
function underlineNavLinkStyle(colorToken, underlineColorToken, typography = "plain") {
|
|
@@ -19475,7 +19398,7 @@ function themedHeaderShadow(theme) {
|
|
|
19475
19398
|
case "low": return { elevation: "sm" };
|
|
19476
19399
|
case "medium": return { elevation: "md" };
|
|
19477
19400
|
case "high": return { elevation: "lg" };
|
|
19478
|
-
default: return assertNever$
|
|
19401
|
+
default: return assertNever$15(theme.shadow.elevation, "Unhandled theme shadow elevation");
|
|
19479
19402
|
}
|
|
19480
19403
|
}
|
|
19481
19404
|
function solidBrandHeader(theme) {
|
|
@@ -23820,6 +23743,38 @@ var init_media$2 = __esmMin((() => {
|
|
|
23820
23743
|
transform: transformSchema$1.optional()
|
|
23821
23744
|
});
|
|
23822
23745
|
}));
|
|
23746
|
+
//#endregion
|
|
23747
|
+
//#region ../theme-core/src/palette/schema.ts
|
|
23748
|
+
var colourHexString, paletteColorSchema, paletteMetaSchema, paletteSchema;
|
|
23749
|
+
var init_schema$1 = __esmMin((() => {
|
|
23750
|
+
init_colors();
|
|
23751
|
+
colourHexString = z$1.string().regex(/^#([0-9A-Fa-f]{3}){1,2}$/);
|
|
23752
|
+
paletteColorSchema = z$1.object({
|
|
23753
|
+
name: z$1.string().min(1),
|
|
23754
|
+
hex: colourHexString
|
|
23755
|
+
});
|
|
23756
|
+
paletteMetaSchema = z$1.object({ mode: z$1.enum(["light", "dark"]) });
|
|
23757
|
+
paletteSchema = z$1.object({
|
|
23758
|
+
colors: z$1.array(paletteColorSchema),
|
|
23759
|
+
meta: paletteMetaSchema
|
|
23760
|
+
}).transform((palette, ctx) => {
|
|
23761
|
+
const colors = paletteColorsFromEntries(palette.colors);
|
|
23762
|
+
if (!colors.ok) {
|
|
23763
|
+
ctx.addIssue({
|
|
23764
|
+
code: "custom",
|
|
23765
|
+
message: `Invalid complete palette: ${colors.error.kind}`
|
|
23766
|
+
});
|
|
23767
|
+
return z$1.NEVER;
|
|
23768
|
+
}
|
|
23769
|
+
return {
|
|
23770
|
+
colors: paletteColorEntries(colors.colors).map(({ name, hex }) => ({
|
|
23771
|
+
name: String(name),
|
|
23772
|
+
hex: String(hex)
|
|
23773
|
+
})),
|
|
23774
|
+
meta: palette.meta
|
|
23775
|
+
};
|
|
23776
|
+
});
|
|
23777
|
+
}));
|
|
23823
23778
|
var init_foregroundRoles = __esmMin((() => {}));
|
|
23824
23779
|
//#endregion
|
|
23825
23780
|
//#region ../theme-core/src/surfaces/foregroundContract.ts
|
|
@@ -26681,9 +26636,10 @@ function normaliseHeaderNavFontRole(header) {
|
|
|
26681
26636
|
navFontRole: navTypography
|
|
26682
26637
|
} : rest;
|
|
26683
26638
|
}
|
|
26684
|
-
var axesSchema,
|
|
26639
|
+
var axesSchema, typographyStyleSchema, bodyTypographyStyleSchema, headingSizeSchema, headingTypographyOverridesSchema, headingTypographyStyleSchema, proseLinkUnderlineStyleSchema, proseLinkUnderlineThicknessSchema, proseLinkUnderlineOffsetSchema, proseLinkStyleSchema, semanticSpacingSchema, boxRoundedSchema, boxBackgroundOverlaySchema, boxBackgroundSchema, noHeadingDecorationSchema, visibleHeadingDecorationSchema, headingDecorationSchema, headingDecorationOverrideSchema, accordionIconTreatmentSchema, sectionStylesOverrideSchema, containerStylesOverrideSchema, cardBorderOverrideSchema, cardStylesOverrideSchema, blockStyleOverridesSchema, blockThemeOverrideSchema, typographyScaleSchema, eyebrowTypographyStyleSchema, typographySchema, spaceSchema, corners, shadow, border, motion, inputStyle, headerVariant, headerPositioning, headerNavStyle, navFontWeight, headerMaxWidth, headerBarFrame, headerContainerSchema, headerBorderSchema, logoStyleSchema, headerLogoTextSchema, navEffectsSchema, dropdownStyleSchema, headerCtaGapSchema, headerCtaTreatmentSchema, navContainerSchema, headerBackgroundSchema, headerSchema, footerVariant, footerMaxWidth, footerMode, footerNavLayoutMode, footerNavLayoutAlign, footerSpacing, footerLogoPlacement, footerLogoSize, footerLogoMaxHeight, footerBottomTextLinkStyleSchema, footerBottomBarSchema, footerNavLayoutSchema, footerLogoSchema, footerSchema, containerPaddingPresetSchema, layoutSchema, heroTypographySizeSchema, heroTypographyLineHeightSchema, heroResponsiveTypographySchema, heroTypographySchema, heroSchema, bodyTextIntroTypographySizeSchema, bodyTextSchema, gradientsSchema, testimonialQuoteTreatmentSchema, themeSchema;
|
|
26685
26640
|
var init_schema = __esmMin((() => {
|
|
26686
26641
|
init_media$2();
|
|
26642
|
+
init_schema$1();
|
|
26687
26643
|
init_buttons();
|
|
26688
26644
|
init_cards();
|
|
26689
26645
|
init_types$9();
|
|
@@ -26726,16 +26682,6 @@ var init_schema = __esmMin((() => {
|
|
|
26726
26682
|
"expressive"
|
|
26727
26683
|
])
|
|
26728
26684
|
});
|
|
26729
|
-
colourHexString = z$1.string().regex(/^#([0-9A-Fa-f]{3}){1,2}$/);
|
|
26730
|
-
paletteColorSchema = z$1.object({
|
|
26731
|
-
name: z$1.string().min(1),
|
|
26732
|
-
hex: colourHexString
|
|
26733
|
-
});
|
|
26734
|
-
paletteMetaSchema = z$1.object({ mode: z$1.enum(["light", "dark"]) });
|
|
26735
|
-
paletteSchema = z$1.object({
|
|
26736
|
-
colors: z$1.array(paletteColorSchema),
|
|
26737
|
-
meta: paletteMetaSchema
|
|
26738
|
-
});
|
|
26739
26685
|
typographyStyleSchema = z$1.object({
|
|
26740
26686
|
family: z$1.string().min(1),
|
|
26741
26687
|
weight: z$1.enum([
|
|
@@ -27728,7 +27674,6 @@ var init_runtimeCompiler = __esmMin((() => {
|
|
|
27728
27674
|
init_modern_minimal();
|
|
27729
27675
|
init_expandPalette();
|
|
27730
27676
|
init_styles();
|
|
27731
|
-
init_colors();
|
|
27732
27677
|
init_designState();
|
|
27733
27678
|
init_types$15();
|
|
27734
27679
|
init_accessibleSurfaces();
|
|
@@ -29604,7 +29549,7 @@ var init_siteStyleThemeCompiler = __esmMin((() => {
|
|
|
29604
29549
|
init_curatedSiteStyles();
|
|
29605
29550
|
init_runtimeCompiler();
|
|
29606
29551
|
init_curated();
|
|
29607
|
-
|
|
29552
|
+
init_concretePalette();
|
|
29608
29553
|
}));
|
|
29609
29554
|
var init_previewCustomization = __esmMin((() => {
|
|
29610
29555
|
init_types$15();
|
|
@@ -29614,7 +29559,7 @@ var init_previewCompiler = __esmMin((() => {
|
|
|
29614
29559
|
init_onColor();
|
|
29615
29560
|
init_tokens();
|
|
29616
29561
|
init_curated();
|
|
29617
|
-
|
|
29562
|
+
init_concretePalette();
|
|
29618
29563
|
init_curatedSiteStyles();
|
|
29619
29564
|
init_resolver();
|
|
29620
29565
|
init_types$15();
|
|
@@ -30976,7 +30921,7 @@ function devValidate(node) {
|
|
|
30976
30921
|
}
|
|
30977
30922
|
var section$1, headerSection, stack, inline, accordion, accordionItem, carousel, text, richText, icon, media, fileDownload, videoEmbed, spinner, button, link, form, bookingForm, eventRegistration, shop, productList, productDetail, cart, checkout$1, gifting, courseRegistration;
|
|
30978
30923
|
var init_builder$1 = __esmMin((() => {
|
|
30979
|
-
init_schema$
|
|
30924
|
+
init_schema$3();
|
|
30980
30925
|
init_types$6();
|
|
30981
30926
|
init_env();
|
|
30982
30927
|
section$1 = (props, children, ...mods) => el("section", props, children, ...mods);
|
|
@@ -32614,7 +32559,7 @@ function scopeContentPath(path, scope) {
|
|
|
32614
32559
|
}
|
|
32615
32560
|
var FRAGMENT_ID_PATTERN, FIELD_ID_PATTERN, dataLoaderSchema, fragmentDataSchema, fragmentConfigSchema, FragmentConfigError;
|
|
32616
32561
|
var init_types$5 = __esmMin((() => {
|
|
32617
|
-
init_schema$
|
|
32562
|
+
init_schema$2();
|
|
32618
32563
|
init_node();
|
|
32619
32564
|
FRAGMENT_ID_PATTERN = /^[a-z0-9](?:[a-z0-9._-]*[a-z0-9])?$/i;
|
|
32620
32565
|
FIELD_ID_PATTERN = /^[a-z][a-zA-Z0-9_-]*$/;
|
|
@@ -35548,7 +35493,7 @@ function deriveComponentName(id) {
|
|
|
35548
35493
|
return `${id.replace(/^block\./, "").replace(/-/g, ".").replace(/([a-z])([A-Z])/g, "$1.$2").toLowerCase()}.default`;
|
|
35549
35494
|
}
|
|
35550
35495
|
var init_defineBlock = __esmMin((() => {
|
|
35551
|
-
init_schema$
|
|
35496
|
+
init_schema$2();
|
|
35552
35497
|
init_fragments();
|
|
35553
35498
|
init_augmentManifest();
|
|
35554
35499
|
}));
|
|
@@ -36244,7 +36189,7 @@ const blogPostBlockDefinition = {
|
|
|
36244
36189
|
//#region ../blocks/src/system/blocks/blog-listing.ts
|
|
36245
36190
|
init_defineBlock();
|
|
36246
36191
|
init_boxStyles$1();
|
|
36247
|
-
init_schema$
|
|
36192
|
+
init_schema$2();
|
|
36248
36193
|
init_builder$1();
|
|
36249
36194
|
init_fragments$1();
|
|
36250
36195
|
init_colorStyles();
|
|
@@ -37993,7 +37938,7 @@ function planSiteChromePlacement(positioning) {
|
|
|
37993
37938
|
headerRootClassName: "rb-fixed rb-top-0 rb-left-0 rb-right-0",
|
|
37994
37939
|
standaloneShellClassName: "fixed left-0 right-0 top-0 z-40 w-full"
|
|
37995
37940
|
};
|
|
37996
|
-
default: return assertNever$
|
|
37941
|
+
default: return assertNever$15(positioning);
|
|
37997
37942
|
}
|
|
37998
37943
|
}
|
|
37999
37944
|
function splitSiteChromePlacementClasses(className) {
|
|
@@ -39216,7 +39161,7 @@ const siteFooterBlockDefinition = { manifest: createBlockManifest({
|
|
|
39216
39161
|
}) };
|
|
39217
39162
|
//#endregion
|
|
39218
39163
|
//#region ../blocks/src/system/blocks/testimonials.tsx
|
|
39219
|
-
init_schema$
|
|
39164
|
+
init_schema$2();
|
|
39220
39165
|
init_fragments$1();
|
|
39221
39166
|
init_styledSection();
|
|
39222
39167
|
init_boxStyles$1();
|
|
@@ -39427,7 +39372,7 @@ const testimonialsBlockDefinition = {
|
|
|
39427
39372
|
//#endregion
|
|
39428
39373
|
//#region ../blocks/src/system/blocks/columns.ts
|
|
39429
39374
|
init_fragments();
|
|
39430
|
-
init_schema$
|
|
39375
|
+
init_schema$2();
|
|
39431
39376
|
init_defineBlock();
|
|
39432
39377
|
init_node();
|
|
39433
39378
|
init_builder$1();
|
|
@@ -39685,7 +39630,7 @@ function repeaterFragmentLayout(args) {
|
|
|
39685
39630
|
//#endregion
|
|
39686
39631
|
//#region ../blocks/src/system/blocks/collection.ts
|
|
39687
39632
|
init_fragments();
|
|
39688
|
-
init_schema$
|
|
39633
|
+
init_schema$2();
|
|
39689
39634
|
init_defineBlock();
|
|
39690
39635
|
init_builder$1();
|
|
39691
39636
|
init_fragments$1();
|
|
@@ -43397,6 +43342,10 @@ var init_event_details = __esmMin((() => {
|
|
|
43397
43342
|
from: "$root.occurrenceContext",
|
|
43398
43343
|
fallback: null
|
|
43399
43344
|
} },
|
|
43345
|
+
subject: { $bind: {
|
|
43346
|
+
from: "$root.subject",
|
|
43347
|
+
fallback: null
|
|
43348
|
+
} },
|
|
43400
43349
|
events: { $bind: { from: "data.eventDetailsData.events" } },
|
|
43401
43350
|
showVenue: { $bind: { from: "content.showVenue" } },
|
|
43402
43351
|
showMap: { $bind: { from: "content.showMap" } },
|
|
@@ -47081,7 +47030,7 @@ var init_EventCalendar_interactive = __esmMin((() => {
|
|
|
47081
47030
|
}));
|
|
47082
47031
|
//#endregion
|
|
47083
47032
|
//#region ../blocks/src/system/blocks/events/event-calendar.ts
|
|
47084
|
-
init_schema$
|
|
47033
|
+
init_schema$2();
|
|
47085
47034
|
init_builder$1();
|
|
47086
47035
|
init_styledSection();
|
|
47087
47036
|
init_fragments$1();
|
|
@@ -48514,10 +48463,10 @@ function preferredPathsForSource(source) {
|
|
|
48514
48463
|
case "workshop": return ["/workshops", "/workshop"];
|
|
48515
48464
|
case "retreat": return ["/retreats", "/retreat"];
|
|
48516
48465
|
case "performance": return ["/performances", "/performance"];
|
|
48517
|
-
default: return assertNever$
|
|
48466
|
+
default: return assertNever$24(source.preset, "Unhandled offerings preview event preset");
|
|
48518
48467
|
}
|
|
48519
48468
|
case "course": return ["/courses", "/course"];
|
|
48520
|
-
default: return assertNever$
|
|
48469
|
+
default: return assertNever$24(source, "Unhandled offerings preview source");
|
|
48521
48470
|
}
|
|
48522
48471
|
}
|
|
48523
48472
|
function normalizeRoutePath(value) {
|
|
@@ -48944,7 +48893,7 @@ function isRecord$36(value) {
|
|
|
48944
48893
|
}
|
|
48945
48894
|
//#endregion
|
|
48946
48895
|
//#region ../blocks/src/system/blocks/embed.ts
|
|
48947
|
-
init_schema$
|
|
48896
|
+
init_schema$2();
|
|
48948
48897
|
init_builder$1();
|
|
48949
48898
|
init_fragments$1();
|
|
48950
48899
|
init_defineBlock();
|
|
@@ -49215,7 +49164,7 @@ const embedBlockDefinition = {
|
|
|
49215
49164
|
};
|
|
49216
49165
|
//#endregion
|
|
49217
49166
|
//#region ../blocks/src/system/blocks/image-gallery.ts
|
|
49218
|
-
init_schema$
|
|
49167
|
+
init_schema$2();
|
|
49219
49168
|
init_builder$1();
|
|
49220
49169
|
init_colorStyles();
|
|
49221
49170
|
init_defineBlock();
|
|
@@ -50008,7 +49957,7 @@ const imageGalleryBlockDefinition = { manifest: createBlockManifest({
|
|
|
50008
49957
|
}) };
|
|
50009
49958
|
//#endregion
|
|
50010
49959
|
//#region ../blocks/src/system/blocks/video-grid.ts
|
|
50011
|
-
init_schema$
|
|
49960
|
+
init_schema$2();
|
|
50012
49961
|
init_builder$1();
|
|
50013
49962
|
init_fragments$1();
|
|
50014
49963
|
init_colorStyles();
|
|
@@ -52865,7 +52814,7 @@ const newsletterSignupBlockDefinition = {
|
|
|
52865
52814
|
//#endregion
|
|
52866
52815
|
//#region ../blocks/src/system/blocks/team-members.ts
|
|
52867
52816
|
init_fragments();
|
|
52868
|
-
init_schema$
|
|
52817
|
+
init_schema$2();
|
|
52869
52818
|
init_defineBlock();
|
|
52870
52819
|
init_builder$1();
|
|
52871
52820
|
init_fragments$1();
|
|
@@ -53408,7 +53357,7 @@ var init_location_map_shared = __esmMin((() => {
|
|
|
53408
53357
|
}));
|
|
53409
53358
|
//#endregion
|
|
53410
53359
|
//#region ../blocks/src/system/blocks/location-map.ts
|
|
53411
|
-
init_schema$
|
|
53360
|
+
init_schema$2();
|
|
53412
53361
|
init_builder$1();
|
|
53413
53362
|
init_fragments$1();
|
|
53414
53363
|
init_defineBlock();
|
|
@@ -57561,7 +57510,10 @@ function uniqByOccurrenceId(events) {
|
|
|
57561
57510
|
return out;
|
|
57562
57511
|
}
|
|
57563
57512
|
function selectEventDetails(args) {
|
|
57564
|
-
const all = uniqByOccurrenceId((args.events ?? []).filter(Boolean)
|
|
57513
|
+
const all = uniqByOccurrenceId(resolveEventRegistrationScopedEvents((args.events ?? []).filter(Boolean), {
|
|
57514
|
+
occurrenceContext: args.occurrenceContext,
|
|
57515
|
+
subject: args.subject
|
|
57516
|
+
}));
|
|
57565
57517
|
const occurrenceContext = args.occurrenceContext ?? null;
|
|
57566
57518
|
const otherLimit = parseLimit$1(args.otherDatesLimit, 5);
|
|
57567
57519
|
const selectedFromContext = (() => {
|
|
@@ -57600,6 +57552,7 @@ function selectEventDetails(args) {
|
|
|
57600
57552
|
}
|
|
57601
57553
|
var init_logic = __esmMin((() => {
|
|
57602
57554
|
init_src$3();
|
|
57555
|
+
init_eventScope();
|
|
57603
57556
|
init_eventProductEligibility();
|
|
57604
57557
|
}));
|
|
57605
57558
|
//#endregion
|
|
@@ -57844,11 +57797,14 @@ var init_view$1 = __esmMin((() => {
|
|
|
57844
57797
|
//#region ../blocks/src/system/runtime/nodes/event-details.server.tsx
|
|
57845
57798
|
init_logic();
|
|
57846
57799
|
init_view$1();
|
|
57847
|
-
|
|
57800
|
+
init_eventScope();
|
|
57801
|
+
function EventDetailsSSR({ blockId, occurrenceContext, subject, events, showVenue = true, showMap = true, showOtherDates = true, otherDatesLimit, showCost = true, showAcceptedPasses = true, showAcceptedMemberships = true, sitePasses, siteMemberships, autoApplyDiscount, className, children }) {
|
|
57848
57802
|
const nowIso = (/* @__PURE__ */ new Date()).toISOString();
|
|
57803
|
+
const normalizedSubject = normalizeEventRegistrationPageSurfaceSubject(subject);
|
|
57849
57804
|
const selection = selectEventDetails({
|
|
57850
57805
|
events: events ?? null,
|
|
57851
57806
|
occurrenceContext: occurrenceContext ?? null,
|
|
57807
|
+
subject: normalizedSubject,
|
|
57852
57808
|
nowIso,
|
|
57853
57809
|
otherDatesLimit
|
|
57854
57810
|
});
|
|
@@ -57863,6 +57819,7 @@ function EventDetailsSSR({ blockId, occurrenceContext, events, showVenue = true,
|
|
|
57863
57819
|
children: [
|
|
57864
57820
|
/* @__PURE__ */ jsx(IslandPropsScript, { value: {
|
|
57865
57821
|
occurrenceContext,
|
|
57822
|
+
subject: normalizedSubject,
|
|
57866
57823
|
events,
|
|
57867
57824
|
showVenue,
|
|
57868
57825
|
showMap,
|
|
@@ -58017,7 +57974,7 @@ function eventSeriesIdsForSubject(subject) {
|
|
|
58017
57974
|
switch (subject.kind) {
|
|
58018
57975
|
case "eventSeries": return [subject.eventSeriesId];
|
|
58019
57976
|
case "eventOffering": return subject.availableEventSeriesIds;
|
|
58020
|
-
default: return assertNever$
|
|
57977
|
+
default: return assertNever$24(subject);
|
|
58021
57978
|
}
|
|
58022
57979
|
}
|
|
58023
57980
|
var init_course_page_surface_scope = __esmMin((() => {
|
|
@@ -58777,7 +58734,7 @@ function renderOfferingGroupItems(presentation, items, options) {
|
|
|
58777
58734
|
children: items.map((item) => renderOfferingCompactItem(item, options))
|
|
58778
58735
|
})
|
|
58779
58736
|
});
|
|
58780
|
-
default: return assertNever$
|
|
58737
|
+
default: return assertNever$24(presentation, "Unhandled offerings preview presentation");
|
|
58781
58738
|
}
|
|
58782
58739
|
}
|
|
58783
58740
|
function compareCoursesByNextSession(left, right) {
|
|
@@ -58822,7 +58779,7 @@ function featuredSummaryDetails(item) {
|
|
|
58822
58779
|
const summary = deriveCourseScheduleSummary(item.course);
|
|
58823
58780
|
return summary ? formatFeaturedSummary(summary, item.course.venue?.name ?? null) : null;
|
|
58824
58781
|
}
|
|
58825
|
-
default: return assertNever$
|
|
58782
|
+
default: return assertNever$24(item, "Unhandled offerings preview item");
|
|
58826
58783
|
}
|
|
58827
58784
|
}
|
|
58828
58785
|
function formatFeaturedSummary(summary, venue) {
|
|
@@ -58831,7 +58788,7 @@ function formatFeaturedSummary(summary, venue) {
|
|
|
58831
58788
|
case "multi-day-span": return detailsFromOccurrences(summary.occurrence, summary.occurrence, venue, null, null, true);
|
|
58832
58789
|
case "fixed-recurring-run": return detailsFromOccurrences(summary.first, summary.last, venue, summary.recurrenceLabel, null);
|
|
58833
58790
|
case "irregular-multi-session-run": return detailsFromOccurrences(summary.first, summary.last, venue, null, `${summary.sessionCount} dates`);
|
|
58834
|
-
default: return assertNever$
|
|
58791
|
+
default: return assertNever$24(summary, "Unhandled offerings preview schedule summary");
|
|
58835
58792
|
}
|
|
58836
58793
|
}
|
|
58837
58794
|
function detailsFromOccurrences(first, last, venue, recurrence, sessionCount, spanUsesEndDate = false) {
|
|
@@ -59230,7 +59187,7 @@ function bookingActionContent(input) {
|
|
|
59230
59187
|
children: input.buttonText
|
|
59231
59188
|
});
|
|
59232
59189
|
case "unavailable": return null;
|
|
59233
|
-
default: return assertNever$
|
|
59190
|
+
default: return assertNever$24(input.booking);
|
|
59234
59191
|
}
|
|
59235
59192
|
}
|
|
59236
59193
|
function RecurringSchedule({ schedule, buttonText = "Book", buttonVariant = "primary", showVenue = true, emptyMessage = "Regular schedule details will be added shortly." }) {
|
|
@@ -61450,7 +61407,7 @@ function previewEditableTargetToPath(target) {
|
|
|
61450
61407
|
case "current-entry-field":
|
|
61451
61408
|
case "current-entry-metadata": return target.path;
|
|
61452
61409
|
case "read-only": return;
|
|
61453
|
-
default: return assertNever$
|
|
61410
|
+
default: return assertNever$24(target);
|
|
61454
61411
|
}
|
|
61455
61412
|
}
|
|
61456
61413
|
function previewEditableTargetToFieldKey(target) {
|
|
@@ -62503,7 +62460,7 @@ function collectNestedPreviewFieldConstraintEntries(field, path) {
|
|
|
62503
62460
|
case "text":
|
|
62504
62461
|
case "time":
|
|
62505
62462
|
case "url": return [];
|
|
62506
|
-
default: return assertNever$
|
|
62463
|
+
default: return assertNever$24(field);
|
|
62507
62464
|
}
|
|
62508
62465
|
}
|
|
62509
62466
|
function makeDefaultBlockComponent(args) {
|
|
@@ -63653,7 +63610,7 @@ function sourceLabel(source) {
|
|
|
63653
63610
|
case "managed-database": return "DB";
|
|
63654
63611
|
case "sdk-synced": return "SDK-synced DB";
|
|
63655
63612
|
case "sdk-config": return "SDK config";
|
|
63656
|
-
default: return assertNever$
|
|
63613
|
+
default: return assertNever$24(source);
|
|
63657
63614
|
}
|
|
63658
63615
|
}
|
|
63659
63616
|
//#endregion
|
|
@@ -70690,6 +70647,47 @@ async function writeMediaManifest(contentDir, manifest) {
|
|
|
70690
70647
|
return manifestPath;
|
|
70691
70648
|
}
|
|
70692
70649
|
//#endregion
|
|
70650
|
+
//#region src/cli/content/legacyEventScheduleShapeError.ts
|
|
70651
|
+
var LegacyEventScheduleShapeError = class extends Error {
|
|
70652
|
+
constructor(filePath) {
|
|
70653
|
+
super(`${filePath}: legacy event "schedule" is no longer supported. Preserve local edits, run "riverbankcms pull events", then reapply those edits to preset, bookingScope, and occurrences.`);
|
|
70654
|
+
this.filePath = filePath;
|
|
70655
|
+
this.code = "legacy_event_schedule_shape";
|
|
70656
|
+
this.name = "LegacyEventScheduleShapeError";
|
|
70657
|
+
}
|
|
70658
|
+
};
|
|
70659
|
+
//#endregion
|
|
70660
|
+
//#region src/cli/content/localEventSchedule.ts
|
|
70661
|
+
const localEventScheduleIdentitySchema = z$1.object({
|
|
70662
|
+
preset: z$1.enum([
|
|
70663
|
+
"event",
|
|
70664
|
+
"class",
|
|
70665
|
+
"course",
|
|
70666
|
+
"workshop",
|
|
70667
|
+
"retreat",
|
|
70668
|
+
"performance"
|
|
70669
|
+
]),
|
|
70670
|
+
bookingScope: z$1.enum(["single_occurrence", "whole_series"]),
|
|
70671
|
+
occurrences: z$1.array(z$1.object({
|
|
70672
|
+
startsAt: z$1.string().datetime({ offset: true }),
|
|
70673
|
+
endsAt: z$1.string().datetime({ offset: true }),
|
|
70674
|
+
timeZone: z$1.string().min(1)
|
|
70675
|
+
}))
|
|
70676
|
+
});
|
|
70677
|
+
var InvalidLocalEventScheduleIdentityError = class extends Error {
|
|
70678
|
+
constructor(filePath, details) {
|
|
70679
|
+
super(`${filePath}: invalid event schedule identity: ${details}`);
|
|
70680
|
+
this.filePath = filePath;
|
|
70681
|
+
this.code = "invalid_local_event_schedule_identity";
|
|
70682
|
+
this.name = "InvalidLocalEventScheduleIdentityError";
|
|
70683
|
+
}
|
|
70684
|
+
};
|
|
70685
|
+
function parseLocalEventScheduleIdentity(value, filePath) {
|
|
70686
|
+
const parsed = localEventScheduleIdentitySchema.safeParse(value);
|
|
70687
|
+
if (!parsed.success) throw new InvalidLocalEventScheduleIdentityError(filePath, parsed.error.issues.map((issue) => `${issue.path.join(".")}: ${issue.message}`).join("; "));
|
|
70688
|
+
return parsed.data;
|
|
70689
|
+
}
|
|
70690
|
+
//#endregion
|
|
70693
70691
|
//#region src/cli/content/reader.ts
|
|
70694
70692
|
/**
|
|
70695
70693
|
* Content File Reader
|
|
@@ -70941,12 +70939,17 @@ async function readEventsWithFilePaths(contentDir) {
|
|
|
70941
70939
|
const events = [];
|
|
70942
70940
|
const files = await listFiles(eventsDir, ".json");
|
|
70943
70941
|
for (const filePath of files) try {
|
|
70944
|
-
const
|
|
70942
|
+
const raw = await readJsonFile(filePath);
|
|
70943
|
+
if (!raw || typeof raw !== "object" || Array.isArray(raw)) throw new InvalidLocalEventScheduleIdentityError(filePath, "expected an object");
|
|
70944
|
+
if ("schedule" in raw) throw new LegacyEventScheduleShapeError(filePath);
|
|
70945
|
+
const scheduleIdentity = parseLocalEventScheduleIdentity(raw, filePath);
|
|
70945
70946
|
events.push({
|
|
70946
|
-
...
|
|
70947
|
+
...raw,
|
|
70948
|
+
...scheduleIdentity,
|
|
70947
70949
|
filePath
|
|
70948
70950
|
});
|
|
70949
70951
|
} catch (error) {
|
|
70952
|
+
if (error instanceof LegacyEventScheduleShapeError || error instanceof InvalidLocalEventScheduleIdentityError) throw error;
|
|
70950
70953
|
console.warn(`Warning: Could not parse ${filePath}:`, error);
|
|
70951
70954
|
}
|
|
70952
70955
|
return events;
|
|
@@ -74725,7 +74728,9 @@ function mapEventToComparable(e) {
|
|
|
74725
74728
|
slug: e.slug,
|
|
74726
74729
|
status: e.status,
|
|
74727
74730
|
visibility: e.visibility,
|
|
74728
|
-
|
|
74731
|
+
preset: e.preset,
|
|
74732
|
+
bookingScope: e.bookingScope,
|
|
74733
|
+
occurrences: e.occurrences,
|
|
74729
74734
|
capacity: e.capacity,
|
|
74730
74735
|
pricing: e.pricing,
|
|
74731
74736
|
paymentTerms: e.paymentTerms,
|
|
@@ -76518,6 +76523,14 @@ function normalizeEventPaymentTermsForCompare(paymentTerms) {
|
|
|
76518
76523
|
const result = classifySdkEventPaymentTerms(paymentTerms);
|
|
76519
76524
|
if (result.ok) return result.paymentTerms;
|
|
76520
76525
|
}
|
|
76526
|
+
var IncompatibleEventPullContractError = class extends Error {
|
|
76527
|
+
constructor(identifier, cause) {
|
|
76528
|
+
super(`Remote event "${identifier}" does not expose the canonical preset, bookingScope, and occurrences contract. Deploy the matching Riverbank API before using this SDK. ${cause.message}`);
|
|
76529
|
+
this.identifier = identifier;
|
|
76530
|
+
this.code = "incompatible_event_pull_contract";
|
|
76531
|
+
this.name = "IncompatibleEventPullContractError";
|
|
76532
|
+
}
|
|
76533
|
+
};
|
|
76521
76534
|
function normalizeVenueAddress(value) {
|
|
76522
76535
|
const obj = isRecord$9(value) ? value : {};
|
|
76523
76536
|
return {
|
|
@@ -76565,19 +76578,23 @@ function normalizeEventCategoryForCompare(category) {
|
|
|
76565
76578
|
}
|
|
76566
76579
|
function normalizeRemoteEventForCompare(event) {
|
|
76567
76580
|
const obj = isRecord$9(event) ? event : {};
|
|
76568
|
-
const
|
|
76581
|
+
const identifier = stringValue(obj.identifier, "<unknown>");
|
|
76582
|
+
let scheduleIdentity;
|
|
76583
|
+
try {
|
|
76584
|
+
scheduleIdentity = parseLocalEventScheduleIdentity(obj, `remote event "${identifier}"`);
|
|
76585
|
+
} catch (error) {
|
|
76586
|
+
if (error instanceof InvalidLocalEventScheduleIdentityError) throw new IncompatibleEventPullContractError(identifier, error);
|
|
76587
|
+
throw error;
|
|
76588
|
+
}
|
|
76569
76589
|
return {
|
|
76570
|
-
identifier
|
|
76590
|
+
identifier,
|
|
76571
76591
|
title: String(obj.title),
|
|
76572
76592
|
slug: String(obj.slug),
|
|
76573
76593
|
status: obj.status === "active" || obj.status === "draft" || obj.status === "archived" || obj.status === "cancelled" || obj.status === "completed" ? obj.status : "draft",
|
|
76574
76594
|
visibility: obj.visibility === "public" || obj.visibility === "private" || obj.visibility === "unlisted" ? obj.visibility : "private",
|
|
76575
|
-
|
|
76576
|
-
|
|
76577
|
-
|
|
76578
|
-
defaultStartTime: stringValue(schedule.defaultStartTime, "09:00:00"),
|
|
76579
|
-
durationMinutes: typeof schedule.durationMinutes === "number" ? schedule.durationMinutes : 60
|
|
76580
|
-
},
|
|
76595
|
+
preset: scheduleIdentity.preset,
|
|
76596
|
+
bookingScope: scheduleIdentity.bookingScope,
|
|
76597
|
+
occurrences: [...scheduleIdentity.occurrences],
|
|
76581
76598
|
capacity: nullishToNull(typeof obj.capacity === "number" ? obj.capacity : void 0),
|
|
76582
76599
|
pricing: normalizeEventPricingForCompare(obj.pricing),
|
|
76583
76600
|
paymentTerms: normalizeEventPaymentTermsForCompare(obj.paymentTerms),
|
|
@@ -76591,14 +76608,16 @@ function normalizeRemoteEventForCompare(event) {
|
|
|
76591
76608
|
};
|
|
76592
76609
|
}
|
|
76593
76610
|
function normalizeLocalEventAgainstRemoteForCompare(localEvent, remoteEvent) {
|
|
76594
|
-
const local =
|
|
76611
|
+
const local = localEvent;
|
|
76595
76612
|
const base = remoteEvent ? normalizeRemoteEventForCompare(remoteEvent) : normalizeRemoteEventForCompare({
|
|
76596
76613
|
identifier: local.identifier,
|
|
76597
76614
|
title: local.title,
|
|
76598
76615
|
slug: local.slug,
|
|
76599
76616
|
status: local.status ?? "draft",
|
|
76600
76617
|
visibility: local.visibility ?? "private",
|
|
76601
|
-
|
|
76618
|
+
preset: local.preset,
|
|
76619
|
+
bookingScope: local.bookingScope,
|
|
76620
|
+
occurrences: local.occurrences,
|
|
76602
76621
|
pricing: local.pricing ?? {},
|
|
76603
76622
|
paymentTerms: local.paymentTerms,
|
|
76604
76623
|
capacity: local.capacity ?? null,
|
|
@@ -76610,7 +76629,6 @@ function normalizeLocalEventAgainstRemoteForCompare(localEvent, remoteEvent) {
|
|
|
76610
76629
|
presentation: local.presentation ?? null,
|
|
76611
76630
|
tags: local.tags ?? []
|
|
76612
76631
|
});
|
|
76613
|
-
const schedule = isRecord$9(local.schedule) ? local.schedule : {};
|
|
76614
76632
|
return {
|
|
76615
76633
|
...base,
|
|
76616
76634
|
identifier: stringValue(local.identifier, base.identifier),
|
|
@@ -76618,12 +76636,9 @@ function normalizeLocalEventAgainstRemoteForCompare(localEvent, remoteEvent) {
|
|
|
76618
76636
|
slug: stringValue(local.slug, base.slug),
|
|
76619
76637
|
status: local.status === void 0 ? base.status : local.status === "active" || local.status === "draft" || local.status === "archived" || local.status === "cancelled" || local.status === "completed" ? local.status : "draft",
|
|
76620
76638
|
visibility: local.visibility === void 0 ? base.visibility : local.visibility === "public" || local.visibility === "private" || local.visibility === "unlisted" ? local.visibility : "private",
|
|
76621
|
-
|
|
76622
|
-
|
|
76623
|
-
|
|
76624
|
-
defaultStartTime: schedule.defaultStartTime === void 0 ? base.schedule.defaultStartTime : stringValue(schedule.defaultStartTime, base.schedule.defaultStartTime),
|
|
76625
|
-
durationMinutes: schedule.durationMinutes === void 0 ? base.schedule.durationMinutes : typeof schedule.durationMinutes === "number" ? schedule.durationMinutes : base.schedule.durationMinutes
|
|
76626
|
-
},
|
|
76639
|
+
preset: local.preset,
|
|
76640
|
+
bookingScope: local.bookingScope,
|
|
76641
|
+
occurrences: [...local.occurrences],
|
|
76627
76642
|
capacity: local.capacity === void 0 ? base.capacity : nullishToNull(typeof local.capacity === "number" ? local.capacity : void 0),
|
|
76628
76643
|
pricing: local.pricing === void 0 ? base.pricing : normalizeEventPricingForCompare(local.pricing),
|
|
76629
76644
|
paymentTerms: local.paymentTerms === void 0 ? base.paymentTerms : normalizeEventPaymentTermsForCompare(local.paymentTerms),
|
|
@@ -77194,12 +77209,13 @@ const navigationMenuRoles = [
|
|
|
77194
77209
|
"footer",
|
|
77195
77210
|
"legal-policy"
|
|
77196
77211
|
];
|
|
77197
|
-
const
|
|
77212
|
+
const eventPresets = [
|
|
77213
|
+
"event",
|
|
77198
77214
|
"class",
|
|
77215
|
+
"course",
|
|
77199
77216
|
"workshop",
|
|
77200
77217
|
"retreat",
|
|
77201
|
-
"performance"
|
|
77202
|
-
"custom"
|
|
77218
|
+
"performance"
|
|
77203
77219
|
];
|
|
77204
77220
|
const offeringVisibilities = [
|
|
77205
77221
|
"draft",
|
|
@@ -77283,7 +77299,7 @@ function createSiteStyleSelectionChangeSchema(parts) {
|
|
|
77283
77299
|
}).strict(),
|
|
77284
77300
|
z$1.object({
|
|
77285
77301
|
kind: z$1.literal("set-palette"),
|
|
77286
|
-
|
|
77302
|
+
palette: parts.palette
|
|
77287
77303
|
}).strict(),
|
|
77288
77304
|
z$1.object({
|
|
77289
77305
|
kind: z$1.literal("set-typography"),
|
|
@@ -77317,13 +77333,12 @@ function validateUniqueSiteStyleSelectionChanges(input, ctx) {
|
|
|
77317
77333
|
//#endregion
|
|
77318
77334
|
//#region ../site-commands/src/siteStyleCommandSchema.ts
|
|
77319
77335
|
init_buttons();
|
|
77320
|
-
init_palette();
|
|
77321
77336
|
const siteStyleRefSchema = z$1.string().regex(/^site-style:[a-z0-9][a-z0-9-]*$/u).transform((value) => value);
|
|
77322
77337
|
const catalogIdSchema = z$1.string().trim().min(1);
|
|
77323
77338
|
const selectionChangeSchema = createSiteStyleSelectionChangeSchema({
|
|
77324
77339
|
siteStyleId: siteStyleRefSchema,
|
|
77325
77340
|
buttonStyleSelection: buttonStyleSelectionSchema,
|
|
77326
|
-
|
|
77341
|
+
palette: paletteSchema,
|
|
77327
77342
|
typography: typographySchema,
|
|
77328
77343
|
headerLookId: catalogIdSchema,
|
|
77329
77344
|
headerLayoutId: catalogIdSchema,
|
|
@@ -77947,8 +77962,8 @@ const upsertEventSeriesCommandSchema = z$1.object({
|
|
|
77947
77962
|
slug: z$1.string().min(1),
|
|
77948
77963
|
path: z$1.string().startsWith("/").nullable().optional(),
|
|
77949
77964
|
title: z$1.string().min(1),
|
|
77950
|
-
|
|
77951
|
-
bookingScope: z$1.enum(["single_occurrence", "whole_series"])
|
|
77965
|
+
preset: z$1.enum(eventPresets),
|
|
77966
|
+
bookingScope: z$1.enum(["single_occurrence", "whole_series"]),
|
|
77952
77967
|
status: z$1.enum([
|
|
77953
77968
|
"draft",
|
|
77954
77969
|
"active",
|
|
@@ -79544,7 +79559,7 @@ function commandRefContributions(command) {
|
|
|
79544
79559
|
field: "input.contentEntryRef"
|
|
79545
79560
|
}] : []
|
|
79546
79561
|
};
|
|
79547
|
-
default: return assertNever$
|
|
79562
|
+
default: return assertNever$24(command);
|
|
79548
79563
|
}
|
|
79549
79564
|
}
|
|
79550
79565
|
function passRedemptionSubjectRefContribution(subject) {
|
|
@@ -79557,7 +79572,7 @@ function passRedemptionSubjectRefContribution(subject) {
|
|
|
79557
79572
|
ref: subject.eventRegistrationRef,
|
|
79558
79573
|
field: "input.subject.eventRegistrationRef"
|
|
79559
79574
|
};
|
|
79560
|
-
default: return assertNever$
|
|
79575
|
+
default: return assertNever$24(subject);
|
|
79561
79576
|
}
|
|
79562
79577
|
}
|
|
79563
79578
|
function portalOrderSubjectRefContribution(subject) {
|
|
@@ -79570,7 +79585,7 @@ function portalOrderSubjectRefContribution(subject) {
|
|
|
79570
79585
|
ref: subject.courseEnrollmentRef,
|
|
79571
79586
|
field: "input.subject.courseEnrollmentRef"
|
|
79572
79587
|
};
|
|
79573
|
-
default: return assertNever$
|
|
79588
|
+
default: return assertNever$24(subject);
|
|
79574
79589
|
}
|
|
79575
79590
|
}
|
|
79576
79591
|
function collectOfferingRequires(input, intervals, intervalPath) {
|
|
@@ -80224,7 +80239,7 @@ function stableStringify(value) {
|
|
|
80224
80239
|
case "object":
|
|
80225
80240
|
case "string": return JSON.stringify(sorted);
|
|
80226
80241
|
}
|
|
80227
|
-
return assertNever$
|
|
80242
|
+
return assertNever$24(sorted);
|
|
80228
80243
|
}
|
|
80229
80244
|
function sortValue(value) {
|
|
80230
80245
|
if (Array.isArray(value)) return value.map(sortValue);
|
|
@@ -80463,7 +80478,7 @@ function appliedSubjectFromOutcome(outcome) {
|
|
|
80463
80478
|
case "skipped_by_stop_policy":
|
|
80464
80479
|
case "compile_failed":
|
|
80465
80480
|
case "preflight_failed": return [];
|
|
80466
|
-
default: assertNever$
|
|
80481
|
+
default: assertNever$24(outcome);
|
|
80467
80482
|
}
|
|
80468
80483
|
}
|
|
80469
80484
|
function failureFromOutcome(outcome) {
|
|
@@ -80482,7 +80497,7 @@ function failureFromOutcome(outcome) {
|
|
|
80482
80497
|
};
|
|
80483
80498
|
case "applied":
|
|
80484
80499
|
case "skipped_by_stop_policy": return null;
|
|
80485
|
-
default: assertNever$
|
|
80500
|
+
default: assertNever$24(outcome);
|
|
80486
80501
|
}
|
|
80487
80502
|
}
|
|
80488
80503
|
function appliedCommand(command) {
|
|
@@ -80498,154 +80513,61 @@ function reportSubjectForCommandRef(subjectsByCommandRef, commandRef) {
|
|
|
80498
80513
|
throw new Error(`Internal command planning error: missing report subject for ${commandRef}.`);
|
|
80499
80514
|
}
|
|
80500
80515
|
//#endregion
|
|
80501
|
-
//#region
|
|
80502
|
-
|
|
80503
|
-
|
|
80504
|
-
|
|
80505
|
-
|
|
80506
|
-
return {
|
|
80507
|
-
|
|
80508
|
-
|
|
80509
|
-
|
|
80510
|
-
|
|
80511
|
-
|
|
80512
|
-
|
|
80513
|
-
|
|
80514
|
-
}
|
|
80515
|
-
|
|
80516
|
-
|
|
80517
|
-
|
|
80518
|
-
|
|
80519
|
-
|
|
80520
|
-
}
|
|
80521
|
-
function timePart(hours, minutes, seconds = "00") {
|
|
80522
|
-
return `${hours}:${minutes}:${seconds}`;
|
|
80523
|
-
}
|
|
80524
|
-
function parseSdkEventDateTime(value) {
|
|
80525
|
-
const explicitMatch = explicitOffsetDateTimeRegex.exec(value);
|
|
80526
|
-
if (explicitMatch) {
|
|
80527
|
-
const [, yearRaw, monthRaw, dayRaw, hours, minutes, seconds = "00", fraction] = explicitMatch;
|
|
80528
|
-
if (!yearRaw || !monthRaw || !dayRaw || !hours || !minutes) return null;
|
|
80529
|
-
if (!isValidDateParts(Number(yearRaw), Number(monthRaw), Number(dayRaw)) || !isZeroFraction(fraction)) return null;
|
|
80530
|
-
const epochMs = Date.parse(value);
|
|
80531
|
-
if (!Number.isFinite(epochMs)) return null;
|
|
80532
|
-
return {
|
|
80533
|
-
epochMs,
|
|
80534
|
-
date: datePart(yearRaw, monthRaw, dayRaw),
|
|
80535
|
-
time: timePart(hours, minutes, seconds),
|
|
80536
|
-
iso: new Date(epochMs).toISOString()
|
|
80537
|
-
};
|
|
80516
|
+
//#region src/cli/site-commands/eventScheduleCompiler.ts
|
|
80517
|
+
init_src$3();
|
|
80518
|
+
function compileExplicitEventSchedule(event) {
|
|
80519
|
+
if (event.occurrences.length === 0) return unsupported$1(event, `Event ${event.identifier} has no occurrences; event pushes require at least one explicit occurrence.`);
|
|
80520
|
+
const timeZone = event.occurrences[0]?.timeZone;
|
|
80521
|
+
if (!timeZone || event.occurrences.some((occurrence) => occurrence.timeZone !== timeZone)) return unsupported$1(event, `Event ${event.identifier} contains mixed occurrence timezones; one event series must use one IANA timezone.`);
|
|
80522
|
+
if (!isIanaTimeZone(timeZone)) return unsupported$1(event, `Event ${event.identifier} uses invalid IANA timezone "${timeZone}".`);
|
|
80523
|
+
const occurrences = [];
|
|
80524
|
+
const seenStartsAt = /* @__PURE__ */ new Set();
|
|
80525
|
+
for (const occurrence of event.occurrences) {
|
|
80526
|
+
const start = parseUtcIsoDateTimeString(occurrence.startsAt);
|
|
80527
|
+
const end = parseUtcIsoDateTimeString(occurrence.endsAt);
|
|
80528
|
+
if (!start.ok || !end.ok || Date.parse(end.value) <= Date.parse(start.value)) return unsupported$1(event, `Event ${event.identifier} contains an invalid occurrence; startsAt and endsAt must be offset-aware ISO datetimes with endsAt after startsAt.`);
|
|
80529
|
+
if (seenStartsAt.has(start.value)) return unsupported$1(event, `Event ${event.identifier} contains duplicate occurrence startsAt values; each session must start at a unique instant.`);
|
|
80530
|
+
seenStartsAt.add(start.value);
|
|
80531
|
+
occurrences.push({
|
|
80532
|
+
startAt: start.value,
|
|
80533
|
+
endAt: end.value
|
|
80534
|
+
});
|
|
80538
80535
|
}
|
|
80539
|
-
|
|
80540
|
-
|
|
80541
|
-
|
|
80542
|
-
|
|
80543
|
-
const year = Number(yearRaw);
|
|
80544
|
-
const month = Number(monthRaw);
|
|
80545
|
-
const day = Number(dayRaw);
|
|
80546
|
-
if (!isValidDateParts(year, month, day) || !isZeroFraction(fraction)) return null;
|
|
80547
|
-
const epochMs = Date.UTC(year, month - 1, day, Number(hours), Number(minutes), Number(seconds));
|
|
80548
|
-
return {
|
|
80549
|
-
epochMs,
|
|
80550
|
-
date: datePart(yearRaw, monthRaw, dayRaw),
|
|
80551
|
-
time: timePart(hours, minutes, seconds),
|
|
80552
|
-
iso: new Date(epochMs).toISOString()
|
|
80553
|
-
};
|
|
80554
|
-
}
|
|
80555
|
-
function durationMinutesBetween(startsAt, endsAt) {
|
|
80556
|
-
if (endsAt.epochMs <= startsAt.epochMs) return null;
|
|
80557
|
-
const durationMs = endsAt.epochMs - startsAt.epochMs;
|
|
80558
|
-
if (durationMs % 6e4 !== 0) return null;
|
|
80559
|
-
return durationMs / 6e4;
|
|
80536
|
+
return ok$3({
|
|
80537
|
+
timeZone,
|
|
80538
|
+
occurrences
|
|
80539
|
+
});
|
|
80560
80540
|
}
|
|
80561
|
-
function
|
|
80562
|
-
return
|
|
80541
|
+
function scheduleFromExplicitEventOccurrence(occurrence) {
|
|
80542
|
+
return scheduleFromCommandOccurrence({
|
|
80543
|
+
startAt: occurrence.startsAt,
|
|
80544
|
+
endAt: occurrence.endsAt
|
|
80545
|
+
}, occurrence.timeZone);
|
|
80563
80546
|
}
|
|
80564
|
-
function
|
|
80565
|
-
|
|
80566
|
-
}
|
|
80567
|
-
|
|
80568
|
-
|
|
80569
|
-
|
|
80570
|
-
if (input.defaultStartTime !== void 0 && input.defaultStartTime !== null && !timeRegex.test(input.defaultStartTime)) issues.push(issue(["defaultStartTime"], "Invalid time format (HH:MM or HH:MM:SS)"));
|
|
80571
|
-
if (options.requireCanonicalFields && !input.defaultStartTime) issues.push(issue(["defaultStartTime"], "defaultStartTime is required"));
|
|
80572
|
-
if (options.requireCanonicalFields && input.durationMinutes === void 0) issues.push(issue(["durationMinutes"], "durationMinutes is required"));
|
|
80573
|
-
if (input.durationMinutes !== void 0 && input.durationMinutes !== null) {
|
|
80574
|
-
if (input.durationMinutes < 1) issues.push(issue(["durationMinutes"], "durationMinutes must be at least 1"));
|
|
80575
|
-
else if (exceedsMaxDuration(input.durationMinutes, options)) issues.push(issue(["durationMinutes"], maxDurationMessage(options)));
|
|
80547
|
+
function isIanaTimeZone(value) {
|
|
80548
|
+
try {
|
|
80549
|
+
new Intl.DateTimeFormat("en-GB", { timeZone: value });
|
|
80550
|
+
return true;
|
|
80551
|
+
} catch {
|
|
80552
|
+
return false;
|
|
80576
80553
|
}
|
|
80577
|
-
if (issues.length > 0) return {
|
|
80578
|
-
ok: false,
|
|
80579
|
-
issues
|
|
80580
|
-
};
|
|
80581
|
-
return {
|
|
80582
|
-
ok: true,
|
|
80583
|
-
kind: "canonical",
|
|
80584
|
-
canonical: {
|
|
80585
|
-
recurrenceRule: input.recurrenceRule ?? null,
|
|
80586
|
-
startDate: input.startDate,
|
|
80587
|
-
defaultStartTime: input.defaultStartTime ?? "09:00:00",
|
|
80588
|
-
durationMinutes: input.durationMinutes ?? 60
|
|
80589
|
-
}
|
|
80590
|
-
};
|
|
80591
80554
|
}
|
|
80592
|
-
function
|
|
80593
|
-
const
|
|
80594
|
-
const hasStartsAt = input.startsAt !== void 0 && input.startsAt !== null;
|
|
80595
|
-
const hasEndsAt = input.endsAt !== void 0 && input.endsAt !== null;
|
|
80596
|
-
const hasDateTimeDuration = hasStartsAt && input.durationMinutes !== void 0 && input.durationMinutes !== null;
|
|
80597
|
-
const hasCanonicalStart = input.startDate !== void 0 || input.defaultStartTime !== void 0;
|
|
80598
|
-
if (!hasStartsAt && !hasEndsAt) return classifyCanonicalSchedule(input, options);
|
|
80599
|
-
if (hasStartsAt && hasCanonicalStart) issues.push(issue(["startsAt"], "Use either startsAt or startDate/defaultStartTime, not both"));
|
|
80600
|
-
if (input.recurrenceRule) issues.push(issue(["recurrenceRule"], "startsAt schedules are only supported for one-off events"));
|
|
80601
|
-
if (!hasStartsAt) issues.push(issue(["startsAt"], "startsAt is required when endsAt is provided"));
|
|
80602
|
-
if (!hasEndsAt && !hasDateTimeDuration) issues.push(issue(["endsAt"], "Provide either endsAt or durationMinutes with startsAt"));
|
|
80603
|
-
if (hasEndsAt && hasDateTimeDuration) issues.push(issue(["endsAt"], "Use either endsAt or durationMinutes with startsAt, not both"));
|
|
80604
|
-
const startsAt = typeof input.startsAt === "string" ? parseSdkEventDateTime(input.startsAt) : null;
|
|
80605
|
-
const endsAt = typeof input.endsAt === "string" ? parseSdkEventDateTime(input.endsAt) : null;
|
|
80606
|
-
if (hasStartsAt && !startsAt) issues.push(issue(["startsAt"], "Invalid datetime format. Use ISO datetime format, e.g. 2026-06-01T10:00:00Z"));
|
|
80607
|
-
if (hasEndsAt && !endsAt) issues.push(issue(["endsAt"], "Invalid datetime format. Use ISO datetime format, e.g. 2026-06-07T10:00:00Z"));
|
|
80608
|
-
if (startsAt && endsAt) {
|
|
80609
|
-
const durationMinutes = durationMinutesBetween(startsAt, endsAt);
|
|
80610
|
-
if (durationMinutes === null) issues.push(issue(["endsAt"], "endsAt must be after startsAt and align to a whole minute"));
|
|
80611
|
-
else if (exceedsMaxDuration(durationMinutes, options)) issues.push(issue(["endsAt"], maxDurationMessage(options)));
|
|
80612
|
-
if (issues.length === 0 && durationMinutes !== null) return {
|
|
80613
|
-
ok: true,
|
|
80614
|
-
kind: "start-end",
|
|
80615
|
-
canonical: {
|
|
80616
|
-
recurrenceRule: null,
|
|
80617
|
-
startDate: startsAt.date,
|
|
80618
|
-
defaultStartTime: startsAt.time,
|
|
80619
|
-
durationMinutes
|
|
80620
|
-
},
|
|
80621
|
-
startsAtIso: startsAt.iso,
|
|
80622
|
-
endsAtIso: endsAt.iso
|
|
80623
|
-
};
|
|
80624
|
-
}
|
|
80625
|
-
if (startsAt && hasDateTimeDuration && input.durationMinutes !== void 0 && input.durationMinutes !== null) {
|
|
80626
|
-
if (input.durationMinutes < 1) issues.push(issue(["durationMinutes"], "durationMinutes must be at least 1"));
|
|
80627
|
-
else if (exceedsMaxDuration(input.durationMinutes, options)) issues.push(issue(["durationMinutes"], maxDurationMessage(options)));
|
|
80628
|
-
if (issues.length === 0) {
|
|
80629
|
-
const endsAtMs = startsAt.epochMs + input.durationMinutes * 6e4;
|
|
80630
|
-
return {
|
|
80631
|
-
ok: true,
|
|
80632
|
-
kind: "start-duration",
|
|
80633
|
-
canonical: {
|
|
80634
|
-
recurrenceRule: null,
|
|
80635
|
-
startDate: startsAt.date,
|
|
80636
|
-
defaultStartTime: startsAt.time,
|
|
80637
|
-
durationMinutes: input.durationMinutes
|
|
80638
|
-
},
|
|
80639
|
-
startsAtIso: startsAt.iso,
|
|
80640
|
-
endsAtIso: new Date(endsAtMs).toISOString()
|
|
80641
|
-
};
|
|
80642
|
-
}
|
|
80643
|
-
}
|
|
80555
|
+
function scheduleFromCommandOccurrence(occurrence, timeZone) {
|
|
80556
|
+
const start = new Date(occurrence.startAt);
|
|
80644
80557
|
return {
|
|
80645
|
-
|
|
80646
|
-
|
|
80558
|
+
recurrenceRule: null,
|
|
80559
|
+
startDate: formatLocalScheduleDate(getLocalScheduleDate(start, timeZone)),
|
|
80560
|
+
defaultStartTime: formatLocalScheduleTime(getLocalScheduleTime(start, timeZone)),
|
|
80561
|
+
durationMinutes: Math.round((Date.parse(occurrence.endAt) - Date.parse(occurrence.startAt)) / 6e4)
|
|
80647
80562
|
};
|
|
80648
80563
|
}
|
|
80564
|
+
function unsupported$1(event, message) {
|
|
80565
|
+
return err$3({
|
|
80566
|
+
code: "unsupported_local_shape",
|
|
80567
|
+
identifier: event.identifier,
|
|
80568
|
+
message
|
|
80569
|
+
});
|
|
80570
|
+
}
|
|
80649
80571
|
//#endregion
|
|
80650
80572
|
//#region src/cli/site-commands/datedOfferingCommands.ts
|
|
80651
80573
|
init_src$3();
|
|
@@ -80812,9 +80734,8 @@ function eventCategoryCommand(category) {
|
|
|
80812
80734
|
}
|
|
80813
80735
|
function eventSeriesCommand(event) {
|
|
80814
80736
|
if (event.identifier !== event.slug) return unsupported(event.identifier, `Event identifier "${event.identifier}" must match slug "${event.slug}".`);
|
|
80815
|
-
|
|
80816
|
-
|
|
80817
|
-
if (!occurrence.ok) return occurrence;
|
|
80737
|
+
const schedule = compileExplicitEventSchedule(event);
|
|
80738
|
+
if (!schedule.ok) return schedule;
|
|
80818
80739
|
const pricing = eventPricing(event);
|
|
80819
80740
|
if (!pricing.ok) return pricing;
|
|
80820
80741
|
const content = event.content ? {
|
|
@@ -80833,11 +80754,11 @@ function eventSeriesCommand(event) {
|
|
|
80833
80754
|
slug: event.slug,
|
|
80834
80755
|
path: event.path,
|
|
80835
80756
|
title: event.title,
|
|
80836
|
-
|
|
80837
|
-
bookingScope:
|
|
80757
|
+
preset: event.preset,
|
|
80758
|
+
bookingScope: event.bookingScope,
|
|
80838
80759
|
status: event.status === "completed" ? void 0 : event.status,
|
|
80839
80760
|
visibility: offeringVisibility(event.visibility, event.status),
|
|
80840
|
-
timezone:
|
|
80761
|
+
timezone: schedule.value.timeZone,
|
|
80841
80762
|
venueIdentifier: event.venueRef ?? void 0,
|
|
80842
80763
|
categoryIdentifier: event.categoryRef ?? void 0,
|
|
80843
80764
|
formIdentifier: event.formRef ?? void 0,
|
|
@@ -80846,7 +80767,7 @@ function eventSeriesCommand(event) {
|
|
|
80846
80767
|
priceDisplay: pricing.value.priceDisplay ?? void 0,
|
|
80847
80768
|
acceptsPasses: pricing.value.acceptsPasses,
|
|
80848
80769
|
acceptsMemberships: pricing.value.acceptsMemberships,
|
|
80849
|
-
occurrences:
|
|
80770
|
+
occurrences: schedule.value.occurrences,
|
|
80850
80771
|
content,
|
|
80851
80772
|
settings: event.settings,
|
|
80852
80773
|
paymentTerms: event.paymentTerms,
|
|
@@ -80856,23 +80777,6 @@ function eventSeriesCommand(event) {
|
|
|
80856
80777
|
}
|
|
80857
80778
|
});
|
|
80858
80779
|
}
|
|
80859
|
-
function eventOccurrence(event) {
|
|
80860
|
-
const scheduleClassification = classifySdkEventSchedule(event.schedule ?? {});
|
|
80861
|
-
if (!scheduleClassification.ok) return unsupported(event.identifier, `Event ${event.identifier} has an invalid schedule: ${scheduleClassification.issues.map((validationIssue) => validationIssue.message).join("; ")}`);
|
|
80862
|
-
if (scheduleClassification.kind === "start-end" || scheduleClassification.kind === "start-duration") return ok$3({
|
|
80863
|
-
startAt: scheduleClassification.startsAtIso,
|
|
80864
|
-
endAt: scheduleClassification.endsAtIso
|
|
80865
|
-
});
|
|
80866
|
-
const startDate = event.schedule?.startDate;
|
|
80867
|
-
if (!startDate) return unsupported(event.identifier, `Event ${event.identifier} is missing schedule.startDate; command-backed event pushes require a concrete occurrence.`);
|
|
80868
|
-
const startTime = event.schedule?.defaultStartTime ?? "09:00:00";
|
|
80869
|
-
const durationMinutes = event.schedule?.durationMinutes ?? 60;
|
|
80870
|
-
const startAt = toUtcIso(startDate, startTime);
|
|
80871
|
-
return ok$3({
|
|
80872
|
-
startAt,
|
|
80873
|
-
endAt: new Date(Date.parse(startAt) + durationMinutes * 6e4).toISOString()
|
|
80874
|
-
});
|
|
80875
|
-
}
|
|
80876
80780
|
function eventPricing(event) {
|
|
80877
80781
|
const pricing = classifySdkEventPricing(event.pricing);
|
|
80878
80782
|
if (!pricing.ok) return unsupported(event.identifier, `Event ${event.identifier} has invalid pricing: ${pricing.issues[0]?.message ?? "invalid pricing"}.`);
|
|
@@ -80905,7 +80809,7 @@ function eventPricing(event) {
|
|
|
80905
80809
|
acceptsPasses: pricing.pricing.acceptsPasses,
|
|
80906
80810
|
acceptsMemberships: pricing.pricing.acceptsMemberships
|
|
80907
80811
|
});
|
|
80908
|
-
default: return assertNever$
|
|
80812
|
+
default: return assertNever$24(pricing.pricing);
|
|
80909
80813
|
}
|
|
80910
80814
|
}
|
|
80911
80815
|
function venueUpsertInput(command) {
|
|
@@ -80918,10 +80822,17 @@ function eventSeriesUpsertInput(command) {
|
|
|
80918
80822
|
identifier: command.input.slug,
|
|
80919
80823
|
title: command.input.title,
|
|
80920
80824
|
slug: command.input.slug,
|
|
80825
|
+
preset: command.input.preset,
|
|
80826
|
+
bookingScope: command.input.bookingScope,
|
|
80827
|
+
occurrences: command.input.occurrences.map((item) => ({
|
|
80828
|
+
startsAt: item.startAt,
|
|
80829
|
+
endsAt: item.endAt,
|
|
80830
|
+
timeZone: command.input.timezone
|
|
80831
|
+
})),
|
|
80921
80832
|
path: command.input.path,
|
|
80922
80833
|
status: command.input.status,
|
|
80923
80834
|
visibility: managementVisibility(command.input.visibility),
|
|
80924
|
-
schedule:
|
|
80835
|
+
schedule: scheduleFromCommandOccurrence(occurrence, command.input.timezone),
|
|
80925
80836
|
capacity: capacityLimit(command.input.capacity),
|
|
80926
80837
|
pricing: eventPricingInput(command.input),
|
|
80927
80838
|
...command.input.paymentTerms === void 0 ? {} : { paymentTerms: command.input.paymentTerms },
|
|
@@ -80966,7 +80877,7 @@ function eventPricingInput(input) {
|
|
|
80966
80877
|
};
|
|
80967
80878
|
case "manual_payment":
|
|
80968
80879
|
case "external": throw new Error(`Unsupported event pricing mode reached SDK mapper: ${input.pricing.kind}`);
|
|
80969
|
-
default: return assertNever$
|
|
80880
|
+
default: return assertNever$24(input.pricing);
|
|
80970
80881
|
}
|
|
80971
80882
|
}
|
|
80972
80883
|
function increment(result, counter) {
|
|
@@ -80980,7 +80891,7 @@ function increment(result, counter) {
|
|
|
80980
80891
|
case "deleted":
|
|
80981
80892
|
result.deleted++;
|
|
80982
80893
|
return;
|
|
80983
|
-
default: assertNever$
|
|
80894
|
+
default: assertNever$24(counter);
|
|
80984
80895
|
}
|
|
80985
80896
|
}
|
|
80986
80897
|
async function applyDatedOfferingCommand(client, command) {
|
|
@@ -81009,7 +80920,7 @@ async function applyDatedOfferingCommand(client, command) {
|
|
|
81009
80920
|
case "deleteEventSeries":
|
|
81010
80921
|
await client.events.delete(command.input.identifier);
|
|
81011
80922
|
return;
|
|
81012
|
-
default: assertNever$
|
|
80923
|
+
default: assertNever$24(command);
|
|
81013
80924
|
}
|
|
81014
80925
|
}
|
|
81015
80926
|
function capacity(value) {
|
|
@@ -81033,21 +80944,9 @@ function managementVisibility(visibility) {
|
|
|
81033
80944
|
case "unlisted": return "unlisted";
|
|
81034
80945
|
case "listed":
|
|
81035
80946
|
case "published": return "public";
|
|
81036
|
-
default: return assertNever$
|
|
80947
|
+
default: return assertNever$24(visibility);
|
|
81037
80948
|
}
|
|
81038
80949
|
}
|
|
81039
|
-
function scheduleFromOccurrence(occurrence) {
|
|
81040
|
-
return {
|
|
81041
|
-
recurrenceRule: null,
|
|
81042
|
-
startDate: occurrence.startAt.slice(0, 10),
|
|
81043
|
-
defaultStartTime: occurrence.startAt.slice(11, 19),
|
|
81044
|
-
durationMinutes: Math.round((Date.parse(occurrence.endAt) - Date.parse(occurrence.startAt)) / 6e4)
|
|
81045
|
-
};
|
|
81046
|
-
}
|
|
81047
|
-
function toUtcIso(date, time) {
|
|
81048
|
-
const normalizedTime = time.length === 5 ? `${time}:00` : time;
|
|
81049
|
-
return (/* @__PURE__ */ new Date(`${date}T${normalizedTime}Z`)).toISOString();
|
|
81050
|
-
}
|
|
81051
80950
|
function unsupported(identifier, message) {
|
|
81052
80951
|
return err$3({
|
|
81053
80952
|
code: "unsupported_local_shape",
|
|
@@ -81078,7 +80977,7 @@ function commandReportToSyncResult(input) {
|
|
|
81078
80977
|
input.recordFailure(result, outcome.identifier, outcome.message, outcome.subject);
|
|
81079
80978
|
break;
|
|
81080
80979
|
case "skipped_by_stop_policy": break;
|
|
81081
|
-
default: assertNever$
|
|
80980
|
+
default: assertNever$24(outcome);
|
|
81082
80981
|
}
|
|
81083
80982
|
result.warnings.push(...input.report.warnings);
|
|
81084
80983
|
return result;
|
|
@@ -81150,7 +81049,7 @@ async function executeEntryCommandPlan(input) {
|
|
|
81150
81049
|
case "deleteContentEntry":
|
|
81151
81050
|
await input.client.entries.delete(command.input.contentTypeKey, entryIdentifierForCommand(command));
|
|
81152
81051
|
return;
|
|
81153
|
-
default: assertNever$
|
|
81052
|
+
default: assertNever$24(command);
|
|
81154
81053
|
}
|
|
81155
81054
|
}
|
|
81156
81055
|
});
|
|
@@ -81310,7 +81209,7 @@ function incrementEntrySuccess(result, subject) {
|
|
|
81310
81209
|
case "deleted":
|
|
81311
81210
|
result.entries.deleted++;
|
|
81312
81211
|
return;
|
|
81313
|
-
default: assertNever$
|
|
81212
|
+
default: assertNever$24(subject.counter);
|
|
81314
81213
|
}
|
|
81315
81214
|
}
|
|
81316
81215
|
function reportSubject(input) {
|
|
@@ -81373,7 +81272,7 @@ async function executeFormCommandPlan(input) {
|
|
|
81373
81272
|
settings: command.input.settings ?? {}
|
|
81374
81273
|
});
|
|
81375
81274
|
return;
|
|
81376
|
-
default: assertNever$
|
|
81275
|
+
default: assertNever$24(commandType);
|
|
81377
81276
|
}
|
|
81378
81277
|
}
|
|
81379
81278
|
});
|
|
@@ -81452,7 +81351,7 @@ function incrementFormSuccess(result, subject) {
|
|
|
81452
81351
|
case "updated":
|
|
81453
81352
|
result.forms.updated++;
|
|
81454
81353
|
return;
|
|
81455
|
-
default: assertNever$
|
|
81354
|
+
default: assertNever$24(subject.counter);
|
|
81456
81355
|
}
|
|
81457
81356
|
}
|
|
81458
81357
|
function recordFormFailure(result, identifier, message) {
|
|
@@ -81497,7 +81396,7 @@ async function executeFooterCommandPlan(input) {
|
|
|
81497
81396
|
if (command.input.bottomText !== void 0 && command.input.bottomText !== null && !isRichTextDoc(command.input.bottomText)) throw new Error("Footer bottomText must be a canonical TipTap document");
|
|
81498
81397
|
await input.client.footer.upsert({ bottomText: command.input.bottomText });
|
|
81499
81398
|
return;
|
|
81500
|
-
default: assertNever$
|
|
81399
|
+
default: assertNever$24(commandType);
|
|
81501
81400
|
}
|
|
81502
81401
|
}
|
|
81503
81402
|
});
|
|
@@ -81620,7 +81519,7 @@ async function executeNavigationCommandPlan(input) {
|
|
|
81620
81519
|
});
|
|
81621
81520
|
return;
|
|
81622
81521
|
}
|
|
81623
|
-
default: assertNever$
|
|
81522
|
+
default: assertNever$24(commandType);
|
|
81624
81523
|
}
|
|
81625
81524
|
}
|
|
81626
81525
|
});
|
|
@@ -81647,7 +81546,7 @@ function navigationCompileErrorIdentifier(error) {
|
|
|
81647
81546
|
case "missing_local_navigation_menu": return error.name;
|
|
81648
81547
|
case "duplicate_navigation_identity": return error.identity;
|
|
81649
81548
|
case "command_validation_failed": return "command-validation";
|
|
81650
|
-
default: return assertNever$
|
|
81549
|
+
default: return assertNever$24(error);
|
|
81651
81550
|
}
|
|
81652
81551
|
}
|
|
81653
81552
|
function navigationCommandExecutionToReport(input) {
|
|
@@ -81692,7 +81591,7 @@ function navigationCommandRole$1(command) {
|
|
|
81692
81591
|
case "header": return "primary";
|
|
81693
81592
|
case "footer": return "footer";
|
|
81694
81593
|
case void 0: return;
|
|
81695
|
-
default: return assertNever$
|
|
81594
|
+
default: return assertNever$24(command.input.location);
|
|
81696
81595
|
}
|
|
81697
81596
|
}
|
|
81698
81597
|
function incrementNavigationSuccess(result, subject) {
|
|
@@ -81703,7 +81602,7 @@ function incrementNavigationSuccess(result, subject) {
|
|
|
81703
81602
|
case "updated":
|
|
81704
81603
|
result.navigation.updated++;
|
|
81705
81604
|
return;
|
|
81706
|
-
default: assertNever$
|
|
81605
|
+
default: assertNever$24(subject.counter);
|
|
81707
81606
|
}
|
|
81708
81607
|
}
|
|
81709
81608
|
function recordNavigationFailure(result, identifier, message) {
|
|
@@ -81982,7 +81881,7 @@ async function executePageCommandPlan(input) {
|
|
|
81982
81881
|
case "unpublishPage":
|
|
81983
81882
|
await input.client.pages.unpublish(pageIdentifierForCommand(command));
|
|
81984
81883
|
return;
|
|
81985
|
-
default: assertNever$
|
|
81884
|
+
default: assertNever$24(command);
|
|
81986
81885
|
}
|
|
81987
81886
|
}
|
|
81988
81887
|
});
|
|
@@ -82084,7 +81983,7 @@ function preflightFailureFromPageCompileError(input) {
|
|
|
82084
81983
|
},
|
|
82085
81984
|
warnings: []
|
|
82086
81985
|
};
|
|
82087
|
-
default: assertNever$
|
|
81986
|
+
default: assertNever$24(input.error);
|
|
82088
81987
|
}
|
|
82089
81988
|
}
|
|
82090
81989
|
function pageCommandReportToSyncResult(report) {
|
|
@@ -82299,7 +82198,7 @@ function validateLocalBlock(input) {
|
|
|
82299
82198
|
case "builtin_found":
|
|
82300
82199
|
case "custom_found":
|
|
82301
82200
|
case "extension_only_custom_found": break;
|
|
82302
|
-
default: assertNever$
|
|
82201
|
+
default: assertNever$24(resolution);
|
|
82303
82202
|
}
|
|
82304
82203
|
const validation = validateBlockData(input.data, resolution.manifest, resolution.kind === "builtin_found" || resolution.kind === "custom_found" ? [...resolution.extensionFields] : void 0);
|
|
82305
82204
|
const warnings = formatValidationResult(input.pageIdentifier, input.blockIdentifier, input.kind, validation);
|
|
@@ -82326,7 +82225,7 @@ function incrementPageSuccess(result, subject) {
|
|
|
82326
82225
|
case "block":
|
|
82327
82226
|
incrementBlockCounter(result, subject.counter);
|
|
82328
82227
|
return;
|
|
82329
|
-
default: assertNever$
|
|
82228
|
+
default: assertNever$24(subject);
|
|
82330
82229
|
}
|
|
82331
82230
|
}
|
|
82332
82231
|
function pageCommandDisplayIdentifier(command) {
|
|
@@ -82337,7 +82236,7 @@ function pageCommandDisplayIdentifier(command) {
|
|
|
82337
82236
|
case "upsertPageBlock":
|
|
82338
82237
|
case "deletePageBlock": return [pageIdentifierForBlockCommand(command), blockIdentifierForCommand(command)].join("/");
|
|
82339
82238
|
case "reorderPageBlocks": return `${pageIdentifierForBlockCommand(command)}/blocks`;
|
|
82340
|
-
default: assertNever$
|
|
82239
|
+
default: assertNever$24(command);
|
|
82341
82240
|
}
|
|
82342
82241
|
}
|
|
82343
82242
|
function recordPageFailure(result, identifier, message, subject) {
|
|
@@ -82371,7 +82270,7 @@ function incrementPageCounter(result, counter) {
|
|
|
82371
82270
|
case "unpublished":
|
|
82372
82271
|
result.pages.unpublished++;
|
|
82373
82272
|
return;
|
|
82374
|
-
default: assertNever$
|
|
82273
|
+
default: assertNever$24(counter);
|
|
82375
82274
|
}
|
|
82376
82275
|
}
|
|
82377
82276
|
function incrementBlockCounter(result, counter) {
|
|
@@ -82386,7 +82285,7 @@ function incrementBlockCounter(result, counter) {
|
|
|
82386
82285
|
result.blocks.deleted++;
|
|
82387
82286
|
return;
|
|
82388
82287
|
case "reordered": return;
|
|
82389
|
-
default: assertNever$
|
|
82288
|
+
default: assertNever$24(counter);
|
|
82390
82289
|
}
|
|
82391
82290
|
}
|
|
82392
82291
|
function pageReportSubject(input) {
|
|
@@ -82428,7 +82327,7 @@ function compileContentPushExecutionPlan(plan, input, dependencies = {}) {
|
|
|
82428
82327
|
});
|
|
82429
82328
|
break;
|
|
82430
82329
|
}
|
|
82431
|
-
default: assertNever$
|
|
82330
|
+
default: assertNever$24(step);
|
|
82432
82331
|
}
|
|
82433
82332
|
return ok$3({
|
|
82434
82333
|
kind: "compiled-sync-steps",
|
|
@@ -82482,7 +82381,7 @@ async function executeCommandSurfaceAsReport(surface, input) {
|
|
|
82482
82381
|
onBeforeExecute: input.onNavigationCommandCount
|
|
82483
82382
|
})
|
|
82484
82383
|
};
|
|
82485
|
-
default: assertNever$
|
|
82384
|
+
default: assertNever$24(surface);
|
|
82486
82385
|
}
|
|
82487
82386
|
}
|
|
82488
82387
|
function preflightCommandSurfaceAsReport(surface, input) {
|
|
@@ -82507,7 +82406,7 @@ function preflightCommandSurfaceAsReport(surface, input) {
|
|
|
82507
82406
|
surface: "navigation",
|
|
82508
82407
|
report: reportFromOutcomes({ outcomes: [] })
|
|
82509
82408
|
};
|
|
82510
|
-
default: assertNever$
|
|
82409
|
+
default: assertNever$24(surface);
|
|
82511
82410
|
}
|
|
82512
82411
|
}
|
|
82513
82412
|
function skippedRemainingCommandReports(steps) {
|
|
@@ -82519,7 +82418,7 @@ function commandSurfaceReportToSyncResult(report) {
|
|
|
82519
82418
|
case "page": return pageCommandReportToSyncResult(report.report);
|
|
82520
82419
|
case "form": return formCommandReportToSyncResult(report.report);
|
|
82521
82420
|
case "navigation": return navigationCommandReportToSyncResult(report.report);
|
|
82522
|
-
default: assertNever$
|
|
82421
|
+
default: assertNever$24(report);
|
|
82523
82422
|
}
|
|
82524
82423
|
}
|
|
82525
82424
|
function commandSurfaceReportHasFailures(report) {
|
|
@@ -82569,7 +82468,7 @@ function compileCommandSurface(surface, input) {
|
|
|
82569
82468
|
local: input.local
|
|
82570
82469
|
})
|
|
82571
82470
|
};
|
|
82572
|
-
default: assertNever$
|
|
82471
|
+
default: assertNever$24(surface);
|
|
82573
82472
|
}
|
|
82574
82473
|
}
|
|
82575
82474
|
function commandSurfaceCompileSuccess(surface) {
|
|
@@ -82602,7 +82501,7 @@ function commandSurfaceCompileSuccess(surface) {
|
|
|
82602
82501
|
surface: "navigation",
|
|
82603
82502
|
report: navigationCommandCompileErrorToReport(surface.compileResult.error)
|
|
82604
82503
|
}));
|
|
82605
|
-
default: assertNever$
|
|
82504
|
+
default: assertNever$24(surface);
|
|
82606
82505
|
}
|
|
82607
82506
|
}
|
|
82608
82507
|
function contentPushReportWithCommandReport(commandReport) {
|
|
@@ -82632,7 +82531,7 @@ function skippedCommandSurfaceReport(surface) {
|
|
|
82632
82531
|
surface: "navigation",
|
|
82633
82532
|
report: reportFromOutcomes({ outcomes: skippedOutcomes(surface.compileValue.reportedCommands, navigationSkippedIdentifier) })
|
|
82634
82533
|
};
|
|
82635
|
-
default: assertNever$
|
|
82534
|
+
default: assertNever$24(surface);
|
|
82636
82535
|
}
|
|
82637
82536
|
}
|
|
82638
82537
|
function skippedOutcomes(reportedCommands, identifierForSubject) {
|
|
@@ -82651,7 +82550,7 @@ function pageSkippedIdentifier(subject) {
|
|
|
82651
82550
|
switch (subject.resource) {
|
|
82652
82551
|
case "page": return subject.identifier;
|
|
82653
82552
|
case "block": return `${subject.pageIdentifier}/${subject.identifier}`;
|
|
82654
|
-
default: assertNever$
|
|
82553
|
+
default: assertNever$24(subject);
|
|
82655
82554
|
}
|
|
82656
82555
|
}
|
|
82657
82556
|
function formSkippedIdentifier(subject) {
|
|
@@ -82786,7 +82685,7 @@ function planContentPushExecution(input) {
|
|
|
82786
82685
|
case "pages": return pageCommandRouting(input.diff).kind === "command_backed" ? syncPlanWithSteps([commandSurfaceStep("page", "continue")]) : syncPlanWithResidualOnly(input);
|
|
82787
82686
|
case "settings": return syncPlanWithResidualOnly(input);
|
|
82788
82687
|
case "all": return pushAllExecutionPlan(input);
|
|
82789
|
-
default: assertNever$
|
|
82688
|
+
default: assertNever$24(input.pushScope);
|
|
82790
82689
|
}
|
|
82791
82690
|
}
|
|
82792
82691
|
function pushAllExecutionPlan(input) {
|
|
@@ -82922,7 +82821,7 @@ async function executePushExecutionSteps(steps, input, dependencies) {
|
|
|
82922
82821
|
}
|
|
82923
82822
|
break;
|
|
82924
82823
|
}
|
|
82925
|
-
default: assertNever$
|
|
82824
|
+
default: assertNever$24(step);
|
|
82926
82825
|
}
|
|
82927
82826
|
return {
|
|
82928
82827
|
commandReports,
|
|
@@ -84636,7 +84535,7 @@ function entryDiffForDecision(decision, remoteEntries) {
|
|
|
84636
84535
|
case "conflict":
|
|
84637
84536
|
case "preserve_remote":
|
|
84638
84537
|
case "unchanged": return null;
|
|
84639
|
-
default: assertNever$
|
|
84538
|
+
default: assertNever$24(decision);
|
|
84640
84539
|
}
|
|
84641
84540
|
}
|
|
84642
84541
|
function remoteEntryForDecision(decision, remoteEntries) {
|
|
@@ -86696,7 +86595,7 @@ async function applyOneOffEntryCommand(command, client) {
|
|
|
86696
86595
|
case "deleteContentEntry":
|
|
86697
86596
|
await client.entries.delete(command.input.contentTypeKey, entryIdentifierForCommand(command));
|
|
86698
86597
|
return;
|
|
86699
|
-
default: assertNever$
|
|
86598
|
+
default: assertNever$24(command);
|
|
86700
86599
|
}
|
|
86701
86600
|
}
|
|
86702
86601
|
async function applyOneOffEntryCommandReturningEntry(command, client) {
|
|
@@ -86730,7 +86629,7 @@ async function applyOneOffPageCommand(command, client) {
|
|
|
86730
86629
|
case "deletePageBlock":
|
|
86731
86630
|
await client.blocks.delete(pageIdentifierForBlockCommand(command), blockIdentifierForCommand(command));
|
|
86732
86631
|
return;
|
|
86733
|
-
default: assertNever$
|
|
86632
|
+
default: assertNever$24(command);
|
|
86734
86633
|
}
|
|
86735
86634
|
}
|
|
86736
86635
|
async function applyOneOffPageCommandReturningPage(command, client) {
|
|
@@ -86809,7 +86708,7 @@ function oneOffEntryCommandBinding(mutation) {
|
|
|
86809
86708
|
counter: "unpublished"
|
|
86810
86709
|
}
|
|
86811
86710
|
};
|
|
86812
|
-
default: assertNever$
|
|
86711
|
+
default: assertNever$24(mutation);
|
|
86813
86712
|
}
|
|
86814
86713
|
}
|
|
86815
86714
|
function oneOffPageCommandBinding(mutation) {
|
|
@@ -86858,7 +86757,7 @@ function oneOffPageCommandBinding(mutation) {
|
|
|
86858
86757
|
counter: "unpublished"
|
|
86859
86758
|
}
|
|
86860
86759
|
};
|
|
86861
|
-
default: assertNever$
|
|
86760
|
+
default: assertNever$24(mutation);
|
|
86862
86761
|
}
|
|
86863
86762
|
}
|
|
86864
86763
|
function oneOffBlockCommandBinding(mutation) {
|
|
@@ -86907,7 +86806,7 @@ function oneOffBlockCommandBinding(mutation) {
|
|
|
86907
86806
|
}
|
|
86908
86807
|
};
|
|
86909
86808
|
}
|
|
86910
|
-
default: assertNever$
|
|
86809
|
+
default: assertNever$24(mutation);
|
|
86911
86810
|
}
|
|
86912
86811
|
}
|
|
86913
86812
|
function oneOffNavigationCommandBinding(mutation) {
|
|
@@ -86946,7 +86845,7 @@ function navigationCommandRole(command) {
|
|
|
86946
86845
|
case "header": return "primary";
|
|
86947
86846
|
case "footer": return "footer";
|
|
86948
86847
|
case void 0: return;
|
|
86949
|
-
default: return assertNever$
|
|
86848
|
+
default: return assertNever$24(command.input.location);
|
|
86950
86849
|
}
|
|
86951
86850
|
}
|
|
86952
86851
|
function isManagementPage(value) {
|
|
@@ -89120,6 +89019,7 @@ var init_non_block_islands = __esmMin((() => {
|
|
|
89120
89019
|
init_shop_shared();
|
|
89121
89020
|
init_schemas();
|
|
89122
89021
|
init_event_details();
|
|
89022
|
+
init_eventScope();
|
|
89123
89023
|
accordionIslandSchema = z$1.object({
|
|
89124
89024
|
type: z$1.enum(["single", "multiple"]).optional(),
|
|
89125
89025
|
defaultValue: z$1.union([z$1.string(), z$1.array(z$1.string())]).optional(),
|
|
@@ -89161,6 +89061,7 @@ var init_non_block_islands = __esmMin((() => {
|
|
|
89161
89061
|
});
|
|
89162
89062
|
eventDetailsIslandSchema = z$1.object({
|
|
89163
89063
|
occurrenceContext: eventDetailsOccurrenceContextSchema.nullable().optional(),
|
|
89064
|
+
subject: eventRegistrationPageSurfaceSubjectSchema.nullable().optional(),
|
|
89164
89065
|
events: z$1.array(publicEventSchema).nullable().optional(),
|
|
89165
89066
|
showVenue: z$1.boolean().optional(),
|
|
89166
89067
|
showMap: z$1.boolean().optional(),
|
|
@@ -144797,15 +144698,20 @@ var init_usePaymentVerification = __esmMin((() => {
|
|
|
144797
144698
|
//#endregion
|
|
144798
144699
|
//#region ../blocks/src/system/runtime/nodes/event-registration/useEventRegistrationStripeReturn.ts
|
|
144799
144700
|
function useEventRegistrationStripeReturn(options) {
|
|
144701
|
+
return useEventRegistrationStripeReturnWithDeps(options, eventRegistrationStripeReturnDeps);
|
|
144702
|
+
}
|
|
144703
|
+
function useEventRegistrationStripeReturnWithDeps(options, deps) {
|
|
144800
144704
|
const { api, events, occurrenceId, pendingAttendeeId, setErrorMessage, setFormData, setPaymentSelection, setPendingAttendeeId, setRegistrationResult, setSelectedEvent, setSelectedAttendanceMode, setTicketSelections, setStep, setTicketsCount, step } = options;
|
|
144801
|
-
const
|
|
144705
|
+
const verificationConfig = useMemo(() => step === "verifying-payment" && pendingAttendeeId ? { transactionId: pendingAttendeeId } : null, [step, pendingAttendeeId]);
|
|
144706
|
+
const verification = deps.usePaymentVerification(verificationConfig);
|
|
144802
144707
|
useEffect(() => {
|
|
144803
|
-
cleanupStaleRegistrations();
|
|
144804
|
-
const registrationStatus = consumeSearchParam("registration");
|
|
144805
|
-
if (
|
|
144708
|
+
deps.cleanupStaleRegistrations();
|
|
144709
|
+
const registrationStatus = deps.consumeSearchParam("registration");
|
|
144710
|
+
if (registrationStatus !== "cancelled" && registrationStatus !== "success") return;
|
|
144711
|
+
deps.scrollToBlock(EVENT_REGISTRATION_ANCHOR_ID);
|
|
144806
144712
|
const siteId = api.config.siteId;
|
|
144807
144713
|
if (!siteId) return;
|
|
144808
|
-
const pending = getPendingRegistration(siteId, occurrenceId || void 0);
|
|
144714
|
+
const pending = deps.getPendingRegistration(siteId, occurrenceId || void 0);
|
|
144809
144715
|
if (!pending) return;
|
|
144810
144716
|
setFormData(pending.formData);
|
|
144811
144717
|
setTicketSelections(pending.ticketSelections);
|
|
@@ -144825,7 +144731,7 @@ function useEventRegistrationStripeReturn(options) {
|
|
|
144825
144731
|
useEffect(() => {
|
|
144826
144732
|
if (verification.status === "completed") {
|
|
144827
144733
|
const siteId = api.config.siteId;
|
|
144828
|
-
if (siteId && occurrenceId) clearPendingRegistration(siteId, occurrenceId);
|
|
144734
|
+
if (siteId && occurrenceId) deps.clearPendingRegistration(siteId, occurrenceId);
|
|
144829
144735
|
setRegistrationResult({ status: "confirmed" });
|
|
144830
144736
|
setStep("success");
|
|
144831
144737
|
} else if (verification.status === "failed") {
|
|
@@ -144845,11 +144751,21 @@ function useEventRegistrationStripeReturn(options) {
|
|
|
144845
144751
|
]);
|
|
144846
144752
|
return verification;
|
|
144847
144753
|
}
|
|
144754
|
+
var eventRegistrationStripeReturnDeps;
|
|
144848
144755
|
var init_useEventRegistrationStripeReturn = __esmMin((() => {
|
|
144849
144756
|
init_usePaymentVerification();
|
|
144850
144757
|
init_shared();
|
|
144758
|
+
init_constants();
|
|
144851
144759
|
init_sessionStorage();
|
|
144852
144760
|
init_ticketSelectionLines();
|
|
144761
|
+
eventRegistrationStripeReturnDeps = {
|
|
144762
|
+
usePaymentVerification,
|
|
144763
|
+
consumeSearchParam,
|
|
144764
|
+
scrollToBlock,
|
|
144765
|
+
cleanupStaleRegistrations,
|
|
144766
|
+
clearPendingRegistration,
|
|
144767
|
+
getPendingRegistration
|
|
144768
|
+
};
|
|
144853
144769
|
}));
|
|
144854
144770
|
//#endregion
|
|
144855
144771
|
//#region ../blocks/src/system/runtime/nodes/event-registration/useEventRegistrationSubmit.ts
|
|
@@ -144941,13 +144857,7 @@ function useEventRegistrationSubmitWithDeps(options, deps) {
|
|
|
144941
144857
|
if (!result.alreadyRegistered && result.status === "confirmed" && result.pendingPayment && (method === "stripe" || method === "pass_bundle" || method === "membership_bundle")) {
|
|
144942
144858
|
options.setPendingAttendeeId(result.attendeeId);
|
|
144943
144859
|
options.setStep("redirecting");
|
|
144944
|
-
const
|
|
144945
|
-
const successParams = new URLSearchParams(currentUrl.search);
|
|
144946
|
-
successParams.set("registration", "success");
|
|
144947
|
-
const successUrl = `${currentUrl.origin}${currentUrl.pathname}?${successParams.toString()}${currentUrl.hash}`;
|
|
144948
|
-
const cancelParams = new URLSearchParams(currentUrl.search);
|
|
144949
|
-
cancelParams.set("registration", "cancelled");
|
|
144950
|
-
const cancelUrl = `${currentUrl.origin}${currentUrl.pathname}?${cancelParams.toString()}${currentUrl.hash}`;
|
|
144860
|
+
const { successUrl, cancelUrl } = buildCheckoutReturnUrls("registration", EVENT_REGISTRATION_ANCHOR_ID);
|
|
144951
144861
|
const checkoutType = method === "pass_bundle" ? "pass_bundle" : method === "membership_bundle" ? "membership_bundle" : "event";
|
|
144952
144862
|
const checkoutResult = await options.api.createEventCheckout({
|
|
144953
144863
|
attendeeId: result.attendeeId,
|
|
@@ -145012,6 +144922,8 @@ function useEventRegistrationSubmitWithDeps(options, deps) {
|
|
|
145012
144922
|
}
|
|
145013
144923
|
var eventRegistrationSubmitDeps;
|
|
145014
144924
|
var init_useEventRegistrationSubmit = __esmMin((() => {
|
|
144925
|
+
init_shared();
|
|
144926
|
+
init_constants();
|
|
145015
144927
|
init_sessionStorage();
|
|
145016
144928
|
init_ticketSelectionLines();
|
|
145017
144929
|
eventRegistrationSubmitDeps = { savePendingRegistration };
|
|
@@ -146410,6 +146322,7 @@ var init_LeafletStaticMap = __esmMin((() => {
|
|
|
146410
146322
|
function toEventDetailsClientProps(props) {
|
|
146411
146323
|
return {
|
|
146412
146324
|
occurrenceContext: props.occurrenceContext,
|
|
146325
|
+
subject: props.subject,
|
|
146413
146326
|
events: props.events ? [...props.events] : props.events,
|
|
146414
146327
|
showVenue: props.showVenue,
|
|
146415
146328
|
showMap: props.showMap,
|
|
@@ -146425,10 +146338,11 @@ function toEventDetailsClientProps(props) {
|
|
|
146425
146338
|
nowIso: props.nowIso
|
|
146426
146339
|
};
|
|
146427
146340
|
}
|
|
146428
|
-
function EventDetailsClient({ occurrenceContext, events, showVenue = true, showMap = true, showOtherDates = true, otherDatesLimit, showCost = true, showAcceptedPasses = true, showAcceptedMemberships = true, sitePasses, siteMemberships, autoApplyDiscount, className, nowIso, children }) {
|
|
146341
|
+
function EventDetailsClient({ occurrenceContext, subject, events, showVenue = true, showMap = true, showOtherDates = true, otherDatesLimit, showCost = true, showAcceptedPasses = true, showAcceptedMemberships = true, sitePasses, siteMemberships, autoApplyDiscount, className, nowIso, children }) {
|
|
146429
146342
|
const selection = selectEventDetails({
|
|
146430
146343
|
events: events ?? null,
|
|
146431
146344
|
occurrenceContext: occurrenceContext ?? null,
|
|
146345
|
+
subject,
|
|
146432
146346
|
nowIso: nowIso ?? (/* @__PURE__ */ new Date()).toISOString(),
|
|
146433
146347
|
otherDatesLimit
|
|
146434
146348
|
});
|
|
@@ -151951,7 +151865,7 @@ function PassesMembershipsController({ render }) {
|
|
|
151951
151865
|
case "redirect":
|
|
151952
151866
|
window.location.href = result.checkoutUrl;
|
|
151953
151867
|
return;
|
|
151954
|
-
default: return assertNever$
|
|
151868
|
+
default: return assertNever$24(result);
|
|
151955
151869
|
}
|
|
151956
151870
|
} catch (submitError) {
|
|
151957
151871
|
dispatch({
|
|
@@ -152830,7 +152744,7 @@ init_media();
|
|
|
152830
152744
|
init_src$3();
|
|
152831
152745
|
//#endregion
|
|
152832
152746
|
//#region ../blocks/src/rendering/server.ts
|
|
152833
|
-
init_schema$
|
|
152747
|
+
init_schema$2();
|
|
152834
152748
|
//#endregion
|
|
152835
152749
|
//#region ../theme-core/src/index.ts
|
|
152836
152750
|
init_schema();
|
|
@@ -152957,7 +152871,7 @@ var SimpleCache = class {
|
|
|
152957
152871
|
* 1. This constant
|
|
152958
152872
|
* 2. The "version" field in package.json
|
|
152959
152873
|
*/
|
|
152960
|
-
const SDK_VERSION = "0.
|
|
152874
|
+
const SDK_VERSION = "0.126.0";
|
|
152961
152875
|
//#endregion
|
|
152962
152876
|
//#region src/client/error.ts
|
|
152963
152877
|
/**
|
|
@@ -159914,6 +159828,211 @@ const envStatusCommand = new Command("status").description("Show which environme
|
|
|
159914
159828
|
}));
|
|
159915
159829
|
const envCommand = new Command("env").description("Environment configuration and status").addCommand(envStatusCommand);
|
|
159916
159830
|
//#endregion
|
|
159831
|
+
//#region ../api/src/sdk-event-schedule.ts
|
|
159832
|
+
const timeRegex = /^([01]\d|2[0-3]):([0-5]\d)(:([0-5]\d))?$/;
|
|
159833
|
+
const explicitOffsetDateTimeRegex = /^(\d{4})-(\d{2})-(\d{2})T([01]\d|2[0-3]):([0-5]\d)(?::([0-5]\d))?(\.\d{1,3})?(Z|[+-]([01]\d|2[0-3]):[0-5]\d)$/;
|
|
159834
|
+
const localDateTimeRegex = /^(\d{4})-(\d{2})-(\d{2})T([01]\d|2[0-3]):([0-5]\d)(?::([0-5]\d))?(\.\d{1,3})?$/;
|
|
159835
|
+
function issue(path, message) {
|
|
159836
|
+
return {
|
|
159837
|
+
path,
|
|
159838
|
+
message
|
|
159839
|
+
};
|
|
159840
|
+
}
|
|
159841
|
+
function isValidDateParts(year, month, day) {
|
|
159842
|
+
const date = new Date(Date.UTC(year, month - 1, day));
|
|
159843
|
+
return date.getUTCFullYear() === year && date.getUTCMonth() === month - 1 && date.getUTCDate() === day;
|
|
159844
|
+
}
|
|
159845
|
+
function isZeroFraction(fraction) {
|
|
159846
|
+
return fraction === void 0 || /^\.0+$/.test(fraction);
|
|
159847
|
+
}
|
|
159848
|
+
function datePart(year, month, day) {
|
|
159849
|
+
return `${year}-${month}-${day}`;
|
|
159850
|
+
}
|
|
159851
|
+
function timePart(hours, minutes, seconds = "00") {
|
|
159852
|
+
return `${hours}:${minutes}:${seconds}`;
|
|
159853
|
+
}
|
|
159854
|
+
function parseSdkEventDateTime(value) {
|
|
159855
|
+
const explicitMatch = explicitOffsetDateTimeRegex.exec(value);
|
|
159856
|
+
if (explicitMatch) {
|
|
159857
|
+
const [, yearRaw, monthRaw, dayRaw, hours, minutes, seconds = "00", fraction] = explicitMatch;
|
|
159858
|
+
if (!yearRaw || !monthRaw || !dayRaw || !hours || !minutes) return null;
|
|
159859
|
+
if (!isValidDateParts(Number(yearRaw), Number(monthRaw), Number(dayRaw)) || !isZeroFraction(fraction)) return null;
|
|
159860
|
+
const epochMs = Date.parse(value);
|
|
159861
|
+
if (!Number.isFinite(epochMs)) return null;
|
|
159862
|
+
return {
|
|
159863
|
+
epochMs,
|
|
159864
|
+
date: datePart(yearRaw, monthRaw, dayRaw),
|
|
159865
|
+
time: timePart(hours, minutes, seconds),
|
|
159866
|
+
iso: new Date(epochMs).toISOString()
|
|
159867
|
+
};
|
|
159868
|
+
}
|
|
159869
|
+
const localMatch = localDateTimeRegex.exec(value);
|
|
159870
|
+
if (!localMatch) return null;
|
|
159871
|
+
const [, yearRaw, monthRaw, dayRaw, hours, minutes, seconds = "00", fraction] = localMatch;
|
|
159872
|
+
if (!yearRaw || !monthRaw || !dayRaw || !hours || !minutes) return null;
|
|
159873
|
+
const year = Number(yearRaw);
|
|
159874
|
+
const month = Number(monthRaw);
|
|
159875
|
+
const day = Number(dayRaw);
|
|
159876
|
+
if (!isValidDateParts(year, month, day) || !isZeroFraction(fraction)) return null;
|
|
159877
|
+
const epochMs = Date.UTC(year, month - 1, day, Number(hours), Number(minutes), Number(seconds));
|
|
159878
|
+
return {
|
|
159879
|
+
epochMs,
|
|
159880
|
+
date: datePart(yearRaw, monthRaw, dayRaw),
|
|
159881
|
+
time: timePart(hours, minutes, seconds),
|
|
159882
|
+
iso: new Date(epochMs).toISOString()
|
|
159883
|
+
};
|
|
159884
|
+
}
|
|
159885
|
+
function durationMinutesBetween(startsAt, endsAt) {
|
|
159886
|
+
if (endsAt.epochMs <= startsAt.epochMs) return null;
|
|
159887
|
+
const durationMs = endsAt.epochMs - startsAt.epochMs;
|
|
159888
|
+
if (durationMs % 6e4 !== 0) return null;
|
|
159889
|
+
return durationMs / 6e4;
|
|
159890
|
+
}
|
|
159891
|
+
function exceedsMaxDuration(durationMinutes, options) {
|
|
159892
|
+
return options.maxDurationMinutes !== void 0 && durationMinutes > options.maxDurationMinutes;
|
|
159893
|
+
}
|
|
159894
|
+
function maxDurationMessage(options) {
|
|
159895
|
+
return options.maxDurationDays === void 0 ? "Duration is above the allowed maximum" : `Duration must be ${options.maxDurationDays} days or less`;
|
|
159896
|
+
}
|
|
159897
|
+
function classifyCanonicalSchedule(input, options) {
|
|
159898
|
+
const issues = [];
|
|
159899
|
+
if (options.requireCanonicalFields && input.recurrenceRule === void 0) issues.push(issue(["recurrenceRule"], "recurrenceRule is required"));
|
|
159900
|
+
if (input.defaultStartTime !== void 0 && input.defaultStartTime !== null && !timeRegex.test(input.defaultStartTime)) issues.push(issue(["defaultStartTime"], "Invalid time format (HH:MM or HH:MM:SS)"));
|
|
159901
|
+
if (options.requireCanonicalFields && !input.defaultStartTime) issues.push(issue(["defaultStartTime"], "defaultStartTime is required"));
|
|
159902
|
+
if (options.requireCanonicalFields && input.durationMinutes === void 0) issues.push(issue(["durationMinutes"], "durationMinutes is required"));
|
|
159903
|
+
if (input.durationMinutes !== void 0 && input.durationMinutes !== null) {
|
|
159904
|
+
if (input.durationMinutes < 1) issues.push(issue(["durationMinutes"], "durationMinutes must be at least 1"));
|
|
159905
|
+
else if (exceedsMaxDuration(input.durationMinutes, options)) issues.push(issue(["durationMinutes"], maxDurationMessage(options)));
|
|
159906
|
+
}
|
|
159907
|
+
if (issues.length > 0) return {
|
|
159908
|
+
ok: false,
|
|
159909
|
+
issues
|
|
159910
|
+
};
|
|
159911
|
+
return {
|
|
159912
|
+
ok: true,
|
|
159913
|
+
kind: "canonical",
|
|
159914
|
+
canonical: {
|
|
159915
|
+
recurrenceRule: input.recurrenceRule ?? null,
|
|
159916
|
+
startDate: input.startDate,
|
|
159917
|
+
defaultStartTime: input.defaultStartTime ?? "09:00:00",
|
|
159918
|
+
durationMinutes: input.durationMinutes ?? 60
|
|
159919
|
+
}
|
|
159920
|
+
};
|
|
159921
|
+
}
|
|
159922
|
+
function classifySdkEventSchedule(input, options = {}) {
|
|
159923
|
+
const issues = [];
|
|
159924
|
+
const hasStartsAt = input.startsAt !== void 0 && input.startsAt !== null;
|
|
159925
|
+
const hasEndsAt = input.endsAt !== void 0 && input.endsAt !== null;
|
|
159926
|
+
const hasDateTimeDuration = hasStartsAt && input.durationMinutes !== void 0 && input.durationMinutes !== null;
|
|
159927
|
+
const hasCanonicalStart = input.startDate !== void 0 || input.defaultStartTime !== void 0;
|
|
159928
|
+
if (!hasStartsAt && !hasEndsAt) return classifyCanonicalSchedule(input, options);
|
|
159929
|
+
if (hasStartsAt && hasCanonicalStart) issues.push(issue(["startsAt"], "Use either startsAt or startDate/defaultStartTime, not both"));
|
|
159930
|
+
if (input.recurrenceRule) issues.push(issue(["recurrenceRule"], "startsAt schedules are only supported for one-off events"));
|
|
159931
|
+
if (!hasStartsAt) issues.push(issue(["startsAt"], "startsAt is required when endsAt is provided"));
|
|
159932
|
+
if (!hasEndsAt && !hasDateTimeDuration) issues.push(issue(["endsAt"], "Provide either endsAt or durationMinutes with startsAt"));
|
|
159933
|
+
if (hasEndsAt && hasDateTimeDuration) issues.push(issue(["endsAt"], "Use either endsAt or durationMinutes with startsAt, not both"));
|
|
159934
|
+
const startsAt = typeof input.startsAt === "string" ? parseSdkEventDateTime(input.startsAt) : null;
|
|
159935
|
+
const endsAt = typeof input.endsAt === "string" ? parseSdkEventDateTime(input.endsAt) : null;
|
|
159936
|
+
if (hasStartsAt && !startsAt) issues.push(issue(["startsAt"], "Invalid datetime format. Use ISO datetime format, e.g. 2026-06-01T10:00:00Z"));
|
|
159937
|
+
if (hasEndsAt && !endsAt) issues.push(issue(["endsAt"], "Invalid datetime format. Use ISO datetime format, e.g. 2026-06-07T10:00:00Z"));
|
|
159938
|
+
if (startsAt && endsAt) {
|
|
159939
|
+
const durationMinutes = durationMinutesBetween(startsAt, endsAt);
|
|
159940
|
+
if (durationMinutes === null) issues.push(issue(["endsAt"], "endsAt must be after startsAt and align to a whole minute"));
|
|
159941
|
+
else if (exceedsMaxDuration(durationMinutes, options)) issues.push(issue(["endsAt"], maxDurationMessage(options)));
|
|
159942
|
+
if (issues.length === 0 && durationMinutes !== null) return {
|
|
159943
|
+
ok: true,
|
|
159944
|
+
kind: "start-end",
|
|
159945
|
+
canonical: {
|
|
159946
|
+
recurrenceRule: null,
|
|
159947
|
+
startDate: startsAt.date,
|
|
159948
|
+
defaultStartTime: startsAt.time,
|
|
159949
|
+
durationMinutes
|
|
159950
|
+
},
|
|
159951
|
+
startsAtIso: startsAt.iso,
|
|
159952
|
+
endsAtIso: endsAt.iso
|
|
159953
|
+
};
|
|
159954
|
+
}
|
|
159955
|
+
if (startsAt && hasDateTimeDuration && input.durationMinutes !== void 0 && input.durationMinutes !== null) {
|
|
159956
|
+
if (input.durationMinutes < 1) issues.push(issue(["durationMinutes"], "durationMinutes must be at least 1"));
|
|
159957
|
+
else if (exceedsMaxDuration(input.durationMinutes, options)) issues.push(issue(["durationMinutes"], maxDurationMessage(options)));
|
|
159958
|
+
if (issues.length === 0) {
|
|
159959
|
+
const endsAtMs = startsAt.epochMs + input.durationMinutes * 6e4;
|
|
159960
|
+
return {
|
|
159961
|
+
ok: true,
|
|
159962
|
+
kind: "start-duration",
|
|
159963
|
+
canonical: {
|
|
159964
|
+
recurrenceRule: null,
|
|
159965
|
+
startDate: startsAt.date,
|
|
159966
|
+
defaultStartTime: startsAt.time,
|
|
159967
|
+
durationMinutes: input.durationMinutes
|
|
159968
|
+
},
|
|
159969
|
+
startsAtIso: startsAt.iso,
|
|
159970
|
+
endsAtIso: new Date(endsAtMs).toISOString()
|
|
159971
|
+
};
|
|
159972
|
+
}
|
|
159973
|
+
}
|
|
159974
|
+
return {
|
|
159975
|
+
ok: false,
|
|
159976
|
+
issues
|
|
159977
|
+
};
|
|
159978
|
+
}
|
|
159979
|
+
//#endregion
|
|
159980
|
+
//#region ../api/src/sdk-event-upsert.ts
|
|
159981
|
+
const sdkEventOccurrenceInputSchema = z$1.object({
|
|
159982
|
+
startsAt: z$1.string().datetime({ offset: true }),
|
|
159983
|
+
endsAt: z$1.string().datetime({ offset: true }),
|
|
159984
|
+
timeZone: z$1.string().min(1).refine((value) => {
|
|
159985
|
+
try {
|
|
159986
|
+
new Intl.DateTimeFormat("en", { timeZone: value });
|
|
159987
|
+
return true;
|
|
159988
|
+
} catch {
|
|
159989
|
+
return false;
|
|
159990
|
+
}
|
|
159991
|
+
}, "Invalid IANA timezone")
|
|
159992
|
+
}).refine(({ startsAt, endsAt }) => Date.parse(endsAt) > Date.parse(startsAt), {
|
|
159993
|
+
path: ["endsAt"],
|
|
159994
|
+
message: "endsAt must be after startsAt"
|
|
159995
|
+
});
|
|
159996
|
+
const sdkEventUpsertOptionalFieldSchemas = {
|
|
159997
|
+
path: z$1.string().startsWith("/", "path must start with /").nullable().optional(),
|
|
159998
|
+
status: z$1.enum([
|
|
159999
|
+
"draft",
|
|
160000
|
+
"active",
|
|
160001
|
+
"archived",
|
|
160002
|
+
"cancelled",
|
|
160003
|
+
"completed"
|
|
160004
|
+
]).optional(),
|
|
160005
|
+
visibility: z$1.enum([
|
|
160006
|
+
"private",
|
|
160007
|
+
"public",
|
|
160008
|
+
"unlisted"
|
|
160009
|
+
]).optional(),
|
|
160010
|
+
preset: z$1.enum([
|
|
160011
|
+
"event",
|
|
160012
|
+
"class",
|
|
160013
|
+
"course",
|
|
160014
|
+
"workshop",
|
|
160015
|
+
"retreat",
|
|
160016
|
+
"performance"
|
|
160017
|
+
]).optional(),
|
|
160018
|
+
bookingScope: z$1.enum(["single_occurrence", "whole_series"]).optional(),
|
|
160019
|
+
occurrences: z$1.array(sdkEventOccurrenceInputSchema).min(1).optional(),
|
|
160020
|
+
capacity: z$1.number().int().positive().nullable().optional()
|
|
160021
|
+
};
|
|
160022
|
+
//#endregion
|
|
160023
|
+
//#region src/cli/commands/eventOccurrenceSchedule.ts
|
|
160024
|
+
function portableEventScheduleOutput(event) {
|
|
160025
|
+
return {
|
|
160026
|
+
schedule: event.schedule,
|
|
160027
|
+
preset: event.preset,
|
|
160028
|
+
bookingScope: event.bookingScope,
|
|
160029
|
+
occurrences: event.occurrences
|
|
160030
|
+
};
|
|
160031
|
+
}
|
|
160032
|
+
function canCancelEventStatus(status) {
|
|
160033
|
+
return status === "draft" || status === "active";
|
|
160034
|
+
}
|
|
160035
|
+
//#endregion
|
|
159917
160036
|
//#region src/cli/commands/event.ts
|
|
159918
160037
|
const eventScheduleInputSchema = z$1.object({
|
|
159919
160038
|
recurrenceRule: z$1.string().nullable().optional(),
|
|
@@ -159984,21 +160103,8 @@ const eventUpsertInputSchema = z$1.object({
|
|
|
159984
160103
|
identifier: z$1.string().min(1).optional(),
|
|
159985
160104
|
title: z$1.string().min(1, "title is required"),
|
|
159986
160105
|
slug: z$1.string().min(1).optional(),
|
|
159987
|
-
|
|
159988
|
-
|
|
159989
|
-
"draft",
|
|
159990
|
-
"active",
|
|
159991
|
-
"archived",
|
|
159992
|
-
"cancelled",
|
|
159993
|
-
"completed"
|
|
159994
|
-
]).optional(),
|
|
159995
|
-
visibility: z$1.enum([
|
|
159996
|
-
"private",
|
|
159997
|
-
"public",
|
|
159998
|
-
"unlisted"
|
|
159999
|
-
]).optional(),
|
|
160000
|
-
schedule: eventScheduleInputSchema,
|
|
160001
|
-
capacity: z$1.number().int().positive().nullable().optional(),
|
|
160106
|
+
...sdkEventUpsertOptionalFieldSchemas,
|
|
160107
|
+
schedule: eventScheduleInputSchema.optional(),
|
|
160002
160108
|
pricing: eventPricingInputSchema.optional(),
|
|
160003
160109
|
paymentTerms: eventPaymentTermsInputSchema.optional(),
|
|
160004
160110
|
venueRef: z$1.string().nullable().optional(),
|
|
@@ -160009,6 +160115,17 @@ const eventUpsertInputSchema = z$1.object({
|
|
|
160009
160115
|
presentation: z$1.record(z$1.string(), z$1.unknown()).nullable().optional(),
|
|
160010
160116
|
tags: z$1.array(z$1.string()).optional(),
|
|
160011
160117
|
blocks: sdkEntrySlotBlocksInputSchema.optional()
|
|
160118
|
+
}).superRefine((input, ctx) => {
|
|
160119
|
+
if (input.occurrences && !input.bookingScope) ctx.addIssue({
|
|
160120
|
+
code: "custom",
|
|
160121
|
+
path: ["bookingScope"],
|
|
160122
|
+
message: "bookingScope is required when occurrences are provided"
|
|
160123
|
+
});
|
|
160124
|
+
if (new Set(input.occurrences?.map((occurrence) => occurrence.timeZone)).size > 1) ctx.addIssue({
|
|
160125
|
+
code: "custom",
|
|
160126
|
+
path: ["occurrences"],
|
|
160127
|
+
message: "all occurrences must use the same timeZone"
|
|
160128
|
+
});
|
|
160012
160129
|
});
|
|
160013
160130
|
const formatEventRow = (event) => [
|
|
160014
160131
|
event.identifier,
|
|
@@ -160022,23 +160139,25 @@ function toEventUpsertInput(identifier, raw) {
|
|
|
160022
160139
|
if (parsedIdentifier && parsedIdentifier !== identifier) throw new Error(`Identifier mismatch: argument "${identifier}" does not match payload identifier "${parsedIdentifier}".`);
|
|
160023
160140
|
const parsedStatus = parsed.status;
|
|
160024
160141
|
const status = parsedStatus === "completed" ? void 0 : parsedStatus;
|
|
160142
|
+
const firstOccurrence = parsed.occurrences?.[0];
|
|
160143
|
+
const schedule = parsed.schedule ?? (firstOccurrence ? scheduleFromExplicitEventOccurrence(firstOccurrence) : null);
|
|
160144
|
+
if (!schedule) throw new Error("schedule is required when no explicit occurrences are provided");
|
|
160025
160145
|
return {
|
|
160026
160146
|
...parsed,
|
|
160027
160147
|
identifier,
|
|
160028
160148
|
slug: parsed.slug ?? identifier,
|
|
160029
|
-
status
|
|
160149
|
+
status,
|
|
160150
|
+
schedule
|
|
160030
160151
|
};
|
|
160031
160152
|
}
|
|
160032
160153
|
function buildCancelledEventUpsertInput(current) {
|
|
160033
|
-
const { id: _id, createdAt: _createdAt, updatedAt: _updatedAt, contentUpdatedAt: _contentUpdatedAt, ...rest } = current;
|
|
160154
|
+
const { id: _id, createdAt: _createdAt, updatedAt: _updatedAt, contentUpdatedAt: _contentUpdatedAt, occurrences, ...rest } = current;
|
|
160034
160155
|
return {
|
|
160035
160156
|
...rest,
|
|
160157
|
+
...occurrences.length > 0 ? { occurrences } : {},
|
|
160036
160158
|
status: "cancelled"
|
|
160037
160159
|
};
|
|
160038
160160
|
}
|
|
160039
|
-
function canCancelEventStatus(status) {
|
|
160040
|
-
return status === "draft" || status === "active";
|
|
160041
|
-
}
|
|
160042
160161
|
const upsertCommand = new Command("upsert").description("Create or update an event series").argument("<identifier>", "Event identifier").option("--data <json>", "Event payload as JSON string").option("--file <path>", "Path to JSON file with event payload").action(withErrorHandling(async (identifier, options, command) => {
|
|
160043
160162
|
const { output, client } = createCommandContext(command);
|
|
160044
160163
|
const raw = await parseJsonData(options);
|
|
@@ -160063,7 +160182,7 @@ const getCommand = createGetCommand({
|
|
|
160063
160182
|
slug: event.slug,
|
|
160064
160183
|
status: event.status,
|
|
160065
160184
|
visibility: event.visibility,
|
|
160066
|
-
|
|
160185
|
+
...portableEventScheduleOutput(event),
|
|
160067
160186
|
capacity: event.capacity,
|
|
160068
160187
|
pricing: event.pricing,
|
|
160069
160188
|
paymentTerms: event.paymentTerms,
|
|
@@ -160510,17 +160629,10 @@ async function readLegacyEventEntries(contentDir) {
|
|
|
160510
160629
|
return entries;
|
|
160511
160630
|
}
|
|
160512
160631
|
async function readCanonicalEventsWithPaths(contentDir) {
|
|
160513
|
-
|
|
160514
|
-
|
|
160515
|
-
|
|
160516
|
-
|
|
160517
|
-
const event = await readJsonFile(filePath);
|
|
160518
|
-
events.push({
|
|
160519
|
-
event,
|
|
160520
|
-
filePath
|
|
160521
|
-
});
|
|
160522
|
-
}
|
|
160523
|
-
return events;
|
|
160632
|
+
return (await readEventsWithFilePaths(contentDir)).map(({ filePath, ...event }) => ({
|
|
160633
|
+
event,
|
|
160634
|
+
filePath
|
|
160635
|
+
}));
|
|
160524
160636
|
}
|
|
160525
160637
|
function findCandidateEvents(legacy, eventsByIdentifier, eventsBySlug) {
|
|
160526
160638
|
const byIdentifier = eventsByIdentifier.get(legacy.entry.identifier);
|
|
@@ -161083,15 +161195,19 @@ function buildStyleSelectionApplyInputFromOptions(options) {
|
|
|
161083
161195
|
headerLayoutId: siteStyle?.defaultHeaderSelection.layoutId ?? guaranteedFallbackHeaderLayoutId,
|
|
161084
161196
|
headerStyleId: siteStyle?.defaultHeaderSelection.styleId ?? guaranteedFallbackHeaderStyleId,
|
|
161085
161197
|
footerLookId: null
|
|
161086
|
-
},
|
|
161198
|
+
}, parsePalette(options.palette), baseSelectionVersion, options.selectionId ?? null);
|
|
161087
161199
|
}
|
|
161088
161200
|
/** Builds the complete first-theme command without reading current selection state. */
|
|
161089
161201
|
function buildStyleSelectionInitializeCommandFromOptions(options) {
|
|
161090
161202
|
const siteStyle = getCuratedSiteStyle(asSiteStyleId(options.siteStyleId));
|
|
161091
161203
|
if (!siteStyle) throw new Error(`Unknown curated site style: ${options.siteStyleId}`);
|
|
161092
|
-
return buildApplySiteStyleSelectionCommand(buildStyleSelectionInputFromOptions(options, styleSelectionInitializationDefaults(siteStyle),
|
|
161204
|
+
return buildApplySiteStyleSelectionCommand(buildStyleSelectionInputFromOptions(options, styleSelectionInitializationDefaults(siteStyle), parseInitializationPalette(options.palette, siteStyle), 0, null));
|
|
161093
161205
|
}
|
|
161094
|
-
function buildStyleSelectionInputFromOptions(options, defaults,
|
|
161206
|
+
function buildStyleSelectionInputFromOptions(options, defaults, palette, baseSelectionVersion, selectionId) {
|
|
161207
|
+
const paletteChange = palette ? [{
|
|
161208
|
+
kind: "set-palette",
|
|
161209
|
+
palette
|
|
161210
|
+
}] : [];
|
|
161095
161211
|
return {
|
|
161096
161212
|
siteStyleRef: options.siteStyleId,
|
|
161097
161213
|
changes: [
|
|
@@ -161103,10 +161219,7 @@ function buildStyleSelectionInputFromOptions(options, defaults, paletteCommand,
|
|
|
161103
161219
|
kind: "set-button-style",
|
|
161104
161220
|
buttonStyleSelection: parseButtonStyleSelection(options, defaults)
|
|
161105
161221
|
},
|
|
161106
|
-
|
|
161107
|
-
kind: "set-palette",
|
|
161108
|
-
command: paletteCommand
|
|
161109
|
-
},
|
|
161222
|
+
...paletteChange,
|
|
161110
161223
|
{
|
|
161111
161224
|
kind: "set-typography",
|
|
161112
161225
|
typography: parseTypography(options.typography, defaults.typography)
|
|
@@ -161169,24 +161282,17 @@ function parseTypography(value, fallback) {
|
|
|
161169
161282
|
}
|
|
161170
161283
|
return typographySchema.parse(parsed);
|
|
161171
161284
|
}
|
|
161172
|
-
function
|
|
161173
|
-
if (value === void 0 || value.trim() === "") return
|
|
161174
|
-
return
|
|
161285
|
+
function parsePalette(value) {
|
|
161286
|
+
if (value === void 0 || value.trim() === "") return null;
|
|
161287
|
+
return paletteSchema.parse(JSON.parse(value));
|
|
161175
161288
|
}
|
|
161176
|
-
function
|
|
161289
|
+
function parseInitializationPalette(value, siteStyle) {
|
|
161177
161290
|
if (value === void 0 || value.trim() === "") {
|
|
161178
161291
|
const palette = findCuratedPalette(defaultPaletteForSiteStyle(siteStyle));
|
|
161179
161292
|
if (!palette) throw new Error(`Missing default palette for curated site style: ${siteStyle.id}`);
|
|
161180
|
-
return
|
|
161181
|
-
kind: "create-site",
|
|
161182
|
-
colors: palette.colors,
|
|
161183
|
-
mode: palette.mode,
|
|
161184
|
-
origin: { kind: "manual" }
|
|
161185
|
-
};
|
|
161293
|
+
return concretePaletteToTheme(palette);
|
|
161186
161294
|
}
|
|
161187
|
-
|
|
161188
|
-
if (command.kind !== "create-site" || command.origin.kind !== "manual") throw new Error("--palette-command for style init must be a complete manual create-site command");
|
|
161189
|
-
return command;
|
|
161295
|
+
return paletteSchema.parse(JSON.parse(value));
|
|
161190
161296
|
}
|
|
161191
161297
|
function buildStyleCatalogListRows(styles = curatedSiteStyles, options = {}) {
|
|
161192
161298
|
return (options.siteStyleId ? styles.filter((style) => String(style.id) === options.siteStyleId) : styles).map((style) => ({
|
|
@@ -161284,7 +161390,7 @@ const listCommand = new Command("list").description("List curated site styles an
|
|
|
161284
161390
|
"Footer Looks"
|
|
161285
161391
|
], rows.map(formatStyleCatalogListRow));
|
|
161286
161392
|
}));
|
|
161287
|
-
const applyCommand = new Command("apply").description("Apply a curated site-style selection").requiredOption("--site-style-id <id>", "Site style ID, e.g. site-style:calm-studio").requiredOption("--base-selection-version <version>", "Current style selection version").option("--selection-id <id>", "Current style selection row ID").option("--button-style-id <id>", "Button style ID").option("--button-style-parameters <json>", "Button style parameter object as JSON").option("--palette
|
|
161393
|
+
const applyCommand = new Command("apply").description("Apply a curated site-style selection").requiredOption("--site-style-id <id>", "Site style ID, e.g. site-style:calm-studio").requiredOption("--base-selection-version <version>", "Current style selection version").option("--selection-id <id>", "Current style selection row ID").option("--button-style-id <id>", "Button style ID").option("--button-style-parameters <json>", "Button style parameter object as JSON").option("--palette <json>", "Complete theme palette JSON").option("--typography <json>", "Complete typography JSON (defaults to the site style typography)").option("--header-look-id <id>", "Legacy header look bridge ID").option("--header-layout-id <id>", "Header layout ID").option("--header-style-id <id>", "Header style ID").option("--footer-look-id <id>", "Footer look ID").action(withErrorHandling(async (options, command) => {
|
|
161288
161394
|
const { output, client } = createCommandContext(command);
|
|
161289
161395
|
const input = buildStyleSelectionApplyInputFromOptions(options);
|
|
161290
161396
|
const commandIr = buildApplySiteStyleSelectionCommand(input);
|
|
@@ -161298,12 +161404,12 @@ const applyCommand = new Command("apply").description("Apply a curated site-styl
|
|
|
161298
161404
|
savedAt: result.savedAt
|
|
161299
161405
|
});
|
|
161300
161406
|
}));
|
|
161301
|
-
const initCommand = new Command("init").description("Initialize a fresh SDK site with a curated site style").requiredOption("--site-style-id <id>", "Site style ID, e.g. site-style:calm-studio").option("--button-style-id <id>", "Button style ID").option("--button-style-parameters <json>", "Button style parameter object as JSON").option("--palette
|
|
161407
|
+
const initCommand = new Command("init").description("Initialize a fresh SDK site with a curated site style").requiredOption("--site-style-id <id>", "Site style ID, e.g. site-style:calm-studio").option("--button-style-id <id>", "Button style ID").option("--button-style-parameters <json>", "Button style parameter object as JSON").option("--palette <json>", "Complete theme palette JSON").option("--typography <json>", "Complete typography JSON (defaults to the site style typography)").option("--header-look-id <id>", "Legacy header look bridge ID").option("--header-layout-id <id>", "Header layout ID").option("--header-style-id <id>", "Header style ID").option("--footer-look-id <id>", "Footer look ID").action(withErrorHandling(executeStyleInit));
|
|
161302
161408
|
const styleCommand = new Command("style").description("Manage curated site styles").addHelpText("after", `
|
|
161303
161409
|
Examples:
|
|
161304
161410
|
$ riverbankcms style init --site-style-id site-style:calm-studio
|
|
161305
161411
|
$ riverbankcms style apply --site-style-id site-style:calm-studio --base-selection-version 3
|
|
161306
|
-
$ riverbankcms style apply --site-style-id site-style:calm-studio --base-selection-version 3 --palette
|
|
161412
|
+
$ riverbankcms style apply --site-style-id site-style:calm-studio --base-selection-version 3 --palette '{"colors":[...],"meta":{"mode":"light"}}'
|
|
161307
161413
|
`).addCommand(listCommand).addCommand(initCommand).addCommand(applyCommand);
|
|
161308
161414
|
//#endregion
|
|
161309
161415
|
//#region src/cli/commands/webhooks.ts
|
|
@@ -161371,7 +161477,7 @@ function envPatchLabel(tag) {
|
|
|
161371
161477
|
case "append-key": return "added RIVERBANK_WEBHOOK_SECRET to .env.local";
|
|
161372
161478
|
case "replace-key": return "updated RIVERBANK_WEBHOOK_SECRET in .env.local";
|
|
161373
161479
|
case "unchanged": return "left .env.local unchanged";
|
|
161374
|
-
default: return assertNever$
|
|
161480
|
+
default: return assertNever$24(tag);
|
|
161375
161481
|
}
|
|
161376
161482
|
}
|
|
161377
161483
|
function planHumanResultOutput(input) {
|
|
@@ -162046,7 +162152,7 @@ function formatAuthority(authority) {
|
|
|
162046
162152
|
case "dashboard_admin": return "dashboard admin";
|
|
162047
162153
|
case "cms_repo_script": return "CMS repo script";
|
|
162048
162154
|
case "sdk_management_key": return "SDK management key";
|
|
162049
|
-
default: return assertNever$
|
|
162155
|
+
default: return assertNever$24(authority);
|
|
162050
162156
|
}
|
|
162051
162157
|
}
|
|
162052
162158
|
function formatOperation(operation) {
|
|
@@ -162067,7 +162173,7 @@ function formatStep(step, index) {
|
|
|
162067
162173
|
lines.push(" Commands:");
|
|
162068
162174
|
step.commands.forEach((command) => lines.push(` ${command}`));
|
|
162069
162175
|
return lines;
|
|
162070
|
-
default: return assertNever$
|
|
162176
|
+
default: return assertNever$24(step);
|
|
162071
162177
|
}
|
|
162072
162178
|
}
|
|
162073
162179
|
function formatSdkSetupPlan(plan) {
|