@riverbankcms/sdk 0.84.1 → 0.84.2
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-X7RLMEI6.mjs → PreviewEditorSidebar-4PH35ZIE.mjs} +3 -3
- package/dist/{PreviewEditorUI-CT67N4O3.mjs → PreviewEditorUI-WHMCRJGM.mjs} +11 -6
- package/dist/SdkPreviewModeRuntime-4FGSVUYI.mjs +8 -0
- package/dist/_dts/api/src/bookingConfig.d.ts +2 -0
- package/dist/_dts/api/src/index.d.ts +2 -2
- package/dist/_dts/api/src/publicExperienceEndpoints.d.ts +2 -1
- package/dist/_dts/api/src/sdk-event-payment-terms.d.ts +16 -0
- package/dist/_dts/api/src/sdk-event-upsert.d.ts +11 -2
- package/dist/_dts/api/src/sdkContracts.d.ts +3 -0
- package/dist/_dts/api/src/types.d.ts +1 -0
- package/dist/_dts/api/src/url.d.ts +12 -4
- package/dist/_dts/blocks/src/system/runtime/api/types.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/types.d.ts +3 -1
- package/dist/_dts/content-editor/src/hooks/useSimpleAutosave.d.ts +8 -0
- package/dist/_dts/preview-next/src/client/preview/MaintenanceModeBadge.d.ts +3 -2
- package/dist/_dts/preview-next/src/client/preview/PreviewEditorUI.d.ts +2 -1
- package/dist/_dts/sdk/src/client/management/index.d.ts +1 -1
- package/dist/_dts/sdk/src/client/management/types.d.ts +6 -0
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/{chunk-LBBPD2IW.mjs → chunk-4QNLOTES.mjs} +11 -16
- package/dist/{chunk-X5ZCSU6F.mjs → chunk-NFWGLRZZ.mjs} +1 -70
- package/dist/{chunk-QRKJDWT7.mjs → chunk-OCGTXHSO.mjs} +8 -7
- package/dist/{chunk-3LXFQS7T.mjs → chunk-PYDHOMEO.mjs} +1 -1
- package/dist/{chunk-RCTJAZSK.mjs → chunk-WFPYN7KA.mjs} +2 -2
- package/dist/{chunk-O62NDCTI.mjs → chunk-ZR2GQK2A.mjs} +6 -37
- package/dist/cli/index.mjs +10 -11
- package/dist/client/{bookingForm-DYXT6YB6.mjs → bookingForm-36CWQUMV.mjs} +1 -1
- package/dist/client/bookings.mjs +1 -4
- package/dist/client/{chunk-UHDWIXVR.mjs → chunk-3C2VTPWI.mjs} +3 -2
- package/dist/client/{chunk-GFSQNTRW.mjs → chunk-SDIYSQAY.mjs} +0 -4
- package/dist/client/client.mjs +12 -16
- package/dist/client/{courseRegistration-YBOGURTA.mjs → courseRegistration-TMKU6ABO.mjs} +1 -1
- package/dist/client/{eventCalendar-K4QJVCMD.mjs → eventCalendar-G6TI32X6.mjs} +2 -2
- package/dist/client/{eventCombined-MTXGMTCZ.mjs → eventCombined-SCKEMNAR.mjs} +2 -2
- package/dist/client/{eventDetails-3PC4NL3U.mjs → eventDetails-XPIFXXPK.mjs} +2 -2
- package/dist/client/{eventListing-TFJET6DN.mjs → eventListing-7QFMEMGT.mjs} +2 -2
- package/dist/client/{eventRegistration-QGPBGJTW.mjs → eventRegistration-TOODSZUI.mjs} +2 -2
- package/dist/client/{form-MDKR4FNB.mjs → form-MTCMVCZT.mjs} +1 -1
- package/dist/client/{newsletterForm-ZR5UDGBT.mjs → newsletterForm-PCAIPFMA.mjs} +1 -1
- package/dist/client/rendering/client.mjs +2 -5
- package/dist/client/rendering/islands.mjs +9 -9
- package/dist/client/rendering.mjs +2 -5
- package/dist/client/spam-protection.mjs +0 -4
- package/dist/preview-next/client/runtime.mjs +5 -5
- package/dist/{sdk-runtime-7HJYPRWQ.mjs → sdk-runtime-QLOCYKVU.mjs} +6 -6
- package/dist/server/index.mjs +10 -11
- package/dist/server/next.mjs +10 -11
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/server.mjs +10 -11
- package/package.json +1 -1
- package/dist/SdkPreviewModeRuntime-EIMQ3S2V.mjs +0 -8
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { ApiRequestError, markPreviewAuthExpired } from './chunk-
|
|
2
|
+
import { ApiRequestError, markPreviewAuthExpired } from './chunk-4QNLOTES.mjs';
|
|
3
3
|
import { createContext, useContext, useRef } from 'react';
|
|
4
4
|
import { jsx } from 'react/jsx-runtime';
|
|
5
5
|
import { QueryClient, MutationCache, QueryCache, QueryClientProvider } from '@tanstack/react-query';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { assertNever2, usePreviewDesignHistoryOrder, useOptionalEditorUiStoreInstance, getPageDesignEditorState, PAGE_DESIGN_EDITOR_STATE_FETCH_ERROR_MESSAGE, unwrapResponse, useDebouncedLatestSave, AMBIENT_BACKGROUND_ROLES, applyPageDesignEditorAction, resolvePreviewSidebarTab, confirmAutosaveBatch, beginAutosaveBatch, enqueueTransaction, applyBackgroundOverrideContentPatch, systemCustomizeFacetDefinitionForBlock, systemCustomizeFacetRollbackContentPatch, systemCustomizeFacetApplyContentPatch, unsafeAsEditorBlockId, createHistoryState, rejectAutosaveBatch, redoHistory, undoHistory, pushHistoryEntry, idleEditorTransactionQueueState, canRedoHistory, deriveTransactionCapabilities, canUndoHistory, backgroundOverrideEquals, attachRenderableMediaAssetFields, planPageDesignLayoutLookCompatibility, unsafeAsEditorBlockValues } from './chunk-
|
|
3
|
-
import { ApiRequestError, resolveSurfaceDocumentAttributes, SURFACE_DOCUMENT_DATA_ATTRIBUTE, SURFACE_IDS } from './chunk-
|
|
2
|
+
import { assertNever2, usePreviewDesignHistoryOrder, useOptionalEditorUiStoreInstance, getPageDesignEditorState, PAGE_DESIGN_EDITOR_STATE_FETCH_ERROR_MESSAGE, unwrapResponse, useDebouncedLatestSave, AMBIENT_BACKGROUND_ROLES, applyPageDesignEditorAction, resolvePreviewSidebarTab, confirmAutosaveBatch, beginAutosaveBatch, enqueueTransaction, applyBackgroundOverrideContentPatch, systemCustomizeFacetDefinitionForBlock, systemCustomizeFacetRollbackContentPatch, systemCustomizeFacetApplyContentPatch, unsafeAsEditorBlockId, createHistoryState, rejectAutosaveBatch, redoHistory, undoHistory, pushHistoryEntry, idleEditorTransactionQueueState, canRedoHistory, deriveTransactionCapabilities, canUndoHistory, backgroundOverrideEquals, attachRenderableMediaAssetFields, planPageDesignLayoutLookCompatibility, unsafeAsEditorBlockValues } from './chunk-ZR2GQK2A.mjs';
|
|
3
|
+
import { ApiRequestError, resolveSurfaceDocumentAttributes, SURFACE_DOCUMENT_DATA_ATTRIBUTE, SURFACE_IDS } from './chunk-4QNLOTES.mjs';
|
|
4
4
|
import { createContext, useState, useRef, useEffect, useMemo, useLayoutEffect, useContext } from 'react';
|
|
5
5
|
import { jsx } from 'react/jsx-runtime';
|
|
6
6
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { ApiRequestError } from './chunk-
|
|
2
|
+
import { ApiRequestError } from './chunk-4QNLOTES.mjs';
|
|
3
3
|
import { __commonJS, __export, __toESM } from './chunk-R7POPVJR.mjs';
|
|
4
4
|
import * as React61 from 'react';
|
|
5
5
|
import React61__default, { createContext, forwardRef, useContext, createElement, useRef, useMemo, useEffect, useState, useCallback, useImperativeHandle, useLayoutEffect, memo, createRef, Component as Component$1, useDebugValue, useId as useId$1, useSyncExternalStore, isValidElement, cloneElement, useReducer, startTransition } from 'react';
|
|
@@ -29488,20 +29488,6 @@ function useDebouncedLatestSave(config) {
|
|
|
29488
29488
|
}
|
|
29489
29489
|
|
|
29490
29490
|
// ../content-editor/src/hooks/useSimpleAutosave.ts
|
|
29491
|
-
var DEBUG_RICHTEXT_FOCUS = process.env.NEXT_PUBLIC_DEBUG_RICHTEXT_FOCUS === "1";
|
|
29492
|
-
function describeActiveElement() {
|
|
29493
|
-
if (typeof document === "undefined") return null;
|
|
29494
|
-
const el2 = document.activeElement;
|
|
29495
|
-
if (!el2) return null;
|
|
29496
|
-
return {
|
|
29497
|
-
tag: el2.tagName,
|
|
29498
|
-
id: el2.id || null,
|
|
29499
|
-
role: el2.getAttribute("role"),
|
|
29500
|
-
className: typeof el2.className === "string" ? el2.className : null,
|
|
29501
|
-
isProseMirror: el2.classList?.contains("ProseMirror") ?? false,
|
|
29502
|
-
withinProseMirror: Boolean(el2.closest?.(".ProseMirror"))
|
|
29503
|
-
};
|
|
29504
|
-
}
|
|
29505
29491
|
function useSimpleAutosave(config) {
|
|
29506
29492
|
const {
|
|
29507
29493
|
saveFn,
|
|
@@ -29529,15 +29515,7 @@ function useSimpleAutosave(config) {
|
|
|
29529
29515
|
maxWait,
|
|
29530
29516
|
enabled,
|
|
29531
29517
|
onSaving: () => {
|
|
29532
|
-
if (DEBUG_RICHTEXT_FOCUS && type === "content") {
|
|
29533
|
-
console.log("[useSimpleAutosave] saving:start (pre)", { type, active: describeActiveElement() });
|
|
29534
|
-
}
|
|
29535
29518
|
updateStatus({ status: "saving" });
|
|
29536
|
-
if (DEBUG_RICHTEXT_FOCUS && type === "content") {
|
|
29537
|
-
setTimeout(() => {
|
|
29538
|
-
console.log("[useSimpleAutosave] saving:start (post)", { type, active: describeActiveElement() });
|
|
29539
|
-
}, 0);
|
|
29540
|
-
}
|
|
29541
29519
|
},
|
|
29542
29520
|
onSaved: (result, sentValuesRef) => {
|
|
29543
29521
|
const timestamp = (/* @__PURE__ */ new Date()).toISOString();
|
|
@@ -125910,10 +125888,6 @@ function getCmsApiUrl() {
|
|
|
125910
125888
|
if (dashboardUrl) {
|
|
125911
125889
|
return `${dashboardUrl.replace(/\/$/, "")}/api`;
|
|
125912
125890
|
}
|
|
125913
|
-
const legacyApiUrl = process.env.NEXT_PUBLIC_CMS_API_URL;
|
|
125914
|
-
if (legacyApiUrl) {
|
|
125915
|
-
return legacyApiUrl.replace(/\/$/, "");
|
|
125916
|
-
}
|
|
125917
125891
|
throw new Error("Dashboard URL not configured. Set NEXT_PUBLIC_DASHBOARD_URL");
|
|
125918
125892
|
}
|
|
125919
125893
|
function getChallengeUrl() {
|
|
@@ -131241,7 +131215,7 @@ var PaymentSelectionStep = ({
|
|
|
131241
131215
|
label: "Pay by Card",
|
|
131242
131216
|
detail: formatPrice(totalPrice, eligibility.currency),
|
|
131243
131217
|
selected: selectedMethod === "stripe",
|
|
131244
|
-
onClick: () => onSelectionChange({ method: "stripe" })
|
|
131218
|
+
onClick: () => onSelectionChange({ method: "stripe", collectionOptionKind: "upfront" })
|
|
131245
131219
|
}
|
|
131246
131220
|
),
|
|
131247
131221
|
isAuthenticated && eligibility.eligiblePasses.map((pass) => /* @__PURE__ */ jsx(
|
|
@@ -132030,6 +132004,7 @@ function useEventRegistrationSubmit(options) {
|
|
|
132030
132004
|
checkoutType,
|
|
132031
132005
|
productId: bundleProductId,
|
|
132032
132006
|
discountCode: options.discountCode.trim() ? options.discountCode.trim() : void 0,
|
|
132007
|
+
collectionOptionKind: selectionSnapshot.collectionOptionKind,
|
|
132033
132008
|
successUrl,
|
|
132034
132009
|
cancelUrl
|
|
132035
132010
|
});
|
|
@@ -182868,9 +182843,6 @@ function applyRfc6902Patch(base2, ops) {
|
|
|
182868
182843
|
}
|
|
182869
182844
|
var PreviewThemeOverlayContext = createContext(null);
|
|
182870
182845
|
var NO_THEME_OVERLAY = { kind: "none" };
|
|
182871
|
-
function isDebugEnabled() {
|
|
182872
|
-
return process.env.NEXT_PUBLIC_AI_ASSISTANT_DEBUG === "1";
|
|
182873
|
-
}
|
|
182874
182846
|
function PreviewThemeOverlayProvider({ baseTheme, children }) {
|
|
182875
182847
|
const [overlay, setOverlay] = useState(NO_THEME_OVERLAY);
|
|
182876
182848
|
const overlayOps = overlay.kind === "patch" ? [...overlay.ops] : null;
|
|
@@ -182925,12 +182897,9 @@ function PreviewThemeOverlayProvider({ baseTheme, children }) {
|
|
|
182925
182897
|
try {
|
|
182926
182898
|
return applyRfc6902Patch(baseTheme, [...overlay.ops]);
|
|
182927
182899
|
} catch (error) {
|
|
182928
|
-
|
|
182929
|
-
|
|
182930
|
-
|
|
182931
|
-
overlayOps: overlay.ops
|
|
182932
|
-
});
|
|
182933
|
-
}
|
|
182900
|
+
console.warn("[preview-theme-overlay] failed to apply theme overlay patch", {
|
|
182901
|
+
error: error instanceof Error ? error.message : String(error)
|
|
182902
|
+
});
|
|
182934
182903
|
return baseTheme;
|
|
182935
182904
|
}
|
|
182936
182905
|
}, [baseTheme, overlay]);
|
package/dist/cli/index.mjs
CHANGED
|
@@ -42213,17 +42213,21 @@ function looksLikeLocalAuthority(authority) {
|
|
|
42213
42213
|
const normalized = authority.toLowerCase();
|
|
42214
42214
|
return normalized === "localhost" || normalized.startsWith("localhost:") || normalized.startsWith("127.") || normalized.startsWith("0.0.0.0") || normalized.includes(".localhost") || normalized.endsWith(".local") || normalized.endsWith(".test");
|
|
42215
42215
|
}
|
|
42216
|
-
function
|
|
42216
|
+
function normalizeDashboardOrigin(input) {
|
|
42217
42217
|
const trimmed = input.trim();
|
|
42218
42218
|
if (!trimmed) return "";
|
|
42219
42219
|
const withoutTrailingSlash = trimmed.replace(/\/+$/, "");
|
|
42220
42220
|
const withoutApiSuffix = withoutTrailingSlash.replace(/\/api\/?$/, "");
|
|
42221
42221
|
if (/^https?:\/\//i.test(withoutApiSuffix)) {
|
|
42222
|
-
return withoutApiSuffix;
|
|
42222
|
+
return new URL(withoutApiSuffix).origin;
|
|
42223
42223
|
}
|
|
42224
42224
|
const authority = withoutApiSuffix.replace(/^\/+/, "");
|
|
42225
42225
|
const protocol = looksLikeLocalAuthority(authority) ? "http" : "https";
|
|
42226
|
-
return `${protocol}://${authority}
|
|
42226
|
+
return new URL(`${protocol}://${authority}`).origin;
|
|
42227
|
+
}
|
|
42228
|
+
function deriveCmsApiUrlFromDashboardUrl(input) {
|
|
42229
|
+
const origin = normalizeDashboardOrigin(input);
|
|
42230
|
+
return origin ? `${origin}/api` : "";
|
|
42227
42231
|
}
|
|
42228
42232
|
function getCmsApiUrl() {
|
|
42229
42233
|
if (typeof window !== "undefined") {
|
|
@@ -42235,15 +42239,10 @@ function getCmsApiUrl() {
|
|
|
42235
42239
|
}
|
|
42236
42240
|
const dashboardUrl = process.env.NEXT_PUBLIC_DASHBOARD_URL;
|
|
42237
42241
|
if (dashboardUrl) {
|
|
42238
|
-
|
|
42239
|
-
return `${base}/api`;
|
|
42240
|
-
}
|
|
42241
|
-
const legacyApiUrl = process.env.NEXT_PUBLIC_CMS_API_URL;
|
|
42242
|
-
if (legacyApiUrl) {
|
|
42243
|
-
return legacyApiUrl.replace(/\/$/, "");
|
|
42242
|
+
return deriveCmsApiUrlFromDashboardUrl(dashboardUrl);
|
|
42244
42243
|
}
|
|
42245
42244
|
throw new Error(
|
|
42246
|
-
"NEXT_PUBLIC_DASHBOARD_URL is not configured. Set
|
|
42245
|
+
"CMS_API_URL or NEXT_PUBLIC_DASHBOARD_URL is not configured. Set NEXT_PUBLIC_DASHBOARD_URL to your dashboard URL (e.g., http://localhost:4000)"
|
|
42247
42246
|
);
|
|
42248
42247
|
}
|
|
42249
42248
|
function resolveApiBaseUrl() {
|
|
@@ -64396,7 +64395,7 @@ var SimpleCache = class {
|
|
|
64396
64395
|
};
|
|
64397
64396
|
|
|
64398
64397
|
// src/version.ts
|
|
64399
|
-
var SDK_VERSION = "0.84.
|
|
64398
|
+
var SDK_VERSION = "0.84.2";
|
|
64400
64399
|
|
|
64401
64400
|
// src/client/error.ts
|
|
64402
64401
|
var RiverbankApiError = class _RiverbankApiError extends Error {
|
|
@@ -6,7 +6,7 @@ import { buildRouteIslandApiConfig } from './chunk-L4J5Y62O.mjs';
|
|
|
6
6
|
import { scrollToBlock, buildCheckoutReturnUrls, DiscountCodeDisclosure, formatPrice } from './chunk-7UCLJ5SP.mjs';
|
|
7
7
|
import { FieldValidationMessage, getFieldValidationControlProps } from './chunk-3DCJ45Z2.mjs';
|
|
8
8
|
import './chunk-DVNUDUVT.mjs';
|
|
9
|
-
import { isSpamProtectionEnabled, getChallengeUrl, AltchaWidget } from './chunk-
|
|
9
|
+
import { isSpamProtectionEnabled, getChallengeUrl, AltchaWidget } from './chunk-SDIYSQAY.mjs';
|
|
10
10
|
import { BlockApiProvider, useBlockApi, FeedbackMessage } from './chunk-UDNSI5PY.mjs';
|
|
11
11
|
import { mountReactIsland } from './chunk-N7PBWBWQ.mjs';
|
|
12
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-VGDBVNOO.mjs';
|
package/dist/client/bookings.mjs
CHANGED
|
@@ -12011,10 +12011,6 @@ function getCmsApiUrl() {
|
|
|
12011
12011
|
if (dashboardUrl) {
|
|
12012
12012
|
return `${dashboardUrl.replace(/\/$/, "")}/api`;
|
|
12013
12013
|
}
|
|
12014
|
-
const legacyApiUrl = process.env.NEXT_PUBLIC_CMS_API_URL;
|
|
12015
|
-
if (legacyApiUrl) {
|
|
12016
|
-
return legacyApiUrl.replace(/\/$/, "");
|
|
12017
|
-
}
|
|
12018
12014
|
throw new Error("Dashboard URL not configured. Set NEXT_PUBLIC_DASHBOARD_URL");
|
|
12019
12015
|
}
|
|
12020
12016
|
function getChallengeUrl() {
|
|
@@ -16769,6 +16765,7 @@ function useEventRegistrationSubmit(options) {
|
|
|
16769
16765
|
checkoutType,
|
|
16770
16766
|
productId: bundleProductId,
|
|
16771
16767
|
discountCode: options.discountCode.trim() ? options.discountCode.trim() : void 0,
|
|
16768
|
+
collectionOptionKind: selectionSnapshot.collectionOptionKind,
|
|
16772
16769
|
successUrl,
|
|
16773
16770
|
cancelUrl
|
|
16774
16771
|
});
|
|
@@ -7,7 +7,7 @@ import { useDiscountCodeUi } from './chunk-ZFHRN6W2.mjs';
|
|
|
7
7
|
import { createBodyThemePortalRoot, TabBarFragment, logoutPortal, StepIndicator, DiscountCodeDisclosure, TerminalPanel, StateIcon, formatPrice, CrossIcon, ClockIcon, consumeSearchParam, LoggedInAsUser, CheckIcon } from './chunk-7UCLJ5SP.mjs';
|
|
8
8
|
import { getFieldValidationControlProps, FieldValidationMessage } from './chunk-3DCJ45Z2.mjs';
|
|
9
9
|
import { ModalShell } from './chunk-DVNUDUVT.mjs';
|
|
10
|
-
import { isSpamProtectionEnabled, AltchaWidget, getChallengeUrl } from './chunk-
|
|
10
|
+
import { isSpamProtectionEnabled, AltchaWidget, getChallengeUrl } from './chunk-SDIYSQAY.mjs';
|
|
11
11
|
import { useBlockApi, FeedbackMessage } from './chunk-UDNSI5PY.mjs';
|
|
12
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, resolveCoursePricingState, resolveRuntimeEventPricing, formatEventPrice, formatEventDateParts, DateTimeTile, EventCard, buildCalendarViewport, shiftCalendarAnchorDate, addMonths, getThreeMonthRange, buildTimetableModel, formatDate, toRegistrationEvents, isEventContentType, findPreSelectedEvent, resolveRegistrationTarget, findEventByOccurrenceId, resolveEventRequiresPayment, resolveDiscountContext, formatCoursePriceAmount, formatCoursePriceDisplay, MONTH_NAMES, getEventAvailability, formatEventTeacherLine, CreditCard, Ticket, Star, Sparkles, assertNever11 } from './chunk-VGDBVNOO.mjs';
|
|
13
13
|
import { publicEventPricingType, getBookingLocalDateKey, toScheduledBookingDateTime, toBookingTimeZone, publicEventPricingCurrency, formatBookingDateTime, publicEventPricingMode, publicEventScalarPrice, publicEventTicketTypes, formatBookingDate, formatBookingTime } from './chunk-ZE5G642V.mjs';
|
|
@@ -1468,7 +1468,7 @@ var PaymentSelectionStep = ({
|
|
|
1468
1468
|
label: "Pay by Card",
|
|
1469
1469
|
detail: formatPrice(totalPrice, eligibility.currency),
|
|
1470
1470
|
selected: selectedMethod === "stripe",
|
|
1471
|
-
onClick: () => onSelectionChange({ method: "stripe" })
|
|
1471
|
+
onClick: () => onSelectionChange({ method: "stripe", collectionOptionKind: "upfront" })
|
|
1472
1472
|
}
|
|
1473
1473
|
),
|
|
1474
1474
|
isAuthenticated && eligibility.eligiblePasses.map((pass) => /* @__PURE__ */ jsx(
|
|
@@ -2144,6 +2144,7 @@ function useEventRegistrationSubmit(options) {
|
|
|
2144
2144
|
checkoutType,
|
|
2145
2145
|
productId: bundleProductId,
|
|
2146
2146
|
discountCode: options.discountCode.trim() ? options.discountCode.trim() : void 0,
|
|
2147
|
+
collectionOptionKind: selectionSnapshot.collectionOptionKind,
|
|
2147
2148
|
successUrl,
|
|
2148
2149
|
cancelUrl
|
|
2149
2150
|
});
|
|
@@ -71,10 +71,6 @@ function getCmsApiUrl() {
|
|
|
71
71
|
if (dashboardUrl) {
|
|
72
72
|
return `${dashboardUrl.replace(/\/$/, "")}/api`;
|
|
73
73
|
}
|
|
74
|
-
const legacyApiUrl = process.env.NEXT_PUBLIC_CMS_API_URL;
|
|
75
|
-
if (legacyApiUrl) {
|
|
76
|
-
return legacyApiUrl.replace(/\/$/, "");
|
|
77
|
-
}
|
|
78
74
|
throw new Error("Dashboard URL not configured. Set NEXT_PUBLIC_DASHBOARD_URL");
|
|
79
75
|
}
|
|
80
76
|
function getChallengeUrl() {
|
package/dist/client/client.mjs
CHANGED
|
@@ -39542,10 +39542,6 @@ function getCmsApiUrl2() {
|
|
|
39542
39542
|
if (dashboardUrl) {
|
|
39543
39543
|
return `${dashboardUrl.replace(/\/$/, "")}/api`;
|
|
39544
39544
|
}
|
|
39545
|
-
const legacyApiUrl = process.env.NEXT_PUBLIC_CMS_API_URL;
|
|
39546
|
-
if (legacyApiUrl) {
|
|
39547
|
-
return legacyApiUrl.replace(/\/$/, "");
|
|
39548
|
-
}
|
|
39549
39545
|
throw new Error("Dashboard URL not configured. Set NEXT_PUBLIC_DASHBOARD_URL");
|
|
39550
39546
|
}
|
|
39551
39547
|
function getChallengeUrl() {
|
|
@@ -45775,7 +45771,7 @@ var init_PaymentSelectionStep = __esm({
|
|
|
45775
45771
|
label: "Pay by Card",
|
|
45776
45772
|
detail: formatPrice(totalPrice, eligibility.currency),
|
|
45777
45773
|
selected: selectedMethod === "stripe",
|
|
45778
|
-
onClick: () => onSelectionChange({ method: "stripe" })
|
|
45774
|
+
onClick: () => onSelectionChange({ method: "stripe", collectionOptionKind: "upfront" })
|
|
45779
45775
|
}
|
|
45780
45776
|
),
|
|
45781
45777
|
isAuthenticated && eligibility.eligiblePasses.map((pass) => /* @__PURE__ */ jsx95(
|
|
@@ -46714,6 +46710,7 @@ function useEventRegistrationSubmit(options) {
|
|
|
46714
46710
|
checkoutType,
|
|
46715
46711
|
productId: bundleProductId,
|
|
46716
46712
|
discountCode: options.discountCode.trim() ? options.discountCode.trim() : void 0,
|
|
46713
|
+
collectionOptionKind: selectionSnapshot.collectionOptionKind,
|
|
46717
46714
|
successUrl,
|
|
46718
46715
|
cancelUrl
|
|
46719
46716
|
});
|
|
@@ -95564,17 +95561,21 @@ function looksLikeLocalAuthority(authority) {
|
|
|
95564
95561
|
const normalized = authority.toLowerCase();
|
|
95565
95562
|
return normalized === "localhost" || normalized.startsWith("localhost:") || normalized.startsWith("127.") || normalized.startsWith("0.0.0.0") || normalized.includes(".localhost") || normalized.endsWith(".local") || normalized.endsWith(".test");
|
|
95566
95563
|
}
|
|
95567
|
-
function
|
|
95564
|
+
function normalizeDashboardOrigin(input) {
|
|
95568
95565
|
const trimmed = input.trim();
|
|
95569
95566
|
if (!trimmed) return "";
|
|
95570
95567
|
const withoutTrailingSlash = trimmed.replace(/\/+$/, "");
|
|
95571
95568
|
const withoutApiSuffix = withoutTrailingSlash.replace(/\/api\/?$/, "");
|
|
95572
95569
|
if (/^https?:\/\//i.test(withoutApiSuffix)) {
|
|
95573
|
-
return withoutApiSuffix;
|
|
95570
|
+
return new URL(withoutApiSuffix).origin;
|
|
95574
95571
|
}
|
|
95575
95572
|
const authority = withoutApiSuffix.replace(/^\/+/, "");
|
|
95576
95573
|
const protocol = looksLikeLocalAuthority(authority) ? "http" : "https";
|
|
95577
|
-
return `${protocol}://${authority}
|
|
95574
|
+
return new URL(`${protocol}://${authority}`).origin;
|
|
95575
|
+
}
|
|
95576
|
+
function deriveCmsApiUrlFromDashboardUrl(input) {
|
|
95577
|
+
const origin = normalizeDashboardOrigin(input);
|
|
95578
|
+
return origin ? `${origin}/api` : "";
|
|
95578
95579
|
}
|
|
95579
95580
|
function getCmsApiUrl() {
|
|
95580
95581
|
if (typeof window !== "undefined") {
|
|
@@ -95586,15 +95587,10 @@ function getCmsApiUrl() {
|
|
|
95586
95587
|
}
|
|
95587
95588
|
const dashboardUrl = process.env.NEXT_PUBLIC_DASHBOARD_URL;
|
|
95588
95589
|
if (dashboardUrl) {
|
|
95589
|
-
|
|
95590
|
-
return `${base}/api`;
|
|
95591
|
-
}
|
|
95592
|
-
const legacyApiUrl = process.env.NEXT_PUBLIC_CMS_API_URL;
|
|
95593
|
-
if (legacyApiUrl) {
|
|
95594
|
-
return legacyApiUrl.replace(/\/$/, "");
|
|
95590
|
+
return deriveCmsApiUrlFromDashboardUrl(dashboardUrl);
|
|
95595
95591
|
}
|
|
95596
95592
|
throw new Error(
|
|
95597
|
-
"NEXT_PUBLIC_DASHBOARD_URL is not configured. Set
|
|
95593
|
+
"CMS_API_URL or NEXT_PUBLIC_DASHBOARD_URL is not configured. Set NEXT_PUBLIC_DASHBOARD_URL to your dashboard URL (e.g., http://localhost:4000)"
|
|
95598
95594
|
);
|
|
95599
95595
|
}
|
|
95600
95596
|
function resolveApiBaseUrl() {
|
|
@@ -97997,7 +97993,7 @@ var SimpleCache = class {
|
|
|
97997
97993
|
};
|
|
97998
97994
|
|
|
97999
97995
|
// src/version.ts
|
|
98000
|
-
var SDK_VERSION = "0.84.
|
|
97996
|
+
var SDK_VERSION = "0.84.2";
|
|
98001
97997
|
|
|
98002
97998
|
// src/client/error.ts
|
|
98003
97999
|
var RiverbankApiError = class _RiverbankApiError extends Error {
|
|
@@ -5,7 +5,7 @@ import { buildRouteIslandApiConfig } from './chunk-L4J5Y62O.mjs';
|
|
|
5
5
|
import { DiscountCodeDisclosure, getStepNumber, logoutPortal, StepIndicator, LoggedInAsUser, CheckIcon, formatPrice, TerminalPanel, StateIcon, ClockIcon, CrossIcon, scrollToBlock, buildCheckoutReturnUrls, MembershipHero, validateFormData } from './chunk-7UCLJ5SP.mjs';
|
|
6
6
|
import { getFieldValidationControlProps, FieldValidationMessage } from './chunk-3DCJ45Z2.mjs';
|
|
7
7
|
import { ModalShell } from './chunk-DVNUDUVT.mjs';
|
|
8
|
-
import { AltchaWidget, getChallengeUrl, isSpamProtectionEnabled } from './chunk-
|
|
8
|
+
import { AltchaWidget, getChallengeUrl, isSpamProtectionEnabled } from './chunk-SDIYSQAY.mjs';
|
|
9
9
|
import { BlockApiProvider, useBlockApi } from './chunk-UDNSI5PY.mjs';
|
|
10
10
|
import { mountReactIsland } from './chunk-N7PBWBWQ.mjs';
|
|
11
11
|
import { defineIslandPropsDecoder, themeButtonClassName, resolveCoursePricingState, formatCoursePriceDisplay, formatCoursePriceAmount } from './chunk-VGDBVNOO.mjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EventCalendarClient } from './chunk-
|
|
1
|
+
import { EventCalendarClient } from './chunk-3C2VTPWI.mjs';
|
|
2
2
|
import './chunk-XSV6KW4D.mjs';
|
|
3
3
|
import './chunk-3DTWLTXM.mjs';
|
|
4
4
|
import './chunk-I2MMZO53.mjs';
|
|
@@ -9,7 +9,7 @@ import { buildRouteIslandApiConfig } from './chunk-L4J5Y62O.mjs';
|
|
|
9
9
|
import './chunk-7UCLJ5SP.mjs';
|
|
10
10
|
import './chunk-3DCJ45Z2.mjs';
|
|
11
11
|
import './chunk-DVNUDUVT.mjs';
|
|
12
|
-
import './chunk-
|
|
12
|
+
import './chunk-SDIYSQAY.mjs';
|
|
13
13
|
import { BlockApiProvider } from './chunk-UDNSI5PY.mjs';
|
|
14
14
|
import { mountReactIsland } from './chunk-N7PBWBWQ.mjs';
|
|
15
15
|
import { defineIslandPropsDecoder } from './chunk-VGDBVNOO.mjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EventCombinedIslandClient } from './chunk-
|
|
1
|
+
import { EventCombinedIslandClient } from './chunk-3C2VTPWI.mjs';
|
|
2
2
|
import './chunk-XSV6KW4D.mjs';
|
|
3
3
|
import './chunk-3DTWLTXM.mjs';
|
|
4
4
|
import './chunk-I2MMZO53.mjs';
|
|
@@ -9,7 +9,7 @@ import { buildRouteIslandApiConfig } from './chunk-L4J5Y62O.mjs';
|
|
|
9
9
|
import './chunk-7UCLJ5SP.mjs';
|
|
10
10
|
import './chunk-3DCJ45Z2.mjs';
|
|
11
11
|
import './chunk-DVNUDUVT.mjs';
|
|
12
|
-
import './chunk-
|
|
12
|
+
import './chunk-SDIYSQAY.mjs';
|
|
13
13
|
import { BlockApiProvider } from './chunk-UDNSI5PY.mjs';
|
|
14
14
|
import { mountReactIsland } from './chunk-N7PBWBWQ.mjs';
|
|
15
15
|
import { defineIslandPropsDecoder } from './chunk-VGDBVNOO.mjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EventDetailsIslandClient } from './chunk-
|
|
1
|
+
import { EventDetailsIslandClient } from './chunk-3C2VTPWI.mjs';
|
|
2
2
|
import './chunk-XSV6KW4D.mjs';
|
|
3
3
|
import './chunk-3DTWLTXM.mjs';
|
|
4
4
|
import './chunk-I2MMZO53.mjs';
|
|
@@ -8,7 +8,7 @@ import './chunk-ZFHRN6W2.mjs';
|
|
|
8
8
|
import './chunk-7UCLJ5SP.mjs';
|
|
9
9
|
import './chunk-3DCJ45Z2.mjs';
|
|
10
10
|
import './chunk-DVNUDUVT.mjs';
|
|
11
|
-
import './chunk-
|
|
11
|
+
import './chunk-SDIYSQAY.mjs';
|
|
12
12
|
import './chunk-UDNSI5PY.mjs';
|
|
13
13
|
import { mountReactIsland } from './chunk-N7PBWBWQ.mjs';
|
|
14
14
|
import { defineIslandPropsDecoder } from './chunk-VGDBVNOO.mjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EventListingClient } from './chunk-
|
|
1
|
+
import { EventListingClient } from './chunk-3C2VTPWI.mjs';
|
|
2
2
|
import './chunk-XSV6KW4D.mjs';
|
|
3
3
|
import './chunk-3DTWLTXM.mjs';
|
|
4
4
|
import './chunk-I2MMZO53.mjs';
|
|
@@ -9,7 +9,7 @@ import { buildRouteIslandApiConfig } from './chunk-L4J5Y62O.mjs';
|
|
|
9
9
|
import './chunk-7UCLJ5SP.mjs';
|
|
10
10
|
import './chunk-3DCJ45Z2.mjs';
|
|
11
11
|
import './chunk-DVNUDUVT.mjs';
|
|
12
|
-
import './chunk-
|
|
12
|
+
import './chunk-SDIYSQAY.mjs';
|
|
13
13
|
import { BlockApiProvider } from './chunk-UDNSI5PY.mjs';
|
|
14
14
|
import { mountReactIsland } from './chunk-N7PBWBWQ.mjs';
|
|
15
15
|
import { defineIslandPropsDecoder } from './chunk-VGDBVNOO.mjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EventRegistrationIslandClient } from './chunk-
|
|
1
|
+
import { EventRegistrationIslandClient } from './chunk-3C2VTPWI.mjs';
|
|
2
2
|
import './chunk-XSV6KW4D.mjs';
|
|
3
3
|
import './chunk-3DTWLTXM.mjs';
|
|
4
4
|
import './chunk-I2MMZO53.mjs';
|
|
@@ -9,7 +9,7 @@ import { buildRouteIslandApiConfig } from './chunk-L4J5Y62O.mjs';
|
|
|
9
9
|
import './chunk-7UCLJ5SP.mjs';
|
|
10
10
|
import './chunk-3DCJ45Z2.mjs';
|
|
11
11
|
import './chunk-DVNUDUVT.mjs';
|
|
12
|
-
import './chunk-
|
|
12
|
+
import './chunk-SDIYSQAY.mjs';
|
|
13
13
|
import { BlockApiProvider } from './chunk-UDNSI5PY.mjs';
|
|
14
14
|
import { mountReactIsland } from './chunk-N7PBWBWQ.mjs';
|
|
15
15
|
import { defineIslandPropsDecoder } from './chunk-VGDBVNOO.mjs';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { isSpamProtectionEnabled, AltchaWidget, getChallengeUrl } from './chunk-
|
|
2
|
+
import { isSpamProtectionEnabled, AltchaWidget, getChallengeUrl } from './chunk-SDIYSQAY.mjs';
|
|
3
3
|
import { BlockApiProvider, FeedbackMessage, useBlockApi } from './chunk-UDNSI5PY.mjs';
|
|
4
4
|
import { mountReactIsland } from './chunk-N7PBWBWQ.mjs';
|
|
5
5
|
import { defineIslandPropsDecoder, themeButtonClassName, assertNever11, err2, ok } from './chunk-VGDBVNOO.mjs';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { getFieldValidationControlProps, FieldValidationMessage } from './chunk-3DCJ45Z2.mjs';
|
|
3
|
-
import { isSpamProtectionEnabled, AltchaWidget, getChallengeUrl } from './chunk-
|
|
3
|
+
import { isSpamProtectionEnabled, AltchaWidget, getChallengeUrl } from './chunk-SDIYSQAY.mjs';
|
|
4
4
|
import { BlockApiProvider, useBlockApi, FeedbackMessage } from './chunk-UDNSI5PY.mjs';
|
|
5
5
|
import { mountReactIsland } from './chunk-N7PBWBWQ.mjs';
|
|
6
6
|
import { defineIslandPropsDecoder, themeButtonClassName } from './chunk-VGDBVNOO.mjs';
|
|
@@ -28258,10 +28258,6 @@ function getCmsApiUrl() {
|
|
|
28258
28258
|
if (dashboardUrl) {
|
|
28259
28259
|
return `${dashboardUrl.replace(/\/$/, "")}/api`;
|
|
28260
28260
|
}
|
|
28261
|
-
const legacyApiUrl = process.env.NEXT_PUBLIC_CMS_API_URL;
|
|
28262
|
-
if (legacyApiUrl) {
|
|
28263
|
-
return legacyApiUrl.replace(/\/$/, "");
|
|
28264
|
-
}
|
|
28265
28261
|
throw new Error("Dashboard URL not configured. Set NEXT_PUBLIC_DASHBOARD_URL");
|
|
28266
28262
|
}
|
|
28267
28263
|
function getChallengeUrl() {
|
|
@@ -34192,7 +34188,7 @@ var init_PaymentSelectionStep = __esm({
|
|
|
34192
34188
|
label: "Pay by Card",
|
|
34193
34189
|
detail: formatPrice(totalPrice, eligibility.currency),
|
|
34194
34190
|
selected: selectedMethod === "stripe",
|
|
34195
|
-
onClick: () => onSelectionChange({ method: "stripe" })
|
|
34191
|
+
onClick: () => onSelectionChange({ method: "stripe", collectionOptionKind: "upfront" })
|
|
34196
34192
|
}
|
|
34197
34193
|
),
|
|
34198
34194
|
isAuthenticated && eligibility.eligiblePasses.map((pass) => /* @__PURE__ */ jsx80(
|
|
@@ -35131,6 +35127,7 @@ function useEventRegistrationSubmit(options) {
|
|
|
35131
35127
|
checkoutType,
|
|
35132
35128
|
productId: bundleProductId,
|
|
35133
35129
|
discountCode: options.discountCode.trim() ? options.discountCode.trim() : void 0,
|
|
35130
|
+
collectionOptionKind: selectionSnapshot.collectionOptionKind,
|
|
35134
35131
|
successUrl,
|
|
35135
35132
|
cancelUrl
|
|
35136
35133
|
});
|
|
@@ -83,21 +83,21 @@ var defaultEnhancerLoaders = {
|
|
|
83
83
|
accordion: () => import('../accordion-2UZPBMYM.mjs'),
|
|
84
84
|
headerSection: () => import('../headerSection-Y5TMR3TW.mjs'),
|
|
85
85
|
carousel: () => import('../carousel-QH77HR6X.mjs'),
|
|
86
|
-
form: () => import('../form-
|
|
87
|
-
"booking-form": () => import('../bookingForm-
|
|
88
|
-
"event-registration": () => import('../eventRegistration-
|
|
89
|
-
"event-details": () => import('../eventDetails-
|
|
86
|
+
form: () => import('../form-MTCMVCZT.mjs'),
|
|
87
|
+
"booking-form": () => import('../bookingForm-36CWQUMV.mjs'),
|
|
88
|
+
"event-registration": () => import('../eventRegistration-TOODSZUI.mjs'),
|
|
89
|
+
"event-details": () => import('../eventDetails-XPIFXXPK.mjs'),
|
|
90
90
|
"location-map": () => import('../locationMap-RH2LG7FZ.mjs'),
|
|
91
|
-
"course-registration": () => import('../courseRegistration-
|
|
92
|
-
"event-listing": () => import('../eventListing-
|
|
93
|
-
"event-calendar": () => import('../eventCalendar-
|
|
94
|
-
"event-combined": () => import('../eventCombined-
|
|
91
|
+
"course-registration": () => import('../courseRegistration-TMKU6ABO.mjs'),
|
|
92
|
+
"event-listing": () => import('../eventListing-7QFMEMGT.mjs'),
|
|
93
|
+
"event-calendar": () => import('../eventCalendar-G6TI32X6.mjs'),
|
|
94
|
+
"event-combined": () => import('../eventCombined-SCKEMNAR.mjs'),
|
|
95
95
|
"product-list": () => import('../productList-4MA5S2CX.mjs'),
|
|
96
96
|
"product-detail": () => import('../productDetail-OIGDR4YE.mjs'),
|
|
97
97
|
"cart": () => import('../cart-X4YK4FTW.mjs'),
|
|
98
98
|
"checkout": () => import('../checkout-OM2BEPWD.mjs'),
|
|
99
99
|
shop: () => import('../shop-WXSYV5QO.mjs'),
|
|
100
|
-
"newsletter-form": () => import('../newsletterForm-
|
|
100
|
+
"newsletter-form": () => import('../newsletterForm-PCAIPFMA.mjs')
|
|
101
101
|
};
|
|
102
102
|
var DEFAULT_MAX_RETRIES = 2;
|
|
103
103
|
var RETRY_DELAYS_MS = [250, 1e3];
|
|
@@ -38355,10 +38355,6 @@ function getCmsApiUrl() {
|
|
|
38355
38355
|
if (dashboardUrl) {
|
|
38356
38356
|
return `${dashboardUrl.replace(/\/$/, "")}/api`;
|
|
38357
38357
|
}
|
|
38358
|
-
const legacyApiUrl = process.env.NEXT_PUBLIC_CMS_API_URL;
|
|
38359
|
-
if (legacyApiUrl) {
|
|
38360
|
-
return legacyApiUrl.replace(/\/$/, "");
|
|
38361
|
-
}
|
|
38362
38358
|
throw new Error("Dashboard URL not configured. Set NEXT_PUBLIC_DASHBOARD_URL");
|
|
38363
38359
|
}
|
|
38364
38360
|
function getChallengeUrl() {
|
|
@@ -44705,7 +44701,7 @@ var init_PaymentSelectionStep = __esm({
|
|
|
44705
44701
|
label: "Pay by Card",
|
|
44706
44702
|
detail: formatPrice(totalPrice, eligibility.currency),
|
|
44707
44703
|
selected: selectedMethod === "stripe",
|
|
44708
|
-
onClick: () => onSelectionChange({ method: "stripe" })
|
|
44704
|
+
onClick: () => onSelectionChange({ method: "stripe", collectionOptionKind: "upfront" })
|
|
44709
44705
|
}
|
|
44710
44706
|
),
|
|
44711
44707
|
isAuthenticated && eligibility.eligiblePasses.map((pass) => /* @__PURE__ */ jsx47(
|
|
@@ -45644,6 +45640,7 @@ function useEventRegistrationSubmit(options) {
|
|
|
45644
45640
|
checkoutType,
|
|
45645
45641
|
productId: bundleProductId,
|
|
45646
45642
|
discountCode: options.discountCode.trim() ? options.discountCode.trim() : void 0,
|
|
45643
|
+
collectionOptionKind: selectionSnapshot.collectionOptionKind,
|
|
45647
45644
|
successUrl,
|
|
45648
45645
|
cancelUrl
|
|
45649
45646
|
});
|
|
@@ -2840,10 +2840,6 @@ function getCmsApiUrl() {
|
|
|
2840
2840
|
if (dashboardUrl) {
|
|
2841
2841
|
return `${dashboardUrl.replace(/\/$/, "")}/api`;
|
|
2842
2842
|
}
|
|
2843
|
-
const legacyApiUrl = process.env.NEXT_PUBLIC_CMS_API_URL;
|
|
2844
|
-
if (legacyApiUrl) {
|
|
2845
|
-
return legacyApiUrl.replace(/\/$/, "");
|
|
2846
|
-
}
|
|
2847
2843
|
throw new Error("Dashboard URL not configured. Set NEXT_PUBLIC_DASHBOARD_URL");
|
|
2848
2844
|
}
|
|
2849
2845
|
function getChallengeUrl() {
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export { PreviewLayoutProvider, PreviewQueryProvider, createPreviewQueryClient, useOptionalPreviewLayout, usePreviewLayout } from '../../chunk-
|
|
3
|
-
import '../../chunk-
|
|
2
|
+
export { PreviewLayoutProvider, PreviewQueryProvider, createPreviewQueryClient, useOptionalPreviewLayout, usePreviewLayout } from '../../chunk-PYDHOMEO.mjs';
|
|
3
|
+
import '../../chunk-4QNLOTES.mjs';
|
|
4
4
|
import '../../chunk-R7POPVJR.mjs';
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { jsx } from 'react/jsx-runtime';
|
|
7
7
|
|
|
8
8
|
var LazySdkPreviewMode = React.lazy(async () => {
|
|
9
|
-
const mod = await import('../../SdkPreviewModeRuntime-
|
|
9
|
+
const mod = await import('../../SdkPreviewModeRuntime-4FGSVUYI.mjs');
|
|
10
10
|
return {
|
|
11
11
|
default: mod.SdkPreviewModeRuntime
|
|
12
12
|
};
|
|
13
13
|
});
|
|
14
14
|
var LazyPreviewShell = React.lazy(async () => {
|
|
15
|
-
const mod = await import('../../sdk-runtime-
|
|
15
|
+
const mod = await import('../../sdk-runtime-QLOCYKVU.mjs');
|
|
16
16
|
return {
|
|
17
17
|
default: mod.PreviewShell
|
|
18
18
|
};
|
|
19
19
|
});
|
|
20
20
|
var LazyPreviewShellLayout = React.lazy(async () => {
|
|
21
|
-
const mod = await import('../../sdk-runtime-
|
|
21
|
+
const mod = await import('../../sdk-runtime-QLOCYKVU.mjs');
|
|
22
22
|
return {
|
|
23
23
|
default: mod.PreviewShellLayout
|
|
24
24
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export { PreviewShell, PreviewShellLayout, SdkPreviewModeRuntime as SdkPreviewMode } from './chunk-
|
|
3
|
-
export { PreviewLayoutProvider, PreviewQueryProvider, createPreviewQueryClient, useOptionalPreviewLayout, usePreviewLayout } from './chunk-
|
|
4
|
-
import './chunk-
|
|
5
|
-
import './chunk-
|
|
6
|
-
import './chunk-
|
|
7
|
-
import './chunk-
|
|
2
|
+
export { PreviewShell, PreviewShellLayout, SdkPreviewModeRuntime as SdkPreviewMode } from './chunk-OCGTXHSO.mjs';
|
|
3
|
+
export { PreviewLayoutProvider, PreviewQueryProvider, createPreviewQueryClient, useOptionalPreviewLayout, usePreviewLayout } from './chunk-PYDHOMEO.mjs';
|
|
4
|
+
import './chunk-NFWGLRZZ.mjs';
|
|
5
|
+
import './chunk-WFPYN7KA.mjs';
|
|
6
|
+
import './chunk-ZR2GQK2A.mjs';
|
|
7
|
+
import './chunk-4QNLOTES.mjs';
|
|
8
8
|
import './chunk-R7POPVJR.mjs';
|
package/dist/server/index.mjs
CHANGED
|
@@ -6410,17 +6410,21 @@ function looksLikeLocalAuthority(authority) {
|
|
|
6410
6410
|
const normalized = authority.toLowerCase();
|
|
6411
6411
|
return normalized === "localhost" || normalized.startsWith("localhost:") || normalized.startsWith("127.") || normalized.startsWith("0.0.0.0") || normalized.includes(".localhost") || normalized.endsWith(".local") || normalized.endsWith(".test");
|
|
6412
6412
|
}
|
|
6413
|
-
function
|
|
6413
|
+
function normalizeDashboardOrigin(input) {
|
|
6414
6414
|
const trimmed = input.trim();
|
|
6415
6415
|
if (!trimmed) return "";
|
|
6416
6416
|
const withoutTrailingSlash = trimmed.replace(/\/+$/, "");
|
|
6417
6417
|
const withoutApiSuffix = withoutTrailingSlash.replace(/\/api\/?$/, "");
|
|
6418
6418
|
if (/^https?:\/\//i.test(withoutApiSuffix)) {
|
|
6419
|
-
return withoutApiSuffix;
|
|
6419
|
+
return new URL(withoutApiSuffix).origin;
|
|
6420
6420
|
}
|
|
6421
6421
|
const authority = withoutApiSuffix.replace(/^\/+/, "");
|
|
6422
6422
|
const protocol = looksLikeLocalAuthority(authority) ? "http" : "https";
|
|
6423
|
-
return `${protocol}://${authority}
|
|
6423
|
+
return new URL(`${protocol}://${authority}`).origin;
|
|
6424
|
+
}
|
|
6425
|
+
function deriveCmsApiUrlFromDashboardUrl(input) {
|
|
6426
|
+
const origin = normalizeDashboardOrigin(input);
|
|
6427
|
+
return origin ? `${origin}/api` : "";
|
|
6424
6428
|
}
|
|
6425
6429
|
function getCmsApiUrl() {
|
|
6426
6430
|
if (typeof window !== "undefined") {
|
|
@@ -6432,15 +6436,10 @@ function getCmsApiUrl() {
|
|
|
6432
6436
|
}
|
|
6433
6437
|
const dashboardUrl = process.env.NEXT_PUBLIC_DASHBOARD_URL;
|
|
6434
6438
|
if (dashboardUrl) {
|
|
6435
|
-
|
|
6436
|
-
return `${base}/api`;
|
|
6437
|
-
}
|
|
6438
|
-
const legacyApiUrl = process.env.NEXT_PUBLIC_CMS_API_URL;
|
|
6439
|
-
if (legacyApiUrl) {
|
|
6440
|
-
return legacyApiUrl.replace(/\/$/, "");
|
|
6439
|
+
return deriveCmsApiUrlFromDashboardUrl(dashboardUrl);
|
|
6441
6440
|
}
|
|
6442
6441
|
throw new Error(
|
|
6443
|
-
"NEXT_PUBLIC_DASHBOARD_URL is not configured. Set
|
|
6442
|
+
"CMS_API_URL or NEXT_PUBLIC_DASHBOARD_URL is not configured. Set NEXT_PUBLIC_DASHBOARD_URL to your dashboard URL (e.g., http://localhost:4000)"
|
|
6444
6443
|
);
|
|
6445
6444
|
}
|
|
6446
6445
|
function resolveApiBaseUrl() {
|
|
@@ -6966,7 +6965,7 @@ var SimpleCache = class {
|
|
|
6966
6965
|
};
|
|
6967
6966
|
|
|
6968
6967
|
// src/version.ts
|
|
6969
|
-
var SDK_VERSION = "0.84.
|
|
6968
|
+
var SDK_VERSION = "0.84.2";
|
|
6970
6969
|
|
|
6971
6970
|
// src/client/error.ts
|
|
6972
6971
|
var RiverbankApiError = class _RiverbankApiError extends Error {
|