@riverbankcms/sdk 0.84.1 → 0.85.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.
Files changed (60) hide show
  1. package/dist/{PreviewEditorSidebar-X7RLMEI6.mjs → PreviewEditorSidebar-4PH35ZIE.mjs} +3 -3
  2. package/dist/{PreviewEditorUI-CT67N4O3.mjs → PreviewEditorUI-WHMCRJGM.mjs} +11 -6
  3. package/dist/SdkPreviewModeRuntime-4FGSVUYI.mjs +8 -0
  4. package/dist/_dts/ai/src/contracts/proposals.d.ts +684 -0
  5. package/dist/_dts/api/src/bookingConfig.d.ts +2 -0
  6. package/dist/_dts/api/src/index.d.ts +3 -3
  7. package/dist/_dts/api/src/publicExperienceEndpoints.d.ts +2 -1
  8. package/dist/_dts/api/src/sdk-event-payment-terms.d.ts +16 -0
  9. package/dist/_dts/api/src/sdk-event-upsert.d.ts +11 -2
  10. package/dist/_dts/api/src/sdkContracts.d.ts +3 -0
  11. package/dist/_dts/api/src/types.d.ts +1 -0
  12. package/dist/_dts/api/src/url.d.ts +12 -4
  13. package/dist/_dts/blocks/src/system/runtime/api/types.d.ts +2 -0
  14. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/types.d.ts +3 -1
  15. package/dist/_dts/content-editor/src/hooks/useSimpleAutosave.d.ts +8 -0
  16. package/dist/_dts/db/src/generated/supabase/database.types.d.ts +2 -2
  17. package/dist/_dts/preview-next/src/client/preview/MaintenanceModeBadge.d.ts +3 -2
  18. package/dist/_dts/preview-next/src/client/preview/PreviewEditorUI.d.ts +2 -1
  19. package/dist/_dts/sdk/src/cli/canonical-entry-policy.d.ts +53 -0
  20. package/dist/_dts/sdk/src/cli/commands/migrate.d.ts +1 -0
  21. package/dist/_dts/sdk/src/cli/commands/pull.d.ts +7 -1
  22. package/dist/_dts/sdk/src/cli/content/reader.d.ts +2 -0
  23. package/dist/_dts/sdk/src/cli/migrations/events.d.ts +73 -0
  24. package/dist/_dts/sdk/src/client/management/index.d.ts +1 -1
  25. package/dist/_dts/sdk/src/client/management/types.d.ts +6 -0
  26. package/dist/_dts/sdk/src/version.d.ts +1 -1
  27. package/dist/_dts/site-commands/src/commands.d.ts +57 -0
  28. package/dist/_dts/surfaces/src/index.d.ts +12 -0
  29. package/dist/{chunk-LBBPD2IW.mjs → chunk-4QNLOTES.mjs} +11 -16
  30. package/dist/{chunk-X5ZCSU6F.mjs → chunk-NFWGLRZZ.mjs} +1 -70
  31. package/dist/{chunk-QRKJDWT7.mjs → chunk-OCGTXHSO.mjs} +8 -7
  32. package/dist/{chunk-3LXFQS7T.mjs → chunk-PYDHOMEO.mjs} +1 -1
  33. package/dist/{chunk-RCTJAZSK.mjs → chunk-WFPYN7KA.mjs} +2 -2
  34. package/dist/{chunk-O62NDCTI.mjs → chunk-ZR2GQK2A.mjs} +6 -37
  35. package/dist/cli/index.mjs +1460 -414
  36. package/dist/client/{bookingForm-DYXT6YB6.mjs → bookingForm-36CWQUMV.mjs} +1 -1
  37. package/dist/client/bookings.mjs +1 -4
  38. package/dist/client/{chunk-UHDWIXVR.mjs → chunk-3C2VTPWI.mjs} +3 -2
  39. package/dist/client/{chunk-GFSQNTRW.mjs → chunk-SDIYSQAY.mjs} +0 -4
  40. package/dist/client/client.mjs +12 -16
  41. package/dist/client/{courseRegistration-YBOGURTA.mjs → courseRegistration-TMKU6ABO.mjs} +1 -1
  42. package/dist/client/{eventCalendar-K4QJVCMD.mjs → eventCalendar-G6TI32X6.mjs} +2 -2
  43. package/dist/client/{eventCombined-MTXGMTCZ.mjs → eventCombined-SCKEMNAR.mjs} +2 -2
  44. package/dist/client/{eventDetails-3PC4NL3U.mjs → eventDetails-XPIFXXPK.mjs} +2 -2
  45. package/dist/client/{eventListing-TFJET6DN.mjs → eventListing-7QFMEMGT.mjs} +2 -2
  46. package/dist/client/{eventRegistration-QGPBGJTW.mjs → eventRegistration-TOODSZUI.mjs} +2 -2
  47. package/dist/client/{form-MDKR4FNB.mjs → form-MTCMVCZT.mjs} +1 -1
  48. package/dist/client/{newsletterForm-ZR5UDGBT.mjs → newsletterForm-PCAIPFMA.mjs} +1 -1
  49. package/dist/client/rendering/client.mjs +2 -5
  50. package/dist/client/rendering/islands.mjs +9 -9
  51. package/dist/client/rendering.mjs +2 -5
  52. package/dist/client/spam-protection.mjs +0 -4
  53. package/dist/preview-next/client/runtime.mjs +5 -5
  54. package/dist/{sdk-runtime-7HJYPRWQ.mjs → sdk-runtime-QLOCYKVU.mjs} +6 -6
  55. package/dist/server/index.mjs +10 -11
  56. package/dist/server/next.mjs +10 -11
  57. package/dist/server/prebuild.mjs +1 -1
  58. package/dist/server/server.mjs +10 -11
  59. package/package.json +1 -1
  60. package/dist/SdkPreviewModeRuntime-EIMQ3S2V.mjs +0 -8
