@riverbankcms/sdk 0.60.7 → 0.60.11

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 (44) hide show
  1. package/dist/_dts/api/src/index.d.ts +2 -1
  2. package/dist/_dts/api/src/navigation/linkValue.d.ts +15 -2
  3. package/dist/_dts/api/src/navigation.d.ts +2 -0
  4. package/dist/_dts/blocks/src/index.d.ts +2 -1
  5. package/dist/_dts/blocks/src/system/manifest/fieldValidation/index.d.ts +185 -0
  6. package/dist/_dts/blocks/src/system/manifest/index.d.ts +1 -0
  7. package/dist/_dts/blocks/src/system/manifest/validation.d.ts +2 -84
  8. package/dist/_dts/blocks/src/system/node/fragments/ctaButton.d.ts +2 -2
  9. package/dist/_dts/blocks/src/system/runtime/nodes/basic.d.ts +2 -1
  10. package/dist/_dts/blocks/src/system/types/link.d.ts +100 -2
  11. package/dist/_dts/db/src/schemas/forms.d.ts +24 -3
  12. package/dist/_dts/editor-blocks/src/widgets/link/LinkSummary.d.ts +1 -1
  13. package/dist/_dts/editor-blocks/src/widgets/link/LinkWidget.d.ts +1 -1
  14. package/dist/_dts/editor-blocks/src/widgets/link/utils.d.ts +1 -1
  15. package/dist/_dts/sdk/src/config/typed-entries.d.ts +36 -1
  16. package/dist/_dts/sdk/src/contracts/content.d.ts +13 -2
  17. package/dist/_dts/sdk/src/contracts/index.d.ts +1 -1
  18. package/dist/_dts/sdk/src/contracts/system-block-content.d.ts +1 -0
  19. package/dist/_dts/sdk/src/version.d.ts +1 -1
  20. package/dist/_dts/theme-core/src/buttons/classNames.d.ts +21 -0
  21. package/dist/_dts/theme-core/src/buttons/index.d.ts +1 -0
  22. package/dist/_dts/theme-core/src/buttons/types.d.ts +1 -0
  23. package/dist/cli/index.mjs +736 -427
  24. package/dist/client/bookings.mjs +746 -149
  25. package/dist/client/client.mjs +40389 -39847
  26. package/dist/client/hooks.mjs +1737 -1735
  27. package/dist/client/rendering/client.mjs +351 -113
  28. package/dist/client/rendering/islands.mjs +4549 -4366
  29. package/dist/client/rendering.mjs +1915 -1373
  30. package/dist/preview-next/client/runtime.mjs +1509 -945
  31. package/dist/server/components.mjs +3148 -2781
  32. package/dist/server/config-validation.mjs +1727 -1725
  33. package/dist/server/config.mjs +1727 -1725
  34. package/dist/server/data.mjs +1737 -1735
  35. package/dist/server/index.mjs +1 -1
  36. package/dist/server/next.mjs +3193 -2826
  37. package/dist/server/page-converter.mjs +10 -10
  38. package/dist/server/prebuild.mjs +1 -1
  39. package/dist/server/rendering/server.mjs +3161 -2794
  40. package/dist/server/rendering.mjs +3161 -2794
  41. package/dist/server/routing.mjs +297 -314
  42. package/dist/server/server.mjs +1738 -1736
  43. package/package.json +1 -1
  44. package/dist/_dts/blocks/src/system/runtime/shared/themedButtonClass.d.ts +0 -11
@@ -57,7 +57,8 @@ export { matchNavigationItems } from "./navigation/matcher";
57
57
  export type { ItemMatch, MatchResult } from "./navigation/matcher";
58
58
  export { extractNavVisibilityConfig, hasNavVisibilityValues, extractSdkDashboardNavVisibilityConfig, mergeNavVisibilityConfig, extractSdkDashboardNavVisibilityConfigForRole, isNavItemVisible, } from "./navigation/visibility";
59
59
  export type { NavStage, NavVisibilityMode, NavVisibilityConfig, NavVisibilityContext, } from "./navigation/visibility";
60
- export { toInternalLinkValue, linkValueToPayload, linkPayloadToValue, } from "./navigation/linkValue";
60
+ export { toInternalLinkValue, linkValueToPayload, linkPayloadToValue, toPersistableNavigationLinkValue, } from "./navigation/linkValue";
61
+ export type { PersistableNavigationLinkError, PersistableNavigationLinkResult, PersistableNavigationLinkValue, } from "./navigation/linkValue";
61
62
  export type { NavigationReferenceMaps, PageNavLinkInfo, EntryNavLinkInfo, NavigationItemForMatching, NavigationItemInput, } from "./navigation/types";
