@riverbankcms/sdk 0.22.0 → 0.25.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 (124) hide show
  1. package/README.md +15 -0
  2. package/dist/_dts/blocks/src/system/defineBlock.d.ts +2 -2
  3. package/dist/_dts/blocks/src/system/fragments/utils/toRepeaterSchema.d.ts +1 -0
  4. package/dist/_dts/blocks/src/system/manifest/fieldPath.d.ts +1 -1
  5. package/dist/_dts/blocks/src/system/manifest/schema.d.ts +3 -3
  6. package/dist/_dts/db/src/generated/supabase/database.types.d.ts +20 -6
  7. package/dist/_dts/sdk/src/components.d.ts +1 -1
  8. package/dist/_dts/sdk/src/manifest/prompt/examples/types.d.ts +1 -1
  9. package/dist/_dts/sdk/src/manifest/validation/output-schema.d.ts +1 -1
  10. package/dist/_dts/sdk/src/rendering/components/Layout.d.ts +13 -2
  11. package/dist/_dts/sdk/src/rendering/server.d.ts +1 -1
  12. package/dist/_dts/sdk/src/version.d.ts +1 -1
  13. package/dist/_dts/sdk/src/zod/titleSourceSchema.d.ts +3 -0
  14. package/dist/cli/index.js +38 -16
  15. package/dist/cli/index.js.map +1 -1
  16. package/dist/client/client.js +16 -4
  17. package/dist/client/client.js.map +1 -1
  18. package/dist/client/client.mjs +16 -4
  19. package/dist/client/client.mjs.map +1 -1
  20. package/dist/client/hooks.js +15 -3
  21. package/dist/client/hooks.js.map +1 -1
  22. package/dist/client/hooks.mjs +15 -3
  23. package/dist/client/hooks.mjs.map +1 -1
  24. package/dist/server/{chunk-QE4VT6ZZ.js → chunk-2VZTRLVN.js} +2 -2
  25. package/dist/server/{chunk-QE4VT6ZZ.js.map → chunk-2VZTRLVN.js.map} +1 -1
  26. package/dist/server/{chunk-2M7734OW.mjs → chunk-2Y65RENO.mjs} +2 -2
  27. package/dist/server/{chunk-ZUEYJXML.js → chunk-36KFN6AU.js} +6 -6
  28. package/dist/server/{chunk-ZUEYJXML.js.map → chunk-36KFN6AU.js.map} +1 -1
  29. package/dist/server/{chunk-53NRFMMN.js → chunk-377J7BKC.js} +16 -4
  30. package/dist/server/chunk-377J7BKC.js.map +1 -0
  31. package/dist/server/chunk-3OR6EF3W.js +11 -0
  32. package/dist/server/chunk-3OR6EF3W.js.map +1 -0
  33. package/dist/server/chunk-3YMYSDUU.mjs +7 -0
  34. package/dist/server/{chunk-VHVKDZCV.mjs.map → chunk-3YMYSDUU.mjs.map} +1 -1
  35. package/dist/server/{chunk-WUAHP5L2.mjs → chunk-7NJZJL2D.mjs} +4 -4
  36. package/dist/server/{chunk-PY2A4FGZ.js → chunk-ACLGZTVX.js} +3 -3
  37. package/dist/server/{chunk-PY2A4FGZ.js.map → chunk-ACLGZTVX.js.map} +1 -1
  38. package/dist/server/{chunk-D5NOG6VZ.mjs → chunk-DHFU2AQ7.mjs} +2 -2
  39. package/dist/server/{chunk-7XBBV6UY.mjs → chunk-DWMPTB3G.mjs} +2 -2
  40. package/dist/server/{chunk-J2ZBKZVF.mjs → chunk-E5G5COYU.mjs} +21 -15
  41. package/dist/server/chunk-E5G5COYU.mjs.map +1 -0
  42. package/dist/server/{chunk-H3SRB5G4.js → chunk-EFQNS3HS.js} +6 -6
  43. package/dist/server/{chunk-H3SRB5G4.js.map → chunk-EFQNS3HS.js.map} +1 -1
  44. package/dist/server/{chunk-PTHRXZUJ.js → chunk-END3H7C6.js} +32 -26
  45. package/dist/server/chunk-END3H7C6.js.map +1 -0
  46. package/dist/server/{chunk-TOBOHAEX.js → chunk-FKMJDBEA.js} +5 -5
  47. package/dist/server/{chunk-TOBOHAEX.js.map → chunk-FKMJDBEA.js.map} +1 -1
  48. package/dist/server/{chunk-TU3WAJPX.js → chunk-GTE6ZI5W.js} +13 -10
  49. package/dist/server/chunk-GTE6ZI5W.js.map +1 -0
  50. package/dist/server/{chunk-ZIY3QZJ3.mjs → chunk-HQZKJ5MH.mjs} +2 -2
  51. package/dist/server/{chunk-UK7SLIIG.js → chunk-IH2NRKKI.js} +3 -3
  52. package/dist/server/{chunk-UK7SLIIG.js.map → chunk-IH2NRKKI.js.map} +1 -1
  53. package/dist/server/{chunk-OPW33AGO.mjs → chunk-JMKX5FTE.mjs} +16 -4
  54. package/dist/server/chunk-JMKX5FTE.mjs.map +1 -0
  55. package/dist/server/{chunk-RVLBSKSU.mjs → chunk-KNF42IKQ.mjs} +2 -2
  56. package/dist/server/{chunk-7ORXXMTP.js → chunk-QIBPYE44.js} +9 -9
  57. package/dist/server/{chunk-7ORXXMTP.js.map → chunk-QIBPYE44.js.map} +1 -1
  58. package/dist/server/{chunk-3Z25JQ6H.mjs → chunk-QOBADLB4.mjs} +2 -2
  59. package/dist/server/{chunk-OOIGZH5B.mjs → chunk-RFQZDDUM.mjs} +2 -2
  60. package/dist/server/{chunk-33KZRQJY.mjs → chunk-T3ZGODHW.mjs} +2 -2
  61. package/dist/server/{chunk-CCAD7BUN.mjs → chunk-TCRV6VRW.mjs} +8 -5
  62. package/dist/server/chunk-TCRV6VRW.mjs.map +1 -0
  63. package/dist/server/{chunk-Z4AMGXH2.js → chunk-UZMAP5RH.js} +3 -3
  64. package/dist/server/{chunk-Z4AMGXH2.js.map → chunk-UZMAP5RH.js.map} +1 -1
  65. package/dist/server/chunk-VRDQJRYS.mjs +11 -0
  66. package/dist/server/chunk-VRDQJRYS.mjs.map +1 -0
  67. package/dist/server/{chunk-V5EQHRVR.js → chunk-WEEEYI47.js} +4 -4
  68. package/dist/server/{chunk-V5EQHRVR.js.map → chunk-WEEEYI47.js.map} +1 -1
  69. package/dist/server/{chunk-KAVH2CX7.js → chunk-X5XHOSOM.js} +49 -49
  70. package/dist/server/{chunk-KAVH2CX7.js.map → chunk-X5XHOSOM.js.map} +1 -1
  71. package/dist/server/components.js +5 -5
  72. package/dist/server/components.mjs +4 -4
  73. package/dist/server/config-validation.js +6 -5
  74. package/dist/server/config-validation.js.map +1 -1
  75. package/dist/server/config-validation.mjs +5 -4
  76. package/dist/server/config.js +6 -5
  77. package/dist/server/config.js.map +1 -1
  78. package/dist/server/config.mjs +5 -4
  79. package/dist/server/config.mjs.map +1 -1
  80. package/dist/server/data.js +3 -3
  81. package/dist/server/data.mjs +2 -2
  82. package/dist/server/index.js +4 -4
  83. package/dist/server/index.mjs +3 -3
  84. package/dist/server/{loadPage-3F57VAE2.mjs → loadPage-EZXWZ7SJ.mjs} +4 -4
  85. package/dist/server/{loadPage-JRS5JUAY.js → loadPage-G74D6VXZ.js} +5 -5
  86. package/dist/server/{loadPage-JRS5JUAY.js.map → loadPage-G74D6VXZ.js.map} +1 -1
  87. package/dist/server/next.js +17 -17
  88. package/dist/server/next.mjs +7 -7
  89. package/dist/server/page-converter.js +16 -10
  90. package/dist/server/page-converter.js.map +1 -1
  91. package/dist/server/page-converter.mjs +9 -3
  92. package/dist/server/page-converter.mjs.map +1 -1
  93. package/dist/server/prebuild.js +3 -3
  94. package/dist/server/prebuild.mjs +2 -2
  95. package/dist/server/rendering/server.js +7 -7
  96. package/dist/server/rendering/server.mjs +6 -6
  97. package/dist/server/rendering.js +9 -9
  98. package/dist/server/rendering.mjs +8 -8
  99. package/dist/server/routing.js +1 -1
  100. package/dist/server/routing.mjs +1 -1
  101. package/dist/server/server.js +7 -7
  102. package/dist/server/server.mjs +6 -6
  103. package/dist/server/theme-bridge.js +10 -10
  104. package/dist/server/theme-bridge.mjs +2 -2
  105. package/dist/server/theme.js +4 -4
  106. package/dist/server/theme.mjs +2 -2
  107. package/package.json +1 -1
  108. package/dist/server/chunk-53NRFMMN.js.map +0 -1
  109. package/dist/server/chunk-CCAD7BUN.mjs.map +0 -1
  110. package/dist/server/chunk-J2ZBKZVF.mjs.map +0 -1
  111. package/dist/server/chunk-OPW33AGO.mjs.map +0 -1
  112. package/dist/server/chunk-PTHRXZUJ.js.map +0 -1
  113. package/dist/server/chunk-TU3WAJPX.js.map +0 -1
  114. package/dist/server/chunk-VHVKDZCV.mjs +0 -7
  115. /package/dist/server/{chunk-2M7734OW.mjs.map → chunk-2Y65RENO.mjs.map} +0 -0
  116. /package/dist/server/{chunk-WUAHP5L2.mjs.map → chunk-7NJZJL2D.mjs.map} +0 -0
  117. /package/dist/server/{chunk-D5NOG6VZ.mjs.map → chunk-DHFU2AQ7.mjs.map} +0 -0
  118. /package/dist/server/{chunk-7XBBV6UY.mjs.map → chunk-DWMPTB3G.mjs.map} +0 -0
  119. /package/dist/server/{chunk-ZIY3QZJ3.mjs.map → chunk-HQZKJ5MH.mjs.map} +0 -0
  120. /package/dist/server/{chunk-RVLBSKSU.mjs.map → chunk-KNF42IKQ.mjs.map} +0 -0
  121. /package/dist/server/{chunk-3Z25JQ6H.mjs.map → chunk-QOBADLB4.mjs.map} +0 -0
  122. /package/dist/server/{chunk-OOIGZH5B.mjs.map → chunk-RFQZDDUM.mjs.map} +0 -0
  123. /package/dist/server/{chunk-33KZRQJY.mjs.map → chunk-T3ZGODHW.mjs.map} +0 -0
  124. /package/dist/server/{loadPage-3F57VAE2.mjs.map → loadPage-EZXWZ7SJ.mjs.map} +0 -0
