@fieldia/core 0.10.0 → 0.11.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.
Files changed (67) hide show
  1. package/README.md +199 -0
  2. package/package.json +1 -1
  3. package/schema/page.schema.json +829 -125
  4. package/src/index.d.mts +1 -0
  5. package/src/index.d.ts +1 -0
  6. package/src/index.js +4 -1
  7. package/src/index.js.map +1 -1
  8. package/src/index.mjs +1 -0
  9. package/src/index.mjs.map +1 -1
  10. package/src/lib/format/actions.d.mts +692 -0
  11. package/src/lib/format/actions.d.ts +692 -0
  12. package/src/lib/format/actions.js +53 -0
  13. package/src/lib/format/actions.js.map +1 -0
  14. package/src/lib/format/actions.mjs +50 -0
  15. package/src/lib/format/actions.mjs.map +1 -0
  16. package/src/lib/format/field.js +4 -2
  17. package/src/lib/format/field.js.map +1 -1
  18. package/src/lib/format/field.mjs +4 -2
  19. package/src/lib/format/field.mjs.map +1 -1
  20. package/src/lib/format/layout.d.mts +745 -15
  21. package/src/lib/format/layout.d.ts +745 -15
  22. package/src/lib/format/layout.js +18 -3
  23. package/src/lib/format/layout.js.map +1 -1
  24. package/src/lib/format/layout.mjs +17 -2
  25. package/src/lib/format/layout.mjs.map +1 -1
  26. package/src/lib/format/layout.types.d.mts +2 -1
  27. package/src/lib/format/layout.types.d.ts +2 -1
  28. package/src/lib/format/page.d.mts +616 -3
  29. package/src/lib/format/page.d.ts +616 -3
  30. package/src/lib/format/page.js +17 -2
  31. package/src/lib/format/page.js.map +1 -1
  32. package/src/lib/format/page.mjs +17 -2
  33. package/src/lib/format/page.mjs.map +1 -1
  34. package/src/lib/format/part-look.d.mts +36 -0
  35. package/src/lib/format/part-look.d.ts +36 -0
  36. package/src/lib/format/part-look.js +23 -0
  37. package/src/lib/format/part-look.js.map +1 -0
  38. package/src/lib/format/part-look.mjs +20 -0
  39. package/src/lib/format/part-look.mjs.map +1 -0
  40. package/src/lib/format/references.d.mts +19 -0
  41. package/src/lib/format/references.d.ts +19 -0
  42. package/src/lib/format/references.js +131 -2
  43. package/src/lib/format/references.js.map +1 -1
  44. package/src/lib/format/references.mjs +131 -2
  45. package/src/lib/format/references.mjs.map +1 -1
  46. package/src/lib/record/data-source.d.mts +5 -1
  47. package/src/lib/record/data-source.d.ts +5 -1
  48. package/src/lib/record/data-source.js.map +1 -1
  49. package/src/lib/record/data-source.mjs.map +1 -1
  50. package/src/lib/record/form.d.mts +86 -18
  51. package/src/lib/record/form.d.ts +86 -18
  52. package/src/lib/record/form.js +343 -46
  53. package/src/lib/record/form.js.map +1 -1
  54. package/src/lib/record/form.mjs +343 -46
  55. package/src/lib/record/form.mjs.map +1 -1
  56. package/src/lib/record/run.d.mts +169 -0
  57. package/src/lib/record/run.d.ts +169 -0
  58. package/src/lib/record/run.js +350 -0
  59. package/src/lib/record/run.js.map +1 -0
  60. package/src/lib/record/run.mjs +345 -0
  61. package/src/lib/record/run.mjs.map +1 -0
  62. package/src/runtime.d.mts +5 -2
  63. package/src/runtime.d.ts +5 -2
  64. package/src/runtime.js +3 -1
  65. package/src/runtime.js.map +1 -1
  66. package/src/runtime.mjs +1 -0
  67. package/src/runtime.mjs.map +1 -1
