@riverbankcms/sdk 0.60.7 → 0.60.9

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 (33) hide show
  1. package/dist/_dts/api/src/navigation/linkValue.d.ts +1 -1
  2. package/dist/_dts/blocks/src/index.d.ts +2 -1
  3. package/dist/_dts/blocks/src/system/manifest/fieldValidation/index.d.ts +185 -0
  4. package/dist/_dts/blocks/src/system/manifest/index.d.ts +1 -0
  5. package/dist/_dts/blocks/src/system/manifest/validation.d.ts +2 -84
  6. package/dist/_dts/blocks/src/system/types/link.d.ts +93 -1
  7. package/dist/_dts/db/src/schemas/forms.d.ts +24 -3
  8. package/dist/_dts/editor-blocks/src/widgets/link/LinkSummary.d.ts +1 -1
  9. package/dist/_dts/editor-blocks/src/widgets/link/LinkWidget.d.ts +1 -1
  10. package/dist/_dts/editor-blocks/src/widgets/link/utils.d.ts +1 -1
  11. package/dist/_dts/sdk/src/config/typed-entries.d.ts +36 -1
  12. package/dist/_dts/sdk/src/contracts/content.d.ts +6 -1
  13. package/dist/_dts/sdk/src/contracts/index.d.ts +1 -1
  14. package/dist/_dts/sdk/src/contracts/system-block-content.d.ts +1 -0
  15. package/dist/_dts/sdk/src/version.d.ts +1 -1
  16. package/dist/cli/index.mjs +676 -428
  17. package/dist/client/client.mjs +39991 -39754
  18. package/dist/client/hooks.mjs +1737 -1735
  19. package/dist/client/rendering.mjs +1463 -1226
  20. package/dist/preview-next/client/runtime.mjs +1052 -799
  21. package/dist/server/components.mjs +2983 -2745
  22. package/dist/server/config-validation.mjs +1727 -1725
  23. package/dist/server/config.mjs +1727 -1725
  24. package/dist/server/data.mjs +1737 -1735
  25. package/dist/server/index.mjs +1 -1
  26. package/dist/server/next.mjs +3026 -2788
  27. package/dist/server/page-converter.mjs +10 -10
  28. package/dist/server/prebuild.mjs +1 -1
  29. package/dist/server/rendering/server.mjs +2996 -2758
  30. package/dist/server/rendering.mjs +2996 -2758
  31. package/dist/server/routing.mjs +256 -285
  32. package/dist/server/server.mjs +1738 -1736
  33. package/package.json +1 -1
@@ -4,7 +4,7 @@
4
4
  * Bidirectional conversion between block-level LinkValue (used in the editor)
5
5
  * and LinkPayload (used in the database and API layer).
6
6
  */
7
- import type { LinkValue } from '@riverbankcms/blocks';
7
+ import { type LinkValue } from '@riverbankcms/blocks';
8
8
  import type { LinkPayload, RoutableContentItem } from './types';
9
9
  export declare function toInternalLinkValue(item: RoutableContentItem): LinkValue;
10
10
  export declare function linkValueToPayload(value: LinkValue): LinkPayload;
@@ -27,7 +27,8 @@ export * from "@riverbankcms/theme-core/runtime/buildThemeRuntimeFromBridge";
27
27
  export * from "@riverbankcms/theme-core/blocks";
28
28
  export * from "./system";
29
29
  export { SUPPORTED_LOADER_ENDPOINTS, isSupportedLoaderEndpoint, type SupportedLoaderEndpoint, } from "./system/data";
30
- export type { LinkValue, InternalLinkValue, ExternalLinkValue, CustomLinkValue, PageLinkValue, EntryLinkValue } from "./system/types/link";
30
+ export type { LinkValue, InternalLinkValue, InternalResolvedLinkValue, InternalRouteOnlyLinkValue, ExternalLinkValue, CustomLinkValue, PageLinkValue, EntryLinkValue, } from "./system/types/link";
31
+ export { linkSchema, internalLinkSchema, internalResolvedLinkSchema, internalRouteOnlyLinkSchema, externalLinkSchema, customLinkSchema, pageLinkSchema, entryLinkSchema, isInternalResolvedLinkValue, } from "./system/types/link";
31
32
  export { heroManifest } from "./system/blocks/hero";
32
33
  export type { HeroContent, HeroMedia } from "./system/blocks/hero";
33
34
  export { bodyTextManifest } from "./system/blocks/body-text";