@@ -61,4 +61,16 @@ export declare function buildSurfaceAwareSiteOrigin(input: Readonly<{
61
61
  baseSiteOrigin: string;
62
62
  requestOrigin: string;
63
63
  }>): string | null;
64
+ export declare function buildSurfaceSiteHostname(input: Readonly<{
65
+ siteSlug: string | null | undefined;
66
+ surfaceId: SurfaceId;
67
+ tier: SurfaceTier;
68
+ }>): string | null;
69
+ export declare function buildSurfaceSiteOrigin(input: Readonly<{
70
+ siteSlug: string | null | undefined;
71
+ surfaceId: SurfaceId;
72
+ tier: SurfaceTier;
73
+ protocol?: "http" | "https";
74
+ port?: string | null;
75
+ }>): string | null;
64
76
  export declare function extractSurfaceAwareSiteSlug(value: string | URL | null | undefined): string | null;
@@ -211,26 +211,26 @@ function looksLikeLocalAuthority(authority) {
211
211
  const normalized = authority.toLowerCase();
212
212
  return normalized === "localhost" || normalized.startsWith("localhost:") || normalized.startsWith("127.") || normalized.startsWith("0.0.0.0") || normalized.includes(".localhost") || normalized.endsWith(".local") || normalized.endsWith(".test");
213
213
  }