@@ -0,0 +1,692 @@
1
+ import * as z from 'zod';
2
+ import { type JsonValue } from './json';
3
+ import type { Modifier, Tone } from './layout';
4
+ /**
5
+ * What a press, a change or a moment of the form does: steps, run in order,
6
+ * each plain data — never code. Anything only the app can do is a `call` of
7
+ * one of its own actions, by name. A step may run only `when` a condition
8
+ * holds. A step that fails or is refused stops the ones after it: a check
9
+ * that finds problems, a question answered No, a save that cannot be made,
10
+ * an app action that says stop, a page opened and closed without saving.
11
+ *
12
+ * Expressions are the format's own (`price * quantity`, `'Cairo'`,
13
+ * `today()`), read against the form's values where the step runs.
14
+ */
15
+ /** Values for fields, by name: each an expression. */
16
+ export type ValueMap = {
17
+ [field: string]: string;
18
+ };
19
+ interface StepBase {
20
+ /** Run this step only while this holds; skipped, the steps after it still run. */
21
+ when?: Modifier;
22
+ }
23
+ /**
24
+ * The edge a panel comes from: the end of the line (the default: the right,
25
+ * or the left in a page written right to left) or its start, as the page
26
+ * reads; or the left, right, top or bottom of the screen, whatever the page's
27
+ * direction. A panel at the top or bottom runs the whole width.
28
+ */
29
+ export type PanelSide = 'end' | 'start' | 'right' | 'left' | 'top' | 'bottom';
30
+ /**
31
+ * Open another page: in a dialog over this form (the default), in a panel
32
+ * beside it, or in its place. A panel comes from the `side` named, the end of
33
+ * the line unless told. It starts on a record (`record`, an expression
34
+ * giving its id) or a new one with `values`. Once it is saved or sent, `into`
35
+ * sets this form's fields from its answers — each an expression over the
36
+ * opened form's values, where `id` is the record it saved — and `then` runs
37
+ * here. Closed without saving, the steps after it do not run.
38
+ */
39
+ export interface OpenStep extends StepBase {
40
+ do: 'open';
41
+ /** The page's id, as the app's `pages` finds it. */
42
+ page: string;
43
+ /** One published version; left out, the latest. */
44
+ version?: number;
45
+ as?: 'dialog' | 'panel' | 'page';
46
+ /** Where a panel comes from (`as: 'panel'` alone): the end of the line unless told. */
47
+ side?: PanelSide;
48
+ /** The words over it; left out, the page's own title. */
49
+ title?: string;
50
+ record?: string;
51
+ /** What the opened form starts with: its fields, each an expression over this form's values. */
52
+ values?: ValueMap;
53
+ /** This form's fields, each an expression over the opened form's values once it is saved or sent. */
54
+ into?: ValueMap;
55
+ then?: ActionStep[];
56
+ }
57
+ /** Give a field of this form a value: an expression over its values. */
58
+ export interface SetStep extends StepBase {
59
+ do: 'set';
60
+ field: string;
61
+ value: string;
62
+ }
63
+ /** Empty a field of this form. */
64
+ export interface ClearStep extends StepBase {
65
+ do: 'clear';
66
+ field: string;
67
+ }
68
+ /** Add a line to a table of lines (a one2many), its fields from expressions over this form's values. */
69
+ export interface AddLineStep extends StepBase {
70
+ do: 'addLine';
71
+ field: string;
72
+ values?: ValueMap;
73
+ }
74
+ /** Check the form — or only these fields — as sending does: problems are shown, and stop the steps after it. */
75
+ export interface CheckStep extends StepBase {
76
+ do: 'check';
77
+ fields?: string[];
78
+ }
79
+ /** Save the record, or send the answers: a page of responses sends. Refused, it stops the steps after it. */
80
+ export interface SaveStep extends StepBase {
81
+ do: 'save';
82
+ }
83
+ /** Put the form back as it was loaded, or empty for a new one. */
84
+ export interface ResetStep extends StepBase {
85
+ do: 'reset';
86
+ }
87
+ /** Show a wizard's step or a tab, by its id. */
88
+ export interface GoToStep extends StepBase {
89
+ do: 'goTo';
90
+ target: string;
91
+ }
92
+ /** Say something to the person, in a tone. */
93
+ export interface SayStep extends StepBase {
94
+ do: 'say';
95
+ message: string;
96
+ tone?: Tone;
97
+ }
98
+ /** Ask a question answered Yes or No: No stops the steps after it. */
99
+ export interface AskStep extends StepBase {
100
+ do: 'ask';
101
+ message: string;
102
+ }
103
+ /**
104
+ * One of the app's own actions, by the name its `onAction` receives, with
105
+ * `params`. The app may answer: values to set, something to say, a page to
106
+ * open, or to stop the steps after it.
107
+ */
108
+ export interface CallStep extends StepBase {
109
+ do: 'call';
110
+ action: string;
111
+ params?: {
112
+ [key: string]: JsonValue;
113
+ };
114
+ }
115
+ /** Close the dialog or panel this form was opened in, without saving it. */
116
+ export interface CloseStep extends StepBase {
117
+ do: 'close';
118
+ }
119
+ export type ActionStep = OpenStep | SetStep | ClearStep | AddLineStep | CheckStep | SaveStep | ResetStep | GoToStep | SayStep | AskStep | CallStep | CloseStep;
120
+ /**
121
+ * The moments of a form that run steps. A change is a person's: values set by
122
+ * a step, a rule or the app do not run `change` again, so steps never chase
123
+ * each other round.
124
+ */
125
+ export interface PageEvents {
126
+ /** When the form has its values: loaded, or new. */
127
+ open?: ActionStep[];
128
+ /** When a person changes a field, by its name. */
129
+ change?: {
130
+ [field: string]: ActionStep[];
131
+ };
132
+ /** Before it is saved or sent: a step that stops keeps it unsaved. */
133
+ beforeSave?: ActionStep[];
134
+ /** After it is saved or sent. */
135
+ afterSave?: ActionStep[];
136
+ /** When a wizard's step or a tab is shown, by its id. */
137
+ show?: {
138
+ [id: string]: ActionStep[];
139
+ };
140
+ }
141
+ export declare const OpenStepSchema: z.ZodObject<{
142
+ do: z.ZodLiteral<"open">;
143
+ when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
144
+ page: z.ZodString;
145
+ version: z.ZodOptional<z.ZodInt>;
146
+ as: z.ZodOptional<z.ZodEnum<{
147
+ page: "page";
148
+ dialog: "dialog";
149
+ panel: "panel";
150
+ }>>;
151
+ side: z.ZodOptional<z.ZodEnum<{
152
+ end: "end";
153
+ start: "start";
154
+ right: "right";
155
+ left: "left";
156
+ top: "top";
157
+ bottom: "bottom";
158
+ }>>;
159
+ title: z.ZodOptional<z.ZodString>;
160
+ record: z.ZodOptional<z.ZodString>;
161
+ values: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
162
+ into: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
163
+ then: z.ZodOptional<z.ZodArray<typeof ActionStepSchema>>;
164
+ }, z.z.core.$strict>;
165
+ export declare const ActionStepSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
166
+ do: z.ZodLiteral<"open">;
167
+ when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
168
+ page: z.ZodString;
169
+ version: z.ZodOptional<z.ZodInt>;
170
+ as: z.ZodOptional<z.ZodEnum<{
171
+ page: "page";
172
+ dialog: "dialog";
173
+ panel: "panel";
174
+ }>>;
175
+ side: z.ZodOptional<z.ZodEnum<{
176
+ end: "end";
177
+ start: "start";
178
+ right: "right";
179
+ left: "left";
180
+ top: "top";
181
+ bottom: "bottom";
182
+ }>>;
183
+ title: z.ZodOptional<z.ZodString>;
184
+ record: z.ZodOptional<z.ZodString>;
185
+ values: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
186
+ into: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
187
+ then: z.ZodOptional<z.ZodArray<typeof ActionStepSchema>>;
188
+ }, z.z.core.$strict>, z.ZodObject<{
189
+ do: z.ZodLiteral<"set">;
190
+ when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
191
+ field: z.ZodString;
192
+ value: z.ZodString;
193
+ }, z.z.core.$strict>, z.ZodObject<{
194
+ do: z.ZodLiteral<"clear">;
195
+ when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
196
+ field: z.ZodString;
197
+ }, z.z.core.$strict>, z.ZodObject<{
198
+ do: z.ZodLiteral<"addLine">;
199
+ when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
200
+ field: z.ZodString;
201
+ values: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
202
+ }, z.z.core.$strict>, z.ZodObject<{
203
+ do: z.ZodLiteral<"check">;
204
+ when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
205
+ fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
206
+ }, z.z.core.$strict>, z.ZodObject<{
207
+ do: z.ZodLiteral<"save">;
208
+ when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
209
+ }, z.z.core.$strict>, z.ZodObject<{
210
+ do: z.ZodLiteral<"reset">;
211
+ when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
212
+ }, z.z.core.$strict>, z.ZodObject<{
213
+ do: z.ZodLiteral<"goTo">;
214
+ when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
215
+ target: z.ZodString;
216
+ }, z.z.core.$strict>, z.ZodObject<{
217
+ do: z.ZodLiteral<"say">;
218
+ when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
219
+ message: z.ZodString;
220
+ tone: z.ZodOptional<z.ZodEnum<{
221
+ success: "success";
222
+ info: "info";
223
+ warning: "warning";
224
+ danger: "danger";
225
+ muted: "muted";
226
+ }>>;
227
+ }, z.z.core.$strict>, z.ZodObject<{
228
+ do: z.ZodLiteral<"ask">;
229
+ when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
230
+ message: z.ZodString;
231
+ }, z.z.core.$strict>, z.ZodObject<{
232
+ do: z.ZodLiteral<"call">;
233
+ when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
234
+ action: z.ZodString;
235
+ params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
236
+ }, z.z.core.$strict>, z.ZodObject<{
237
+ do: z.ZodLiteral<"close">;
238
+ when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
239
+ }, z.z.core.$strict>], "do">;
240
+ export declare const ActionStepsSchema: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
241
+ do: z.ZodLiteral<"open">;
242
+ when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
243
+ page: z.ZodString;
244
+ version: z.ZodOptional<z.ZodInt>;
245
+ as: z.ZodOptional<z.ZodEnum<{
246
+ page: "page";
247
+ dialog: "dialog";
248
+ panel: "panel";
249
+ }>>;
250
+ side: z.ZodOptional<z.ZodEnum<{
251
+ end: "end";
252
+ start: "start";
253
+ right: "right";
254
+ left: "left";
255
+ top: "top";
256
+ bottom: "bottom";
257
+ }>>;
258
+ title: z.ZodOptional<z.ZodString>;
259
+ record: z.ZodOptional<z.ZodString>;
260
+ values: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
261
+ into: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
262
+ then: z.ZodOptional<z.ZodArray<typeof ActionStepSchema>>;
263
+ }, z.z.core.$strict>, z.ZodObject<{
264
+ do: z.ZodLiteral<"set">;
265
+ when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
266
+ field: z.ZodString;
267
+ value: z.ZodString;
268
+ }, z.z.core.$strict>, z.ZodObject<{
269
+ do: z.ZodLiteral<"clear">;
270
+ when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
271
+ field: z.ZodString;
272
+ }, z.z.core.$strict>, z.ZodObject<{
273
+ do: z.ZodLiteral<"addLine">;
274
+ when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
275
+ field: z.ZodString;
276
+ values: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
277
+ }, z.z.core.$strict>, z.ZodObject<{
278
+ do: z.ZodLiteral<"check">;
279
+ when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
280
+ fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
281
+ }, z.z.core.$strict>, z.ZodObject<{
282
+ do: z.ZodLiteral<"save">;
283
+ when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
284
+ }, z.z.core.$strict>, z.ZodObject<{
285
+ do: z.ZodLiteral<"reset">;
286
+ when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
287
+ }, z.z.core.$strict>, z.ZodObject<{
288
+ do: z.ZodLiteral<"goTo">;
289
+ when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
290
+ target: z.ZodString;
291
+ }, z.z.core.$strict>, z.ZodObject<{
292
+ do: z.ZodLiteral<"say">;
293
+ when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
294
+ message: z.ZodString;
295
+ tone: z.ZodOptional<z.ZodEnum<{
296
+ success: "success";
297
+ info: "info";
298
+ warning: "warning";
299
+ danger: "danger";
300
+ muted: "muted";
301
+ }>>;
302
+ }, z.z.core.$strict>, z.ZodObject<{
303
+ do: z.ZodLiteral<"ask">;
304
+ when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
305
+ message: z.ZodString;
306
+ }, z.z.core.$strict>, z.ZodObject<{
307
+ do: z.ZodLiteral<"call">;
308
+ when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
309
+ action: z.ZodString;
310
+ params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
311
+ }, z.z.core.$strict>, z.ZodObject<{
312
+ do: z.ZodLiteral<"close">;
313
+ when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
314
+ }, z.z.core.$strict>], "do">>;
315
+ export declare const PageEventsSchema: z.ZodObject<{
316
+ open: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
317
+ do: z.ZodLiteral<"open">;
318
+ when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
319
+ page: z.ZodString;
320
+ version: z.ZodOptional<z.ZodInt>;
321
+ as: z.ZodOptional<z.ZodEnum<{
322
+ page: "page";
323
+ dialog: "dialog";
324
+ panel: "panel";
325
+ }>>;
326
+ side: z.ZodOptional<z.ZodEnum<{
327
+ end: "end";
328
+ start: "start";
329
+ right: "right";
330
+ left: "left";
331
+ top: "top";
332
+ bottom: "bottom";
333
+ }>>;
334
+ title: z.ZodOptional<z.ZodString>;
335
+ record: z.ZodOptional<z.ZodString>;
336
+ values: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
337
+ into: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
338
+ then: z.ZodOptional<z.ZodArray<typeof ActionStepSchema>>;
339
+ }, z.z.core.$strict>, z.ZodObject<{
340
+ do: z.ZodLiteral<"set">;
341
+ when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
342
+ field: z.ZodString;
343
+ value: z.ZodString;
344
+ }, z.z.core.$strict>, z.ZodObject<{
345
+ do: z.ZodLiteral<"clear">;
346
+ when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
347
+ field: z.ZodString;
348
+ }, z.z.core.$strict>, z.ZodObject<{
349
+ do: z.ZodLiteral<"addLine">;
350
+ when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
351
+ field: z.ZodString;
352
+ values: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
353
+ }, z.z.core.$strict>, z.ZodObject<{
354
+ do: z.ZodLiteral<"check">;
355
+ when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
356
+ fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
357
+ }, z.z.core.$strict>, z.ZodObject<{
358
+ do: z.ZodLiteral<"save">;
359
+ when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
360
+ }, z.z.core.$strict>, z.ZodObject<{
361
+ do: z.ZodLiteral<"reset">;
362
+ when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
363
+ }, z.z.core.$strict>, z.ZodObject<{
364
+ do: z.ZodLiteral<"goTo">;
365
+ when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
366
+ target: z.ZodString;
367
+ }, z.z.core.$strict>, z.ZodObject<{
368
+ do: z.ZodLiteral<"say">;
369
+ when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
370
+ message: z.ZodString;
371
+ tone: z.ZodOptional<z.ZodEnum<{
372
+ success: "success";
373
+ info: "info";
374
+ warning: "warning";
375
+ danger: "danger";
376
+ muted: "muted";
377
+ }>>;
378
+ }, z.z.core.$strict>, z.ZodObject<{
379
+ do: z.ZodLiteral<"ask">;
380
+ when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
381
+ message: z.ZodString;
382
+ }, z.z.core.$strict>, z.ZodObject<{
383
+ do: z.ZodLiteral<"call">;
384
+ when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
385
+ action: z.ZodString;
386
+ params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
387
+ }, z.z.core.$strict>, z.ZodObject<{
388
+ do: z.ZodLiteral<"close">;
389
+ when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
390
+ }, z.z.core.$strict>], "do">>>;
391
+ change: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
392
+ do: z.ZodLiteral<"open">;
393
+ when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
394
+ page: z.ZodString;
395
+ version: z.ZodOptional<z.ZodInt>;
396
+ as: z.ZodOptional<z.ZodEnum<{
397
+ page: "page";
398
+ dialog: "dialog";
399
+ panel: "panel";
400
+ }>>;
401
+ side: z.ZodOptional<z.ZodEnum<{
402
+ end: "end";
403
+ start: "start";
404
+ right: "right";
405
+ left: "left";
406
+ top: "top";
407
+ bottom: "bottom";
408
+ }>>;
409
+ title: z.ZodOptional<z.ZodString>;
410
+ record: z.ZodOptional<z.ZodString>;
411
+ values: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
412
+ into: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
413
+ then: z.ZodOptional<z.ZodArray<typeof ActionStepSchema>>;
414
+ }, z.z.core.$strict>, z.ZodObject<{
415
+ do: z.ZodLiteral<"set">;
416
+ when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
417
+ field: z.ZodString;
418
+ value: z.ZodString;
419
+ }, z.z.core.$strict>, z.ZodObject<{
420
+ do: z.ZodLiteral<"clear">;
421
+ when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
422
+ field: z.ZodString;
423
+ }, z.z.core.$strict>, z.ZodObject<{
424
+ do: z.ZodLiteral<"addLine">;
425
+ when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
426
+ field: z.ZodString;
427
+ values: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
428
+ }, z.z.core.$strict>, z.ZodObject<{
429
+ do: z.ZodLiteral<"check">;
430
+ when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
431
+ fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
432
+ }, z.z.core.$strict>, z.ZodObject<{
433
+ do: z.ZodLiteral<"save">;
434
+ when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
435
+ }, z.z.core.$strict>, z.ZodObject<{
436
+ do: z.ZodLiteral<"reset">;
437
+ when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
438
+ }, z.z.core.$strict>, z.ZodObject<{
439
+ do: z.ZodLiteral<"goTo">;
440
+ when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
441
+ target: z.ZodString;
442
+ }, z.z.core.$strict>, z.ZodObject<{
443
+ do: z.ZodLiteral<"say">;
444
+ when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
445
+ message: z.ZodString;
446
+ tone: z.ZodOptional<z.ZodEnum<{
447
+ success: "success";
448
+ info: "info";
449
+ warning: "warning";
450
+ danger: "danger";
451
+ muted: "muted";
452
+ }>>;
453
+ }, z.z.core.$strict>, z.ZodObject<{
454
+ do: z.ZodLiteral<"ask">;
455
+ when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
456
+ message: z.ZodString;
457
+ }, z.z.core.$strict>, z.ZodObject<{
458
+ do: z.ZodLiteral<"call">;
459
+ when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
460
+ action: z.ZodString;
461
+ params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
462
+ }, z.z.core.$strict>, z.ZodObject<{
463
+ do: z.ZodLiteral<"close">;
464
+ when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
465
+ }, z.z.core.$strict>], "do">>>>;
466
+ beforeSave: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
467
+ do: z.ZodLiteral<"open">;
468
+ when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
469
+ page: z.ZodString;
470
+ version: z.ZodOptional<z.ZodInt>;
471
+ as: z.ZodOptional<z.ZodEnum<{
472
+ page: "page";
473
+ dialog: "dialog";
474
+ panel: "panel";
475
+ }>>;
476
+ side: z.ZodOptional<z.ZodEnum<{
477
+ end: "end";
478
+ start: "start";
479
+ right: "right";
480
+ left: "left";
481
+ top: "top";
482
+ bottom: "bottom";
483
+ }>>;
484
+ title: z.ZodOptional<z.ZodString>;
485
+ record: z.ZodOptional<z.ZodString>;
486
+ values: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
487
+ into: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
488
+ then: z.ZodOptional<z.ZodArray<typeof ActionStepSchema>>;
489
+ }, z.z.core.$strict>, z.ZodObject<{
490
+ do: z.ZodLiteral<"set">;
491
+ when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
492
+ field: z.ZodString;
493
+ value: z.ZodString;
494
+ }, z.z.core.$strict>, z.ZodObject<{
495
+ do: z.ZodLiteral<"clear">;
496
+ when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
497
+ field: z.ZodString;
498
+ }, z.z.core.$strict>, z.ZodObject<{
499
+ do: z.ZodLiteral<"addLine">;
500
+ when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
501
+ field: z.ZodString;
502
+ values: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
503
+ }, z.z.core.$strict>, z.ZodObject<{
504
+ do: z.ZodLiteral<"check">;
505
+ when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
506
+ fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
507
+ }, z.z.core.$strict>, z.ZodObject<{
508
+ do: z.ZodLiteral<"save">;
509
+ when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
510
+ }, z.z.core.$strict>, z.ZodObject<{
511
+ do: z.ZodLiteral<"reset">;
512
+ when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
513
+ }, z.z.core.$strict>, z.ZodObject<{
514
+ do: z.ZodLiteral<"goTo">;
515
+ when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
516
+ target: z.ZodString;
517
+ }, z.z.core.$strict>, z.ZodObject<{
518
+ do: z.ZodLiteral<"say">;
519
+ when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
520
+ message: z.ZodString;
521
+ tone: z.ZodOptional<z.ZodEnum<{
522
+ success: "success";
523
+ info: "info";
524
+ warning: "warning";
525
+ danger: "danger";
526
+ muted: "muted";
527
+ }>>;
528
+ }, z.z.core.$strict>, z.ZodObject<{
529
+ do: z.ZodLiteral<"ask">;
530
+ when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
531
+ message: z.ZodString;
532
+ }, z.z.core.$strict>, z.ZodObject<{
533
+ do: z.ZodLiteral<"call">;
534
+ when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
535
+ action: z.ZodString;
536
+ params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
537
+ }, z.z.core.$strict>, z.ZodObject<{
538
+ do: z.ZodLiteral<"close">;
539
+ when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
540
+ }, z.z.core.$strict>], "do">>>;
541
+ afterSave: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
542
+ do: z.ZodLiteral<"open">;
543
+ when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
544
+ page: z.ZodString;
545
+ version: z.ZodOptional<z.ZodInt>;
546
+ as: z.ZodOptional<z.ZodEnum<{
547
+ page: "page";
548
+ dialog: "dialog";
549
+ panel: "panel";
550
+ }>>;
551
+ side: z.ZodOptional<z.ZodEnum<{
552
+ end: "end";
553
+ start: "start";
554
+ right: "right";
555
+ left: "left";
556
+ top: "top";
557
+ bottom: "bottom";
558
+ }>>;
559
+ title: z.ZodOptional<z.ZodString>;
560
+ record: z.ZodOptional<z.ZodString>;
561
+ values: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
562
+ into: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
563
+ then: z.ZodOptional<z.ZodArray<typeof ActionStepSchema>>;
564
+ }, z.z.core.$strict>, z.ZodObject<{
565
+ do: z.ZodLiteral<"set">;
566
+ when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
567
+ field: z.ZodString;
568
+ value: z.ZodString;
569
+ }, z.z.core.$strict>, z.ZodObject<{
570
+ do: z.ZodLiteral<"clear">;
571
+ when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
572
+ field: z.ZodString;
573
+ }, z.z.core.$strict>, z.ZodObject<{
574
+ do: z.ZodLiteral<"addLine">;
575
+ when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
576
+ field: z.ZodString;
577
+ values: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
578
+ }, z.z.core.$strict>, z.ZodObject<{
579
+ do: z.ZodLiteral<"check">;
580
+ when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
581
+ fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
582
+ }, z.z.core.$strict>, z.ZodObject<{
583
+ do: z.ZodLiteral<"save">;
584
+ when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
585
+ }, z.z.core.$strict>, z.ZodObject<{
586
+ do: z.ZodLiteral<"reset">;
587
+ when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
588
+ }, z.z.core.$strict>, z.ZodObject<{
589
+ do: z.ZodLiteral<"goTo">;
590
+ when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
591
+ target: z.ZodString;
592
+ }, z.z.core.$strict>, z.ZodObject<{
593
+ do: z.ZodLiteral<"say">;
594
+ when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
595
+ message: z.ZodString;
596
+ tone: z.ZodOptional<z.ZodEnum<{
597
+ success: "success";
598
+ info: "info";
599
+ warning: "warning";
600
+ danger: "danger";
601
+ muted: "muted";
602
+ }>>;
603
+ }, z.z.core.$strict>, z.ZodObject<{
604
+ do: z.ZodLiteral<"ask">;
605
+ when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
606
+ message: z.ZodString;
607
+ }, z.z.core.$strict>, z.ZodObject<{
608
+ do: z.ZodLiteral<"call">;
609
+ when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
610
+ action: z.ZodString;
611
+ params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
612
+ }, z.z.core.$strict>, z.ZodObject<{
613
+ do: z.ZodLiteral<"close">;
614
+ when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
615
+ }, z.z.core.$strict>], "do">>>;
616
+ show: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
617
+ do: z.ZodLiteral<"open">;
618
+ when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
619
+ page: z.ZodString;
620
+ version: z.ZodOptional<z.ZodInt>;
621
+ as: z.ZodOptional<z.ZodEnum<{
622
+ page: "page";
623
+ dialog: "dialog";
624
+ panel: "panel";
625
+ }>>;
626
+ side: z.ZodOptional<z.ZodEnum<{
627
+ end: "end";
628
+ start: "start";
629
+ right: "right";
630
+ left: "left";
631
+ top: "top";
632
+ bottom: "bottom";
633
+ }>>;
634
+ title: z.ZodOptional<z.ZodString>;
635
+ record: z.ZodOptional<z.ZodString>;
636
+ values: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
637
+ into: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
638
+ then: z.ZodOptional<z.ZodArray<typeof ActionStepSchema>>;
639
+ }, z.z.core.$strict>, z.ZodObject<{
640
+ do: z.ZodLiteral<"set">;
641
+ when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
642
+ field: z.ZodString;
643
+ value: z.ZodString;
644
+ }, z.z.core.$strict>, z.ZodObject<{
645
+ do: z.ZodLiteral<"clear">;
646
+ when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
647
+ field: z.ZodString;
648
+ }, z.z.core.$strict>, z.ZodObject<{
649
+ do: z.ZodLiteral<"addLine">;
650
+ when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
651
+ field: z.ZodString;
652
+ values: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
653
+ }, z.z.core.$strict>, z.ZodObject<{
654
+ do: z.ZodLiteral<"check">;
655
+ when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
656
+ fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
657
+ }, z.z.core.$strict>, z.ZodObject<{
658
+ do: z.ZodLiteral<"save">;
659
+ when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
660
+ }, z.z.core.$strict>, z.ZodObject<{
661
+ do: z.ZodLiteral<"reset">;
662
+ when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
663
+ }, z.z.core.$strict>, z.ZodObject<{
664
+ do: z.ZodLiteral<"goTo">;
665
+ when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
666
+ target: z.ZodString;
667
+ }, z.z.core.$strict>, z.ZodObject<{
668
+ do: z.ZodLiteral<"say">;
669
+ when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
670
+ message: z.ZodString;
671
+ tone: z.ZodOptional<z.ZodEnum<{
672
+ success: "success";
673
+ info: "info";
674
+ warning: "warning";
675
+ danger: "danger";
676
+ muted: "muted";
677
+ }>>;
678
+ }, z.z.core.$strict>, z.ZodObject<{
679
+ do: z.ZodLiteral<"ask">;
680
+ when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
681
+ message: z.ZodString;
682
+ }, z.z.core.$strict>, z.ZodObject<{
683
+ do: z.ZodLiteral<"call">;
684
+ when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
685
+ action: z.ZodString;
686
+ params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
687
+ }, z.z.core.$strict>, z.ZodObject<{
688
+ do: z.ZodLiteral<"close">;
689
+ when: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
690
+ }, z.z.core.$strict>], "do">>>>;
691
+ }, z.z.core.$strict>;
692
+ export {};