@riverbankcms/sdk 0.60.0 → 0.60.1
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 +20 -3
- package/dist/_dts/api/src/bookingManagementEndpoints.d.ts +1 -3
- package/dist/_dts/api/src/bookingRecords.d.ts +1 -0
- package/dist/_dts/api/src/endpoints.d.ts +1 -1
- package/dist/_dts/billing/src/plans/types.d.ts +27 -0
- package/dist/_dts/blocks/src/system/blocks/events/event-calendar.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +173 -2
- package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +24 -2
- package/dist/_dts/blocks/src/system/runtime/header/shared.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.client.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/AgendaEventCard.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/DayEventsModal.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/EventDetailModal.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/EventModals.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/WeekAgendaView.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/WeekTimetableView.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventCapacity.d.ts +16 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/timetableModel.d.ts +2 -0
- package/dist/_dts/content-editor/src/index.d.ts +2 -2
- package/dist/_dts/content-editor/src/primitives/shared/activePreviewField.d.ts +9 -0
- package/dist/_dts/content-editor/src/primitives/shared/index.d.ts +1 -0
- package/dist/_dts/content-editor/src/ui/editorUiStore.d.ts +10 -0
- package/dist/_dts/editor-blocks/src/BlockEditor.d.ts +3 -0
- package/dist/_dts/editor-blocks/src/BlockForm.d.ts +4 -0
- package/dist/_dts/editor-blocks/src/block-editor/BlockCard.d.ts +8 -5
- package/dist/_dts/editor-blocks/src/block-editor/BlockCardHeader.d.ts +7 -5
- package/dist/_dts/editor-blocks/src/block-editor/SortableBlockItem.d.ts +2 -0
- package/dist/_dts/editor-blocks/src/block-editor/reorderControlMode.d.ts +3 -0
- package/dist/_dts/editor-blocks/src/block-editor/types.d.ts +4 -0
- package/dist/_dts/media-react/src/hooks/useApiMediaUploader.d.ts +14 -0
- package/dist/_dts/media-react/src/index.d.ts +1 -1
- package/dist/_dts/preview-next/src/client/index.d.ts +2 -0
- package/dist/_dts/preview-next/src/client/preview/PageDesignEditorStateContext.d.ts +11 -28
- package/dist/_dts/preview-next/src/client/preview/PreviewEditorUI.d.ts +1 -1
- package/dist/_dts/preview-next/src/client/preview/previewChromeSurface.d.ts +12 -0
- package/dist/_dts/preview-next/src/client/preview/previewCustomizeHistory.d.ts +41 -0
- package/dist/_dts/preview-next/src/client/preview/previewCustomizeRuntimePatch.d.ts +15 -0
- package/dist/_dts/preview-next/src/client/preview/previewCustomizeWorkflowState.d.ts +106 -0
- package/dist/_dts/preview-next/src/client/preview/previewUndoDomains.d.ts +34 -0
- package/dist/_dts/preview-next/src/client/preview/sidebarTabPreference.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/preview/useOnboardingConfirmationCheck.d.ts +4 -9
- package/dist/_dts/preview-next/src/constants.d.ts +0 -1
- package/dist/_dts/preview-next/src/index.d.ts +1 -0
- package/dist/_dts/preview-next/src/onboarding-preview-planner.d.ts +89 -0
- package/dist/_dts/preview-next/src/route-contract.d.ts +37 -0
- package/dist/_dts/sdk/src/rendering/components/Block.d.ts +7 -76
- package/dist/_dts/sdk/src/rendering/components/Block.server.d.ts +9 -0
- package/dist/_dts/sdk/src/rendering/components/Block.shared.d.ts +78 -0
- package/dist/_dts/sdk/src/rendering/components/Layout.d.ts +5 -5
- package/dist/_dts/sdk/src/rendering/server.d.ts +2 -2
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/index.d.ts +17 -16
- package/dist/_dts/theme-core/src/responsiveDisplay.d.ts +23 -0
- package/dist/_dts/theme-core/src/responsiveMode.d.ts +21 -0
- package/dist/_dts/theme-core/src/site-styles/index.d.ts +1 -0
- package/dist/_dts/theme-core/src/site-styles/pageDesignEditorErrors.d.ts +1 -0
- package/dist/_dts/ui/src/command-multi-select.d.ts +2 -2
- package/dist/cli/index.mjs +120 -40
- package/dist/client/bookings.mjs +27 -0
- package/dist/client/client.mjs +889 -497
- package/dist/client/hooks.mjs +61 -21
- package/dist/client/rendering/client.mjs +319 -128
- package/dist/client/rendering/islands.mjs +122 -44
- package/dist/client/rendering.mjs +959 -486
- package/dist/preview-next/before-render.mjs +5525 -0
- package/dist/preview-next/client/runtime.mjs +104162 -102561
- package/dist/preview-next/constants.mjs +0 -2
- package/dist/preview-next/index.mjs +0 -2
- package/dist/preview-next/middleware.mjs +5535 -1
- package/dist/server/components.mjs +7880 -7522
- package/dist/server/config-validation.mjs +61 -21
- package/dist/server/config.mjs +61 -21
- package/dist/server/data.mjs +61 -21
- package/dist/server/index.mjs +2 -2
- package/dist/server/next.mjs +783 -429
- package/dist/server/page-converter.mjs +60 -20
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +2461 -837
- package/dist/server/rendering.mjs +9276 -8840
- package/dist/server/routing.mjs +102 -39
- package/dist/server/server.mjs +62 -22
- package/dist/server/theme-bridge.mjs +639 -358
- package/dist/styles/index.css +343 -299
- package/package.json +1 -1
- package/dist/_dts/preview-next/src/client/blocks/runOptimisticCustomizeAction.d.ts +0 -21
|
@@ -1,79 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Block component for
|
|
2
|
+
* Default Block renderer component for Riverbank CMS.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
4
|
+
* This surface restores the common SDK behavior where rendering a block also
|
|
5
|
+
* boots interactive CMS islands automatically. For a bootstrap-free surface,
|
|
6
|
+
* use `@riverbankcms/sdk/rendering/server`.
|
|
5
7
|
*/
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
import type { BlockKind } from '../../types';
|
|
10
|
-
/**
|
|
11
|
-
* Override component for custom block rendering.
|
|
12
|
-
* Receives the same props as default block components.
|
|
13
|
-
*/
|
|
14
|
-
export type BlockOverrideComponent = React.ComponentType<{
|
|
15
|
-
content: Record<string, unknown>;
|
|
16
|
-
theme?: ThemeTokens;
|
|
17
|
-
themeConfig?: Theme;
|
|
18
|
-
data?: Record<string, unknown>;
|
|
19
|
-
blockId?: string | null;
|
|
20
|
-
blockKind?: BlockKind;
|
|
21
|
-
}>;
|
|
22
|
-
export type BlockProps = {
|
|
23
|
-
blockKind: BlockKind;
|
|
24
|
-
blockId?: string | null;
|
|
25
|
-
content: Record<string, unknown>;
|
|
26
|
-
theme: Theme;
|
|
27
|
-
siteId: string;
|
|
28
|
-
pageId?: string;
|
|
29
|
-
previewStage?: 'published' | 'preview';
|
|
30
|
-
client?: RiverbankClient;
|
|
31
|
-
usePlaceholders?: boolean;
|
|
32
|
-
/**
|
|
33
|
-
* Custom component to override default block rendering.
|
|
34
|
-
* When provided, renders this component instead of the manifest-based default.
|
|
35
|
-
* This is SSR-safe - no context or hooks required.
|
|
36
|
-
*
|
|
37
|
-
* @example
|
|
38
|
-
* ```tsx
|
|
39
|
-
* <Block
|
|
40
|
-
* blockKind="block.hero"
|
|
41
|
-
* content={heroContent}
|
|
42
|
-
* theme={theme}
|
|
43
|
-
* siteId={siteId}
|
|
44
|
-
* override={MyCustomHero}
|
|
45
|
-
* />
|
|
46
|
-
* ```
|
|
47
|
-
*/
|
|
48
|
-
override?: BlockOverrideComponent;
|
|
49
|
-
};
|
|
50
|
-
/**
|
|
51
|
-
* Renders a single CMS block with optional data loading.
|
|
52
|
-
*
|
|
53
|
-
* Use this component when you want to render individual blocks outside of a full page context,
|
|
54
|
-
* or when mixing CMS blocks with custom JSX.
|
|
55
|
-
*
|
|
56
|
-
* @example Basic usage
|
|
57
|
-
* ```tsx
|
|
58
|
-
* <Block
|
|
59
|
-
* blockKind="block.hero"
|
|
60
|
-
* content={{ headline: 'Welcome', subheadline: 'To our site' }}
|
|
61
|
-
* theme={theme}
|
|
62
|
-
* siteId="site-123"
|
|
63
|
-
* />
|
|
64
|
-
* ```
|
|
65
|
-
*
|
|
66
|
-
* @example With data loading
|
|
67
|
-
* ```tsx
|
|
68
|
-
* <Block
|
|
69
|
-
* blockKind="block.blog-listing"
|
|
70
|
-
* blockId="block-456"
|
|
71
|
-
* content={blockContent}
|
|
72
|
-
* theme={theme}
|
|
73
|
-
* siteId="site-123"
|
|
74
|
-
* pageId="page-789"
|
|
75
|
-
* client={client}
|
|
76
|
-
* />
|
|
77
|
-
* ```
|
|
78
|
-
*/
|
|
79
|
-
export declare function Block({ blockKind, blockId, content, theme, siteId, pageId, previewStage, client, usePlaceholders: _usePlaceholders, override: OverrideComponent, }: BlockProps): Promise<import("react/jsx-runtime").JSX.Element>;
|
|
8
|
+
import { type BlockProps } from './Block.shared';
|
|
9
|
+
export type { BlockOverrideComponent, BlockProps } from './Block.shared';
|
|
10
|
+
export declare function Block(props: BlockProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Server-only Block renderer for Riverbank CMS.
|
|
3
|
+
*
|
|
4
|
+
* This stays server-safe by delegating to the shared `BlockContent` renderer
|
|
5
|
+
* without pulling the client hydration bootstrap into the server entrypoint.
|
|
6
|
+
*/
|
|
7
|
+
import { type BlockProps } from './Block.shared';
|
|
8
|
+
export type { BlockOverrideComponent, BlockProps } from './Block.shared';
|
|
9
|
+
export declare function Block(props: BlockProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared Block rendering implementation.
|
|
3
|
+
*
|
|
4
|
+
* The default `@riverbankcms/sdk/rendering` surface wraps this with island
|
|
5
|
+
* hydration; the strict `@riverbankcms/sdk/rendering/server` surface exports it
|
|
6
|
+
* directly.
|
|
7
|
+
*/
|
|
8
|
+
import * as React from 'react';
|
|
9
|
+
import type { MediaAssetIndexItem, RouteMap, Theme } from '../../contracts';
|
|
10
|
+
import type { RiverbankClient } from '../../client/types';
|
|
11
|
+
import type { BlockKind } from '../../types';
|
|
12
|
+
import type { BlockOverrideComponent } from '../overrides';
|
|
13
|
+
export type { BlockOverrideComponent } from '../overrides';
|
|
14
|
+
export type BlockProps = {
|
|
15
|
+
blockKind: BlockKind;
|
|
16
|
+
blockId?: string | null;
|
|
17
|
+
content: Record<string, unknown>;
|
|
18
|
+
theme: Theme;
|
|
19
|
+
siteId?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Supabase storage URL for direct image access in SSR output and client
|
|
22
|
+
* islands.
|
|
23
|
+
*/
|
|
24
|
+
supabaseUrl?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Canonical media sidecar for resolving identifier-only media values.
|
|
27
|
+
*/
|
|
28
|
+
mediaAssets?: readonly MediaAssetIndexItem[];
|
|
29
|
+
/**
|
|
30
|
+
* Base URL for the CMS API. Interactive blocks need this for client-side
|
|
31
|
+
* form, booking, event, and commerce calls.
|
|
32
|
+
*/
|
|
33
|
+
apiBaseUrl?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Portal token for customer portal Bearer auth.
|
|
36
|
+
*/
|
|
37
|
+
portalToken?: string | null;
|
|
38
|
+
/** Route lookup for CMS links inside block content. */
|
|
39
|
+
routeMap?: RouteMap;
|
|
40
|
+
/** Page identifier to routeId lookup for { kind: 'page' } links. */
|
|
41
|
+
pagesByIdentifier?: Record<string, string>;
|
|
42
|
+
/** ContentType -> identifier -> routeId lookup for { kind: 'entry' } links. */
|
|
43
|
+
entriesByIdentifier?: Record<string, Record<string, string>>;
|
|
44
|
+
pageId?: string;
|
|
45
|
+
previewStage?: 'published' | 'preview';
|
|
46
|
+
client?: RiverbankClient;
|
|
47
|
+
usePlaceholders?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Custom component to override default block rendering. When provided, renders
|
|
50
|
+
* this component instead of the manifest-based default. Override components
|
|
51
|
+
* receive the same serializable runtime context as page-level block overrides.
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* ```tsx
|
|
55
|
+
* <Block
|
|
56
|
+
* blockKind="block.hero"
|
|
57
|
+
* content={heroContent}
|
|
58
|
+
* theme={theme}
|
|
59
|
+
* siteId={siteId}
|
|
60
|
+
* override={MyCustomHero}
|
|
61
|
+
* />
|
|
62
|
+
* ```
|
|
63
|
+
*/
|
|
64
|
+
override?: BlockOverrideComponent;
|
|
65
|
+
};
|
|
66
|
+
export type BlockHydrationBootstrapConfig = {
|
|
67
|
+
siteId?: string;
|
|
68
|
+
supabaseUrl?: string;
|
|
69
|
+
mediaAssets?: readonly MediaAssetIndexItem[];
|
|
70
|
+
};
|
|
71
|
+
export declare function toBlockHydrationBootstrapConfig(props: Pick<BlockProps, 'siteId' | 'supabaseUrl' | 'mediaAssets'>): BlockHydrationBootstrapConfig;
|
|
72
|
+
/**
|
|
73
|
+
* Renders a single CMS block with optional data loading.
|
|
74
|
+
*
|
|
75
|
+
* Use this component when you want to render individual blocks outside of a full page context,
|
|
76
|
+
* or when mixing CMS blocks with custom JSX.
|
|
77
|
+
*/
|
|
78
|
+
export declare function BlockContent(props: BlockProps): Promise<React.ReactElement<unknown, string | React.JSXElementConstructor<any>>>;
|
|
@@ -54,11 +54,11 @@ export type LayoutProps = {
|
|
|
54
54
|
* Layout component that wraps content with site header and footer.
|
|
55
55
|
*
|
|
56
56
|
* This is a server/RSC-safe component. The default `@riverbankcms/sdk/rendering`
|
|
57
|
-
* `Page`
|
|
58
|
-
* `@riverbankcms/sdk/rendering/server` surface stays bootstrap-free.
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
* explicitly.
|
|
57
|
+
* `Page` and `Block` surfaces mount CMS island hydration automatically, while
|
|
58
|
+
* the strict `@riverbankcms/sdk/rendering/server` surface stays bootstrap-free.
|
|
59
|
+
* If a custom host renders hydratable CMS islands through the strict server
|
|
60
|
+
* surface, mount `BlocksIslandsHydrator` from
|
|
61
|
+
* `@riverbankcms/sdk/rendering/client` explicitly.
|
|
62
62
|
*
|
|
63
63
|
* @example With pre-fetched site data (recommended)
|
|
64
64
|
* ```tsx
|
|
@@ -6,5 +6,5 @@ export { Page } from './components/Page.server';
|
|
|
6
6
|
export type { PageProps } from './components/Page.server';
|
|
7
7
|
export { Layout } from './components/Layout';
|
|
8
8
|
export type { LayoutProps, HeaderData, FooterData } from './components/Layout';
|
|
9
|
-
export { Block } from './components/Block';
|
|
10
|
-
export type { BlockProps } from './components/Block';
|
|
9
|
+
export { Block } from './components/Block.server';
|
|
10
|
+
export type { BlockProps } from './components/Block.server';
|