214
- function normalizeDashboardUrlBase(input) {
214
+ function normalizeDashboardOrigin(input) {
215
215
  const trimmed = input.trim();
216
216
  if (!trimmed) return "";
217
217
  const withoutTrailingSlash = trimmed.replace(/\/+$/, "");
218
218
  const withoutApiSuffix = withoutTrailingSlash.replace(/\/api\/?$/, "");
219
219
  if (/^https?:\/\//i.test(withoutApiSuffix)) {
220
- return withoutApiSuffix;
220
+ return new URL(withoutApiSuffix).origin;
221
221
  }
222
222
  const authority = withoutApiSuffix.replace(/^\/+/, "");
223
223
  const protocol = looksLikeLocalAuthority(authority) ? "http" : "https";
224
- return `${protocol}://${authority}`;
224
+ return new URL(`${protocol}://${authority}`).origin;
225
+ }
226
+ function deriveCmsApiUrlFromDashboardUrl(input) {
227
+ const origin = normalizeDashboardOrigin(input);
228
+ return origin ? `${origin}/api` : "";
225
229
  }
226
230
  function getDashboardBaseUrl() {
227
231
  const dashboardUrl = process.env.NEXT_PUBLIC_DASHBOARD_URL;
228
232
  if (dashboardUrl) {
229
- return normalizeDashboardUrlBase(dashboardUrl);
230
- }
231
- const legacyApiUrl = process.env.NEXT_PUBLIC_CMS_API_URL;
232
- if (legacyApiUrl) {
233
- return legacyApiUrl.replace(/\/$/, "").replace(/\/api$/, "");
233
+ return normalizeDashboardOrigin(dashboardUrl);
234
234
  }
235
235
  throw new Error(
236
236
  "NEXT_PUBLIC_DASHBOARD_URL is not configured. Set it to your dashboard URL (e.g., http://localhost:4000)"
@@ -246,15 +246,10 @@ function getCmsApiUrl() {
246
246
  }
247
247
  const dashboardUrl = process.env.NEXT_PUBLIC_DASHBOARD_URL;
248
248
  if (dashboardUrl) {
249
- const base = normalizeDashboardUrlBase(dashboardUrl);
250
- return `${base}/api`;
251
- }
252
- const legacyApiUrl = process.env.NEXT_PUBLIC_CMS_API_URL;
253
- if (legacyApiUrl) {
254
- return legacyApiUrl.replace(/\/$/, "");
249
+ return deriveCmsApiUrlFromDashboardUrl(dashboardUrl);
255
250
  }
256
251
  throw new Error(
257
- "NEXT_PUBLIC_DASHBOARD_URL is not configured. Set it to your dashboard URL (e.g., http://localhost:4000)"
252
+ "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)"
258
253
  );
259
254
  }
260
255
  function getAbsoluteDashboardUrl(path, options) {
@@ -7028,4 +7023,4 @@ function createBearerAPIClient(token, baseUrl) {
7028
7023
  return createCMSClient(authHeaders, baseUrl);
7029
7024
  }
7030
7025
 
7031
- export { API_ENDPOINTS, ApiRequestError, DEFAULT_SURFACE_ID, SURFACE_DOCUMENT_DATA_ATTRIBUTE, SURFACE_IDS, createBearerAPIClient, getDashboardBaseUrl, getDashboardUrl, initPreviewAuth, isPreviewRuntimeSessionEditable, markPreviewAuthExpired, resolveSurfaceDocumentAttributes, usePreviewAuth, usePreviewAuthFetch, usePreviewToken };
7026
+ export { API_ENDPOINTS, ApiRequestError, DEFAULT_SURFACE_ID, SURFACE_DOCUMENT_DATA_ATTRIBUTE, SURFACE_IDS, createBearerAPIClient, getDashboardUrl, initPreviewAuth, isPreviewRuntimeSessionEditable, markPreviewAuthExpired, resolveSurfaceDocumentAttributes, usePreviewAuth, usePreviewAuthFetch, usePreviewToken };
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { KeyboardCode, getBlockDefinition, CSS, useSdkConfig, unwrapResponse, parseSiteIconStyleGuideVersionId, parseBlockIconValue, listBlockDescriptors, useSensor, PointerSensor, useSensors, createEditorRemoveBlockCommand, unsafeAsEditorBlockId, DndContext, closestCenter, Button, Plus, useDroppable, useDraggable, useCombinedRefs, isKeyboardEvent, createCustomBlockRegistry, Card, cn, Collapsible, CollapsibleContent, listContentTypes, mergeBlockDescriptorsWithRegistry, createEditorReorderBlocksCommand, mutateBlockContent, deleteEntrySlotBlock, deleteBlock, useDndContext, useUniqueId, useIsomorphicLayoutEffect, EmptyState, Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription, Search, getClientRect, resolveBlockTitle, CardHeader, GripVertical, ChevronRight, CardTitle, ArrowUp, ArrowDown, DropdownMenu, DropdownMenuTrigger, EllipsisVertical, DropdownMenuContent, DropdownMenuSeparator, DropdownMenuItem, Copy, Trash2, DialogFooter, DialogClose, CardContent, createEntrySlotBlock, createBlock, createEditorInsertBlockCommand, reorderEntrySlotBlocks, reorderBlocks, LoaderCircle, ChevronDown, getFeatureCardIconCompletion, toFeatureCardIconSuggestionInputs, getBlockIconSemanticFallbackId, suggestSemanticIconForFeatureCard, getGeneratedBlockIconStyleState, assertNever, createManifestFormAdapter, getModalConfig, createStoreBackend, validateBlockManifestIssues, isNonEmptyValue, Settings, ScrollableDialogContent, FormRenderer, Tabs, TabsList, TabsTrigger, TabsContent, RotateCcw, ImagePlus, Sparkles, Textarea, Callout, CalloutDescription, normalEditorCuratedPromotedFieldPaths, resolveVisiblePromotedFieldPathsForEditorBlock, CalloutTitle, unfinishedBlockCopy, recoveryConflictCopy, ManifestForm, unsafeAsEditorBlockValues, Box, mergeManifestWithSdkOptions, augmentManifestWithStyleGroups, suggestFeatureCardSemanticIcons, applyFeatureCardIconSuggestions, createFeatureCardIconKey, lucide_react_exports, isThemeV2NormalEditorRawStylePath, getFieldIntent, isHeaderField, isThemeV2NormalEditorRawStyleFieldName, BackgroundGradientField, BackgroundColorField, useField, FieldFrame, Select, SelectTrigger, SelectValue, SelectContent, SelectItem, useMediaEditorOptional, useRichTextEditor, RichTextEditorSurface, ThemeScope, isObjectRecord, EMPTY_DOC, useAsyncPickerOptions, resolvePickerSelectionLabel, shouldShowPickerSearch, normalizePickerSearchThreshold, Combobox, Badge, useBlockContext, resolveMediaSlotContract, asRecord, parseAspectRatioValue, MediaEditor, PUBLIC_FILE_FIELD_KINDS, useBackendWatch, resolveIconPickerPreset, isIconPickerPreset, getIconPickerOptionsForPreset, isKnownIconName, getIconComponent, isOfferingsPreviewSourceKey, EyeOff, CommandMultiSelect, expectParsedBrandedId, parseSiteId, buildThemeRuntime, SdkConfigProvider, PaletteProvider, MediaEditorProvider, useEditorUiStoreInstance, useUISelector, getRichTextImagePositionFromTarget, insertOrReplaceRichTextImage, emitMediaCropDebug, Pencil, resolveVideoSelectionIntentForMediaField, resolveOfferingsPreviewGroupOrderEntries, normalizeOfferingsPreviewGroupOrder, inferLegacyOfferingsPreviewGroupOrder, siteOptionSources, evaluateVisibility, Root2, List, Trigger, Content, Input, Check, Label, isInternalResolvedLinkValue, resolveImageUrlWithContext, useMediaEditor, MediaPickerMini, MediaPickerDialog, toRoutableLinkPayload, classifyKnownMimeType, getDirectImageUrlForMediaAsset, isSvgMimeType } from './chunk-O62NDCTI.mjs';
2
+ import { KeyboardCode, getBlockDefinition, CSS, useSdkConfig, unwrapResponse, parseSiteIconStyleGuideVersionId, parseBlockIconValue, listBlockDescriptors, useSensor, PointerSensor, useSensors, createEditorRemoveBlockCommand, unsafeAsEditorBlockId, DndContext, closestCenter, Button, Plus, useDroppable, useDraggable, useCombinedRefs, isKeyboardEvent, createCustomBlockRegistry, Card, cn, Collapsible, CollapsibleContent, listContentTypes, mergeBlockDescriptorsWithRegistry, createEditorReorderBlocksCommand, mutateBlockContent, deleteEntrySlotBlock, deleteBlock, useDndContext, useUniqueId, useIsomorphicLayoutEffect, EmptyState, Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription, Search, getClientRect, resolveBlockTitle, CardHeader, GripVertical, ChevronRight, CardTitle, ArrowUp, ArrowDown, DropdownMenu, DropdownMenuTrigger, EllipsisVertical, DropdownMenuContent, DropdownMenuSeparator, DropdownMenuItem, Copy, Trash2, DialogFooter, DialogClose, CardContent, createEntrySlotBlock, createBlock, createEditorInsertBlockCommand, reorderEntrySlotBlocks, reorderBlocks, LoaderCircle, ChevronDown, getFeatureCardIconCompletion, toFeatureCardIconSuggestionInputs, getBlockIconSemanticFallbackId, suggestSemanticIconForFeatureCard, getGeneratedBlockIconStyleState, assertNever, createManifestFormAdapter, getModalConfig, createStoreBackend, validateBlockManifestIssues, isNonEmptyValue, Settings, ScrollableDialogContent, FormRenderer, Tabs, TabsList, TabsTrigger, TabsContent, RotateCcw, ImagePlus, Sparkles, Textarea, Callout, CalloutDescription, normalEditorCuratedPromotedFieldPaths, resolveVisiblePromotedFieldPathsForEditorBlock, CalloutTitle, unfinishedBlockCopy, recoveryConflictCopy, ManifestForm, unsafeAsEditorBlockValues, Box, mergeManifestWithSdkOptions, augmentManifestWithStyleGroups, suggestFeatureCardSemanticIcons, applyFeatureCardIconSuggestions, createFeatureCardIconKey, lucide_react_exports, isThemeV2NormalEditorRawStylePath, getFieldIntent, isHeaderField, isThemeV2NormalEditorRawStyleFieldName, BackgroundGradientField, BackgroundColorField, useField, FieldFrame, Select, SelectTrigger, SelectValue, SelectContent, SelectItem, useMediaEditorOptional, useRichTextEditor, RichTextEditorSurface, ThemeScope, isObjectRecord, EMPTY_DOC, useAsyncPickerOptions, resolvePickerSelectionLabel, shouldShowPickerSearch, normalizePickerSearchThreshold, Combobox, Badge, useBlockContext, resolveMediaSlotContract, asRecord, parseAspectRatioValue, MediaEditor, PUBLIC_FILE_FIELD_KINDS, useBackendWatch, resolveIconPickerPreset, isIconPickerPreset, getIconPickerOptionsForPreset, isKnownIconName, getIconComponent, isOfferingsPreviewSourceKey, EyeOff, CommandMultiSelect, expectParsedBrandedId, parseSiteId, buildThemeRuntime, SdkConfigProvider, PaletteProvider, MediaEditorProvider, useEditorUiStoreInstance, useUISelector, getRichTextImagePositionFromTarget, insertOrReplaceRichTextImage, emitMediaCropDebug, Pencil, resolveVideoSelectionIntentForMediaField, resolveOfferingsPreviewGroupOrderEntries, normalizeOfferingsPreviewGroupOrder, inferLegacyOfferingsPreviewGroupOrder, siteOptionSources, evaluateVisibility, Root2, List, Trigger, Content, Input, Check, Label, isInternalResolvedLinkValue, resolveImageUrlWithContext, useMediaEditor, MediaPickerMini, MediaPickerDialog, toRoutableLinkPayload, classifyKnownMimeType, getDirectImageUrlForMediaAsset, isSvgMimeType } from './chunk-ZR2GQK2A.mjs';
3
3
  import React, { createContext, memo, useMemo, useState, useRef, useEffect, forwardRef, useCallback, useImperativeHandle, useContext, useSyncExternalStore, useLayoutEffect, Fragment as Fragment$1, useReducer } from 'react';
4
4
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
5
5
 
@@ -4647,21 +4647,6 @@ function getUnresolvedRichTextImageWarnings(value) {
4647
4647
  walk(value);
4648
4648
  return { count, identifiers: Array.from(identifiers) };
4649
4649
  }
4650
- var DEBUG_RICHTEXT_FOCUS = process.env.NEXT_PUBLIC_DEBUG_RICHTEXT_FOCUS === "1";
4651
- var nextInstanceId = 1;
4652
- function describeActiveElement() {
4653
- if (typeof document === "undefined") return null;
4654
- const el = document.activeElement;
4655
- if (!el) return null;
4656
- return {
4657
- tag: el.tagName,
4658
- id: el.id || null,
4659
- role: el.getAttribute("role"),
4660
- className: typeof el.className === "string" ? el.className : null,
4661
- isProseMirror: el.classList?.contains("ProseMirror") ?? false,
4662
- withinProseMirror: Boolean(el.closest?.(".ProseMirror"))
4663
- };
4664
- }
4665
4650
  function isRichTextVariant(value) {
4666
4651
  return value === "full" || value === "inline" || value === "limited" || value === "media" || value === "notes";
4667
4652
  }
@@ -4677,10 +4662,6 @@ function RichTextField({
4677
4662
  backend,
4678
4663
  config
4679
4664
  }) {
4680
- const instanceIdRef = useRef(null);
4681
- if (instanceIdRef.current == null) {
4682
- instanceIdRef.current = nextInstanceId++;
4683
- }
4684
4665
  const { theme, onPickImage } = useRichTextWidgetContext();
4685
4666
  const { siteId, adapters, initialItems } = useLinkWidgetContext();
4686
4667
  const mediaEditor = useMediaEditorOptional();
@@ -4709,56 +4690,6 @@ function RichTextField({
4709
4690
  setLinkItems(normalized);
4710
4691
  return normalized;
4711
4692
  }, [adapters, siteId]);
4712
- if (DEBUG_RICHTEXT_FOCUS) {
4713
- console.log("[RichTextField] render", {
4714
- instanceId: instanceIdRef.current,
4715
- path,
4716
- variant,
4717
- hasEditor: Boolean(editor),
4718
- active: describeActiveElement()
4719
- });
4720
- }
4721
- useEffect(() => {
4722
- if (!DEBUG_RICHTEXT_FOCUS) return;
4723
- console.log("[RichTextField] mount", { instanceId: instanceIdRef.current, path });
4724
- return () => {
4725
- console.log("[RichTextField] unmount", { instanceId: instanceIdRef.current, path });
4726
- };
4727
- }, [path]);
4728
- useEffect(() => {
4729
- if (!DEBUG_RICHTEXT_FOCUS) return;
4730
- console.log("[RichTextField] editor instance changed", {
4731
- instanceId: instanceIdRef.current,
4732
- path,
4733
- hasEditor: Boolean(editor),
4734
- active: describeActiveElement()
4735
- });
4736
- }, [editor, path]);
4737
- useEffect(() => {
4738
- if (!editor) return;
4739
- const handleFocus = () => {
4740
- if (!DEBUG_RICHTEXT_FOCUS) return;
4741
- console.log("[RichTextField] focus", {
4742
- instanceId: instanceIdRef.current,
4743
- path,
4744
- active: describeActiveElement()
4745
- });
4746
- };
4747
- const handleBlur = () => {
4748
- if (!DEBUG_RICHTEXT_FOCUS) return;
4749
- console.log("[RichTextField] blur", {
4750
- instanceId: instanceIdRef.current,
4751
- path,
4752
- active: describeActiveElement()
4753
- });
4754
- };
4755
- editor.on("focus", handleFocus);
4756
- editor.on("blur", handleBlur);
4757
- return () => {
4758
- editor.off("focus", handleFocus);
4759
- editor.off("blur", handleBlur);
4760
- };
4761
- }, [editor, path]);
4762
4693
  useEffect(() => {
4763
4694
  if (!editor) return;
4764
4695
  const handler = () => {
@@ -1,9 +1,9 @@
1
1
  "use client";
2
- import { useOptionalPreviewLayout, PreviewQueryProvider } from './chunk-3LXFQS7T.mjs';
3
- import { PreviewBlockCustomizeSelectionProvider, resolveSiteStyleAccess, resolvePreviewDashboardSetupHandoff, buildPreviewDashboardSetupUrl, resolvePreviewSetupBannerModel, usePreviewBlockCustomizeSelectionOptional, useBlockCustomizeControls, MAX_CUSTOMIZE_POPOVER_ROWS, MAX_QUICK_MANIFEST_FIELDS, OfferingsPreviewWidgetProvider, previewWidgetOverrides, sanitizeDashboardPath } from './chunk-X5ZCSU6F.mjs';
4
- import { resolvePreviewChromeSurface, getPreviewSidebarTab, onPreviewSidebarOpenRequest, getPreviewChromeSurfaceDataProps, PREVIEW_CHROME_THEME_CLASS_NAME, setPreviewSidebarTab, PreviewPageDesignEditorStateProvider, usePreviewPageDesignEditorState } from './chunk-RCTJAZSK.mjs';
5
- import { clientComponentRegistry, deriveLaunchReadiness, DEFAULT_LAUNCH_READINESS_INPUT, useEditorUiStore, PreviewThemeOverlayProvider, PreviewDesignCoordinatorProvider, SiteChromeCustomizeProvider, ResizableSplitPane, BlockApiProvider, EditorProvider, PreviewDesignHistoryOrderProvider, MediaEditorProvider, useEditorUiStoreInstance, useEditor, createRoutingHelpers, createSnapshotFromPageRecord, EntryControllerProvider, useEntryEditorController, surfaceResolutionContextFromTheme, designRuntimeRulesForTheme, unsafeAsEditorBlockId, EditableBlockProvider, asDesignBlockId, PageRenderer, usePreviewThemeOverlay, planSiteDocument, ThemeScope, FixedBottomSurface, Button, unsafeAsLinkedContentEntryId, sectionTransitionVariantForBoundaryOptionId, sectionTransitionFamilyForBoundaryOptionId, sectionTransitionFamilies, X, defaultSectionTransitionVariantForFamily, RotateCcw, parseBackgroundOverrideFromContent, rankBackgroundImagePoolItems, imagePoolForOverride, resolveBackgroundCapability, enabledBackgroundModes, canCycleBackgroundOverrideValue, FormRenderer, stableSerialize, prefetchBlockData, isSupportedLoaderEndpoint, PreviewRichTextEditor, RichText, PreviewTextEditor, Text, buildThemeRuntime, renderBlock, siteHeaderManifest, siteFooterManifest, SiteDocumentLayout, SITE_CHROME_CLASS_NAMES, Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription, DialogFooter, buildEditorModelRuntimeFieldsByBlockId, applyCompiledRuntimeFieldsToContent, assertNever2, getBlockDefinition, systemCustomizeFacetDefinitionsForBlock, systemCustomizeFacetAppliesToLayoutVariant, systemCustomizeFacetCurrentValue, systemCustomizeFacetLabelForValue, backgroundColorTokens, ChevronLeft, ChevronRight, createMicrobatcher, unwrapResponse, normalizePublicApiLoaderParams, visibleHeaderClearancePx, LINKED_CONTENT_ENTRY_META_KEY, useMediaEditorOptional, Image, defaultBackgroundOverrideForMode, decodePublicProductCategorySelectorQuery, EDITABLE_SURFACE_FORWARDING_PROP, useSiteChromeCustomizeOptional, assertNever, SITE_CHROME_VISIBLE_HEADER_SELECTOR, getLinkedContentEntryMeta, GRADIENT_PRESETS, resolveImageUrlWithContext, gradientToCss, Upload, MediaEditor, SECTION_BACKGROUND_MIN_SOURCE_WIDTH, SECTION_BACKGROUND_MIN_SOURCE_HEIGHT, parseMediaAssetId, formatSiteChromeBackgroundTokenLabel, planBackgroundOverride, planBackgroundTransition, systemCustomizeFacetNextValue } from './chunk-O62NDCTI.mjs';
6
- import { API_ENDPOINTS, createBearerAPIClient, isPreviewRuntimeSessionEditable, DEFAULT_SURFACE_ID, initPreviewAuth, usePreviewAuth, usePreviewAuthFetch, markPreviewAuthExpired, usePreviewToken } from './chunk-LBBPD2IW.mjs';
2
+ import { useOptionalPreviewLayout, PreviewQueryProvider } from './chunk-PYDHOMEO.mjs';
3
+ import { PreviewBlockCustomizeSelectionProvider, resolveSiteStyleAccess, resolvePreviewDashboardSetupHandoff, buildPreviewDashboardSetupUrl, resolvePreviewSetupBannerModel, usePreviewBlockCustomizeSelectionOptional, useBlockCustomizeControls, MAX_CUSTOMIZE_POPOVER_ROWS, MAX_QUICK_MANIFEST_FIELDS, OfferingsPreviewWidgetProvider, previewWidgetOverrides, sanitizeDashboardPath } from './chunk-NFWGLRZZ.mjs';
4
+ import { resolvePreviewChromeSurface, getPreviewSidebarTab, onPreviewSidebarOpenRequest, getPreviewChromeSurfaceDataProps, PREVIEW_CHROME_THEME_CLASS_NAME, setPreviewSidebarTab, PreviewPageDesignEditorStateProvider, usePreviewPageDesignEditorState } from './chunk-WFPYN7KA.mjs';
5
+ import { clientComponentRegistry, deriveLaunchReadiness, DEFAULT_LAUNCH_READINESS_INPUT, useEditorUiStore, PreviewThemeOverlayProvider, PreviewDesignCoordinatorProvider, SiteChromeCustomizeProvider, ResizableSplitPane, BlockApiProvider, EditorProvider, PreviewDesignHistoryOrderProvider, MediaEditorProvider, useEditorUiStoreInstance, useEditor, createRoutingHelpers, createSnapshotFromPageRecord, EntryControllerProvider, useEntryEditorController, surfaceResolutionContextFromTheme, designRuntimeRulesForTheme, unsafeAsEditorBlockId, EditableBlockProvider, asDesignBlockId, PageRenderer, usePreviewThemeOverlay, planSiteDocument, ThemeScope, FixedBottomSurface, Button, unsafeAsLinkedContentEntryId, sectionTransitionVariantForBoundaryOptionId, sectionTransitionFamilyForBoundaryOptionId, sectionTransitionFamilies, X, defaultSectionTransitionVariantForFamily, RotateCcw, parseBackgroundOverrideFromContent, rankBackgroundImagePoolItems, imagePoolForOverride, resolveBackgroundCapability, enabledBackgroundModes, canCycleBackgroundOverrideValue, FormRenderer, stableSerialize, prefetchBlockData, isSupportedLoaderEndpoint, PreviewRichTextEditor, RichText, PreviewTextEditor, Text, buildThemeRuntime, renderBlock, siteHeaderManifest, siteFooterManifest, SiteDocumentLayout, SITE_CHROME_CLASS_NAMES, Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription, DialogFooter, buildEditorModelRuntimeFieldsByBlockId, applyCompiledRuntimeFieldsToContent, assertNever2, getBlockDefinition, systemCustomizeFacetDefinitionsForBlock, systemCustomizeFacetAppliesToLayoutVariant, systemCustomizeFacetCurrentValue, systemCustomizeFacetLabelForValue, backgroundColorTokens, ChevronLeft, ChevronRight, createMicrobatcher, unwrapResponse, normalizePublicApiLoaderParams, visibleHeaderClearancePx, LINKED_CONTENT_ENTRY_META_KEY, useMediaEditorOptional, Image, defaultBackgroundOverrideForMode, decodePublicProductCategorySelectorQuery, EDITABLE_SURFACE_FORWARDING_PROP, useSiteChromeCustomizeOptional, assertNever, SITE_CHROME_VISIBLE_HEADER_SELECTOR, getLinkedContentEntryMeta, GRADIENT_PRESETS, resolveImageUrlWithContext, gradientToCss, Upload, MediaEditor, SECTION_BACKGROUND_MIN_SOURCE_WIDTH, SECTION_BACKGROUND_MIN_SOURCE_HEIGHT, parseMediaAssetId, formatSiteChromeBackgroundTokenLabel, planBackgroundOverride, planBackgroundTransition, systemCustomizeFacetNextValue } from './chunk-ZR2GQK2A.mjs';
6
+ import { API_ENDPOINTS, createBearerAPIClient, isPreviewRuntimeSessionEditable, DEFAULT_SURFACE_ID, initPreviewAuth, usePreviewAuth, usePreviewAuthFetch, markPreviewAuthExpired, usePreviewToken } from './chunk-4QNLOTES.mjs';
7
7
  import React10, { createContext, useMemo, useState, useEffect, useRef, useCallback, useId, useReducer, Children, isValidElement, Fragment as Fragment$1, cloneElement, useContext } from 'react';
8
8
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
9
9
  import { createPortal } from 'react-dom';
@@ -4722,11 +4722,11 @@ function LinkedEntryEditEventBridge() {
4722
4722
  }
4723
4723
  var previewContainerResponsiveEnabled = process.env.NEXT_PUBLIC_ENABLE_PREVIEW_CONTAINER_RESPONSIVE !== "false";
4724
4724
  var PreviewEditorSidebar = React10.lazy(async () => {
4725
- const mod = await import('./PreviewEditorSidebar-X7RLMEI6.mjs');
4725
+ const mod = await import('./PreviewEditorSidebar-4PH35ZIE.mjs');
4726
4726
  return { default: mod.PreviewEditorSidebar };
4727
4727
  });
4728
4728
  var PreviewEditorUI = React10.lazy(async () => {
4729
- const mod = await import('./PreviewEditorUI-CT67N4O3.mjs');
4729
+ const mod = await import('./PreviewEditorUI-WHMCRJGM.mjs');
4730
4730
  return { default: mod.PreviewEditorUI };
4731
4731
  });
4732
4732
  var previewPaneContainmentStyle = {
@@ -5027,6 +5027,7 @@ function PreviewShellLayout({
5027
5027
  const editorUI = /* @__PURE__ */ jsx(React10.Suspense, { fallback: null, children: /* @__PURE__ */ jsx(
5028
5028
  PreviewEditorUI,
5029
5029
  {
5030
+ dashboardBaseUrl,
5030
5031
  inMaintenanceMode: maintenanceModeEnabled,
5031
5032
  siteId,
5032
5033
  surfaceId,
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { ApiRequestError, markPreviewAuthExpired } from './chunk-LBBPD2IW.mjs';
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-O62NDCTI.mjs';
3
- import { ApiRequestError, resolveSurfaceDocumentAttributes, SURFACE_DOCUMENT_DATA_ATTRIBUTE, SURFACE_IDS } from './chunk-LBBPD2IW.mjs';
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-LBBPD2IW.mjs';
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
- if (isDebugEnabled()) {
182929
- console.warn("[preview-theme-overlay] failed to apply theme overlay patch", {
182930
- error: error instanceof Error ? error.message : String(error),
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]);