@riverbankcms/sdk 0.102.0 → 0.103.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 +10 -2
- package/dist/{PreviewEditorSidebar-BKkhhkJk.mjs → PreviewEditorSidebar-DkNpCPja.mjs} +75 -9
- package/dist/{PreviewEditorUI-DIvTqcqI.mjs → PreviewEditorUI-DeNKtqk3.mjs} +2 -2
- package/dist/{SdkPreviewModeRuntime-CA2k7Z_T.mjs → SdkPreviewModeRuntime-5bCsXK2y.mjs} +572 -285
- package/dist/{SiteChromeCustomizeContext-Bh9-DtMQ.mjs → SiteChromeCustomizeContext-CO1sTK_W.mjs} +336 -36
- package/dist/_dts/ai/src/contracts/proposals.d.ts +298 -298
- package/dist/_dts/api/src/index.d.ts +1 -1
- package/dist/_dts/api/src/navigation/contracts.d.ts +6 -6
- package/dist/_dts/api/src/siteBanner.d.ts +2 -2
- package/dist/_dts/blocks/src/PageRenderer.d.ts +6 -1
- package/dist/_dts/blocks/src/bindings/index.d.ts +2 -2
- package/dist/_dts/blocks/src/index.d.ts +1 -1
- package/dist/_dts/blocks/src/server.d.ts +1 -1
- package/dist/_dts/blocks/src/system/blocks/courses/shared/schemas.d.ts +7 -7
- package/dist/_dts/blocks/src/system/blocks/events/event-calendar.d.ts +1 -1
- package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +14 -14
- package/dist/_dts/blocks/src/system/blocks/location-map.d.ts +5 -5
- package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +227 -227
- package/dist/_dts/blocks/src/system/blocks/offerings-preview/model.d.ts +1 -1
- package/dist/_dts/blocks/src/system/constants/background.d.ts +1 -1
- package/dist/_dts/blocks/src/system/customize/facets.d.ts +2 -2
- package/dist/_dts/blocks/src/system/inlineText.d.ts +2 -2
- package/dist/_dts/blocks/src/system/manifest/schema.d.ts +177 -177
- package/dist/_dts/blocks/src/system/node/schema.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/shared/contract-schemas.d.ts +7 -7
- package/dist/_dts/blocks/src/system/transforms/typed.d.ts +1 -1
- package/dist/_dts/content-model/src/content-types/schema.d.ts +8 -8
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +154 -18
- package/dist/_dts/db/src/schemas/forms.d.ts +15 -15
- package/dist/_dts/preview-next/src/client/blocks/previewProjection/types.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/preview/CustomizeColorTokenPicker.d.ts +27 -0
- package/dist/_dts/preview-next/src/client/preview/PageBlockEditorPanel.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/preview/SiteChromeCustomizeContext.d.ts +10 -2
- package/dist/_dts/preview-next/src/client/preview/sidebarTabPreference.d.ts +1 -1
- package/dist/_dts/preview-next/src/client/preview/siteChromeQuickControlHistoryState.d.ts +16 -1
- package/dist/_dts/preview-next/src/client/preview/siteChromeSavePlan.d.ts +3 -2
- package/dist/_dts/sdk/src/config/validation.d.ts +3 -3
- package/dist/_dts/sdk/src/contracts/index.d.ts +1 -1
- package/dist/_dts/sdk/src/contracts/page.d.ts +2 -0
- package/dist/_dts/sdk/src/manifest/passes/pass1-fields.d.ts +10 -10
- package/dist/_dts/sdk/src/next/revalidate.d.ts +14 -1
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +4 -4
- package/dist/_dts/sdk/src/rendering/blocks-page-renderer.d.ts +2 -1
- package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +3 -2
- package/dist/_dts/sdk/src/rendering/helpers/loadContent.d.ts +3 -4
- package/dist/_dts/sdk/src/rendering/hooks/useContent.d.ts +1 -0
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/site-commands/src/commands.d.ts +19 -19
- package/dist/_dts/theme-core/src/accordions/types.d.ts +3 -3
- package/dist/_dts/theme-core/src/buttons/personalities/types.d.ts +3 -3
- package/dist/_dts/theme-core/src/buttons/types.d.ts +7 -7
- package/dist/_dts/theme-core/src/cards/types.d.ts +6 -6
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/inputs/types.d.ts +4 -4
- package/dist/_dts/theme-core/src/mock-themes/all.d.ts +150 -144
- package/dist/_dts/theme-core/src/navigation/types.d.ts +6 -6
- package/dist/_dts/theme-core/src/palette/variants/types.d.ts +5 -5
- package/dist/_dts/theme-core/src/schema.d.ts +199 -169
- package/dist/_dts/theme-core/src/site-styles/backgroundAppearance.d.ts +2 -2
- package/dist/_dts/theme-core/src/site-styles/contentTemplateRuntimeCompiler.d.ts +2 -1
- package/dist/_dts/theme-core/src/site-styles/designState.d.ts +24 -24
- package/dist/_dts/theme-core/src/site-styles/generatedSchemas.d.ts +2 -2
- package/dist/_dts/theme-core/src/site-styles/index.d.ts +1 -0
- package/dist/_dts/theme-core/src/site-styles/previewCompiler.d.ts +4 -2
- package/dist/_dts/theme-core/src/site-styles/runtimeCompiler.d.ts +26 -1
- package/dist/_dts/theme-core/src/site-styles/sectionTransitions.d.ts +77 -0
- package/dist/_dts/theme-core/src/site-styles/siteChromeNavPreferences.d.ts +44 -0
- package/dist/_dts/theme-core/src/site-styles/styleTags.d.ts +1 -1
- package/dist/_dts/theme-core/src/site-styles/tokenRecipes.d.ts +1 -1
- package/dist/_dts/theme-core/src/tokens/themeColorTokens.d.ts +3 -3
- package/dist/_dts/ui/src/badge.d.ts +1 -1
- package/dist/_dts/ui/src/button.d.ts +1 -1
- package/dist/_dts/ui/src/card.d.ts +1 -1
- package/dist/_dts/ui/src/toggle.d.ts +2 -2
- package/dist/cli/index.mjs +28 -7
- package/dist/cli/init-docs/content/workflow-isr-revalidation.md +9 -1
- package/dist/client/client.mjs +337 -69
- package/dist/client/hooks.mjs +13 -1
- package/dist/client/rendering/client.mjs +25 -4
- package/dist/client/rendering.mjs +336 -68
- package/dist/preview-next/client/runtime.mjs +3 -3
- package/dist/{sdk-runtime-K8Oqj97H.mjs → sdk-runtime-C8whifOy.mjs} +1 -1
- package/dist/{separator-CRoP34pT.mjs → separator-CM2C5Axs.mjs} +1 -1
- package/dist/server/components.mjs +321 -65
- package/dist/server/config-validation.mjs +12 -1
- package/dist/server/config.mjs +12 -1
- package/dist/server/data.mjs +12 -1
- package/dist/server/index.mjs +1 -1
- package/dist/server/next/revalidate.mjs +31 -1
- package/dist/server/next.mjs +325 -66
- package/dist/server/page-converter.mjs +12 -1
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +323 -65
- package/dist/server/rendering.mjs +323 -65
- package/dist/server/routing.mjs +24 -3
- package/dist/server/server.mjs +15 -2
- package/dist/server/theme-bridge.mjs +153 -32
- package/dist/server/theme.mjs +2 -0
- package/dist/styles/index.css +123 -30
- package/package.json +1 -1
package/dist/cli/index.mjs
CHANGED
|
@@ -18963,6 +18963,8 @@ var init_schema = __esmMin((() => {
|
|
|
18963
18963
|
navStyle: headerNavStyle,
|
|
18964
18964
|
navColor: themeColorTokenSchema.nullable().optional(),
|
|
18965
18965
|
navWeight: navFontWeight.default("medium"),
|
|
18966
|
+
navTypography: z$1.enum(["body", "heading"]).optional(),
|
|
18967
|
+
navTextSize: navLinkStyleSchema.shape.textSize,
|
|
18966
18968
|
container: headerContainerSchema,
|
|
18967
18969
|
border: headerBorderSchema,
|
|
18968
18970
|
shadow: componentShadowSchema.optional(),
|
|
@@ -20627,9 +20629,22 @@ var init_backgroundAppearance = __esmMin((() => {
|
|
|
20627
20629
|
}));
|
|
20628
20630
|
var init_compositionBudget = __esmMin((() => {
|
|
20629
20631
|
init_types$17();
|
|
20630
|
-
}))
|
|
20632
|
+
}));
|
|
20633
|
+
var init_schemaVersionedJson = __esmMin((() => {}));
|
|
20634
|
+
//#endregion
|
|
20635
|
+
//#region ../theme-core/src/site-styles/sectionTransitions.ts
|
|
20636
|
+
function boundaryRuntimeMetrics(family, size, heightExpression) {
|
|
20637
|
+
return {
|
|
20638
|
+
family,
|
|
20639
|
+
size,
|
|
20640
|
+
heightCss: heightExpression.includes(" ") ? `calc(${heightExpression})` : heightExpression,
|
|
20641
|
+
reserveCss: `calc((${heightExpression}) / 2)`
|
|
20642
|
+
};
|
|
20643
|
+
}
|
|
20644
|
+
var noneBoundaryOption, softBoundaryOption, spaciousBoundaryOption;
|
|
20631
20645
|
var init_sectionTransitions = __esmMin((() => {
|
|
20632
20646
|
init_types$17();
|
|
20647
|
+
boundaryRuntimeMetrics("gradient", "medium", "6rem + 2px"), boundaryRuntimeMetrics("gradient", "spacious", "10rem"), boundaryRuntimeMetrics("gradient", "expansive", "14rem"), boundaryRuntimeMetrics("wave", "medium", "6rem + 2px"), boundaryRuntimeMetrics("wave", "medium", "6rem + 2px"), boundaryRuntimeMetrics("wave", "compact", "4.5rem + 2px"), boundaryRuntimeMetrics("wave", "large", "7rem + 2px"), boundaryRuntimeMetrics("wave", "medium", "6rem + 2px"), boundaryRuntimeMetrics("angle", "medium", "6rem + 2px"), boundaryRuntimeMetrics("angle", "compact", "4.5rem + 2px"), boundaryRuntimeMetrics("angle", "large", "7rem + 2px");
|
|
20633
20648
|
noneBoundaryOption = {
|
|
20634
20649
|
id: asBoundaryOptionId("break:none"),
|
|
20635
20650
|
label: "None",
|
|
@@ -20694,12 +20709,12 @@ function validateUniquePageDesignPins(intent, ctx) {
|
|
|
20694
20709
|
label: "block Look pin"
|
|
20695
20710
|
});
|
|
20696
20711
|
addDuplicateStringIssues(ctx, {
|
|
20697
|
-
values: intent.boundaryPins.map((pin) => boundaryKey(pin.previousBlockId, pin.nextBlockId)),
|
|
20712
|
+
values: intent.boundaryPins.map((pin) => boundaryKey$1(pin.previousBlockId, pin.nextBlockId)),
|
|
20698
20713
|
path: ["boundaryPins"],
|
|
20699
20714
|
label: "boundary pin"
|
|
20700
20715
|
});
|
|
20701
20716
|
}
|
|
20702
|
-
function boundaryKey(previousBlockId, nextBlockId) {
|
|
20717
|
+
function boundaryKey$1(previousBlockId, nextBlockId) {
|
|
20703
20718
|
return makeBoundaryId(previousBlockId, nextBlockId);
|
|
20704
20719
|
}
|
|
20705
20720
|
var pageDesignUserPinnedAppearanceChoiceSchema, pageDesignUserPinnedBoundaryChoiceSchema, pageDesignBoundaryTreatmentSchema, pageDesignUserPinnedBoundaryTreatmentChoiceSchema, pageDesignBlockLookPinSchema, pageDesignBoundaryPinSchema, legacyPageDesignBoundaryPinSchema;
|
|
@@ -21147,7 +21162,7 @@ function asHeaderStyleId(value) {
|
|
|
21147
21162
|
* optional nested styling fields that would otherwise leak from another Look.
|
|
21148
21163
|
*/
|
|
21149
21164
|
function baseHeader(theme) {
|
|
21150
|
-
const { navLinkStyle: _navLinkStyle, dropdownStyle: _dropdownStyle, ctaVariant: _ctaVariant, navContainer: _navContainer, container: _container, shadow: _shadow, logo: _logo, logoText: _logoText, border: _border, ...header } = theme.header;
|
|
21165
|
+
const { navLinkStyle: _navLinkStyle, navTypography: _navTypography, navTextSize: _navTextSize, dropdownStyle: _dropdownStyle, ctaVariant: _ctaVariant, navContainer: _navContainer, container: _container, shadow: _shadow, logo: _logo, logoText: _logoText, border: _border, ...header } = theme.header;
|
|
21151
21166
|
return {
|
|
21152
21167
|
...header,
|
|
21153
21168
|
navContainer: {
|
|
@@ -23298,6 +23313,7 @@ var init_runtimeCompiler = __esmMin((() => {
|
|
|
23298
23313
|
init_designState();
|
|
23299
23314
|
init_types$17();
|
|
23300
23315
|
init_accessibleSurfaces();
|
|
23316
|
+
init_sectionTransitions();
|
|
23301
23317
|
defaultDesignRuntimeRules = defineDesignRuntimeRules({
|
|
23302
23318
|
sectionSurfaces: {
|
|
23303
23319
|
base: {},
|
|
@@ -25095,13 +25111,15 @@ function toSiteChromeBackgroundColorTokens(tokenNames) {
|
|
|
25095
25111
|
return token ? [token] : [];
|
|
25096
25112
|
});
|
|
25097
25113
|
}
|
|
25098
|
-
var siteChromeBackgroundColorTokens, quickSiteChromeBackgroundColorTokens
|
|
25114
|
+
var siteChromeBackgroundColorTokens, quickSiteChromeBackgroundColorTokens;
|
|
25115
|
+
var init_siteChromeBackgrounds = __esmMin((() => {
|
|
25099
25116
|
init_backgroundAppearance();
|
|
25100
25117
|
init_rawStyleFields();
|
|
25101
25118
|
siteChromeBackgroundColorTokens = toSiteChromeBackgroundColorTokens(backgroundAppearanceColorTokenNames);
|
|
25102
25119
|
quickSiteChromeBackgroundColorTokens = toSiteChromeBackgroundColorTokens(backgroundAppearanceQuickColorTokenNames);
|
|
25103
25120
|
siteChromeBackgroundColorTokens.filter((token) => !quickSiteChromeBackgroundColorTokens.includes(token));
|
|
25104
|
-
}))
|
|
25121
|
+
}));
|
|
25122
|
+
var init_siteChromeNavPreferences = __esmMin((() => {})), themeTokenRecipeOptions;
|
|
25105
25123
|
var init_tokenRecipes = __esmMin((() => {
|
|
25106
25124
|
themeTokenRecipeOptions = {
|
|
25107
25125
|
palette: [
|
|
@@ -25186,6 +25204,7 @@ var init_site_styles = __esmMin((() => {
|
|
|
25186
25204
|
init_runtimeCompiler();
|
|
25187
25205
|
init_sectionTransitions();
|
|
25188
25206
|
init_siteChromeBackgrounds();
|
|
25207
|
+
init_siteChromeNavPreferences();
|
|
25189
25208
|
init_siteStyleThemeCompiler();
|
|
25190
25209
|
init_siteStyleBlockPolicies();
|
|
25191
25210
|
init_sourceCatalogs();
|
|
@@ -59459,6 +59478,7 @@ var init_navDropdownSizing = __esmMin((() => {
|
|
|
59459
59478
|
//#endregion
|
|
59460
59479
|
//#region ../theme-core/src/header/generateHeaderCss.ts
|
|
59461
59480
|
init_resolver$1();
|
|
59481
|
+
init_siteChromeNavPreferences();
|
|
59462
59482
|
init_shared$5();
|
|
59463
59483
|
init_breakpoints();
|
|
59464
59484
|
init_navDropdownSizing();
|
|
@@ -59468,6 +59488,7 @@ init_resolver$1();
|
|
|
59468
59488
|
//#endregion
|
|
59469
59489
|
//#region ../theme-core/src/layout/generateLayoutCss.ts
|
|
59470
59490
|
init_breakpoints();
|
|
59491
|
+
init_sectionTransitions();
|
|
59471
59492
|
svgDataUrl("<svg viewBox='0 0 1440 72' xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none'><path d='M0 72V46C130 55 260 24 420 30C590 36 690 62 860 42C1035 21 1160 47 1305 36C1365 31 1415 33 1440 38V72H0Z' fill='white'/></svg>");
|
|
59472
59493
|
svgDataUrl("<svg viewBox='0 0 1440 72' xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none'><path d='M0 72V42C120 24 240 24 360 42C480 60 600 60 720 42C840 24 960 24 1080 42C1200 60 1320 60 1440 42V72H0Z' fill='white'/></svg>");
|
|
59473
59494
|
svgDataUrl("<svg viewBox='0 0 1440 72' xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none'><path d='M0 72V43C180 32 300 32 480 43C660 54 780 54 960 43C1140 32 1260 32 1440 43V72H0Z' fill='white'/></svg>");
|
|
@@ -151458,7 +151479,7 @@ var SimpleCache = class {
|
|
|
151458
151479
|
* 1. This constant
|
|
151459
151480
|
* 2. The "version" field in package.json
|
|
151460
151481
|
*/
|
|
151461
|
-
const SDK_VERSION = "0.
|
|
151482
|
+
const SDK_VERSION = "0.103.0";
|
|
151462
151483
|
//#endregion
|
|
151463
151484
|
//#region src/client/error.ts
|
|
151464
151485
|
/**
|
|
@@ -80,8 +80,11 @@ Create `src/app/api/revalidate/route.ts`:
|
|
|
80
80
|
|
|
81
81
|
```ts
|
|
82
82
|
import { createRevalidateHandler } from '@riverbankcms/sdk/next/revalidate'
|
|
83
|
+
import { getRiverbankClient } from '@/lib/riverbank-client'
|
|
83
84
|
|
|
84
|
-
export const POST = createRevalidateHandler(
|
|
85
|
+
export const POST = createRevalidateHandler({
|
|
86
|
+
getClient: getRiverbankClient,
|
|
87
|
+
})
|
|
85
88
|
```
|
|
86
89
|
|
|
87
90
|
The deployed site must have the CMS-generated webhook secret:
|
|
@@ -98,10 +101,13 @@ X-Riverbank-Signature: sha256=<hex HMAC-SHA256 digest>
|
|
|
98
101
|
|
|
99
102
|
The digest is computed over the raw JSON body. The SDK handler rejects unsigned requests, plain hex signatures without the `sha256=` prefix, malformed digests, bad signatures, and invalid payloads. Malformed path entries are skipped and reported in the response metadata while valid tags and paths still revalidate.
|
|
100
103
|
|
|
104
|
+
Passing `getClient: getRiverbankClient` also clears the current process's SDK client response cache after valid webhooks. This is useful in single-process deployments, `next dev`, `next start`, and runtimes where the revalidation route and render path share the same module instance. On serverless platforms such as Vercel, `/api/revalidate` and page rendering can run in separate functions and many warm containers, so this process-local cache clear is best-effort only. Use Next tag/path revalidation as the cross-instance freshness layer, and disable or shorten SDK response caching for force-dynamic deployments that need immediate freshness across serverless instances.
|
|
105
|
+
|
|
101
106
|
Riverbank includes a `dispatchId` in signed payloads and sends matching `X-Riverbank-Dispatch-Id` / `X-Riverbank-Correlation-Id` headers. To join CMS delivery logs with this site's deployment logs, use the optional callback metadata:
|
|
102
107
|
|
|
103
108
|
```ts
|
|
104
109
|
export const POST = createRevalidateHandler({
|
|
110
|
+
getClient: getRiverbankClient,
|
|
105
111
|
onRevalidate: (_payload, _items, metadata) => {
|
|
106
112
|
console.info('Riverbank ISR revalidated', metadata)
|
|
107
113
|
},
|
|
@@ -122,6 +128,8 @@ riverbankcms webhooks setup \
|
|
|
122
128
|
|
|
123
129
|
The command keeps the CMS as the source of truth for the webhook secret. It creates or updates the endpoint, ensures the full SDK revalidation event list is subscribed, writes a newly generated one-time secret to `.env.local` when one is returned, and prints hosted-environment and deploy/test steps. Existing endpoint secrets are not returned or changed unless you pass `--rotate-secret`.
|
|
124
130
|
|
|
131
|
+
The deployed SDK site uses the returned one-time `RIVERBANK_WEBHOOK_SECRET`. The dashboard/CMS uses a separate `WEBHOOK_SIGNING_SECRET_KEYRING_JSON` environment variable to encrypt stored endpoint secrets; keep that keyring only in the dashboard environment.
|
|
132
|
+
|
|
125
133
|
The same destination URL can also be configured from the Riverbank dashboard:
|
|
126
134
|
|
|
127
135
|
```text
|