@riverbankcms/sdk 0.78.0 → 0.78.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/README.md +45 -43
- package/dist/{PreviewEditorSidebar-RIKFQ72L.mjs → PreviewEditorSidebar-4DXLYX2V.mjs} +29 -21
- package/dist/{PreviewEditorUI-XO7TUWKK.mjs → PreviewEditorUI-CS5P4N3P.mjs} +4 -4
- package/dist/SdkPreviewModeRuntime-IJDHTW4W.mjs +8 -0
- package/dist/_dts/ai/src/contracts/proposals.d.ts +36 -0
- package/dist/_dts/api/src/contentRuntime.d.ts +1 -0
- package/dist/_dts/api/src/endpoints.d.ts +9 -0
- package/dist/_dts/api/src/index.d.ts +3 -3
- package/dist/_dts/api/src/public/types.d.ts +1 -1
- package/dist/_dts/api/src/request.d.ts +3 -11
- package/dist/_dts/api/src/sdkConfig/contracts.d.ts +1 -0
- package/dist/_dts/api/src/sdkContracts.d.ts +7 -1
- package/dist/_dts/api/src/siteManagementEndpoints.d.ts +10 -0
- package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +1 -0
- package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +15 -19
- package/dist/_dts/api/src/types.d.ts +11 -26
- package/dist/_dts/block-form/src/fields/types.d.ts +6 -0
- package/dist/_dts/block-form/src/widgets/RepeaterField/components/RepeaterList.d.ts +3 -2
- package/dist/_dts/block-form/src/widgets/RepeaterField/components/RepeaterRow.d.ts +6 -3
- package/dist/_dts/block-form/src/widgets/RepeaterField/components/RepeaterRowActions.d.ts +8 -3
- package/dist/_dts/block-form/src/widgets/RepeaterField/hooks/index.d.ts +1 -1
- package/dist/_dts/block-form/src/widgets/RepeaterField/hooks/useLinearRepeaterDnd.d.ts +1 -0
- package/dist/_dts/block-form/src/widgets/RepeaterField/hooks/useRepeaterPointerDragCapability.d.ts +1 -0
- package/dist/_dts/block-form/src/widgets/RepeaterField/hooks/useResolvedItemLabel.d.ts +7 -0
- package/dist/_dts/block-form/src/widgets/RepeaterField/utils/buildSummary.d.ts +1 -0
- package/dist/_dts/block-form/src/widgets/RepeaterField/utils/index.d.ts +3 -1
- package/dist/_dts/block-form/src/widgets/RepeaterField/utils/repeaterDndDomain.d.ts +1 -1
- package/dist/_dts/block-form/src/widgets/RepeaterField/utils/repeaterLabelSource.d.ts +15 -0
- package/dist/_dts/block-form/src/widgets/RepeaterField/utils/repeaterRowActionsDomain.d.ts +50 -0
- package/dist/_dts/blocks/src/system/blocks/appointment-booking.d.ts +591 -0
- package/dist/_dts/blocks/src/system/blocks/blog-listing.d.ts +591 -0
- package/dist/_dts/blocks/src/system/blocks/cart.d.ts +591 -0
- package/dist/_dts/blocks/src/system/blocks/checkout.d.ts +591 -0
- package/dist/_dts/blocks/src/system/blocks/collection.d.ts +591 -0
- package/dist/_dts/blocks/src/system/blocks/faq.d.ts +591 -0
- package/dist/_dts/blocks/src/system/blocks/gifting.d.ts +591 -0
- package/dist/_dts/blocks/src/system/blocks/location-map.d.ts +2 -0
- package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +47 -0
- package/dist/_dts/blocks/src/system/blocks/product-detail.d.ts +591 -0
- package/dist/_dts/blocks/src/system/blocks/product-list.d.ts +591 -0
- package/dist/_dts/blocks/src/system/blocks/shop.d.ts +591 -0
- package/dist/_dts/blocks/src/system/blocks/team-members.d.ts +3 -0
- package/dist/_dts/blocks/src/system/manifest/schema.d.ts +164 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessBookingFlow.state.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.headless.state.d.ts +1 -1
- package/dist/_dts/content-editor/src/index.d.ts +1 -1
- package/dist/_dts/content-editor/src/ui/editorSnapshot.d.ts +2 -2
- package/dist/_dts/content-model/src/content-types/schema.d.ts +14 -0
- package/dist/_dts/content-model/src/templates/bindingTypeCompatibility.d.ts +3 -1
- package/dist/_dts/content-model/src/templates/bindingValidation.d.ts +10 -4
- package/dist/_dts/content-model/src/templates/fieldPaths.d.ts +20 -0
- package/dist/_dts/content-model/src/templates/manifestAdapter.d.ts +5 -2
- package/dist/_dts/core/src/branded.d.ts +108 -85
- package/dist/_dts/core/src/csv-types.d.ts +2 -2
- package/dist/_dts/core/src/editor-state.d.ts +7 -7
- package/dist/_dts/core/src/participants.d.ts +2 -2
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +11 -0
- package/dist/_dts/editor-blocks/src/blockPayload.d.ts +1 -1
- package/dist/_dts/media-editor/src/MediaEditor.d.ts +3 -1
- package/dist/_dts/media-editor/src/MediaPreview.d.ts +3 -1
- package/dist/_dts/media-editor/src/fieldUi.d.ts +5 -0
- package/dist/_dts/media-editor/src/index.d.ts +1 -1
- package/dist/_dts/sdk/src/cli/commands/push/consts.d.ts +1 -1
- package/dist/_dts/sdk/src/cli/commands/push/metadata.d.ts +2 -0
- package/dist/_dts/sdk/src/cli/commands/push/stale.d.ts +3 -3
- package/dist/_dts/sdk/src/cli/commands/push-execute.d.ts +7 -0
- package/dist/_dts/sdk/src/cli/commands/push.d.ts +2 -0
- package/dist/_dts/sdk/src/cli/content/reader.d.ts +13 -0
- package/dist/_dts/sdk/src/cli/content/writer.d.ts +2 -1
- package/dist/_dts/sdk/src/cli/helpers.d.ts +2 -0
- package/dist/_dts/sdk/src/cli/site-commands/commandKeys.d.ts +6 -6
- package/dist/_dts/sdk/src/cli/site-commands/commandRuntime.d.ts +5 -0
- package/dist/_dts/sdk/src/cli/site-commands/commandSurfaceDispatch.d.ts +4 -0
- package/dist/_dts/sdk/src/cli/site-commands/pageCommands.d.ts +5 -2
- package/dist/_dts/sdk/src/cli/site-commands/pushExecution.d.ts +10 -1
- package/dist/_dts/sdk/src/cli/site-commands/pushExecutionTypes.d.ts +1 -1
- package/dist/_dts/sdk/src/client/management/types.d.ts +6 -0
- package/dist/_dts/sdk/src/client/types.d.ts +2 -2
- package/dist/_dts/sdk/src/config/content-types.d.ts +7 -0
- package/dist/_dts/sdk/src/config/field-definitions.d.ts +2 -0
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/site-commands/src/commands.d.ts +3 -0
- package/dist/{altcha-B5XGSXP5.mjs → altcha-EKUEQ4RP.mjs} +1 -1
- package/dist/{chunk-NIDXI46P.mjs → chunk-4QEGTLK6.mjs} +1 -1
- package/dist/{chunk-TXDES5P2.mjs → chunk-6HYXHRAI.mjs} +5 -5
- package/dist/{chunk-SVMMM2NA.mjs → chunk-CR5HKAGU.mjs} +24 -5
- package/dist/{chunk-OECWLDHN.mjs → chunk-MCRQMPET.mjs} +1030 -588
- package/dist/{chunk-SXOLGNMX.mjs → chunk-OKMBEAXY.mjs} +1 -1
- package/dist/{chunk-XGB3TDIC.mjs → chunk-R7POPVJR.mjs} +2 -8
- package/dist/{chunk-F7RTCZYN.mjs → chunk-RGTOD4AJ.mjs} +20 -14
- package/dist/cli/index.mjs +681 -225
- package/dist/cli/init-docs/content/cli-reference.md +3 -2
- package/dist/cli/init-docs/content/content-management.md +2 -2
- package/dist/cli/init-docs/content/workflow-preview-mode.md +68 -2
- package/dist/client/{accordion-EVDEOUPR.mjs → accordion-PLYNJIIM.mjs} +2 -2
- package/dist/client/analytics.mjs +1 -1
- package/dist/client/{bookingForm-DIHBLC64.mjs → bookingForm-BXAP6AO7.mjs} +55 -48
- package/dist/client/bookings.mjs +62 -55
- package/dist/client/{carousel-FEBQHIWI.mjs → carousel-TRBXDHGF.mjs} +3 -3
- package/dist/client/{cart-7CKSXAE4.mjs → cart-Z7H3HJRS.mjs} +7 -7
- package/dist/client/{checkout-WKYCANLV.mjs → checkout-WAFCUBIX.mjs} +7 -7
- package/dist/client/{chunk-OFMSCGNY.mjs → chunk-75OUS5MT.mjs} +2 -2
- package/dist/client/{chunk-IVNCUVAV.mjs → chunk-AUJ5DBZJ.mjs} +18 -18
- package/dist/client/{chunk-36WJCERQ.mjs → chunk-CE7IBGVW.mjs} +3 -1
- package/dist/client/{chunk-RZDWX7QW.mjs → chunk-CWGTG37I.mjs} +1 -1
- package/dist/client/{chunk-YDSEG6GZ.mjs → chunk-DNRGY432.mjs} +2 -2
- package/dist/client/{chunk-RV6FX7UH.mjs → chunk-FUXW6VW2.mjs} +9 -9
- package/dist/client/{chunk-65F47D7Y.mjs → chunk-JGXPTEI2.mjs} +43 -36
- package/dist/client/{chunk-GUK2FPXQ.mjs → chunk-JRDUHZCT.mjs} +37 -15
- package/dist/client/{chunk-VPPMNXCF.mjs → chunk-UVQEJJTN.mjs} +2 -2
- package/dist/client/{chunk-F7LHOKEH.mjs → chunk-XSV6KW4D.mjs} +1 -1
- package/dist/client/{chunk-PD6NBCEY.mjs → chunk-ZFHRN6W2.mjs} +1 -1
- package/dist/client/{chunk-2SAVKN2M.mjs → chunk-ZI3LLBPZ.mjs} +2 -2
- package/dist/client/client.mjs +249 -160
- package/dist/client/{courseRegistration-5QF2PHKM.mjs → courseRegistration-AHFQHWIJ.mjs} +10 -10
- package/dist/client/{eventCalendar-4ZOSETDU.mjs → eventCalendar-LDXTV5R7.mjs} +9 -9
- package/dist/client/{eventCombined-WQGU7JUX.mjs → eventCombined-A4JGTNJO.mjs} +9 -9
- package/dist/client/{eventDetails-AYWVUJ5Y.mjs → eventDetails-4YXTZ7EG.mjs} +9 -9
- package/dist/client/{eventListing-NT7C6UT5.mjs → eventListing-P72TPFFM.mjs} +9 -9
- package/dist/client/{eventRegistration-OH24F4ZJ.mjs → eventRegistration-LSYJHGMT.mjs} +9 -9
- package/dist/client/{form-7L42SRBB.mjs → form-AOPYOKOW.mjs} +6 -3
- package/dist/client/{headerSection-OZRZNZ52.mjs → headerSection-5TFYDFVQ.mjs} +3 -3
- package/dist/client/hooks.mjs +78 -48
- package/dist/client/{locationMap-ZBXRPQ7C.mjs → locationMap-QSZ3ZVAZ.mjs} +3 -3
- package/dist/client/{newsletterForm-SNAGFF2I.mjs → newsletterForm-KTRHZY52.mjs} +2 -2
- package/dist/client/{productDetail-I46BOFGV.mjs → productDetail-N4E775RG.mjs} +7 -7
- package/dist/client/{productList-BOYHTYI6.mjs → productList-UGUQ2S45.mjs} +7 -7
- package/dist/client/rendering/client.mjs +173 -131
- package/dist/client/rendering/islands.mjs +19 -19
- package/dist/client/rendering.mjs +230 -150
- package/dist/client/{shop-XTXPZTKR.mjs → shop-VHSZEEQ2.mjs} +7 -7
- package/dist/preview-next/before-render.mjs +10 -1
- package/dist/preview-next/client/runtime.mjs +6 -6
- package/dist/preview-next/middleware.mjs +10 -1
- package/dist/preview-next/tailwind-sources.css +1 -0
- package/dist/sdk-runtime-WHPJEF5G.mjs +8 -0
- package/dist/server/components.mjs +101 -54
- package/dist/server/config-template-validation.mjs +221 -15
- package/dist/server/config-validation.mjs +76 -42
- package/dist/server/config.mjs +76 -42
- package/dist/server/data.mjs +77 -47
- package/dist/server/index.mjs +31 -10
- package/dist/server/next.mjs +133 -71
- package/dist/server/page-converter.mjs +60 -40
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +107 -60
- package/dist/server/rendering.mjs +111 -61
- package/dist/server/routing.mjs +93 -63
- package/dist/server/server.mjs +102 -57
- package/package.json +1 -1
- package/dist/SdkPreviewModeRuntime-LAGYMPNF.mjs +0 -8
- package/dist/sdk-runtime-ZJLKC6DR.mjs +0 -8
package/README.md
CHANGED
|
@@ -2653,11 +2653,11 @@ import {
|
|
|
2653
2653
|
|
|
2654
2654
|
## Content Configuration (SDK Content Scaffolding)
|
|
2655
2655
|
|
|
2656
|
-
Define content type schema
|
|
2656
|
+
Define content type schema and SDK-managed configuration in code. File-based documents such as pages, entries, navigation, and settings live in `content/**` and sync with explicit `riverbankcms push` scopes; `push-config` syncs schema/config surfaces only.
|
|
2657
2657
|
|
|
2658
2658
|
### Quick Start
|
|
2659
2659
|
|
|
2660
|
-
Create a `content.config.ts` file alongside your `riverbank.config.ts
|
|
2660
|
+
Create a `content.config.ts` file alongside your `riverbank.config.ts` for schema/config surfaces:
|
|
2661
2661
|
|
|
2662
2662
|
```typescript
|
|
2663
2663
|
// content.config.ts
|
|
@@ -2676,50 +2676,48 @@ export const contentConfig = defineContentConfig({
|
|
|
2676
2676
|
],
|
|
2677
2677
|
},
|
|
2678
2678
|
],
|
|
2679
|
+
});
|
|
2680
|
+
```
|
|
2679
2681
|
|
|
2680
|
-
|
|
2681
|
-
pages: [
|
|
2682
|
-
{
|
|
2683
|
-
identifier: 'home',
|
|
2684
|
-
path: '/',
|
|
2685
|
-
title: 'Home',
|
|
2686
|
-
status: 'published',
|
|
2687
|
-
},
|
|
2688
|
-
],
|
|
2682
|
+
Put mutable documents in `content/**` instead:
|
|
2689
2683
|
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
},
|
|
2700
|
-
},
|
|
2701
|
-
],
|
|
2684
|
+
```jsonc
|
|
2685
|
+
// content/pages/home.json
|
|
2686
|
+
{
|
|
2687
|
+
"identifier": "home",
|
|
2688
|
+
"path": "/",
|
|
2689
|
+
"title": "Home",
|
|
2690
|
+
"status": "published"
|
|
2691
|
+
}
|
|
2692
|
+
```
|
|
2702
2693
|
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
],
|
|
2694
|
+
```jsonc
|
|
2695
|
+
// content/entries/testimonial/testimonial-1.json
|
|
2696
|
+
{
|
|
2697
|
+
"identifier": "testimonial-1",
|
|
2698
|
+
"status": "published",
|
|
2699
|
+
"data": {
|
|
2700
|
+
"quote": "<p>Great product!</p>",
|
|
2701
|
+
"author": "Jane Doe"
|
|
2702
|
+
}
|
|
2703
|
+
}
|
|
2704
|
+
```
|
|
2715
2705
|
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2706
|
+
```jsonc
|
|
2707
|
+
// content/navigation.json
|
|
2708
|
+
{
|
|
2709
|
+
"menus": [
|
|
2710
|
+
{
|
|
2711
|
+
"identifier": "main",
|
|
2712
|
+
"name": "Main Navigation",
|
|
2713
|
+
"isPrimary": true,
|
|
2714
|
+
"items": [
|
|
2715
|
+
{ "label": "Home", "link": { "kind": "page", "identifier": "home" } },
|
|
2716
|
+
{ "label": "Get Started", "link": { "kind": "url", "href": "/signup" }, "isCta": true }
|
|
2717
|
+
]
|
|
2718
|
+
}
|
|
2719
|
+
]
|
|
2720
|
+
}
|
|
2723
2721
|
```
|
|
2724
2722
|
|
|
2725
2723
|
Then import it in your main config:
|
|
@@ -3155,6 +3153,7 @@ npx riverbankcms push [scope] [type] [identifier]
|
|
|
3155
3153
|
| `entries` | Push all entries, a content type, or a single entry |
|
|
3156
3154
|
| `pages` | Push all pages or a single page with blocks |
|
|
3157
3155
|
| `navigation` | Push navigation menus |
|
|
3156
|
+
| `settings` | Push `content/settings.json` only |
|
|
3158
3157
|
| `forms` | Push form definitions |
|
|
3159
3158
|
|
|
3160
3159
|
**Options:**
|
|
@@ -3182,6 +3181,9 @@ npx riverbankcms push
|
|
|
3182
3181
|
# Push only forms
|
|
3183
3182
|
npx riverbankcms push forms
|
|
3184
3183
|
|
|
3184
|
+
# Push only site settings / branding
|
|
3185
|
+
npx riverbankcms push settings
|
|
3186
|
+
|
|
3185
3187
|
# Push to production with confirmation bypass
|
|
3186
3188
|
npx riverbankcms push --env=remote --yes
|
|
3187
3189
|
|
|
@@ -3218,7 +3220,7 @@ npx riverbankcms push --dry-run --json-diff=summary
|
|
|
3218
3220
|
```
|
|
3219
3221
|
|
|
3220
3222
|
- Keep branding files in `content/media/<identifier>.<ext>`
|
|
3221
|
-
- Run `npx riverbankcms push` to upload missing files and assign the site logo/favicon
|
|
3223
|
+
- Run `npx riverbankcms push settings` to upload missing branding files and assign the site logo/favicon without pushing unrelated content
|
|
3222
3224
|
- Run `npx riverbankcms pull settings` to round-trip the current identifier-based branding state
|
|
3223
3225
|
- If the current CMS logo/favicon asset has no media identifier yet, pull warns and omits that field instead of writing a destructive clear
|
|
3224
3226
|
- Dashboard branding edits and CLI pushes both write the same site settings columns, so pull before pushing if someone may have changed branding in the dashboard
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { resolvePreviewDashboardSetupHandoff, buildPreviewDashboardSetupUrl, resolvePreviewSidebarChromeModel, resolvePreviewEditorGuidanceModel, canInspectSiteStyle, usePreviewDesignCoordinator, resolveStyleConfiguratorInitialSnapshot, createStyleConfiguratorState, createOptimisticActionRunner, syncStyleConfiguratorState, isPreviewingChange, planSiteStylePreviewChange, openRow, previewSiteStyle, applyResolvedSelections, previewButtonPersonality, previewHeaderLayout, previewHeaderStyle, planSiteChromeLookSelection, previewFooterLook, previewPaletteVariant, previewTypographyPreset, setTypographyBodyFontOverride, setTypographyHeadingFontOverride, clearTypographyFontOverrides, 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,
|
|
4
|
-
import { usePreviewAuth, getDashboardUrl } from './chunk-
|
|
5
|
-
import './chunk-
|
|
2
|
+
import { resolvePreviewDashboardSetupHandoff, buildPreviewDashboardSetupUrl, resolvePreviewSidebarChromeModel, resolvePreviewEditorGuidanceModel, canInspectSiteStyle, usePreviewDesignCoordinator, resolveStyleConfiguratorInitialSnapshot, createStyleConfiguratorState, createOptimisticActionRunner, syncStyleConfiguratorState, isPreviewingChange, planSiteStylePreviewChange, openRow, previewSiteStyle, applyResolvedSelections, previewButtonPersonality, previewHeaderLayout, previewHeaderStyle, planSiteChromeLookSelection, previewFooterLook, previewPaletteVariant, previewTypographyPreset, setTypographyBodyFontOverride, setTypographyHeadingFontOverride, clearTypographyFontOverrides, setPaletteOverrides, toggleRow, cancelPreview, dismissWarnings, dismissNotices, markApplyFailed, markApplySaved, markApplySaving, canApplySiteStyle, buildSiteChromeLookModels, cycleSiteChromeLookId, cycleableSiteChromeOptions } from './chunk-4QEGTLK6.mjs';
|
|
3
|
+
import { KeyboardCode, getBlockDefinition, CSS, useSdkConfig, listBlockDescriptors, useSensor, PointerSensor, useSensors, deleteBlock, createEditorRemoveBlockCommand, unsafeAsEditorBlockId, DndContext, closestCenter, Button, Plus, useDroppable, useDraggable, useCombinedRefs, isKeyboardEvent, createCustomBlockRegistry, Card, cn, Collapsible, CollapsibleContent, listContentTypes, mergeBlockDescriptorsWithRegistry, 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, createEditorInsertBlockCommand, LoaderCircle, ChevronDown, normalEditorCuratedPromotedFieldPaths, resolveVisiblePromotedFieldPathsForEditorBlock, createStoreBackend, validateBlockManifestIssues, Callout, CalloutTitle, unfinishedBlockCopy, CalloutDescription, recoveryConflictCopy, ManifestForm, unsafeAsEditorBlockValues, 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, paletteOverridesSchema, findButtonPersonality, findPaletteVariant, findTypographyPreset, getHeaderLayout, getHeaderStyle, findFooterLook, footerLookCatalog, isObjectRecord, EMPTY_DOC, getRichTextImagePositionFromTarget, insertOrReplaceRichTextImage, resolveVideoSelectionIntentForMediaField, emitMediaCropDebug, Pencil, foldSubroute, SUBROUTE_KINDS, Smartphone, Tablet, Monitor, Maximize2, DropdownMenuLabel, expectParsedBrandedId, parseSiteId, buildThemeRuntime, PaletteProvider, MediaEditorProvider, curatedSiteStyles, ChevronLeft, requireEntriesForCuratedChoices, buttonPersonalities, typographyPresets, paletteVariants, resolveImageUrlWithContext, Root2, List, Trigger, Content, Input, Check, Label, isInternalResolvedLinkValue, evaluateTypographyFontSlot, Separator, classifyKnownMimeType, toRoutableLinkPayload, useMediaEditor, MediaPickerMini, MediaPickerDialog, Surface, ColorPicker, getDirectImageUrlForMediaAsset, isSvgMimeType } from './chunk-MCRQMPET.mjs';
|
|
4
|
+
import { usePreviewAuth, getDashboardUrl } from './chunk-CR5HKAGU.mjs';
|
|
5
|
+
import './chunk-R7POPVJR.mjs';
|
|
6
6
|
import React, { 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';
|
|
8
8
|
import { useRouter } from 'next/navigation';
|
|
@@ -1479,7 +1479,7 @@ function useBlockBaselineSync({
|
|
|
1479
1479
|
const keepIds = /* @__PURE__ */ new Set();
|
|
1480
1480
|
blockList.forEach((block, index) => {
|
|
1481
1481
|
if (!block.id) return;
|
|
1482
|
-
const blockId =
|
|
1482
|
+
const blockId = unsafeAsEditorBlockId(block.id);
|
|
1483
1483
|
keepIds.add(blockId);
|
|
1484
1484
|
const normalizedBaseline = applyExtendedFieldDefaults(
|
|
1485
1485
|
block.kind,
|
|
@@ -1575,7 +1575,7 @@ var reindexBlockList = (items) => items.map((block, index) => ({ ...block, order
|
|
|
1575
1575
|
|
|
1576
1576
|
// ../editor-blocks/src/block-editor/hooks/buildInsertBlockHistoryCommand.ts
|
|
1577
1577
|
function toEditorBlockValues(value) {
|
|
1578
|
-
return value ?
|
|
1578
|
+
return value ? unsafeAsEditorBlockValues(value) : null;
|
|
1579
1579
|
}
|
|
1580
1580
|
function buildInsertBlockHistoryCommand({
|
|
1581
1581
|
block,
|
|
@@ -1584,7 +1584,7 @@ function buildInsertBlockHistoryCommand({
|
|
|
1584
1584
|
publishedContent
|
|
1585
1585
|
}) {
|
|
1586
1586
|
if (!block.id) return null;
|
|
1587
|
-
const blockId =
|
|
1587
|
+
const blockId = unsafeAsEditorBlockId(block.id);
|
|
1588
1588
|
const purpose = typeof block.purpose === "string" ? block.purpose ?? null : "content";
|
|
1589
1589
|
const baseline = draftContent ?? block.draftContent ?? block.content ?? null;
|
|
1590
1590
|
const nextPublishedContent = publishedContent ?? block.publishedContent ?? null;
|
|
@@ -1790,7 +1790,7 @@ function useBlockDuplication({
|
|
|
1790
1790
|
}
|
|
1791
1791
|
onBlocksChange?.(next);
|
|
1792
1792
|
if (triggerFocus) {
|
|
1793
|
-
const nextBlockId = insertCommand?.block.id ??
|
|
1793
|
+
const nextBlockId = insertCommand?.block.id ?? unsafeAsEditorBlockId(createdBlock.id);
|
|
1794
1794
|
setTimeout(() => {
|
|
1795
1795
|
triggerFocus({ blockId: nextBlockId });
|
|
1796
1796
|
}, 100);
|
|
@@ -1860,7 +1860,7 @@ function useBlockReorder({
|
|
|
1860
1860
|
const nextBlockIds = getBlockIds(updated);
|
|
1861
1861
|
uiStore?.getState().history.applyCommand?.({
|
|
1862
1862
|
...createEditorReorderBlocksCommand(
|
|
1863
|
-
nextBlockIds.map((blockId) =>
|
|
1863
|
+
nextBlockIds.map((blockId) => unsafeAsEditorBlockId(blockId))
|
|
1864
1864
|
)
|
|
1865
1865
|
});
|
|
1866
1866
|
try {
|
|
@@ -2065,7 +2065,7 @@ function BlockForm({
|
|
|
2065
2065
|
pageDesignBlock = null
|
|
2066
2066
|
}) {
|
|
2067
2067
|
const formRootRef = useRef(null);
|
|
2068
|
-
const blockId = typeof block.id === "string" ?
|
|
2068
|
+
const blockId = typeof block.id === "string" ? unsafeAsEditorBlockId(block.id) : null;
|
|
2069
2069
|
const blockSnapshot = useStoreSelector(
|
|
2070
2070
|
uiStore,
|
|
2071
2071
|
(state) => blockId ? state.drafts.getBlockSnapshot(blockId) : null
|
|
@@ -2380,7 +2380,7 @@ function BlockSettingsModal({
|
|
|
2380
2380
|
},
|
|
2381
2381
|
[controlledOpen, onOpenChange]
|
|
2382
2382
|
);
|
|
2383
|
-
const blockId = typeof block.id === "string" ?
|
|
2383
|
+
const blockId = typeof block.id === "string" ? unsafeAsEditorBlockId(block.id) : null;
|
|
2384
2384
|
const hasDraftSnapshot = useStoreSelector(
|
|
2385
2385
|
uiStore,
|
|
2386
2386
|
(state) => blockId ? state.drafts.getBlockSnapshot(blockId) !== null : false
|
|
@@ -2588,7 +2588,7 @@ function BlockCardHeader({
|
|
|
2588
2588
|
const showActionsMenu = actionControlMode === "menu";
|
|
2589
2589
|
const baselineContent = useDraftContent(
|
|
2590
2590
|
uiStore,
|
|
2591
|
-
typeof block.id === "string" ?
|
|
2591
|
+
typeof block.id === "string" ? unsafeAsEditorBlockId(block.id) : null
|
|
2592
2592
|
);
|
|
2593
2593
|
const contentToUse = baselineContent ?? block.content;
|
|
2594
2594
|
const { displayTitle, showSubtitle } = resolveBlockTitle(
|
|
@@ -3110,7 +3110,7 @@ var BlockEditor = forwardRef(
|
|
|
3110
3110
|
}
|
|
3111
3111
|
}
|
|
3112
3112
|
}
|
|
3113
|
-
fetchContentTypesFromApi();
|
|
3113
|
+
void fetchContentTypesFromApi();
|
|
3114
3114
|
return () => {
|
|
3115
3115
|
cancelled = true;
|
|
3116
3116
|
};
|
|
@@ -3210,7 +3210,7 @@ var BlockEditor = forwardRef(
|
|
|
3210
3210
|
setBlockList(updatedList);
|
|
3211
3211
|
if (uiStore) {
|
|
3212
3212
|
uiStore.getState().history.applyCommand?.({
|
|
3213
|
-
...createEditorRemoveBlockCommand(
|
|
3213
|
+
...createEditorRemoveBlockCommand(unsafeAsEditorBlockId(blockId))
|
|
3214
3214
|
});
|
|
3215
3215
|
}
|
|
3216
3216
|
onBlocksChange?.(updatedList);
|
|
@@ -3272,7 +3272,7 @@ var BlockEditor = forwardRef(
|
|
|
3272
3272
|
if (!firstRecoveryBlockId) {
|
|
3273
3273
|
return;
|
|
3274
3274
|
}
|
|
3275
|
-
uiStore.getState().requestFocus({ blockId:
|
|
3275
|
+
uiStore.getState().requestFocus({ blockId: unsafeAsEditorBlockId(firstRecoveryBlockId) });
|
|
3276
3276
|
}, [
|
|
3277
3277
|
recoveryConflictBlockIds,
|
|
3278
3278
|
recoveryConflictReviewRequestId,
|
|
@@ -3284,7 +3284,7 @@ var BlockEditor = forwardRef(
|
|
|
3284
3284
|
return;
|
|
3285
3285
|
}
|
|
3286
3286
|
const stillExists = blockList.some(
|
|
3287
|
-
(block) => typeof block.id === "string" &&
|
|
3287
|
+
(block) => typeof block.id === "string" && unsafeAsEditorBlockId(block.id) === activeBlockId
|
|
3288
3288
|
);
|
|
3289
3289
|
if (!stillExists) {
|
|
3290
3290
|
uiStore.getState().setActiveBlockId(null);
|
|
@@ -3333,7 +3333,7 @@ var BlockEditor = forwardRef(
|
|
|
3333
3333
|
children: /* @__PURE__ */ jsxs("div", { className: "space-y-0", children: [
|
|
3334
3334
|
allowCreation ? /* @__PURE__ */ jsx(AddBlockDivider, { onOpen: openPicker, position: 0 }) : null,
|
|
3335
3335
|
blockList.map((block, index) => {
|
|
3336
|
-
const focusSignal = focusRequest && block.id && focusRequest.blockId ===
|
|
3336
|
+
const focusSignal = focusRequest && block.id && focusRequest.blockId === unsafeAsEditorBlockId(block.id) ? focusRequest : null;
|
|
3337
3337
|
const collapsed = isCollapsed(block.id);
|
|
3338
3338
|
return /* @__PURE__ */ jsxs(
|
|
3339
3339
|
"div",
|
|
@@ -3365,12 +3365,12 @@ var BlockEditor = forwardRef(
|
|
|
3365
3365
|
if (!block.id) return;
|
|
3366
3366
|
setCollapsed(block.id, nextCollapsed);
|
|
3367
3367
|
if (nextCollapsed) {
|
|
3368
|
-
if (activeBlockId ===
|
|
3368
|
+
if (activeBlockId === unsafeAsEditorBlockId(block.id)) {
|
|
3369
3369
|
uiStore.getState().setActiveBlockId(null);
|
|
3370
3370
|
}
|
|
3371
3371
|
return;
|
|
3372
3372
|
}
|
|
3373
|
-
uiStore.getState().setActiveBlockId(
|
|
3373
|
+
uiStore.getState().setActiveBlockId(unsafeAsEditorBlockId(block.id));
|
|
3374
3374
|
},
|
|
3375
3375
|
highlighted: highlightedBlockId === block.id,
|
|
3376
3376
|
hasRecoveryConflict: typeof block.id === "string" && conflictedBlockIdSet.has(block.id),
|
|
@@ -4589,6 +4589,8 @@ function MediaField({
|
|
|
4589
4589
|
const mediaPickerAutoOpen = config.ui?.mediaPickerAutoOpen === true;
|
|
4590
4590
|
const showMediaPreview = config.ui?.showMediaPreview !== false;
|
|
4591
4591
|
const showMediaOverlayActions = config.ui?.showMediaOverlayActions !== false;
|
|
4592
|
+
const mediaPreviewMaxWidth = config.ui?.mediaPreviewMaxWidth ?? "md";
|
|
4593
|
+
const preventMediaPreviewUpscale = config.ui?.preventMediaPreviewUpscale === true;
|
|
4592
4594
|
const slotContract = resolveMediaSlotContract({
|
|
4593
4595
|
blockKind: blockContext?.blockKind,
|
|
4594
4596
|
fieldPath: path,
|
|
@@ -4626,6 +4628,8 @@ function MediaField({
|
|
|
4626
4628
|
fullWidth: isInlineVariant,
|
|
4627
4629
|
previewVariant: isInlineVariant ? "thumbnail" : "default",
|
|
4628
4630
|
showRemoveAction: !isInlineVariant,
|
|
4631
|
+
previewMaxWidth: mediaPreviewMaxWidth,
|
|
4632
|
+
preventPreviewUpscale: preventMediaPreviewUpscale,
|
|
4629
4633
|
videoPrepIntent: videoPrepIntentForMediaField(
|
|
4630
4634
|
path,
|
|
4631
4635
|
config.mediaKinds
|
|
@@ -4652,6 +4656,8 @@ function FileField({
|
|
|
4652
4656
|
const mediaPickerAutoOpen = config.ui?.mediaPickerAutoOpen === true;
|
|
4653
4657
|
const showMediaPreview = config.ui?.showMediaPreview !== false;
|
|
4654
4658
|
const showMediaOverlayActions = config.ui?.showMediaOverlayActions !== false;
|
|
4659
|
+
const mediaPreviewMaxWidth = config.ui?.mediaPreviewMaxWidth ?? "md";
|
|
4660
|
+
const preventMediaPreviewUpscale = config.ui?.preventMediaPreviewUpscale === true;
|
|
4655
4661
|
const handleChange = (next) => {
|
|
4656
4662
|
emitMediaCropDebug("MediaField", "file_change", {
|
|
4657
4663
|
path,
|
|
@@ -4675,6 +4681,8 @@ function FileField({
|
|
|
4675
4681
|
fullWidth: isInlineVariant,
|
|
4676
4682
|
previewVariant: isInlineVariant ? "thumbnail" : "default",
|
|
4677
4683
|
showRemoveAction: !isInlineVariant,
|
|
4684
|
+
previewMaxWidth: mediaPreviewMaxWidth,
|
|
4685
|
+
preventPreviewUpscale: preventMediaPreviewUpscale,
|
|
4678
4686
|
uploadIntent: uploadIntentForFileField()
|
|
4679
4687
|
}
|
|
4680
4688
|
);
|
|
@@ -5275,7 +5283,7 @@ function PreviewFormProvider({
|
|
|
5275
5283
|
mediaAssets,
|
|
5276
5284
|
children
|
|
5277
5285
|
}) {
|
|
5278
|
-
const siteId = useMemo(() =>
|
|
5286
|
+
const siteId = useMemo(() => expectParsedBrandedId(parseSiteId(rawSiteId)), [rawSiteId]);
|
|
5279
5287
|
const linkAdapters = useMemo(() => createPreviewLinkAdapters(previewClient), [previewClient]);
|
|
5280
5288
|
const entryPickerAdapter = useMemo(() => createPreviewEntryPickerAdapter(previewClient), [previewClient]);
|
|
5281
5289
|
const referenceAdapters = useMemo(
|
|
@@ -7115,7 +7123,7 @@ function PreviewEditorSidebar({
|
|
|
7115
7123
|
const baseline = extractData(
|
|
7116
7124
|
block.content ?? block.draftContent ?? block.publishedContent ?? null
|
|
7117
7125
|
);
|
|
7118
|
-
const blockId =
|
|
7126
|
+
const blockId = unsafeAsEditorBlockId(block.id);
|
|
7119
7127
|
if (drafts.getBlockSnapshot(blockId)) {
|
|
7120
7128
|
drafts.updateBlockBaseline(blockId, baseline, { kind: block.kind });
|
|
7121
7129
|
} else {
|
|
@@ -1,8 +1,8 @@
|
|
|
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-
|
|
5
|
-
import './chunk-
|
|
2
|
+
import { resolvePreviewChromeSurface, usePreviewPageDesignEditorState, PREVIEW_CHROME_PORTAL_CLASS_NAME, PREVIEW_CHROME_THEME_CLASS_NAME, applyPreviewChromeSurfaceToElement, setPreviewSidebarTab, PREVIEW_THEME_COOKIE_NAME } from './chunk-6HYXHRAI.mjs';
|
|
3
|
+
import { useEntryEditorController, useEditorUiStore, useMultiAutosave, EditorChrome, classifyHistoryShortcut, unwrapResponse, cn, Dialog, Button, Palette, DialogContent, DialogHeader, DialogTitle, DialogDescription, TriangleAlert, useEditorUiStoreInstance, Pencil, previewAssistantEnabled, Sparkles } from './chunk-MCRQMPET.mjs';
|
|
4
|
+
import { usePreviewAuth, getDashboardBaseUrl } from './chunk-CR5HKAGU.mjs';
|
|
5
|
+
import './chunk-R7POPVJR.mjs';
|
|
6
6
|
import { useState, useMemo, useEffect, useTransition, useCallback } from 'react';
|
|
7
7
|
import { createPortal } from 'react-dom';
|
|
8
8
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
export { SdkPreviewModeRuntime } from './chunk-RGTOD4AJ.mjs';
|
|
3
|
+
import './chunk-OKMBEAXY.mjs';
|
|
4
|
+
import './chunk-4QEGTLK6.mjs';
|
|
5
|
+
import './chunk-6HYXHRAI.mjs';
|
|
6
|
+
import './chunk-MCRQMPET.mjs';
|
|
7
|
+
import './chunk-CR5HKAGU.mjs';
|
|
8
|
+
import './chunk-R7POPVJR.mjs';
|