@@ -0,0 +1,185 @@
1
+ import { z } from "zod";
2
+ import { linkSchema, customLinkSchema, entryLinkSchema, externalLinkSchema, internalLinkSchema, internalResolvedLinkSchema, internalRouteOnlyLinkSchema, pageLinkSchema } from "../../types/link";
3
+ import { type FieldDefinition } from "../schema";
4
+ export { linkSchema, customLinkSchema, entryLinkSchema, externalLinkSchema, internalLinkSchema, internalResolvedLinkSchema, internalRouteOnlyLinkSchema, pageLinkSchema, };
5
+ export type FieldPath = readonly (string | number)[];
6
+ export type FieldValidationMode = "strict" | "draft";
7
+ export type FieldValidationOptions = Readonly<{
8
+ allowNull?: boolean;
9
+ allowIncomplete?: boolean;
10
+ mode?: FieldValidationMode;
11
+ }>;
12
+ export type NativeInputValidationProps = Readonly<{
13
+ required?: boolean;
14
+ maxLength?: number;
15
+ min?: number;
16
+ max?: number;
17
+ step?: number;
18
+ type?: "text" | "email" | "tel" | "url" | "number";
19
+ inputMode?: "text" | "email" | "tel" | "url" | "numeric" | "decimal";
20
+ pattern?: string;
21
+ }>;
22
+ type RequiredConstraint = Readonly<{
23
+ kind: "required";
24
+ }>;
25
+ type TextTypeConstraint = Readonly<{
26
+ kind: "textType";
27
+ }>;
28
+ type MaxLengthConstraint = Readonly<{
29
+ kind: "maxLength";
30
+ maximum: number;
31
+ }>;
32
+ type EmailFormatConstraint = Readonly<{
33
+ kind: "emailFormat";
34
+ }>;
35
+ type PhoneFormatConstraint = Readonly<{
36
+ kind: "phoneFormat";
37
+ }>;
38
+ type PatternFormatConstraint = Readonly<{
39
+ kind: "patternFormat";
40
+ pattern: string;
41
+ }>;
42
+ type UrlFormatConstraint = Readonly<{
43
+ kind: "urlFormat";
44
+ allowRelative: boolean;
45
+ }>;
46
+ type NumberTypeConstraint = Readonly<{
47
+ kind: "numberType";
48
+ }>;
49
+ type NumberMinConstraint = Readonly<{
50
+ kind: "numberMin";
51
+ minimum: number;
52
+ }>;
53
+ type NumberMaxConstraint = Readonly<{
54
+ kind: "numberMax";
55
+ maximum: number;
56
+ }>;
57
+ type SlugFormatConstraint = Readonly<{
58
+ kind: "slugFormat";
59
+ }>;
60
+ type SelectOptionConstraint = Readonly<{
61
+ kind: "selectOption";
62
+ source: SelectConstraintSource;
63
+ multiple: boolean;
64
+ }>;
65
+ type ArrayTypeConstraint = Readonly<{
66
+ kind: "arrayType";
67
+ }>;
68
+ type MinItemsConstraint = Readonly<{
69
+ kind: "minItems";
70
+ minimum: number;
71
+ }>;
72
+ type MaxItemsConstraint = Readonly<{
73
+ kind: "maxItems";
74
+ maximum: number;
75
+ }>;
76
+ type RichTextDocConstraint = Readonly<{
77
+ kind: "richTextDoc";
78
+ }>;
79
+ type MediaObjectConstraint = Readonly<{
80
+ kind: "mediaObject";
81
+ }>;
82
+ type LinkObjectConstraint = Readonly<{
83
+ kind: "linkObject";
84
+ }>;
85
+ type ReferenceTextConstraint = Readonly<{
86
+ kind: "referenceText";
87
+ }>;
88
+ type StringConstraint = RequiredConstraint | TextTypeConstraint | MaxLengthConstraint | EmailFormatConstraint | PhoneFormatConstraint | PatternFormatConstraint | UrlFormatConstraint | SlugFormatConstraint | ReferenceTextConstraint;
89
+ type NumberConstraint = RequiredConstraint | NumberTypeConstraint | NumberMinConstraint | NumberMaxConstraint;
90
+ type SelectConstraint = RequiredConstraint | SelectOptionConstraint;
91
+ type ArrayConstraint = RequiredConstraint | ArrayTypeConstraint | MinItemsConstraint | MaxItemsConstraint;
92
+ type ObjectConstraint = RequiredConstraint | RichTextDocConstraint | MediaObjectConstraint | LinkObjectConstraint;
93
+ type BooleanConstraint = RequiredConstraint;
94
+ export type FieldConstraint = StringConstraint | NumberConstraint | SelectConstraint | ArrayConstraint | ObjectConstraint | BooleanConstraint;
95
+ export type SelectConstraintSource = Readonly<{
96
+ kind: "static";
97
+ values: readonly string[];
98
+ }> | Readonly<{
99
+ kind: "runtime";
100
+ source: "site" | "sdk";
101
+ }>;
102
+ export type FieldValidationIssue = BaseIssue<"required", {
103
+ emptyOrigin?: "string" | "array";
104
+ }> | BaseIssue<"wrongType", {
105
+ expected: string;
106
+ }> | BaseIssue<"tooLong", {
107
+ maximum: number;
108
+ }> | BaseIssue<"invalidEmail"> | BaseIssue<"invalidPhone"> | BaseIssue<"invalidPattern"> | BaseIssue<"invalidUrl"> | BaseIssue<"invalidNumber"> | BaseIssue<"tooSmall", {
109
+ minimum: number;
110
+ }> | BaseIssue<"tooLarge", {
111
+ maximum: number;
112
+ }> | BaseIssue<"invalidSlug"> | BaseIssue<"invalidOption"> | BaseIssue<"tooFewItems", {
113
+ minimum: number;
114
+ itemLabel: string;
115
+ }> | BaseIssue<"tooManyItems", {
116
+ maximum: number;
117
+ itemLabel: string;
118
+ }> | BaseIssue<"invalidRichText"> | BaseIssue<"invalidMedia"> | BaseIssue<"invalidLink"> | BaseIssue<"invalidReference">;
119
+ type BaseIssue<K extends string, Extra extends object = Record<never, never>> = Readonly<{
120
+ kind: K;
121
+ path: FieldPath;
122
+ fieldId: string;
123
+ label: string;
124
+ }> & Readonly<Extra>;
125
+ type PlanBase<K extends string, ValueKind extends string, Constraints extends FieldConstraint> = Readonly<{
126
+ kind: K;
127
+ valueKind: ValueKind;
128
+ fieldId: string;
129
+ label: string;
130
+ fieldType: FieldDefinition["type"];
131
+ path: FieldPath;
132
+ required: boolean;
133
+ constraints: readonly Constraints[];
134
+ }>;
135
+ export type StringFieldValidationPlan = PlanBase<"string", "string", StringConstraint> & Readonly<{
136
+ fieldType: "text" | "slug" | "url" | "reference" | "date" | "time" | "datetime";
137
+ }>;
138
+ export type NumberFieldValidationPlan = PlanBase<"number", "number", NumberConstraint> & Readonly<{
139
+ fieldType: "number" | "text";
140
+ }>;
141
+ export type BooleanFieldValidationPlan = PlanBase<"boolean", "boolean", BooleanConstraint> & Readonly<{
142
+ fieldType: "boolean";
143
+ }>;
144
+ export type RichTextFieldValidationPlan = PlanBase<"richText", "object", ObjectConstraint> & Readonly<{
145
+ fieldType: "richText";
146
+ }>;
147
+ export type MediaFieldValidationPlan = PlanBase<"media", "object", ObjectConstraint> & Readonly<{
148
+ fieldType: "media";
149
+ }>;
150
+ export type LinkFieldValidationPlan = PlanBase<"link", "object", ObjectConstraint> & Readonly<{
151
+ fieldType: "link";
152
+ }>;
153
+ export type SelectFieldValidationPlan = PlanBase<"select", "select", SelectConstraint> & Readonly<{
154
+ fieldType: "select";
155
+ }>;
156
+ export type RepeaterFieldValidationPlan = PlanBase<"repeater", "array", ArrayConstraint> & Readonly<{
157
+ fieldType: "repeater";
158
+ repeatedItemPlan?: readonly FieldValidationPlan[];
159
+ repeatedItemVariants?: readonly RepeatedItemValidationPlan[];
160
+ }>;
161
+ export type GroupFieldValidationPlan = PlanBase<"group", "object", ObjectConstraint> & Readonly<{
162
+ fieldType: "group" | "modal" | "tabGroup";
163
+ children: readonly FieldValidationPlan[];
164
+ allowNullChildren?: boolean;
165
+ }>;
166
+ export type PassthroughFieldValidationPlan = PlanBase<"passthrough", "unknown", RequiredConstraint> & Readonly<{
167
+ fieldType: "presetOrCustom" | "contentTypeSelect" | "entryPicker";
168
+ }>;
169
+ export type FieldValidationPlan = StringFieldValidationPlan | NumberFieldValidationPlan | BooleanFieldValidationPlan | RichTextFieldValidationPlan | MediaFieldValidationPlan | LinkFieldValidationPlan | SelectFieldValidationPlan | RepeaterFieldValidationPlan | GroupFieldValidationPlan | PassthroughFieldValidationPlan;
170
+ export type RepeatedItemValidationPlan = Readonly<{
171
+ typeId: string;
172
+ fields: readonly FieldValidationPlan[];
173
+ }>;
174
+ export declare function formatFieldPath(path: FieldPath): string;
175
+ export declare function toZodIssuePath(path: FieldPath): (string | number)[];
176
+ export declare function parseFieldPathKey(key: string): FieldPath;
177
+ export declare function fieldIssueToMessage(issue: FieldValidationIssue): string;
178
+ export declare function deriveFieldValidationPlan(field: FieldDefinition, path?: FieldPath): FieldValidationPlan;
179
+ export declare function fieldPlanToNativeInputProps(plan: FieldValidationPlan): NativeInputValidationProps;
180
+ export declare function normalizeFieldInput(plan: FieldValidationPlan, value: unknown, options?: FieldValidationOptions): unknown;
181
+ export declare function validateFieldValue(plan: FieldValidationPlan, value: unknown, options?: FieldValidationOptions): FieldValidationIssue[];
182
+ export declare function fieldPlanToZod(plan: FieldValidationPlan, options?: FieldValidationOptions): z.ZodTypeAny;
183
+ export declare function validateManifestValues(fields: readonly FieldDefinition[], values: Record<string, unknown>, options?: FieldValidationOptions): FieldValidationIssue[];
184
+ export declare function isEmptyValue(value: unknown): boolean;
185
+ export declare function isEmptyRichTextDoc(value: unknown): boolean;
@@ -1,5 +1,6 @@
1
1
  export * from "./augmentManifest";