62
63
  export { listRedirectRules, createRedirectRule, deleteRedirectRule, } from "./redirects";
63
64
  export { changePlan } from "./billing";
@@ -4,8 +4,21 @@
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 CustomLinkValue, type EntryLinkValue, type ExternalLinkValue, type InternalResolvedLinkValue, type LinkValue, type PageLinkValue } from '@riverbankcms/blocks';
8
8
  import type { LinkPayload, RoutableContentItem } from './types';
9
+ export type PersistableNavigationLinkValue = InternalResolvedLinkValue | ExternalLinkValue | CustomLinkValue | PageLinkValue | EntryLinkValue;
10
+ export type PersistableNavigationLinkError = {
11
+ type: 'internalLinkNotResolved';
12
+ routeId: string;
13
+ };
14
+ export type PersistableNavigationLinkResult = {
15
+ ok: true;
16
+ value: PersistableNavigationLinkValue;
17
+ } | {
18
+ ok: false;
19
+ error: PersistableNavigationLinkError;
20
+ };
9
21
  export declare function toInternalLinkValue(item: RoutableContentItem): LinkValue;
10
- export declare function linkValueToPayload(value: LinkValue): LinkPayload;
22
+ export declare function toPersistableNavigationLinkValue(value: LinkValue): PersistableNavigationLinkResult;
23
+ export declare function linkValueToPayload(value: PersistableNavigationLinkValue): LinkPayload;
11
24
  export declare function linkPayloadToValue(payload: LinkPayload | null | undefined, items?: RoutableContentItem[]): LinkValue | null;
@@ -3,6 +3,8 @@ import type { ApiClient } from './request';
3
3
  export { collectCartLinkStats, collectPortalLinkStats, type CartLinkValidationItem, type CartLinkValidationStats, type NavigationMenuValidationItem, type PortalLinkValidationItem, type PortalLinkValidationStats, } from './navigationMenuValidation';
4
4
  export { isInternalLink, isPageLink, isEntryLink, resolveNavigationLinkInput, } from './navigation/linkResolver';
5
5
  export { toRoutableLinkPayload } from './navigation/routableLink';
6
+ export { linkPayloadToValue, linkValueToPayload, toInternalLinkValue, toPersistableNavigationLinkValue, } from './navigation/linkValue';
7
+ export type { PersistableNavigationLinkError, PersistableNavigationLinkResult, PersistableNavigationLinkValue, } from './navigation/linkValue';
6
8
  export type { CartLinkLabelConfig, CartLinkPayload, EntryLinkPayload, InternalLinkRoutablePayload, LinkResolutionOptions, LinkPayload, NavigationLinkInput, NavigationUrlType, PageLinkPayload, PortalLinkPayload, ResolvedNavigationLink, RoutableContentItem, SitemapRouteItem, } from './navigation/types';
7
9
  export { matchNavigationItems } from './navigation/matcher';
8
10
  export type { ItemMatch, MatchResult } from './navigation/matcher';