package/README.md CHANGED
@@ -882,6 +882,21 @@ Override the header variant from your code:
882
882
  </Layout>
883
883
  ```
884
884
 
885
+ ### Opting Out of Theme Styling (Headless)
886
+
887
+ If your SDK site brings its own global styles and you don't want the SDK to inject theme CSS variables, disable the theme scope wrapper:
888
+
889
+ ```tsx
890
+ <Layout
891
+ siteData={siteData}
892
+ useThemeScope={false}
893
+ header={(data) => <CustomHeader {...data} />}
894
+ footer={() => <GlobalFooter />}
895
+ >
896
+ <main>Fully custom styling</main>
897
+ </Layout>
898
+ ```
899
+
885
900
  ### Fully Custom Headers
886
901
 
887
902
  Create your own header while using CMS navigation data:
@@ -54,8 +54,8 @@ export type BlockConfig = {
54
54
  includeContainerStyles?: boolean;
55
55
  /** Block description */
56
56
  description?: string;
57
- /** Field ID to use as block title in lists (e.g., 'headline') */
58
- titleSource?: string;
57
+ /** Field ID(s) to use as block title in lists (e.g., 'headline', or ['navLabel','title']) */
58
+ titleSource?: string | string[];
59
59
  /** Search/filter tags */
60
60
  tags?: string[];
61
61
  /** Icon name (Lucide icon) */
@@ -22,6 +22,7 @@ export declare function fragmentsToRepeaterField(id: string, label: string, frag
22
22
  minItems?: number;
23
23
  maxItems?: number;
24
24
  itemLabel?: string;
25
+ itemLabelSource?: string;
25
26
  description?: string;
26
27
  allowConversion?: boolean;
27
28
  commonFields?: FieldDefinition[];
@@ -25,5 +25,5 @@ export type ResolvedBlockTitle = {
25
25
  */
26
26
  export declare function resolveBlockTitle(manifest: {
27
27
  title?: string;
28
- titleSource?: string;
28
+ titleSource?: string | string[];
29
29
  } | null | undefined, blockContent: unknown, blockKind: string): ResolvedBlockTitle;
@@ -3337,7 +3337,7 @@ export declare const manifestSchema: z.ZodObject<{
3337
3337
  name: z.ZodString;
3338
3338
  version: z.ZodString;
3339
3339
  title: z.ZodString;
3340
- titleSource: z.ZodOptional<z.ZodString>;
3340
+ titleSource: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
3341
3341
  description: z.ZodOptional<z.ZodString>;
3342
3342
  component: z.ZodString;
3343
3343
  fields: z.ZodDefault<z.ZodArray<FieldSchemaUnion>>;
@@ -3507,8 +3507,8 @@ export interface SdkCustomBlock {
3507
3507
  id: `custom.${string}`;
3508
3508
  /** Display title in block picker */
3509
3509
  title: string;
3510
- /** Field ID to use as block title in lists (must match a field id) */
3511
- titleSource?: string;
3510
+ /** Field ID(s) to use as block title in lists (must match field id(s)) */
3511
+ titleSource?: string | string[];
3512
3512
  /** Description shown in block picker */
3513
3513
  description?: string;
3514
3514
  /** Category for block picker organization */
@@ -1396,8 +1396,8 @@ export type Database = {
1396
1396
  paused_at: string | null;
1397
1397
  site_id: string;
1398
1398
  status: string;
1399
- stripe_customer_id: string | null;
1400
- stripe_subscription_id: string | null;
1399
+ stripe_customer_id: string;
1400
+ stripe_subscription_id: string;
1401
1401
  updated_at: string;
1402
1402
  };
1403
1403
  Insert: {
@@ -1414,8 +1414,8 @@ export type Database = {
1414
1414
  paused_at?: string | null;
1415
1415
  site_id: string;
1416
1416
  status: string;
1417
- stripe_customer_id?: string | null;
1418
- stripe_subscription_id?: string | null;
1417
+ stripe_customer_id: string;
1418
+ stripe_subscription_id: string;
1419
1419
  updated_at?: string;
1420
1420
  };
1421
1421
  Update: {
@@ -1432,8 +1432,8 @@ export type Database = {
1432
1432
  paused_at?: string | null;
1433
1433
  site_id?: string;
1434
1434
  status?: string;
1435
- stripe_customer_id?: string | null;
1436
- stripe_subscription_id?: string | null;
1435
+ stripe_customer_id?: string;
1436
+ stripe_subscription_id?: string;
1437
1437
  updated_at?: string;
1438
1438
  };
1439
1439
  Relationships: [
@@ -8195,6 +8195,12 @@ export type Database = {
8195
8195
  };
8196
8196
  Returns: boolean;
8197
8197
  };
8198
+ check_insert_policy: {
8199
+ Args: {
8200
+ test_user_id: string;
8201
+ };
8202
+ Returns: boolean;
8203
+ };
8198
8204
  checkout_course_atomic: {
8199
8205
  Args: {
8200
8206
  p_course_id: string;
@@ -8289,6 +8295,10 @@ export type Database = {
8289
8295
  isSetofReturn: false;
8290
8296
  };
8291
8297
  };
8298
+ current_role_debug: {
8299
+ Args: never;
8300
+ Returns: string;
8301
+ };
8292
8302
  enroll_in_course_atomic: {
8293
8303
  Args: {
8294
8304
  p_course_id: string;
@@ -8313,6 +8323,10 @@ export type Database = {
8313
8323
  count: number;
8314
8324
  }[];
8315
8325
  };
8326
+ get_auth_uid_debug: {
8327
+ Args: never;
8328
+ Returns: string;
8329
+ };
8316
8330
  get_auth_user_id_by_email: {
8317
8331
  Args: {
8318
8332
  p_email: string;
@@ -24,7 +24,7 @@
24
24
  export { Page } from './rendering/components/Page';
25
25
  export type { PageProps } from './rendering/components/Page';
26
26
  export { Layout } from './rendering/components/Layout';
27
- export type { LayoutProps, HeaderData } from './rendering/components/Layout';
27
+ export type { LayoutProps, HeaderData, FooterData } from './rendering/components/Layout';
28
28
  export { PageRenderer, buildThemeRuntime, RichText, resolveImageUrl, ImagePresets } from '@riverbankcms/blocks';
29
29
  export type { ImageOptions } from '@riverbankcms/blocks';
30
30
  export type { PageOutline, RouteMap, Theme, ThemeTokens, BlockOverrides, BlockOverrideComponent, SystemBlockComponentProps, HeroContent, BodyTextContent, RichTextPrimitiveProps, TipTapNode, } from '@riverbankcms/blocks';
@@ -13,7 +13,7 @@ interface ConversionExampleOutput {
13
13
  blocks: Array<{
14
14
  id: string;
15
15
  title: string;
16
- titleSource?: string;
16
+ titleSource?: string | string[];
17
17
  description?: string;
18
18
  category: string;
19
19
  icon?: string;
@@ -261,7 +261,7 @@ export type LlmNodeDefinition = z.infer<typeof llmNodeSchema>;
261
261
  export interface LlmCustomBlock {
262
262
  id: `custom.${string}`;
263
263
  title: string;
264
- titleSource: string | null;
264
+ titleSource: string | string[] | null;
265
265
  description: string | null;
266
266
  category: BlockCategory;
267
267
  icon: string | null;
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Renders site header and footer around content. Fetches site data if not provided.
5
5
  */
6
- import { buildMenu, buildLogo } from '../../navigation';
6
+ import { buildMenu, buildFooterMenu, buildLogo } from '../../navigation';
7
7
  import type { RiverbankClient, SiteResponse } from '../../client/types';
8
8
  export type HeaderData = {
9
9
  menu: ReturnType<typeof buildMenu>;
@@ -14,6 +14,7 @@ export type HeaderData = {
14
14
  };
15
15
  export type FooterData = {
16
16
  menu: ReturnType<typeof buildMenu>;
17
+ footerMenu: ReturnType<typeof buildFooterMenu>;
17
18
  logo: ReturnType<typeof buildLogo>;
18
19
  site: SiteResponse['site'];
19
20
  theme: SiteResponse['theme'];
@@ -38,6 +39,16 @@ export type LayoutProps = {
38
39
  hasPortalSession?: boolean;
39
40
  /** Render stage for internal links and block transforms. */
40
41
  previewStage?: 'published' | 'preview';
42
+ /**
43
+ * Wrap layout content in ThemeScope to inject theme CSS variables and styles.
44
+ * Enable this to use built-in theme styling from the CMS.
45
+ * Disable if you're bringing your own styles and want to avoid SDK-injected theme variables.
46
+ *
47
+ * Note: Disabling this while using the default header/footer (blocks) may result in unstyled output.
48
+ *
49
+ * @default true
50
+ */
51
+ useThemeScope?: boolean;
41
52
  };
42
53
  /**
43
54
  * Layout component that wraps content with site header and footer.
@@ -58,4 +69,4 @@ export type LayoutProps = {
58
69
  * </Layout>
59
70
  * ```
