@riverbankcms/sdk 0.3.0 → 0.4.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.
Files changed (142) hide show
  1. package/README.md +255 -1
  2. package/dist/cli/index.js +249 -40
  3. package/dist/cli/index.js.map +1 -1
  4. package/dist/client/bookings.js +15 -1
  5. package/dist/client/bookings.js.map +1 -1
  6. package/dist/client/bookings.mjs +15 -1
  7. package/dist/client/bookings.mjs.map +1 -1
  8. package/dist/client/client.d.mts +2 -2
  9. package/dist/client/client.d.ts +2 -2
  10. package/dist/client/client.js +33 -5
  11. package/dist/client/client.js.map +1 -1
  12. package/dist/client/client.mjs +33 -5
  13. package/dist/client/client.mjs.map +1 -1
  14. package/dist/client/hooks.d.mts +2 -2
  15. package/dist/client/hooks.d.ts +2 -2
  16. package/dist/client/rendering/client.js +31 -33
  17. package/dist/client/rendering/client.js.map +1 -1
  18. package/dist/client/rendering/client.mjs +31 -33
  19. package/dist/client/rendering/client.mjs.map +1 -1
  20. package/dist/client/usePage-BcjWPXvh.d.mts +6388 -0
  21. package/dist/client/usePage-C3ZKNwY7.d.mts +6393 -0
  22. package/dist/client/usePage-CyYpOJud.d.ts +6388 -0
  23. package/dist/client/usePage-gpVaeWDy.d.ts +6393 -0
  24. package/dist/server/{Layout-CsAQ-0Fv.d.mts → Layout-B_zUr9ci.d.mts} +1 -1
  25. package/dist/server/{Layout-BM_KmCxO.d.ts → Layout-CHG77dhK.d.ts} +1 -1
  26. package/dist/server/blockKinds-B6MWzNWp.d.mts +16 -0
  27. package/dist/server/blockKinds-B6MWzNWp.d.ts +16 -0
  28. package/dist/server/{chunk-GWBMJPLH.mjs → chunk-A2FZMRDW.mjs} +3 -2
  29. package/dist/server/chunk-A2FZMRDW.mjs.map +1 -0
  30. package/dist/server/chunk-BOHTTHY5.mjs +406 -0
  31. package/dist/server/chunk-BOHTTHY5.mjs.map +1 -0
  32. package/dist/server/{chunk-5R4NMVXA.js → chunk-BUCJWG6G.js} +5 -5
  33. package/dist/server/chunk-BUCJWG6G.js.map +1 -0
  34. package/dist/server/chunk-D2QLTPUJ.mjs +33 -0
  35. package/dist/server/chunk-D2QLTPUJ.mjs.map +1 -0
  36. package/dist/server/chunk-GERCMTPQ.js +33 -0
  37. package/dist/server/chunk-GERCMTPQ.js.map +1 -0
  38. package/dist/server/{chunk-SF63XAX7.js → chunk-IT5ICP43.js} +24 -4
  39. package/dist/server/chunk-IT5ICP43.js.map +1 -0
  40. package/dist/server/{chunk-QFFQTOY3.mjs → chunk-N3PX76AP.mjs} +11 -3
  41. package/dist/server/{chunk-QFFQTOY3.mjs.map → chunk-N3PX76AP.mjs.map} +1 -1
  42. package/dist/server/{chunk-O5DC7MYW.mjs → chunk-NKXS4TBK.mjs} +24 -4
  43. package/dist/server/chunk-NKXS4TBK.mjs.map +1 -0
  44. package/dist/server/{chunk-INWKF3IC.js → chunk-P6CDRJN3.js} +8 -8
  45. package/dist/server/{chunk-INWKF3IC.js.map → chunk-P6CDRJN3.js.map} +1 -1
  46. package/dist/server/{chunk-UFVCBGBY.js → chunk-R5B6IOFQ.js} +11 -3
  47. package/dist/server/chunk-R5B6IOFQ.js.map +1 -0
  48. package/dist/server/{chunk-FK64TZBT.mjs → chunk-SFQ7VF3G.mjs} +2 -2
  49. package/dist/server/{chunk-62ZJI564.js → chunk-SWPHIUVE.js} +7 -6
  50. package/dist/server/chunk-SWPHIUVE.js.map +1 -0
  51. package/dist/server/{chunk-PN3CHDVX.mjs → chunk-XK2YIISA.mjs} +2 -2
  52. package/dist/server/chunk-XK2YIISA.mjs.map +1 -0
  53. package/dist/server/{chunk-YXDDFG3N.js → chunk-Y7347JMZ.js} +3 -2
  54. package/dist/server/chunk-Y7347JMZ.js.map +1 -0
  55. package/dist/server/{chunk-JTAERCX2.mjs → chunk-ZEAJW6T3.mjs} +5 -4
  56. package/dist/server/chunk-ZEAJW6T3.mjs.map +1 -0
  57. package/dist/server/chunk-ZIM53VP6.js +406 -0
  58. package/dist/server/chunk-ZIM53VP6.js.map +1 -0
  59. package/dist/server/{components-CI3JiOYA.d.mts → components-Bo3LPpVb.d.mts} +3 -3
  60. package/dist/server/{components-DJBLu_yc.d.ts → components-ClFs4PUa.d.ts} +3 -3
  61. package/dist/server/components.d.mts +7 -6
  62. package/dist/server/components.d.ts +7 -6
  63. package/dist/server/components.js +3 -3
  64. package/dist/server/components.mjs +2 -2
  65. package/dist/server/config-validation.d.mts +5 -300
  66. package/dist/server/config-validation.d.ts +5 -300
  67. package/dist/server/config-validation.js +6 -3
  68. package/dist/server/config-validation.js.map +1 -1
  69. package/dist/server/config-validation.mjs +5 -2
  70. package/dist/server/config.d.mts +43 -4
  71. package/dist/server/config.d.ts +43 -4
  72. package/dist/server/config.js +27 -3
  73. package/dist/server/config.js.map +1 -1
  74. package/dist/server/config.mjs +26 -2
  75. package/dist/server/config.mjs.map +1 -1
  76. package/dist/server/data.d.mts +8 -5
  77. package/dist/server/data.d.ts +8 -5
  78. package/dist/server/data.js +2 -2
  79. package/dist/server/data.mjs +1 -1
  80. package/dist/server/{index-Dus2gkY6.d.ts → index-DbSfrRA0.d.ts} +1 -1
  81. package/dist/server/{index-DoX3ELQn.d.mts → index-Dj7VKH34.d.mts} +1 -1
  82. package/dist/server/index.d.mts +5 -4
  83. package/dist/server/index.d.ts +5 -4
  84. package/dist/server/index.js +6 -2
  85. package/dist/server/index.js.map +1 -1
  86. package/dist/server/index.mjs +5 -1
  87. package/dist/server/{loadContent-CdXDGsJM.d.ts → loadContent-C2SwqmXy.d.ts} +4 -4
  88. package/dist/server/{loadContent-v2n6pOlO.d.mts → loadContent-C_FipaAC.d.mts} +4 -4
  89. package/dist/server/loadPage-DUHBXDEW.js +11 -0
  90. package/dist/server/{loadPage-3ECPF426.js.map → loadPage-DUHBXDEW.js.map} +1 -1
  91. package/dist/server/{loadPage-LW273NYO.mjs → loadPage-LYVKY3WZ.mjs} +3 -3
  92. package/dist/server/{loadPage-en10WQrt.d.mts → loadPage-mavT3Jae.d.mts} +22 -3
  93. package/dist/server/{loadPage-bejlajm9.d.ts → loadPage-naVvoua8.d.ts} +22 -3
  94. package/dist/server/metadata.d.mts +5 -4
  95. package/dist/server/metadata.d.ts +5 -4
  96. package/dist/server/navigation.d.mts +2 -2
  97. package/dist/server/navigation.d.ts +2 -2
  98. package/dist/server/rendering/server.d.mts +8 -7
  99. package/dist/server/rendering/server.d.ts +8 -7
  100. package/dist/server/rendering/server.js +4 -4
  101. package/dist/server/rendering/server.mjs +3 -3
  102. package/dist/server/rendering.d.mts +9 -8
  103. package/dist/server/rendering.d.ts +9 -8
  104. package/dist/server/rendering.js +6 -6
  105. package/dist/server/rendering.mjs +5 -5
  106. package/dist/server/routing.d.mts +5 -4
  107. package/dist/server/routing.d.ts +5 -4
  108. package/dist/server/routing.js +1 -1
  109. package/dist/server/routing.mjs +1 -1
  110. package/dist/server/server.d.mts +7 -6
  111. package/dist/server/server.d.ts +7 -6
  112. package/dist/server/server.js +4 -4
  113. package/dist/server/server.mjs +3 -3
  114. package/dist/server/theme-bridge.js +7 -7
  115. package/dist/server/theme-bridge.mjs +1 -1
  116. package/dist/server/{types-Cc7lyPkN.d.ts → types-5XdVD2J1.d.ts} +2 -0
  117. package/dist/server/{types-nVerjjdv.d.mts → types-BA-J9K8r.d.mts} +2 -0
  118. package/dist/server/{types-CLusapsM.d.mts → types-BC9eB2KH.d.mts} +65 -17
  119. package/dist/server/{types-Ls6BkLKg.d.ts → types-CAnC529E.d.ts} +65 -17
  120. package/dist/server/{types-D-rqOU5I.d.ts → types-CMqVHYLG.d.ts} +264 -2
  121. package/dist/server/{types-Bq3520hK.d.mts → types-CYfHxUhe.d.mts} +264 -2
  122. package/dist/server/{types-_nDnPHpv.d.mts → types-CbagRQ_7.d.mts} +19 -1
  123. package/dist/server/{types-_nDnPHpv.d.ts → types-DuQCNVV0.d.ts} +19 -1
  124. package/dist/server/validation-C7W2Fe0i.d.ts +459 -0
  125. package/dist/server/validation-hg1sqhrt.d.mts +459 -0
  126. package/package.json +2 -1
  127. package/dist/server/chunk-5R4NMVXA.js.map +0 -1
  128. package/dist/server/chunk-62ZJI564.js.map +0 -1
  129. package/dist/server/chunk-BPKYRPCQ.mjs +0 -215
  130. package/dist/server/chunk-BPKYRPCQ.mjs.map +0 -1
  131. package/dist/server/chunk-GWBMJPLH.mjs.map +0 -1
  132. package/dist/server/chunk-JTAERCX2.mjs.map +0 -1
  133. package/dist/server/chunk-O5DC7MYW.mjs.map +0 -1
  134. package/dist/server/chunk-PN3CHDVX.mjs.map +0 -1
  135. package/dist/server/chunk-SF63XAX7.js.map +0 -1
  136. package/dist/server/chunk-UFVCBGBY.js.map +0 -1
  137. package/dist/server/chunk-XLVL5WPH.js +0 -215
  138. package/dist/server/chunk-XLVL5WPH.js.map +0 -1
  139. package/dist/server/chunk-YXDDFG3N.js.map +0 -1
  140. package/dist/server/loadPage-3ECPF426.js +0 -11
  141. /package/dist/server/{chunk-FK64TZBT.mjs.map → chunk-SFQ7VF3G.mjs.map} +0 -0
  142. /package/dist/server/{loadPage-LW273NYO.mjs.map → loadPage-LYVKY3WZ.mjs.map} +0 -0