@@ -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 { AuthoredLinkValue, 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,5 +1,5 @@
1
1
  import type { NodeDefinition } from "../schema";
2
- import type { ThemedButtonSize } from "../../runtime/shared/themedButtonClass";
2
+ import type { ButtonSizeName } from "@riverbankcms/theme-core/buttons";
3
3
  export declare function ctaButton(opts?: {
4
4
  basePath?: string;
5
5
  linkPath?: string;
@@ -15,5 +15,5 @@ export declare function ctaButton(opts?: {
15
15
  };
16
16
  className?: string;
17
17
  variantFallback?: string;
18
- sizeFallback?: ThemedButtonSize;
18
+ sizeFallback?: ButtonSizeName;
19
19
  }): NodeDefinition;
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ import { type ButtonSizeName } from '@riverbankcms/theme-core/buttons';
2
3
  export type TextNodeProps = {
3
4
  value?: React.ReactNode;
4
5
  className?: string;
@@ -35,7 +36,7 @@ export type ButtonNodeProps = {
35
36
  /** Button variant ID (reads from theme.buttons.variants) */
36
37
  variantId?: string;
37
38
  /** Button size (reads from theme.buttons.sizes via .btn-{size}) */
38
- size?: 'sm' | 'md' | 'lg' | 'xl';
39
+ size?: ButtonSizeName;
39
40
  /** Disabled state */
40
41
  disabled?: boolean;
41
42
  /** Button type (for form buttons) */
@@ -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;
@@ -35,4 +41,96 @@ export type EntryLinkValue = {
35
41
  contentType: string;
36
42
  identifier: string;
37
43
  };
38
- export type LinkValue = InternalLinkValue | ExternalLinkValue | CustomLinkValue | PageLinkValue | EntryLinkValue;
44
+ export type AuthoredLinkValue = InternalLinkValue | ExternalLinkValue | CustomLinkValue | PageLinkValue | EntryLinkValue;
45
+ /**
46
+ * Broad authored/editor link value accepted by block manifests and link widgets.
47
+ * Route-only internal links are valid here, but must be resolved before any
48
+ * navigation-persistence converter accepts them.
49
+ */
50
+ export type LinkValue = AuthoredLinkValue;
51
+ export declare const internalRouteOnlyLinkSchema: z.ZodObject<{
52
+ kind: z.ZodLiteral<"internal">;
53
+ routeId: z.ZodString;
54
+ }, z.core.$loose>;
55
+ export declare const internalResolvedLinkSchema: z.ZodObject<{
56
+ kind: z.ZodLiteral<"internal">;
57
+ routeId: z.ZodString;
58
+ entityId: z.ZodString;
59
+ entityType: z.ZodEnum<{
60
+ content: "content";
61
+ page: "page";
62
+ }>;
63
+ href: z.ZodString;
64
+ title: z.ZodString;
65
+ typeLabel: z.ZodString;
66
+ contentTypeKey: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
67
+ contentTypeName: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
68
+ updatedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
69
+ }, z.core.$loose>;
70
+ export declare const internalLinkSchema: z.ZodUnion<readonly [z.ZodObject<{
71
+ kind: z.ZodLiteral<"internal">;
72
+ routeId: z.ZodString;
73
+ entityId: z.ZodString;
74
+ entityType: z.ZodEnum<{
75
+ content: "content";
76
+ page: "page";
77
+ }>;
78
+ href: z.ZodString;
79
+ title: z.ZodString;
80
+ typeLabel: z.ZodString;
81
+ contentTypeKey: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
82
+ contentTypeName: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
83
+ updatedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
84
+ }, z.core.$loose>, z.ZodObject<{
85
+ kind: z.ZodLiteral<"internal">;
86
+ routeId: z.ZodString;
87
+ }, z.core.$loose>]>;
88
+ export declare const externalLinkSchema: z.ZodObject<{
89
+ kind: z.ZodLiteral<"external">;
90
+ href: z.ZodString;
91
+ }, z.core.$loose>;
92
+ export declare const customLinkSchema: z.ZodObject<{
93
+ kind: z.ZodLiteral<"url">;
94
+ href: z.ZodString;
95
+ }, z.core.$loose>;
96
+ export declare const pageLinkSchema: z.ZodObject<{
97
+ kind: z.ZodLiteral<"page">;
98
+ identifier: z.ZodString;
99
+ }, z.core.$loose>;
100
+ export declare const entryLinkSchema: z.ZodObject<{
101
+ kind: z.ZodLiteral<"entry">;
102
+ contentType: z.ZodString;
103
+ identifier: z.ZodString;
104
+ }, z.core.$loose>;
105
+ export declare const linkSchema: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
106
+ kind: z.ZodLiteral<"internal">;
107
+ routeId: z.ZodString;
108
+ entityId: z.ZodString;
109
+ entityType: z.ZodEnum<{
110
+ content: "content";
111
+ page: "page";
112
+ }>;
113
+ href: z.ZodString;
114
+ title: z.ZodString;
115
+ typeLabel: z.ZodString;
116
+ contentTypeKey: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
117
+ contentTypeName: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
118
+ updatedAt: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>;
119
+ }, z.core.$loose>, z.ZodObject<{
120
+ kind: z.ZodLiteral<"internal">;
121
+ routeId: z.ZodString;
122
+ }, z.core.$loose>]>, z.ZodObject<{
123
+ kind: z.ZodLiteral<"external">;
124
+ href: z.ZodString;
125
+ }, z.core.$loose>, z.ZodObject<{
126
+ kind: z.ZodLiteral<"url">;
127
+ href: z.ZodString;
128
+ }, z.core.$loose>, z.ZodObject<{
129
+ kind: z.ZodLiteral<"page">;
130
+ identifier: z.ZodString;
131
+ }, z.core.$loose>, z.ZodObject<{
132
+ kind: z.ZodLiteral<"entry">;
133
+ contentType: z.ZodString;
134
+ identifier: z.ZodString;
135
+ }, z.core.$loose>]>;
136
+ 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;