@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.
Files changed (101) hide show
  1. package/README.md +10 -2
  2. package/dist/{PreviewEditorSidebar-BKkhhkJk.mjs → PreviewEditorSidebar-DkNpCPja.mjs} +75 -9
  3. package/dist/{PreviewEditorUI-DIvTqcqI.mjs → PreviewEditorUI-DeNKtqk3.mjs} +2 -2
  4. package/dist/{SdkPreviewModeRuntime-CA2k7Z_T.mjs → SdkPreviewModeRuntime-5bCsXK2y.mjs} +572 -285
  5. package/dist/{SiteChromeCustomizeContext-Bh9-DtMQ.mjs → SiteChromeCustomizeContext-CO1sTK_W.mjs} +336 -36
  6. package/dist/_dts/ai/src/contracts/proposals.d.ts +298 -298
  7. package/dist/_dts/api/src/index.d.ts +1 -1
  8. package/dist/_dts/api/src/navigation/contracts.d.ts +6 -6
  9. package/dist/_dts/api/src/siteBanner.d.ts +2 -2
  10. package/dist/_dts/blocks/src/PageRenderer.d.ts +6 -1
  11. package/dist/_dts/blocks/src/bindings/index.d.ts +2 -2
  12. package/dist/_dts/blocks/src/index.d.ts +1 -1
  13. package/dist/_dts/blocks/src/server.d.ts +1 -1
  14. package/dist/_dts/blocks/src/system/blocks/courses/shared/schemas.d.ts +7 -7
  15. package/dist/_dts/blocks/src/system/blocks/events/event-calendar.d.ts +1 -1
  16. package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +14 -14
  17. package/dist/_dts/blocks/src/system/blocks/location-map.d.ts +5 -5
  18. package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +227 -227
  19. package/dist/_dts/blocks/src/system/blocks/offerings-preview/model.d.ts +1 -1
  20. package/dist/_dts/blocks/src/system/constants/background.d.ts +1 -1
  21. package/dist/_dts/blocks/src/system/customize/facets.d.ts +2 -2
  22. package/dist/_dts/blocks/src/system/inlineText.d.ts +2 -2
  23. package/dist/_dts/blocks/src/system/manifest/schema.d.ts +177 -177
  24. package/dist/_dts/blocks/src/system/node/schema.d.ts +1 -1
  25. package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +1 -1
  26. package/dist/_dts/blocks/src/system/runtime/nodes/shared/contract-schemas.d.ts +7 -7
  27. package/dist/_dts/blocks/src/system/transforms/typed.d.ts +1 -1
  28. package/dist/_dts/content-model/src/content-types/schema.d.ts +8 -8
  29. package/dist/_dts/db/src/generated/supabase/database.types.d.ts +154 -18
  30. package/dist/_dts/db/src/schemas/forms.d.ts +15 -15
  31. package/dist/_dts/preview-next/src/client/blocks/previewProjection/types.d.ts +2 -1
  32. package/dist/_dts/preview-next/src/client/preview/CustomizeColorTokenPicker.d.ts +27 -0
  33. package/dist/_dts/preview-next/src/client/preview/PageBlockEditorPanel.d.ts +2 -1
  34. package/dist/_dts/preview-next/src/client/preview/SiteChromeCustomizeContext.d.ts +10 -2
  35. package/dist/_dts/preview-next/src/client/preview/sidebarTabPreference.d.ts +1 -1
  36. package/dist/_dts/preview-next/src/client/preview/siteChromeQuickControlHistoryState.d.ts +16 -1
  37. package/dist/_dts/preview-next/src/client/preview/siteChromeSavePlan.d.ts +3 -2
  38. package/dist/_dts/sdk/src/config/validation.d.ts +3 -3
  39. package/dist/_dts/sdk/src/contracts/index.d.ts +1 -1
  40. package/dist/_dts/sdk/src/contracts/page.d.ts +2 -0
  41. package/dist/_dts/sdk/src/manifest/passes/pass1-fields.d.ts +10 -10
  42. package/dist/_dts/sdk/src/next/revalidate.d.ts +14 -1
  43. package/dist/_dts/sdk/src/public-api/contracts.d.ts +4 -4
  44. package/dist/_dts/sdk/src/rendering/blocks-page-renderer.d.ts +2 -1
  45. package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +3 -2
  46. package/dist/_dts/sdk/src/rendering/helpers/loadContent.d.ts +3 -4
  47. package/dist/_dts/sdk/src/rendering/hooks/useContent.d.ts +1 -0
  48. package/dist/_dts/sdk/src/version.d.ts +1 -1
  49. package/dist/_dts/site-commands/src/commands.d.ts +19 -19
  50. package/dist/_dts/theme-core/src/accordions/types.d.ts +3 -3
  51. package/dist/_dts/theme-core/src/buttons/personalities/types.d.ts +3 -3
  52. package/dist/_dts/theme-core/src/buttons/types.d.ts +7 -7
  53. package/dist/_dts/theme-core/src/cards/types.d.ts +6 -6
  54. package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
  55. package/dist/_dts/theme-core/src/inputs/types.d.ts +4 -4
  56. package/dist/_dts/theme-core/src/mock-themes/all.d.ts +150 -144
  57. package/dist/_dts/theme-core/src/navigation/types.d.ts +6 -6
  58. package/dist/_dts/theme-core/src/palette/variants/types.d.ts +5 -5
  59. package/dist/_dts/theme-core/src/schema.d.ts +199 -169
  60. package/dist/_dts/theme-core/src/site-styles/backgroundAppearance.d.ts +2 -2
  61. package/dist/_dts/theme-core/src/site-styles/contentTemplateRuntimeCompiler.d.ts +2 -1
  62. package/dist/_dts/theme-core/src/site-styles/designState.d.ts +24 -24
  63. package/dist/_dts/theme-core/src/site-styles/generatedSchemas.d.ts +2 -2
  64. package/dist/_dts/theme-core/src/site-styles/index.d.ts +1 -0
  65. package/dist/_dts/theme-core/src/site-styles/previewCompiler.d.ts +4 -2
  66. package/dist/_dts/theme-core/src/site-styles/runtimeCompiler.d.ts +26 -1
  67. package/dist/_dts/theme-core/src/site-styles/sectionTransitions.d.ts +77 -0
  68. package/dist/_dts/theme-core/src/site-styles/siteChromeNavPreferences.d.ts +44 -0
  69. package/dist/_dts/theme-core/src/site-styles/styleTags.d.ts +1 -1
  70. package/dist/_dts/theme-core/src/site-styles/tokenRecipes.d.ts +1 -1
  71. package/dist/_dts/theme-core/src/tokens/themeColorTokens.d.ts +3 -3
  72. package/dist/_dts/ui/src/badge.d.ts +1 -1
  73. package/dist/_dts/ui/src/button.d.ts +1 -1
  74. package/dist/_dts/ui/src/card.d.ts +1 -1
  75. package/dist/_dts/ui/src/toggle.d.ts +2 -2
  76. package/dist/cli/index.mjs +28 -7
  77. package/dist/cli/init-docs/content/workflow-isr-revalidation.md +9 -1
  78. package/dist/client/client.mjs +337 -69
  79. package/dist/client/hooks.mjs +13 -1
  80. package/dist/client/rendering/client.mjs +25 -4
  81. package/dist/client/rendering.mjs +336 -68
  82. package/dist/preview-next/client/runtime.mjs +3 -3
  83. package/dist/{sdk-runtime-K8Oqj97H.mjs → sdk-runtime-C8whifOy.mjs} +1 -1
  84. package/dist/{separator-CRoP34pT.mjs → separator-CM2C5Axs.mjs} +1 -1
  85. package/dist/server/components.mjs +321 -65
  86. package/dist/server/config-validation.mjs +12 -1
  87. package/dist/server/config.mjs +12 -1
  88. package/dist/server/data.mjs +12 -1
  89. package/dist/server/index.mjs +1 -1
  90. package/dist/server/next/revalidate.mjs +31 -1
  91. package/dist/server/next.mjs +325 -66
  92. package/dist/server/page-converter.mjs +12 -1
  93. package/dist/server/prebuild.mjs +1 -1
  94. package/dist/server/rendering/server.mjs +323 -65
  95. package/dist/server/rendering.mjs +323 -65
  96. package/dist/server/routing.mjs +24 -3
  97. package/dist/server/server.mjs +15 -2
  98. package/dist/server/theme-bridge.mjs +153 -32
  99. package/dist/server/theme.mjs +2 -0
  100. package/dist/styles/index.css +123 -30
  101. package/package.json +1 -1