2
2
  export * from "./fieldPath";
3
+ export * from "./fieldValidation";
3
4
  export * from "./registry";
4
5
  export * from "./schema";
5
6
  export * from "./validation";
@@ -1,5 +1,5 @@
1
1
  import { z } from "zod";
2
- import { type BlockManifest, type FieldDefinition } from "./schema";
2
+ import type { BlockManifest, FieldDefinition } from "./schema";
3
3
  type ValidatorOptions = {
4
4
  allowNull?: boolean;
5
5
  /**
@@ -15,89 +15,7 @@ type ValidatorOptions = {
15
15
  * Use 'draft' mode in preview/editing contexts where users need to temporarily
16
16
  * have empty fields without validation errors causing blocks to disappear.
17
17
  */
18
- mode?: 'strict' | 'draft';
18
+ mode?: "strict" | "draft";
19
19
  };
20
20
  export declare function createManifestValidator(manifestOrFields: BlockManifest | FieldDefinition[], options?: ValidatorOptions): z.ZodType<Record<string, unknown>>;
21
- /**
22
- * Schema for internal links (created via dashboard link picker).
23
- * These have pre-resolved hrefs from the route map.
24
- */
25
- export declare const internalLinkSchema: z.ZodObject<{
26
- kind: z.ZodLiteral<"internal">;
27
- routeId: z.ZodString;
28
- entityId: z.ZodOptional<z.ZodString>;
29
- entityType: z.ZodOptional<z.ZodEnum<{
30
- content: "content";
31
- page: "page";
32
- }>>;
33
- href: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
34
- title: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
35
- typeLabel: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
36
- contentTypeKey: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
37
- contentTypeName: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
38
- updatedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
39
- }, z.core.$loose>;
40
- /**
41
- * Schema for external links (absolute URLs).
42
- */
43
- export declare const externalLinkSchema: z.ZodObject<{
44
- kind: z.ZodLiteral<"external">;
45
- href: z.ZodString;
46
- }, z.core.$loose>;
47
- /**
48
- * Schema for custom URL links (relative or absolute paths).
49
- */
50
- export declare const customLinkSchema: z.ZodObject<{
51
- kind: z.ZodLiteral<"url">;
52
- href: z.ZodString;
53
- }, z.core.$loose>;
54
- /**
55
- * Schema for SDK page links (resolved at render time via pagesByIdentifier).
56
- * Used in SDK content configs to link to pages by identifier.
57
- */
58
- export declare const pageLinkSchema: z.ZodObject<{
59
- kind: z.ZodLiteral<"page">;
60
- identifier: z.ZodString;
61
- }, z.core.$loose>;
62
- /**
63
- * Schema for SDK entry links (resolved at render time via entriesByIdentifier).
64
- * Used in SDK content configs to link to content entries by type and identifier.
65
- */
66
- export declare const entryLinkSchema: z.ZodObject<{
67
- kind: z.ZodLiteral<"entry">;
68
- contentType: z.ZodString;
69
- identifier: z.ZodString;
70
- }, z.core.$loose>;
71
- /**
72
- * Composite schema for all link types.
73
- * Use this for validating link fields in block content.
74
- */
75
- export declare const linkSchema: z.ZodUnion<readonly [z.ZodObject<{
76
- kind: z.ZodLiteral<"internal">;
77
- routeId: z.ZodString;
78
- entityId: z.ZodOptional<z.ZodString>;
79
- entityType: z.ZodOptional<z.ZodEnum<{
80
- content: "content";
81
- page: "page";
82
- }>>;
83
- href: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
84
- title: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
85
- typeLabel: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
86
- contentTypeKey: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
87
- contentTypeName: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
88
- updatedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
89
- }, z.core.$loose>, z.ZodObject<{
90
- kind: z.ZodLiteral<"external">;
91
- href: z.ZodString;
92
- }, z.core.$loose>, z.ZodObject<{
93
- kind: z.ZodLiteral<"url">;
94
- href: z.ZodString;
95
- }, z.core.$loose>, z.ZodObject<{
96
- kind: z.ZodLiteral<"page">;
97
- identifier: z.ZodString;
98
- }, z.core.$loose>, z.ZodObject<{
99
- kind: z.ZodLiteral<"entry">;
100
- contentType: z.ZodString;
101
- identifier: z.ZodString;
102
- }, z.core.$loose>]>;
103
21
  export {};
