foldkit-builder 0.3.13 → 0.4.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/dist/{index.d.mts → index.d.ts} +8 -819
- package/dist/index.d.ts.map +1 -0
- package/dist/{index.mjs → index.js} +40 -205
- package/dist/index.js.map +1 -0
- package/dist/settings.d.ts +761 -0
- package/dist/settings.d.ts.map +1 -0
- package/dist/settings.js +134 -0
- package/dist/settings.js.map +1 -0
- package/dist/words.d.ts +61 -0
- package/dist/words.d.ts.map +1 -0
- package/dist/words.js +42 -0
- package/dist/words.js.map +1 -0
- package/package.json +14 -14
- package/dist/index.d.mts.map +0 -1
- package/dist/index.mjs.map +0 -1
|
@@ -0,0 +1,761 @@
|
|
|
1
|
+
import { Option, Schema } from "effect";
|
|
2
|
+
import { AnyBlock, CatalogAction } from "foldkit-composition";
|
|
3
|
+
import { Control } from "foldkit-form";
|
|
4
|
+
import { Entity } from "foldkit-entity";
|
|
5
|
+
import { Metadata } from "foldkit-metadata";
|
|
6
|
+
/**
|
|
7
|
+
* Block metadata: the control the inspector draws a prop with, where its
|
|
8
|
+
* Schema alone does not say, as
|
|
9
|
+
* `Heading.pipe(Block.annotate(Builder.controls({ text: Input.multiline() })))`.
|
|
10
|
+
* `Input.hidden()` leaves a prop out of the inspector.
|
|
11
|
+
*/
|
|
12
|
+
export declare const controls: (given: Readonly<Record<string, Control>>) => Metadata;
|
|
13
|
+
/** A form over `fields`, named `name`, with the controls `hints` asks for. */
|
|
14
|
+
declare const make: (name: string, fields: Readonly<Record<string, Schema.Top>>, hints: Readonly<Record<string, Control>>) => {
|
|
15
|
+
form: {
|
|
16
|
+
pipe<A>(this: A): A;
|
|
17
|
+
pipe<A, B = never>(this: A, ab: (_: A) => B): B;
|
|
18
|
+
pipe<A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C;
|
|
19
|
+
pipe<A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D;
|
|
20
|
+
pipe<A, B = never, C = never, D = never, E_1 = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E_1): E_1;
|
|
21
|
+
pipe<A, B = never, C = never, D = never, E_1 = never, F = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E_1, ef: (_: E_1) => F): F;
|
|
22
|
+
pipe<A, B = never, C = never, D = never, E_1 = never, F = never, G = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E_1, ef: (_: E_1) => F, fg: (_: F) => G): G;
|
|
23
|
+
pipe<A, B = never, C = never, D = never, E_1 = never, F = never, G = never, H = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E_1, ef: (_: E_1) => F, fg: (_: F) => G, gh: (_: G) => H): H;
|
|
24
|
+
pipe<A, B = never, C = never, D = never, E_1 = never, F = never, G = never, H = never, I = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E_1, ef: (_: E_1) => F, fg: (_: F) => G, gh: (_: G) => H, hi: (_: H) => I): I;
|
|
25
|
+
pipe<A, B = never, C = never, D = never, E_1 = never, F = never, G = never, H = never, I = never, J = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E_1, ef: (_: E_1) => F, fg: (_: F) => G, gh: (_: G) => H, hi: (_: H) => I, ij: (_: I) => J): J;
|
|
26
|
+
pipe<A, B = never, C = never, D = never, E_1 = never, F = never, G = never, H = never, I = never, J = never, K = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E_1, ef: (_: E_1) => F, fg: (_: F) => G, gh: (_: G) => H, hi: (_: H) => I, ij: (_: I) => J, jk: (_: J) => K): K;
|
|
27
|
+
pipe<A, B = never, C = never, D = never, E_1 = never, F = never, G = never, H = never, I = never, J = never, K = never, L = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E_1, ef: (_: E_1) => F, fg: (_: F) => G, gh: (_: G) => H, hi: (_: H) => I, ij: (_: I) => J, jk: (_: J) => K, kl: (_: K) => L): L;
|
|
28
|
+
pipe<A, B = never, C = never, D = never, E_1 = never, F = never, G = never, H = never, I = never, J = never, K = never, L = never, M = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E_1, ef: (_: E_1) => F, fg: (_: F) => G, gh: (_: G) => H, hi: (_: H) => I, ij: (_: I) => J, jk: (_: J) => K, kl: (_: K) => L, lm: (_: L) => M): M;
|
|
29
|
+
pipe<A, B = never, C = never, D = never, E_1 = never, F = never, G = never, H = never, I = never, J = never, K = never, L = never, M = never, N = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E_1, ef: (_: E_1) => F, fg: (_: F) => G, gh: (_: G) => H, hi: (_: H) => I, ij: (_: I) => J, jk: (_: J) => K, kl: (_: K) => L, lm: (_: L) => M, mn: (_: M) => N): N;
|
|
30
|
+
pipe<A, B = never, C = never, D = never, E_1 = never, F = never, G = never, H = never, I = never, J = never, K = never, L = never, M = never, N = never, O = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E_1, ef: (_: E_1) => F, fg: (_: F) => G, gh: (_: G) => H, hi: (_: H) => I, ij: (_: I) => J, jk: (_: J) => K, kl: (_: K) => L, lm: (_: L) => M, mn: (_: M) => N, no: (_: N) => O): O;
|
|
31
|
+
pipe<A, B = never, C = never, D = never, E_1 = never, F = never, G = never, H = never, I = never, J = never, K = never, L = never, M = never, N = never, O = never, P = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E_1, ef: (_: E_1) => F, fg: (_: F) => G, gh: (_: G) => H, hi: (_: H) => I, ij: (_: I) => J, jk: (_: J) => K, kl: (_: K) => L, lm: (_: L) => M, mn: (_: M) => N, no: (_: N) => O, op: (_: O) => P): P;
|
|
32
|
+
pipe<A, B = never, C = never, D = never, E_1 = never, F = never, G = never, H = never, I = never, J = never, K = never, L = never, M = never, N = never, O = never, P = never, Q = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E_1, ef: (_: E_1) => F, fg: (_: F) => G, gh: (_: G) => H, hi: (_: H) => I, ij: (_: I) => J, jk: (_: J) => K, kl: (_: K) => L, lm: (_: L) => M, mn: (_: M) => N, no: (_: N) => O, op: (_: O) => P, pq: (_: P) => Q): Q;
|
|
33
|
+
pipe<A, B = never, C = never, D = never, E_1 = never, F = never, G = never, H = never, I = never, J = never, K = never, L = never, M = never, N = never, O = never, P = never, Q = never, R_1 = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E_1, ef: (_: E_1) => F, fg: (_: F) => G, gh: (_: G) => H, hi: (_: H) => I, ij: (_: I) => J, jk: (_: J) => K, kl: (_: K) => L, lm: (_: L) => M, mn: (_: M) => N, no: (_: N) => O, op: (_: O) => P, pq: (_: P) => Q, qr: (_: Q) => R_1): R_1;
|
|
34
|
+
pipe<A, B = never, C = never, D = never, E_1 = never, F = never, G = never, H = never, I = never, J = never, K = never, L = never, M = never, N = never, O = never, P = never, Q = never, R_1 = never, S = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E_1, ef: (_: E_1) => F, fg: (_: F) => G, gh: (_: G) => H, hi: (_: H) => I, ij: (_: I) => J, jk: (_: J) => K, kl: (_: K) => L, lm: (_: L) => M, mn: (_: M) => N, no: (_: N) => O, op: (_: O) => P, pq: (_: P) => Q, qr: (_: Q) => R_1, rs: (_: R_1) => S): S;
|
|
35
|
+
pipe<A, B = never, C = never, D = never, E_1 = never, F = never, G = never, H = never, I = never, J = never, K = never, L = never, M = never, N = never, O = never, P = never, Q = never, R_1 = never, S = never, T = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E_1, ef: (_: E_1) => F, fg: (_: F) => G, gh: (_: G) => H, hi: (_: H) => I, ij: (_: I) => J, jk: (_: J) => K, kl: (_: K) => L, lm: (_: L) => M, mn: (_: M) => N, no: (_: N) => O, op: (_: O) => P, pq: (_: P) => Q, qr: (_: Q) => R_1, rs: (_: R_1) => S, st: (_: S) => T): T;
|
|
36
|
+
pipe<A, B = never, C = never, D = never, E_1 = never, F = never, G = never, H = never, I = never, J = never, K = never, L = never, M = never, N = never, O = never, P = never, Q = never, R_1 = never, S = never, T = never, U = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E_1, ef: (_: E_1) => F, fg: (_: F) => G, gh: (_: G) => H, hi: (_: H) => I, ij: (_: I) => J, jk: (_: J) => K, kl: (_: K) => L, lm: (_: L) => M, mn: (_: M) => N, no: (_: N) => O, op: (_: O) => P, pq: (_: P) => Q, qr: (_: Q) => R_1, rs: (_: R_1) => S, st: (_: S) => T, tu: (_: T) => U): U;
|
|
37
|
+
pipe<A, B = never, C = never, D = never, E_1 = never, F = never, G = never, H = never, I = never, J = never, K = never, L = never, M = never, N = never, O = never, P = never, Q = never, R_1 = never, S = never, T = never, U = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D, de: (_: D) => E_1, ef: (_: E_1) => F, fg: (_: F) => G, gh: (_: G) => H, hi: (_: H) => I, ij: (_: I) => J, jk: (_: J) => K, kl: (_: K) => L, lm: (_: L) => M, mn: (_: M) => N, no: (_: N) => O, op: (_: O) => P, pq: (_: P) => Q, qr: (_: Q) => R_1, rs: (_: R_1) => S, st: (_: S) => T, tu: (_: T) => U): U;
|
|
38
|
+
name: string;
|
|
39
|
+
options: import("foldkit-form").FormOptions<Readonly<Record<string, Schema.Top>>, import("foldkit-entity").InputMembers<Entity<string, Readonly<Record<string, Schema.Top>>, {}, {}>, Readonly<Record<string, Schema.Top>>, {}>, never, {}, Readonly<Record<string, Control<unknown>>>>;
|
|
40
|
+
types: {
|
|
41
|
+
readonly Name: string;
|
|
42
|
+
readonly E: Entity<string, Readonly<Record<string, Schema.Top>>, {}, {}>;
|
|
43
|
+
readonly Fields: Readonly<Record<string, Schema.Top>>;
|
|
44
|
+
readonly Members: import("foldkit-entity").InputMembers<Entity<string, Readonly<Record<string, Schema.Top>>, {}, {}>, Readonly<Record<string, Schema.Top>>, {}>;
|
|
45
|
+
readonly R: never;
|
|
46
|
+
readonly Nest: {};
|
|
47
|
+
readonly Inputs: Readonly<Record<string, Control<unknown>>>;
|
|
48
|
+
};
|
|
49
|
+
bundle: import("foldkit-bundle").BundleShape<string, void, import("foldkit-form").FormModel<Readonly<Record<string, Schema.Top>>, import("foldkit-entity").InputMembers<Entity<string, Readonly<Record<string, Schema.Top>>, {}, {}>, Readonly<Record<string, Schema.Top>>, {}>, import("foldkit-form").ControlsOf<Readonly<Record<string, Control<unknown>>>>>, {
|
|
50
|
+
readonly _tag: "About";
|
|
51
|
+
readonly subject: {
|
|
52
|
+
readonly [x: string]: string;
|
|
53
|
+
};
|
|
54
|
+
} | {
|
|
55
|
+
readonly _tag: "AskedForMore";
|
|
56
|
+
readonly key: string;
|
|
57
|
+
} | {
|
|
58
|
+
readonly _tag: "Blurred";
|
|
59
|
+
readonly key: string;
|
|
60
|
+
} | {
|
|
61
|
+
readonly _tag: "Changed";
|
|
62
|
+
readonly key: string;
|
|
63
|
+
readonly value: string | boolean | readonly string[];
|
|
64
|
+
} | {
|
|
65
|
+
readonly _tag: "Checked";
|
|
66
|
+
readonly key: string;
|
|
67
|
+
readonly draft: string | boolean | readonly string[];
|
|
68
|
+
readonly values?: unknown;
|
|
69
|
+
readonly subject?: {
|
|
70
|
+
readonly [x: string]: string;
|
|
71
|
+
};
|
|
72
|
+
readonly error: string | null;
|
|
73
|
+
} | {
|
|
74
|
+
readonly _tag: "Control";
|
|
75
|
+
readonly key: never;
|
|
76
|
+
readonly message: unknown;
|
|
77
|
+
} | {
|
|
78
|
+
readonly _tag: "FollowedIssue";
|
|
79
|
+
readonly id: string;
|
|
80
|
+
} | {
|
|
81
|
+
readonly _tag: "Nested";
|
|
82
|
+
readonly key: string;
|
|
83
|
+
readonly row: string;
|
|
84
|
+
readonly message: unknown;
|
|
85
|
+
} | {
|
|
86
|
+
readonly _tag: "Refused";
|
|
87
|
+
readonly key: string;
|
|
88
|
+
readonly error: string;
|
|
89
|
+
readonly value: unknown;
|
|
90
|
+
} | {
|
|
91
|
+
readonly _tag: "Reset";
|
|
92
|
+
} | {
|
|
93
|
+
readonly _tag: "RowAdded";
|
|
94
|
+
readonly key: string;
|
|
95
|
+
} | {
|
|
96
|
+
readonly _tag: "RowRemoved";
|
|
97
|
+
readonly key: string;
|
|
98
|
+
readonly row: string;
|
|
99
|
+
} | {
|
|
100
|
+
readonly _tag: "Searched";
|
|
101
|
+
readonly key: string;
|
|
102
|
+
readonly text: string;
|
|
103
|
+
} | {
|
|
104
|
+
readonly _tag: "Submitted";
|
|
105
|
+
} | {
|
|
106
|
+
readonly _tag: "Toggled";
|
|
107
|
+
readonly key: string;
|
|
108
|
+
readonly choice?: string | undefined;
|
|
109
|
+
} | {
|
|
110
|
+
readonly _tag: "Validated";
|
|
111
|
+
readonly key: string;
|
|
112
|
+
} | {
|
|
113
|
+
readonly _tag: "ValidatedAll";
|
|
114
|
+
}, import("foldkit-form").Submitted<{
|
|
115
|
+
readonly [x: string]: unknown;
|
|
116
|
+
}>, never, never, void, {}, {
|
|
117
|
+
fill: (model: import("foldkit-form").FormModel<Readonly<Record<string, Schema.Top>>, import("foldkit-entity").InputMembers<Entity<string, Readonly<Record<string, Schema.Top>>, {}, {}>, Readonly<Record<string, Schema.Top>>, {}>, import("foldkit-form").ControlsOf<Readonly<Record<string, Control<unknown>>>>>, values: Partial<{
|
|
118
|
+
readonly [x: string]: unknown;
|
|
119
|
+
}>) => {
|
|
120
|
+
readonly model: import("foldkit-form").FormModel<Readonly<Record<string, Schema.Top>>, import("foldkit-entity").InputMembers<Entity<string, Readonly<Record<string, Schema.Top>>, {}, {}>, Readonly<Record<string, Schema.Top>>, {}>, import("foldkit-form").ControlsOf<Readonly<Record<string, Control<unknown>>>>>;
|
|
121
|
+
};
|
|
122
|
+
}>;
|
|
123
|
+
Message: import("foldkit/message").MessageUnion<{
|
|
124
|
+
Changed: {
|
|
125
|
+
key: Schema.Literals<readonly [string, ...string[]]>;
|
|
126
|
+
value: Schema.Union<readonly [Schema.String, Schema.Boolean, Schema.$Array<Schema.String>]>;
|
|
127
|
+
};
|
|
128
|
+
Blurred: {
|
|
129
|
+
key: Schema.Literals<readonly [string, ...string[]]>;
|
|
130
|
+
};
|
|
131
|
+
Validated: {
|
|
132
|
+
key: Schema.Literals<readonly [string, ...string[]]>;
|
|
133
|
+
};
|
|
134
|
+
ValidatedAll: {};
|
|
135
|
+
Submitted: {};
|
|
136
|
+
Reset: {};
|
|
137
|
+
Checked: {
|
|
138
|
+
key: Schema.Literals<readonly [string, ...string[]]>;
|
|
139
|
+
draft: Schema.Union<readonly [Schema.String, Schema.Boolean, Schema.$Array<Schema.String>]>;
|
|
140
|
+
values: Schema.optionalKey<Schema.Unknown>;
|
|
141
|
+
subject: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>;
|
|
142
|
+
error: Schema.NullOr<Schema.String>;
|
|
143
|
+
};
|
|
144
|
+
Refused: {
|
|
145
|
+
key: Schema.Literals<readonly [string, ...string[]]>;
|
|
146
|
+
error: Schema.String;
|
|
147
|
+
value: Schema.Unknown;
|
|
148
|
+
};
|
|
149
|
+
About: {
|
|
150
|
+
subject: Schema.$Record<Schema.String, Schema.String>;
|
|
151
|
+
};
|
|
152
|
+
Searched: {
|
|
153
|
+
key: Schema.Literals<readonly [string, ...string[]]>;
|
|
154
|
+
text: Schema.String;
|
|
155
|
+
};
|
|
156
|
+
Toggled: {
|
|
157
|
+
key: Schema.Literals<readonly [string, ...string[]]>;
|
|
158
|
+
choice: Schema.optional<Schema.String>;
|
|
159
|
+
};
|
|
160
|
+
Nested: {
|
|
161
|
+
key: Schema.String;
|
|
162
|
+
row: Schema.String;
|
|
163
|
+
message: Schema.Unknown;
|
|
164
|
+
};
|
|
165
|
+
Control: {
|
|
166
|
+
key: Schema.Literals<readonly [never, ...never[]]>;
|
|
167
|
+
message: Schema.Unknown;
|
|
168
|
+
};
|
|
169
|
+
RowAdded: {
|
|
170
|
+
key: Schema.String;
|
|
171
|
+
};
|
|
172
|
+
RowRemoved: {
|
|
173
|
+
key: Schema.String;
|
|
174
|
+
row: Schema.String;
|
|
175
|
+
};
|
|
176
|
+
FollowedIssue: {
|
|
177
|
+
id: Schema.String;
|
|
178
|
+
};
|
|
179
|
+
AskedForMore: {
|
|
180
|
+
key: Schema.Literals<readonly [string, ...string[]]>;
|
|
181
|
+
};
|
|
182
|
+
}>;
|
|
183
|
+
Check: import("foldkit/command").CommandDefinitionWithArgs<`${string}.check`, {
|
|
184
|
+
key: Schema.Literals<readonly [string, ...string[]]>;
|
|
185
|
+
draft: Schema.Union<readonly [Schema.String, Schema.Boolean, Schema.$Array<Schema.String>]>;
|
|
186
|
+
values: Schema.Unknown;
|
|
187
|
+
subject: Schema.$Record<Schema.String, Schema.String>;
|
|
188
|
+
}, import("effect/Effect").Effect<{
|
|
189
|
+
readonly _tag: "Checked";
|
|
190
|
+
readonly key: string;
|
|
191
|
+
readonly draft: string | boolean | readonly string[];
|
|
192
|
+
readonly values?: unknown;
|
|
193
|
+
readonly subject?: {
|
|
194
|
+
readonly [x: string]: string;
|
|
195
|
+
};
|
|
196
|
+
readonly error: string | null;
|
|
197
|
+
}, never, never>>;
|
|
198
|
+
input: import("foldkit-entity").EntityInput<Entity<string, Readonly<Record<string, Schema.Top>>, {}, {}>, Readonly<Record<string, Schema.Top>>, import("foldkit-entity").InputMembers<Entity<string, Readonly<Record<string, Schema.Top>>, {}, {}>, Readonly<Record<string, Schema.Top>>, {}>>;
|
|
199
|
+
authoredChanged: (before: import("foldkit-form").FormModel<Readonly<Record<string, Schema.Top>>, import("foldkit-entity").InputMembers<Entity<string, Readonly<Record<string, Schema.Top>>, {}, {}>, Readonly<Record<string, Schema.Top>>, {}>, import("foldkit-form").ControlsOf<Readonly<Record<string, Control<unknown>>>>>, after: import("foldkit-form").FormModel<Readonly<Record<string, Schema.Top>>, import("foldkit-entity").InputMembers<Entity<string, Readonly<Record<string, Schema.Top>>, {}, {}>, Readonly<Record<string, Schema.Top>>, {}>, import("foldkit-form").ControlsOf<Readonly<Record<string, Control<unknown>>>>>) => boolean;
|
|
200
|
+
fill: (model: import("foldkit-form").FormModel<Readonly<Record<string, Schema.Top>>, import("foldkit-entity").InputMembers<Entity<string, Readonly<Record<string, Schema.Top>>, {}, {}>, Readonly<Record<string, Schema.Top>>, {}>, import("foldkit-form").ControlsOf<Readonly<Record<string, Control<unknown>>>>>, values: Partial<{
|
|
201
|
+
readonly [x: string]: unknown;
|
|
202
|
+
}>) => {
|
|
203
|
+
readonly model: import("foldkit-form").FormModel<Readonly<Record<string, Schema.Top>>, import("foldkit-entity").InputMembers<Entity<string, Readonly<Record<string, Schema.Top>>, {}, {}>, Readonly<Record<string, Schema.Top>>, {}>, import("foldkit-form").ControlsOf<Readonly<Record<string, Control<unknown>>>>>;
|
|
204
|
+
};
|
|
205
|
+
initial: import("foldkit-form").FormModel<Readonly<Record<string, Schema.Top>>, import("foldkit-entity").InputMembers<Entity<string, Readonly<Record<string, Schema.Top>>, {}, {}>, Readonly<Record<string, Schema.Top>>, {}>, import("foldkit-form").ControlsOf<Readonly<Record<string, Control<unknown>>>>>;
|
|
206
|
+
controls: import("foldkit-form").FormControl<string>[];
|
|
207
|
+
controlsByKey: {
|
|
208
|
+
readonly [x: string]: import("foldkit-form").FormControl<string>;
|
|
209
|
+
};
|
|
210
|
+
field: (model: import("foldkit-form").FormModel<Readonly<Record<string, Schema.Top>>, import("foldkit-entity").InputMembers<Entity<string, Readonly<Record<string, Schema.Top>>, {}, {}>, Readonly<Record<string, Schema.Top>>, {}>, import("foldkit-form").ControlsOf<Readonly<Record<string, Control<unknown>>>>>, key: string) => import("foldkit/fieldValidation").Field<import("foldkit-form").Draft>;
|
|
211
|
+
control: <K extends keyof import("foldkit-form").ControlsOf<Readonly<Record<string, Control<unknown>>>> & Exclude<string & string, import("foldkit-form").NestedKey<import("foldkit-entity").InputMembers<Entity<string, Readonly<Record<string, Schema.Top>>, {}, {}>, Readonly<Record<string, Schema.Top>>, {}>>>>(key: K) => {
|
|
212
|
+
readonly field: (model: import("foldkit-form").FormModel<Readonly<Record<string, Schema.Top>>, import("foldkit-entity").InputMembers<Entity<string, Readonly<Record<string, Schema.Top>>, {}, {}>, Readonly<Record<string, Schema.Top>>, {}>, import("foldkit-form").ControlsOf<Readonly<Record<string, Control<unknown>>>>>) => import("foldkit/fieldValidation").Field<string>;
|
|
213
|
+
readonly send: (message: never) => {
|
|
214
|
+
readonly _tag: "About";
|
|
215
|
+
readonly subject: {
|
|
216
|
+
readonly [x: string]: string;
|
|
217
|
+
};
|
|
218
|
+
} | {
|
|
219
|
+
readonly _tag: "AskedForMore";
|
|
220
|
+
readonly key: string;
|
|
221
|
+
} | {
|
|
222
|
+
readonly _tag: "Blurred";
|
|
223
|
+
readonly key: string;
|
|
224
|
+
} | {
|
|
225
|
+
readonly _tag: "Changed";
|
|
226
|
+
readonly key: string;
|
|
227
|
+
readonly value: string | boolean | readonly string[];
|
|
228
|
+
} | {
|
|
229
|
+
readonly _tag: "Checked";
|
|
230
|
+
readonly key: string;
|
|
231
|
+
readonly draft: string | boolean | readonly string[];
|
|
232
|
+
readonly values?: unknown;
|
|
233
|
+
readonly subject?: {
|
|
234
|
+
readonly [x: string]: string;
|
|
235
|
+
};
|
|
236
|
+
readonly error: string | null;
|
|
237
|
+
} | {
|
|
238
|
+
readonly _tag: "Control";
|
|
239
|
+
readonly key: never;
|
|
240
|
+
readonly message: unknown;
|
|
241
|
+
} | {
|
|
242
|
+
readonly _tag: "FollowedIssue";
|
|
243
|
+
readonly id: string;
|
|
244
|
+
} | {
|
|
245
|
+
readonly _tag: "Nested";
|
|
246
|
+
readonly key: string;
|
|
247
|
+
readonly row: string;
|
|
248
|
+
readonly message: unknown;
|
|
249
|
+
} | {
|
|
250
|
+
readonly _tag: "Refused";
|
|
251
|
+
readonly key: string;
|
|
252
|
+
readonly error: string;
|
|
253
|
+
readonly value: unknown;
|
|
254
|
+
} | {
|
|
255
|
+
readonly _tag: "Reset";
|
|
256
|
+
} | {
|
|
257
|
+
readonly _tag: "RowAdded";
|
|
258
|
+
readonly key: string;
|
|
259
|
+
} | {
|
|
260
|
+
readonly _tag: "RowRemoved";
|
|
261
|
+
readonly key: string;
|
|
262
|
+
readonly row: string;
|
|
263
|
+
} | {
|
|
264
|
+
readonly _tag: "Searched";
|
|
265
|
+
readonly key: string;
|
|
266
|
+
readonly text: string;
|
|
267
|
+
} | {
|
|
268
|
+
readonly _tag: "Submitted";
|
|
269
|
+
} | {
|
|
270
|
+
readonly _tag: "Toggled";
|
|
271
|
+
readonly key: string;
|
|
272
|
+
readonly choice?: string | undefined;
|
|
273
|
+
} | {
|
|
274
|
+
readonly _tag: "Validated";
|
|
275
|
+
readonly key: string;
|
|
276
|
+
} | {
|
|
277
|
+
readonly _tag: "ValidatedAll";
|
|
278
|
+
};
|
|
279
|
+
};
|
|
280
|
+
search: (model: import("foldkit-form").FormModel<Readonly<Record<string, Schema.Top>>, import("foldkit-entity").InputMembers<Entity<string, Readonly<Record<string, Schema.Top>>, {}, {}>, Readonly<Record<string, Schema.Top>>, {}>, import("foldkit-form").ControlsOf<Readonly<Record<string, Control<unknown>>>>>, key: string) => string;
|
|
281
|
+
subject: (model: import("foldkit-form").FormModel<Readonly<Record<string, Schema.Top>>, import("foldkit-entity").InputMembers<Entity<string, Readonly<Record<string, Schema.Top>>, {}, {}>, Readonly<Record<string, Schema.Top>>, {}>, import("foldkit-form").ControlsOf<Readonly<Record<string, Control<unknown>>>>>) => Readonly<Record<string, string>>;
|
|
282
|
+
nested: {};
|
|
283
|
+
row: <K extends Extract<string & string, import("foldkit-form").NestedKey<import("foldkit-entity").InputMembers<Entity<string, Readonly<Record<string, Schema.Top>>, {}, {}>, Readonly<Record<string, Schema.Top>>, {}>>>>(key: K, row: string) => import("foldkit-form").RowHandle<K extends never ? NonNullable<{}[K]> : import("foldkit-form").NestedForm, {
|
|
284
|
+
readonly _tag: "About";
|
|
285
|
+
readonly subject: {
|
|
286
|
+
readonly [x: string]: string;
|
|
287
|
+
};
|
|
288
|
+
} | {
|
|
289
|
+
readonly _tag: "AskedForMore";
|
|
290
|
+
readonly key: string;
|
|
291
|
+
} | {
|
|
292
|
+
readonly _tag: "Blurred";
|
|
293
|
+
readonly key: string;
|
|
294
|
+
} | {
|
|
295
|
+
readonly _tag: "Changed";
|
|
296
|
+
readonly key: string;
|
|
297
|
+
readonly value: string | boolean | readonly string[];
|
|
298
|
+
} | {
|
|
299
|
+
readonly _tag: "Checked";
|
|
300
|
+
readonly key: string;
|
|
301
|
+
readonly draft: string | boolean | readonly string[];
|
|
302
|
+
readonly values?: unknown;
|
|
303
|
+
readonly subject?: {
|
|
304
|
+
readonly [x: string]: string;
|
|
305
|
+
};
|
|
306
|
+
readonly error: string | null;
|
|
307
|
+
} | {
|
|
308
|
+
readonly _tag: "Control";
|
|
309
|
+
readonly key: never;
|
|
310
|
+
readonly message: unknown;
|
|
311
|
+
} | {
|
|
312
|
+
readonly _tag: "FollowedIssue";
|
|
313
|
+
readonly id: string;
|
|
314
|
+
} | {
|
|
315
|
+
readonly _tag: "Nested";
|
|
316
|
+
readonly key: string;
|
|
317
|
+
readonly row: string;
|
|
318
|
+
readonly message: unknown;
|
|
319
|
+
} | {
|
|
320
|
+
readonly _tag: "Refused";
|
|
321
|
+
readonly key: string;
|
|
322
|
+
readonly error: string;
|
|
323
|
+
readonly value: unknown;
|
|
324
|
+
} | {
|
|
325
|
+
readonly _tag: "Reset";
|
|
326
|
+
} | {
|
|
327
|
+
readonly _tag: "RowAdded";
|
|
328
|
+
readonly key: string;
|
|
329
|
+
} | {
|
|
330
|
+
readonly _tag: "RowRemoved";
|
|
331
|
+
readonly key: string;
|
|
332
|
+
readonly row: string;
|
|
333
|
+
} | {
|
|
334
|
+
readonly _tag: "Searched";
|
|
335
|
+
readonly key: string;
|
|
336
|
+
readonly text: string;
|
|
337
|
+
} | {
|
|
338
|
+
readonly _tag: "Submitted";
|
|
339
|
+
} | {
|
|
340
|
+
readonly _tag: "Toggled";
|
|
341
|
+
readonly key: string;
|
|
342
|
+
readonly choice?: string | undefined;
|
|
343
|
+
} | {
|
|
344
|
+
readonly _tag: "Validated";
|
|
345
|
+
readonly key: string;
|
|
346
|
+
} | {
|
|
347
|
+
readonly _tag: "ValidatedAll";
|
|
348
|
+
}>;
|
|
349
|
+
isFollowing: (model: import("foldkit-form").FormModel<Readonly<Record<string, Schema.Top>>, import("foldkit-entity").InputMembers<Entity<string, Readonly<Record<string, Schema.Top>>, {}, {}>, Readonly<Record<string, Schema.Top>>, {}>, import("foldkit-form").ControlsOf<Readonly<Record<string, Control<unknown>>>>>, key: string) => boolean;
|
|
350
|
+
rows: (model: import("foldkit-form").FormModel<Readonly<Record<string, Schema.Top>>, import("foldkit-entity").InputMembers<Entity<string, Readonly<Record<string, Schema.Top>>, {}, {}>, Readonly<Record<string, Schema.Top>>, {}>, import("foldkit-form").ControlsOf<Readonly<Record<string, Control<unknown>>>>>, key: never) => never;
|
|
351
|
+
canSubmit: (model: import("foldkit-form").FormModel<Readonly<Record<string, Schema.Top>>, import("foldkit-entity").InputMembers<Entity<string, Readonly<Record<string, Schema.Top>>, {}, {}>, Readonly<Record<string, Schema.Top>>, {}>, import("foldkit-form").ControlsOf<Readonly<Record<string, Control<unknown>>>>>) => boolean;
|
|
352
|
+
attempted: (model: import("foldkit-form").FormModel<Readonly<Record<string, Schema.Top>>, import("foldkit-entity").InputMembers<Entity<string, Readonly<Record<string, Schema.Top>>, {}, {}>, Readonly<Record<string, Schema.Top>>, {}>, import("foldkit-form").ControlsOf<Readonly<Record<string, Control<unknown>>>>>) => boolean;
|
|
353
|
+
isValid: (model: import("foldkit-form").FormModel<Readonly<Record<string, Schema.Top>>, import("foldkit-entity").InputMembers<Entity<string, Readonly<Record<string, Schema.Top>>, {}, {}>, Readonly<Record<string, Schema.Top>>, {}>, import("foldkit-form").ControlsOf<Readonly<Record<string, Control<unknown>>>>>) => boolean;
|
|
354
|
+
value: (model: import("foldkit-form").FormModel<Readonly<Record<string, Schema.Top>>, import("foldkit-entity").InputMembers<Entity<string, Readonly<Record<string, Schema.Top>>, {}, {}>, Readonly<Record<string, Schema.Top>>, {}>, import("foldkit-form").ControlsOf<Readonly<Record<string, Control<unknown>>>>>) => Option.Option<{
|
|
355
|
+
readonly [x: string]: unknown;
|
|
356
|
+
}>;
|
|
357
|
+
settled: (model: import("foldkit-form").FormModel<Readonly<Record<string, Schema.Top>>, import("foldkit-entity").InputMembers<Entity<string, Readonly<Record<string, Schema.Top>>, {}, {}>, Readonly<Record<string, Schema.Top>>, {}>, import("foldkit-form").ControlsOf<Readonly<Record<string, Control<unknown>>>>>) => import("foldkit-form").FormModel<Readonly<Record<string, Schema.Top>>, import("foldkit-entity").InputMembers<Entity<string, Readonly<Record<string, Schema.Top>>, {}, {}>, Readonly<Record<string, Schema.Top>>, {}>, import("foldkit-form").ControlsOf<Readonly<Record<string, Control<unknown>>>>>;
|
|
358
|
+
partial: (model: import("foldkit-form").FormModel<Readonly<Record<string, Schema.Top>>, import("foldkit-entity").InputMembers<Entity<string, Readonly<Record<string, Schema.Top>>, {}, {}>, Readonly<Record<string, Schema.Top>>, {}>, import("foldkit-form").ControlsOf<Readonly<Record<string, Control<unknown>>>>>) => Partial<{
|
|
359
|
+
readonly [x: string]: unknown;
|
|
360
|
+
}>;
|
|
361
|
+
engine: {
|
|
362
|
+
submit: (model: import("foldkit-form").FormModel<Readonly<Record<string, Schema.Top>>, import("foldkit-entity").InputMembers<Entity<string, Readonly<Record<string, Schema.Top>>, {}, {}>, Readonly<Record<string, Schema.Top>>, {}>, import("foldkit-form").ControlsOf<Readonly<Record<string, Control<unknown>>>>>) => {
|
|
363
|
+
model: import("foldkit-form").FormModel<Readonly<Record<string, Schema.Top>>, import("foldkit-entity").InputMembers<Entity<string, Readonly<Record<string, Schema.Top>>, {}, {}>, Readonly<Record<string, Schema.Top>>, {}>, import("foldkit-form").ControlsOf<Readonly<Record<string, Control<unknown>>>>>;
|
|
364
|
+
commands: readonly Readonly<{
|
|
365
|
+
name: string;
|
|
366
|
+
args?: Record<string, unknown>;
|
|
367
|
+
key?: string;
|
|
368
|
+
effect: import("effect/Effect").Effect<{
|
|
369
|
+
readonly _tag: "About";
|
|
370
|
+
readonly subject: {
|
|
371
|
+
readonly [x: string]: string;
|
|
372
|
+
};
|
|
373
|
+
} | {
|
|
374
|
+
readonly _tag: "AskedForMore";
|
|
375
|
+
readonly key: string;
|
|
376
|
+
} | {
|
|
377
|
+
readonly _tag: "Blurred";
|
|
378
|
+
readonly key: string;
|
|
379
|
+
} | {
|
|
380
|
+
readonly _tag: "Changed";
|
|
381
|
+
readonly key: string;
|
|
382
|
+
readonly value: string | boolean | readonly string[];
|
|
383
|
+
} | {
|
|
384
|
+
readonly _tag: "Checked";
|
|
385
|
+
readonly key: string;
|
|
386
|
+
readonly draft: string | boolean | readonly string[];
|
|
387
|
+
readonly values?: unknown;
|
|
388
|
+
readonly subject?: {
|
|
389
|
+
readonly [x: string]: string;
|
|
390
|
+
};
|
|
391
|
+
readonly error: string | null;
|
|
392
|
+
} | {
|
|
393
|
+
readonly _tag: "Control";
|
|
394
|
+
readonly key: never;
|
|
395
|
+
readonly message: unknown;
|
|
396
|
+
} | {
|
|
397
|
+
readonly _tag: "FollowedIssue";
|
|
398
|
+
readonly id: string;
|
|
399
|
+
} | {
|
|
400
|
+
readonly _tag: "Nested";
|
|
401
|
+
readonly key: string;
|
|
402
|
+
readonly row: string;
|
|
403
|
+
readonly message: unknown;
|
|
404
|
+
} | {
|
|
405
|
+
readonly _tag: "Refused";
|
|
406
|
+
readonly key: string;
|
|
407
|
+
readonly error: string;
|
|
408
|
+
readonly value: unknown;
|
|
409
|
+
} | {
|
|
410
|
+
readonly _tag: "Reset";
|
|
411
|
+
} | {
|
|
412
|
+
readonly _tag: "RowAdded";
|
|
413
|
+
readonly key: string;
|
|
414
|
+
} | {
|
|
415
|
+
readonly _tag: "RowRemoved";
|
|
416
|
+
readonly key: string;
|
|
417
|
+
readonly row: string;
|
|
418
|
+
} | {
|
|
419
|
+
readonly _tag: "Searched";
|
|
420
|
+
readonly key: string;
|
|
421
|
+
readonly text: string;
|
|
422
|
+
} | {
|
|
423
|
+
readonly _tag: "Submitted";
|
|
424
|
+
} | {
|
|
425
|
+
readonly _tag: "Toggled";
|
|
426
|
+
readonly key: string;
|
|
427
|
+
readonly choice?: string | undefined;
|
|
428
|
+
} | {
|
|
429
|
+
readonly _tag: "Validated";
|
|
430
|
+
readonly key: string;
|
|
431
|
+
} | {
|
|
432
|
+
readonly _tag: "ValidatedAll";
|
|
433
|
+
}, never, never>;
|
|
434
|
+
}>[];
|
|
435
|
+
};
|
|
436
|
+
validateAll: (model: import("foldkit-form").FormModel<Readonly<Record<string, Schema.Top>>, import("foldkit-entity").InputMembers<Entity<string, Readonly<Record<string, Schema.Top>>, {}, {}>, Readonly<Record<string, Schema.Top>>, {}>, import("foldkit-form").ControlsOf<Readonly<Record<string, Control<unknown>>>>>) => {
|
|
437
|
+
readonly model: import("foldkit-form").FormModel<Readonly<Record<string, Schema.Top>>, import("foldkit-entity").InputMembers<Entity<string, Readonly<Record<string, Schema.Top>>, {}, {}>, Readonly<Record<string, Schema.Top>>, {}>, import("foldkit-form").ControlsOf<Readonly<Record<string, Control<unknown>>>>>;
|
|
438
|
+
readonly commands: readonly Readonly<{
|
|
439
|
+
name: string;
|
|
440
|
+
args?: Record<string, unknown>;
|
|
441
|
+
key?: string;
|
|
442
|
+
effect: import("effect/Effect").Effect<{
|
|
443
|
+
readonly _tag: "About";
|
|
444
|
+
readonly subject: {
|
|
445
|
+
readonly [x: string]: string;
|
|
446
|
+
};
|
|
447
|
+
} | {
|
|
448
|
+
readonly _tag: "AskedForMore";
|
|
449
|
+
readonly key: string;
|
|
450
|
+
} | {
|
|
451
|
+
readonly _tag: "Blurred";
|
|
452
|
+
readonly key: string;
|
|
453
|
+
} | {
|
|
454
|
+
readonly _tag: "Changed";
|
|
455
|
+
readonly key: string;
|
|
456
|
+
readonly value: string | boolean | readonly string[];
|
|
457
|
+
} | {
|
|
458
|
+
readonly _tag: "Checked";
|
|
459
|
+
readonly key: string;
|
|
460
|
+
readonly draft: string | boolean | readonly string[];
|
|
461
|
+
readonly values?: unknown;
|
|
462
|
+
readonly subject?: {
|
|
463
|
+
readonly [x: string]: string;
|
|
464
|
+
};
|
|
465
|
+
readonly error: string | null;
|
|
466
|
+
} | {
|
|
467
|
+
readonly _tag: "Control";
|
|
468
|
+
readonly key: never;
|
|
469
|
+
readonly message: unknown;
|
|
470
|
+
} | {
|
|
471
|
+
readonly _tag: "FollowedIssue";
|
|
472
|
+
readonly id: string;
|
|
473
|
+
} | {
|
|
474
|
+
readonly _tag: "Nested";
|
|
475
|
+
readonly key: string;
|
|
476
|
+
readonly row: string;
|
|
477
|
+
readonly message: unknown;
|
|
478
|
+
} | {
|
|
479
|
+
readonly _tag: "Refused";
|
|
480
|
+
readonly key: string;
|
|
481
|
+
readonly error: string;
|
|
482
|
+
readonly value: unknown;
|
|
483
|
+
} | {
|
|
484
|
+
readonly _tag: "Reset";
|
|
485
|
+
} | {
|
|
486
|
+
readonly _tag: "RowAdded";
|
|
487
|
+
readonly key: string;
|
|
488
|
+
} | {
|
|
489
|
+
readonly _tag: "RowRemoved";
|
|
490
|
+
readonly key: string;
|
|
491
|
+
readonly row: string;
|
|
492
|
+
} | {
|
|
493
|
+
readonly _tag: "Searched";
|
|
494
|
+
readonly key: string;
|
|
495
|
+
readonly text: string;
|
|
496
|
+
} | {
|
|
497
|
+
readonly _tag: "Submitted";
|
|
498
|
+
} | {
|
|
499
|
+
readonly _tag: "Toggled";
|
|
500
|
+
readonly key: string;
|
|
501
|
+
readonly choice?: string | undefined;
|
|
502
|
+
} | {
|
|
503
|
+
readonly _tag: "Validated";
|
|
504
|
+
readonly key: string;
|
|
505
|
+
} | {
|
|
506
|
+
readonly _tag: "ValidatedAll";
|
|
507
|
+
}, never, never>;
|
|
508
|
+
}>[];
|
|
509
|
+
};
|
|
510
|
+
isValidating: (model: import("foldkit-form").FormModel<Readonly<Record<string, Schema.Top>>, import("foldkit-entity").InputMembers<Entity<string, Readonly<Record<string, Schema.Top>>, {}, {}>, Readonly<Record<string, Schema.Top>>, {}>, import("foldkit-form").ControlsOf<Readonly<Record<string, Control<unknown>>>>>) => boolean;
|
|
511
|
+
authoredChanged: (before: import("foldkit-form").FormModel<Readonly<Record<string, Schema.Top>>, import("foldkit-entity").InputMembers<Entity<string, Readonly<Record<string, Schema.Top>>, {}, {}>, Readonly<Record<string, Schema.Top>>, {}>, import("foldkit-form").ControlsOf<Readonly<Record<string, Control<unknown>>>>>, after: import("foldkit-form").FormModel<Readonly<Record<string, Schema.Top>>, import("foldkit-entity").InputMembers<Entity<string, Readonly<Record<string, Schema.Top>>, {}, {}>, Readonly<Record<string, Schema.Top>>, {}>, import("foldkit-form").ControlsOf<Readonly<Record<string, Control<unknown>>>>>) => boolean;
|
|
512
|
+
value: (model: import("foldkit-form").FormModel<Readonly<Record<string, Schema.Top>>, import("foldkit-entity").InputMembers<Entity<string, Readonly<Record<string, Schema.Top>>, {}, {}>, Readonly<Record<string, Schema.Top>>, {}>, import("foldkit-form").ControlsOf<Readonly<Record<string, Control<unknown>>>>>) => {
|
|
513
|
+
readonly [x: string]: unknown;
|
|
514
|
+
} | undefined;
|
|
515
|
+
};
|
|
516
|
+
};
|
|
517
|
+
/** Every key the form's Schema names, edited or shown. */
|
|
518
|
+
keys: string[];
|
|
519
|
+
/** The props the form does not edit, labelled as its fields are, and as stored: shown, not changed. */
|
|
520
|
+
shown: (stored: Readonly<Record<string, unknown>>) => ReadonlyArray<{
|
|
521
|
+
readonly key: string;
|
|
522
|
+
readonly label: string;
|
|
523
|
+
readonly value: unknown;
|
|
524
|
+
}>;
|
|
525
|
+
/**
|
|
526
|
+
* `model` with the fields `keep` spares filled from a node's stored props.
|
|
527
|
+
* A stored prop that does not decode is shown as it is, with its error.
|
|
528
|
+
*/
|
|
529
|
+
fill: (model: import("foldkit-form").FormModel<Readonly<Record<string, Schema.Top>>, import("foldkit-entity").InputMembers<Entity<string, Readonly<Record<string, Schema.Top>>, {}, {}>, Readonly<Record<string, Schema.Top>>, {}>, import("foldkit-form").ControlsOf<Readonly<Record<string, Control<unknown>>>>>, stored: Readonly<Record<string, unknown>>, keep?: (key: string) => boolean) => import("foldkit-form").FormModel<Readonly<Record<string, Schema.Top>>, import("foldkit-entity").InputMembers<Entity<string, Readonly<Record<string, Schema.Top>>, {}, {}>, Readonly<Record<string, Schema.Top>>, {}>, import("foldkit-form").ControlsOf<Readonly<Record<string, Control<unknown>>>>>;
|
|
530
|
+
/** The form's Model as the Builder's Model holds it: JSON. */
|
|
531
|
+
encode: (model: import("foldkit-form").FormModel<Readonly<Record<string, Schema.Top>>, import("foldkit-entity").InputMembers<Entity<string, Readonly<Record<string, Schema.Top>>, {}, {}>, Readonly<Record<string, Schema.Top>>, {}>, import("foldkit-form").ControlsOf<Readonly<Record<string, Control<unknown>>>>>) => Schema.Json;
|
|
532
|
+
/** A held form Model read back; none if it no longer fits, which a refill then replaces. */
|
|
533
|
+
decode: (held: Schema.Json) => Option.Option<import("foldkit-form").FormModel<Readonly<Record<string, Schema.Top>>, import("foldkit-entity").InputMembers<Entity<string, Readonly<Record<string, Schema.Top>>, {}, {}>, Readonly<Record<string, Schema.Top>>, {}>, import("foldkit-form").ControlsOf<Readonly<Record<string, Control<unknown>>>>>>;
|
|
534
|
+
encodeMessage: (message: {
|
|
535
|
+
readonly _tag: "About";
|
|
536
|
+
readonly subject: {
|
|
537
|
+
readonly [x: string]: string;
|
|
538
|
+
};
|
|
539
|
+
} | {
|
|
540
|
+
readonly _tag: "AskedForMore";
|
|
541
|
+
readonly key: string;
|
|
542
|
+
} | {
|
|
543
|
+
readonly _tag: "Blurred";
|
|
544
|
+
readonly key: string;
|
|
545
|
+
} | {
|
|
546
|
+
readonly _tag: "Changed";
|
|
547
|
+
readonly key: string;
|
|
548
|
+
readonly value: string | boolean | readonly string[];
|
|
549
|
+
} | {
|
|
550
|
+
readonly _tag: "Checked";
|
|
551
|
+
readonly key: string;
|
|
552
|
+
readonly draft: string | boolean | readonly string[];
|
|
553
|
+
readonly values?: unknown;
|
|
554
|
+
readonly subject?: {
|
|
555
|
+
readonly [x: string]: string;
|
|
556
|
+
};
|
|
557
|
+
readonly error: string | null;
|
|
558
|
+
} | {
|
|
559
|
+
readonly _tag: "Control";
|
|
560
|
+
readonly key: never;
|
|
561
|
+
readonly message: unknown;
|
|
562
|
+
} | {
|
|
563
|
+
readonly _tag: "FollowedIssue";
|
|
564
|
+
readonly id: string;
|
|
565
|
+
} | {
|
|
566
|
+
readonly _tag: "Nested";
|
|
567
|
+
readonly key: string;
|
|
568
|
+
readonly row: string;
|
|
569
|
+
readonly message: unknown;
|
|
570
|
+
} | {
|
|
571
|
+
readonly _tag: "Refused";
|
|
572
|
+
readonly key: string;
|
|
573
|
+
readonly error: string;
|
|
574
|
+
readonly value: unknown;
|
|
575
|
+
} | {
|
|
576
|
+
readonly _tag: "Reset";
|
|
577
|
+
} | {
|
|
578
|
+
readonly _tag: "RowAdded";
|
|
579
|
+
readonly key: string;
|
|
580
|
+
} | {
|
|
581
|
+
readonly _tag: "RowRemoved";
|
|
582
|
+
readonly key: string;
|
|
583
|
+
readonly row: string;
|
|
584
|
+
} | {
|
|
585
|
+
readonly _tag: "Searched";
|
|
586
|
+
readonly key: string;
|
|
587
|
+
readonly text: string;
|
|
588
|
+
} | {
|
|
589
|
+
readonly _tag: "Submitted";
|
|
590
|
+
} | {
|
|
591
|
+
readonly _tag: "Toggled";
|
|
592
|
+
readonly key: string;
|
|
593
|
+
readonly choice?: string | undefined;
|
|
594
|
+
} | {
|
|
595
|
+
readonly _tag: "Validated";
|
|
596
|
+
readonly key: string;
|
|
597
|
+
} | {
|
|
598
|
+
readonly _tag: "ValidatedAll";
|
|
599
|
+
}) => Schema.Json;
|
|
600
|
+
decodeMessage: (held: Schema.Json) => Option.Option<{
|
|
601
|
+
readonly _tag: "About";
|
|
602
|
+
readonly subject: {
|
|
603
|
+
readonly [x: string]: string;
|
|
604
|
+
};
|
|
605
|
+
} | {
|
|
606
|
+
readonly _tag: "AskedForMore";
|
|
607
|
+
readonly key: string;
|
|
608
|
+
} | {
|
|
609
|
+
readonly _tag: "Blurred";
|
|
610
|
+
readonly key: string;
|
|
611
|
+
} | {
|
|
612
|
+
readonly _tag: "Changed";
|
|
613
|
+
readonly key: string;
|
|
614
|
+
readonly value: string | boolean | readonly string[];
|
|
615
|
+
} | {
|
|
616
|
+
readonly _tag: "Checked";
|
|
617
|
+
readonly key: string;
|
|
618
|
+
readonly draft: string | boolean | readonly string[];
|
|
619
|
+
readonly values?: unknown;
|
|
620
|
+
readonly subject?: {
|
|
621
|
+
readonly [x: string]: string;
|
|
622
|
+
};
|
|
623
|
+
readonly error: string | null;
|
|
624
|
+
} | {
|
|
625
|
+
readonly _tag: "Control";
|
|
626
|
+
readonly key: never;
|
|
627
|
+
readonly message: unknown;
|
|
628
|
+
} | {
|
|
629
|
+
readonly _tag: "FollowedIssue";
|
|
630
|
+
readonly id: string;
|
|
631
|
+
} | {
|
|
632
|
+
readonly _tag: "Nested";
|
|
633
|
+
readonly key: string;
|
|
634
|
+
readonly row: string;
|
|
635
|
+
readonly message: unknown;
|
|
636
|
+
} | {
|
|
637
|
+
readonly _tag: "Refused";
|
|
638
|
+
readonly key: string;
|
|
639
|
+
readonly error: string;
|
|
640
|
+
readonly value: unknown;
|
|
641
|
+
} | {
|
|
642
|
+
readonly _tag: "Reset";
|
|
643
|
+
} | {
|
|
644
|
+
readonly _tag: "RowAdded";
|
|
645
|
+
readonly key: string;
|
|
646
|
+
} | {
|
|
647
|
+
readonly _tag: "RowRemoved";
|
|
648
|
+
readonly key: string;
|
|
649
|
+
readonly row: string;
|
|
650
|
+
} | {
|
|
651
|
+
readonly _tag: "Searched";
|
|
652
|
+
readonly key: string;
|
|
653
|
+
readonly text: string;
|
|
654
|
+
} | {
|
|
655
|
+
readonly _tag: "Submitted";
|
|
656
|
+
} | {
|
|
657
|
+
readonly _tag: "Toggled";
|
|
658
|
+
readonly key: string;
|
|
659
|
+
readonly choice?: string | undefined;
|
|
660
|
+
} | {
|
|
661
|
+
readonly _tag: "Validated";
|
|
662
|
+
readonly key: string;
|
|
663
|
+
} | {
|
|
664
|
+
readonly _tag: "ValidatedAll";
|
|
665
|
+
}>;
|
|
666
|
+
/**
|
|
667
|
+
* A Message of the Bundle behind `key`'s control (an `Input.bundle`), as the
|
|
668
|
+
* form's own. Built from runtime fields, the form's type names no such key,
|
|
669
|
+
* so it is checked here: a key not edited by one throws.
|
|
670
|
+
*/
|
|
671
|
+
control: (key: string, message: unknown) => {
|
|
672
|
+
readonly _tag: "About";
|
|
673
|
+
readonly subject: {
|
|
674
|
+
readonly [x: string]: string;
|
|
675
|
+
};
|
|
676
|
+
} | {
|
|
677
|
+
readonly _tag: "AskedForMore";
|
|
678
|
+
readonly key: string;
|
|
679
|
+
} | {
|
|
680
|
+
readonly _tag: "Blurred";
|
|
681
|
+
readonly key: string;
|
|
682
|
+
} | {
|
|
683
|
+
readonly _tag: "Changed";
|
|
684
|
+
readonly key: string;
|
|
685
|
+
readonly value: string | boolean | readonly string[];
|
|
686
|
+
} | {
|
|
687
|
+
readonly _tag: "Checked";
|
|
688
|
+
readonly key: string;
|
|
689
|
+
readonly draft: string | boolean | readonly string[];
|
|
690
|
+
readonly values?: unknown;
|
|
691
|
+
readonly subject?: {
|
|
692
|
+
readonly [x: string]: string;
|
|
693
|
+
};
|
|
694
|
+
readonly error: string | null;
|
|
695
|
+
} | {
|
|
696
|
+
readonly _tag: "Control";
|
|
697
|
+
readonly key: never;
|
|
698
|
+
readonly message: unknown;
|
|
699
|
+
} | {
|
|
700
|
+
readonly _tag: "FollowedIssue";
|
|
701
|
+
readonly id: string;
|
|
702
|
+
} | {
|
|
703
|
+
readonly _tag: "Nested";
|
|
704
|
+
readonly key: string;
|
|
705
|
+
readonly row: string;
|
|
706
|
+
readonly message: unknown;
|
|
707
|
+
} | {
|
|
708
|
+
readonly _tag: "Refused";
|
|
709
|
+
readonly key: string;
|
|
710
|
+
readonly error: string;
|
|
711
|
+
readonly value: unknown;
|
|
712
|
+
} | {
|
|
713
|
+
readonly _tag: "Reset";
|
|
714
|
+
} | {
|
|
715
|
+
readonly _tag: "RowAdded";
|
|
716
|
+
readonly key: string;
|
|
717
|
+
} | {
|
|
718
|
+
readonly _tag: "RowRemoved";
|
|
719
|
+
readonly key: string;
|
|
720
|
+
readonly row: string;
|
|
721
|
+
} | {
|
|
722
|
+
readonly _tag: "Searched";
|
|
723
|
+
readonly key: string;
|
|
724
|
+
readonly text: string;
|
|
725
|
+
} | {
|
|
726
|
+
readonly _tag: "Submitted";
|
|
727
|
+
} | {
|
|
728
|
+
readonly _tag: "Toggled";
|
|
729
|
+
readonly key: string;
|
|
730
|
+
readonly choice?: string | undefined;
|
|
731
|
+
} | {
|
|
732
|
+
readonly _tag: "Validated";
|
|
733
|
+
readonly key: string;
|
|
734
|
+
} | {
|
|
735
|
+
readonly _tag: "ValidatedAll";
|
|
736
|
+
};
|
|
737
|
+
/**
|
|
738
|
+
* What a new value starts from, as the Document stores it: each field's
|
|
739
|
+
* empty value where it decodes (`''`, `null`, `false`), else a number's
|
|
740
|
+
* zero or a select's first choice; a field with neither is left out. It is
|
|
741
|
+
* not checked: a zero a number's check refuses, or a field left out, makes
|
|
742
|
+
* a value the Document refuses when it is set.
|
|
743
|
+
*/
|
|
744
|
+
seed: () => Readonly<Record<string, Schema.Json>>;
|
|
745
|
+
/** A value from the form, as the Document stores it; none for a prop the form does not edit. */
|
|
746
|
+
stored: (key: string, value: unknown) => Option.Option<Schema.Json>;
|
|
747
|
+
};
|
|
748
|
+
/** A form over a node's values and the codecs the Builder holds it with. */
|
|
749
|
+
export type Settings = ReturnType<typeof make>;
|
|
750
|
+
/** A Block's props as a form, made at the first use and kept: one per Block. */
|
|
751
|
+
export declare const settingsOf: (block: AnyBlock) => Settings;
|
|
752
|
+
/**
|
|
753
|
+
* The input an event of a Block runs an action with, as a form, made at the
|
|
754
|
+
* first use and kept. One per Block, event and action, so two events of one
|
|
755
|
+
* node that run the same action draw their fields under ids of their own.
|
|
756
|
+
*/
|
|
757
|
+
export declare const inputOf: (block: AnyBlock, event: string, action: CatalogAction) => Settings;
|
|
758
|
+
/** The control a prop is drawn with: the Block's hint, else what its Schema says. */
|
|
759
|
+
export declare const controlOf: (block: AnyBlock, key: string, schema: Schema.Top) => Control | undefined;
|
|
760
|
+
export {};
|
|
761
|
+
//# sourceMappingURL=settings.d.ts.map
|