@@ -4977,6 +4977,8 @@ const headerSchema = z$1.object({
4977
4977
  navStyle: headerNavStyle,
4978
4978
  navColor: themeColorTokenSchema.nullable().optional(),
4979
4979
  navWeight: navFontWeight.default("medium"),
4980
+ navTypography: z$1.enum(["body", "heading"]).optional(),
4981
+ navTextSize: navLinkStyleSchema.shape.textSize,
4980
4982
  container: headerContainerSchema,
4981
4983
  border: headerBorderSchema,
4982
4984
  shadow: componentShadowSchema.optional(),
@@ -7253,6 +7255,15 @@ function uniqueStrings(values) {
7253
7255
  }
7254
7256
  //#endregion
7255
7257
  //#region ../theme-core/src/site-styles/sectionTransitions.ts
7258
+ function boundaryRuntimeMetrics(family, size, heightExpression) {
7259
+ return {
7260
+ family,
7261
+ size,
7262
+ heightCss: heightExpression.includes(" ") ? `calc(${heightExpression})` : heightExpression,
7263
+ reserveCss: `calc((${heightExpression}) / 2)`
7264
+ };
7265
+ }
7266
+ 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");
7256
7267
  const noneBoundaryOption = {
7257
7268
  id: asBoundaryOptionId("break:none"),
7258
7269
  label: "None",
@@ -7940,7 +7951,7 @@ const overlayLogoAccommodations = [
7940
7951
  * optional nested styling fields that would otherwise leak from another Look.
7941
7952
  */
7942
7953
  function baseHeader(theme) {
7943
- const { navLinkStyle: _navLinkStyle, dropdownStyle: _dropdownStyle, ctaVariant: _ctaVariant, navContainer: _navContainer, container: _container, shadow: _shadow, logo: _logo, logoText: _logoText, border: _border, ...header } = theme.header;
7954
+ 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;
7944
7955
  return {
7945
7956
  ...header,
7946
7957
  navContainer: {
@@ -5022,6 +5022,8 @@ const headerSchema = z$1.object({
5022
5022
  navStyle: headerNavStyle,
5023
5023
  navColor: themeColorTokenSchema.nullable().optional(),
5024
5024
  navWeight: navFontWeight.default("medium"),
5025
+ navTypography: z$1.enum(["body", "heading"]).optional(),
5026
+ navTextSize: navLinkStyleSchema.shape.textSize,
5025
5027
  container: headerContainerSchema,
5026
5028
  border: headerBorderSchema,
5027
5029
  shadow: componentShadowSchema.optional(),
@@ -7298,6 +7300,15 @@ function uniqueStrings(values) {
7298
7300
  }
7299
7301
  //#endregion
7300
7302
  //#region ../theme-core/src/site-styles/sectionTransitions.ts
7303
+ function boundaryRuntimeMetrics(family, size, heightExpression) {
7304
+ return {
7305
+ family,
7306
+ size,
7307
+ heightCss: heightExpression.includes(" ") ? `calc(${heightExpression})` : heightExpression,
7308
+ reserveCss: `calc((${heightExpression}) / 2)`
7309
+ };
7310
+ }
7311
+ 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");
7301
7312
  const noneBoundaryOption = {
7302
7313
  id: asBoundaryOptionId("break:none"),
7303
7314
  label: "None",
@@ -7985,7 +7996,7 @@ const overlayLogoAccommodations = [
7985
7996
  * optional nested styling fields that would otherwise leak from another Look.
7986
7997
  */
7987
7998
  function baseHeader(theme) {
7988
- const { navLinkStyle: _navLinkStyle, dropdownStyle: _dropdownStyle, ctaVariant: _ctaVariant, navContainer: _navContainer, container: _container, shadow: _shadow, logo: _logo, logoText: _logoText, border: _border, ...header } = theme.header;
7999
+ 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;
7989
8000
  return {
7990
8001
  ...header,
7991
8002
  navContainer: {
@@ -4982,6 +4982,8 @@ const headerSchema = z$1.object({
4982
4982
  navStyle: headerNavStyle,
4983
4983
  navColor: themeColorTokenSchema.nullable().optional(),
4984
4984
  navWeight: navFontWeight.default("medium"),
4985
+ navTypography: z$1.enum(["body", "heading"]).optional(),
4986
+ navTextSize: navLinkStyleSchema.shape.textSize,
4985
4987
  container: headerContainerSchema,
4986
4988
  border: headerBorderSchema,
4987
4989
  shadow: componentShadowSchema.optional(),
@@ -7360,6 +7362,15 @@ function uniqueStrings(values) {
7360
7362
  }
7361
7363
  //#endregion
7362
7364
  //#region ../theme-core/src/site-styles/sectionTransitions.ts
7365
+ function boundaryRuntimeMetrics(family, size, heightExpression) {
7366
+ return {
7367
+ family,
7368
+ size,
7369
+ heightCss: heightExpression.includes(" ") ? `calc(${heightExpression})` : heightExpression,
7370
+ reserveCss: `calc((${heightExpression}) / 2)`
7371
+ };
7372
+ }
7373
+ 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");
7363
7374
  const noneBoundaryOption = {
7364
7375
  id: asBoundaryOptionId("break:none"),
7365
7376
  label: "None",
@@ -8047,7 +8058,7 @@ const overlayLogoAccommodations = [
8047
8058
  * optional nested styling fields that would otherwise leak from another Look.
8048
8059
  */
8049
8060
  function baseHeader(theme) {
8050
- const { navLinkStyle: _navLinkStyle, dropdownStyle: _dropdownStyle, ctaVariant: _ctaVariant, navContainer: _navContainer, container: _container, shadow: _shadow, logo: _logo, logoText: _logoText, border: _border, ...header } = theme.header;
8061
+ 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;
8051
8062
  return {
8052
8063
  ...header,
8053
8064
  navContainer: {
@@ -7502,7 +7502,7 @@ var SimpleCache = class {
7502
7502
  * 1. This constant
7503
7503
  * 2. The "version" field in package.json
7504
7504
  */
7505
- const SDK_VERSION = "0.102.0";
7505
+ const SDK_VERSION = "0.103.0";
7506
7506
  //#endregion
7507
7507
  //#region src/client/error.ts
7508
7508
  let _Symbol$for;
@@ -305,6 +305,24 @@ function getRevalidationRequestMetadata(request, payload, counts) {
305
305
  ...monitorRunId ? { monitorRunId } : {}
306
306
  };
307
307
  }
308
+ async function clearRevalidationClientCache(getClient) {
309
+ if (!getClient) return {
310
+ success: true,
311
+ status: "skipped"
312
+ };
313
+ try {
314
+ await (await getClient()).clearCache();
315
+ return {
316
+ success: true,
317
+ status: "cleared"
318
+ };
319
+ } catch (error) {
320
+ return {
321
+ success: false,
322
+ error
323
+ };
324
+ }
325
+ }
308
326
  /**
309
327
  * Create a Next.js API route handler for webhook revalidation.
310
328
  *
@@ -312,7 +330,8 @@ function getRevalidationRequestMetadata(request, payload, counts) {
312
330
  * 1. Verifies the webhook signature using HMAC-SHA256
313
331
  * 2. Calls `revalidateTag()` for each normalized tag in the payload
314
332
  * 3. Calls `revalidatePath()` for each normalized path in the payload
315
- * 4. Returns a JSON response with the revalidation results
333
+ * 4. Best-effort clears the current process's SDK client cache when configured
334
+ * 5. Returns a JSON response with the revalidation results
316
335
  *
317
336
  * @param options - Configuration options
318
337
  * @returns A Next.js Route Handler function
@@ -365,6 +384,16 @@ function createRevalidateHandler(options = {}) {
365
384
  tagCount: normalizedTags.length,
366
385
  itemCount: revalidated.length
367
386
  });
387
+ const clientCache = await clearRevalidationClientCache(options.getClient);
388
+ const clientCacheStatus = clientCache.success ? clientCache.status : "failed";
389
+ if (!clientCache.success) console.warn("[Riverbank] SDK client cache clear failed after Next revalidation", {
390
+ event: payload.event,
391
+ siteId: payload.siteId,
392
+ pathCount: normalizedPaths.paths.length,
393
+ tagCount: normalizedTags.length,
394
+ itemCount: revalidated.length,
395
+ error: clientCache.error instanceof Error ? clientCache.error.message : String(clientCache.error)
396
+ });
368
397
  if (revalidated.length > 0) console.log([
369
398
  `[Riverbank] Revalidated ${normalizedPaths.paths.length} path(s)`,
370
399
  `and ${normalizedTags.length} tag(s)`,
@@ -378,6 +407,7 @@ function createRevalidateHandler(options = {}) {
378
407
  dispatchId: metadata.dispatchId,
379
408
  pathCount: normalizedPaths.paths.length,
380
409
  tagCount: normalizedTags.length,
410
+ clientCache: clientCacheStatus,
381
411
  invalidPathCount: normalizedPaths.invalidPaths.length,
382
412
  timestamp: Date.now()
383
413
  });