@riverbankcms/sdk 0.84.2 → 0.88.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-4PH35ZIE.mjs → PreviewEditorSidebar-EVRS3C7T.mjs} +3 -3
- package/dist/{PreviewEditorUI-WHMCRJGM.mjs → PreviewEditorUI-54WD4IGE.mjs} +3 -3
- package/dist/SdkPreviewModeRuntime-ZALZDJEK.mjs +8 -0
- package/dist/_dts/ai/src/contracts/proposals.d.ts +684 -0
- package/dist/_dts/api/src/endpoints.d.ts +58 -14
- package/dist/_dts/api/src/index.d.ts +4 -1
- package/dist/_dts/api/src/launchReadiness.d.ts +3 -3
- package/dist/_dts/api/src/mailchimpIntegration.d.ts +215 -0
- package/dist/_dts/api/src/publicExperienceEndpoints.d.ts +35 -15
- package/dist/_dts/api/src/siteInfrastructure.d.ts +0 -14
- package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +1 -13
- package/dist/_dts/api/src/types.d.ts +6 -3
- package/dist/_dts/blocks/src/PageRenderer.d.ts +1 -0
- package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +4 -0
- package/dist/_dts/blocks/src/index.d.ts +2 -1
- package/dist/_dts/blocks/src/system/blocks/appointment-booking.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/blog-listing.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/cart.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/checkout.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/collection.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +42 -0
- package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +4 -0
- package/dist/_dts/blocks/src/system/blocks/faq.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/gifting.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/location-map.d.ts +1 -1
- package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +42 -42
- package/dist/_dts/blocks/src/system/blocks/newsletter-signup-destination.d.ts +300 -0
- package/dist/_dts/blocks/src/system/blocks/newsletter-signup.d.ts +63 -3
- package/dist/_dts/blocks/src/system/blocks/product-detail.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/product-list.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/shop.d.ts +288 -288
- package/dist/_dts/blocks/src/system/fragments/library/newsletterForm.d.ts +53 -1
- package/dist/_dts/blocks/src/system/manifest/richTextSchema.d.ts +27 -0
- package/dist/_dts/blocks/src/system/manifest/schema.d.ts +23 -23
- package/dist/_dts/blocks/src/system/runtime/api/types.d.ts +10 -2
- package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +24 -0
- package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +12 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/types.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.interactive.d.ts +4 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.server.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/utils.d.ts +11 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.interactive.d.ts +15 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.server.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.submission.d.ts +32 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.types.d.ts +5 -1
- package/dist/_dts/blocks/src/system/runtime/shared/components/ModalShell.d.ts +5 -1
- package/dist/_dts/blocks/src/system/runtime/shared/utils/formatting.d.ts +1 -1
- package/dist/_dts/content-model/src/referenceFields.d.ts +1 -1
- package/dist/_dts/core/src/currency-format.d.ts +37 -2
- package/dist/_dts/core/src/event-pricing.d.ts +24 -0
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +551 -20
- package/dist/_dts/editor-blocks/src/widgets/reference/loaders.d.ts +3 -1
- package/dist/_dts/sdk/src/cli/canonical-entry-policy.d.ts +53 -0
- package/dist/_dts/sdk/src/cli/commands/migrate.d.ts +1 -0
- package/dist/_dts/sdk/src/cli/commands/pull.d.ts +7 -1
- package/dist/_dts/sdk/src/cli/content/reader.d.ts +2 -0
- package/dist/_dts/sdk/src/cli/migrations/events.d.ts +73 -0
- package/dist/_dts/sdk/src/client/types.d.ts +9 -0
- package/dist/_dts/sdk/src/config/validation.d.ts +3 -0
- package/dist/_dts/sdk/src/contracts/system-block-content.d.ts +3 -0
- package/dist/_dts/sdk/src/data/prefetchBlockData.d.ts +3 -9
- package/dist/_dts/sdk/src/manifest/passes/pass1-fields.d.ts +1 -1
- package/dist/_dts/sdk/src/manifest/three-pass-converter.d.ts +7 -18
- package/dist/_dts/sdk/src/rendering/blocks-page-renderer.d.ts +2 -0
- package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +3 -1
- package/dist/_dts/sdk/src/rendering/helpers/loadContent.d.ts +7 -3
- package/dist/_dts/sdk/src/rendering/helpers/loadPage.d.ts +4 -24
- package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +45 -0
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/site-commands/src/commands.d.ts +57 -0
- package/dist/_dts/surfaces/src/index.d.ts +12 -0
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/mock-themes/all.d.ts +9 -9
- package/dist/_dts/theme-core/src/schema.d.ts +11 -11
- package/dist/{chunk-ZR2GQK2A.mjs → chunk-7KOO7RPP.mjs} +953 -315
- package/dist/{chunk-OCGTXHSO.mjs → chunk-ER4UIW4X.mjs} +7 -7
- package/dist/{chunk-WFPYN7KA.mjs → chunk-HVOBXA3Y.mjs} +2 -2
- package/dist/{chunk-NFWGLRZZ.mjs → chunk-K3JWH6HE.mjs} +37 -3
- package/dist/{chunk-4QNLOTES.mjs → chunk-O4LVYUVH.mjs} +58 -14
- package/dist/{chunk-PYDHOMEO.mjs → chunk-YDMBIIS5.mjs} +1 -1
- package/dist/cli/index.mjs +1858 -512
- package/dist/client/{accordion-2UZPBMYM.mjs → accordion-PT5CGW5N.mjs} +2 -2
- package/dist/client/{bookingForm-36CWQUMV.mjs → bookingForm-2HLRTEYS.mjs} +7 -7
- package/dist/client/bookings.mjs +51 -6
- package/dist/client/{carousel-QH77HR6X.mjs → carousel-Z2LKYSWA.mjs} +3 -3
- package/dist/client/cart-ND5IK4A6.mjs +18 -0
- package/dist/client/checkout-EYUSGAY7.mjs +18 -0
- package/dist/client/{chunk-SYIJ5JO2.mjs → chunk-6DVPO44G.mjs} +1 -1
- package/dist/client/{chunk-3C2VTPWI.mjs → chunk-BAWHZ5GM.mjs} +176 -13
- package/dist/client/{chunk-52CGCQ7B.mjs → chunk-BL66UWGD.mjs} +10 -80
- package/dist/client/{chunk-VGDBVNOO.mjs → chunk-DIRW2LNG.mjs} +241 -210
- package/dist/client/{chunk-UDNSI5PY.mjs → chunk-GOFO7HRH.mjs} +1 -2
- package/dist/client/{chunk-ZKUO52W3.mjs → chunk-H4MHEXYS.mjs} +1 -1
- package/dist/client/{chunk-ZE5G642V.mjs → chunk-LI2C6M5O.mjs} +75 -1
- package/dist/client/{chunk-3DTWLTXM.mjs → chunk-MHBEWDT7.mjs} +117 -3
- package/dist/client/{chunk-4OXKTA3D.mjs → chunk-O5JNI3E4.mjs} +2 -2
- package/dist/client/{chunk-XSV6KW4D.mjs → chunk-S4G65LGR.mjs} +1 -1
- package/dist/client/{chunk-DVNUDUVT.mjs → chunk-WBQG7VJA.mjs} +4 -1
- package/dist/client/{chunk-F5VRX5Y6.mjs → chunk-WCVK4MBJ.mjs} +1 -1
- package/dist/client/{chunk-7UCLJ5SP.mjs → chunk-X7GVFB7Y.mjs} +4 -7
- package/dist/client/client.mjs +2125 -1403
- package/dist/client/{courseRegistration-TMKU6ABO.mjs → courseRegistration-H3AZBUEG.mjs} +7 -7
- package/dist/client/{eventCalendar-G6TI32X6.mjs → eventCalendar-FPKJGLGS.mjs} +10 -11
- package/dist/client/{eventCombined-SCKEMNAR.mjs → eventCombined-QCGIZBUY.mjs} +10 -11
- package/dist/client/{eventDetails-XPIFXXPK.mjs → eventDetails-HIT3BJWU.mjs} +10 -11
- package/dist/client/{eventListing-7QFMEMGT.mjs → eventListing-R4HNWJDN.mjs} +10 -11
- package/dist/client/{eventRegistration-TOODSZUI.mjs → eventRegistration-Q7BYY5HF.mjs} +10 -11
- package/dist/client/{form-MTCMVCZT.mjs → form-NI6YOG6S.mjs} +3 -3
- package/dist/client/{headerSection-Y5TMR3TW.mjs → headerSection-SDYGII36.mjs} +4 -4
- package/dist/client/hooks.mjs +1682 -1412
- package/dist/client/{locationMap-RH2LG7FZ.mjs → locationMap-BDETEUQD.mjs} +3 -4
- package/dist/client/{newsletterForm-PCAIPFMA.mjs → newsletterForm-EKYIU67X.mjs} +70 -22
- package/dist/client/{productDetail-OIGDR4YE.mjs → productDetail-5UTGNN76.mjs} +8 -9
- package/dist/client/{productList-4MA5S2CX.mjs → productList-7YA5KXZQ.mjs} +8 -9
- package/dist/client/rendering/client.mjs +753 -329
- package/dist/client/rendering/islands.mjs +19 -19
- package/dist/client/rendering.mjs +3786 -3034
- package/dist/client/shop-AIMUMZYC.mjs +20 -0
- package/dist/preview-next/before-render.mjs +58 -14
- package/dist/preview-next/client/runtime.mjs +5 -5
- package/dist/preview-next/editor-chrome.css +56 -9
- package/dist/preview-next/middleware.mjs +58 -14
- package/dist/{sdk-runtime-QLOCYKVU.mjs → sdk-runtime-NW472WNT.mjs} +6 -6
- package/dist/server/components.mjs +1518 -1015
- package/dist/server/config-validation.mjs +1719 -1461
- package/dist/server/config.mjs +1719 -1461
- package/dist/server/data.mjs +1683 -1413
- package/dist/server/index.mjs +79 -17
- package/dist/server/next.mjs +1902 -1311
- package/dist/server/page-converter.mjs +2193 -1169
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +1709 -1209
- package/dist/server/rendering.mjs +1894 -1347
- package/dist/server/routing.mjs +1872 -1499
- package/dist/server/server.mjs +1571 -1264
- package/dist/server/theme-bridge.mjs +234 -0
- package/dist/styles/index.css +232 -0
- package/package.json +1 -1
- package/dist/SdkPreviewModeRuntime-4FGSVUYI.mjs +0 -8
- package/dist/client/cart-X4YK4FTW.mjs +0 -19
- package/dist/client/checkout-OM2BEPWD.mjs +0 -19
- package/dist/client/chunk-I2MMZO53.mjs +0 -6
- package/dist/client/shop-WXSYV5QO.mjs +0 -21
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineIslandPropsDecoder } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
import { defineIslandPropsDecoder } from './chunk-DIRW2LNG.mjs';
|
|
2
|
+
import './chunk-LI2C6M5O.mjs';
|
|
3
3
|
|
|
4
4
|
// src/rendering/islands/enhancers/accordion.ts
|
|
5
5
|
var decode = defineIslandPropsDecoder("accordion");
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { usePolling } from './chunk-
|
|
3
|
-
import { SpinnerNode } from './chunk-
|
|
2
|
+
import { usePolling } from './chunk-H4MHEXYS.mjs';
|
|
3
|
+
import { SpinnerNode } from './chunk-6DVPO44G.mjs';
|
|
4
4
|
import { useDiscountCodeUi } from './chunk-ZFHRN6W2.mjs';
|
|
5
5
|
import { buildRouteIslandApiConfig } from './chunk-L4J5Y62O.mjs';
|
|
6
|
-
import { scrollToBlock, buildCheckoutReturnUrls, DiscountCodeDisclosure, formatPrice } from './chunk-
|
|
6
|
+
import { scrollToBlock, buildCheckoutReturnUrls, DiscountCodeDisclosure, formatPrice } from './chunk-X7GVFB7Y.mjs';
|
|
7
7
|
import { FieldValidationMessage, getFieldValidationControlProps } from './chunk-3DCJ45Z2.mjs';
|
|
8
|
-
import './chunk-
|
|
8
|
+
import './chunk-WBQG7VJA.mjs';
|
|
9
9
|
import { isSpamProtectionEnabled, getChallengeUrl, AltchaWidget } from './chunk-SDIYSQAY.mjs';
|
|
10
|
-
import { BlockApiProvider, useBlockApi, FeedbackMessage } from './chunk-
|
|
10
|
+
import { BlockApiProvider, useBlockApi, FeedbackMessage } from './chunk-GOFO7HRH.mjs';
|
|
11
11
|
import { mountReactIsland } from './chunk-N7PBWBWQ.mjs';
|
|
12
|
-
import { defineIslandPropsDecoder, resolveBookingSiteId, resolveDefaultBookingServiceId, getBookingRedirectStateFromLocation, deriveBookingFormViewState, logger, getBookingSuccessMessage, resolveAppointmentCheckoutVerificationState, themeButtonClassName, toSelectedCollectionOptionKind, assertNever11, prepareBookingSubmission, formatBookingSubmissionPreparationError, resolveBookingPaymentStep, BOOKING_FORM_DATA_RESERVED_KEYS, clearWorkflowFeedback, reportWorkflowError, reportWorkflowSuccess, okWith2, err2 } from './chunk-
|
|
13
|
-
import { resolveBookingTimeZoneId, DEFAULT_BOOKING_TIME_ZONE, unsafeAsFormId, unsafeAsAppointmentResourceId, unsafeAsCustomerPassId, unsafeAsAppointmentServiceId, formatLocalScheduleDate, addLocalScheduleDays, parseBookingLocalDate, resolveFlexibleBalanceInitialPaymentCents, resolveFlexibleBalanceDueAt, getBookingInstalmentDepositRefundability, unsafeAsPassId, splitAmountWithRemainderInFirst, addIntervalPreservingMonthAnchor, clampConfiguredAmount, getBookingInstalmentPlanIntervalCount, omitZeroAmountFutureRows, formatBookingInstant } from './chunk-
|
|
12
|
+
import { defineIslandPropsDecoder, resolveBookingSiteId, resolveDefaultBookingServiceId, getBookingRedirectStateFromLocation, deriveBookingFormViewState, logger, getBookingSuccessMessage, resolveAppointmentCheckoutVerificationState, themeButtonClassName, toSelectedCollectionOptionKind, assertNever11, prepareBookingSubmission, formatBookingSubmissionPreparationError, resolveBookingPaymentStep, BOOKING_FORM_DATA_RESERVED_KEYS, clearWorkflowFeedback, reportWorkflowError, reportWorkflowSuccess, okWith2, err2 } from './chunk-DIRW2LNG.mjs';
|
|
13
|
+
import { resolveBookingTimeZoneId, DEFAULT_BOOKING_TIME_ZONE, unsafeAsFormId, unsafeAsAppointmentResourceId, unsafeAsCustomerPassId, unsafeAsAppointmentServiceId, formatLocalScheduleDate, addLocalScheduleDays, parseBookingLocalDate, resolveFlexibleBalanceInitialPaymentCents, resolveFlexibleBalanceDueAt, getBookingInstalmentDepositRefundability, unsafeAsPassId, splitAmountWithRemainderInFirst, addIntervalPreservingMonthAnchor, clampConfiguredAmount, getBookingInstalmentPlanIntervalCount, omitZeroAmountFutureRows, formatBookingInstant } from './chunk-LI2C6M5O.mjs';
|
|
14
14
|
import React2, { useRef, useState, useMemo, useReducer, useEffect, useCallback, useLayoutEffect } from 'react';
|
|
15
15
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
16
16
|
|
package/dist/client/bookings.mjs
CHANGED
|
@@ -3682,9 +3682,8 @@ function createBlockApi(config) {
|
|
|
3682
3682
|
name: data.name,
|
|
3683
3683
|
company: data.company,
|
|
3684
3684
|
phone: data.phone,
|
|
3685
|
-
|
|
3685
|
+
target: data.target,
|
|
3686
3686
|
tags: data.tags,
|
|
3687
|
-
blockId: data.blockId,
|
|
3688
3687
|
meta: data.meta
|
|
3689
3688
|
}
|
|
3690
3689
|
});
|
|
@@ -5225,6 +5224,43 @@ function subtractDaysFromIso(isoString, dayCount) {
|
|
|
5225
5224
|
return addDaysToIso(isoString, -dayCount);
|
|
5226
5225
|
}
|
|
5227
5226
|
|
|
5227
|
+
// ../core/src/currency-format.ts
|
|
5228
|
+
var CURRENCY_LOCALE_BY_CODE = {
|
|
5229
|
+
USD: "en-US",
|
|
5230
|
+
GBP: "en-GB",
|
|
5231
|
+
EUR: "de-DE",
|
|
5232
|
+
AUD: "en-AU",
|
|
5233
|
+
CAD: "en-CA",
|
|
5234
|
+
NZD: "en-NZ",
|
|
5235
|
+
JPY: "ja-JP",
|
|
5236
|
+
CNY: "zh-CN",
|
|
5237
|
+
CHF: "de-CH"
|
|
5238
|
+
};
|
|
5239
|
+
function resolveCurrencyLocale(currencyCode, override) {
|
|
5240
|
+
return override ?? CURRENCY_LOCALE_BY_CODE[currencyCode] ?? "en";
|
|
5241
|
+
}
|
|
5242
|
+
function formatCurrencyAmount(amountCents, currency, options) {
|
|
5243
|
+
const currencyCode = currency.toUpperCase();
|
|
5244
|
+
const locale = resolveCurrencyLocale(currencyCode, options?.locale);
|
|
5245
|
+
try {
|
|
5246
|
+
const exactFormatter = new Intl.NumberFormat(locale, {
|
|
5247
|
+
style: "currency",
|
|
5248
|
+
currency: currencyCode
|
|
5249
|
+
});
|
|
5250
|
+
const fractionDigits = options?.decimals === "auto" ? {
|
|
5251
|
+
minimumFractionDigits: 0,
|
|
5252
|
+
maximumFractionDigits: exactFormatter.resolvedOptions().maximumFractionDigits
|
|
5253
|
+
} : {};
|
|
5254
|
+
return new Intl.NumberFormat(locale, {
|
|
5255
|
+
style: "currency",
|
|
5256
|
+
currency: currencyCode,
|
|
5257
|
+
...fractionDigits
|
|
5258
|
+
}).format(amountCents / 100);
|
|
5259
|
+
} catch {
|
|
5260
|
+
return `${(amountCents / 100).toFixed(2)} ${currencyCode}`;
|
|
5261
|
+
}
|
|
5262
|
+
}
|
|
5263
|
+
|
|
5228
5264
|
// ../core/src/event-pricing.ts
|
|
5229
5265
|
function publicEventPricingType(pricing) {
|
|
5230
5266
|
switch (pricing.kind) {
|
|
@@ -5263,6 +5299,7 @@ function isFreePublicEventPriceDisplay(display) {
|
|
|
5263
5299
|
return display.display.kind === "free";
|
|
5264
5300
|
case "exact":
|
|
5265
5301
|
case "from":
|
|
5302
|
+
case "range":
|
|
5266
5303
|
case "mixed":
|
|
5267
5304
|
case "unavailable":
|
|
5268
5305
|
return false;
|
|
@@ -6482,10 +6519,21 @@ function readLegacyPriceDisplay(value, currency) {
|
|
|
6482
6519
|
amount: readAmount(value.amount) ?? 0,
|
|
6483
6520
|
currency: displayCurrency
|
|
6484
6521
|
} : { kind: "unavailable", currency };
|
|
6522
|
+
case "range": {
|
|
6523
|
+
const minAmount = readAmount(value.minAmount);
|
|
6524
|
+
const maxAmount = readAmount(value.maxAmount);
|
|
6525
|
+
return minAmount !== null && maxAmount !== null ? {
|
|
6526
|
+
kind: "range",
|
|
6527
|
+
minAmount,
|
|
6528
|
+
maxAmount,
|
|
6529
|
+
currency: displayCurrency
|
|
6530
|
+
} : { kind: "unavailable", currency };
|
|
6531
|
+
}
|
|
6485
6532
|
case "mixed":
|
|
6486
6533
|
return readAmount(value.paidFromAmount) !== null ? {
|
|
6487
6534
|
kind: "mixed",
|
|
6488
6535
|
paidFromAmount: readAmount(value.paidFromAmount) ?? 0,
|
|
6536
|
+
paidToAmount: readAmount(value.paidToAmount) ?? readAmount(value.paidFromAmount) ?? 0,
|
|
6489
6537
|
currency: displayCurrency
|
|
6490
6538
|
} : { kind: "unavailable", currency };
|
|
6491
6539
|
case "unavailable":
|
|
@@ -12537,10 +12585,7 @@ var DEFAULT_CURRENCY = "GBP";
|
|
|
12537
12585
|
|
|
12538
12586
|
// ../blocks/src/system/runtime/shared/utils/formatting.ts
|
|
12539
12587
|
function formatPrice(cents, currency = DEFAULT_CURRENCY, locale) {
|
|
12540
|
-
return
|
|
12541
|
-
style: "currency",
|
|
12542
|
-
currency: currency.toUpperCase()
|
|
12543
|
-
}).format(cents / 100);
|
|
12588
|
+
return formatCurrencyAmount(cents, currency, { locale });
|
|
12544
12589
|
}
|
|
12545
12590
|
|
|
12546
12591
|
// ../blocks/src/system/runtime/shared/bookingPaymentOptions.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { normalizeCarouselProps, CarouselNodeClient } from './chunk-
|
|
1
|
+
import { normalizeCarouselProps, CarouselNodeClient } from './chunk-O5JNI3E4.mjs';
|
|
2
2
|
import { mountReactIsland } from './chunk-N7PBWBWQ.mjs';
|
|
3
|
-
import { defineIslandPropsDecoder } from './chunk-
|
|
4
|
-
import './chunk-
|
|
3
|
+
import { defineIslandPropsDecoder } from './chunk-DIRW2LNG.mjs';
|
|
4
|
+
import './chunk-LI2C6M5O.mjs';
|
|
5
5
|
import { jsx } from 'react/jsx-runtime';
|
|
6
6
|
|
|
7
7
|
var decode = defineIslandPropsDecoder("carousel");
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { mountShopBlockIsland, CartClient } from './chunk-BL66UWGD.mjs';
|
|
2
|
+
import './chunk-WCVK4MBJ.mjs';
|
|
3
|
+
import './chunk-O5JNI3E4.mjs';
|
|
4
|
+
import './chunk-ZFHRN6W2.mjs';
|
|
5
|
+
import './chunk-L4J5Y62O.mjs';
|
|
6
|
+
import './chunk-X7GVFB7Y.mjs';
|
|
7
|
+
import './chunk-3DCJ45Z2.mjs';
|
|
8
|
+
import './chunk-WBQG7VJA.mjs';
|
|
9
|
+
import './chunk-GOFO7HRH.mjs';
|
|
10
|
+
import './chunk-N7PBWBWQ.mjs';
|
|
11
|
+
import { defineIslandPropsDecoder } from './chunk-DIRW2LNG.mjs';
|
|
12
|
+
import './chunk-LI2C6M5O.mjs';
|
|
13
|
+
|
|
14
|
+
// src/rendering/islands/enhancers/cart.tsx
|
|
15
|
+
var decode = defineIslandPropsDecoder("cart");
|
|
16
|
+
var enhance = (root, props) => mountShopBlockIsland(root, props, CartClient, "cart");
|
|
17
|
+
|
|
18
|
+
export { decode, enhance };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { mountShopBlockIsland, CheckoutClient } from './chunk-BL66UWGD.mjs';
|
|
2
|
+
import './chunk-WCVK4MBJ.mjs';
|
|
3
|
+
import './chunk-O5JNI3E4.mjs';
|
|
4
|
+
import './chunk-ZFHRN6W2.mjs';
|
|
5
|
+
import './chunk-L4J5Y62O.mjs';
|
|
6
|
+
import './chunk-X7GVFB7Y.mjs';
|
|
7
|
+
import './chunk-3DCJ45Z2.mjs';
|
|
8
|
+
import './chunk-WBQG7VJA.mjs';
|
|
9
|
+
import './chunk-GOFO7HRH.mjs';
|
|
10
|
+
import './chunk-N7PBWBWQ.mjs';
|
|
11
|
+
import { defineIslandPropsDecoder } from './chunk-DIRW2LNG.mjs';
|
|
12
|
+
import './chunk-LI2C6M5O.mjs';
|
|
13
|
+
|
|
14
|
+
// src/rendering/islands/enhancers/checkout.tsx
|
|
15
|
+
var decode = defineIslandPropsDecoder("checkout");
|
|
16
|
+
var enhance = (root, props) => mountShopBlockIsland(root, props, CheckoutClient, "checkout");
|
|
17
|
+
|
|
18
|
+
export { decode, enhance };
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { LeafletStaticMap } from './chunk-
|
|
3
|
-
import {
|
|
4
|
-
import { usePolling } from './chunk-
|
|
5
|
-
import { SpinnerNode } from './chunk-
|
|
2
|
+
import { LeafletStaticMap } from './chunk-S4G65LGR.mjs';
|
|
3
|
+
import { resolveCoursePricingState, useWaitlistClaim, MagicLinkForm, formatCoursePriceAmount, formatCoursePriceDisplay } from './chunk-MHBEWDT7.mjs';
|
|
4
|
+
import { usePolling } from './chunk-H4MHEXYS.mjs';
|
|
5
|
+
import { SpinnerNode } from './chunk-6DVPO44G.mjs';
|
|
6
6
|
import { useDiscountCodeUi } from './chunk-ZFHRN6W2.mjs';
|
|
7
|
-
import { createBodyThemePortalRoot, TabBarFragment, logoutPortal, StepIndicator, DiscountCodeDisclosure, TerminalPanel, StateIcon, formatPrice, CrossIcon, ClockIcon,
|
|
7
|
+
import { createBodyThemePortalRoot, TabBarFragment, logoutPortal, consumeSearchParam, StepIndicator, DiscountCodeDisclosure, TerminalPanel, StateIcon, formatPrice, CrossIcon, ClockIcon, LoggedInAsUser, CheckIcon } from './chunk-X7GVFB7Y.mjs';
|
|
8
8
|
import { getFieldValidationControlProps, FieldValidationMessage } from './chunk-3DCJ45Z2.mjs';
|
|
9
|
-
import { ModalShell } from './chunk-
|
|
9
|
+
import { ModalShell } from './chunk-WBQG7VJA.mjs';
|
|
10
10
|
import { isSpamProtectionEnabled, AltchaWidget, getChallengeUrl } from './chunk-SDIYSQAY.mjs';
|
|
11
|
-
import { useBlockApi, FeedbackMessage } from './chunk-
|
|
12
|
-
import { buildEventRuntimeFilters, buildEventCalendarListingRender, groupEventsByDate, getOrderedDayNames, formatDateKey, getEventRuntimeFiltersKey, themeButtonClassName, normalizeCsvIds, normalizeOptionalId, normalizeEventBlockKind, normalizeCsvString, EventCompactRow, EmptyState, getContainerClass, getCardOrientation, isToday, MAX_EVENTS_PER_DAY, formatTime, WIZARD_STEPS, getWizardStepsForContext, getStepNumber,
|
|
13
|
-
import { publicEventPricingType, getBookingLocalDateKey, toScheduledBookingDateTime, toBookingTimeZone, publicEventPricingCurrency, formatBookingDateTime, publicEventPricingMode, publicEventScalarPrice, publicEventTicketTypes, formatBookingDate, formatBookingTime } from './chunk-
|
|
11
|
+
import { useBlockApi, FeedbackMessage } from './chunk-GOFO7HRH.mjs';
|
|
12
|
+
import { buildEventRuntimeFilters, buildEventCalendarListingRender, groupEventsByDate, getOrderedDayNames, formatDateKey, getEventRuntimeFiltersKey, themeButtonClassName, normalizeCsvIds, normalizeOptionalId, normalizeEventBlockKind, normalizeCsvString, EventCompactRow, EmptyState, getContainerClass, getCardOrientation, isToday, MAX_EVENTS_PER_DAY, formatTime, WIZARD_STEPS, getWizardStepsForContext, getStepNumber, formatEventPriceDisplay, resolveRuntimeEventPricing, formatEventPrice, formatEventDateParts, DateTimeTile, EventCard, buildCalendarViewport, shiftCalendarAnchorDate, addMonths, getThreeMonthRange, buildTimetableModel, formatDate, toRegistrationEvents, isEventContentType, findPreSelectedEvent, resolveRegistrationTarget, findEventByOccurrenceId, resolveEventRequiresPayment, resolveDiscountContext, MONTH_NAMES, getEventAvailability, formatEventTeacherLine, assertNever11, CreditCard, Ticket, Star, Sparkles } from './chunk-DIRW2LNG.mjs';
|
|
13
|
+
import { publicEventPricingType, getBookingLocalDateKey, toScheduledBookingDateTime, toBookingTimeZone, publicEventPricingCurrency, formatBookingDateTime, publicEventPricingMode, publicEventScalarPrice, publicEventTicketTypes, formatCurrencyAmount, formatBookingDate, formatBookingTime } from './chunk-LI2C6M5O.mjs';
|
|
14
14
|
import React9, { createContext, useId, useMemo, useState, useRef, useEffect, useCallback, useContext, useReducer } from 'react';
|
|
15
|
+
import { createPortal } from 'react-dom';
|
|
15
16
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
16
17
|
|
|
17
18
|
function StepIndicator2(props) {
|
|
@@ -2744,6 +2745,12 @@ function EventPortalAuthPrompt(props) {
|
|
|
2744
2745
|
/* @__PURE__ */ jsx("button", { type: "button", className: "er-portal-auth-link", onClick: props.onRequestLogin, children: props.copy.buttonText })
|
|
2745
2746
|
] });
|
|
2746
2747
|
}
|
|
2748
|
+
function getActiveTicketTypes(event) {
|
|
2749
|
+
return event?.pricing.kind === "ticket_types" ? event.pricing.ticketTypes.filter((ticketType) => ticketType.isActive).sort((left, right) => left.sortOrder - right.sortOrder) : [];
|
|
2750
|
+
}
|
|
2751
|
+
function formatTicketTypePrice(ticketType, currency) {
|
|
2752
|
+
return formatCurrencyAmount(ticketType.priceAmount, currency, { decimals: "auto" });
|
|
2753
|
+
}
|
|
2747
2754
|
function EventRegistrationWizard(props) {
|
|
2748
2755
|
const {
|
|
2749
2756
|
occurrenceContext,
|
|
@@ -2763,6 +2770,8 @@ function EventRegistrationWizard(props) {
|
|
|
2763
2770
|
const maxTicketsNum = normalizeEventRegistrationMaxTickets(maxTickets);
|
|
2764
2771
|
const showSpamProtection = spamProtectionEnabled ?? isSpamProtectionEnabled();
|
|
2765
2772
|
const buttonClass = themeButtonClassName({ variant: buttonVariant, size: "md" });
|
|
2773
|
+
const registrationRootClassName = `event-registration ${className || ""}`;
|
|
2774
|
+
const registrationRootRef = React9.useRef(null);
|
|
2766
2775
|
const wizard = useEventRegistrationWizard({
|
|
2767
2776
|
anchorId: EVENT_REGISTRATION_ANCHOR_ID,
|
|
2768
2777
|
occurrenceContext: occurrenceContext ?? null,
|
|
@@ -2770,13 +2779,44 @@ function EventRegistrationWizard(props) {
|
|
|
2770
2779
|
events: events ?? [],
|
|
2771
2780
|
maxTicketsNum
|
|
2772
2781
|
});
|
|
2782
|
+
const [bookingOverlayOpen, setBookingOverlayOpen] = useState(false);
|
|
2783
|
+
const [floatingPortalRoot, setFloatingPortalRoot] = useState(null);
|
|
2784
|
+
useEffect(() => {
|
|
2785
|
+
const sourceEl = registrationRootRef.current;
|
|
2786
|
+
if (!sourceEl) return;
|
|
2787
|
+
const portal = createBodyThemePortalRoot(sourceEl);
|
|
2788
|
+
if (!portal) return;
|
|
2789
|
+
setFloatingPortalRoot(portal.root);
|
|
2790
|
+
return () => {
|
|
2791
|
+
setFloatingPortalRoot(null);
|
|
2792
|
+
portal.cleanup();
|
|
2793
|
+
};
|
|
2794
|
+
}, []);
|
|
2773
2795
|
if (wizard.scopedEvents.length === 0 && !wizard.occurrenceContext) {
|
|
2774
|
-
return /* @__PURE__ */ jsx(
|
|
2796
|
+
return /* @__PURE__ */ jsx(
|
|
2797
|
+
"div",
|
|
2798
|
+
{
|
|
2799
|
+
ref: registrationRootRef,
|
|
2800
|
+
id: EVENT_REGISTRATION_ANCHOR_ID,
|
|
2801
|
+
className: registrationRootClassName,
|
|
2802
|
+
"data-block": "event-registration",
|
|
2803
|
+
children: /* @__PURE__ */ jsx("div", { className: "er-empty", children: /* @__PURE__ */ jsx("p", { className: "er-empty__text", children: "No events available for registration." }) })
|
|
2804
|
+
}
|
|
2805
|
+
);
|
|
2775
2806
|
}
|
|
2776
2807
|
const allowedStatuses = getRegistrableStatuses(wizard.api.config.isPreview);
|
|
2777
2808
|
const hasRegistrableEvents = wizard.scopedEvents.some((event) => !event.status || allowedStatuses.includes(event.status));
|
|
2778
2809
|
if (!hasRegistrableEvents && !wizard.occurrenceContext) {
|
|
2779
|
-
return /* @__PURE__ */ jsx(
|
|
2810
|
+
return /* @__PURE__ */ jsx(
|
|
2811
|
+
"div",
|
|
2812
|
+
{
|
|
2813
|
+
ref: registrationRootRef,
|
|
2814
|
+
id: EVENT_REGISTRATION_ANCHOR_ID,
|
|
2815
|
+
className: registrationRootClassName,
|
|
2816
|
+
"data-block": "event-registration",
|
|
2817
|
+
children: /* @__PURE__ */ jsx("div", { className: "er-empty", children: /* @__PURE__ */ jsx("p", { className: "er-empty__text", children: "Registration is not currently available for this event." }) })
|
|
2818
|
+
}
|
|
2819
|
+
);
|
|
2780
2820
|
}
|
|
2781
2821
|
const isWizardStep = WIZARD_STEPS.includes(wizard.step);
|
|
2782
2822
|
const activeWizardSteps = useMemo(
|
|
@@ -2818,13 +2858,15 @@ function EventRegistrationWizard(props) {
|
|
|
2818
2858
|
const currentStepNumber = getStepNumber(wizard.step, activeWizardSteps);
|
|
2819
2859
|
const summaryEvent = wizard.selectedEvent ?? wizard.preSelectedEvent;
|
|
2820
2860
|
const summaryEventPricingType = summaryEvent ? publicEventPricingType(summaryEvent.pricing) : "free";
|
|
2861
|
+
const summaryPriceLabel = summaryEvent ? formatEventPriceDisplay(summaryEvent.pricing) : null;
|
|
2862
|
+
const summaryAvailabilityLabel = summaryEvent?.availableSpots === null || summaryEvent?.availableSpots === void 0 ? null : summaryEvent.availableSpots > 0 ? `${summaryEvent.availableSpots} spots left` : summaryEvent.waitlistEnabled ? "Waitlist available" : "Fully booked";
|
|
2821
2863
|
const waitlistClaimRequiresPortalLogin = wizard.waitlistClaim.requiresPortalLogin && wizard.portalAuthState !== "authenticated" && wizard.portalAuthState !== "checking";
|
|
2822
2864
|
const portalAuthCopy = waitlistClaimRequiresPortalLogin ? {
|
|
2823
2865
|
...EVENT_PORTAL_AUTH_COPY["waitlist-claim"],
|
|
2824
2866
|
description: wizard.waitlistClaim.loginMessage ?? "Log in to continue with your waitlist claim."
|
|
2825
2867
|
} : EVENT_PORTAL_AUTH_COPY.membership;
|
|
2826
2868
|
const showPortalAuthPrompt = waitlistClaimRequiresPortalLogin || wizard.step === "select-tickets" && wizard.portalAuthState !== "authenticated" && wizard.portalAuthState !== "checking" && summaryEventPricingType !== "free";
|
|
2827
|
-
|
|
2869
|
+
const renderRegistrationSurface = (variant) => /* @__PURE__ */ jsxs("div", { className: `er-container${variant === "overlay" ? " er-container--overlay" : ""}`, children: [
|
|
2828
2870
|
isWizardStep && /* @__PURE__ */ jsxs("div", { className: "er-payment-layout er-payment-layout--no-sidebar", children: [
|
|
2829
2871
|
/* @__PURE__ */ jsxs("div", { className: "er-payment-layout-main", children: [
|
|
2830
2872
|
totalSteps > 1 && /* @__PURE__ */ jsx(StepIndicator2, { currentStep: currentStepNumber, totalSteps, stepLabels }),
|
|
@@ -2892,7 +2934,100 @@ function EventRegistrationWizard(props) {
|
|
|
2892
2934
|
}
|
|
2893
2935
|
),
|
|
2894
2936
|
wizard.step === "error" && /* @__PURE__ */ jsx(ErrorStep, { message: wizard.errorMessage, onRetry: wizard.handleRetry })
|
|
2895
|
-
] })
|
|
2937
|
+
] });
|
|
2938
|
+
const isEmbedded = (className ?? "").includes("event-registration--embedded");
|
|
2939
|
+
const overlayEnabled = props.overlayEnabled === true;
|
|
2940
|
+
if (isEmbedded || !overlayEnabled) {
|
|
2941
|
+
return /* @__PURE__ */ jsx(
|
|
2942
|
+
"div",
|
|
2943
|
+
{
|
|
2944
|
+
ref: registrationRootRef,
|
|
2945
|
+
id: EVENT_REGISTRATION_ANCHOR_ID,
|
|
2946
|
+
className: registrationRootClassName,
|
|
2947
|
+
"data-block": "event-registration",
|
|
2948
|
+
children: renderRegistrationSurface("inline")
|
|
2949
|
+
}
|
|
2950
|
+
);
|
|
2951
|
+
}
|
|
2952
|
+
const bookingSummaryMeta = [summaryPriceLabel, summaryAvailabilityLabel].filter(Boolean).join(" \xB7 ");
|
|
2953
|
+
const bookingTicketTypes = getActiveTicketTypes(summaryEvent);
|
|
2954
|
+
const bookingTicketTypesCurrency = summaryEvent?.pricing.kind === "ticket_types" ? summaryEvent.pricing.currency : null;
|
|
2955
|
+
const renderBookingEntry = (base) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2956
|
+
/* @__PURE__ */ jsxs("div", { className: `${base}__info`, children: [
|
|
2957
|
+
/* @__PURE__ */ jsx("span", { className: `${base}__title`, children: "Book this event" }),
|
|
2958
|
+
bookingSummaryMeta && /* @__PURE__ */ jsx("span", { className: `${base}__meta`, children: bookingSummaryMeta }),
|
|
2959
|
+
base === "er-booking-teaser" && bookingTicketTypesCurrency && bookingTicketTypes.length > 0 ? /* @__PURE__ */ jsx("div", { className: "er-booking-teaser__tickets", children: bookingTicketTypes.map((ticketType) => /* @__PURE__ */ jsxs("div", { className: "er-booking-teaser__ticket", children: [
|
|
2960
|
+
/* @__PURE__ */ jsx("span", { className: "er-booking-teaser__ticket-name", children: ticketType.name }),
|
|
2961
|
+
/* @__PURE__ */ jsx("strong", { children: formatTicketTypePrice(ticketType, bookingTicketTypesCurrency) })
|
|
2962
|
+
] }, ticketType.id)) }) : null
|
|
2963
|
+
] }),
|
|
2964
|
+
/* @__PURE__ */ jsx(
|
|
2965
|
+
"button",
|
|
2966
|
+
{
|
|
2967
|
+
type: "button",
|
|
2968
|
+
className: `${base}__cta ${buttonClass}`,
|
|
2969
|
+
onClick: () => setBookingOverlayOpen(true),
|
|
2970
|
+
children: "Book now"
|
|
2971
|
+
}
|
|
2972
|
+
)
|
|
2973
|
+
] });
|
|
2974
|
+
const floatingBookingUi = !bookingOverlayOpen && isWizardStep ? /* @__PURE__ */ jsx("div", { className: "er-booking-bar", children: /* @__PURE__ */ jsx("div", { className: "er-booking-bar__inner", children: renderBookingEntry("er-booking-bar") }) }) : null;
|
|
2975
|
+
const floatingBookingLayer = floatingPortalRoot ? createPortal(
|
|
2976
|
+
/* @__PURE__ */ jsx("div", { className: registrationRootClassName, "data-block": "event-registration", children: floatingBookingUi }),
|
|
2977
|
+
floatingPortalRoot
|
|
2978
|
+
) : floatingBookingUi;
|
|
2979
|
+
const bookingOverlayLayer = bookingOverlayOpen ? /* @__PURE__ */ jsx(
|
|
2980
|
+
ModalShell,
|
|
2981
|
+
{
|
|
2982
|
+
title: "Book this event",
|
|
2983
|
+
titleId: "event-registration-booking-title",
|
|
2984
|
+
onClose: () => setBookingOverlayOpen(false),
|
|
2985
|
+
portal: floatingPortalRoot != null,
|
|
2986
|
+
portalRoot: floatingPortalRoot,
|
|
2987
|
+
portalWrapperClassName: registrationRootClassName,
|
|
2988
|
+
portalWrapperProps: { "data-block": "event-registration" },
|
|
2989
|
+
overlayClassName: "er-booking-overlay",
|
|
2990
|
+
modalClassName: "er-booking-overlay__panel",
|
|
2991
|
+
renderHeader: ({ closeButtonRef, onClose, title, titleId }) => /* @__PURE__ */ jsxs("div", { className: "er-booking-overlay__header", children: [
|
|
2992
|
+
/* @__PURE__ */ jsx("h2", { className: "er-booking-overlay__title", id: titleId, children: title }),
|
|
2993
|
+
/* @__PURE__ */ jsx(
|
|
2994
|
+
"button",
|
|
2995
|
+
{
|
|
2996
|
+
ref: closeButtonRef,
|
|
2997
|
+
type: "button",
|
|
2998
|
+
className: "er-booking-overlay__close",
|
|
2999
|
+
onClick: onClose,
|
|
3000
|
+
"aria-label": "Close booking",
|
|
3001
|
+
children: "\xD7"
|
|
3002
|
+
}
|
|
3003
|
+
)
|
|
3004
|
+
] }),
|
|
3005
|
+
children: renderRegistrationSurface("overlay")
|
|
3006
|
+
}
|
|
3007
|
+
) : null;
|
|
3008
|
+
return /* @__PURE__ */ jsxs(
|
|
3009
|
+
"div",
|
|
3010
|
+
{
|
|
3011
|
+
ref: registrationRootRef,
|
|
3012
|
+
id: EVENT_REGISTRATION_ANCHOR_ID,
|
|
3013
|
+
className: registrationRootClassName,
|
|
3014
|
+
"data-block": "event-registration",
|
|
3015
|
+
children: [
|
|
3016
|
+
isWizardStep ? (
|
|
3017
|
+
// In-flow: a lightweight teaser at the block's position. The full wizard
|
|
3018
|
+
// lives in the sheet, so there is only ever one form surface mounted.
|
|
3019
|
+
/* @__PURE__ */ jsx("div", { className: "er-booking-teaser", children: renderBookingEntry("er-booking-teaser") })
|
|
3020
|
+
) : (
|
|
3021
|
+
// Terminal states (success, error, payment verification on redirect
|
|
3022
|
+
// return) render in the page where the visitor lands, unless the sheet is
|
|
3023
|
+
// open and already showing them.
|
|
3024
|
+
!bookingOverlayOpen && renderRegistrationSurface("inline")
|
|
3025
|
+
),
|
|
3026
|
+
floatingBookingLayer,
|
|
3027
|
+
bookingOverlayLayer
|
|
3028
|
+
]
|
|
3029
|
+
}
|
|
3030
|
+
);
|
|
2896
3031
|
}
|
|
2897
3032
|
function isPastOccurrence(startsAt) {
|
|
2898
3033
|
if (!startsAt) return false;
|
|
@@ -3081,6 +3216,32 @@ function TeamMemberName({
|
|
|
3081
3216
|
}) {
|
|
3082
3217
|
return profilePath ? /* @__PURE__ */ jsx("a", { href: profilePath, className: "rb-hover-opacity-80", children: /* @__PURE__ */ jsx("strong", { children: name }) }) : /* @__PURE__ */ jsx("strong", { children: name });
|
|
3083
3218
|
}
|
|
3219
|
+
function formatTicketTypePrice2(ticketType, currency) {
|
|
3220
|
+
return formatCurrencyAmount(ticketType.priceAmount, currency, { decimals: "auto" });
|
|
3221
|
+
}
|
|
3222
|
+
function getActiveTicketTypes2(event) {
|
|
3223
|
+
return event.pricing.kind === "ticket_types" ? event.pricing.ticketTypes.filter((ticketType) => ticketType.isActive).sort((left, right) => left.sortOrder - right.sortOrder) : [];
|
|
3224
|
+
}
|
|
3225
|
+
function TicketTypePriceList({
|
|
3226
|
+
ticketTypes,
|
|
3227
|
+
currency
|
|
3228
|
+
}) {
|
|
3229
|
+
if (ticketTypes.length === 0) return null;
|
|
3230
|
+
return /* @__PURE__ */ jsx("div", { className: "rb-mt-3 rb-flex rb-flex-col rb-gap-2", children: ticketTypes.map((ticketType) => /* @__PURE__ */ jsxs(
|
|
3231
|
+
"div",
|
|
3232
|
+
{
|
|
3233
|
+
className: "rb-flex rb-items-start rb-justify-between rb-gap-4",
|
|
3234
|
+
children: [
|
|
3235
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
3236
|
+
/* @__PURE__ */ jsx("p", { children: ticketType.name }),
|
|
3237
|
+
ticketType.description ? /* @__PURE__ */ jsx("p", { className: "rb-caption status-muted", children: ticketType.description }) : null
|
|
3238
|
+
] }),
|
|
3239
|
+
/* @__PURE__ */ jsx("p", { children: /* @__PURE__ */ jsx("strong", { children: formatTicketTypePrice2(ticketType, currency) }) })
|
|
3240
|
+
]
|
|
3241
|
+
},
|
|
3242
|
+
ticketType.id
|
|
3243
|
+
)) });
|
|
3244
|
+
}
|
|
3084
3245
|
function EventDetailsView({
|
|
3085
3246
|
selection,
|
|
3086
3247
|
showVenue,
|
|
@@ -3115,6 +3276,7 @@ function EventDetailsView({
|
|
|
3115
3276
|
const shouldShowCoursePricing = showCost && !isDropIn && coursePricing !== null;
|
|
3116
3277
|
const shouldShowEventCost = showCost && isPaid && !isDropIn && coursePricing === null;
|
|
3117
3278
|
const eventCostLabel = shouldShowEventCost ? formatEventPrice(selected) : null;
|
|
3279
|
+
const ticketTypes = shouldShowEventCost ? getActiveTicketTypes2(selected) : [];
|
|
3118
3280
|
const acceptedItems = [];
|
|
3119
3281
|
if (showAcceptedPasses) {
|
|
3120
3282
|
acceptedItems.push(...applicablePasses.map((p) => p.name));
|
|
@@ -3171,6 +3333,7 @@ function EventDetailsView({
|
|
|
3171
3333
|
/* @__PURE__ */ jsx("div", { className: "rb-label rb-mb-2", children: "Cost" }),
|
|
3172
3334
|
/* @__PURE__ */ jsx("p", { children: /* @__PURE__ */ jsx("strong", { children: eventCostLabel }) }),
|
|
3173
3335
|
autoApplyDiscount ? /* @__PURE__ */ jsx("p", { className: "rb-caption rb-mt-1", children: formatAutoApplyDiscountLine(autoApplyDiscount, eventPricingCurrency) }) : null,
|
|
3336
|
+
/* @__PURE__ */ jsx(TicketTypePriceList, { ticketTypes, currency: eventPricingCurrency }),
|
|
3174
3337
|
hasAcceptedItems ? /* @__PURE__ */ jsxs("p", { className: "rb-caption rb-mt-1", children: [
|
|
3175
3338
|
"You can also attend with: ",
|
|
3176
3339
|
acceptedItems.join(", ")
|
|
@@ -1,19 +1,17 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { addPassToCommerceCart, useCommerceCart } from './chunk-
|
|
3
|
-
import { CarouselNodeClient } from './chunk-
|
|
4
|
-
import { isRecord } from './chunk-I2MMZO53.mjs';
|
|
2
|
+
import { addPassToCommerceCart, useCommerceCart } from './chunk-WCVK4MBJ.mjs';
|
|
3
|
+
import { CarouselNodeClient } from './chunk-O5JNI3E4.mjs';
|
|
5
4
|
import { useDiscountCodeUi } from './chunk-ZFHRN6W2.mjs';
|
|
6
5
|
import { buildRouteIslandApiConfig } from './chunk-L4J5Y62O.mjs';
|
|
7
|
-
import { createBodyThemePortalRoot, consumeSearchParams, scrollToBlock, TerminalPanel, StateIcon, CheckIcon, CrossIcon, ActionRow, DiscountCodeDisclosure, consumeSearchParam, buildCheckoutReturnUrls } from './chunk-
|
|
8
|
-
import { ModalShell, resolveDedicatedCheckoutPath } from './chunk-
|
|
9
|
-
import { useBlockApi, FeedbackMessage, BlockApiProvider } from './chunk-
|
|
6
|
+
import { createBodyThemePortalRoot, consumeSearchParams, scrollToBlock, TerminalPanel, StateIcon, CheckIcon, CrossIcon, ActionRow, DiscountCodeDisclosure, consumeSearchParam, buildCheckoutReturnUrls } from './chunk-X7GVFB7Y.mjs';
|
|
7
|
+
import { ModalShell, resolveDedicatedCheckoutPath } from './chunk-WBQG7VJA.mjs';
|
|
8
|
+
import { useBlockApi, FeedbackMessage, BlockApiProvider } from './chunk-GOFO7HRH.mjs';
|
|
10
9
|
import { mountReactIsland } from './chunk-N7PBWBWQ.mjs';
|
|
11
|
-
import { themeButtonClassName, formatCommercePrice, formatInterval, getShopDisplayForItems, deriveCommerceCheckoutState, buildProductDetailDisplay, productItemKey, buildProductCartItem, buildProductCardDisplay, assertNever11, reportWorkflowError, clearWorkflowFeedback } from './chunk-
|
|
12
|
-
import { assertNever, ok, err, getCurrentResolveImageUrlContext, resolveImageUrlWithContext, ImagePresets } from './chunk-
|
|
10
|
+
import { themeButtonClassName, formatCommercePrice, formatInterval, getShopDisplayForItems, deriveCommerceCheckoutState, buildProductDetailDisplay, productItemKey, buildProductCartItem, buildProductCardDisplay, assertNever11, reportWorkflowError, clearWorkflowFeedback, unwrapRichTextRoot, createRichTextDocFromMarkdown, isRecord } from './chunk-DIRW2LNG.mjs';
|
|
11
|
+
import { assertNever, ok, err, getCurrentResolveImageUrlContext, resolveImageUrlWithContext, ImagePresets } from './chunk-LI2C6M5O.mjs';
|
|
13
12
|
import * as React3 from 'react';
|
|
14
13
|
import React3__default, { useState, useRef, useCallback, useEffect } from 'react';
|
|
15
14
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
16
|
-
import { z } from 'zod';
|
|
17
15
|
|
|
18
16
|
// ../blocks/src/primitives/content/utils/sanitizeHref.ts
|
|
19
17
|
var SAFE_PROTOCOLS = /* @__PURE__ */ new Set(["http:", "https:", "mailto:", "tel:"]);
|
|
@@ -124,6 +122,8 @@ function renderDoc(node, key, imageResolveContext) {
|
|
|
124
122
|
return /* @__PURE__ */ jsx("blockquote", { children }, key);
|
|
125
123
|
case "horizontalRule":
|
|
126
124
|
return /* @__PURE__ */ jsx("hr", {}, key);
|
|
125
|
+
case "hardBreak":
|
|
126
|
+
return /* @__PURE__ */ jsx("br", {}, key);
|
|
127
127
|
case "image": {
|
|
128
128
|
const attrs = node.attrs ?? {};
|
|
129
129
|
const src = typeof attrs.src === "string" ? attrs.src.trim() : "";
|
|
@@ -166,82 +166,12 @@ function RichText({ as: Comp = "div", className, doc, path }) {
|
|
|
166
166
|
const resolvedClassName = className?.trim() || DEFAULT_RICH_TEXT_CLASS;
|
|
167
167
|
return /* @__PURE__ */ jsx(Comp, { className: resolvedClassName, ...dataAttributes, children: content });
|
|
168
168
|
}
|
|
169
|
-
var TipTapMarkSchema = z.object({
|
|
170
|
-
type: z.string(),
|
|
171
|
-
attrs: z.record(z.string(), z.unknown()).optional()
|
|
172
|
-
});
|
|
173
|
-
var TipTapNodeSchema = z.lazy(
|
|
174
|
-
() => z.object({
|
|
175
|
-
type: z.string(),
|
|
176
|
-
content: z.array(TipTapNodeSchema).optional(),
|
|
177
|
-
text: z.string().optional(),
|
|
178
|
-
attrs: z.record(z.string(), z.unknown()).optional(),
|
|
179
|
-
marks: z.array(TipTapMarkSchema).optional()
|
|
180
|
-
})
|
|
181
|
-
);
|
|
182
|
-
z.union([
|
|
183
|
-
// Canonical: TipTap document directly
|
|
184
|
-
TipTapNodeSchema,
|
|
185
|
-
// Legacy (read-tolerance only): wrapped in { doc: {...} }
|
|
186
|
-
z.object({
|
|
187
|
-
doc: TipTapNodeSchema
|
|
188
|
-
})
|
|
189
|
-
]);
|
|
190
|
-
z.object({
|
|
191
|
-
type: z.literal("doc"),
|
|
192
|
-
content: z.array(TipTapNodeSchema)
|
|
193
|
-
});
|
|
194
|
-
function unwrapRichTextRoot(value) {
|
|
195
|
-
if (!isRecord(value)) return value;
|
|
196
|
-
if (!("doc" in value)) return value;
|
|
197
|
-
const inner = value.doc;
|
|
198
|
-
if (isRecord(inner) && inner.type === "doc") return inner;
|
|
199
|
-
return value;
|
|
200
|
-
}
|
|
201
169
|
|
|
202
170
|
// ../blocks/src/system/runtime/nodes/richText-coerce.ts
|
|
203
|
-
function parseInlineMarkdown(text) {
|
|
204
|
-
const out = [];
|
|
205
|
-
const pushText = (value, marks) => {
|
|
206
|
-
if (!value) return;
|
|
207
|
-
out.push(
|
|
208
|
-
marks && marks.length > 0 ? { type: "text", text: value, marks } : { type: "text", text: value }
|
|
209
|
-
);
|
|
210
|
-
};
|
|
211
|
-
let rest = text;
|
|
212
|
-
while (rest.length > 0) {
|
|
213
|
-
const start = rest.indexOf("**");
|
|
214
|
-
if (start === -1) {
|
|
215
|
-
pushText(rest);
|
|
216
|
-
break;
|
|
217
|
-
}
|
|
218
|
-
const end = rest.indexOf("**", start + 2);
|
|
219
|
-
if (end === -1) {
|
|
220
|
-
pushText(rest);
|
|
221
|
-
break;
|
|
222
|
-
}
|
|
223
|
-
pushText(rest.slice(0, start));
|
|
224
|
-
pushText(rest.slice(start + 2, end), [{ type: "bold" }]);
|
|
225
|
-
rest = rest.slice(end + 2);
|
|
226
|
-
}
|
|
227
|
-
return out;
|
|
228
|
-
}
|
|
229
|
-
function markdownToTipTapDoc(markdown) {
|
|
230
|
-
const normalized = markdown.replace(/\r\n/g, "\n").trim();
|
|
231
|
-
if (!normalized) return { type: "doc", content: [] };
|
|
232
|
-
const paragraphs = normalized.split(/\n{2,}/).map((p) => p.trim()).filter(Boolean);
|
|
233
|
-
return {
|
|
234
|
-
type: "doc",
|
|
235
|
-
content: paragraphs.map((p) => {
|
|
236
|
-
const inline = parseInlineMarkdown(p);
|
|
237
|
-
return inline.length > 0 ? { type: "paragraph", content: inline } : { type: "paragraph" };
|
|
238
|
-
})
|
|
239
|
-
};
|
|
240
|
-
}
|
|
241
171
|
function coerceRichTextDoc(value) {
|
|
242
172
|
const raw = unwrapRichTextRoot(value);
|
|
243
173
|
if (typeof raw === "string") {
|
|
244
|
-
return
|
|
174
|
+
return createRichTextDocFromMarkdown(raw);
|
|
245
175
|
}
|
|
246
176
|
if (isRecord(raw) && typeof raw.type === "string") {
|
|
247
177
|
return raw;
|