@@ -1,4 +1,9 @@
1
- export type InternalLinkValue = {
1
+ import { z } from 'zod';
2
+ export type InternalRouteOnlyLinkValue = {
3
+ kind: 'internal';
4
+ routeId: string;
5
+ };
6
+ export type InternalResolvedLinkValue = {
2
7
  kind: 'internal';
3
8
  routeId: string;
4
9
  entityId: string;
@@ -10,6 +15,7 @@ export type InternalLinkValue = {
10
15
  contentTypeName?: string | null;
11
16
  updatedAt?: string | null;
12
17
  };
18
+ export type InternalLinkValue = InternalRouteOnlyLinkValue | InternalResolvedLinkValue;
13
19
  export type ExternalLinkValue = {
14
20
  kind: 'external';
15
21
  href: string;
@@ -36,3 +42,89 @@ export type EntryLinkValue = {
36
42
  identifier: string;
37
43
  };
38
44
  export type LinkValue = InternalLinkValue | ExternalLinkValue | CustomLinkValue | PageLinkValue | EntryLinkValue;
45
+ export declare const internalRouteOnlyLinkSchema: z.ZodObject<{
46
+ kind: z.ZodLiteral<"internal">;
47
+ routeId: z.ZodString;
48
+ }, z.core.$loose>;
49
+ export declare const internalResolvedLinkSchema: z.ZodObject<{
50
+ kind: z.ZodLiteral<"internal">;
51
+ routeId: z.ZodString;
52
+ entityId: z.ZodString;
53
+ entityType: z.ZodEnum<{
54
+ content: "content";
55
+ page: "page";
56
+ }>;
57
+ href: z.ZodString;
58
+ title: z.ZodString;
59
+ typeLabel: z.ZodString;
60
+ contentTypeKey: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
61
+ contentTypeName: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
62
+ updatedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
63
+ }, z.core.$loose>;
64
+ export declare const internalLinkSchema: z.ZodUnion<readonly [z.ZodObject<{
65
+ kind: z.ZodLiteral<"internal">;
66
+ routeId: z.ZodString;
67
+ entityId: z.ZodString;
68
+ entityType: z.ZodEnum<{
69
+ content: "content";
70
+ page: "page";
71
+ }>;
72
+ href: z.ZodString;
73
+ title: z.ZodString;
74
+ typeLabel: z.ZodString;
75
+ contentTypeKey: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
76
+ contentTypeName: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
77
+ updatedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
78
+ }, z.core.$loose>, z.ZodObject<{
79
+ kind: z.ZodLiteral<"internal">;
80
+ routeId: z.ZodString;
81
+ }, z.core.$loose>]>;
82
+ export declare const externalLinkSchema: z.ZodObject<{
83
+ kind: z.ZodLiteral<"external">;
84
+ href: z.ZodString;
85
+ }, z.core.$loose>;
86
+ export declare const customLinkSchema: z.ZodObject<{
87
+ kind: z.ZodLiteral<"url">;
88
+ href: z.ZodString;
89
+ }, z.core.$loose>;
90
+ export declare const pageLinkSchema: z.ZodObject<{
91
+ kind: z.ZodLiteral<"page">;
92
+ identifier: z.ZodString;
93
+ }, z.core.$loose>;
94
+ export declare const entryLinkSchema: z.ZodObject<{
95
+ kind: z.ZodLiteral<"entry">;
96
+ contentType: z.ZodString;
97
+ identifier: z.ZodString;
98
+ }, z.core.$loose>;
99
+ export declare const linkSchema: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
100
+ kind: z.ZodLiteral<"internal">;
101
+ routeId: z.ZodString;
102
+ entityId: z.ZodString;
103
+ entityType: z.ZodEnum<{
104
+ content: "content";
105
+ page: "page";
106
+ }>;
107
+ href: z.ZodString;
108
+ title: z.ZodString;
109
+ typeLabel: z.ZodString;
110
+ contentTypeKey: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
111
+ contentTypeName: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
112
+ updatedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
113
+ }, z.core.$loose>, z.ZodObject<{
114
+ kind: z.ZodLiteral<"internal">;
115
+ routeId: z.ZodString;
116
+ }, z.core.$loose>]>, z.ZodObject<{
117
+ kind: z.ZodLiteral<"external">;
118
+ href: z.ZodString;
119
+ }, z.core.$loose>, z.ZodObject<{
120
+ kind: z.ZodLiteral<"url">;
121
+ href: z.ZodString;
122
+ }, z.core.$loose>, z.ZodObject<{
123
+ kind: z.ZodLiteral<"page">;
124
+ identifier: z.ZodString;
125
+ }, z.core.$loose>, z.ZodObject<{
126
+ kind: z.ZodLiteral<"entry">;
127
+ contentType: z.ZodString;
128
+ identifier: z.ZodString;
129
+ }, z.core.$loose>]>;
130
+ export declare function isInternalResolvedLinkValue(value: LinkValue | null | undefined): value is InternalResolvedLinkValue;
@@ -11,6 +11,8 @@ import { z } from 'zod';
11
11
  * Used for general inquiry forms that send notifications to site owners
