@riverbankcms/sdk 0.90.1 → 0.92.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{PreviewEditorSidebar-FNFRVSIM.mjs → PreviewEditorSidebar-3CI5MKV3.mjs} +3 -3
- package/dist/{PreviewEditorUI-3WXJFQXG.mjs → PreviewEditorUI-DKEP636I.mjs} +3 -3
- package/dist/SdkPreviewModeRuntime-BRGRDQFH.mjs +8 -0
- package/dist/_dts/api/src/bookingConfig.d.ts +13 -1
- package/dist/_dts/api/src/bookingOperations.d.ts +1 -0
- package/dist/_dts/api/src/bookingRefundOutcomes.d.ts +6 -6
- package/dist/_dts/api/src/customerMembershipOutcomes.d.ts +4 -4
- package/dist/_dts/api/src/publicExperienceEndpoints.d.ts +6 -0
- package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +32 -0
- package/dist/_dts/blocks/src/system/blocks/courses/shared/pricing.d.ts +12 -1
- package/dist/_dts/blocks/src/system/blocks/courses/shared/schemas.d.ts +12 -0
- package/dist/_dts/blocks/src/system/blocks/courses/shared/types.d.ts +4 -1
- package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +44 -0
- package/dist/_dts/blocks/src/system/manifest/fieldValidation/index.d.ts +24 -0
- package/dist/_dts/blocks/src/system/runtime/api/types.d.ts +8 -1
- package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessBookingFlow.d.ts +8 -1
- package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessBookingFlow.state.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.headless.state.d.ts +4 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.interactive.d.ts +40 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.reserved-fields.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.state.d.ts +29 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-runtime-sources.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/components.d.ts +6 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/useCourseRegistrationWizard.d.ts +8 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/TicketSelectionStep.d.ts +8 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/hooks.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/types.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationSubmit.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts +9 -0
- package/dist/_dts/content-model/src/entry-slots/types.d.ts +110 -2
- package/dist/_dts/core/src/branded.d.ts +3 -0
- package/dist/_dts/core/src/event-pricing.d.ts +18 -1
- package/dist/_dts/core/src/money-input.d.ts +34 -4
- package/dist/_dts/core/src/string.d.ts +12 -0
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +70 -0
- package/dist/_dts/media-core/src/fileAssetCompatibility.d.ts +1 -1
- package/dist/_dts/media-core/src/filePersistence.d.ts +5 -1
- package/dist/_dts/media-core/src/fileStorage.d.ts +1 -0
- package/dist/_dts/media-core/src/videoPrep.d.ts +15 -6
- package/dist/_dts/media-core/src/videoSlotPolicy.d.ts +5 -5
- package/dist/_dts/sdk/src/cli/commands/push/execute/diff.d.ts +2 -0
- package/dist/_dts/sdk/src/cli/commands/push/execute/localMediaReporting.d.ts +23 -0
- package/dist/_dts/sdk/src/cli/commands/push/scopes/commandBackedDatedOfferingScope.d.ts +54 -0
- package/dist/_dts/sdk/src/cli/commands/push/scopes/mediaPrep.d.ts +7 -2
- package/dist/_dts/sdk/src/cli/commands/push/scopes/types.d.ts +6 -0
- package/dist/_dts/sdk/src/cli/media/local-sync.d.ts +35 -0
- package/dist/_dts/sdk/src/cli/sync/validation.d.ts +2 -2
- package/dist/_dts/sdk/src/rendering/islands/types.d.ts +23 -1
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/{chunk-SYYJZPKU.mjs → chunk-6D7PLF4M.mjs} +2 -2
- package/dist/{chunk-CR2VX432.mjs → chunk-I6EOKV6B.mjs} +568 -76
- package/dist/{chunk-FA6LVZ7C.mjs → chunk-LERKJM3E.mjs} +7 -7
- package/dist/{chunk-UG7I7S7W.mjs → chunk-U5YM4AWE.mjs} +1 -1
- package/dist/{chunk-H6TT5ZXI.mjs → chunk-UOMTCHZD.mjs} +1 -1
- package/dist/{chunk-BOQXMCSP.mjs → chunk-ZA2S7H34.mjs} +3 -3
- package/dist/cli/index.mjs +755 -414
- package/dist/cli/init-docs/content/workflow-add-block.md +48 -0
- package/dist/cli/init-docs/content/workflow-custom-block.md +10 -0
- package/dist/client/{accordion-4K7VGZ3I.mjs → accordion-BUDH2G3S.mjs} +2 -2
- package/dist/client/{bookingForm-3QXA3CIS.mjs → bookingForm-NQMCELVB.mjs} +90 -15
- package/dist/client/bookings.mjs +259 -32
- package/dist/client/{carousel-BEJKNGQ7.mjs → carousel-ONCEW6IJ.mjs} +3 -3
- package/dist/client/{cart-44BBM6XG.mjs → cart-V2TCK2GI.mjs} +7 -7
- package/dist/client/{checkout-THMHEYKF.mjs → checkout-ZI7SWNCS.mjs} +7 -7
- package/dist/client/{chunk-PEDNDLPB.mjs → chunk-AUMRQ242.mjs} +52 -5
- package/dist/client/{chunk-EJBHK74Y.mjs → chunk-B5UC2D6X.mjs} +7 -6
- package/dist/client/{chunk-DQIRKNZE.mjs → chunk-ERQDHUS2.mjs} +1 -1
- package/dist/client/{chunk-3H5CLFKT.mjs → chunk-GH6IIOOE.mjs} +39 -10
- package/dist/client/{chunk-ZIAF2DA4.mjs → chunk-HQWIJLYN.mjs} +1 -1
- package/dist/client/{chunk-4COPESPO.mjs → chunk-JXY6NHG6.mjs} +6 -6
- package/dist/client/{chunk-JV7ZNAOU.mjs → chunk-KXYEKEV6.mjs} +155 -17
- package/dist/client/{chunk-HIHOQGIP.mjs → chunk-LJCX6V7Q.mjs} +9 -9
- package/dist/client/{chunk-5AJIMWKS.mjs → chunk-N2WJPTF7.mjs} +3 -3
- package/dist/client/{chunk-KNTLBQ3N.mjs → chunk-QQNVQ62W.mjs} +1 -1
- package/dist/client/{chunk-B4H6QMPY.mjs → chunk-R3CZQLXF.mjs} +73 -8
- package/dist/client/{chunk-WHZQDPBZ.mjs → chunk-TNGL2WJF.mjs} +1 -0
- package/dist/client/{chunk-SLY6UDAS.mjs → chunk-ZJDBOLX7.mjs} +3 -3
- package/dist/client/client.mjs +548 -68
- package/dist/client/{courseRegistration-URX7RCCK.mjs → courseRegistration-JPWAQ6KM.mjs} +112 -12
- package/dist/client/{eventCalendar-GTENOQCE.mjs → eventCalendar-QDOCHBBV.mjs} +10 -10
- package/dist/client/{eventCombined-EZVB72MF.mjs → eventCombined-ZS2CXSIE.mjs} +10 -10
- package/dist/client/{eventDetails-CH4BJR5Z.mjs → eventDetails-5LOBMPLN.mjs} +10 -10
- package/dist/client/{eventListing-4BVOI5HS.mjs → eventListing-SBGY4I3L.mjs} +10 -10
- package/dist/client/{eventRegistration-37LPIKIE.mjs → eventRegistration-XGPIU3Z2.mjs} +10 -10
- package/dist/client/{form-FX3Y54YK.mjs → form-R7D4LZWW.mjs} +4 -4
- package/dist/client/{headerSection-UOZZGVYL.mjs → headerSection-RRLYUCGC.mjs} +3 -3
- package/dist/client/hooks.mjs +29 -9
- package/dist/client/{locationMap-VSIPKV35.mjs → locationMap-35ZJMRBZ.mjs} +3 -3
- package/dist/client/{newsletterForm-6FRJKNAF.mjs → newsletterForm-MJ2VCFUT.mjs} +4 -4
- package/dist/client/{productDetail-6AHMLXCO.mjs → productDetail-2O7YQNBX.mjs} +7 -7
- package/dist/client/{productList-M2CYIZVH.mjs → productList-FDP5BH7W.mjs} +7 -7
- package/dist/client/rendering/client.mjs +526 -64
- package/dist/client/rendering/islands.mjs +19 -19
- package/dist/client/rendering.mjs +547 -67
- package/dist/client/{shop-AUOT6GEX.mjs → shop-BGYJ3LDT.mjs} +7 -7
- package/dist/client/spam-protection.mjs +10 -10
- package/dist/preview-next/client/runtime.mjs +5 -5
- package/dist/{sdk-runtime-6GPJNLU6.mjs → sdk-runtime-B3TFXRXZ.mjs} +6 -6
- package/dist/server/components.mjs +179 -18
- package/dist/server/config-validation.mjs +30 -9
- package/dist/server/config.mjs +30 -9
- package/dist/server/data.mjs +29 -9
- package/dist/server/index.mjs +1 -1
- package/dist/server/navigation.mjs +2 -2
- package/dist/server/next.mjs +180 -19
- package/dist/server/page-converter.mjs +24 -7
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +179 -18
- package/dist/server/rendering.mjs +179 -18
- package/dist/server/routing.mjs +43 -19
- package/dist/server/server.mjs +30 -10
- package/package.json +1 -1
- package/dist/SdkPreviewModeRuntime-2UCIMKUB.mjs +0 -8
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { mountShopBlockIsland, CartClient } from './chunk-
|
|
2
|
-
import './chunk-
|
|
3
|
-
import './chunk-
|
|
1
|
+
import { mountShopBlockIsland, CartClient } from './chunk-JXY6NHG6.mjs';
|
|
2
|
+
import './chunk-ERQDHUS2.mjs';
|
|
3
|
+
import './chunk-B5UC2D6X.mjs';
|
|
4
4
|
import './chunk-6N7YRNYU.mjs';
|
|
5
5
|
import './chunk-L4J5Y62O.mjs';
|
|
6
|
-
import './chunk-
|
|
6
|
+
import './chunk-ZJDBOLX7.mjs';
|
|
7
7
|
import './chunk-3DCJ45Z2.mjs';
|
|
8
8
|
import './chunk-WBQG7VJA.mjs';
|
|
9
|
-
import './chunk-
|
|
9
|
+
import './chunk-TNGL2WJF.mjs';
|
|
10
10
|
import './chunk-N7PBWBWQ.mjs';
|
|
11
|
-
import { defineIslandPropsDecoder } from './chunk-
|
|
12
|
-
import './chunk-
|
|
11
|
+
import { defineIslandPropsDecoder } from './chunk-R3CZQLXF.mjs';
|
|
12
|
+
import './chunk-GH6IIOOE.mjs';
|
|
13
13
|
|
|
14
14
|
// src/rendering/islands/enhancers/cart.tsx
|
|
15
15
|
var decode = defineIslandPropsDecoder("cart");
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { mountShopBlockIsland, CheckoutClient } from './chunk-
|
|
2
|
-
import './chunk-
|
|
3
|
-
import './chunk-
|
|
1
|
+
import { mountShopBlockIsland, CheckoutClient } from './chunk-JXY6NHG6.mjs';
|
|
2
|
+
import './chunk-ERQDHUS2.mjs';
|
|
3
|
+
import './chunk-B5UC2D6X.mjs';
|
|
4
4
|
import './chunk-6N7YRNYU.mjs';
|
|
5
5
|
import './chunk-L4J5Y62O.mjs';
|
|
6
|
-
import './chunk-
|
|
6
|
+
import './chunk-ZJDBOLX7.mjs';
|
|
7
7
|
import './chunk-3DCJ45Z2.mjs';
|
|
8
8
|
import './chunk-WBQG7VJA.mjs';
|
|
9
|
-
import './chunk-
|
|
9
|
+
import './chunk-TNGL2WJF.mjs';
|
|
10
10
|
import './chunk-N7PBWBWQ.mjs';
|
|
11
|
-
import { defineIslandPropsDecoder } from './chunk-
|
|
12
|
-
import './chunk-
|
|
11
|
+
import { defineIslandPropsDecoder } from './chunk-R3CZQLXF.mjs';
|
|
12
|
+
import './chunk-GH6IIOOE.mjs';
|
|
13
13
|
|
|
14
14
|
// src/rendering/islands/enhancers/checkout.tsx
|
|
15
15
|
var decode = defineIslandPropsDecoder("checkout");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { useBlockApi } from './chunk-
|
|
3
|
-
import { themeButtonClassName, assertNever } from './chunk-
|
|
4
|
-
import { resolvePlanningDateInput, formatBookingPriceDisplay } from './chunk-
|
|
2
|
+
import { useBlockApi } from './chunk-TNGL2WJF.mjs';
|
|
3
|
+
import { themeButtonClassName, assertNever } from './chunk-R3CZQLXF.mjs';
|
|
4
|
+
import { resolvePlanningDateInput, formatBookingPriceDisplay } from './chunk-GH6IIOOE.mjs';
|
|
5
5
|
import { useState, useReducer, useSyncExternalStore, useEffect } from 'react';
|
|
6
6
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
7
7
|
|
|
@@ -163,7 +163,9 @@ function getSelectableCoursePricingOptionsForNow(course, now) {
|
|
|
163
163
|
return left.name.localeCompare(right.name);
|
|
164
164
|
});
|
|
165
165
|
}
|
|
166
|
-
function resolveCoursePricingState(course, selectedPricingOptionId, nowInput = {}) {
|
|
166
|
+
function resolveCoursePricingState(course, selectedPricingOptionId, selectedSlidingAmountOrNowInput, nowInput = {}) {
|
|
167
|
+
const selectedSlidingAmount = typeof selectedSlidingAmountOrNowInput === "number" || selectedSlidingAmountOrNowInput === null ? selectedSlidingAmountOrNowInput : null;
|
|
168
|
+
const effectiveNowInput = typeof selectedSlidingAmountOrNowInput === "object" && selectedSlidingAmountOrNowInput !== null ? selectedSlidingAmountOrNowInput : nowInput;
|
|
167
169
|
const currency = course.pricing?.currency ?? course.currency;
|
|
168
170
|
if (!course.pricing) {
|
|
169
171
|
const legacyAmount = course.priceCents ?? 0;
|
|
@@ -173,6 +175,8 @@ function resolveCoursePricingState(course, selectedPricingOptionId, nowInput = {
|
|
|
173
175
|
selectableOptions: [],
|
|
174
176
|
requiresSelection: false,
|
|
175
177
|
selectedOption: null,
|
|
178
|
+
slidingScale: null,
|
|
179
|
+
selectedSlidingAmount: null,
|
|
176
180
|
selectedPriceAmount: legacyAmount,
|
|
177
181
|
selectedRequiresPayment: legacyAmount > 0,
|
|
178
182
|
hasPaidSelection: legacyAmount > 0,
|
|
@@ -187,6 +191,8 @@ function resolveCoursePricingState(course, selectedPricingOptionId, nowInput = {
|
|
|
187
191
|
selectableOptions: [],
|
|
188
192
|
requiresSelection: false,
|
|
189
193
|
selectedOption: null,
|
|
194
|
+
slidingScale: null,
|
|
195
|
+
selectedSlidingAmount: null,
|
|
190
196
|
selectedPriceAmount: 0,
|
|
191
197
|
selectedRequiresPayment: false,
|
|
192
198
|
hasPaidSelection: false,
|
|
@@ -200,6 +206,8 @@ function resolveCoursePricingState(course, selectedPricingOptionId, nowInput = {
|
|
|
200
206
|
selectableOptions: [],
|
|
201
207
|
requiresSelection: false,
|
|
202
208
|
selectedOption: null,
|
|
209
|
+
slidingScale: null,
|
|
210
|
+
selectedSlidingAmount: null,
|
|
203
211
|
selectedPriceAmount: amount,
|
|
204
212
|
selectedRequiresPayment: amount > 0,
|
|
205
213
|
hasPaidSelection: amount > 0,
|
|
@@ -209,7 +217,7 @@ function resolveCoursePricingState(course, selectedPricingOptionId, nowInput = {
|
|
|
209
217
|
case "tiered": {
|
|
210
218
|
const selectableOptions = getSelectableCoursePricingOptionsForNow(
|
|
211
219
|
course,
|
|
212
|
-
resolvePlanningDateInput(
|
|
220
|
+
resolvePlanningDateInput(effectiveNowInput)
|
|
213
221
|
);
|
|
214
222
|
const selectedOption = (selectedPricingOptionId ? selectableOptions.find((option) => option.id === selectedPricingOptionId) : null) ?? (selectableOptions.length === 1 ? selectableOptions[0] ?? null : null);
|
|
215
223
|
const lowestAmount = selectableOptions.reduce((lowest, option) => {
|
|
@@ -225,12 +233,51 @@ function resolveCoursePricingState(course, selectedPricingOptionId, nowInput = {
|
|
|
225
233
|
selectableOptions,
|
|
226
234
|
requiresSelection: selectableOptions.length > 1,
|
|
227
235
|
selectedOption,
|
|
236
|
+
slidingScale: null,
|
|
237
|
+
selectedSlidingAmount: null,
|
|
228
238
|
selectedPriceAmount: selectedOption?.priceAmount ?? null,
|
|
229
239
|
selectedRequiresPayment: (selectedOption?.priceAmount ?? 0) > 0,
|
|
230
240
|
hasPaidSelection: selectableOptions.some((option) => option.priceAmount > 0),
|
|
231
241
|
hasFreeSelection: selectableOptions.some((option) => option.priceAmount === 0)
|
|
232
242
|
};
|
|
233
243
|
}
|
|
244
|
+
case "sliding_scale": {
|
|
245
|
+
const minAmount = course.pricing.slidingMinAmount ?? null;
|
|
246
|
+
const maxAmount = course.pricing.slidingMaxAmount ?? null;
|
|
247
|
+
if (minAmount === null || maxAmount === null || minAmount < 0 || maxAmount < minAmount) {
|
|
248
|
+
return {
|
|
249
|
+
currency,
|
|
250
|
+
display: { kind: "unavailable", currency },
|
|
251
|
+
selectableOptions: [],
|
|
252
|
+
requiresSelection: true,
|
|
253
|
+
selectedOption: null,
|
|
254
|
+
slidingScale: null,
|
|
255
|
+
selectedSlidingAmount: null,
|
|
256
|
+
selectedPriceAmount: null,
|
|
257
|
+
selectedRequiresPayment: false,
|
|
258
|
+
hasPaidSelection: false,
|
|
259
|
+
hasFreeSelection: false
|
|
260
|
+
};
|
|
261
|
+
}
|
|
262
|
+
const normalizedSelectedAmount = typeof selectedSlidingAmount === "number" && Number.isFinite(selectedSlidingAmount) ? selectedSlidingAmount : null;
|
|
263
|
+
return {
|
|
264
|
+
currency,
|
|
265
|
+
display: { kind: "range", minAmount, maxAmount, currency },
|
|
266
|
+
selectableOptions: [],
|
|
267
|
+
requiresSelection: normalizedSelectedAmount === null,
|
|
268
|
+
selectedOption: null,
|
|
269
|
+
slidingScale: {
|
|
270
|
+
minAmount,
|
|
271
|
+
maxAmount,
|
|
272
|
+
suggestedAmount: course.pricing.slidingSuggestedAmount ?? null
|
|
273
|
+
},
|
|
274
|
+
selectedSlidingAmount: normalizedSelectedAmount,
|
|
275
|
+
selectedPriceAmount: normalizedSelectedAmount,
|
|
276
|
+
selectedRequiresPayment: (normalizedSelectedAmount ?? 0) > 0,
|
|
277
|
+
hasPaidSelection: maxAmount > 0,
|
|
278
|
+
hasFreeSelection: minAmount === 0
|
|
279
|
+
};
|
|
280
|
+
}
|
|
234
281
|
}
|
|
235
282
|
}
|
|
236
283
|
function formatCoursePriceDisplay(display, locale) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { ChevronLeft, ChevronRight } from './chunk-6N7YRNYU.mjs';
|
|
3
|
-
import { clsx_default } from './chunk-
|
|
3
|
+
import { clsx_default } from './chunk-GH6IIOOE.mjs';
|
|
4
4
|
import React, { useRef, useState, useCallback, useEffect } from 'react';
|
|
5
5
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
6
6
|
|
|
@@ -1987,12 +1987,13 @@ var CarouselNodeClient = ({
|
|
|
1987
1987
|
]
|
|
1988
1988
|
);
|
|
1989
1989
|
const resolvedSlides = resolveSlidesToShowMobile(normalized.slidesToShow);
|
|
1990
|
+
const canAutoplay = normalized.autoplay && slides.length > 1;
|
|
1990
1991
|
const cssVars = React.useMemo(
|
|
1991
1992
|
() => getCarouselSlidesToShowCssVars(normalized.slidesToShow),
|
|
1992
1993
|
[normalized.slidesToShow]
|
|
1993
1994
|
);
|
|
1994
1995
|
const plugins = React.useMemo(() => {
|
|
1995
|
-
if (!
|
|
1996
|
+
if (!canAutoplay) return void 0;
|
|
1996
1997
|
return [
|
|
1997
1998
|
Autoplay({
|
|
1998
1999
|
delay: normalized.autoplayDelay,
|
|
@@ -2002,7 +2003,7 @@ var CarouselNodeClient = ({
|
|
|
2002
2003
|
// Continue after manual navigation
|
|
2003
2004
|
})
|
|
2004
2005
|
];
|
|
2005
|
-
}, [
|
|
2006
|
+
}, [canAutoplay, normalized.autoplayDelay]);
|
|
2006
2007
|
const [viewportRef, api] = useEmblaCarousel(
|
|
2007
2008
|
{
|
|
2008
2009
|
align: "start",
|
|
@@ -2041,7 +2042,7 @@ var CarouselNodeClient = ({
|
|
|
2041
2042
|
};
|
|
2042
2043
|
}, [api]);
|
|
2043
2044
|
React.useEffect(() => {
|
|
2044
|
-
if (!api || !
|
|
2045
|
+
if (!api || !canAutoplay) return;
|
|
2045
2046
|
const autoplayPlugin = api.plugins()?.autoplay;
|
|
2046
2047
|
if (!autoplayPlugin) return;
|
|
2047
2048
|
const handleVisibility = () => {
|
|
@@ -2050,7 +2051,7 @@ var CarouselNodeClient = ({
|
|
|
2050
2051
|
};
|
|
2051
2052
|
document.addEventListener("visibilitychange", handleVisibility);
|
|
2052
2053
|
return () => document.removeEventListener("visibilitychange", handleVisibility);
|
|
2053
|
-
}, [api,
|
|
2054
|
+
}, [api, canAutoplay]);
|
|
2054
2055
|
const inner = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2055
2056
|
/* @__PURE__ */ jsx("div", { className: "carousel-frame rb-overflow-hidden rb-w-full", children: /* @__PURE__ */ jsx(
|
|
2056
2057
|
"div",
|
|
@@ -2101,7 +2102,7 @@ var CarouselNodeClient = ({
|
|
|
2101
2102
|
"data-show-controls": normalized.showControls ? "true" : "false",
|
|
2102
2103
|
"data-show-dots": normalized.showDots ? "true" : "false",
|
|
2103
2104
|
"data-arrow-visibility": normalized.arrowVisibility,
|
|
2104
|
-
"data-autoplay":
|
|
2105
|
+
"data-autoplay": canAutoplay ? "true" : "false",
|
|
2105
2106
|
"data-loop": normalized.loop ? "true" : "false",
|
|
2106
2107
|
children: inner
|
|
2107
2108
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EMPTY_COMMERCE_CART_STATE, parseStoredCommerceCartState, reduceCommerceCart, buildPassCartItem } from './chunk-
|
|
1
|
+
import { EMPTY_COMMERCE_CART_STATE, parseStoredCommerceCartState, reduceCommerceCart, buildPassCartItem } from './chunk-R3CZQLXF.mjs';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
|
|
4
4
|
var EMPTY_STATE = EMPTY_COMMERCE_CART_STATE;
|
|
@@ -15,6 +15,7 @@ function err(error) {
|
|
|
15
15
|
|
|
16
16
|
// ../core/src/branded.ts
|
|
17
17
|
var unsafeAsMediaAssetId = (id) => id;
|
|
18
|
+
var unsafeAsStoragePath = (value) => value;
|
|
18
19
|
var unsafeAsFormId = (id) => id;
|
|
19
20
|
var unsafeAsPassId = (id) => id;
|
|
20
21
|
var unsafeAsCustomerPassId = (id) => id;
|
|
@@ -86,6 +87,7 @@ function publicEventPricingType(pricing) {
|
|
|
86
87
|
return "free";
|
|
87
88
|
case "single_paid":
|
|
88
89
|
case "ticket_types":
|
|
90
|
+
case "sliding_scale":
|
|
89
91
|
case "course":
|
|
90
92
|
return isFreePublicEventPriceDisplay(pricing.display) ? "free" : "paid";
|
|
91
93
|
case "external":
|
|
@@ -98,6 +100,7 @@ function publicEventPricingCurrency(pricing) {
|
|
|
98
100
|
case "free_registration":
|
|
99
101
|
case "single_paid":
|
|
100
102
|
case "ticket_types":
|
|
103
|
+
case "sliding_scale":
|
|
101
104
|
return pricing.currency;
|
|
102
105
|
case "course":
|
|
103
106
|
return pricing.display.display.currency;
|
|
@@ -115,6 +118,8 @@ function publicEventPricingMode(pricing) {
|
|
|
115
118
|
return "single";
|
|
116
119
|
case "ticket_types":
|
|
117
120
|
return "ticket_types";
|
|
121
|
+
case "sliding_scale":
|
|
122
|
+
return "sliding_scale";
|
|
118
123
|
case "drop_in":
|
|
119
124
|
case "course":
|
|
120
125
|
case "external":
|
|
@@ -148,6 +153,8 @@ function formatCoursePriceDisplayLabel(display, options) {
|
|
|
148
153
|
return `Course (${formatCurrencyAmount(display.amount, display.currency, options)})`;
|
|
149
154
|
case "from":
|
|
150
155
|
return `Course (From ${formatCurrencyAmount(display.amount, display.currency, options)})`;
|
|
156
|
+
case "range":
|
|
157
|
+
return `Course (${formatCurrencyAmount(display.minAmount, display.currency, options)} - ${formatCurrencyAmount(display.maxAmount, display.currency, options)})`;
|
|
151
158
|
default:
|
|
152
159
|
return assertNever(display);
|
|
153
160
|
}
|
|
@@ -264,10 +271,11 @@ function omitZeroAmountFutureRows(rows) {
|
|
|
264
271
|
if (rows.length <= 1) {
|
|
265
272
|
return rows;
|
|
266
273
|
}
|
|
267
|
-
const
|
|
268
|
-
if (
|
|
274
|
+
const firstRow = rows[0];
|
|
275
|
+
if (firstRow === void 0) {
|
|
269
276
|
return [];
|
|
270
277
|
}
|
|
278
|
+
const futureRows = rows.slice(1);
|
|
271
279
|
return [
|
|
272
280
|
firstRow,
|
|
273
281
|
...futureRows.filter((row) => row.amountCents > 0)
|
|
@@ -310,11 +318,11 @@ function isValidTimeZone(timeZone) {
|
|
|
310
318
|
}
|
|
311
319
|
function getSafeTimeZone(timeZone) {
|
|
312
320
|
const normalized = typeof timeZone === "string" ? timeZone.trim() : "";
|
|
313
|
-
return normalized && isValidTimeZone(normalized) ? normalized : FALLBACK_TIMEZONE;
|
|
321
|
+
return normalized.length > 0 && isValidTimeZone(normalized) ? normalized : FALLBACK_TIMEZONE;
|
|
314
322
|
}
|
|
315
323
|
function parseStrictBookingTimeZone(timeZone) {
|
|
316
324
|
const normalized = timeZone.trim();
|
|
317
|
-
if (
|
|
325
|
+
if (normalized.length === 0 || !isValidTimeZone(normalized)) {
|
|
318
326
|
return null;
|
|
319
327
|
}
|
|
320
328
|
return normalized;
|
|
@@ -401,7 +409,7 @@ function parseScheduledBookingDateTime(input) {
|
|
|
401
409
|
try {
|
|
402
410
|
const startsAt = toUtcIsoDateTimeString(input.startsAt);
|
|
403
411
|
const timeZone = parseStrictBookingTimeZone(input.timeZone);
|
|
404
|
-
if (
|
|
412
|
+
if (timeZone === null) {
|
|
405
413
|
return {
|
|
406
414
|
ok: false,
|
|
407
415
|
field: "timeZone",
|
|
@@ -540,7 +548,7 @@ function getBookingLocalDateKey(input) {
|
|
|
540
548
|
}
|
|
541
549
|
function parseBookingLocalDate(value) {
|
|
542
550
|
const match = LOCAL_DATE_PATTERN.exec(value.trim());
|
|
543
|
-
if (
|
|
551
|
+
if (match === null || match.groups === void 0) {
|
|
544
552
|
throw new Error(`Invalid booking date format: "${value}" (expected YYYY-MM-DD)`);
|
|
545
553
|
}
|
|
546
554
|
const year = Number(match.groups.year);
|
|
@@ -574,10 +582,10 @@ function normalizeLocationAddressText(value) {
|
|
|
574
582
|
return null;
|
|
575
583
|
}
|
|
576
584
|
const trimmed = value.trim();
|
|
577
|
-
return trimmed ? trimmed : null;
|
|
585
|
+
return trimmed.length > 0 ? trimmed : null;
|
|
578
586
|
}
|
|
579
587
|
function hasLocationCoordinates(value) {
|
|
580
|
-
return typeof value
|
|
588
|
+
return value != null && typeof value.lat === "number" && typeof value.lng === "number";
|
|
581
589
|
}
|
|
582
590
|
function toLocationCoordinates(value) {
|
|
583
591
|
if (!hasLocationCoordinates(value)) {
|
|
@@ -622,6 +630,27 @@ function clsx() {
|
|
|
622
630
|
}
|
|
623
631
|
var clsx_default = clsx;
|
|
624
632
|
|
|
633
|
+
// ../media-core/src/fileSafety.ts
|
|
634
|
+
var CONTROL_CHARACTER_PATTERN = /[\u0000-\u001f\u007f]/u;
|
|
635
|
+
function containsUnsafePathSegmentCharacter(value) {
|
|
636
|
+
return value.includes("/") || value.includes("\\") || CONTROL_CHARACTER_PATTERN.test(value);
|
|
637
|
+
}
|
|
638
|
+
function isReservedPathSegment(value) {
|
|
639
|
+
return value === "." || value === "..";
|
|
640
|
+
}
|
|
641
|
+
function isUnsafePathSegment(segment) {
|
|
642
|
+
return segment.trim().length === 0 || segment !== segment.trim() || isReservedPathSegment(segment) || containsUnsafePathSegmentCharacter(segment);
|
|
643
|
+
}
|
|
644
|
+
function parseStoragePath(value) {
|
|
645
|
+
return joinStoragePathSegments(value.split("/"));
|
|
646
|
+
}
|
|
647
|
+
function joinStoragePathSegments(segments) {
|
|
648
|
+
if (segments.some(isUnsafePathSegment)) {
|
|
649
|
+
return err("unsafe-path-segment");
|
|
650
|
+
}
|
|
651
|
+
return ok(unsafeAsStoragePath(segments.join("/")));
|
|
652
|
+
}
|
|
653
|
+
|
|
625
654
|
// ../media-core/src/typeGuards.ts
|
|
626
655
|
function isRecord(value) {
|
|
627
656
|
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
@@ -638,10 +667,10 @@ var RELATIVE_STORAGE_PATH_PREFIXES = [
|
|
|
638
667
|
"imports/"
|
|
639
668
|
];
|
|
640
669
|
function isRelativeDirectImageStoragePath(storagePath) {
|
|
641
|
-
return RELATIVE_STORAGE_PATH_PREFIXES.some((prefix) => storagePath.startsWith(prefix));
|
|
670
|
+
return RELATIVE_STORAGE_PATH_PREFIXES.some((prefix) => storagePath.startsWith(prefix)) && parseStoragePath(storagePath).ok;
|
|
642
671
|
}
|
|
643
672
|
function isSiteScopedDirectImageStoragePath(storagePath) {
|
|
644
|
-
return storagePath.startsWith("sites/");
|
|
673
|
+
return storagePath.startsWith("sites/") && parseStoragePath(storagePath).ok;
|
|
645
674
|
}
|
|
646
675
|
function encodeStoragePath(storagePath) {
|
|
647
676
|
return storagePath.split("/").map((segment) => encodeURIComponent(segment)).join("/");
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { addPassToCommerceCart, useCommerceCart } from './chunk-
|
|
3
|
-
import { CarouselNodeClient } from './chunk-
|
|
2
|
+
import { addPassToCommerceCart, useCommerceCart } from './chunk-ERQDHUS2.mjs';
|
|
3
|
+
import { CarouselNodeClient } from './chunk-B5UC2D6X.mjs';
|
|
4
4
|
import { buildRouteIslandApiConfig } from './chunk-L4J5Y62O.mjs';
|
|
5
|
-
import { useDiscountCodeUi, createBodyThemePortalRoot, consumeSearchParams, scrollToBlock, TerminalPanel, StateIcon, CheckIcon, CrossIcon, ActionRow, DiscountCodeDisclosure, consumeSearchParam, buildCheckoutReturnUrls } from './chunk-
|
|
5
|
+
import { useDiscountCodeUi, createBodyThemePortalRoot, consumeSearchParams, scrollToBlock, TerminalPanel, StateIcon, CheckIcon, CrossIcon, ActionRow, DiscountCodeDisclosure, consumeSearchParam, buildCheckoutReturnUrls } from './chunk-ZJDBOLX7.mjs';
|
|
6
6
|
import { ModalShell, resolveDedicatedCheckoutPath } from './chunk-WBQG7VJA.mjs';
|
|
7
|
-
import { useBlockApi, FeedbackMessage, BlockApiProvider, discountAvailabilityHasDiscounts, discountAvailabilityAllowsManualEntry, getAutoAppliedDiscountPreview } from './chunk-
|
|
7
|
+
import { useBlockApi, FeedbackMessage, BlockApiProvider, discountAvailabilityHasDiscounts, discountAvailabilityAllowsManualEntry, getAutoAppliedDiscountPreview } from './chunk-TNGL2WJF.mjs';
|
|
8
8
|
import { mountReactIsland } from './chunk-N7PBWBWQ.mjs';
|
|
9
|
-
import { themeButtonClassName, formatCommercePrice, formatInterval, getShopDisplayForItems, deriveCommerceCheckoutState, buildProductDetailDisplay, productItemKey, buildProductCartItem, buildProductCardDisplay, assertNever as assertNever$1, reportWorkflowError, clearWorkflowFeedback, unwrapRichTextRoot, createRichTextDocFromMarkdown, isRecord } from './chunk-
|
|
10
|
-
import { assertNever, ok, err, getCurrentResolveImageUrlContext, resolveImageUrlWithContext, ImagePresets } from './chunk-
|
|
9
|
+
import { themeButtonClassName, formatCommercePrice, formatInterval, getShopDisplayForItems, deriveCommerceCheckoutState, buildProductDetailDisplay, productItemKey, buildProductCartItem, buildProductCardDisplay, assertNever as assertNever$1, reportWorkflowError, clearWorkflowFeedback, unwrapRichTextRoot, createRichTextDocFromMarkdown, isRecord } from './chunk-R3CZQLXF.mjs';
|
|
10
|
+
import { assertNever, ok, err, getCurrentResolveImageUrlContext, resolveImageUrlWithContext, ImagePresets } from './chunk-GH6IIOOE.mjs';
|
|
11
11
|
import * as React3 from 'react';
|
|
12
12
|
import React3__default, { useState, useRef, useCallback, useEffect } from 'react';
|
|
13
13
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|