60
71
  */
61
- export declare function Layout({ siteData: providedSiteData, client, siteId, slug, domain, children, header, footer, headerVariant, hasPortalSession, previewStage, }: LayoutProps): Promise<import("react/jsx-runtime").JSX.Element>;
72
+ export declare function Layout({ siteData: providedSiteData, client, siteId, slug, domain, children, header, footer, headerVariant, hasPortalSession, previewStage, useThemeScope, }: LayoutProps): Promise<import("react/jsx-runtime").JSX.Element>;
@@ -5,7 +5,7 @@
5
5
  export { Page } from './components/Page.server';
6
6
  export type { PageProps } from './components/Page.server';
7
7
  export { Layout } from './components/Layout';
8
- export type { LayoutProps, HeaderData } from './components/Layout';
8
+ export type { LayoutProps, HeaderData, FooterData } from './components/Layout';
9
9
  export { Block } from './components/Block';
10
10
  export type { BlockProps } from './components/Block';
11
11
  /**
@@ -8,4 +8,4 @@
8
8
  * 1. This constant
9
9
  * 2. The "version" field in package.json
10
10
  */
11
- export declare const SDK_VERSION = "0.22.0";
11
+ export declare const SDK_VERSION = "0.25.0";
@@ -0,0 +1,3 @@
1
+ import { z } from 'zod';
2
+ export declare const titleSourceValueSchema: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
3
+ export type TitleSourceValue = z.infer<typeof titleSourceValueSchema>;
package/dist/cli/index.js CHANGED
@@ -1196,7 +1196,7 @@ z10.z.object({
1196
1196
  name: z10.z.string().min(1),
1197
1197
  version: z10.z.string().min(1),
1198
1198
  title: z10.z.string().min(1),
1199
- titleSource: z10.z.string().optional(),
1199
+ titleSource: z10.z.union([z10.z.string().min(1), z10.z.array(z10.z.string().min(1)).min(1)]).optional(),
1200
1200
  description: z10.z.string().optional(),
1201
1201
  component: z10.z.string().min(1),
1202
1202
  fields: fieldSchema.array().default([]),
@@ -4448,7 +4448,7 @@ function fragmentsToRepeaterField(id, label, fragments, options = {}) {
4448
4448
  description: options.description,
4449
4449
  polymorphic: true,
4450
4450
  itemLabel: options.itemLabel ?? "Item",
4451
- itemLabelSource: "_type",
4451
+ itemLabelSource: options.itemLabelSource ?? "_type",
4452
4452
  minItems: options.minItems ?? 0,
4453
4453
  maxItems: options.maxItems,
4454
4454
  allowConversion: options.allowConversion ?? true,
@@ -7170,6 +7170,7 @@ var columnsManifest = createBlockManifest({
7170
7170
  label: "Desktop columns",
7171
7171
  description: "Auto uses item count. Set this to create editorial layouts with column spans.",
7172
7172
  defaultValue: "auto",
7173
+ ui: { intent: "display" },
7173
7174
  options: [
7174
7175
  { value: "auto", label: "Auto" },
7175
7176
  { value: "2", label: "2 columns" },
@@ -7542,9 +7543,10 @@ var textCardStylesField = (() => {
7542
7543
  })();
7543
7544
  var mediaTextManifest = createBlockManifest({
7544
7545
  id: "block.media-text",
7545
- title: "Media Text",
7546
+ title: "Media and Text",
7546
7547
  category: "layout",
7547
7548
  includeContainerStyles: true,
7549
+ titleSource: "title",
7548
7550
  additionalFields: [
7549
7551
  {
7550
7552
  id: "images",
@@ -10472,6 +10474,7 @@ var fields = parseFieldDefinitions([
10472
10474
  description: "Extend the gallery edge-to-edge by removing section side padding and container max-width.",
10473
10475
  defaultValue: false,
10474
10476
  ui: {
10477
+ intent: "display",
10475
10478
  visibleWhen: { field: "variant", notIn: ["marquee"] }
10476
10479
  }
10477
10480
  },
@@ -10522,6 +10525,7 @@ var fields = parseFieldDefinitions([
10522
10525
  { value: "3", label: "Three at a time" }
10523
10526
  ],
10524
10527
  ui: {
10528
+ intent: "display",
10525
10529
  visibleWhen: { field: "variant", equals: "carousel" }
10526
10530
  }
10527
10531
  },
@@ -10537,6 +10541,7 @@ var fields = parseFieldDefinitions([
10537
10541
  { value: "3", label: "Three at a time" }
10538
10542
  ],
10539
10543
  ui: {
10544
+ intent: "display",
10540
10545
  visibleWhen: { field: "variant", equals: "carousel" }
10541
10546
  }
10542
10547
  },
@@ -10561,6 +10566,7 @@ var fields = parseFieldDefinitions([
10561
10566
  label: "Show arrows",
10562
10567
  defaultValue: true,
10563
10568
  ui: {
10569
+ intent: "behavior",
10564
10570
  visibleWhen: { field: "variant", equals: "carousel" }
10565
10571
  }
10566
10572
  },
@@ -10570,6 +10576,7 @@ var fields = parseFieldDefinitions([
10570
10576
  label: "Show dots",
10571
10577
  defaultValue: false,
10572
10578
  ui: {
10579
+ intent: "behavior",
10573
10580
  visibleWhen: { field: "variant", equals: "carousel" }
10574
10581
  }
10575
10582
  },
@@ -10579,6 +10586,7 @@ var fields = parseFieldDefinitions([
10579
10586
  label: "Autoplay",
10580
10587
  defaultValue: false,
10581
10588
  ui: {
10589
+ intent: "behavior",
10582
10590
  visibleWhen: { field: "variant", equals: "carousel" }
10583
10591
  }
10584
10592
  },
@@ -10594,6 +10602,7 @@ var fields = parseFieldDefinitions([
10594
10602
  { value: "10000", label: "10 seconds" }
10595
10603
  ],
10596
10604
  ui: {
10605
+ intent: "behavior",
10597
10606
  visibleWhen: { field: "variant", equals: "carousel" }
10598
10607
  }
10599
10608
  },
@@ -10607,6 +10616,7 @@ var fields = parseFieldDefinitions([
10607
10616
  { value: "hover", label: "Show on hover" }
10608
10617
  ],
10609
10618
  ui: {
10619
+ intent: "behavior",
10610
10620
  visibleWhen: { field: "variant", equals: "carousel" }
10611
10621
  }
10612
10622
  },
@@ -10616,6 +10626,7 @@ var fields = parseFieldDefinitions([
10616
10626
  label: "Loop slides",
10617
10627
  defaultValue: true,
10618
10628
  ui: {
10629
+ intent: "behavior",
10619
10630
  visibleWhen: { field: "variant", equals: "carousel" }
10620
10631
  }
10621
10632
  },
@@ -11624,6 +11635,7 @@ var teamMembersManifest = createBlockManifest({
11624
11635
  minItems: 0,
11625
11636
  maxItems: 50,
11626
11637
  itemLabel: "Team member",
11638
+ itemLabelSource: "name",
11627
11639
  description: "Add people to this section."
11628
11640
  }
11629
11641
  )
@@ -17586,6 +17598,10 @@ var dashboardConfigSchema = z10.z.object({
17586
17598
  previewEditingEnabled: z10.z.boolean().optional(),
17587
17599
  navigation: dashboardNavigationConfigSchema.optional()
17588
17600
  }).strip();
17601
+ var titleSourceValueSchema = z10.z.union([
17602
+ z10.z.string().min(1),
17603
+ z10.z.array(z10.z.string().min(1)).min(1)
17604
+ ]);
17589
17605
 
17590
17606
  // ../blocks/src/system/data/loaderEndpoints.ts
17591
17607
  var SUPPORTED_LOADER_ENDPOINTS = [
@@ -17762,7 +17778,7 @@ var sdkCustomBlockSchema = z10.z.object({
17762
17778
  message: "Block ID must start with 'custom.' followed by lowercase letters, numbers, or hyphens"
17763
17779
  }),
17764
17780
  title: z10.z.string().min(1, "Title is required"),
17765
- titleSource: z10.z.string().optional(),
17781
+ titleSource: titleSourceValueSchema.optional(),
17766
17782
  description: z10.z.string().optional(),
17767
17783
  category: blockCategoryEnum,
17768
17784
  icon: z10.z.string().optional(),
@@ -17784,18 +17800,21 @@ var sdkCustomBlockSchema = z10.z.object({
17784
17800
  icon: z10.z.string().min(1).optional()
17785
17801
  })
17786
17802
  ).optional()
17787
- }).refine(
17788
- // Validate titleSource references a valid field if provided
17789
- (data) => {
17790
- if (!data.titleSource) return true;
17803
+ }).superRefine((data, ctx) => {
17804
+ if (data.titleSource) {
17791
17805
  const fields3 = data.fields;
17792
- return fields3.some((field) => field.id === data.titleSource);
17793
- },
17794
- {
17795
- message: "titleSource must reference a valid field ID",
17796
- path: ["titleSource"]
17806
+ const sources = Array.isArray(data.titleSource) ? data.titleSource : [data.titleSource];
17807
+ sources.forEach((source, index) => {
17808
+ const exists = fields3.some((field) => field.id === source);
17809
+ if (!exists) {
17810
+ ctx.addIssue({
17811
+ code: z10.z.ZodIssueCode.custom,
17812
+ message: `titleSource must reference a valid field ID (got "${source}")`,
17813
+ path: Array.isArray(data.titleSource) ? ["titleSource", index] : ["titleSource"]
17814
+ });
17815
+ }
17816
+ });
17797
17817
  }
17798
- ).superRefine((data, ctx) => {
17799
17818
  if (data.layout && data.variants) {
17800
17819
  ctx.addIssue({
17801
17820
  code: z10.z.ZodIssueCode.custom,
@@ -29504,7 +29523,7 @@ var SimpleCache = class {
29504
29523
  };
29505
29524
 
29506
29525
  // src/version.ts
29507
- var SDK_VERSION = "0.22.0";
29526
+ var SDK_VERSION = "0.25.0";
29508
29527
 
29509
29528
  // src/client/error.ts
29510
29529
  var RiverbankApiError = class _RiverbankApiError extends Error {
@@ -32527,7 +32546,10 @@ var llmCustomBlockSchema = z10.z.object({
32527
32546
  message: "Block ID must start with 'custom.' followed by lowercase letters, numbers, or hyphens"
32528
32547
  }),
32529
32548
  title: z10.z.string().min(1, "Title is required"),
32530
- titleSource: z10.z.string().nullable(),
32549
+ // Keep in sync with `sdkCustomBlockSchema` and the system manifest schema:
32550
+ // - `null` used by OpenAI structured output for "optional" values
32551
+ // - array allows multi-part titles (e.g. ["navLabel", "title"])
32552
+ titleSource: titleSourceValueSchema.nullable(),
32531
32553
  description: z10.z.string().nullable(),
32532
32554
  category: blockCategoryEnum,
32533
32555
  icon: z10.z.string().nullable(),