@@ -1,3 +1,5 @@
1
+ import { B as BlockKind } from './blockKinds-B6MWzNWp.mjs';
2
+
1
3
  /**
2
4
  * Data loading types for block prefetching.
3
5
  * Shared between frontend and SDK implementations.
@@ -30,6 +32,7 @@ type ResolvedBlockData = Record<string, Record<string, unknown>>;
30
32
  * These types enable SDK sites to define loader functions that fetch
31
33
  * data from external APIs (not just CMS endpoints).
32
34
  */
35
+
33
36
  /**
34
37
  * Context provided to code-based data loaders.
35
38
  *
@@ -44,7 +47,7 @@ interface DataLoaderContext {
44
47
  /** Unique block instance ID */
45
48
  blockId: string;
46
49
  /** Block kind (e.g., 'custom.featured-products') */
47
- blockKind: string;
50
+ blockKind: BlockKind;
48
51
  /**
49
52
  * The block's CMS content.
50
53
  * Use this to access field values for parameterizing API calls.
@@ -52,6 +55,21 @@ interface DataLoaderContext {
52
55
  content: Record<string, unknown>;
53
56
  /** Whether fetching preview/draft content */
54
57
  previewStage: 'published' | 'preview';
58
+ /**
59
+ * URL search parameters from the page request.
60
+ * Use for pagination, filtering, or sorting based on URL params.
61
+ *
62
+ * Always defined (defaults to empty object if not provided to loadPage).
63
+ * This allows loaders to safely access properties without null checks.
64
+ *
65
+ * @example
66
+ * ```typescript
67
+ * const page = parseInt(searchParams?.page as string || '1', 10);
68
+ * const limit = parseInt(content.postsPerPage as string || '12', 10);
69
+ * const offset = (page - 1) * limit;
70
+ * ```
71
+ */
72
+ searchParams: Record<string, string | string[] | undefined>;
55
73
  }
