@riverbankcms/sdk 0.74.0 → 0.76.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/dist/{PreviewEditorSidebar-5XL7M3OM.mjs → PreviewEditorSidebar-X2HWXFOL.mjs} +172 -89
- package/dist/{PreviewEditorUI-ZDFRDJID.mjs → PreviewEditorUI-AQXIXPOH.mjs} +3 -3
- package/dist/SdkPreviewModeRuntime-ZQNDCASH.mjs +8 -0
- package/dist/_dts/api/src/bookingOperations.d.ts +12 -0
- package/dist/_dts/api/src/cache-tags.d.ts +22 -0
- package/dist/_dts/api/src/contentRuntime.d.ts +1 -0
- package/dist/_dts/api/src/endpoints.d.ts +24 -24
- package/dist/_dts/api/src/index.d.ts +1 -1
- package/dist/_dts/api/src/publicExperienceEndpoints.d.ts +13 -4
- package/dist/_dts/block-form/src/blockDraftSaveability.d.ts +4 -2
- package/dist/_dts/block-form/src/client/index.d.ts +1 -1
- package/dist/_dts/block-form/src/manifest/utils.d.ts +24 -0
- package/dist/_dts/blocks/src/client/booking-form.d.ts +2 -0
- package/dist/_dts/blocks/src/client/carousel.d.ts +1 -0
- package/dist/_dts/blocks/src/client/course-registration.d.ts +2 -0
- package/dist/_dts/blocks/src/client/events.d.ts +6 -0
- package/dist/_dts/blocks/src/client/form.d.ts +2 -0
- package/dist/_dts/blocks/src/client/header.d.ts +1 -0
- package/dist/_dts/blocks/src/client/location-map.d.ts +1 -0
- package/dist/_dts/blocks/src/client/newsletter-form.d.ts +2 -0
- package/dist/_dts/blocks/src/client/shop.d.ts +6 -0
- package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +4 -4
- package/dist/_dts/blocks/src/lib/video.d.ts +2 -0
- package/dist/_dts/blocks/src/system/manifest/fieldValidation/index.d.ts +21 -1
- package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +7 -6
- package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +3 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.headless.state.d.ts +3 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.interactive.d.ts +3 -27
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-runtime-sources.d.ts +163 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.interactive.d.ts +5 -5
- package/dist/_dts/blocks/src/system/runtime/nodes/events/index.d.ts +3 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/header-section.client.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/header-section.server.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/shared/components/BookingOptionCompactRow.d.ts +29 -0
- package/dist/_dts/blocks/src/system/runtime/shared/components/BookingOptionList.d.ts +13 -0
- package/dist/_dts/blocks/src/system/runtime/shared/components/index.d.ts +4 -0
- package/dist/_dts/blocks/src/system/runtime/shared/index.d.ts +4 -3
- package/dist/_dts/blocks/src/system/runtime/shared/utils/bookingRoute.d.ts +20 -0
- package/dist/_dts/blocks/src/system/runtime/shared/utils/index.d.ts +2 -1
- package/dist/_dts/blocks/src/system/types/link.d.ts +12 -0
- package/dist/_dts/content-editor/src/hooks/validateBlocksForPublish.d.ts +5 -0
- package/dist/_dts/editor-blocks/src/BlockEditor.d.ts +2 -0
- package/dist/_dts/editor-blocks/src/block-editor/BlockCard.d.ts +3 -1
- package/dist/_dts/editor-blocks/src/block-editor/BlockCardHeader.d.ts +3 -1
- package/dist/_dts/editor-blocks/src/block-editor/BlockSettingsModal.d.ts +5 -1
- package/dist/_dts/editor-blocks/src/block-editor/SortableBlockItem.d.ts +2 -0
- package/dist/_dts/editor-blocks/src/block-editor/actionControlMode.d.ts +2 -0
- package/dist/_dts/editor-blocks/src/index.d.ts +1 -1
- package/dist/_dts/preview-next/src/client/preview/SiteChromeEditableSurface.d.ts +12 -2
- package/dist/_dts/preview-next/src/client/preview/themeOverlay.d.ts +21 -3
- package/dist/_dts/sdk/src/components.d.ts +2 -2
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +1 -0
- package/dist/_dts/sdk/src/rendering/index.d.ts +2 -2
- package/dist/_dts/sdk/src/rendering/islands/deferredVideoEmbeds.d.ts +2 -0
- package/dist/_dts/sdk/src/rendering/overrideResolution.d.ts +6 -0
- package/dist/_dts/sdk/src/rendering/overrides.d.ts +21 -1
- package/dist/_dts/sdk/src/rendering/server.d.ts +4 -0
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/{chunk-2MIWNFJM.mjs → chunk-LYI7TEMH.mjs} +494 -171
- package/dist/{chunk-YY7K3QD2.mjs → chunk-Q4OLG66B.mjs} +9 -9
- package/dist/{chunk-CEQBBLMJ.mjs → chunk-TW2Y4RR5.mjs} +69 -14
- package/dist/{chunk-CBD47MTM.mjs → chunk-V5VORNEJ.mjs} +2 -2
- package/dist/{chunk-7RX72SK2.mjs → chunk-VX7B5VAC.mjs} +36 -25
- package/dist/{chunk-YRJKZEQ3.mjs → chunk-Z7JLNTJR.mjs} +1 -1
- package/dist/cli/index.mjs +3395 -3753
- package/dist/client/{accordion-ZZVXWV3N.mjs → accordion-2YHIBOZH.mjs} +1 -1
- package/dist/client/bookingForm-35IBDWAS.mjs +3012 -0
- package/dist/client/bookings.mjs +30 -21
- package/dist/client/{carousel-25WK2H7G.mjs → carousel-K6XG7NZQ.mjs} +3 -2
- package/dist/client/cart-HCFYUTTU.mjs +18 -0
- package/dist/client/checkout-J3U4XR7K.mjs +18 -0
- package/dist/client/chunk-3DCJ45Z2.mjs +36 -0
- package/dist/client/chunk-3PEDD5KJ.mjs +146 -0
- package/dist/client/{chunk-6VGXRE34.mjs → chunk-7UOSCYY4.mjs} +76 -29
- package/dist/client/chunk-BOIHIU7E.mjs +106 -0
- package/dist/client/chunk-F7LHOKEH.mjs +146 -0
- package/dist/client/chunk-FGUIVT2B.mjs +204 -0
- package/dist/client/chunk-I2MMZO53.mjs +6 -0
- package/dist/client/chunk-II7O4XN3.mjs +2206 -0
- package/dist/client/chunk-J227A3CQ.mjs +245 -0
- package/dist/client/chunk-JEZECJ3W.mjs +383 -0
- package/dist/client/chunk-M3L3KYYR.mjs +1181 -0
- package/dist/client/chunk-OJPZEZU2.mjs +31 -0
- package/dist/client/chunk-PFBX3IQL.mjs +1378 -0
- package/dist/client/chunk-RTZ3JKKX.mjs +178 -0
- package/dist/client/chunk-SNSWVZEP.mjs +5592 -0
- package/dist/client/chunk-TQ5MSPDX.mjs +74 -0
- package/dist/client/chunk-YLMKMCSJ.mjs +86 -0
- package/dist/client/client.mjs +54052 -54518
- package/dist/client/courseRegistration-ZBXS7VGI.mjs +1737 -0
- package/dist/client/{eventCalendar-X6GIPYFM.mjs → eventCalendar-EQQZHJBA.mjs} +13 -2
- package/dist/client/{eventCombined-EZUOPM3G.mjs → eventCombined-JCFTGBFQ.mjs} +13 -2
- package/dist/client/eventDetails-HLUTQSYY.mjs +25 -0
- package/dist/client/{eventListing-HEFGAETC.mjs → eventListing-FG4MICVB.mjs} +13 -2
- package/dist/client/{eventRegistration-3LCP2V3P.mjs → eventRegistration-GUEB7LBT.mjs} +13 -2
- package/dist/client/form-YQEW4YIT.mjs +300 -0
- package/dist/client/headerSection-GTR3TTRM.mjs +729 -0
- package/dist/client/hooks.mjs +49 -33
- package/dist/client/locationMap-SPC7VGUH.mjs +227 -0
- package/dist/client/newsletterForm-4IW5BLID.mjs +208 -0
- package/dist/client/productDetail-KP5H2WJO.mjs +18 -0
- package/dist/client/productList-3M3M72XZ.mjs +18 -0
- package/dist/client/rendering/client.mjs +15580 -16277
- package/dist/client/rendering/islands.mjs +98 -21
- package/dist/client/rendering.mjs +48730 -49191
- package/dist/client/shop-ACQKVGOM.mjs +20 -0
- package/dist/preview-next/before-render.mjs +37 -25
- package/dist/preview-next/chrome.css +1 -1
- package/dist/preview-next/client/runtime.mjs +5 -5
- package/dist/preview-next/editor-base.css +2 -148
- package/dist/preview-next/editor-chrome.css +179 -0
- package/dist/preview-next/middleware.mjs +37 -25
- package/dist/{sdk-runtime-OHNONZ5U.mjs → sdk-runtime-K7HNB4U2.mjs} +6 -6
- package/dist/server/components.mjs +1294 -1103
- package/dist/server/config-validation.mjs +49 -33
- package/dist/server/config.mjs +49 -33
- package/dist/server/data.mjs +49 -33
- package/dist/server/index.mjs +45 -33
- package/dist/server/next.mjs +1240 -1050
- package/dist/server/page-converter.mjs +12 -8
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +1389 -1104
- package/dist/server/rendering.mjs +1300 -1109
- package/dist/server/routing.mjs +49 -33
- package/dist/server/server.mjs +50 -34
- package/dist/server/theme-bridge.mjs +5 -0
- package/dist/styles/index.css +5 -0
- package/package.json +2 -1
- package/dist/SdkPreviewModeRuntime-CRYNDSPL.mjs +0 -8
- package/dist/client/bookingForm-4X77HKDS.mjs +0 -34
- package/dist/client/cart-JWD2VRFU.mjs +0 -11
- package/dist/client/checkout-V7KYGWL7.mjs +0 -11
- package/dist/client/chunk-5IYGMTUE.mjs +0 -18614
- package/dist/client/chunk-RKCFVIMS.mjs +0 -26
- package/dist/client/courseRegistration-O6ZPK4YT.mjs +0 -29
- package/dist/client/eventDetails-3WODIXET.mjs +0 -14
- package/dist/client/form-AKXQMY6Z.mjs +0 -85
- package/dist/client/headerSection-5KHCMU6B.mjs +0 -12
- package/dist/client/locationMap-7HIADW76.mjs +0 -14
- package/dist/client/newsletterForm-5N4YTMU3.mjs +0 -60
- package/dist/client/productDetail-IZUA7ZP3.mjs +0 -11
- package/dist/client/productList-KWIIJE6I.mjs +0 -11
- package/dist/client/shop-XZQFRQWZ.mjs +0 -13
package/README.md
CHANGED
|
@@ -3286,6 +3286,8 @@ Keep the `import()` inside the lazy factory. Wrapping a component that was impor
|
|
|
3286
3286
|
|
|
3287
3287
|
`createCatchAllPage()` filters and resolves lazy overrides per rendered page, so unused factories are not invoked. Next.js still builds the client-reference manifest from the static catch-all route graph, though, so a static `import('./HeavyClientBlock')` inside the route graph can still appear in internal build manifests even when that block is not on the current page. For client-heavy blocks, keep the server override wrapper small and put ALTCHA/forms/booking widgets behind block-local client boundaries, then verify the production build artifacts for the specific site.
|
|
3288
3288
|
|
|
3289
|
+
For a fuller public-performance checklist covering broad client imports, bundle measurement, and decorative image/LCP pitfalls, see [`docs/usage-patterns.md#performance-optimization`](./docs/usage-patterns.md#performance-optimization).
|
|
3290
|
+
|
|
3289
3291
|
This single call replaces ~160 lines of typical boilerplate that handles:
|
|
3290
3292
|
- Path resolution from URL slugs
|
|
3291
3293
|
- Content loading (pages and entries)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { resolvePreviewDashboardSetupHandoff, buildPreviewDashboardSetupUrl, resolvePreviewSidebarChromeModel, resolvePreviewEditorGuidanceModel, canInspectSiteStyle, usePreviewThemeOverlay, resolveStyleConfiguratorInitialSnapshot, createStyleConfiguratorState, createOptimisticActionRunner, syncStyleConfiguratorState, isPreviewingChange, openRow, previewSiteStyle, applyResolvedSelections, previewButtonPersonality, planSiteChromeLookSelection, previewHeaderLook, previewFooterLook, previewPaletteVariant, setPaletteOverrides, toggleRow, cancelPreview, dismissWarnings, dismissNotices, markApplyFailed, markApplySaved, markApplySaving, canApplySiteStyle, buildSiteChromeLookModels, cycleSiteChromeLookId, cycleableSiteChromeOptions } from './chunk-
|
|
3
|
-
import { KeyboardCode, getBlockDefinition, CSS, useSdkConfig, listBlockDescriptors, useSensor, PointerSensor, useSensors, deleteBlock, createEditorRemoveBlockCommand, asEditorBlockId, DndContext, closestCenter, Button, Plus, useDroppable, useDraggable, useCombinedRefs, isKeyboardEvent, transformSdkBlockToManifest, Card, cn, Collapsible, CollapsibleContent, listContentTypes, createBlock, createEditorReorderBlocksCommand, reorderBlocks, mutateBlockContent, useDndContext, useUniqueId, useIsomorphicLayoutEffect, EmptyState, Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription, Search, getClientRect, resolveBlockTitle, CardHeader, GripVertical, ChevronRight, CardTitle, ArrowUp, ArrowDown, Copy, Trash2, DialogFooter, DialogClose, CardContent, transformSdkBlockToDefinition, createEditorInsertBlockCommand, LoaderCircle, ChevronDown,
|
|
4
|
-
import { usePreviewAuth, getDashboardUrl } from './chunk-
|
|
2
|
+
import { resolvePreviewDashboardSetupHandoff, buildPreviewDashboardSetupUrl, resolvePreviewSidebarChromeModel, resolvePreviewEditorGuidanceModel, canInspectSiteStyle, usePreviewThemeOverlay, resolveStyleConfiguratorInitialSnapshot, createStyleConfiguratorState, createOptimisticActionRunner, syncStyleConfiguratorState, isPreviewingChange, openRow, previewSiteStyle, applyResolvedSelections, previewButtonPersonality, planSiteChromeLookSelection, previewHeaderLook, previewFooterLook, previewPaletteVariant, setPaletteOverrides, toggleRow, cancelPreview, dismissWarnings, dismissNotices, markApplyFailed, markApplySaved, markApplySaving, canApplySiteStyle, buildSiteChromeLookModels, cycleSiteChromeLookId, cycleableSiteChromeOptions } from './chunk-TW2Y4RR5.mjs';
|
|
3
|
+
import { KeyboardCode, getBlockDefinition, CSS, useSdkConfig, listBlockDescriptors, useSensor, PointerSensor, useSensors, deleteBlock, createEditorRemoveBlockCommand, asEditorBlockId, DndContext, closestCenter, Button, Plus, useDroppable, useDraggable, useCombinedRefs, isKeyboardEvent, transformSdkBlockToManifest, Card, cn, Collapsible, CollapsibleContent, listContentTypes, createBlock, createEditorReorderBlocksCommand, reorderBlocks, mutateBlockContent, useDndContext, useUniqueId, useIsomorphicLayoutEffect, EmptyState, Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription, Search, getClientRect, resolveBlockTitle, CardHeader, GripVertical, ChevronRight, CardTitle, ArrowUp, ArrowDown, DropdownMenu, DropdownMenuTrigger, EllipsisVertical, DropdownMenuContent, DropdownMenuItem, Settings, DropdownMenuSeparator, Copy, Trash2, DialogFooter, DialogClose, CardContent, transformSdkBlockToDefinition, createEditorInsertBlockCommand, LoaderCircle, ChevronDown, normalEditorCuratedPromotedFieldPaths, resolveVisiblePromotedFieldPathsForEditorBlock, createStoreBackend, validateBlockManifestIssues, Callout, CalloutTitle, unfinishedBlockCopy, CalloutDescription, recoveryConflictCopy, ManifestForm, asEditorBlockValues, Box, createManifestFormAdapter, getModalConfig, isNonEmptyValue, ScrollableDialogContent, FormRenderer, Tabs, TabsList, TabsTrigger, TabsContent, mergeManifestWithSdkOptions, augmentManifestWithStyleGroups, lucide_react_exports, isThemeV2NormalEditorRawStylePath, getFieldIntent, isHeaderField, isThemeV2NormalEditorRawStyleFieldName, unwrapResponse, useEntryController, useEditorUiStoreInstance, useUISelector, resolvePreviewSidebarTab, BackgroundGradientField, BackgroundColorField, X, omitRouteTitleFieldFromManifest, getRouteMetadataManifestForType, createManifestValidation, previewAssistantEnabled, useField, FieldFrame, Select, SelectTrigger, SelectValue, SelectContent, SelectItem, isCtaIconName, Combobox, CTA_ICON_OPTIONS, getCtaIconComponent, useBackendWatch, useAsyncPickerOptions, shouldShowPickerSearch, normalizePickerSearchThreshold, Badge, resolvePickerSelectionLabel, useMediaEditorOptional, useRichTextEditor, RichTextEditorSurface, ThemeScope, useBlockContext, resolveMediaSlotContract, asRecord, parseAspectRatioValue, MediaEditor, PUBLIC_FILE_FIELD_KINDS, CollapsibleTrigger, ContentFieldsForm, getCuratedSiteStyle, compileSiteThemeFromSelections, paletteOverridesSchema, findButtonPersonality, findPaletteVariant, findHeaderLook, findFooterLook, headerLookCatalog, footerLookCatalog, isObjectRecord, EMPTY_DOC, getRichTextImagePositionFromTarget, insertOrReplaceRichTextImage, Pencil, foldSubroute, SUBROUTE_KINDS, Smartphone, Tablet, Monitor, Maximize2, DropdownMenuLabel, asSiteId, buildThemeRuntime, PaletteProvider, MediaEditorProvider, curatedSiteStyles, ChevronLeft, requireEntriesForCuratedChoices, buttonPersonalities, paletteVariants, resolveImageUrlWithContext, Root2, List, Trigger, Content, Input, Check, Label, isInternalResolvedLinkValue, Separator, toRoutableLinkPayload, useMediaEditor, MediaPickerMini, MediaPickerDialog, Surface, ColorPicker, getDirectImageUrlForMediaAsset, isSvgMimeType } from './chunk-LYI7TEMH.mjs';
|
|
4
|
+
import { usePreviewAuth, getDashboardUrl } from './chunk-VX7B5VAC.mjs';
|
|
5
5
|
import './chunk-XGB3TDIC.mjs';
|
|
6
6
|
import React2, { createContext, memo, useMemo, useState, useRef, useEffect, forwardRef, useCallback, useImperativeHandle, useContext, useSyncExternalStore, useLayoutEffect, useTransition, useId } from 'react';
|
|
7
7
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
@@ -2227,33 +2227,31 @@ function PreviewViewportControls({
|
|
|
2227
2227
|
}) {
|
|
2228
2228
|
const activePreset = VIEWPORT_PRESETS.find((p) => p.width === width);
|
|
2229
2229
|
const ActiveIcon = activePreset?.icon ?? Monitor;
|
|
2230
|
+
const activeLabel = mode === "squeeze" ? "Auto fit" : activePreset?.label ?? `${width}px`;
|
|
2230
2231
|
const showZoomControls = mode === "fixed" && zoom !== void 0 && onZoomChange !== void 0;
|
|
2231
2232
|
return /* @__PURE__ */ jsxs("div", { className: cn("flex items-center gap-2", className), children: [
|
|
2232
2233
|
/* @__PURE__ */ jsxs(DropdownMenu, { children: [
|
|
2233
2234
|
/* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(Button, { variant: "outline", size: "sm", className: "gap-2", children: [
|
|
2234
2235
|
/* @__PURE__ */ jsx(ActiveIcon, { className: "h-4 w-4" }),
|
|
2235
|
-
/* @__PURE__ */
|
|
2236
|
-
mode === "squeeze" && "Responsive",
|
|
2237
|
-
mode === "fixed" && (width === "full" ? "Full Width" : `${width}px`)
|
|
2238
|
-
] })
|
|
2236
|
+
/* @__PURE__ */ jsx("span", { className: "text-xs", children: activeLabel })
|
|
2239
2237
|
] }) }),
|
|
2240
2238
|
/* @__PURE__ */ jsxs(DropdownMenuContent, { align: "end", className: "w-56", children: [
|
|
2241
|
-
/* @__PURE__ */ jsx(DropdownMenuLabel, { children: "
|
|
2239
|
+
/* @__PURE__ */ jsx(DropdownMenuLabel, { children: "Preview size" }),
|
|
2242
2240
|
/* @__PURE__ */ jsx(DropdownMenuSeparator, {}),
|
|
2243
2241
|
/* @__PURE__ */ jsx(DropdownMenuItem, { onClick: () => onModeChange("squeeze"), className: cn(mode === "squeeze" && "bg-accent"), children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1", children: [
|
|
2244
|
-
/* @__PURE__ */ jsx("span", { className: "font-medium", children: "
|
|
2245
|
-
/* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground", children: "
|
|
2242
|
+
/* @__PURE__ */ jsx("span", { className: "font-medium", children: "Auto fit" }),
|
|
2243
|
+
/* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground", children: "Matches the space beside the editor" })
|
|
2246
2244
|
] }) }),
|
|
2247
2245
|
/* @__PURE__ */ jsx(DropdownMenuItem, { onClick: () => onModeChange("fixed"), className: cn(mode === "fixed" && "bg-accent"), children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1", children: [
|
|
2248
|
-
/* @__PURE__ */ jsx("span", { className: "font-medium", children: "
|
|
2249
|
-
/* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground", children: "
|
|
2246
|
+
/* @__PURE__ */ jsx("span", { className: "font-medium", children: "Choose size" }),
|
|
2247
|
+
/* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground", children: "Preview mobile, tablet, or desktop widths" })
|
|
2250
2248
|
] }) })
|
|
2251
2249
|
] })
|
|
2252
2250
|
] }),
|
|
2253
2251
|
mode === "fixed" && /* @__PURE__ */ jsxs(DropdownMenu, { children: [
|
|
2254
2252
|
/* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx(Button, { variant: "outline", size: "sm", children: activePreset?.label ?? `${width}px` }) }),
|
|
2255
2253
|
/* @__PURE__ */ jsxs(DropdownMenuContent, { align: "end", children: [
|
|
2256
|
-
/* @__PURE__ */ jsx(DropdownMenuLabel, { children: "
|
|
2254
|
+
/* @__PURE__ */ jsx(DropdownMenuLabel, { children: "Screen size" }),
|
|
2257
2255
|
/* @__PURE__ */ jsx(DropdownMenuSeparator, {}),
|
|
2258
2256
|
VIEWPORT_PRESETS.map((preset) => /* @__PURE__ */ jsxs(
|
|
2259
2257
|
DropdownMenuItem,
|
|
@@ -4000,6 +3998,9 @@ function useBlockReorder({
|
|
|
4000
3998
|
return { reorderId, handleMove, onDragEnd };
|
|
4001
3999
|
}
|
|
4002
4000
|
|
|
4001
|
+
// ../editor-blocks/src/block-editor/actionControlMode.ts
|
|
4002
|
+
var DEFAULT_BLOCK_ACTION_CONTROL_MODE = "inline";
|
|
4003
|
+
|
|
4003
4004
|
// ../editor-blocks/src/block-editor/reorderControlMode.ts
|
|
4004
4005
|
var DEFAULT_REORDER_CONTROL_MODE = "full";
|
|
4005
4006
|
function shouldShowMoveButtons(mode) {
|
|
@@ -4433,10 +4434,23 @@ function BlockSettingsModal({
|
|
|
4433
4434
|
uiStore,
|
|
4434
4435
|
widgetOverrides,
|
|
4435
4436
|
theme,
|
|
4436
|
-
hideThemeV2RawStyleFields: hideThemeV2RawStyleFields2 = false
|
|
4437
|
+
hideThemeV2RawStyleFields: hideThemeV2RawStyleFields2 = false,
|
|
4438
|
+
showSettingsTrigger = true,
|
|
4439
|
+
open: controlledOpen,
|
|
4440
|
+
onOpenChange,
|
|
4441
|
+
onAvailabilityChange
|
|
4437
4442
|
}) {
|
|
4438
|
-
const [
|
|
4439
|
-
const
|
|
4443
|
+
const [internalOpen, setInternalOpen] = useState(false);
|
|
4444
|
+
const open = controlledOpen ?? internalOpen;
|
|
4445
|
+
const setOpen = useCallback(
|
|
4446
|
+
(nextOpen) => {
|
|
4447
|
+
if (controlledOpen === void 0) {
|
|
4448
|
+
setInternalOpen(nextOpen);
|
|
4449
|
+
}
|
|
4450
|
+
onOpenChange?.(nextOpen);
|
|
4451
|
+
},
|
|
4452
|
+
[controlledOpen, onOpenChange]
|
|
4453
|
+
);
|
|
4440
4454
|
const blockId = typeof block.id === "string" ? asEditorBlockId(block.id) : null;
|
|
4441
4455
|
const hasDraftSnapshot = useStoreSelector(
|
|
4442
4456
|
uiStore,
|
|
@@ -4537,12 +4551,16 @@ function BlockSettingsModal({
|
|
|
4537
4551
|
() => settingsSourceFields.some((field) => isNonEmptyValue(valueSource[field.id])),
|
|
4538
4552
|
[settingsSourceFields, valueSource]
|
|
4539
4553
|
);
|
|
4540
|
-
|
|
4554
|
+
const settingsAvailable = Boolean(blockId && visibleTabs.length > 0 && backend);
|
|
4555
|
+
useEffect(() => {
|
|
4556
|
+
onAvailabilityChange?.(settingsAvailable);
|
|
4557
|
+
}, [onAvailabilityChange, settingsAvailable]);
|
|
4558
|
+
if (!settingsAvailable || !blockId || !backend) {
|
|
4541
4559
|
return null;
|
|
4542
4560
|
}
|
|
4543
4561
|
const defaultTab = visibleTabs[0]?.id ?? "display";
|
|
4544
4562
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
4545
|
-
/* @__PURE__ */ jsx(
|
|
4563
|
+
showSettingsTrigger ? /* @__PURE__ */ jsx(
|
|
4546
4564
|
Button,
|
|
4547
4565
|
{
|
|
4548
4566
|
type: "button",
|
|
@@ -4550,10 +4568,6 @@ function BlockSettingsModal({
|
|
|
4550
4568
|
size: "icon",
|
|
4551
4569
|
onClick: (event) => {
|
|
4552
4570
|
event.stopPropagation();
|
|
4553
|
-
if (directSectionStylesModal) {
|
|
4554
|
-
setDirectSectionStylesOpen(true);
|
|
4555
|
-
return;
|
|
4556
|
-
}
|
|
4557
4571
|
setOpen(true);
|
|
4558
4572
|
},
|
|
4559
4573
|
disabled: !hasDraftSnapshot,
|
|
@@ -4561,13 +4575,13 @@ function BlockSettingsModal({
|
|
|
4561
4575
|
title: "Block settings",
|
|
4562
4576
|
children: /* @__PURE__ */ jsx(Settings, { className: "h-4 w-4" })
|
|
4563
4577
|
}
|
|
4564
|
-
),
|
|
4565
|
-
directSectionStylesModal ? /* @__PURE__ */ jsx(Dialog, { open
|
|
4578
|
+
) : null,
|
|
4579
|
+
directSectionStylesModal ? /* @__PURE__ */ jsx(Dialog, { open, onOpenChange: setOpen, children: /* @__PURE__ */ jsx(
|
|
4566
4580
|
ScrollableDialogContent,
|
|
4567
4581
|
{
|
|
4568
4582
|
title: directSectionStylesTitle,
|
|
4569
4583
|
description: directSectionStylesDescription,
|
|
4570
|
-
footer: /* @__PURE__ */ jsx(Button, { type: "button", onClick: () =>
|
|
4584
|
+
footer: /* @__PURE__ */ jsx(Button, { type: "button", onClick: () => setOpen(false), children: "Done" }),
|
|
4571
4585
|
children: /* @__PURE__ */ jsx(
|
|
4572
4586
|
FormRenderer,
|
|
4573
4587
|
{
|
|
@@ -4579,7 +4593,7 @@ function BlockSettingsModal({
|
|
|
4579
4593
|
)
|
|
4580
4594
|
}
|
|
4581
4595
|
) }) : null,
|
|
4582
|
-
/* @__PURE__ */ jsx(Dialog, { open, onOpenChange: setOpen, children: /* @__PURE__ */ jsx(
|
|
4596
|
+
!directSectionStylesModal ? /* @__PURE__ */ jsx(Dialog, { open, onOpenChange: setOpen, children: /* @__PURE__ */ jsx(
|
|
4583
4597
|
ScrollableDialogContent,
|
|
4584
4598
|
{
|
|
4585
4599
|
title: "Block settings",
|
|
@@ -4597,7 +4611,7 @@ function BlockSettingsModal({
|
|
|
4597
4611
|
) }, tab.id))
|
|
4598
4612
|
] })
|
|
4599
4613
|
}
|
|
4600
|
-
) })
|
|
4614
|
+
) }) : null
|
|
4601
4615
|
] });
|
|
4602
4616
|
}
|
|
4603
4617
|
function useDraftContent(uiStore, blockId) {
|
|
@@ -4635,10 +4649,14 @@ function BlockCardHeader({
|
|
|
4635
4649
|
widgetOverrides,
|
|
4636
4650
|
theme,
|
|
4637
4651
|
hideThemeV2RawStyleFields: hideThemeV2RawStyleFields2 = false,
|
|
4638
|
-
reorderControlMode = "full"
|
|
4652
|
+
reorderControlMode = "full",
|
|
4653
|
+
actionControlMode = DEFAULT_BLOCK_ACTION_CONTROL_MODE
|
|
4639
4654
|
}) {
|
|
4640
4655
|
const [deleteDialogOpen, setDeleteDialogOpen] = useState(false);
|
|
4656
|
+
const [settingsDialogOpen, setSettingsDialogOpen] = useState(false);
|
|
4657
|
+
const [settingsAvailable, setSettingsAvailable] = useState(true);
|
|
4641
4658
|
const showMoveButtons = shouldShowMoveButtons(reorderControlMode);
|
|
4659
|
+
const showActionsMenu = actionControlMode === "menu";
|
|
4642
4660
|
const baselineContent = useDraftContent(
|
|
4643
4661
|
uiStore,
|
|
4644
4662
|
typeof block.id === "string" ? asEditorBlockId(block.id) : null
|
|
@@ -4649,6 +4667,22 @@ function BlockCardHeader({
|
|
|
4649
4667
|
contentToUse,
|
|
4650
4668
|
block.kind
|
|
4651
4669
|
);
|
|
4670
|
+
const hasMenuActions = settingsAvailable || Boolean(onDuplicate) || Boolean(onDelete);
|
|
4671
|
+
const settingsModal = /* @__PURE__ */ jsx(
|
|
4672
|
+
BlockSettingsModal,
|
|
4673
|
+
{
|
|
4674
|
+
block,
|
|
4675
|
+
manifest,
|
|
4676
|
+
uiStore,
|
|
4677
|
+
widgetOverrides,
|
|
4678
|
+
theme,
|
|
4679
|
+
hideThemeV2RawStyleFields: hideThemeV2RawStyleFields2,
|
|
4680
|
+
showSettingsTrigger: !showActionsMenu,
|
|
4681
|
+
open: showActionsMenu ? settingsDialogOpen : void 0,
|
|
4682
|
+
onOpenChange: showActionsMenu ? setSettingsDialogOpen : void 0,
|
|
4683
|
+
onAvailabilityChange: showActionsMenu ? setSettingsAvailable : void 0
|
|
4684
|
+
}
|
|
4685
|
+
);
|
|
4652
4686
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
4653
4687
|
/* @__PURE__ */ jsxs(CardHeader, { className: "flex flex-wrap items-start gap-1 px-2 py-2", "data-testid": "block-card-header", children: [
|
|
4654
4688
|
/* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-1 items-center gap-2", children: [
|
|
@@ -4724,49 +4758,91 @@ function BlockCardHeader({
|
|
|
4724
4758
|
}
|
|
4725
4759
|
)
|
|
4726
4760
|
] }) : null,
|
|
4727
|
-
/* @__PURE__ */
|
|
4728
|
-
|
|
4729
|
-
|
|
4730
|
-
|
|
4731
|
-
|
|
4732
|
-
|
|
4733
|
-
|
|
4734
|
-
|
|
4735
|
-
|
|
4736
|
-
|
|
4737
|
-
|
|
4738
|
-
|
|
4739
|
-
Button,
|
|
4740
|
-
{
|
|
4741
|
-
type: "button",
|
|
4742
|
-
variant: "ghost",
|
|
4743
|
-
size: "icon",
|
|
4744
|
-
onClick: () => {
|
|
4745
|
-
if (block.id) {
|
|
4746
|
-
onDuplicate(block.id);
|
|
4761
|
+
showActionsMenu ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
4762
|
+
/* @__PURE__ */ jsxs(DropdownMenu, { children: [
|
|
4763
|
+
/* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
4764
|
+
Button,
|
|
4765
|
+
{
|
|
4766
|
+
type: "button",
|
|
4767
|
+
variant: "ghost",
|
|
4768
|
+
size: "icon",
|
|
4769
|
+
disabled: !hasMenuActions,
|
|
4770
|
+
"aria-label": `More actions for ${displayTitle}`,
|
|
4771
|
+
title: "More actions",
|
|
4772
|
+
children: /* @__PURE__ */ jsx(EllipsisVertical, { className: "h-4 w-4" })
|
|
4747
4773
|
}
|
|
4748
|
-
},
|
|
4749
|
-
|
|
4750
|
-
|
|
4751
|
-
|
|
4752
|
-
|
|
4753
|
-
|
|
4754
|
-
|
|
4755
|
-
|
|
4756
|
-
|
|
4757
|
-
|
|
4758
|
-
|
|
4759
|
-
|
|
4760
|
-
|
|
4761
|
-
|
|
4762
|
-
|
|
4763
|
-
|
|
4764
|
-
|
|
4765
|
-
|
|
4766
|
-
|
|
4767
|
-
|
|
4768
|
-
|
|
4769
|
-
|
|
4774
|
+
) }),
|
|
4775
|
+
/* @__PURE__ */ jsxs(DropdownMenuContent, { align: "end", className: "w-44", children: [
|
|
4776
|
+
settingsAvailable ? /* @__PURE__ */ jsxs(DropdownMenuItem, { onSelect: () => setSettingsDialogOpen(true), children: [
|
|
4777
|
+
/* @__PURE__ */ jsx(Settings, { className: "mr-2 h-4 w-4" }),
|
|
4778
|
+
"Settings"
|
|
4779
|
+
] }) : null,
|
|
4780
|
+
settingsAvailable && (onDuplicate || onDelete) ? /* @__PURE__ */ jsx(DropdownMenuSeparator, {}) : null,
|
|
4781
|
+
onDuplicate ? /* @__PURE__ */ jsxs(
|
|
4782
|
+
DropdownMenuItem,
|
|
4783
|
+
{
|
|
4784
|
+
disabled: isMoving || !block.id,
|
|
4785
|
+
onSelect: () => {
|
|
4786
|
+
if (block.id) {
|
|
4787
|
+
onDuplicate(block.id);
|
|
4788
|
+
}
|
|
4789
|
+
},
|
|
4790
|
+
children: [
|
|
4791
|
+
/* @__PURE__ */ jsx(Copy, { className: "mr-2 h-4 w-4" }),
|
|
4792
|
+
"Duplicate"
|
|
4793
|
+
]
|
|
4794
|
+
}
|
|
4795
|
+
) : null,
|
|
4796
|
+
onDelete ? /* @__PURE__ */ jsxs(
|
|
4797
|
+
DropdownMenuItem,
|
|
4798
|
+
{
|
|
4799
|
+
disabled: !block.id,
|
|
4800
|
+
className: "text-destructive focus:text-destructive",
|
|
4801
|
+
onSelect: () => setDeleteDialogOpen(true),
|
|
4802
|
+
children: [
|
|
4803
|
+
/* @__PURE__ */ jsx(Trash2, { className: "mr-2 h-4 w-4" }),
|
|
4804
|
+
"Delete"
|
|
4805
|
+
]
|
|
4806
|
+
}
|
|
4807
|
+
) : null
|
|
4808
|
+
] })
|
|
4809
|
+
] }),
|
|
4810
|
+
settingsModal
|
|
4811
|
+
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
4812
|
+
settingsModal,
|
|
4813
|
+
onDuplicate ? /* @__PURE__ */ jsx(
|
|
4814
|
+
Button,
|
|
4815
|
+
{
|
|
4816
|
+
type: "button",
|
|
4817
|
+
variant: "ghost",
|
|
4818
|
+
size: "icon",
|
|
4819
|
+
onClick: () => {
|
|
4820
|
+
if (block.id) {
|
|
4821
|
+
onDuplicate(block.id);
|
|
4822
|
+
}
|
|
4823
|
+
},
|
|
4824
|
+
disabled: isMoving || !block.id,
|
|
4825
|
+
"aria-label": "Duplicate block",
|
|
4826
|
+
title: "Duplicate block",
|
|
4827
|
+
children: /* @__PURE__ */ jsx(Copy, { className: "h-4 w-4" })
|
|
4828
|
+
}
|
|
4829
|
+
) : null,
|
|
4830
|
+
onDelete && /* @__PURE__ */ jsx(
|
|
4831
|
+
Button,
|
|
4832
|
+
{
|
|
4833
|
+
type: "button",
|
|
4834
|
+
variant: "ghost",
|
|
4835
|
+
size: "icon",
|
|
4836
|
+
onClick: () => {
|
|
4837
|
+
setDeleteDialogOpen(true);
|
|
4838
|
+
},
|
|
4839
|
+
disabled: !block.id,
|
|
4840
|
+
"aria-label": "Delete block",
|
|
4841
|
+
title: "Delete block",
|
|
4842
|
+
children: /* @__PURE__ */ jsx(Trash2, { className: "h-4 w-4" })
|
|
4843
|
+
}
|
|
4844
|
+
)
|
|
4845
|
+
] })
|
|
4770
4846
|
]
|
|
4771
4847
|
}
|
|
4772
4848
|
)
|
|
@@ -4825,7 +4901,8 @@ function BlockCard({
|
|
|
4825
4901
|
uiStore,
|
|
4826
4902
|
hideThemeV2RawStyleFields: hideThemeV2RawStyleFields2 = false,
|
|
4827
4903
|
pageDesignBlock = null,
|
|
4828
|
-
reorderControlMode = DEFAULT_REORDER_CONTROL_MODE
|
|
4904
|
+
reorderControlMode = DEFAULT_REORDER_CONTROL_MODE,
|
|
4905
|
+
actionControlMode = DEFAULT_BLOCK_ACTION_CONTROL_MODE
|
|
4829
4906
|
}) {
|
|
4830
4907
|
const contentId = block.id ? `builder-block-content-${block.id}` : void 0;
|
|
4831
4908
|
return /* @__PURE__ */ jsx(
|
|
@@ -4855,7 +4932,8 @@ function BlockCard({
|
|
|
4855
4932
|
widgetOverrides,
|
|
4856
4933
|
theme,
|
|
4857
4934
|
hideThemeV2RawStyleFields: hideThemeV2RawStyleFields2,
|
|
4858
|
-
reorderControlMode
|
|
4935
|
+
reorderControlMode,
|
|
4936
|
+
actionControlMode
|
|
4859
4937
|
}
|
|
4860
4938
|
),
|
|
4861
4939
|
/* @__PURE__ */ jsx(CollapsibleContent, { id: contentId, children: /* @__PURE__ */ jsx(
|
|
@@ -4902,7 +4980,8 @@ var SortableBlockItem = memo(function SortableBlockItem2({
|
|
|
4902
4980
|
sdkConfig,
|
|
4903
4981
|
hideThemeV2RawStyleFields: hideThemeV2RawStyleFields2 = false,
|
|
4904
4982
|
pageDesignBlock = null,
|
|
4905
|
-
reorderControlMode = DEFAULT_REORDER_CONTROL_MODE
|
|
4983
|
+
reorderControlMode = DEFAULT_REORDER_CONTROL_MODE,
|
|
4984
|
+
actionControlMode = DEFAULT_BLOCK_ACTION_CONTROL_MODE
|
|
4906
4985
|
}) {
|
|
4907
4986
|
const sortable = useSortable({ id: block.id, disabled: !isDraggable });
|
|
4908
4987
|
const manifest = useMemo(() => {
|
|
@@ -4977,7 +5056,8 @@ var SortableBlockItem = memo(function SortableBlockItem2({
|
|
|
4977
5056
|
uiStore,
|
|
4978
5057
|
hideThemeV2RawStyleFields: hideThemeV2RawStyleFields2,
|
|
4979
5058
|
pageDesignBlock,
|
|
4980
|
-
reorderControlMode
|
|
5059
|
+
reorderControlMode,
|
|
5060
|
+
actionControlMode
|
|
4981
5061
|
}
|
|
4982
5062
|
)
|
|
4983
5063
|
}
|
|
@@ -5002,7 +5082,8 @@ var BlockEditor = forwardRef(function BlockEditor2({
|
|
|
5002
5082
|
pageDesignEditorModel = null,
|
|
5003
5083
|
enabledContentTypes = [],
|
|
5004
5084
|
sdkConfig = null,
|
|
5005
|
-
reorderControlMode = DEFAULT_REORDER_CONTROL_MODE
|
|
5085
|
+
reorderControlMode = DEFAULT_REORDER_CONTROL_MODE,
|
|
5086
|
+
actionControlMode = DEFAULT_BLOCK_ACTION_CONTROL_MODE
|
|
5006
5087
|
}, ref) {
|
|
5007
5088
|
const [blockList, setBlockList] = useState(() => normalizeBlockListInitial(blocks));
|
|
5008
5089
|
const [errorMessage, setErrorMessage] = useState(null);
|
|
@@ -5304,7 +5385,8 @@ var BlockEditor = forwardRef(function BlockEditor2({
|
|
|
5304
5385
|
sdkConfig,
|
|
5305
5386
|
hideThemeV2RawStyleFields: hideThemeV2RawStyleFields2,
|
|
5306
5387
|
pageDesignBlock: block.id ? pageDesignBlockById.get(block.id) ?? null : null,
|
|
5307
|
-
reorderControlMode
|
|
5388
|
+
reorderControlMode,
|
|
5389
|
+
actionControlMode
|
|
5308
5390
|
}
|
|
5309
5391
|
),
|
|
5310
5392
|
allowCreation && index < blockList.length - 1 ? /* @__PURE__ */ jsx(AddBlockDivider, { onOpen: openPicker, position: index + 1 }) : null
|
|
@@ -5357,7 +5439,7 @@ function PageBlockEditorPanel({
|
|
|
5357
5439
|
onViewportWidthChange,
|
|
5358
5440
|
onZoomChange
|
|
5359
5441
|
}) {
|
|
5360
|
-
const [designOpen, setDesignOpen] = useState(
|
|
5442
|
+
const [designOpen, setDesignOpen] = useState(false);
|
|
5361
5443
|
const [contentOpen, setContentOpen] = useState(true);
|
|
5362
5444
|
const [detailsOpen, setDetailsOpen] = useState(false);
|
|
5363
5445
|
return /* @__PURE__ */ jsxs("div", { className: "flex h-full min-h-0 flex-col overflow-hidden", children: [
|
|
@@ -5406,7 +5488,8 @@ function PageBlockEditorPanel({
|
|
|
5406
5488
|
onBlocksChange,
|
|
5407
5489
|
widgetOverrides: previewWidgetOverrides,
|
|
5408
5490
|
sdkConfig: sdkConfig ?? null,
|
|
5409
|
-
reorderControlMode: "drag-handle-only"
|
|
5491
|
+
reorderControlMode: "drag-handle-only",
|
|
5492
|
+
actionControlMode: "menu"
|
|
5410
5493
|
},
|
|
5411
5494
|
pageId
|
|
5412
5495
|
)
|
|
@@ -5715,16 +5798,16 @@ function StyleConfigurator({
|
|
|
5715
5798
|
}, [baseSnapshot]);
|
|
5716
5799
|
useEffect(() => {
|
|
5717
5800
|
if (!state || !baseSnapshot) {
|
|
5718
|
-
setOverrideTheme(null);
|
|
5801
|
+
setOverrideTheme(null, { source: "style-configurator" });
|
|
5719
5802
|
return;
|
|
5720
5803
|
}
|
|
5721
5804
|
if (!isPreviewingChange(state)) {
|
|
5722
|
-
setOverrideTheme(null);
|
|
5805
|
+
setOverrideTheme(null, { source: "style-configurator" });
|
|
5723
5806
|
return;
|
|
5724
5807
|
}
|
|
5725
5808
|
const siteStyle = getCuratedSiteStyle(state.previewed.siteStyleId);
|
|
5726
5809
|
if (!siteStyle) {
|
|
5727
|
-
setOverrideTheme(null);
|
|
5810
|
+
setOverrideTheme(null, { source: "style-configurator" });
|
|
5728
5811
|
return;
|
|
5729
5812
|
}
|
|
5730
5813
|
const result = compileSiteThemeFromSelections({
|
|
@@ -5737,13 +5820,13 @@ function StyleConfigurator({
|
|
|
5737
5820
|
headerSelectionContext,
|
|
5738
5821
|
footerSelectionContext
|
|
5739
5822
|
});
|
|
5740
|
-
setOverrideTheme(result.theme);
|
|
5823
|
+
setOverrideTheme(result.theme, { source: "style-configurator" });
|
|
5741
5824
|
}, [state, baseSnapshot, setOverrideTheme, headerSelectionContext, footerSelectionContext]);
|
|
5742
5825
|
useEffect(() => {
|
|
5743
5826
|
const runner = runnerRef.current;
|
|
5744
5827
|
return () => {
|
|
5745
5828
|
runner.invalidate();
|
|
5746
|
-
setOverrideThemeRef.current(null);
|
|
5829
|
+
setOverrideThemeRef.current(null, { source: "style-configurator" });
|
|
5747
5830
|
};
|
|
5748
5831
|
}, []);
|
|
5749
5832
|
useEffect(() => {
|
|
@@ -6042,7 +6125,7 @@ function StyleRowFrame({ label, currentLabel, swatch, expanded, onToggle, childr
|
|
|
6042
6125
|
] }) });
|
|
6043
6126
|
}
|
|
6044
6127
|
function SiteStyleRow({ expanded, onToggle, current, onPreview, disabled }) {
|
|
6045
|
-
return /* @__PURE__ */ jsx(StyleRowFrame, { label: "Site style", currentLabel: current.name, expanded, onToggle, children: /* @__PURE__ */ jsx("ul", { role: "radiogroup", "aria-label": "Site style", className: "space-y-1", children: curatedSiteStyles.map((style) => /* @__PURE__ */ jsx(
|
|
6128
|
+
return /* @__PURE__ */ jsx(StyleRowFrame, { label: "Site style", currentLabel: current.name, expanded, onToggle, children: /* @__PURE__ */ jsx("ul", { role: "radiogroup", "aria-label": "Site style", className: "list-none space-y-1 p-0", children: curatedSiteStyles.map((style) => /* @__PURE__ */ jsx(
|
|
6046
6129
|
PickerOption,
|
|
6047
6130
|
{
|
|
6048
6131
|
selected: style.id === current.id,
|
|
@@ -6059,7 +6142,7 @@ function PersonalityRow({ expanded, onToggle, siteStyle, currentId, currentLabel
|
|
|
6059
6142
|
() => requireEntriesForCuratedChoices(buttonPersonalities, siteStyle.buttonPersonalityChoices),
|
|
6060
6143
|
[siteStyle.buttonPersonalityChoices]
|
|
6061
6144
|
);
|
|
6062
|
-
return /* @__PURE__ */ jsx(StyleRowFrame, { label: "Button style", currentLabel, expanded, onToggle, children: /* @__PURE__ */ jsx("ul", { role: "radiogroup", "aria-label": "Button style", className: "space-y-1", children: options.map((personality) => /* @__PURE__ */ jsx(
|
|
6145
|
+
return /* @__PURE__ */ jsx(StyleRowFrame, { label: "Button style", currentLabel, expanded, onToggle, children: /* @__PURE__ */ jsx("ul", { role: "radiogroup", "aria-label": "Button style", className: "list-none space-y-1 p-0", children: options.map((personality) => /* @__PURE__ */ jsx(
|
|
6063
6146
|
PickerOption,
|
|
6064
6147
|
{
|
|
6065
6148
|
selected: personality.id === currentId,
|
|
@@ -6123,8 +6206,8 @@ function SiteChromeLookRow({
|
|
|
6123
6206
|
)
|
|
6124
6207
|
] })
|
|
6125
6208
|
] }),
|
|
6126
|
-
diagnostics.length > 0 ? /* @__PURE__ */ jsx("ul", { className: "mb-3 space-y-1 text-xs text-amber-700", children: diagnostics.map((diagnostic) => /* @__PURE__ */ jsx("li", { children: diagnostic }, diagnostic)) }) : null,
|
|
6127
|
-
/* @__PURE__ */ jsx("ul", { role: "radiogroup", "aria-label": ariaLabel, className: "space-y-1", children: options.map((look) => /* @__PURE__ */ jsx(
|
|
6209
|
+
diagnostics.length > 0 ? /* @__PURE__ */ jsx("ul", { className: "mb-3 list-none space-y-1 p-0 text-xs text-amber-700", children: diagnostics.map((diagnostic) => /* @__PURE__ */ jsx("li", { children: diagnostic }, diagnostic)) }) : null,
|
|
6210
|
+
/* @__PURE__ */ jsx("ul", { role: "radiogroup", "aria-label": ariaLabel, className: "list-none space-y-1 p-0", children: options.map((look) => /* @__PURE__ */ jsx(
|
|
6128
6211
|
PickerOption,
|
|
6129
6212
|
{
|
|
6130
6213
|
selected: look.id === currentId,
|
|
@@ -6150,7 +6233,7 @@ function PaletteRow({ expanded, onToggle, siteStyle, currentId, currentLabel, cu
|
|
|
6150
6233
|
swatch: currentSwatch,
|
|
6151
6234
|
expanded,
|
|
6152
6235
|
onToggle,
|
|
6153
|
-
children: /* @__PURE__ */ jsx("ul", { role: "radiogroup", "aria-label": "Palette", className: "space-y-1", children: options.map((variant) => {
|
|
6236
|
+
children: /* @__PURE__ */ jsx("ul", { role: "radiogroup", "aria-label": "Palette", className: "list-none space-y-1 p-0", children: options.map((variant) => {
|
|
6154
6237
|
const primaryHex = variant.colors.find((c) => c.name === "primary")?.hex;
|
|
6155
6238
|
return /* @__PURE__ */ jsx(
|
|
6156
6239
|
PickerOption,
|
|
@@ -6211,7 +6294,7 @@ function ColoursRow({ expanded, onToggle, variant, overrides, onTokenChange, onR
|
|
|
6211
6294
|
);
|
|
6212
6295
|
}
|
|
6213
6296
|
function PickerOption({ selected, label, description, swatch, onSelect, disabled }) {
|
|
6214
|
-
return /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs(
|
|
6297
|
+
return /* @__PURE__ */ jsx("li", { className: "list-none", children: /* @__PURE__ */ jsxs(
|
|
6215
6298
|
"button",
|
|
6216
6299
|
{
|
|
6217
6300
|
type: "button",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { resolvePreviewChromeSurface, usePreviewPageDesignEditorState, PREVIEW_CHROME_PORTAL_CLASS_NAME, PREVIEW_CHROME_THEME_CLASS_NAME, applyPreviewChromeSurfaceToElement, setPreviewSidebarTab, PREVIEW_THEME_COOKIE_NAME } from './chunk-
|
|
3
|
-
import { useEntryEditorController, useEditorUiStore, useMultiAutosave, EditorChrome, classifyHistoryShortcut, unwrapResponse, cn, Dialog, Button, Palette, DialogContent, DialogHeader, DialogTitle, DialogDescription, TriangleAlert, useEditorUiStoreInstance, Pencil, previewAssistantEnabled, Sparkles } from './chunk-
|
|
4
|
-
import { usePreviewAuth, getDashboardBaseUrl } from './chunk-
|
|
2
|
+
import { resolvePreviewChromeSurface, usePreviewPageDesignEditorState, PREVIEW_CHROME_PORTAL_CLASS_NAME, PREVIEW_CHROME_THEME_CLASS_NAME, applyPreviewChromeSurfaceToElement, setPreviewSidebarTab, PREVIEW_THEME_COOKIE_NAME } from './chunk-V5VORNEJ.mjs';
|
|
3
|
+
import { useEntryEditorController, useEditorUiStore, useMultiAutosave, EditorChrome, classifyHistoryShortcut, unwrapResponse, cn, Dialog, Button, Palette, DialogContent, DialogHeader, DialogTitle, DialogDescription, TriangleAlert, useEditorUiStoreInstance, Pencil, previewAssistantEnabled, Sparkles } from './chunk-LYI7TEMH.mjs';
|
|
4
|
+
import { usePreviewAuth, getDashboardBaseUrl } from './chunk-VX7B5VAC.mjs';
|
|
5
5
|
import './chunk-XGB3TDIC.mjs';
|
|
6
6
|
import { useState, useMemo, useEffect, useTransition, useCallback } from 'react';
|
|
7
7
|
import { createPortal } from 'react-dom';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
export { SdkPreviewModeRuntime } from './chunk-Q4OLG66B.mjs';
|
|
3
|
+
import './chunk-Z7JLNTJR.mjs';
|
|
4
|
+
import './chunk-TW2Y4RR5.mjs';
|
|
5
|
+
import './chunk-V5VORNEJ.mjs';
|
|
6
|
+
import './chunk-LYI7TEMH.mjs';
|
|
7
|
+
import './chunk-VX7B5VAC.mjs';
|
|
8
|
+
import './chunk-XGB3TDIC.mjs';
|
|
@@ -397,6 +397,7 @@ export type AppointmentService = {
|
|
|
397
397
|
locationType: "virtual" | "in_person" | "hybrid";
|
|
398
398
|
venueId: string | null;
|
|
399
399
|
timezone: string | null;
|
|
400
|
+
onlineDetails: AppointmentServiceOnlineDetails | null;
|
|
400
401
|
formId: string | null;
|
|
401
402
|
cancellationPolicy: {
|
|
402
403
|
refunds: {
|
|
@@ -407,6 +408,16 @@ export type AppointmentService = {
|
|
|
407
408
|
createdAt: string;
|
|
408
409
|
updatedAt: string;
|
|
409
410
|
};
|
|
411
|
+
export type AppointmentServiceOnlineDetails = {
|
|
412
|
+
joinUrl: string;
|
|
413
|
+
accessCode: string | null;
|
|
414
|
+
notes: string | null;
|
|
415
|
+
};
|
|
416
|
+
export type AppointmentServiceOnlineDetailsInput = {
|
|
417
|
+
joinUrl: string;
|
|
418
|
+
accessCode?: string | null;
|
|
419
|
+
notes?: string | null;
|
|
420
|
+
};
|
|
410
421
|
export type CreateAppointmentServiceRequest = {
|
|
411
422
|
title: string;
|
|
412
423
|
description?: string | null;
|
|
@@ -423,6 +434,7 @@ export type CreateAppointmentServiceRequest = {
|
|
|
423
434
|
locationType?: "virtual" | "in_person" | "hybrid";
|
|
424
435
|
venueId?: string | null;
|
|
425
436
|
timezone?: string | null;
|
|
437
|
+
onlineDetails?: AppointmentServiceOnlineDetailsInput | null;
|
|
426
438
|
formId?: string | null;
|
|
427
439
|
cancellationPolicy?: AppointmentService["cancellationPolicy"];
|
|
428
440
|
};
|
|
@@ -34,6 +34,17 @@ export declare const TAG_TEMPLATES: {
|
|
|
34
34
|
readonly siteForms: "riverbank:site:{siteId}:forms";
|
|
35
35
|
readonly formById: "riverbank:form:{formId}";
|
|
36
36
|
readonly formSubmissionsBySlug: "riverbank:form-submissions:{slug}";
|
|
37
|
+
readonly publicEvents: "riverbank:site:{siteId}:public-events";
|
|
38
|
+
readonly publicEventFilters: "riverbank:site:{siteId}:public-event-filters";
|
|
39
|
+
readonly publicCourses: "riverbank:site:{siteId}:public-courses";
|
|
40
|
+
readonly publicTeamMembers: "riverbank:site:{siteId}:public-team-members";
|
|
41
|
+
readonly publicProducts: "riverbank:site:{siteId}:public-products";
|
|
42
|
+
readonly publicPasses: "riverbank:site:{siteId}:public-passes";
|
|
43
|
+
readonly publicMemberships: "riverbank:site:{siteId}:public-memberships";
|
|
44
|
+
readonly publicGifting: "riverbank:site:{siteId}:public-gifting";
|
|
45
|
+
readonly publicShop: "riverbank:site:{siteId}:public-shop";
|
|
46
|
+
readonly publicCheckout: "riverbank:site:{siteId}:public-checkout";
|
|
47
|
+
readonly publicBookingServices: "riverbank:site:{siteId}:public-booking-services";
|
|
37
48
|
readonly siteNavigation: "riverbank:site:{siteId}:navigation";
|
|
38
49
|
readonly navigationMenuById: "riverbank:navigation-menu:{menuId}";
|
|
39
50
|
readonly navigationItemById: "riverbank:navigation-item:{itemId}";
|
|
@@ -64,6 +75,17 @@ export declare const tags: {
|
|
|
64
75
|
readonly form: (formId: string) => string;
|
|
65
76
|
readonly entry: (entryId: string) => string;
|
|
66
77
|
readonly formSubmissionsBySlug: (slug: string) => string;
|
|
78
|
+
readonly publicEvents: (siteId: string) => string;
|
|
79
|
+
readonly publicEventFilters: (siteId: string) => string;
|
|
80
|
+
readonly publicCourses: (siteId: string) => string;
|
|
81
|
+
readonly publicTeamMembers: (siteId: string) => string;
|
|
82
|
+
readonly publicProducts: (siteId: string) => string;
|
|
83
|
+
readonly publicPasses: (siteId: string) => string;
|
|
84
|
+
readonly publicMemberships: (siteId: string) => string;
|
|
85
|
+
readonly publicGifting: (siteId: string) => string;
|
|
86
|
+
readonly publicShop: (siteId: string) => string;
|
|
87
|
+
readonly publicCheckout: (siteId: string) => string;
|
|
88
|
+
readonly publicBookingServices: (siteId: string) => string;
|
|
67
89
|
readonly siteNavigation: (siteId: string) => string;
|
|
68
90
|
readonly navigationMenu: (menuId: string) => string;
|
|
69
91
|
readonly navigationItem: (itemId: string) => string;
|
|
@@ -473,6 +473,7 @@ export type ListPublishedEntriesResponse<TContent = Record<string, unknown>> = {
|
|
|
473
473
|
entries: ContentEntryListItem<TContent>[];
|
|
474
474
|
meta?: ListPublishedEntriesMeta;
|
|
475
475
|
contentType?: PublicContentTypeMeta | null;
|
|
476
|
+
mediaAssets?: SdkRuntimeMediaAsset[];
|
|
476
477
|
};
|
|
477
478
|
/**
|
|
478
479
|
* Block content as returned by SDK page/entry loaders.
|