@riverbankcms/sdk 0.95.0 → 0.96.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -4
- package/dist/{PreviewEditorSidebar-6FQYKOSB.mjs → PreviewEditorSidebar-46VT4QVU.mjs} +2 -2
- package/dist/{PreviewEditorUI-NPO2XMFB.mjs → PreviewEditorUI-JD75GE5F.mjs} +2 -2
- package/dist/SdkPreviewModeRuntime-MJUSYUFB.mjs +8 -0
- package/dist/_dts/ai/src/contracts/proposals.d.ts +10 -10
- package/dist/_dts/block-form/src/client/index.d.ts +1 -1
- package/dist/_dts/block-form/src/fields/types.d.ts +9 -1
- package/dist/_dts/block-form/src/registry/schemas.d.ts +4 -0
- package/dist/_dts/block-form/src/registry/widgets.d.ts +1 -0
- package/dist/_dts/block-form/src/widgets/InlineTextField/InlineTextField.d.ts +4 -0
- package/dist/_dts/block-form/src/widgets/InlineTextField/index.d.ts +3 -0
- package/dist/_dts/block-form/src/widgets/InlineTextField/inlineTextFieldDefaults.d.ts +2 -0
- package/dist/_dts/block-form/src/widgets/InlineTextField/inlineTextFieldSchema.d.ts +3 -0
- package/dist/_dts/blocks/src/bindings/index.d.ts +1 -0
- package/dist/_dts/blocks/src/bindings/types.d.ts +1 -0
- package/dist/_dts/blocks/src/index.d.ts +2 -0
- package/dist/_dts/blocks/src/system/blocks/appointment-booking.d.ts +2 -29631
- package/dist/_dts/blocks/src/system/blocks/blog-listing.d.ts +2 -29614
- package/dist/_dts/blocks/src/system/blocks/cart.d.ts +2 -29634
- package/dist/_dts/blocks/src/system/blocks/checkout.d.ts +2 -29627
- package/dist/_dts/blocks/src/system/blocks/collection.d.ts +2 -29585
- package/dist/_dts/blocks/src/system/blocks/faq.d.ts +2 -29677
- package/dist/_dts/blocks/src/system/blocks/gifting.d.ts +2 -29655
- package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +220 -0
- package/dist/_dts/blocks/src/system/blocks/product-detail.d.ts +2 -29655
- package/dist/_dts/blocks/src/system/blocks/product-list.d.ts +2 -29685
- package/dist/_dts/blocks/src/system/blocks/shop.d.ts +2 -29761
- package/dist/_dts/blocks/src/system/fragments/library/heroCopy.d.ts +9 -0
- package/dist/_dts/blocks/src/system/inlineText.d.ts +78 -0
- package/dist/_dts/blocks/src/system/manifest/derivedContent.d.ts +3 -1
- package/dist/_dts/blocks/src/system/manifest/fieldValidation/index.d.ts +15 -3
- package/dist/_dts/blocks/src/system/manifest/schema.d.ts +188 -7
- package/dist/_dts/blocks/src/system/runtime/nodes/basic.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/renderInlineText.d.ts +3 -0
- package/dist/_dts/content-editor/src/index.d.ts +1 -0
- package/dist/_dts/content-editor/src/primitives/PreviewInlineTextEditor.d.ts +9 -0
- package/dist/_dts/content-model/src/templates/bindingTypeCompatibility.d.ts +1 -1
- package/dist/_dts/content-model/src/templates/defaults.d.ts +30 -0
- package/dist/_dts/content-model/src/templates/types.d.ts +1 -0
- package/dist/_dts/editor/src/inline/FloatingToolbar.d.ts +18 -0
- package/dist/_dts/editor/src/inline/InlineTextEditor.d.ts +18 -1
- package/dist/_dts/editor/src/inline/InlineTextEditorStyles.d.ts +1 -0
- package/dist/_dts/editor/src/inline/domParse.d.ts +3 -0
- package/dist/_dts/editor/src/inline/presentation.d.ts +48 -0
- package/dist/_dts/editor/src/inline/selection.d.ts +12 -0
- package/dist/_dts/editor-blocks/src/widgets/index.d.ts +1 -0
- package/dist/_dts/editor-blocks/src/widgets/inline-text/InlineTextField.d.ts +3 -0
- package/dist/_dts/editor-blocks/src/widgets/inline-text/index.d.ts +1 -0
- package/dist/_dts/path-utils/src/index.d.ts +1 -0
- package/dist/_dts/preview-next/src/client/widgets/widgetOverrides.d.ts +1 -0
- package/dist/_dts/sdk/src/cli/commands/content.d.ts +56 -0
- package/dist/_dts/sdk/src/cli/commands/push/options.d.ts +4 -0
- package/dist/_dts/sdk/src/cli/commands/push/scopes/commandBackedDatedOfferingScope.d.ts +2 -6
- package/dist/_dts/sdk/src/cli/commands/push/scopes/types.d.ts +2 -0
- package/dist/_dts/sdk/src/cli/commands/push/verification.d.ts +56 -0
- package/dist/_dts/sdk/src/cli/commands/push-execute.d.ts +2 -1
- package/dist/_dts/sdk/src/cli/content/edit/format.d.ts +2 -0
- package/dist/_dts/sdk/src/cli/content/edit/path.d.ts +14 -0
- package/dist/_dts/sdk/src/cli/content/edit/planner.d.ts +46 -0
- package/dist/_dts/sdk/src/cli/content/fs-utils.d.ts +4 -0
- package/dist/_dts/sdk/src/cli/content/writer.d.ts +2 -0
- package/dist/_dts/sdk/src/cli/merge-remote/mergeFieldChanges.d.ts +22 -0
- package/dist/_dts/sdk/src/cli/merge-remote/pageLocal.d.ts +3 -0
- package/dist/_dts/sdk/src/cli/merge-remote/pageMerge.d.ts +78 -0
- package/dist/_dts/sdk/src/cli/merge-remote/pageMergePlan.d.ts +36 -0
- package/dist/_dts/sdk/src/cli/merge-remote/pageMergePush.d.ts +21 -0
- package/dist/_dts/sdk/src/cli/merge-remote/pageMergeReport.d.ts +29 -0
- package/dist/_dts/sdk/src/cli/merge-remote/pageSnapshots.d.ts +48 -0
- package/dist/_dts/sdk/src/cli/sync/diff.d.ts +3 -6
- package/dist/_dts/sdk/src/cli/sync/field-diff.d.ts +39 -0
- package/dist/_dts/sdk/src/cli/sync/index.d.ts +1 -0
- package/dist/_dts/sdk/src/config/field-definitions.d.ts +8 -3
- package/dist/_dts/sdk/src/config/typed-entries.d.ts +5 -3
- package/dist/_dts/sdk/src/contracts/bindings.d.ts +1 -0
- package/dist/_dts/sdk/src/contracts/content.d.ts +18 -0
- package/dist/_dts/sdk/src/contracts/index.d.ts +1 -1
- package/dist/_dts/sdk/src/contracts/system-block-content.d.ts +3 -2
- package/dist/_dts/sdk/src/rendering/helpers/bindings.d.ts +1 -0
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/theme-core/src/accordions/types.d.ts +1 -1
- package/dist/_dts/theme-core/src/buttons/types.d.ts +1 -1
- package/dist/_dts/theme-core/src/cards/types.d.ts +15 -15
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/inputs/types.d.ts +1 -1
- package/dist/_dts/theme-core/src/mock-themes/all.d.ts +42 -42
- package/dist/_dts/theme-core/src/palette/variants/types.d.ts +2 -2
- package/dist/_dts/theme-core/src/schema.d.ts +44 -44
- package/dist/_dts/theme-core/src/site-styles/backgroundAppearance.d.ts +2 -2
- package/dist/_dts/theme-core/src/site-styles/designState.d.ts +16 -16
- package/dist/_dts/theme-core/src/site-styles/pageDesignIntent.d.ts +4 -4
- package/dist/_dts/theme-core/src/site-styles/tokenRecipes.d.ts +1 -1
- package/dist/_dts/theme-core/src/tokens/themeColorTokens.d.ts +1 -1
- package/dist/{chunk-K2SJTZMX.mjs → chunk-4TLTV7OB.mjs} +1 -1
- package/dist/{chunk-4A6NWO3X.mjs → chunk-EL55VV6Q.mjs} +47 -7
- package/dist/{chunk-PJPFTVZG.mjs → chunk-VHIMXQ7Z.mjs} +105 -3
- package/dist/{chunk-VZBSD4AJ.mjs → chunk-XMATDBXO.mjs} +1633 -225
- package/dist/cli/index.mjs +2691 -772
- package/dist/cli/init-docs/content/cli-reference.md +43 -4
- package/dist/cli/init-docs/content/content-management.md +22 -0
- package/dist/client/{accordion-LGO4IO5U.mjs → accordion-GUNXIIZR.mjs} +1 -1
- package/dist/client/{bookingForm-MWLS4LGU.mjs → bookingForm-AOU4VHP5.mjs} +3 -3
- package/dist/client/{carousel-6AHNP5HA.mjs → carousel-4QSX2JPC.mjs} +1 -1
- package/dist/client/{cart-CIXGYAZB.mjs → cart-JKN6C4ZB.mjs} +4 -4
- package/dist/client/{checkout-OTX6O3DN.mjs → checkout-YY6YMITW.mjs} +4 -4
- package/dist/client/{chunk-Y2PMKCXO.mjs → chunk-6H27K6AA.mjs} +1 -1
- package/dist/client/{chunk-R3NQTBWE.mjs → chunk-A3YN7M3G.mjs} +1 -1
- package/dist/client/{chunk-TREIML53.mjs → chunk-BFCJZODD.mjs} +3 -3
- package/dist/client/{chunk-INRIT6DP.mjs → chunk-CPKMJVBD.mjs} +5 -5
- package/dist/client/{chunk-V67AT7ZW.mjs → chunk-GWCRCJLB.mjs} +6 -0
- package/dist/client/{chunk-AVBQSUIS.mjs → chunk-H7A6PUGM.mjs} +1 -1
- package/dist/client/{chunk-HOP7MKAZ.mjs → chunk-SY543WZ3.mjs} +1 -1
- package/dist/client/{chunk-MYCXAKWP.mjs → chunk-VJROUYOQ.mjs} +2 -2
- package/dist/client/client.mjs +4007 -3687
- package/dist/client/{courseRegistration-2LU6C3JL.mjs → courseRegistration-UU2KMPSQ.mjs} +3 -3
- package/dist/client/{eventCalendar-OKUSISBZ.mjs → eventCalendar-WIVNS2TM.mjs} +6 -6
- package/dist/client/{eventCombined-CMF6CD4S.mjs → eventCombined-P3G5MW4J.mjs} +6 -6
- package/dist/client/{eventDetails-XYWH7WXI.mjs → eventDetails-2VHJ2RDG.mjs} +6 -6
- package/dist/client/{eventListing-EK5DJTAH.mjs → eventListing-TGO6JI3R.mjs} +6 -6
- package/dist/client/{eventRegistration-XDOSICV6.mjs → eventRegistration-B46HEJES.mjs} +6 -6
- package/dist/client/{form-J6GOHKYG.mjs → form-VKRTFUNQ.mjs} +1 -1
- package/dist/client/{headerSection-C5SYJTRW.mjs → headerSection-XUX4ZJLO.mjs} +2 -2
- package/dist/client/hooks.mjs +20 -3
- package/dist/client/{locationMap-QSQIFVVT.mjs → locationMap-NQFI5MJO.mjs} +2 -2
- package/dist/client/{newsletterForm-47VXJRWK.mjs → newsletterForm-P2GETCQK.mjs} +1 -1
- package/dist/client/{productDetail-5U6ISCC2.mjs → productDetail-7NQ7O5IF.mjs} +4 -4
- package/dist/client/{productList-XDZUMR3P.mjs → productList-RX6ZJ7BL.mjs} +4 -4
- package/dist/client/rendering/client.mjs +3822 -3600
- package/dist/client/rendering/islands.mjs +18 -18
- package/dist/client/rendering.mjs +1211 -883
- package/dist/client/{shop-ZSZKIY3R.mjs → shop-BHN5AKY6.mjs} +4 -4
- package/dist/preview-next/client/runtime.mjs +3 -3
- package/dist/{sdk-runtime-PHNM7MRD.mjs → sdk-runtime-X2LXQ5IC.mjs} +4 -4
- package/dist/server/components.mjs +3144 -2827
- package/dist/server/config-template-validation.mjs +29 -20
- package/dist/server/config-validation.mjs +22 -4
- package/dist/server/config.mjs +22 -4
- package/dist/server/data.mjs +20 -3
- package/dist/server/index.mjs +1 -1
- package/dist/server/next.mjs +3181 -2858
- package/dist/server/page-converter.mjs +20 -3
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +3153 -2837
- package/dist/server/rendering.mjs +3168 -2844
- package/dist/server/routing.mjs +21 -4
- package/dist/server/server.mjs +2299 -2188
- package/dist/server/theme-bridge.mjs +43 -0
- package/dist/styles/index.css +44 -0
- package/package.json +1 -1
- package/dist/SdkPreviewModeRuntime-PBEFH5AL.mjs +0 -8
|
@@ -9,8 +9,17 @@ export declare const heroCopyFragment: import("..").DefinedFragment<{
|
|
|
9
9
|
readonly id: "headline";
|
|
10
10
|
readonly type: "text";
|
|
11
11
|
readonly label: "Headline";
|
|
12
|
+
readonly maxLength: 120;
|
|
13
|
+
readonly ui: {
|
|
14
|
+
readonly hidden: true;
|
|
15
|
+
};
|
|
16
|
+
}, {
|
|
17
|
+
readonly id: "headlineInline";
|
|
18
|
+
readonly type: "inlineText";
|
|
19
|
+
readonly label: "Headline";
|
|
12
20
|
readonly required: true;
|
|
13
21
|
readonly maxLength: 120;
|
|
22
|
+
readonly plainTextField: "headline";
|
|
14
23
|
}, {
|
|
15
24
|
readonly id: "subheadline";
|
|
16
25
|
readonly type: "text";
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const inlineTextAccentTones: readonly ["accent", "brand", "contrast"];
|
|
3
|
+
export declare const inlineTextHighlightTones: readonly ["soft", "accent", "brand"];
|
|
4
|
+
export type InlineTextAccentTone = (typeof inlineTextAccentTones)[number];
|
|
5
|
+
export type InlineTextHighlightTone = (typeof inlineTextHighlightTones)[number];
|
|
6
|
+
export type InlineTextMark = Readonly<{
|
|
7
|
+
kind: 'strong';
|
|
8
|
+
}> | Readonly<{
|
|
9
|
+
kind: 'emphasis';
|
|
10
|
+
}> | Readonly<{
|
|
11
|
+
kind: 'accent';
|
|
12
|
+
tone: InlineTextAccentTone;
|
|
13
|
+
}> | Readonly<{
|
|
14
|
+
kind: 'highlight';
|
|
15
|
+
tone: InlineTextHighlightTone;
|
|
16
|
+
}>;
|
|
17
|
+
export type InlineTextRun = Readonly<{
|
|
18
|
+
text: string;
|
|
19
|
+
marks?: readonly InlineTextMark[];
|
|
20
|
+
}>;
|
|
21
|
+
export type InlineText = readonly InlineTextRun[];
|
|
22
|
+
export type InlineTextParseError = Readonly<{
|
|
23
|
+
kind: 'not-array';
|
|
24
|
+
}> | Readonly<{
|
|
25
|
+
kind: 'invalid-run';
|
|
26
|
+
index: number;
|
|
27
|
+
}>;
|
|
28
|
+
export type InlineTextParseResult = Readonly<{
|
|
29
|
+
ok: true;
|
|
30
|
+
value: InlineText;
|
|
31
|
+
}> | Readonly<{
|
|
32
|
+
ok: false;
|
|
33
|
+
error: InlineTextParseError;
|
|
34
|
+
}>;
|
|
35
|
+
export declare const inlineTextSchema: z.ZodArray<z.ZodObject<{
|
|
36
|
+
text: z.ZodString;
|
|
37
|
+
marks: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
38
|
+
kind: z.ZodLiteral<"strong">;
|
|
39
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
40
|
+
kind: z.ZodLiteral<"emphasis">;
|
|
41
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
42
|
+
kind: z.ZodLiteral<"accent">;
|
|
43
|
+
tone: z.ZodEnum<{
|
|
44
|
+
accent: "accent";
|
|
45
|
+
brand: "brand";
|
|
46
|
+
contrast: "contrast";
|
|
47
|
+
}>;
|
|
48
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
49
|
+
kind: z.ZodLiteral<"highlight">;
|
|
50
|
+
tone: z.ZodEnum<{
|
|
51
|
+
accent: "accent";
|
|
52
|
+
brand: "brand";
|
|
53
|
+
soft: "soft";
|
|
54
|
+
}>;
|
|
55
|
+
}, z.core.$strip>], "kind">>>;
|
|
56
|
+
}, z.core.$strip>>;
|
|
57
|
+
export declare function plainTextToInlineText(value: string): InlineText;
|
|
58
|
+
export declare function inlineTextToPlainText(value: InlineText): string;
|
|
59
|
+
export declare function isInlineTextEmpty(value: InlineText): boolean;
|
|
60
|
+
export declare function coerceInlineTextWithFallback(value: unknown, fallbackPlainText: string | null | undefined): InlineText;
|
|
61
|
+
export declare function parseInlineTextFromUnknown(value: unknown): InlineTextParseResult;
|
|
62
|
+
export declare function normalizeInlineText(value: InlineText): InlineText;
|
|
63
|
+
export declare function normalizeInlineTextMarks(marks: readonly InlineTextMark[]): readonly InlineTextMark[];
|
|
64
|
+
export declare function inlineTextMarksEqual(left: readonly InlineTextMark[], right: readonly InlineTextMark[]): boolean;
|
|
65
|
+
export declare function inlineTextEqual(left: InlineText, right: InlineText): boolean;
|
|
66
|
+
export declare function applyInlineTextMarkToRange(value: InlineText, range: Readonly<{
|
|
67
|
+
start: number;
|
|
68
|
+
end: number;
|
|
69
|
+
}>, mark: InlineTextMark): InlineText;
|
|
70
|
+
export declare function removeInlineTextMarkFromRange(value: InlineText, range: Readonly<{
|
|
71
|
+
start: number;
|
|
72
|
+
end: number;
|
|
73
|
+
}>, kind: InlineTextMark['kind']): InlineText;
|
|
74
|
+
export declare function replaceInlineTextRange(value: InlineText, range: Readonly<{
|
|
75
|
+
start: number;
|
|
76
|
+
end: number;
|
|
77
|
+
}>, replacement: InlineText): InlineText;
|
|
78
|
+
export declare function truncateInlineText(value: InlineText, maxLength: number | undefined): InlineText;
|
|
@@ -35,6 +35,7 @@ import type { BlockConfigInputOf } from '../defineBlock';
|
|
|
35
35
|
import type { FragmentConfigInputOf } from '../fragments';
|
|
36
36
|
import type { ContainerStylesContent, SectionStylesContent, CardStylesContent } from '../fields/boxStyles';
|
|
37
37
|
import type { LinkValue } from '../types/link';
|
|
38
|
+
import type { InlineText } from '../inlineText';
|
|
38
39
|
import type { RichTextDoc } from './richTextSchema';
|
|
39
40
|
/**
|
|
40
41
|
* Structural minimum a manifest field must satisfy for derivation. The full
|
|
@@ -67,6 +68,7 @@ export interface DerivableField {
|
|
|
67
68
|
/** Repeater item groups with this flag are flattened at runtime. */
|
|
68
69
|
ui?: {
|
|
69
70
|
flattenInRepeater?: boolean;
|
|
71
|
+
hidden?: boolean;
|
|
70
72
|
};
|
|
71
73
|
/** Phantom marker carried by style field factories. */
|
|
72
74
|
readonly __boxStyleType?: 'section' | 'container' | 'card';
|
|
@@ -98,7 +100,7 @@ type FieldToValue<F extends DerivableField> = F extends {
|
|
|
98
100
|
readonly __boxStyleType?: 'container';
|
|
99
101
|
} ? ContainerStylesContent : F extends {
|
|
100
102
|
readonly __boxStyleType?: 'card';
|
|
101
|
-
} ? CardStylesContent : F['type'] extends 'text' | 'slug' | 'url' | 'reference' | 'date' | 'time' | 'datetime' ? string : F['type'] extends 'number' ? number : F['type'] extends 'boolean' ? boolean : F['type'] extends 'richText' ? RichTextDoc : F['type'] extends 'media' | 'file' ? Media : F['type'] extends 'link' ? LinkValue : F['type'] extends 'select' ? SelectValue<F> : F['type'] extends 'group' | 'modal' | 'tabGroup' ? CompositeValue<F> : F['type'] extends 'repeater' ? ReadonlyArray<RepeaterItemValue<F>> : F['type'] extends 'presetOrCustom' | 'contentTypeSelect' | 'entryPicker' ? unknown : never;
|
|
103
|
+
} ? CardStylesContent : F['type'] extends 'text' | 'slug' | 'url' | 'reference' | 'date' | 'time' | 'datetime' ? string : F['type'] extends 'number' ? number : F['type'] extends 'boolean' ? boolean : F['type'] extends 'richText' ? RichTextDoc : F['type'] extends 'inlineText' ? InlineText : F['type'] extends 'media' | 'file' ? Media : F['type'] extends 'link' ? LinkValue : F['type'] extends 'select' ? SelectValue<F> : F['type'] extends 'group' | 'modal' | 'tabGroup' ? CompositeValue<F> : F['type'] extends 'repeater' ? ReadonlyArray<RepeaterItemValue<F>> : F['type'] extends 'presetOrCustom' | 'contentTypeSelect' | 'entryPicker' ? unknown : never;
|
|
102
104
|
/**
|
|
103
105
|
* Select-field value type.
|
|
104
106
|
*
|
|
@@ -85,6 +85,13 @@ type MaxItemsConstraint = Readonly<{
|
|
|
85
85
|
type RichTextDocConstraint = Readonly<{
|
|
86
86
|
kind: "richTextDoc";
|
|
87
87
|
}>;
|
|
88
|
+
type InlineTextConstraint = Readonly<{
|
|
89
|
+
kind: "inlineText";
|
|
90
|
+
}>;
|
|
91
|
+
type MaxPlainTextLengthConstraint = Readonly<{
|
|
92
|
+
kind: "maxPlainTextLength";
|
|
93
|
+
maximum: number;
|
|
94
|
+
}>;
|
|
88
95
|
type MediaObjectConstraint = Readonly<{
|
|
89
96
|
kind: "mediaObject";
|
|
90
97
|
}>;
|
|
@@ -101,9 +108,10 @@ type StringConstraint = RequiredConstraint | TextTypeConstraint | MaxLengthConst
|
|
|
101
108
|
type NumberConstraint = RequiredConstraint | NumberTypeConstraint | NumberMinConstraint | NumberMaxConstraint;
|
|
102
109
|
type SelectConstraint = RequiredConstraint | SelectOptionConstraint;
|
|
103
110
|
type ArrayConstraint = RequiredConstraint | ArrayTypeConstraint | MinItemsConstraint | MaxItemsConstraint;
|
|
111
|
+
type InlineTextPlanConstraint = RequiredConstraint | InlineTextConstraint | MaxPlainTextLengthConstraint;
|
|
104
112
|
type ObjectConstraint = RequiredConstraint | RichTextDocConstraint | MediaObjectConstraint | LinkObjectConstraint;
|
|
105
113
|
type BooleanConstraint = RequiredConstraint;
|
|
106
|
-
export type FieldConstraint = StringConstraint | NumberConstraint | SelectConstraint | ArrayConstraint | ObjectConstraint | BooleanConstraint;
|
|
114
|
+
export type FieldConstraint = StringConstraint | NumberConstraint | SelectConstraint | ArrayConstraint | InlineTextPlanConstraint | ObjectConstraint | BooleanConstraint;
|
|
107
115
|
export type SelectConstraintSource = Readonly<{
|
|
108
116
|
kind: "static";
|
|
109
117
|
values: readonly string[];
|
|
@@ -127,7 +135,7 @@ export type FieldValidationIssue = BaseIssue<"required", {
|
|
|
127
135
|
}> | BaseIssue<"tooManyItems", {
|
|
128
136
|
maximum: number;
|
|
129
137
|
itemLabel: string;
|
|
130
|
-
}> | BaseIssue<"invalidRichText"> | BaseIssue<"invalidMedia"> | BaseIssue<"invalidLink"> | BaseIssue<"invalidReference">;
|
|
138
|
+
}> | BaseIssue<"invalidRichText"> | BaseIssue<"invalidInlineText"> | BaseIssue<"invalidMedia"> | BaseIssue<"invalidLink"> | BaseIssue<"invalidReference">;
|
|
131
139
|
type BaseIssue<K extends string, Extra extends object = Record<never, never>> = Readonly<{
|
|
132
140
|
kind: K;
|
|
133
141
|
path: FieldPath;
|
|
@@ -187,6 +195,10 @@ export type BooleanFieldValidationPlan = PlanBase<"boolean", "boolean", BooleanC
|
|
|
187
195
|
export type RichTextFieldValidationPlan = PlanBase<"richText", "object", ObjectConstraint> & Readonly<{
|
|
188
196
|
fieldType: "richText";
|
|
189
197
|
}>;
|
|
198
|
+
export type InlineTextFieldValidationPlan = PlanBase<"inlineText", "array", InlineTextPlanConstraint> & Readonly<{
|
|
199
|
+
fieldType: "inlineText";
|
|
200
|
+
plainTextFallbackPath?: FieldPath;
|
|
201
|
+
}>;
|
|
190
202
|
export type MediaFieldValidationPlan = PlanBase<"media", "object", ObjectConstraint> & Readonly<{
|
|
191
203
|
fieldType: "media" | "file";
|
|
192
204
|
legacyStringType: string;
|
|
@@ -210,7 +222,7 @@ export type GroupFieldValidationPlan = PlanBase<"group", "object", ObjectConstra
|
|
|
210
222
|
export type PassthroughFieldValidationPlan = PlanBase<"passthrough", "unknown", RequiredConstraint> & Readonly<{
|
|
211
223
|
fieldType: "presetOrCustom" | "contentTypeSelect" | "entryPicker";
|
|
212
224
|
}>;
|
|
213
|
-
export type FieldValidationPlan = StringFieldValidationPlan | NumberFieldValidationPlan | BooleanFieldValidationPlan | RichTextFieldValidationPlan | MediaFieldValidationPlan | LinkFieldValidationPlan | SelectFieldValidationPlan | RepeaterFieldValidationPlan | GroupFieldValidationPlan | PassthroughFieldValidationPlan;
|
|
225
|
+
export type FieldValidationPlan = StringFieldValidationPlan | NumberFieldValidationPlan | BooleanFieldValidationPlan | RichTextFieldValidationPlan | InlineTextFieldValidationPlan | MediaFieldValidationPlan | LinkFieldValidationPlan | SelectFieldValidationPlan | RepeaterFieldValidationPlan | GroupFieldValidationPlan | PassthroughFieldValidationPlan;
|
|
214
226
|
export type FieldPresence = Readonly<{
|
|
215
227
|
kind: "required";
|
|
216
228
|
}> | Readonly<{
|
|
@@ -743,6 +743,185 @@ declare const richTextFieldSchema: z.ZodObject<{
|
|
|
743
743
|
}, z.core.$strip>>;
|
|
744
744
|
type: z.ZodLiteral<"richText">;
|
|
745
745
|
}, z.core.$strip>;
|
|
746
|
+
declare const inlineTextFieldSchema: z.ZodObject<{
|
|
747
|
+
id: z.ZodString;
|
|
748
|
+
label: z.ZodString;
|
|
749
|
+
description: z.ZodOptional<z.ZodString>;
|
|
750
|
+
visibleRoles: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
751
|
+
admin: "admin";
|
|
752
|
+
designer: "designer";
|
|
753
|
+
author: "author";
|
|
754
|
+
}>>>;
|
|
755
|
+
defaultValue: z.ZodOptional<z.ZodAny>;
|
|
756
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
757
|
+
ui: z.ZodOptional<z.ZodObject<{
|
|
758
|
+
widget: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
759
|
+
preset: z.ZodOptional<z.ZodOptional<z.ZodEnum<{
|
|
760
|
+
disclosure: "disclosure";
|
|
761
|
+
}>>>;
|
|
762
|
+
flattenInRepeater: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
763
|
+
hidden: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
764
|
+
hideLabel: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
765
|
+
hideDescription: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
766
|
+
showCharCount: z.ZodOptional<z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
|
|
767
|
+
max: z.ZodNumber;
|
|
768
|
+
}, z.core.$strip>]>>>;
|
|
769
|
+
showSlugPreview: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
770
|
+
variant: z.ZodOptional<z.ZodOptional<z.ZodEnum<{
|
|
771
|
+
full: "full";
|
|
772
|
+
inline: "inline";
|
|
773
|
+
limited: "limited";
|
|
774
|
+
media: "media";
|
|
775
|
+
notes: "notes";
|
|
776
|
+
}>>>;
|
|
777
|
+
richTextVariant: z.ZodOptional<z.ZodOptional<z.ZodEnum<{
|
|
778
|
+
full: "full";
|
|
779
|
+
inline: "inline";
|
|
780
|
+
limited: "limited";
|
|
781
|
+
media: "media";
|
|
782
|
+
notes: "notes";
|
|
783
|
+
}>>>;
|
|
784
|
+
cropEditorMode: z.ZodOptional<z.ZodOptional<z.ZodEnum<{
|
|
785
|
+
inline: "inline";
|
|
786
|
+
dialog: "dialog";
|
|
787
|
+
}>>>;
|
|
788
|
+
cropEditorAutoOpen: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
789
|
+
mediaPickerAutoOpen: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
790
|
+
showMediaPreview: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
791
|
+
showMediaOverlayActions: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
792
|
+
mediaPreviewMaxWidth: z.ZodOptional<z.ZodOptional<z.ZodEnum<{
|
|
793
|
+
none: "none";
|
|
794
|
+
sm: "sm";
|
|
795
|
+
md: "md";
|
|
796
|
+
xs: "xs";
|
|
797
|
+
}>>>;
|
|
798
|
+
preventMediaPreviewUpscale: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
799
|
+
mediaDelivery: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
800
|
+
sizes: z.ZodOptional<z.ZodString>;
|
|
801
|
+
widthCandidates: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
802
|
+
maxCssWidth: z.ZodOptional<z.ZodNumber>;
|
|
803
|
+
maxCssHeight: z.ZodOptional<z.ZodNumber>;
|
|
804
|
+
strategy: z.ZodOptional<z.ZodEnum<{
|
|
805
|
+
default: "default";
|
|
806
|
+
columnsAuto: "columnsAuto";
|
|
807
|
+
imageGalleryVariant: "imageGalleryVariant";
|
|
808
|
+
}>>;
|
|
809
|
+
strategyOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
810
|
+
}, z.core.$strip>>>;
|
|
811
|
+
mediaDeliveryByVariant: z.ZodOptional<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
812
|
+
sizes: z.ZodOptional<z.ZodString>;
|
|
813
|
+
widthCandidates: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
814
|
+
maxCssWidth: z.ZodOptional<z.ZodNumber>;
|
|
815
|
+
maxCssHeight: z.ZodOptional<z.ZodNumber>;
|
|
816
|
+
strategy: z.ZodOptional<z.ZodEnum<{
|
|
817
|
+
default: "default";
|
|
818
|
+
columnsAuto: "columnsAuto";
|
|
819
|
+
imageGalleryVariant: "imageGalleryVariant";
|
|
820
|
+
}>>;
|
|
821
|
+
strategyOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
822
|
+
}, z.core.$strip>>>>;
|
|
823
|
+
inputType: z.ZodOptional<z.ZodOptional<z.ZodEnum<{
|
|
824
|
+
number: "number";
|
|
825
|
+
email: "email";
|
|
826
|
+
text: "text";
|
|
827
|
+
tel: "tel";
|
|
828
|
+
}>>>;
|
|
829
|
+
min: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
830
|
+
max: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
831
|
+
step: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
832
|
+
showValue: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
833
|
+
pattern: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
834
|
+
placeholder: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
835
|
+
visibleWhen: z.ZodOptional<z.ZodOptional<z.ZodType<FieldVisibleWhen, unknown, z.core.$ZodTypeInternals<FieldVisibleWhen, unknown>>>>;
|
|
836
|
+
modalConfig: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
837
|
+
buttonLabel: z.ZodOptional<z.ZodString>;
|
|
838
|
+
description: z.ZodOptional<z.ZodString>;
|
|
839
|
+
buttonVariant: z.ZodOptional<z.ZodEnum<{
|
|
840
|
+
outline: "outline";
|
|
841
|
+
default: "default";
|
|
842
|
+
}>>;
|
|
843
|
+
showCustomizedIndicator: z.ZodOptional<z.ZodBoolean>;
|
|
844
|
+
maxWidth: z.ZodOptional<z.ZodString>;
|
|
845
|
+
}, z.core.$strip>>>;
|
|
846
|
+
allowedTypes: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
847
|
+
image: "image";
|
|
848
|
+
color: "color";
|
|
849
|
+
gradient: "gradient";
|
|
850
|
+
}>>>>;
|
|
851
|
+
fullWidth: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
852
|
+
row: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
853
|
+
colSpan: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
854
|
+
layout: z.ZodOptional<z.ZodOptional<z.ZodEnum<{
|
|
855
|
+
grid: "grid";
|
|
856
|
+
stack: "stack";
|
|
857
|
+
}>>>;
|
|
858
|
+
columns: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
859
|
+
gridColsPreset: z.ZodOptional<z.ZodOptional<z.ZodEnum<{
|
|
860
|
+
simple2: "simple2";
|
|
861
|
+
simple3: "simple3";
|
|
862
|
+
simple4: "simple4";
|
|
863
|
+
buttonCtaRow: "buttonCtaRow";
|
|
864
|
+
}>>>;
|
|
865
|
+
gridColumns: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
866
|
+
base: z.ZodOptional<z.ZodNumber>;
|
|
867
|
+
sm: z.ZodOptional<z.ZodNumber>;
|
|
868
|
+
md: z.ZodOptional<z.ZodNumber>;
|
|
869
|
+
lg: z.ZodOptional<z.ZodNumber>;
|
|
870
|
+
xl: z.ZodOptional<z.ZodNumber>;
|
|
871
|
+
}, z.core.$strip>>>;
|
|
872
|
+
gridColsClassName: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
873
|
+
repeaterPreset: z.ZodOptional<z.ZodOptional<z.ZodEnum<{
|
|
874
|
+
thumbnailGrid: "thumbnailGrid";
|
|
875
|
+
layoutGrid: "layoutGrid";
|
|
876
|
+
}>>>;
|
|
877
|
+
thumbnailField: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
878
|
+
thumbnailAltField: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
879
|
+
thumbnailLabelField: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
880
|
+
thumbnailAspectRatio: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
881
|
+
thumbnailCardDensity: z.ZodOptional<z.ZodOptional<z.ZodEnum<{
|
|
882
|
+
compact: "compact";
|
|
883
|
+
comfortable: "comfortable";
|
|
884
|
+
}>>>;
|
|
885
|
+
layoutGridColumnsFields: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
886
|
+
base: z.ZodOptional<z.ZodString>;
|
|
887
|
+
sm: z.ZodOptional<z.ZodString>;
|
|
888
|
+
md: z.ZodOptional<z.ZodString>;
|
|
889
|
+
lg: z.ZodString;
|
|
890
|
+
xl: z.ZodOptional<z.ZodString>;
|
|
891
|
+
}, z.core.$strip>>>;
|
|
892
|
+
layoutGridSpanField: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
893
|
+
layoutGridRowField: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
894
|
+
layoutGridColumnField: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
895
|
+
layoutGridMaxRows: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
896
|
+
iconPickerPreset: z.ZodOptional<z.ZodOptional<z.ZodEnum<{
|
|
897
|
+
cta: "cta";
|
|
898
|
+
feature: "feature";
|
|
899
|
+
}>>>;
|
|
900
|
+
contentTypeField: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
901
|
+
fixedContentType: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
902
|
+
valueFrom: z.ZodOptional<z.ZodOptional<z.ZodEnum<{
|
|
903
|
+
id: "id";
|
|
904
|
+
identifier: "identifier";
|
|
905
|
+
slug: "slug";
|
|
906
|
+
}>>>;
|
|
907
|
+
siteOptionSource: z.ZodOptional<z.ZodOptional<z.ZodEnum<{
|
|
908
|
+
venues: "venues";
|
|
909
|
+
eventCategories: "eventCategories";
|
|
910
|
+
staffMembers: "staffMembers";
|
|
911
|
+
}>>>;
|
|
912
|
+
searchThreshold: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
913
|
+
renderInHeader: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
914
|
+
intent: z.ZodOptional<z.ZodOptional<z.ZodEnum<{
|
|
915
|
+
style: "style";
|
|
916
|
+
display: "display";
|
|
917
|
+
content: "content";
|
|
918
|
+
behavior: "behavior";
|
|
919
|
+
}>>>;
|
|
920
|
+
}, z.core.$strip>>;
|
|
921
|
+
type: z.ZodLiteral<"inlineText">;
|
|
922
|
+
maxLength: z.ZodOptional<z.ZodNumber>;
|
|
923
|
+
plainTextField: z.ZodOptional<z.ZodString>;
|
|
924
|
+
}, z.core.$strip>;
|
|
746
925
|
declare const mediaFieldSchema: z.ZodObject<{
|
|
747
926
|
id: z.ZodString;
|
|
748
927
|
label: z.ZodString;
|
|
@@ -4219,6 +4398,7 @@ declare const entryPickerFieldSchema: z.ZodObject<{
|
|
|
4219
4398
|
type FieldSchemaMembers = readonly [
|
|
4220
4399
|
typeof textFieldSchema,
|
|
4221
4400
|
typeof richTextFieldSchema,
|
|
4401
|
+
typeof inlineTextFieldSchema,
|
|
4222
4402
|
typeof mediaFieldSchema,
|
|
4223
4403
|
typeof fileFieldSchema,
|
|
4224
4404
|
typeof booleanFieldSchema,
|
|
@@ -4252,6 +4432,7 @@ type SelectFieldBaseInput = Omit<z.input<typeof baseFieldSchema>, 'type' | 'ui'>
|
|
|
4252
4432
|
};
|
|
4253
4433
|
export type TextFieldDefinition = z.output<typeof textFieldSchema>;
|
|
4254
4434
|
export type RichTextFieldDefinition = z.output<typeof richTextFieldSchema>;
|
|
4435
|
+
export type InlineTextFieldDefinition = z.output<typeof inlineTextFieldSchema>;
|
|
4255
4436
|
export type MediaFieldDefinition = z.output<typeof mediaFieldSchema>;
|
|
4256
4437
|
export type FileFieldDefinition = z.output<typeof fileFieldSchema>;
|
|
4257
4438
|
export type BooleanFieldDefinition = z.output<typeof booleanFieldSchema>;
|
|
@@ -4321,7 +4502,7 @@ export type PresetOption = {
|
|
|
4321
4502
|
export type PresetOrCustomFieldDefinition = z.output<typeof presetOrCustomFieldSchema>;
|
|
4322
4503
|
export type ContentTypeSelectFieldDefinition = z.output<typeof contentTypeSelectFieldSchema>;
|
|
4323
4504
|
export type EntryPickerFieldDefinition = z.output<typeof entryPickerFieldSchema>;
|
|
4324
|
-
export type FieldDefinition = TextFieldDefinition | RichTextFieldDefinition | MediaFieldDefinition | FileFieldDefinition | BooleanFieldDefinition | NumberFieldDefinition | DateFieldDefinition | TimeFieldDefinition | DateTimeFieldDefinition | SlugFieldDefinition | UrlFieldDefinition | LinkFieldDefinition | SelectFieldDefinition | ReferenceFieldDefinition | RepeaterFieldDefinition | GroupFieldDefinition | ModalFieldDefinition | TabGroupFieldDefinition | PresetOrCustomFieldDefinition | ContentTypeSelectFieldDefinition | EntryPickerFieldDefinition;
|
|
4505
|
+
export type FieldDefinition = TextFieldDefinition | RichTextFieldDefinition | InlineTextFieldDefinition | MediaFieldDefinition | FileFieldDefinition | BooleanFieldDefinition | NumberFieldDefinition | DateFieldDefinition | TimeFieldDefinition | DateTimeFieldDefinition | SlugFieldDefinition | UrlFieldDefinition | LinkFieldDefinition | SelectFieldDefinition | ReferenceFieldDefinition | RepeaterFieldDefinition | GroupFieldDefinition | ModalFieldDefinition | TabGroupFieldDefinition | PresetOrCustomFieldDefinition | ContentTypeSelectFieldDefinition | EntryPickerFieldDefinition;
|
|
4325
4506
|
/**
|
|
4326
4507
|
* FieldDefinition input type (pre-defaults).
|
|
4327
4508
|
*
|
|
@@ -4360,23 +4541,23 @@ export type SlotDefinition = z.infer<typeof slotSchema>;
|
|
|
4360
4541
|
export declare const styleTokenSchema: z.ZodObject<{
|
|
4361
4542
|
background: z.ZodOptional<z.ZodEnum<{
|
|
4362
4543
|
surface: "surface";
|
|
4544
|
+
accent: "accent";
|
|
4363
4545
|
background: "background";
|
|
4364
4546
|
foreground: "foreground";
|
|
4365
|
-
accent: "accent";
|
|
4366
4547
|
muted: "muted";
|
|
4367
4548
|
}>>;
|
|
4368
4549
|
foreground: z.ZodOptional<z.ZodEnum<{
|
|
4369
4550
|
surface: "surface";
|
|
4551
|
+
accent: "accent";
|
|
4370
4552
|
background: "background";
|
|
4371
4553
|
foreground: "foreground";
|
|
4372
|
-
accent: "accent";
|
|
4373
4554
|
muted: "muted";
|
|
4374
4555
|
}>>;
|
|
4375
4556
|
border: z.ZodOptional<z.ZodEnum<{
|
|
4376
4557
|
surface: "surface";
|
|
4558
|
+
accent: "accent";
|
|
4377
4559
|
background: "background";
|
|
4378
4560
|
foreground: "foreground";
|
|
4379
|
-
accent: "accent";
|
|
4380
4561
|
muted: "muted";
|
|
4381
4562
|
}>>;
|
|
4382
4563
|
typography: z.ZodOptional<z.ZodEnum<{
|
|
@@ -4448,23 +4629,23 @@ export declare const manifestSchema: z.ZodObject<{
|
|
|
4448
4629
|
styleTokens: z.ZodOptional<z.ZodObject<{
|
|
4449
4630
|
background: z.ZodOptional<z.ZodEnum<{
|
|
4450
4631
|
surface: "surface";
|
|
4632
|
+
accent: "accent";
|
|
4451
4633
|
background: "background";
|
|
4452
4634
|
foreground: "foreground";
|
|
4453
|
-
accent: "accent";
|
|
4454
4635
|
muted: "muted";
|
|
4455
4636
|
}>>;
|
|
4456
4637
|
foreground: z.ZodOptional<z.ZodEnum<{
|
|
4457
4638
|
surface: "surface";
|
|
4639
|
+
accent: "accent";
|
|
4458
4640
|
background: "background";
|
|
4459
4641
|
foreground: "foreground";
|
|
4460
|
-
accent: "accent";
|
|
4461
4642
|
muted: "muted";
|
|
4462
4643
|
}>>;
|
|
4463
4644
|
border: z.ZodOptional<z.ZodEnum<{
|
|
4464
4645
|
surface: "surface";
|
|
4646
|
+
accent: "accent";
|
|
4465
4647
|
background: "background";
|
|
4466
4648
|
foreground: "foreground";
|
|
4467
|
-
accent: "accent";
|
|
4468
4649
|
muted: "muted";
|
|
4469
4650
|
}>>;
|
|
4470
4651
|
typography: z.ZodOptional<z.ZodEnum<{
|
|
@@ -2,11 +2,12 @@ import React from 'react';
|
|
|
2
2
|
import { type ButtonSizeName } from '../../../../../theme-core/src/buttons/index';
|
|
3
3
|
import type { PreviewLinkedEntryFieldBinding } from '../../data';
|
|
4
4
|
export type TextNodeProps = {
|
|
5
|
-
value?:
|
|
5
|
+
value?: unknown;
|
|
6
6
|
className?: string;
|
|
7
7
|
path?: string;
|
|
8
8
|
linkedEntryField?: PreviewLinkedEntryFieldBinding;
|
|
9
9
|
maxLength?: number;
|
|
10
|
+
inlineTextFallbackPath?: string;
|
|
10
11
|
children?: React.ReactNode;
|
|
11
12
|
};
|
|
12
13
|
export declare const TextNode: React.FC<TextNodeProps & {
|
|
@@ -20,6 +20,7 @@ export { useUISelector } from './ui/useUISelector';
|
|
|
20
20
|
export { EditorUiStoreProvider, useEditorUiStore, useEditorUiStoreInstance, useOptionalEditorUiStoreInstance, createEditorUiStore } from './ui/editorUiStore';
|
|
21
21
|
export type { ActivePreviewField, EditorUiStoreInstance, EditorUiState, EditorPreviewInspectorStore, EditorLinkedEntrySnapshot, PreviewInspection, PreviewSidebarTab, ViewportMode, ViewportWidth, ViewportState, ZoomLevel, } from './ui/editorUiStore';
|
|
22
22
|
export { PreviewTextEditor } from './primitives/PreviewTextEditor';
|
|
23
|
+
export { PreviewInlineTextEditor } from './primitives/PreviewInlineTextEditor';
|
|
23
24
|
export { PreviewRichTextEditor } from './primitives/PreviewRichTextEditor';
|
|
24
25
|
export { useStoreBinding, parseEditorPath } from './primitives/shared';
|
|
25
26
|
export type { PathInfo } from './primitives/shared';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { TextProps } from '../../../blocks/src/index';
|
|
2
|
+
type PreviewInlineTextEditorProps = TextProps & {
|
|
3
|
+
path: string;
|
|
4
|
+
plainTextPath: string;
|
|
5
|
+
fallbackPlainText?: string;
|
|
6
|
+
onBlockFieldFocus?: (path: string) => void;
|
|
7
|
+
};
|
|
8
|
+
export declare function PreviewInlineTextEditor({ path, plainTextPath, fallbackPlainText, onBlockFieldFocus, className, maxLength, as: Comp, }: PreviewInlineTextEditorProps): import("react").JSX.Element | null;
|
|
9
|
+
export {};
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import type { ContentFieldConfig } from '../content-types/schema';
|
|
8
8
|
export type ContentFieldType = ContentFieldConfig['type'];
|
|
9
|
-
export type BlockFieldType = 'text' | 'number' | 'slug' | 'url' | 'richText' | 'media' | 'file' | 'boolean' | 'select' | 'reference' | 'link' | 'date' | 'datetime' | 'repeater';
|
|
9
|
+
export type BlockFieldType = 'text' | 'inlineText' | 'number' | 'slug' | 'url' | 'richText' | 'media' | 'file' | 'boolean' | 'select' | 'reference' | 'link' | 'date' | 'datetime' | 'repeater';
|
|
10
10
|
export type ScalarBlockFieldType = Exclude<BlockFieldType, 'repeater'>;
|
|
11
11
|
export declare function isScalarBlockFieldType(type: string): type is ScalarBlockFieldType;
|
|
12
12
|
export type MetaFieldType = 'text' | 'date' | 'enum';
|
|
@@ -54,6 +54,12 @@ export declare const DEFAULT_TEMPLATE_DEFINITIONS: {
|
|
|
54
54
|
source: "meta";
|
|
55
55
|
path: "title";
|
|
56
56
|
}>;
|
|
57
|
+
readonly headlineInline: Readonly<{
|
|
58
|
+
source: "transform";
|
|
59
|
+
transform: import("./types").TemplateBindingTransformName;
|
|
60
|
+
input?: import("./types").TemplateBindingDescriptor | string;
|
|
61
|
+
path?: string;
|
|
62
|
+
}>;
|
|
57
63
|
readonly subheadline: Readonly<{
|
|
58
64
|
source: "fallback";
|
|
59
65
|
options: import("./types").TemplateBindingValue[];
|
|
@@ -107,6 +113,12 @@ export declare const DEFAULT_TEMPLATE_DEFINITIONS: {
|
|
|
107
113
|
source: "meta";
|
|
108
114
|
path: "title";
|
|
109
115
|
}>;
|
|
116
|
+
readonly headlineInline: Readonly<{
|
|
117
|
+
source: "transform";
|
|
118
|
+
transform: import("./types").TemplateBindingTransformName;
|
|
119
|
+
input?: import("./types").TemplateBindingDescriptor | string;
|
|
120
|
+
path?: string;
|
|
121
|
+
}>;
|
|
110
122
|
readonly subheadline: Readonly<{
|
|
111
123
|
source: "fallback";
|
|
112
124
|
options: import("./types").TemplateBindingValue[];
|
|
@@ -177,6 +189,12 @@ export declare const DEFAULT_TEMPLATE_DEFINITIONS: {
|
|
|
177
189
|
source: "meta";
|
|
178
190
|
path: "title";
|
|
179
191
|
}>;
|
|
192
|
+
readonly headlineInline: Readonly<{
|
|
193
|
+
source: "transform";
|
|
194
|
+
transform: import("./types").TemplateBindingTransformName;
|
|
195
|
+
input?: import("./types").TemplateBindingDescriptor | string;
|
|
196
|
+
path?: string;
|
|
197
|
+
}>;
|
|
180
198
|
readonly subheadline: Readonly<{
|
|
181
199
|
source: "fallback";
|
|
182
200
|
options: import("./types").TemplateBindingValue[];
|
|
@@ -235,6 +253,12 @@ export declare const DEFAULT_TEMPLATE_DEFINITIONS: {
|
|
|
235
253
|
source: "meta";
|
|
236
254
|
path: "title";
|
|
237
255
|
}>;
|
|
256
|
+
readonly headlineInline: Readonly<{
|
|
257
|
+
source: "transform";
|
|
258
|
+
transform: import("./types").TemplateBindingTransformName;
|
|
259
|
+
input?: import("./types").TemplateBindingDescriptor | string;
|
|
260
|
+
path?: string;
|
|
261
|
+
}>;
|
|
238
262
|
readonly subheadline: Readonly<{
|
|
239
263
|
source: "field";
|
|
240
264
|
path: "intro";
|
|
@@ -280,6 +304,12 @@ export declare const DEFAULT_TEMPLATE_DEFINITIONS: {
|
|
|
280
304
|
source: "meta";
|
|
281
305
|
path: "title";
|
|
282
306
|
}>;
|
|
307
|
+
readonly headlineInline: Readonly<{
|
|
308
|
+
source: "transform";
|
|
309
|
+
transform: import("./types").TemplateBindingTransformName;
|
|
310
|
+
input?: import("./types").TemplateBindingDescriptor | string;
|
|
311
|
+
path?: string;
|
|
312
|
+
}>;
|
|
283
313
|
readonly subheadline: Readonly<{
|
|
284
314
|
source: "fallback";
|
|
285
315
|
options: import("./types").TemplateBindingValue[];
|
|
@@ -8,6 +8,7 @@ export declare const TEMPLATE_BINDING_TRANSFORMS: {
|
|
|
8
8
|
readonly RICHTEXT_FIRST_PARAGRAPH: "richtext.firstParagraph";
|
|
9
9
|
readonly DATE_FORMAT_SHORT: "date.formatShort";
|
|
10
10
|
readonly DATE_FORMAT_LONG: "date.formatLong";
|
|
11
|
+
readonly TEXT_INLINE_TEXT: "text.inlineText";
|
|
11
12
|
};
|
|
12
13
|
export type TemplateBindingTransformName = typeof TEMPLATE_BINDING_TRANSFORMS[keyof typeof TEMPLATE_BINDING_TRANSFORMS];
|
|
13
14
|
export type TemplateBindingDescriptor = {
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type InlineTextAccentTone, type InlineTextHighlightTone } from '../../../blocks/src/index';
|
|
2
|
+
import { type InlineTextPresentationContext } from './presentation';
|
|
3
|
+
import type { InlineTextSelection } from './selection';
|
|
4
|
+
export type InlineTextEditorTone = 'light' | 'dark';
|
|
5
|
+
export declare function FloatingToolbar({ selection, selectedText, tone, presentationContext, openMenu, setOpenMenu, onToggleStrong, onToggleEmphasis, onApplyAccent, onRemoveAccent, onApplyHighlight, onRemoveHighlight, }: {
|
|
6
|
+
selection: InlineTextSelection;
|
|
7
|
+
selectedText: string;
|
|
8
|
+
tone: InlineTextEditorTone;
|
|
9
|
+
presentationContext: InlineTextPresentationContext;
|
|
10
|
+
openMenu: 'accent' | 'highlight' | null;
|
|
11
|
+
setOpenMenu: (menu: 'accent' | 'highlight' | null) => void;
|
|
12
|
+
onToggleStrong: () => void;
|
|
13
|
+
onToggleEmphasis: () => void;
|
|
14
|
+
onApplyAccent: (tone: InlineTextAccentTone) => void;
|
|
15
|
+
onRemoveAccent: () => void;
|
|
16
|
+
onApplyHighlight: (tone: InlineTextHighlightTone) => void;
|
|
17
|
+
onRemoveHighlight: () => void;
|
|
18
|
+
}): import("react").JSX.Element;
|
|
@@ -1 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
import { type ElementType } from 'react';
|
|
2
|
+
import { type InlineText } from '../../../blocks/src/index';
|
|
3
|
+
import { type InlineTextEditorTone } from './FloatingToolbar';
|
|
4
|
+
export type InlineTextEditorProps = {
|
|
5
|
+
value: InlineText;
|
|
6
|
+
onChange: (nextValue: InlineText, plainText: string) => void;
|
|
7
|
+
as?: ElementType;
|
|
8
|
+
id?: string;
|
|
9
|
+
className?: string;
|
|
10
|
+
placeholder?: string;
|
|
11
|
+
maxLength?: number;
|
|
12
|
+
ariaLabel?: string;
|
|
13
|
+
ariaDescribedBy?: string;
|
|
14
|
+
toolbarTone?: InlineTextEditorTone;
|
|
15
|
+
onFocus?: () => void;
|
|
16
|
+
onBlur?: () => void;
|
|
17
|
+
};
|
|
18
|
+
export declare function InlineTextEditor({ value, onChange, as: Comp, id, className, placeholder, maxLength, ariaLabel, ariaDescribedBy, toolbarTone, onFocus, onBlur, }: InlineTextEditorProps): import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function InlineTextEditorStyles(): import("react").JSX.Element;
|