56
74
  /**
57
75
  * A code-based data loader function.
@@ -1,3 +1,5 @@
1
+ import { B as BlockKind } from './blockKinds-B6MWzNWp.js';
2
+
1
3
  /**
2
4
  * Data loading types for block prefetching.
3
5
  * Shared between frontend and SDK implementations.
@@ -30,6 +32,7 @@ type ResolvedBlockData = Record<string, Record<string, unknown>>;
30
32
  * These types enable SDK sites to define loader functions that fetch
31
33
  * data from external APIs (not just CMS endpoints).
32
34
  */
35
+
33
36
  /**
34
37
  * Context provided to code-based data loaders.
35
38
  *
@@ -44,7 +47,7 @@ interface DataLoaderContext {
44
47
  /** Unique block instance ID */
45
48
  blockId: string;
46
49
  /** Block kind (e.g., 'custom.featured-products') */
47
- blockKind: string;
50
+ blockKind: BlockKind;
48
51
  /**
49
52
  * The block's CMS content.
50
53
  * Use this to access field values for parameterizing API calls.
@@ -52,6 +55,21 @@ interface DataLoaderContext {
52
55
  content: Record<string, unknown>;
53
56
  /** Whether fetching preview/draft content */
54
57
  previewStage: 'published' | 'preview';
