@fieldia/core 0.1.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/LICENSE +21 -0
- package/README.md +31 -0
- package/package.json +40 -0
- package/schema/page.schema.json +2142 -0
- package/src/index.d.mts +15 -0
- package/src/index.d.ts +15 -0
- package/src/index.js +46 -0
- package/src/index.js.map +1 -0
- package/src/index.mjs +14 -0
- package/src/index.mjs.map +1 -0
- package/src/lib/expression/evaluateModifier.d.mts +55 -0
- package/src/lib/expression/evaluateModifier.d.ts +55 -0
- package/src/lib/expression/evaluateModifier.js +121 -0
- package/src/lib/expression/evaluateModifier.js.map +1 -0
- package/src/lib/expression/evaluateModifier.mjs +117 -0
- package/src/lib/expression/evaluateModifier.mjs.map +1 -0
- package/src/lib/expression/evaluator.d.mts +23 -0
- package/src/lib/expression/evaluator.d.ts +23 -0
- package/src/lib/expression/evaluator.js +122 -0
- package/src/lib/expression/evaluator.js.map +1 -0
- package/src/lib/expression/evaluator.mjs +118 -0
- package/src/lib/expression/evaluator.mjs.map +1 -0
- package/src/lib/expression/extractFieldNames.d.mts +41 -0
- package/src/lib/expression/extractFieldNames.d.ts +41 -0
- package/src/lib/expression/extractFieldNames.js +97 -0
- package/src/lib/expression/extractFieldNames.js.map +1 -0
- package/src/lib/expression/extractFieldNames.mjs +93 -0
- package/src/lib/expression/extractFieldNames.mjs.map +1 -0
- package/src/lib/expression/modifier.d.mts +14 -0
- package/src/lib/expression/modifier.d.ts +14 -0
- package/src/lib/expression/modifier.js +55 -0
- package/src/lib/expression/modifier.js.map +1 -0
- package/src/lib/expression/modifier.mjs +52 -0
- package/src/lib/expression/modifier.mjs.map +1 -0
- package/src/lib/expression/parser.d.mts +109 -0
- package/src/lib/expression/parser.d.ts +109 -0
- package/src/lib/expression/parser.js +317 -0
- package/src/lib/expression/parser.js.map +1 -0
- package/src/lib/expression/parser.mjs +313 -0
- package/src/lib/expression/parser.mjs.map +1 -0
- package/src/lib/expression/tokenizer.d.mts +31 -0
- package/src/lib/expression/tokenizer.d.ts +31 -0
- package/src/lib/expression/tokenizer.js +100 -0
- package/src/lib/expression/tokenizer.js.map +1 -0
- package/src/lib/expression/tokenizer.mjs +96 -0
- package/src/lib/expression/tokenizer.mjs.map +1 -0
- package/src/lib/format/field.d.mts +967 -0
- package/src/lib/format/field.d.ts +967 -0
- package/src/lib/format/field.js +147 -0
- package/src/lib/format/field.js.map +1 -0
- package/src/lib/format/field.mjs +144 -0
- package/src/lib/format/field.mjs.map +1 -0
- package/src/lib/format/json-schema.d.mts +6 -0
- package/src/lib/format/json-schema.d.ts +6 -0
- package/src/lib/format/json-schema.js +14 -0
- package/src/lib/format/json-schema.js.map +1 -0
- package/src/lib/format/json-schema.mjs +11 -0
- package/src/lib/format/json-schema.mjs.map +1 -0
- package/src/lib/format/json.d.mts +7 -0
- package/src/lib/format/json.d.ts +7 -0
- package/src/lib/format/json.js +7 -0
- package/src/lib/format/json.js.map +1 -0
- package/src/lib/format/json.mjs +4 -0
- package/src/lib/format/json.mjs.map +1 -0
- package/src/lib/format/layout.d.mts +521 -0
- package/src/lib/format/layout.d.ts +521 -0
- package/src/lib/format/layout.js +150 -0
- package/src/lib/format/layout.js.map +1 -0
- package/src/lib/format/layout.mjs +147 -0
- package/src/lib/format/layout.mjs.map +1 -0
- package/src/lib/format/layout.types.d.mts +22 -0
- package/src/lib/format/layout.types.d.ts +22 -0
- package/src/lib/format/layout.types.js +3 -0
- package/src/lib/format/layout.types.js.map +1 -0
- package/src/lib/format/layout.types.mjs +2 -0
- package/src/lib/format/layout.types.mjs.map +1 -0
- package/src/lib/format/page.d.mts +511 -0
- package/src/lib/format/page.d.ts +511 -0
- package/src/lib/format/page.js +27 -0
- package/src/lib/format/page.js.map +1 -0
- package/src/lib/format/page.mjs +24 -0
- package/src/lib/format/page.mjs.map +1 -0
- package/src/lib/format/validate.d.mts +23 -0
- package/src/lib/format/validate.d.ts +23 -0
- package/src/lib/format/validate.js +210 -0
- package/src/lib/format/validate.js.map +1 -0
- package/src/lib/format/validate.mjs +207 -0
- package/src/lib/format/validate.mjs.map +1 -0
- package/src/lib/record/check.d.mts +14 -0
- package/src/lib/record/check.d.ts +14 -0
- package/src/lib/record/check.js +167 -0
- package/src/lib/record/check.js.map +1 -0
- package/src/lib/record/check.mjs +163 -0
- package/src/lib/record/check.mjs.map +1 -0
- package/src/lib/record/data-source.d.mts +109 -0
- package/src/lib/record/data-source.d.ts +109 -0
- package/src/lib/record/data-source.js +3 -0
- package/src/lib/record/data-source.js.map +1 -0
- package/src/lib/record/data-source.mjs +2 -0
- package/src/lib/record/data-source.mjs.map +1 -0
- package/src/lib/record/form.d.mts +106 -0
- package/src/lib/record/form.d.ts +106 -0
- package/src/lib/record/form.js +545 -0
- package/src/lib/record/form.js.map +1 -0
- package/src/lib/record/form.mjs +542 -0
- package/src/lib/record/form.mjs.map +1 -0
- package/src/lib/record/memory-data-source.d.mts +28 -0
- package/src/lib/record/memory-data-source.d.ts +28 -0
- package/src/lib/record/memory-data-source.js +132 -0
- package/src/lib/record/memory-data-source.js.map +1 -0
- package/src/lib/record/memory-data-source.mjs +129 -0
- package/src/lib/record/memory-data-source.mjs.map +1 -0
- package/src/lib/record/messages.d.mts +35 -0
- package/src/lib/record/messages.d.ts +35 -0
- package/src/lib/record/messages.js +111 -0
- package/src/lib/record/messages.js.map +1 -0
- package/src/lib/record/messages.mjs +107 -0
- package/src/lib/record/messages.mjs.map +1 -0
- package/src/lib/record/scheduler.d.mts +12 -0
- package/src/lib/record/scheduler.d.ts +12 -0
- package/src/lib/record/scheduler.js +16 -0
- package/src/lib/record/scheduler.js.map +1 -0
- package/src/lib/record/scheduler.mjs +12 -0
- package/src/lib/record/scheduler.mjs.map +1 -0
- package/src/lib/record/values.d.mts +54 -0
- package/src/lib/record/values.d.ts +54 -0
- package/src/lib/record/values.js +78 -0
- package/src/lib/record/values.js.map +1 -0
- package/src/lib/record/values.mjs +71 -0
- package/src/lib/record/values.mjs.map +1 -0
|
@@ -0,0 +1,521 @@
|
|
|
1
|
+
import * as z from 'zod';
|
|
2
|
+
import { type JsonValue } from './json.mjs';
|
|
3
|
+
/**
|
|
4
|
+
* The layout: where each field goes and what surrounds it.
|
|
5
|
+
*
|
|
6
|
+
* Every element carries a stable `id`, unique within the page, so a designer
|
|
7
|
+
* can select it, undo can name it, and an app can override it. Anything that
|
|
8
|
+
* shows or hides by state takes a modifier: `true`, `false`, or an expression
|
|
9
|
+
* such as `state == 'draft' and amount > 100`.
|
|
10
|
+
*/
|
|
11
|
+
/** `true`, `false`, or an expression evaluated against the record's values. */
|
|
12
|
+
export type Modifier = boolean | string;
|
|
13
|
+
export type Tone = 'info' | 'success' | 'warning' | 'danger' | 'muted';
|
|
14
|
+
export interface FieldNode {
|
|
15
|
+
type: 'field';
|
|
16
|
+
id: string;
|
|
17
|
+
field: string;
|
|
18
|
+
label?: string;
|
|
19
|
+
/** How the value is shown, when not the type's default: radio, tags, email… */
|
|
20
|
+
widget?: string;
|
|
21
|
+
placeholder?: string;
|
|
22
|
+
help?: string;
|
|
23
|
+
/** Grid columns this field spans inside a section. */
|
|
24
|
+
colspan?: number;
|
|
25
|
+
/** For one2many and many2many: which line fields show as columns. */
|
|
26
|
+
columns?: string[];
|
|
27
|
+
invisible?: Modifier;
|
|
28
|
+
readonly?: Modifier;
|
|
29
|
+
required?: Modifier;
|
|
30
|
+
}
|
|
31
|
+
export interface ButtonNode {
|
|
32
|
+
type: 'button';
|
|
33
|
+
id: string;
|
|
34
|
+
label: string;
|
|
35
|
+
/** The action's name. The app decides what it does. */
|
|
36
|
+
action: string;
|
|
37
|
+
params?: {
|
|
38
|
+
[key: string]: JsonValue;
|
|
39
|
+
};
|
|
40
|
+
style?: 'primary' | 'secondary' | 'danger' | 'link';
|
|
41
|
+
/** Ask before running the action. */
|
|
42
|
+
confirm?: string;
|
|
43
|
+
icon?: string;
|
|
44
|
+
invisible?: Modifier;
|
|
45
|
+
}
|
|
46
|
+
export interface TextNode {
|
|
47
|
+
type: 'text';
|
|
48
|
+
id: string;
|
|
49
|
+
text: string;
|
|
50
|
+
style?: 'heading' | 'paragraph' | 'note';
|
|
51
|
+
invisible?: Modifier;
|
|
52
|
+
}
|
|
53
|
+
/** A named place the app fills with its own content, such as an activity feed. */
|
|
54
|
+
export interface SlotNode {
|
|
55
|
+
type: 'slot';
|
|
56
|
+
id: string;
|
|
57
|
+
name: string;
|
|
58
|
+
invisible?: Modifier;
|
|
59
|
+
}
|
|
60
|
+
export interface SectionNode {
|
|
61
|
+
type: 'section';
|
|
62
|
+
id: string;
|
|
63
|
+
title?: string;
|
|
64
|
+
description?: string;
|
|
65
|
+
columns?: 1 | 2 | 3 | 4;
|
|
66
|
+
collapsible?: boolean;
|
|
67
|
+
invisible?: Modifier;
|
|
68
|
+
children: LayoutNode[];
|
|
69
|
+
}
|
|
70
|
+
export interface TabNode {
|
|
71
|
+
type: 'tab';
|
|
72
|
+
id: string;
|
|
73
|
+
label: string;
|
|
74
|
+
icon?: string;
|
|
75
|
+
invisible?: Modifier;
|
|
76
|
+
children: LayoutNode[];
|
|
77
|
+
}
|
|
78
|
+
export interface TabsNode {
|
|
79
|
+
type: 'tabs';
|
|
80
|
+
id: string;
|
|
81
|
+
invisible?: Modifier;
|
|
82
|
+
children: TabNode[];
|
|
83
|
+
}
|
|
84
|
+
/** A step of a wizard. An invisible step is skipped, which is how surveys branch. */
|
|
85
|
+
export interface StepNode {
|
|
86
|
+
type: 'step';
|
|
87
|
+
id: string;
|
|
88
|
+
label: string;
|
|
89
|
+
description?: string;
|
|
90
|
+
invisible?: Modifier;
|
|
91
|
+
children: LayoutNode[];
|
|
92
|
+
}
|
|
93
|
+
export interface WizardNode {
|
|
94
|
+
type: 'wizard';
|
|
95
|
+
id: string;
|
|
96
|
+
children: StepNode[];
|
|
97
|
+
}
|
|
98
|
+
export interface SectionsNode {
|
|
99
|
+
type: 'sections';
|
|
100
|
+
id: string;
|
|
101
|
+
children: LayoutNode[];
|
|
102
|
+
}
|
|
103
|
+
export interface StatButton {
|
|
104
|
+
id: string;
|
|
105
|
+
label: string;
|
|
106
|
+
action: string;
|
|
107
|
+
/** A numeric field shown on the button, such as a count of invoices. */
|
|
108
|
+
field?: string;
|
|
109
|
+
icon?: string;
|
|
110
|
+
invisible?: Modifier;
|
|
111
|
+
}
|
|
112
|
+
export interface Ribbon {
|
|
113
|
+
id: string;
|
|
114
|
+
label: string;
|
|
115
|
+
tone?: Tone;
|
|
116
|
+
invisible?: Modifier;
|
|
117
|
+
}
|
|
118
|
+
export interface Alert {
|
|
119
|
+
id: string;
|
|
120
|
+
message: string;
|
|
121
|
+
tone?: Tone;
|
|
122
|
+
invisible?: Modifier;
|
|
123
|
+
}
|
|
124
|
+
export interface SheetTitle {
|
|
125
|
+
field: string;
|
|
126
|
+
subtitleField?: string;
|
|
127
|
+
avatarField?: string;
|
|
128
|
+
placeholder?: string;
|
|
129
|
+
}
|
|
130
|
+
export interface Statusbar {
|
|
131
|
+
field: string;
|
|
132
|
+
/** Show only these states, as Flectra-style status bars often do. */
|
|
133
|
+
visibleStates?: (string | number)[];
|
|
134
|
+
/** Clicking a state moves the record to it. */
|
|
135
|
+
clickable?: boolean;
|
|
136
|
+
}
|
|
137
|
+
/** The record layout: a header with a statusbar and buttons, then the sheet itself. */
|
|
138
|
+
export interface SheetNode {
|
|
139
|
+
type: 'sheet';
|
|
140
|
+
id: string;
|
|
141
|
+
title?: SheetTitle;
|
|
142
|
+
statusbar?: Statusbar;
|
|
143
|
+
buttons?: ButtonNode[];
|
|
144
|
+
statButtons?: StatButton[];
|
|
145
|
+
ribbon?: Ribbon;
|
|
146
|
+
alerts?: Alert[];
|
|
147
|
+
children: LayoutNode[];
|
|
148
|
+
sidePanel?: SlotNode;
|
|
149
|
+
}
|
|
150
|
+
/** Anything that can sit inside a section, tab, step or sheet. */
|
|
151
|
+
export type LayoutNode = FieldNode | ButtonNode | TextNode | SlotNode | SectionNode | TabsNode;
|
|
152
|
+
/** What a page's `layout` can be: the four page layouts. */
|
|
153
|
+
export type RootLayout = SheetNode | SectionsNode | TabsNode | WizardNode;
|
|
154
|
+
export declare const ModifierSchema: z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>;
|
|
155
|
+
export declare const FieldNodeSchema: z.ZodObject<{
|
|
156
|
+
type: z.ZodLiteral<"field">;
|
|
157
|
+
id: z.ZodString;
|
|
158
|
+
field: z.ZodString;
|
|
159
|
+
label: z.ZodOptional<z.ZodString>;
|
|
160
|
+
widget: z.ZodOptional<z.ZodString>;
|
|
161
|
+
placeholder: z.ZodOptional<z.ZodString>;
|
|
162
|
+
help: z.ZodOptional<z.ZodString>;
|
|
163
|
+
colspan: z.ZodOptional<z.ZodInt>;
|
|
164
|
+
columns: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
165
|
+
invisible: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
166
|
+
readonly: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
167
|
+
required: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
168
|
+
}, z.core.$strict>;
|
|
169
|
+
export declare const ButtonNodeSchema: z.ZodObject<{
|
|
170
|
+
type: z.ZodLiteral<"button">;
|
|
171
|
+
id: z.ZodString;
|
|
172
|
+
label: z.ZodString;
|
|
173
|
+
action: z.ZodString;
|
|
174
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
|
|
175
|
+
style: z.ZodOptional<z.ZodEnum<{
|
|
176
|
+
danger: "danger";
|
|
177
|
+
primary: "primary";
|
|
178
|
+
secondary: "secondary";
|
|
179
|
+
link: "link";
|
|
180
|
+
}>>;
|
|
181
|
+
confirm: z.ZodOptional<z.ZodString>;
|
|
182
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
183
|
+
invisible: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
184
|
+
}, z.core.$strict>;
|
|
185
|
+
export declare const TextNodeSchema: z.ZodObject<{
|
|
186
|
+
type: z.ZodLiteral<"text">;
|
|
187
|
+
id: z.ZodString;
|
|
188
|
+
text: z.ZodString;
|
|
189
|
+
style: z.ZodOptional<z.ZodEnum<{
|
|
190
|
+
heading: "heading";
|
|
191
|
+
paragraph: "paragraph";
|
|
192
|
+
note: "note";
|
|
193
|
+
}>>;
|
|
194
|
+
invisible: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
195
|
+
}, z.core.$strict>;
|
|
196
|
+
export declare const SlotNodeSchema: z.ZodObject<{
|
|
197
|
+
type: z.ZodLiteral<"slot">;
|
|
198
|
+
id: z.ZodString;
|
|
199
|
+
name: z.ZodString;
|
|
200
|
+
invisible: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
201
|
+
}, z.core.$strict>;
|
|
202
|
+
export declare const SectionNodeSchema: z.ZodObject<{
|
|
203
|
+
type: z.ZodLiteral<"section">;
|
|
204
|
+
id: z.ZodString;
|
|
205
|
+
title: z.ZodOptional<z.ZodString>;
|
|
206
|
+
description: z.ZodOptional<z.ZodString>;
|
|
207
|
+
columns: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>]>>;
|
|
208
|
+
collapsible: z.ZodOptional<z.ZodBoolean>;
|
|
209
|
+
invisible: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
210
|
+
children: z.ZodArray<typeof LayoutNodeSchema>;
|
|
211
|
+
}, z.core.$strict>;
|
|
212
|
+
export declare const TabNodeSchema: z.ZodObject<{
|
|
213
|
+
type: z.ZodLiteral<"tab">;
|
|
214
|
+
id: z.ZodString;
|
|
215
|
+
label: z.ZodString;
|
|
216
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
217
|
+
invisible: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
218
|
+
children: z.ZodArray<typeof LayoutNodeSchema>;
|
|
219
|
+
}, z.core.$strict>;
|
|
220
|
+
export declare const TabsNodeSchema: z.ZodObject<{
|
|
221
|
+
type: z.ZodLiteral<"tabs">;
|
|
222
|
+
id: z.ZodString;
|
|
223
|
+
invisible: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
224
|
+
children: z.ZodArray<z.ZodObject<{
|
|
225
|
+
type: z.ZodLiteral<"tab">;
|
|
226
|
+
id: z.ZodString;
|
|
227
|
+
label: z.ZodString;
|
|
228
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
229
|
+
invisible: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
230
|
+
children: z.ZodArray<typeof LayoutNodeSchema>;
|
|
231
|
+
}, z.core.$strict>>;
|
|
232
|
+
}, z.core.$strict>;
|
|
233
|
+
export declare const LayoutNodeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
234
|
+
type: z.ZodLiteral<"field">;
|
|
235
|
+
id: z.ZodString;
|
|
236
|
+
field: z.ZodString;
|
|
237
|
+
label: z.ZodOptional<z.ZodString>;
|
|
238
|
+
widget: z.ZodOptional<z.ZodString>;
|
|
239
|
+
placeholder: z.ZodOptional<z.ZodString>;
|
|
240
|
+
help: z.ZodOptional<z.ZodString>;
|
|
241
|
+
colspan: z.ZodOptional<z.ZodInt>;
|
|
242
|
+
columns: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
243
|
+
invisible: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
244
|
+
readonly: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
245
|
+
required: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
246
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
247
|
+
type: z.ZodLiteral<"button">;
|
|
248
|
+
id: z.ZodString;
|
|
249
|
+
label: z.ZodString;
|
|
250
|
+
action: z.ZodString;
|
|
251
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
|
|
252
|
+
style: z.ZodOptional<z.ZodEnum<{
|
|
253
|
+
danger: "danger";
|
|
254
|
+
primary: "primary";
|
|
255
|
+
secondary: "secondary";
|
|
256
|
+
link: "link";
|
|
257
|
+
}>>;
|
|
258
|
+
confirm: z.ZodOptional<z.ZodString>;
|
|
259
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
260
|
+
invisible: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
261
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
262
|
+
type: z.ZodLiteral<"text">;
|
|
263
|
+
id: z.ZodString;
|
|
264
|
+
text: z.ZodString;
|
|
265
|
+
style: z.ZodOptional<z.ZodEnum<{
|
|
266
|
+
heading: "heading";
|
|
267
|
+
paragraph: "paragraph";
|
|
268
|
+
note: "note";
|
|
269
|
+
}>>;
|
|
270
|
+
invisible: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
271
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
272
|
+
type: z.ZodLiteral<"slot">;
|
|
273
|
+
id: z.ZodString;
|
|
274
|
+
name: z.ZodString;
|
|
275
|
+
invisible: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
276
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
277
|
+
type: z.ZodLiteral<"section">;
|
|
278
|
+
id: z.ZodString;
|
|
279
|
+
title: z.ZodOptional<z.ZodString>;
|
|
280
|
+
description: z.ZodOptional<z.ZodString>;
|
|
281
|
+
columns: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>]>>;
|
|
282
|
+
collapsible: z.ZodOptional<z.ZodBoolean>;
|
|
283
|
+
invisible: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
284
|
+
children: z.ZodArray<typeof LayoutNodeSchema>;
|
|
285
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
286
|
+
type: z.ZodLiteral<"tabs">;
|
|
287
|
+
id: z.ZodString;
|
|
288
|
+
invisible: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
289
|
+
children: z.ZodArray<z.ZodObject<{
|
|
290
|
+
type: z.ZodLiteral<"tab">;
|
|
291
|
+
id: z.ZodString;
|
|
292
|
+
label: z.ZodString;
|
|
293
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
294
|
+
invisible: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
295
|
+
children: z.ZodArray<typeof LayoutNodeSchema>;
|
|
296
|
+
}, z.core.$strict>>;
|
|
297
|
+
}, z.core.$strict>], "type">;
|
|
298
|
+
export declare const StepNodeSchema: z.ZodObject<{
|
|
299
|
+
type: z.ZodLiteral<"step">;
|
|
300
|
+
id: z.ZodString;
|
|
301
|
+
label: z.ZodString;
|
|
302
|
+
description: z.ZodOptional<z.ZodString>;
|
|
303
|
+
invisible: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
304
|
+
children: z.ZodArray<typeof LayoutNodeSchema>;
|
|
305
|
+
}, z.core.$strict>;
|
|
306
|
+
export declare const WizardNodeSchema: z.ZodObject<{
|
|
307
|
+
type: z.ZodLiteral<"wizard">;
|
|
308
|
+
id: z.ZodString;
|
|
309
|
+
children: z.ZodArray<z.ZodObject<{
|
|
310
|
+
type: z.ZodLiteral<"step">;
|
|
311
|
+
id: z.ZodString;
|
|
312
|
+
label: z.ZodString;
|
|
313
|
+
description: z.ZodOptional<z.ZodString>;
|
|
314
|
+
invisible: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
315
|
+
children: z.ZodArray<typeof LayoutNodeSchema>;
|
|
316
|
+
}, z.core.$strict>>;
|
|
317
|
+
}, z.core.$strict>;
|
|
318
|
+
export declare const SectionsNodeSchema: z.ZodObject<{
|
|
319
|
+
type: z.ZodLiteral<"sections">;
|
|
320
|
+
id: z.ZodString;
|
|
321
|
+
children: z.ZodArray<typeof LayoutNodeSchema>;
|
|
322
|
+
}, z.core.$strict>;
|
|
323
|
+
export declare const StatButtonSchema: z.ZodObject<{
|
|
324
|
+
id: z.ZodString;
|
|
325
|
+
label: z.ZodString;
|
|
326
|
+
action: z.ZodString;
|
|
327
|
+
field: z.ZodOptional<z.ZodString>;
|
|
328
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
329
|
+
invisible: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
330
|
+
}, z.core.$strict>;
|
|
331
|
+
export declare const RibbonSchema: z.ZodObject<{
|
|
332
|
+
id: z.ZodString;
|
|
333
|
+
label: z.ZodString;
|
|
334
|
+
tone: z.ZodOptional<z.ZodEnum<{
|
|
335
|
+
success: "success";
|
|
336
|
+
info: "info";
|
|
337
|
+
warning: "warning";
|
|
338
|
+
danger: "danger";
|
|
339
|
+
muted: "muted";
|
|
340
|
+
}>>;
|
|
341
|
+
invisible: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
342
|
+
}, z.core.$strict>;
|
|
343
|
+
export declare const AlertSchema: z.ZodObject<{
|
|
344
|
+
id: z.ZodString;
|
|
345
|
+
message: z.ZodString;
|
|
346
|
+
tone: z.ZodOptional<z.ZodEnum<{
|
|
347
|
+
success: "success";
|
|
348
|
+
info: "info";
|
|
349
|
+
warning: "warning";
|
|
350
|
+
danger: "danger";
|
|
351
|
+
muted: "muted";
|
|
352
|
+
}>>;
|
|
353
|
+
invisible: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
354
|
+
}, z.core.$strict>;
|
|
355
|
+
export declare const SheetNodeSchema: z.ZodObject<{
|
|
356
|
+
type: z.ZodLiteral<"sheet">;
|
|
357
|
+
id: z.ZodString;
|
|
358
|
+
title: z.ZodOptional<z.ZodObject<{
|
|
359
|
+
field: z.ZodString;
|
|
360
|
+
subtitleField: z.ZodOptional<z.ZodString>;
|
|
361
|
+
avatarField: z.ZodOptional<z.ZodString>;
|
|
362
|
+
placeholder: z.ZodOptional<z.ZodString>;
|
|
363
|
+
}, z.core.$strict>>;
|
|
364
|
+
statusbar: z.ZodOptional<z.ZodObject<{
|
|
365
|
+
field: z.ZodString;
|
|
366
|
+
visibleStates: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
367
|
+
clickable: z.ZodOptional<z.ZodBoolean>;
|
|
368
|
+
}, z.core.$strict>>;
|
|
369
|
+
buttons: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
370
|
+
type: z.ZodLiteral<"button">;
|
|
371
|
+
id: z.ZodString;
|
|
372
|
+
label: z.ZodString;
|
|
373
|
+
action: z.ZodString;
|
|
374
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
|
|
375
|
+
style: z.ZodOptional<z.ZodEnum<{
|
|
376
|
+
danger: "danger";
|
|
377
|
+
primary: "primary";
|
|
378
|
+
secondary: "secondary";
|
|
379
|
+
link: "link";
|
|
380
|
+
}>>;
|
|
381
|
+
confirm: z.ZodOptional<z.ZodString>;
|
|
382
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
383
|
+
invisible: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
384
|
+
}, z.core.$strict>>>;
|
|
385
|
+
statButtons: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
386
|
+
id: z.ZodString;
|
|
387
|
+
label: z.ZodString;
|
|
388
|
+
action: z.ZodString;
|
|
389
|
+
field: z.ZodOptional<z.ZodString>;
|
|
390
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
391
|
+
invisible: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
392
|
+
}, z.core.$strict>>>;
|
|
393
|
+
ribbon: z.ZodOptional<z.ZodObject<{
|
|
394
|
+
id: z.ZodString;
|
|
395
|
+
label: z.ZodString;
|
|
396
|
+
tone: z.ZodOptional<z.ZodEnum<{
|
|
397
|
+
success: "success";
|
|
398
|
+
info: "info";
|
|
399
|
+
warning: "warning";
|
|
400
|
+
danger: "danger";
|
|
401
|
+
muted: "muted";
|
|
402
|
+
}>>;
|
|
403
|
+
invisible: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
404
|
+
}, z.core.$strict>>;
|
|
405
|
+
alerts: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
406
|
+
id: z.ZodString;
|
|
407
|
+
message: z.ZodString;
|
|
408
|
+
tone: z.ZodOptional<z.ZodEnum<{
|
|
409
|
+
success: "success";
|
|
410
|
+
info: "info";
|
|
411
|
+
warning: "warning";
|
|
412
|
+
danger: "danger";
|
|
413
|
+
muted: "muted";
|
|
414
|
+
}>>;
|
|
415
|
+
invisible: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
416
|
+
}, z.core.$strict>>>;
|
|
417
|
+
children: z.ZodArray<typeof LayoutNodeSchema>;
|
|
418
|
+
sidePanel: z.ZodOptional<z.ZodObject<{
|
|
419
|
+
type: z.ZodLiteral<"slot">;
|
|
420
|
+
id: z.ZodString;
|
|
421
|
+
name: z.ZodString;
|
|
422
|
+
invisible: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
423
|
+
}, z.core.$strict>>;
|
|
424
|
+
}, z.core.$strict>;
|
|
425
|
+
export declare const RootLayoutSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
426
|
+
type: z.ZodLiteral<"sheet">;
|
|
427
|
+
id: z.ZodString;
|
|
428
|
+
title: z.ZodOptional<z.ZodObject<{
|
|
429
|
+
field: z.ZodString;
|
|
430
|
+
subtitleField: z.ZodOptional<z.ZodString>;
|
|
431
|
+
avatarField: z.ZodOptional<z.ZodString>;
|
|
432
|
+
placeholder: z.ZodOptional<z.ZodString>;
|
|
433
|
+
}, z.core.$strict>>;
|
|
434
|
+
statusbar: z.ZodOptional<z.ZodObject<{
|
|
435
|
+
field: z.ZodString;
|
|
436
|
+
visibleStates: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
437
|
+
clickable: z.ZodOptional<z.ZodBoolean>;
|
|
438
|
+
}, z.core.$strict>>;
|
|
439
|
+
buttons: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
440
|
+
type: z.ZodLiteral<"button">;
|
|
441
|
+
id: z.ZodString;
|
|
442
|
+
label: z.ZodString;
|
|
443
|
+
action: z.ZodString;
|
|
444
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
|
|
445
|
+
style: z.ZodOptional<z.ZodEnum<{
|
|
446
|
+
danger: "danger";
|
|
447
|
+
primary: "primary";
|
|
448
|
+
secondary: "secondary";
|
|
449
|
+
link: "link";
|
|
450
|
+
}>>;
|
|
451
|
+
confirm: z.ZodOptional<z.ZodString>;
|
|
452
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
453
|
+
invisible: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
454
|
+
}, z.core.$strict>>>;
|
|
455
|
+
statButtons: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
456
|
+
id: z.ZodString;
|
|
457
|
+
label: z.ZodString;
|
|
458
|
+
action: z.ZodString;
|
|
459
|
+
field: z.ZodOptional<z.ZodString>;
|
|
460
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
461
|
+
invisible: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
462
|
+
}, z.core.$strict>>>;
|
|
463
|
+
ribbon: z.ZodOptional<z.ZodObject<{
|
|
464
|
+
id: z.ZodString;
|
|
465
|
+
label: z.ZodString;
|
|
466
|
+
tone: z.ZodOptional<z.ZodEnum<{
|
|
467
|
+
success: "success";
|
|
468
|
+
info: "info";
|
|
469
|
+
warning: "warning";
|
|
470
|
+
danger: "danger";
|
|
471
|
+
muted: "muted";
|
|
472
|
+
}>>;
|
|
473
|
+
invisible: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
474
|
+
}, z.core.$strict>>;
|
|
475
|
+
alerts: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
476
|
+
id: z.ZodString;
|
|
477
|
+
message: z.ZodString;
|
|
478
|
+
tone: z.ZodOptional<z.ZodEnum<{
|
|
479
|
+
success: "success";
|
|
480
|
+
info: "info";
|
|
481
|
+
warning: "warning";
|
|
482
|
+
danger: "danger";
|
|
483
|
+
muted: "muted";
|
|
484
|
+
}>>;
|
|
485
|
+
invisible: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
486
|
+
}, z.core.$strict>>>;
|
|
487
|
+
children: z.ZodArray<typeof LayoutNodeSchema>;
|
|
488
|
+
sidePanel: z.ZodOptional<z.ZodObject<{
|
|
489
|
+
type: z.ZodLiteral<"slot">;
|
|
490
|
+
id: z.ZodString;
|
|
491
|
+
name: z.ZodString;
|
|
492
|
+
invisible: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
493
|
+
}, z.core.$strict>>;
|
|
494
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
495
|
+
type: z.ZodLiteral<"sections">;
|
|
496
|
+
id: z.ZodString;
|
|
497
|
+
children: z.ZodArray<typeof LayoutNodeSchema>;
|
|
498
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
499
|
+
type: z.ZodLiteral<"tabs">;
|
|
500
|
+
id: z.ZodString;
|
|
501
|
+
invisible: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
502
|
+
children: z.ZodArray<z.ZodObject<{
|
|
503
|
+
type: z.ZodLiteral<"tab">;
|
|
504
|
+
id: z.ZodString;
|
|
505
|
+
label: z.ZodString;
|
|
506
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
507
|
+
invisible: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
508
|
+
children: z.ZodArray<typeof LayoutNodeSchema>;
|
|
509
|
+
}, z.core.$strict>>;
|
|
510
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
511
|
+
type: z.ZodLiteral<"wizard">;
|
|
512
|
+
id: z.ZodString;
|
|
513
|
+
children: z.ZodArray<z.ZodObject<{
|
|
514
|
+
type: z.ZodLiteral<"step">;
|
|
515
|
+
id: z.ZodString;
|
|
516
|
+
label: z.ZodString;
|
|
517
|
+
description: z.ZodOptional<z.ZodString>;
|
|
518
|
+
invisible: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
519
|
+
children: z.ZodArray<typeof LayoutNodeSchema>;
|
|
520
|
+
}, z.core.$strict>>;
|
|
521
|
+
}, z.core.$strict>], "type">;
|