12
12
  */
13
13
  export declare const contactFormSettingsSchema: z.ZodObject<{
14
+ submitLabel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
15
+ templateKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
14
16
  type: z.ZodLiteral<"contact">;
15
17
  successMessage: z.ZodOptional<z.ZodString>;
16
18
  sensitiveCollectionMode: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
@@ -55,6 +57,8 @@ export declare const contactFormSettingsSchema: z.ZodObject<{
55
57
  * XOR validation enforces this constraint.
56
58
  */
57
59
  export declare const bookingFormSettingsSchema: z.ZodObject<{
60
+ submitLabel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
61
+ templateKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
58
62
  type: z.ZodLiteral<"booking">;
59
63
  serviceId: z.ZodOptional<z.ZodString>;
60
64
  serviceIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -80,6 +84,8 @@ export declare const bookingFormSettingsSchema: z.ZodObject<{
80
84
  * - If not provided: Block must specify series or get from context
81
85
  */
82
86
  export declare const eventRegistrationFormSettingsSchema: z.ZodObject<{
87
+ submitLabel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
88
+ templateKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
83
89
  type: z.ZodLiteral<"event-registration">;
84
90
  seriesId: z.ZodOptional<z.ZodString>;
85
91
  maxTickets: z.ZodDefault<z.ZodNumber>;
@@ -100,6 +106,8 @@ export declare const eventRegistrationFormSettingsSchema: z.ZodObject<{
100
106
  * Used for reusable short forms / detailed questionnaires attached through booking requirements.
101
107
  */
102
108
  export declare const bookingQuestionsFormSettingsSchema: z.ZodObject<{
109
+ submitLabel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
110
+ templateKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
103
111
  type: z.ZodLiteral<"booking-questions">;
104
112
  schemaVersion: z.ZodDefault<z.ZodLiteral<2>>;
105
113
  shape: z.ZodDefault<z.ZodEnum<{
@@ -115,7 +123,6 @@ export declare const bookingQuestionsFormSettingsSchema: z.ZodObject<{
115
123
  enabledByUserId: z.ZodNullable<z.ZodString>;
116
124
  confirmationVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodNull]>;
117
125
  }, z.core.$strict>>;
118
- templateKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
119
126
  audienceHint: z.ZodOptional<z.ZodEnum<{
120
127
  appointments: "appointments";
121
128
  courses: "courses";
@@ -135,6 +142,8 @@ export declare const bookingQuestionsFormSettingsSchema: z.ZodObject<{
135
142
  * Use this schema to validate form settings in API routes
136
143
  */
137
144
  export declare const formSettingsSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
145
+ submitLabel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
146
+ templateKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
138
147
  type: z.ZodLiteral<"contact">;
139
148
  successMessage: z.ZodOptional<z.ZodString>;
140
149
  sensitiveCollectionMode: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
@@ -166,6 +175,8 @@ export declare const formSettingsSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
166
175
  emails: z.ZodOptional<z.ZodArray<z.ZodString>>;
167
176
  }, z.core.$strict>>;
168
177
  }, z.core.$strict>, z.ZodObject<{
178
+ submitLabel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
179
+ templateKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
169
180
  type: z.ZodLiteral<"booking">;
170
181
  serviceId: z.ZodOptional<z.ZodString>;
171
182
  serviceIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -182,6 +193,8 @@ export declare const formSettingsSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
182
193
  confirmationVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodNull]>;
183
194
  }, z.core.$strict>>;
184
195
  }, z.core.$strict>, z.ZodObject<{
196
+ submitLabel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
197
+ templateKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
185
198
  type: z.ZodLiteral<"event-registration">;
186
199
  seriesId: z.ZodOptional<z.ZodString>;
187
200
  maxTickets: z.ZodDefault<z.ZodNumber>;
@@ -197,6 +210,8 @@ export declare const formSettingsSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
197
210
  confirmationVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodNull]>;
198
211
  }, z.core.$strict>>;
199
212
  }, z.core.$strict>, z.ZodObject<{
213
+ submitLabel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
214
+ templateKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
200
215
  type: z.ZodLiteral<"booking-questions">;
201
216
  schemaVersion: z.ZodDefault<z.ZodLiteral<2>>;
202
217
  shape: z.ZodDefault<z.ZodEnum<{
@@ -212,7 +227,6 @@ export declare const formSettingsSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
212
227
  enabledByUserId: z.ZodNullable<z.ZodString>;
213
228
  confirmationVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodNull]>;
214
229
  }, z.core.$strict>>;
215
- templateKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
216
230
  audienceHint: z.ZodOptional<z.ZodEnum<{
217
231
  appointments: "appointments";
218
232
  courses: "courses";
@@ -809,6 +823,8 @@ export declare const createFormPayloadSchema: z.ZodObject<{
809
823
  }, z.core.$strict>>;
810
824
  }, z.core.$strict>;
811
825
  settings: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
826
+ submitLabel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
827
+ templateKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
812
828
  type: z.ZodLiteral<"contact">;
813
829
  successMessage: z.ZodOptional<z.ZodString>;
814
830
  sensitiveCollectionMode: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
@@ -840,6 +856,8 @@ export declare const createFormPayloadSchema: z.ZodObject<{
840
856
  emails: z.ZodOptional<z.ZodArray<z.ZodString>>;
841
857
  }, z.core.$strict>>;
842
858
  }, z.core.$strict>, z.ZodObject<{
859
+ submitLabel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
860
+ templateKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
843
861
  type: z.ZodLiteral<"booking">;
844
862
  serviceId: z.ZodOptional<z.ZodString>;
845
863
  serviceIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -856,6 +874,8 @@ export declare const createFormPayloadSchema: z.ZodObject<{
856
874
  confirmationVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodNull]>;
857
875
  }, z.core.$strict>>;
858
876
  }, z.core.$strict>, z.ZodObject<{
877
+ submitLabel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
878
+ templateKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
859
879
  type: z.ZodLiteral<"event-registration">;
860
880
  seriesId: z.ZodOptional<z.ZodString>;
861
881
  maxTickets: z.ZodDefault<z.ZodNumber>;
@@ -871,6 +891,8 @@ export declare const createFormPayloadSchema: z.ZodObject<{
871
891
  confirmationVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodNull]>;
872
892
  }, z.core.$strict>>;
873
893
  }, z.core.$strict>, z.ZodObject<{
894
+ submitLabel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
895
+ templateKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
874
896
  type: z.ZodLiteral<"booking-questions">;
875
897
  schemaVersion: z.ZodDefault<z.ZodLiteral<2>>;
876
898
  shape: z.ZodDefault<z.ZodEnum<{
@@ -886,7 +908,6 @@ export declare const createFormPayloadSchema: z.ZodObject<{
886
908
  enabledByUserId: z.ZodNullable<z.ZodString>;
887
909
  confirmationVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodNull]>;
888
910
  }, z.core.$strict>>;
889
- templateKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
890
911
  audienceHint: z.ZodOptional<z.ZodEnum<{
891
912
  appointments: "appointments";
892
913
  courses: "courses";
@@ -1,4 +1,4 @@
1
- import type { LinkValue } from '@riverbankcms/blocks';
1
+ import { type LinkValue } from '@riverbankcms/blocks';
2
2
  export declare function LinkSummary({ value }: {
3
3
  value: LinkValue | null;
4
4
  }): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import { type ReactNode } from 'react';
2
- import type { LinkValue } from '@riverbankcms/blocks';
2
+ import { type LinkValue } from '@riverbankcms/blocks';
3
3
  import type { RoutableContentItem } from '@riverbankcms/api/navigation';
4
4
  import type { LinkWidgetAdapters } from './types';
5
5
  type LinkWidgetProps = {
@@ -1,5 +1,5 @@
1
1
  import { type RoutableContentItem } from '@riverbankcms/api/navigation';
2
- import type { LinkValue } from '@riverbankcms/blocks';
2
+ import { type LinkValue } from '@riverbankcms/blocks';
3
3
  export declare function toInternalLinkValue(item: RoutableContentItem): LinkValue;
4
4
  export declare function getMatchingInternalItem(items: RoutableContentItem[], value: LinkValue | null): RoutableContentItem | null;
5
5
  export declare function isSameLinkValue(a: LinkValue | null, b: LinkValue | null): boolean;
@@ -56,7 +56,42 @@ type InferDataFromTabs<Tabs extends readonly {
56
56
  * - Repeater: monomorphic (array) and polymorphic (discriminated union array)
57
57
  * - TabGroup: flattened fields from all tabs
58
58
  */
59
- export type FieldValueType<F extends FieldDefinition> = F extends TextFieldDefinition ? string : F extends BooleanFieldDefinition ? boolean : F extends NumberFieldDefinition ? number : F extends RichTextFieldDefinition ? TipTapNode : F extends MediaFieldDefinition ? Media | null : F extends LinkFieldDefinition ? LinkValue | null : F extends DateFieldDefinition ? string : F extends TimeFieldDefinition ? string : F extends DateTimeFieldDefinition ? string : F extends SlugFieldDefinition ? string : F extends UrlFieldDefinition ? string : F extends ReferenceFieldDefinition ? string : F extends PresetOrCustomFieldDefinition ? string : F extends ContentTypeSelectFieldDefinition ? string : F extends SelectFieldDefinition & {
59
+ export type FieldValueType<F extends FieldDefinition> = F extends {
60
+ type: 'text';
61
+ } ? string : F extends {
62
+ type: 'boolean';
63
+ } ? boolean : F extends {
64
+ type: 'number';
65
+ } ? number : F extends {
66
+ type: 'richText';
67
+ } ? TipTapNode : F extends {
68
+ type: 'media';
69
+ } ? Media | null : F extends {
70
+ type: 'link';
71
+ } ? LinkValue | null : F extends {
72
+ type: 'date';
73
+ } ? string : F extends {
74
+ type: 'time';
75
+ } ? string : F extends {
76
+ type: 'datetime';
77
+ } ? string : F extends {
78
+ type: 'slug';
79
+ } ? string : F extends {
80
+ type: 'url';
81
+ } ? string : F extends {
82
+ type: 'reference';
83
+ } ? string : F extends {
84
+ type: 'presetOrCustom';
85
+ } ? string : F extends {
86
+ type: 'contentTypeSelect';
87
+ } ? string : F extends {
88
+ type: 'select';
89
+ multiple: true;
90
+ } ? string[] : F extends {
91
+ type: 'select';
92
+ } ? string : F extends {
93
+ type: 'entryPicker';
94
+ } ? string | null : F extends TextFieldDefinition ? string : F extends BooleanFieldDefinition ? boolean : F extends NumberFieldDefinition ? number : F extends RichTextFieldDefinition ? TipTapNode : F extends MediaFieldDefinition ? Media | null : F extends LinkFieldDefinition ? LinkValue | null : F extends DateFieldDefinition ? string : F extends TimeFieldDefinition ? string : F extends DateTimeFieldDefinition ? string : F extends SlugFieldDefinition ? string : F extends UrlFieldDefinition ? string : F extends ReferenceFieldDefinition ? string : F extends PresetOrCustomFieldDefinition ? string : F extends ContentTypeSelectFieldDefinition ? string : F extends SelectFieldDefinition & {
60
95
  multiple: true;
61
96
  } ? string[] : F extends SelectFieldDefinition ? string : F extends EntryPickerFieldDefinition ? string | null : F extends GroupFieldDefinition & {
62
97
  schema: {
@@ -17,7 +17,11 @@ export type TipTapNode = {
17
17
  attrs?: Record<string, unknown>;
18
18
  marks?: TipTapMark[];
19
19
  };
20
- export type InternalLinkValue = {
20
+ export type InternalRouteOnlyLinkValue = {
21
+ kind: 'internal';
22
+ routeId: string;
23
+ };
24
+ export type InternalResolvedLinkValue = {
21
25
  kind: 'internal';
22
26
  routeId: string;
23
27
  entityId: string;
@@ -29,6 +33,7 @@ export type InternalLinkValue = {
29
33
  contentTypeName?: string | null;
30
34
  updatedAt?: string | null;
31
35
  };
36
+ export type InternalLinkValue = InternalRouteOnlyLinkValue | InternalResolvedLinkValue;
32
37
  export type ExternalLinkValue = {
33
38
  kind: 'external';
34
39
  href: string;
@@ -1,4 +1,4 @@
1
- export type { TipTapNode, TipTapMark, Media, LinkValue, InternalLinkValue, ExternalLinkValue, CustomLinkValue, PageLinkValue, EntryLinkValue, RichTextPrimitiveProps, RichTextVariant, } from './content';
1
+ export type { TipTapNode, TipTapMark, Media, LinkValue, InternalRouteOnlyLinkValue, InternalResolvedLinkValue, InternalLinkValue, ExternalLinkValue, CustomLinkValue, PageLinkValue, EntryLinkValue, RichTextPrimitiveProps, RichTextVariant, } from './content';
2
2
  export type { AppointmentBookingContent, BlogListingContent, BlogPostContent, BodyTextAlignment, BodyTextContent, ButtonVariant, CalendarTabViews, CartContent, CardStylesContent, CheckoutContent, CollectionContent, ColumnsContent, ColumnOption, ContainerStylesContent, CourseDetailsContent, CourseRegistrationContent, CtaFullContent, DisplayMode, EmbedContent, EventCalendarContent, EventDetailsContent, EventLayout, EventListingContent, EventRegistrationContent, EventSpotlightContent, FaqContent, FaqItem, FilterAutoShow, FormBlockContent, GiftingContent, HeroContent, HeroCta, HeroCtaInput, HeroMedia, ImageColSize, ImageGalleryContent, LocationMapContent, LayoutAlign, LayoutWidth, MediaTextAlignment, MediaTextAspectRatio, MediaTextContent, MediaTextImagePosition, NewsletterSignupContent, NewsletterSignupPreset, ProductDetailContent, ProductListContent, SectionStylesContent, SemanticSpacing, ShopContent, SingleButtonContent, SiteFooterContent, SiteHeaderContent, StackContentAlignment, StackImagePosition, SystemBlockContentByFullKind, SystemBlockContentByKind, SystemBlockContentFor, SystemBlockShortKind, TeamMembersContent, TestimonialEntryContent, TestimonialsBlockContent, ThumbnailPadding, ThumbnailShape, VideoGridContent, WeekStart, } from './system-block-content';
3
3
  export type { PageOutline, BlockOutline, RouteMap, RouteMapEntry, OccurrenceContextData, EntrySubrouteContextData, } from './page';
4
4
  export type { Theme, ThemeTokens } from './theme';
@@ -311,6 +311,7 @@ export type HeroContent = {
311
311
  contentMaxWidth?: 'default' | 'narrow' | 'medium' | 'wide';
312
312
  _sectionStyles?: SectionStylesContent;
313
313
  _containerStyles?: ContainerStylesContent;
314
+ _contentCardStyles?: ContainerStylesContent;
314
315
  ctas?: HeroCtaInput[];
315
316
  };
316
317
  export type HeroMedia = Media;
@@ -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.60.7";
11
+ export declare const SDK_VERSION = "0.60.9";