58
+ /**
59
+ * URL search parameters from the page request.
60
+ * Use for pagination, filtering, or sorting based on URL params.
61
+ *
62
+ * Always defined (defaults to empty object if not provided to loadPage).
63
+ * This allows loaders to safely access properties without null checks.
64
+ *
65
+ * @example
66
+ * ```typescript
67
+ * const page = parseInt(searchParams?.page as string || '1', 10);
68
+ * const limit = parseInt(content.postsPerPage as string || '12', 10);
69
+ * const offset = (page - 1) * limit;
70
+ * ```
71
+ */
72
+ searchParams: Record<string, string | string[] | undefined>;
55
73
  }
56
74
  /**
57
75
  * A code-based data loader function.
@@ -0,0 +1,459 @@
1
+ import { z } from 'zod';
2
+ import { S as SdkCustomBlock } from './schema-Bpy9N5ZI.js';
3
+ import { C as ContentConfig, l as ContentTypeConfig, R as RiverbankSiteConfig, i as BlockFieldOptionsMap, j as BlockFieldExtension, k as BlockFieldExtensionsMap } from './types-CMqVHYLG.js';
4
+
5
+ /**
6
+ * SDK Content Config Validation
7
+ *
8
+ * Zod schemas for validating SDK content configuration.
9
+ */
10
+
11
+ /**
12
+ * Content type config schema.
13
+ */
14
+ declare const contentTypeConfigSchema: z.ZodType<ContentTypeConfig>;
15
+ declare const blockConfigSchema: z.ZodObject<{
16
+ kind: z.ZodString;
17
+ content: z.ZodRecord<z.ZodString, z.ZodAny>;
18
+ orderIndex: z.ZodOptional<z.ZodNumber>;
19
+ }, z.core.$strip>;
20
+ declare const pageConfigSchema: z.ZodObject<{
21
+ identifier: z.ZodString;
22
+ title: z.ZodString;
23
+ path: z.ZodString;
24
+ purpose: z.ZodDefault<z.ZodString>;
25
+ blocks: z.ZodOptional<z.ZodArray<z.ZodObject<{
26
+ kind: z.ZodString;
27
+ content: z.ZodRecord<z.ZodString, z.ZodAny>;
28
+ orderIndex: z.ZodOptional<z.ZodNumber>;
29
+ }, z.core.$strip>>>;
30
+ status: z.ZodDefault<z.ZodEnum<{
31
+ published: "published";
32
+ draft: "draft";
33
+ }>>;
34
+ metaTitle: z.ZodOptional<z.ZodString>;
35
+ metaDescription: z.ZodOptional<z.ZodString>;
36
+ }, z.core.$strip>;
37
+ declare const entryConfigSchema: z.ZodObject<{
38
+ identifier: z.ZodString;
39
+ contentType: z.ZodString;
40
+ data: z.ZodRecord<z.ZodString, z.ZodAny>;
41
+ status: z.ZodDefault<z.ZodEnum<{
42
+ published: "published";
43
+ draft: "draft";
44
+ }>>;
45
+ slug: z.ZodOptional<z.ZodString>;
46
+ title: z.ZodOptional<z.ZodString>;
47
+ summary: z.ZodOptional<z.ZodString>;
48
+ metaTitle: z.ZodOptional<z.ZodString>;
49
+ metaDescription: z.ZodOptional<z.ZodString>;
50
+ }, z.core.$strip>;
51
+ declare const navigationItemConfigSchema: z.ZodType<{
52
+ label: string;
53
+ link: {
54
+ kind: 'page';
55
+ identifier: string;
56
+ } | {
57
+ kind: 'entry';
58
+ identifier: string;
59
+ } | {
60
+ kind: 'external';
61
+ href: string;
62
+ } | {
63
+ kind: 'dropdown';
64
+ };
65
+ isCta?: boolean;
66
+ children?: Array<{
67
+ label: string;
68
+ link: {
69
+ kind: 'page';
70
+ identifier: string;
71
+ } | {
72
+ kind: 'entry';
73
+ identifier: string;
74
+ } | {
75
+ kind: 'external';
76
+ href: string;
77
+ } | {
78
+ kind: 'dropdown';
79
+ };
80
+ isCta?: boolean;
81
+ children?: unknown[];
82
+ }>;
83
+ }>;
84
+ declare const navigationMenuConfigSchema: z.ZodObject<{
85
+ identifier: z.ZodString;
86
+ name: z.ZodString;
87
+ isPrimary: z.ZodOptional<z.ZodBoolean>;
88
+ items: z.ZodArray<z.ZodType<{
89
+ label: string;
90
+ link: {
91
+ kind: "page";
92
+ identifier: string;
93
+ } | {
94
+ kind: "entry";
95
+ identifier: string;
96
+ } | {
97
+ kind: "external";
98
+ href: string;
99
+ } | {
100
+ kind: "dropdown";
101
+ };
102
+ isCta?: boolean;
103
+ children?: Array<{
104
+ label: string;
105
+ link: {
106
+ kind: "page";
107
+ identifier: string;
108
+ } | {
109
+ kind: "entry";
110
+ identifier: string;
111
+ } | {
112
+ kind: "external";
113
+ href: string;
114
+ } | {
115
+ kind: "dropdown";
116
+ };
117
+ isCta?: boolean;
118
+ children?: unknown[];
119
+ }>;
120
+ }, unknown, z.core.$ZodTypeInternals<{
121
+ label: string;
122
+ link: {
123
+ kind: "page";
124
+ identifier: string;
125
+ } | {
126
+ kind: "entry";
127
+ identifier: string;
128
+ } | {
129
+ kind: "external";
130
+ href: string;
131
+ } | {
132
+ kind: "dropdown";
133
+ };
134
+ isCta?: boolean;
135
+ children?: Array<{
136
+ label: string;
137
+ link: {
138
+ kind: "page";
139
+ identifier: string;
140
+ } | {
141
+ kind: "entry";
142
+ identifier: string;
143
+ } | {
144
+ kind: "external";
145
+ href: string;
146
+ } | {
147
+ kind: "dropdown";
148
+ };
149
+ isCta?: boolean;
150
+ children?: unknown[];
151
+ }>;
152
+ }, unknown>>>;
153
+ }, z.core.$strip>;
154
+ declare const siteSettingsConfigSchema: z.ZodObject<{
155
+ homepagePath: z.ZodOptional<z.ZodString>;
156
+ siteTitle: z.ZodOptional<z.ZodString>;
157
+ siteDescription: z.ZodOptional<z.ZodString>;
158
+ defaultTemplates: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
159
+ }, z.core.$strip>;
160
+ declare const contentConfigSchema: z.ZodType<ContentConfig>;
161
+ type ContentConfigInput = z.input<typeof contentConfigSchema>;
162
+ type ContentConfigOutput = z.output<typeof contentConfigSchema>;
163
+
164
+ /**
165
+ * Zod validation schemas for SDK site configuration.
166
+ *
167
+ * These schemas are used to validate configuration fetched from
168
+ * SDK sites before storing in the database.
169
+ */
170
+
171
+ /**
172
+ * Schema for SDK theme palette.
173
+ * Maps token names to CSS color values.
174
+ */
175
+ declare const sdkThemePaletteSchema: z.ZodRecord<z.ZodString, z.ZodString>;
176
+ /**
177
+ * Schema for SDK theme configuration.
178
+ */
179
+ declare const sdkThemeConfigSchema: z.ZodObject<{
180
+ palette: z.ZodRecord<z.ZodString, z.ZodString>;
181
+ }, z.core.$strip>;
182
+ /**
183
+ * Schema for section background color options.
184
+ */
185
+ declare const sectionBackgroundSchema: z.ZodObject<{
186
+ id: z.ZodString;
187
+ label: z.ZodString;
188
+ token: z.ZodString;
189
+ }, z.core.$strip>;
190
+ /**
191
+ * Schema for section spacing values.
192
+ */
193
+ declare const sectionSpacingSchema: z.ZodEnum<{
194
+ default: "default";
195
+ compact: "compact";
196
+ spacious: "spacious";
197
+ }>;
198
+ /**
199
+ * Schema for container max-width values.
200
+ */
201
+ declare const containerMaxWidthSchema: z.ZodEnum<{
202
+ default: "default";
203
+ full: "full";
204
+ narrow: "narrow";
205
+ wide: "wide";
206
+ }>;
207
+ /**
208
+ * Schema for container alignment values.
209
+ */
210
+ declare const containerAlignmentSchema: z.ZodEnum<{
211
+ center: "center";
212
+ left: "left";
213
+ right: "right";
214
+ }>;
215
+ /**
216
+ * Schema for section options configuration.
217
+ */
218
+ declare const sectionOptionsSchema: z.ZodOptional<z.ZodObject<{
219
+ backgroundColor: z.ZodOptional<z.ZodBoolean>;
220
+ backgroundImage: z.ZodOptional<z.ZodBoolean>;
221
+ backgroundGradient: z.ZodOptional<z.ZodBoolean>;
222
+ spacing: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodEnum<{
223
+ default: "default";
224
+ compact: "compact";
225
+ spacious: "spacious";
226
+ }>>, z.ZodBoolean]>>;
227
+ textColor: z.ZodOptional<z.ZodBoolean>;
228
+ }, z.core.$strip>>;
229
+ /**
230
+ * Schema for container options configuration.
231
+ */
232
+ declare const containerOptionsSchema: z.ZodOptional<z.ZodObject<{
233
+ maxWidth: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodEnum<{
234
+ default: "default";
235
+ full: "full";
236
+ narrow: "narrow";
237
+ wide: "wide";
238
+ }>>, z.ZodBoolean]>>;
239
+ alignment: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodEnum<{
240
+ center: "center";
241
+ left: "left";
242
+ right: "right";
243
+ }>>, z.ZodBoolean]>>;
244
+ }, z.core.$strip>>;
245
+ /**
246
+ * Schema for site style configuration.
247
+ */
248
+ declare const siteStyleConfigSchema: z.ZodOptional<z.ZodObject<{
249
+ sectionBackgrounds: z.ZodOptional<z.ZodArray<z.ZodObject<{
250
+ id: z.ZodString;
251
+ label: z.ZodString;
252
+ token: z.ZodString;
253
+ }, z.core.$strip>>>;
254
+ sectionOptions: z.ZodOptional<z.ZodObject<{
255
+ backgroundColor: z.ZodOptional<z.ZodBoolean>;
256
+ backgroundImage: z.ZodOptional<z.ZodBoolean>;
257
+ backgroundGradient: z.ZodOptional<z.ZodBoolean>;
258
+ spacing: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodEnum<{
259
+ default: "default";
260
+ compact: "compact";
261
+ spacious: "spacious";
262
+ }>>, z.ZodBoolean]>>;
263
+ textColor: z.ZodOptional<z.ZodBoolean>;
264
+ }, z.core.$strip>>;
265
+ containerOptions: z.ZodOptional<z.ZodObject<{
266
+ maxWidth: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodEnum<{
267
+ default: "default";
268
+ full: "full";
269
+ narrow: "narrow";
270
+ wide: "wide";
271
+ }>>, z.ZodBoolean]>>;
272
+ alignment: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodEnum<{
273
+ center: "center";
274
+ left: "left";
275
+ right: "right";
276
+ }>>, z.ZodBoolean]>>;
277
+ }, z.core.$strip>>;
278
+ }, z.core.$strip>>;
279
+ /**
280
+ * Whitelisted endpoints for SDK data loaders.
281
+ *
282
+ * These are the only CMS endpoints that can be called from config-based loaders.
283
+ * This ensures SDK sites can only access safe, read-only public endpoints.
284
+ *
285
+ * Derived from SUPPORTED_LOADER_ENDPOINTS - the single source of truth.
286
+ */
287
+ declare const sdkLoaderEndpointSchema: z.ZodEnum<{
288
+ listPublishedEntries: "listPublishedEntries";
289
+ getPublishedEntryPreview: "getPublishedEntryPreview";
290
+ listPublicEvents: "listPublicEvents";
291
+ getPublicFormById: "getPublicFormById";
292
+ getPublicBookingServices: "getPublicBookingServices";
293
+ }>;
294
+ /**
295
+ * A binding expression for dynamic loader params.
296
+ *
297
+ * @example
298
+ * ```typescript
299
+ * { $bind: { from: 'content.categoryId' } }
300
+ * { $bind: { from: '$root.siteId' } }
301
+ * { $bind: { from: 'content.limit', fallback: '10' } }
302
+ * ```
303
+ */
304
+ declare const loaderParamBindingSchema: z.ZodObject<{
305
+ $bind: z.ZodObject<{
306
+ from: z.ZodString;
307
+ fallback: z.ZodOptional<z.ZodString>;
308
+ }, z.core.$strip>;
309
+ }, z.core.$strip>;
310
+ /**
311
+ * A loader param value can be static or a binding expression.
312
+ */
313
+ declare const loaderParamValueSchema: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodObject<{
314
+ $bind: z.ZodObject<{
315
+ from: z.ZodString;
316
+ fallback: z.ZodOptional<z.ZodString>;
317
+ }, z.core.$strip>;
318
+ }, z.core.$strip>]>;
319
+ /**
320
+ * Schema for config-based data loader.
321
+ *
322
+ * Config loaders execute server-side during loadPage() and are
323
+ * restricted to whitelisted CMS endpoints.
324
+ */
325
+ declare const sdkConfigLoaderSchema: z.ZodObject<{
326
+ endpoint: z.ZodEnum<{
327
+ listPublishedEntries: "listPublishedEntries";
328
+ getPublishedEntryPreview: "getPublishedEntryPreview";
329
+ listPublicEvents: "listPublicEvents";
330
+ getPublicFormById: "getPublicFormById";
331
+ getPublicBookingServices: "getPublicBookingServices";
332
+ }>;
333
+ params: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodObject<{
334
+ $bind: z.ZodObject<{
335
+ from: z.ZodString;
336
+ fallback: z.ZodOptional<z.ZodString>;
337
+ }, z.core.$strip>;
338
+ }, z.core.$strip>]>>;
339
+ mode: z.ZodDefault<z.ZodEnum<{
340
+ server: "server";
341
+ client: "client";
342
+ }>>;
343
+ }, z.core.$strip>;
344
+ /**
345
+ * Schema for the dataLoaders field on custom blocks.
346
+ * Validates the loader configuration and limits the number of loaders.
347
+ */
348
+ declare const sdkDataLoadersSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
349
+ endpoint: z.ZodEnum<{
350
+ listPublishedEntries: "listPublishedEntries";
351
+ getPublishedEntryPreview: "getPublishedEntryPreview";
352
+ listPublicEvents: "listPublicEvents";
353
+ getPublicFormById: "getPublicFormById";
354
+ getPublicBookingServices: "getPublicBookingServices";
355
+ }>;
356
+ params: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodObject<{
357
+ $bind: z.ZodObject<{
358
+ from: z.ZodString;
359
+ fallback: z.ZodOptional<z.ZodString>;
360
+ }, z.core.$strip>;
361
+ }, z.core.$strip>]>>;
362
+ mode: z.ZodDefault<z.ZodEnum<{
363
+ server: "server";
364
+ client: "client";
365
+ }>>;
366
+ }, z.core.$strip>>>;
367
+ /**
368
+ * Schema for field select option.
369
+ */
370
+ declare const fieldSelectOptionSchema: z.ZodObject<{
371
+ value: z.ZodString;
372
+ label: z.ZodString;
373
+ }, z.core.$strip>;
374
+ /**
375
+ * Schema for per-field configuration within a block.
376
+ */
377
+ declare const blockFieldConfigSchema: z.ZodObject<{
378
+ options: z.ZodOptional<z.ZodArray<z.ZodObject<{
379
+ value: z.ZodString;
380
+ label: z.ZodString;
381
+ }, z.core.$strip>>>;
382
+ }, z.core.$strip>;
383
+ /**
384
+ * Schema for per-block field options.
385
+ *
386
+ * Block IDs must be either 'block.*' (system blocks) or 'custom.*' (custom blocks).
387
+ * Field IDs can be any valid identifier string.
388
+ */
389
+ declare const blockFieldOptionsSchema: z.ZodType<BlockFieldOptionsMap>;
390
+ /**
391
+ * Schema for block field extension configuration.
392
+ *
393
+ * Validates additional fields to be appended to a built-in block.
394
+ * Includes refinement to ensure required fields have defaultValue.
395
+ *
396
+ * Note: Explicit type annotation required due to recursive fieldSchema complexity.
397
+ */
398
+ declare const blockFieldExtensionSchema: z.ZodType<BlockFieldExtension>;
399
+ /**
400
+ * Schema for block field extensions map.
401
+ *
402
+ * Block IDs must be system blocks (e.g., 'block.bodyText', 'block.hero').
403
+ * Custom blocks ('custom.*') should define their fields directly, not via extensions.
404
+ */
405
+ declare const blockFieldExtensionsSchema: z.ZodType<BlockFieldExtensionsMap | undefined>;
406
+ /**
407
+ * Validates that extended field IDs don't conflict with existing block fields.
408
+ *
409
+ * This validation should be called during config push to provide clear error messages.
410
+ * Returns an array of conflict errors, or empty array if valid.
411
+ *
412
+ * @example
413
+ * ```typescript
414
+ * const conflicts = validateFieldIdConflicts(config.blockFieldExtensions);
415
+ * if (conflicts.length > 0) {
416
+ * throw new Error(conflicts.map(c => c.message).join('\n'));
417
+ * }
418
+ * ```
419
+ */
420
+ declare function validateFieldIdConflicts(blockFieldExtensions?: BlockFieldExtensionsMap | null): {
421
+ blockId: string;
422
+ fieldId: string;
423
+ message: string;
424
+ }[];
425
+ /**
426
+ * Schema for SDK custom block definitions.
427
+ *
428
+ * Validates custom blocks defined in riverbank.config.ts.
429
+ * Reuses fieldSchema from @riverbankcms/blocks for field validation.
430
+ *
431
+ * Note: Explicit type annotation required due to recursive fieldSchema complexity.
432
+ */
433
+ declare const sdkCustomBlockSchema: z.ZodType<SdkCustomBlock>;
434
+ /**
435
+ * Schema for the complete SDK site configuration.
436
+ *
437
+ * Use this schema to validate configuration fetched from SDK sites
438
+ * before storing in the database.
439
+ *
440
+ * @example
441
+ * ```typescript
442
+ * import { riverbankSiteConfigSchema } from '@riverbankcms/sdk/config/validation';
443
+ *
444
+ * const rawConfig = await response.json();
445
+ * const config = riverbankSiteConfigSchema.parse(rawConfig);
446
+ * ```
447
+ */
448
+ declare const riverbankSiteConfigSchema: z.ZodType<RiverbankSiteConfig>;
449
+ /**
450
+ * Type inferred from the validation schema.
451
+ * This should match the RiverbankSiteConfig type from ./types.ts
452
+ */
453
+ type ValidatedRiverbankSiteConfig = z.infer<typeof riverbankSiteConfigSchema>;
454
+ /**
455
+ * Type for a validated SDK custom block.
456
+ */
457
+ type ValidatedSdkCustomBlock = z.infer<typeof sdkCustomBlockSchema>;
458
+
459
+ export { sdkLoaderEndpointSchema as A, loaderParamBindingSchema as B, type ContentConfigInput as C, loaderParamValueSchema as D, sdkConfigLoaderSchema as E, sdkDataLoadersSchema as F, validateFieldIdConflicts as G, type ValidatedRiverbankSiteConfig as V, sectionBackgroundSchema as a, sectionSpacingSchema as b, containerMaxWidthSchema as c, containerAlignmentSchema as d, sectionOptionsSchema as e, containerOptionsSchema as f, sdkThemeConfigSchema as g, sdkThemePaletteSchema as h, sdkCustomBlockSchema as i, fieldSelectOptionSchema as j, blockFieldConfigSchema as k, blockFieldOptionsSchema as l, blockFieldExtensionSchema as m, blockFieldExtensionsSchema as n, contentConfigSchema as o, contentTypeConfigSchema as p, pageConfigSchema as q, riverbankSiteConfigSchema as r, siteStyleConfigSchema as s, entryConfigSchema as t, navigationMenuConfigSchema as u, navigationItemConfigSchema as v, siteSettingsConfigSchema as w, blockConfigSchema as x, type ValidatedSdkCustomBlock as y, type ContentConfigOutput as z };