foldkit-builder 0.2.0 → 0.3.1
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 +665 -1061
- package/dist/index.d.mts.map +1 -1
- package/package.json +16 -16
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Option,
|
|
1
|
+
import { Option, Schema } from "effect";
|
|
2
2
|
import { Bundle } from "foldkit-bundle";
|
|
3
3
|
import { AnyBlock, Catalog, CatalogAction, Document, NodeId, Operation, PropsOf } from "foldkit-composition";
|
|
4
4
|
import { Renderer } from "foldkit-composition/foldkit";
|
|
@@ -6,449 +6,88 @@ import { Control } from "foldkit-form";
|
|
|
6
6
|
import { Entity } from "foldkit-entity";
|
|
7
7
|
import { Metadata } from "foldkit-metadata";
|
|
8
8
|
import { TreeNavigation } from "foldkit-primitives/interaction";
|
|
9
|
-
import {
|
|
10
|
-
import "foldkit/message";
|
|
9
|
+
import { KeyboardModifiers } from "foldkit/html";
|
|
11
10
|
import * as Submodel from "foldkit/submodel";
|
|
12
|
-
|
|
13
|
-
import * as Subscription from "foldkit/subscription";
|
|
14
|
-
import * as Update from "foldkit/update";
|
|
15
|
-
import { CallableTaggedStruct } from "foldkit/schema";
|
|
16
|
-
import "foldkit/url";
|
|
17
|
-
//#region ../bundle/src/placed.d.ts
|
|
18
|
-
declare const PlacedTypeId: unique symbol;
|
|
19
|
-
/**
|
|
20
|
-
* Args for a placement: a static value, or a factory deriving them from the
|
|
21
|
-
* parent seed — the fields `assembly.initial(rest)` was given, before any
|
|
22
|
-
* placement initialised. A factory runs once per initialization and its result
|
|
23
|
-
* is retained for the placement's `init`, `update`, helpers, Subscriptions,
|
|
24
|
-
* and resources; it never re-runs against changing parent state, so keep it
|
|
25
|
-
* pure of its seed.
|
|
26
|
-
*
|
|
27
|
-
* When no initialization ran — a hand-built Model in a test, which never went
|
|
28
|
-
* through `initial` — `update` derives from the given parent per use, without
|
|
29
|
-
* retaining, so each Model is folded with its own seed.
|
|
30
|
-
*
|
|
31
|
-
* Read only seed fields (route, auth, workspace, ...), never sibling
|
|
32
|
-
* placement fields: every factory sees the same base seed, so a sibling read
|
|
33
|
-
* is consistently absent rather than order-dependent.
|
|
34
|
-
*/
|
|
35
|
-
type ArgsSource<Seed, Args> = Args | ((seed: Seed) => Args);
|
|
36
|
-
interface PlaceConfig<Args, Parent, LinkMessage, Message, OutMessage, OutStepMessage, R2, ParentSeed = Parent> {
|
|
37
|
-
/**
|
|
38
|
-
* The bundle's args: a static value, or a factory from the parent seed (the
|
|
39
|
-
* fields `assembly.initial(rest)` was given, minus this placement's own
|
|
40
|
-
* field). A factory is computed once per initialization and retained for
|
|
41
|
-
* `init`, `update`, and helpers. Subscriptions and resources built from it
|
|
42
|
-
* require `initial`/`config` to have run first; a bundle with neither
|
|
43
|
-
* contributes empty records either way.
|
|
44
|
-
*/
|
|
45
|
-
readonly args?: ArgsSource<ParentSeed, Args>;
|
|
46
|
-
/** Handles the child's OutMessage in parent terms, with the child already written back. */
|
|
47
|
-
readonly onOut?: (outMessage: OutMessage, context: Update.FoldContext<Message, LinkMessage>) => Update.Step<NoInfer<Parent>, OutStepMessage, R2>;
|
|
48
|
-
/**
|
|
49
|
-
* Observes each of the child's Messages in parent terms, after the child has
|
|
50
|
-
* handled it and its `onOut` has run, so the parent's own update needs no arm
|
|
51
|
-
* for the wrapper. Helpers are not Messages and do not reach it.
|
|
52
|
-
*/
|
|
53
|
-
readonly onMessage?: (message: Message) => Update.Step<NoInfer<Parent>, OutStepMessage, R2>;
|
|
54
|
-
/** Prefix for the placement's Subscription and resource keys. Defaults to `Name@path`. */
|
|
55
|
-
readonly key?: string;
|
|
56
|
-
/** A gate beside the Link's own: Subscriptions and resources run only while both hold. */
|
|
57
|
-
readonly when?: (parent: Parent) => boolean;
|
|
58
|
-
}
|
|
59
|
-
/** A lifted resource record: each child entry in parent terms, keyed by the placement. */
|
|
60
|
-
type PlacedResources<Parent, ParentMessage, Resources> = Readonly<Record<string, { readonly [K in keyof Resources]: Resources[K] extends ManagedResource.Entry<any, any, infer Requirements, infer Value, infer Service, infer OnAcquired extends (...args: ReadonlyArray<any>) => any> ? ManagedResource.Entry<Parent, ParentMessage, Requirements, Value, Service, (...args: Parameters<OnAcquired>) => ParentMessage> : never; }[keyof Resources]>>;
|
|
61
|
-
type PlacedHelpers<Parent, ParentMessage, R, Helpers> = { readonly [K in keyof Helpers]: Helpers[K] extends ((model: any, ...input: infer Input) => any) ? (...input: Input) => Update.Step<Parent, ParentMessage, R> : never; };
|
|
62
|
-
interface Placed<Name extends string, Parent, ParentMessage, Model, Message, R, S, ViewInputs, Resources, Helpers, Field extends string = string, Claimed extends string = string> {
|
|
63
|
-
readonly [PlacedTypeId]: typeof PlacedTypeId;
|
|
64
|
-
/** Types only: the top-level Model field this placement owns, or `string` when unknown. */
|
|
65
|
-
readonly field?: Field;
|
|
66
|
-
/** Types only: the parent Message tag this placement routes, or `string` when unknown. */
|
|
67
|
-
readonly claims?: Claimed;
|
|
68
|
-
readonly name: Name;
|
|
69
|
-
/** `Name@path`, or the configured `key`: the prefix of every Subscription and resource key. */
|
|
70
|
-
readonly key: string;
|
|
71
|
-
/** The encoded args as text, when the bundle has an args Schema. */
|
|
72
|
-
readonly argsSummary: string | undefined;
|
|
73
|
-
/** Whether `args` was given as a seed factory; resolved once per initialization. */
|
|
74
|
-
readonly hasDynamicArgs: boolean;
|
|
75
|
-
/**
|
|
76
|
-
* Derives the factory's args from `seed`, validates them against the
|
|
77
|
-
* bundle's args Schema, and retains them for `init`, `update`, helpers,
|
|
78
|
-
* Subscriptions, and resources. A no-op for static args. The assembly calls
|
|
79
|
-
* this with the base seed before running inits, so every factory sees the
|
|
80
|
-
* same parent state whatever the placement order.
|
|
81
|
-
*/
|
|
82
|
-
readonly resolveArgs: (seed: unknown) => void;
|
|
83
|
-
/**
|
|
84
|
-
* Assembly use: marks the placement skipped because `rest` provides its
|
|
85
|
-
* top-level field, so its factory never runs and its records contribute
|
|
86
|
-
* nothing while the child is absent. Cleared by the next `resolveArgs`.
|
|
87
|
-
*/
|
|
88
|
-
readonly skipArgs: () => void;
|
|
89
|
-
readonly link: Link<Parent, ParentMessage, Model, Message>;
|
|
90
|
-
/** Writes the child's initial Model and starts its `init` Commands. */
|
|
91
|
-
readonly init: Update.Step<Parent, ParentMessage, R>;
|
|
92
|
-
/** Folds the Message when it belongs to this placement; `None` otherwise. */
|
|
93
|
-
readonly update: (parent: Parent, message: AnyMessage) => Option.Option<Update.Return<Parent, ParentMessage, R>>;
|
|
94
|
-
readonly subscriptions: Subscription.Subscriptions<Parent, ParentMessage, S>;
|
|
95
|
-
readonly resources: PlacedResources<Parent, ParentMessage, Resources>;
|
|
96
|
-
/**
|
|
97
|
-
* Renders the child through `h.submodel`; nothing while the child is absent.
|
|
98
|
-
* Generic over the parent's whole Message, which must include this placement's.
|
|
99
|
-
*/
|
|
100
|
-
readonly view: PlacedView<Parent, ParentMessage, ViewInputs>;
|
|
101
|
-
/**
|
|
102
|
-
* The same view in another slot, for rendering one placement in two DOM
|
|
103
|
-
* positions (desktop and mobile). `h.submodel` throws on a repeated slot.
|
|
104
|
-
*/
|
|
105
|
-
readonly viewIn: (slot: string) => PlacedView<Parent, ParentMessage, ViewInputs>;
|
|
106
|
-
readonly helpers: PlacedHelpers<Parent, ParentMessage, R, Helpers>;
|
|
107
|
-
}
|
|
108
|
-
/**
|
|
109
|
-
* What a placement's view needs of a builder: `submodel`, and `OnClick` to
|
|
110
|
-
* read its Message from. A wrapper of Foldkit's builder that keeps both, such
|
|
111
|
-
* as `foldkit-ssr`'s resumable builder, is one.
|
|
112
|
-
*/
|
|
113
|
-
type BuilderLike = Pick<HtmlBuilder<any>, 'submodel' | 'OnClick'>;
|
|
114
|
-
type PlacedView<Parent, ParentMessage, ViewInputs> = [ViewInputs] extends [void] ? <H extends BuilderLike>(parent: Parent, h: ViewBuilder<H, ParentMessage>) => Html : <H extends BuilderLike>(parent: Parent, h: ViewBuilder<H, ParentMessage>, viewInputs: ViewInputs) => Html;
|
|
115
|
-
/** A readable type error: intersected onto a parameter, its message names the fix. */
|
|
116
|
-
interface Invalid<Message extends string> {
|
|
117
|
-
readonly invalid: Message;
|
|
118
|
-
}
|
|
119
|
-
type BuilderMessage<H> = H extends {
|
|
120
|
-
readonly OnClick: (message: infer M, ...rest: any) => any;
|
|
121
|
-
} ? M : never;
|
|
122
|
-
/**
|
|
123
|
-
* The parent's `h`, checked to accept this placement's Messages. Generic over the
|
|
124
|
-
* whole builder rather than its Message: inferring a Message through
|
|
125
|
-
* `HtmlBuilder` costs thousands of type instantiations per call, while the
|
|
126
|
-
* builder infers as itself and its Message is extracted once per builder type.
|
|
127
|
-
*/
|
|
128
|
-
type ViewBuilder<H, ParentMessage> = H & ([ParentMessage] extends [BuilderMessage<H>] ? unknown : Invalid<"The parent Message does not include this placement's wrapper variant; spread its Link.wrapper(...).cases into defineMessageUnion">);
|
|
129
|
-
/** The tag of a Link's parent variant, or `string` when it cannot be read. */
|
|
130
|
-
type TagOf<LinkMessage> = LinkMessage extends {
|
|
131
|
-
readonly _tag: infer Tag extends string;
|
|
132
|
-
} ? Tag : string;
|
|
133
|
-
//#endregion
|
|
134
|
-
//#region ../bundle/src/link.d.ts
|
|
135
|
-
declare const LinkTypeId: unique symbol;
|
|
136
|
-
/** The parent Message variant `Tag({ message })` that carries a child's Messages. */
|
|
137
|
-
type Wrapped<Tag extends string, ChildMessage> = {
|
|
138
|
-
readonly _tag: Tag;
|
|
139
|
-
readonly message: ChildMessage;
|
|
140
|
-
};
|
|
141
|
-
/**
|
|
142
|
-
* Both directions between a child Message and its parent variant. Spread
|
|
143
|
-
* `cases` into the parent's `defineMessageUnion` so the variant is part of the
|
|
144
|
-
* parent Message.
|
|
145
|
-
*/
|
|
146
|
-
interface Wrapper<Tag extends string, ChildMessage> {
|
|
147
|
-
readonly tag: Tag;
|
|
148
|
-
readonly Schema: CallableTaggedStruct<Tag, {
|
|
149
|
-
readonly message: Schema.Codec<ChildMessage, unknown>;
|
|
150
|
-
}>;
|
|
151
|
-
readonly cases: { readonly [K in Tag]: {
|
|
152
|
-
readonly message: Schema.Codec<ChildMessage, unknown>;
|
|
153
|
-
}; };
|
|
154
|
-
readonly make: (message: ChildMessage) => Wrapped<Tag, ChildMessage>;
|
|
155
|
-
readonly toParentMessage: (message: ChildMessage) => Wrapped<Tag, ChildMessage>;
|
|
156
|
-
readonly fromParentMessage: (message: AnyMessage) => Option.Option<ChildMessage>;
|
|
157
|
-
}
|
|
158
|
-
/** Every Foldkit Message is tagged; routing only needs the tag. */
|
|
159
|
-
type AnyMessage = {
|
|
160
|
-
readonly _tag: string;
|
|
161
|
-
};
|
|
162
|
-
/**
|
|
163
|
-
* `Field` is the parent's top-level field the child is written into, when the
|
|
164
|
-
* Link is one: `never` for a child nested deeper, and `string` when unknown.
|
|
165
|
-
*/
|
|
166
|
-
interface Link<Parent, ParentMessage, Child, ChildMessage, Field extends string = string> extends Pipeable.Pipeable {
|
|
167
|
-
readonly [LinkTypeId]: typeof LinkTypeId;
|
|
168
|
-
/** Types only: the top-level field, so `placements.initial` knows who writes it. */
|
|
169
|
-
readonly field?: Field;
|
|
170
|
-
readonly read: (parent: Parent) => Option.Option<Child>;
|
|
171
|
-
readonly write: (parent: Parent, child: Child) => Parent;
|
|
172
|
-
readonly toParentMessage: (message: ChildMessage) => ParentMessage;
|
|
173
|
-
/** Recognises this child's variant among all of the parent's Messages. */
|
|
174
|
-
readonly fromParentMessage: (message: AnyMessage) => Option.Option<ChildMessage>;
|
|
175
|
-
/** The parent's own gate: while it returns `false`, the child's Subscriptions and resources stop. */
|
|
176
|
-
readonly when: Option.Option<(parent: Parent) => boolean>;
|
|
177
|
-
/** Where the child lives, for placement keys and diagnostics. */
|
|
178
|
-
readonly path: ReadonlyArray<string>;
|
|
179
|
-
/** The parent Message tags this link's Messages travel under, outermost first. */
|
|
180
|
-
readonly messages: ReadonlyArray<string>;
|
|
181
|
-
/** The application a Link built from a Surface field ref belongs to, for its Module contract. */
|
|
182
|
-
readonly owner?: object | undefined;
|
|
183
|
-
}
|
|
184
|
-
/** A Message union's variant `Tag({ message })`, as `defineMessageUnion` declares it. */
|
|
185
|
-
type Variant = {
|
|
186
|
-
readonly fields: {
|
|
187
|
-
readonly _tag: Schema.tag<string>;
|
|
188
|
-
readonly message: Schema.Top;
|
|
189
|
-
};
|
|
190
|
-
};
|
|
191
|
-
type VariantTag<V extends Variant> = V['fields']['_tag'] extends Schema.tag<infer Tag extends string> ? Tag : never;
|
|
192
|
-
type OnlyMessage<V extends Variant> = [Exclude<keyof V['fields'], '_tag' | 'message'>] extends [never] ? unknown : Invalid<'A wrapper variant carries only `message`; this variant has other fields'>;
|
|
193
|
-
/**
|
|
194
|
-
* The parent variant `Tag({ message })` for a child's Messages: from a tag and
|
|
195
|
-
* the child's Message Schema, whose `cases` then go into the parent's union, or
|
|
196
|
-
* from a variant the parent's union already declares.
|
|
197
|
-
*/
|
|
198
|
-
declare function wrapper<const Tag extends string, ChildMessage>(tag: Tag, childMessage: Schema.Codec<ChildMessage, unknown>): Wrapper<Tag, ChildMessage>;
|
|
199
|
-
declare function wrapper<V extends Variant>(variant: V & OnlyMessage<V>): Wrapper<VariantTag<V>, V['fields']['message']['Type']>;
|
|
200
|
-
interface MakeConfig<Parent, Tag extends string, Child, ChildMessage, Path> {
|
|
201
|
-
readonly read: (parent: Parent) => Option.Option<Child>;
|
|
202
|
-
readonly write: (parent: Parent, child: Child) => Parent;
|
|
203
|
-
readonly wrapper: Wrapper<Tag, ChildMessage>;
|
|
204
|
-
readonly when?: (parent: Parent) => boolean;
|
|
205
|
-
readonly path: Path;
|
|
206
|
-
readonly owner?: object | undefined;
|
|
207
|
-
}
|
|
208
|
-
/**
|
|
209
|
-
* The top-level field a path names. `initial` treats a one-segment path as the
|
|
210
|
-
* field the placement writes, so a longer one names none.
|
|
211
|
-
*/
|
|
212
|
-
type FieldOfPath<Path> = Path extends readonly [infer Field extends string] ? Field : Path extends readonly [string, ...ReadonlyArray<string>] ? never : string;
|
|
213
|
-
type OptionKeys<Parent> = { [K in keyof Parent]: Parent[K] extends Option.Option<unknown> ? K : never; }[keyof Parent] & string;
|
|
214
|
-
type OptionValue<A> = A extends Option.Option<infer Value> ? Value : never;
|
|
215
|
-
/** The parent Message variant `Tag({ key, message })` that carries one collection item's Messages. */
|
|
216
|
-
type KeyedWrapped<Tag extends string, ChildMessage, Key extends string = string> = {
|
|
217
|
-
readonly _tag: Tag;
|
|
218
|
-
readonly key: Key;
|
|
219
|
-
readonly message: ChildMessage;
|
|
220
|
-
};
|
|
221
|
-
type KeyedFields<ChildMessage, Key extends string> = {
|
|
222
|
-
readonly key: Schema.Codec<Key, string>;
|
|
223
|
-
readonly message: Schema.Codec<ChildMessage, unknown>;
|
|
224
|
-
};
|
|
225
|
-
/** Both directions between an item's Message and its keyed parent variant. */
|
|
226
|
-
interface KeyedWrapper<Tag extends string, ChildMessage, Key extends string = string> {
|
|
227
|
-
readonly tag: Tag;
|
|
228
|
-
readonly Schema: CallableTaggedStruct<Tag, KeyedFields<ChildMessage, Key>>;
|
|
229
|
-
readonly cases: { readonly [K in Tag]: KeyedFields<ChildMessage, Key>; };
|
|
230
|
-
readonly make: (key: Key, message: ChildMessage) => KeyedWrapped<Tag, ChildMessage, Key>;
|
|
231
|
-
readonly fromParentMessage: (message: AnyMessage) => Option.Option<readonly [key: Key, message: ChildMessage]>;
|
|
232
|
-
}
|
|
233
|
-
/**
|
|
234
|
-
* Where a keyed collection of children lives. The storage is the Link's
|
|
235
|
-
* business: a record by key, an array identified by id, or anything with these
|
|
236
|
-
* operations. `entries` is the order views and Subscriptions follow.
|
|
237
|
-
*/
|
|
238
|
-
interface CollectionLink<Parent, ParentMessage, Child, ChildMessage, Key extends string = string, Field extends string = string> {
|
|
239
|
-
/** Types only: the top-level field holding the items, or `string` when unknown. */
|
|
240
|
-
readonly field?: Field;
|
|
241
|
-
/** The storage with no items, for a parent's initial Model. */
|
|
242
|
-
readonly empty: unknown;
|
|
243
|
-
readonly entries: (parent: Parent) => ReadonlyArray<readonly [key: Key, child: Child]>;
|
|
244
|
-
readonly get: (parent: Parent, key: Key) => Option.Option<Child>;
|
|
245
|
-
/** Writes one item; `None` removes it. */
|
|
246
|
-
readonly write: (parent: Parent, key: Key, child: Option.Option<Child>) => Parent;
|
|
247
|
-
readonly toParentMessage: (key: Key, message: ChildMessage) => ParentMessage;
|
|
248
|
-
readonly fromParentMessage: (message: AnyMessage) => Option.Option<readonly [key: Key, message: ChildMessage]>;
|
|
249
|
-
/** The parent's gate per item: while it returns `false`, that item's Subscriptions stop. */
|
|
250
|
-
readonly when: Option.Option<(parent: Parent, key: Key) => boolean>;
|
|
251
|
-
readonly path: ReadonlyArray<string>;
|
|
252
|
-
/** The parent Message tag this collection's Messages travel under. */
|
|
253
|
-
readonly messages: ReadonlyArray<string>;
|
|
254
|
-
}
|
|
255
|
-
type RecordKeys<Parent> = { [K in keyof Parent]: Parent[K] extends Readonly<Record<string, unknown>> ? K : never; }[keyof Parent] & string;
|
|
256
|
-
type RecordValue<A> = A extends Readonly<Record<string, infer Value>> ? Value : never;
|
|
257
|
-
type ArrayKeys<Parent> = { [K in keyof Parent]: Parent[K] extends ReadonlyArray<unknown> ? K : never; }[keyof Parent] & string;
|
|
258
|
-
type ArrayItem<A> = A extends ReadonlyArray<infer Item> ? Item : never;
|
|
259
|
-
declare const Link: {
|
|
260
|
-
readonly wrapper: typeof wrapper;
|
|
261
|
-
readonly make: <Parent, const Tag extends string, Child, ChildMessage, const Path extends ReadonlyArray<string> = readonly string[]>(config: MakeConfig<Parent, Tag, Child, ChildMessage, Path>) => Link<Parent, Wrapped<Tag, ChildMessage>, Child, ChildMessage, FieldOfPath<Path>>;
|
|
262
|
-
readonly field: <Parent>() => <const Key extends keyof Parent & string, const Tag extends string, ChildMessage>(key: Key, wrap: Wrapper<Tag, ChildMessage>, options?: {
|
|
263
|
-
readonly when?: (parent: Parent) => boolean;
|
|
264
|
-
}) => Link<Parent, Wrapped<Tag, ChildMessage>, Parent[Key], ChildMessage, Key>;
|
|
265
|
-
readonly optional: <Parent>() => <const Key extends OptionKeys<Parent>, const Tag extends string, ChildMessage>(key: Key, wrap: Wrapper<Tag, ChildMessage>, options?: {
|
|
266
|
-
readonly when?: (parent: Parent) => boolean;
|
|
267
|
-
}) => Link<Parent, Wrapped<Tag, ChildMessage>, OptionValue<Parent[Key]>, ChildMessage, Key>;
|
|
268
|
-
readonly compose: <A, AMessage, B, BMessage extends AnyMessage, C, CMessage>(outer: Link<A, AMessage, B, BMessage, string>, inner: Link<B, BMessage, C, CMessage, string>) => Link<A, AMessage, C, CMessage, never>;
|
|
269
|
-
readonly andThen: {
|
|
270
|
-
<B, BMessage extends AnyMessage, C, CMessage>(inner: Link<B, BMessage, C, CMessage, string>): <A, AMessage>(outer: Link<A, AMessage, B, BMessage, string>) => Link<A, AMessage, C, CMessage, never>;
|
|
271
|
-
<A, AMessage, B, BMessage extends AnyMessage, C, CMessage>(outer: Link<A, AMessage, B, BMessage, string>, inner: Link<B, BMessage, C, CMessage, string>): Link<A, AMessage, C, CMessage, never>;
|
|
272
|
-
};
|
|
273
|
-
readonly when: {
|
|
274
|
-
<Parent>(predicate: (parent: Parent) => boolean): <ParentMessage, Child, ChildMessage, Field extends string>(self: Link<Parent, ParentMessage, Child, ChildMessage, Field>) => Link<Parent, ParentMessage, Child, ChildMessage, Field>;
|
|
275
|
-
<Parent, ParentMessage, Child, ChildMessage, Field extends string>(self: Link<Parent, ParentMessage, Child, ChildMessage, Field>, predicate: (parent: Parent) => boolean): Link<Parent, ParentMessage, Child, ChildMessage, Field>;
|
|
276
|
-
};
|
|
277
|
-
readonly foldInit: <Parent, ParentMessage, Child, ChildMessage, Field extends string>(link: Link<Parent, ParentMessage, Child, ChildMessage, Field>, rest: Omit<Parent, Field>) => {
|
|
278
|
-
readonly toParentModel: (child: Child) => Parent;
|
|
279
|
-
readonly toParentMessage: (message: ChildMessage) => ParentMessage;
|
|
280
|
-
};
|
|
281
|
-
readonly keyedWrapper: <const Tag extends string, ChildMessage, Key extends string = string>(tag: Tag, childMessage: Schema.Codec<ChildMessage, unknown>, key?: Schema.Codec<Key, string>) => KeyedWrapper<Tag, ChildMessage, Key>;
|
|
282
|
-
readonly collection: <Parent>() => <const Field extends RecordKeys<Parent>, const Tag extends string, ChildMessage, Key extends string>(field: Field, wrap: KeyedWrapper<Tag, ChildMessage, Key>, options?: {
|
|
283
|
-
readonly when?: (parent: Parent, key: Key) => boolean;
|
|
284
|
-
}) => CollectionLink<Parent, KeyedWrapped<Tag, ChildMessage, Key>, RecordValue<Parent[Field]>, ChildMessage, Key, Field>;
|
|
285
|
-
readonly collectionById: <Parent>() => <const Field extends ArrayKeys<Parent>, const Tag extends string, ChildMessage, Key extends string>(field: Field, wrap: KeyedWrapper<Tag, ChildMessage, Key>, options: {
|
|
286
|
-
readonly id: (item: ArrayItem<Parent[Field]>) => Key;
|
|
287
|
-
readonly when?: (parent: Parent, key: Key) => boolean;
|
|
288
|
-
}) => CollectionLink<Parent, KeyedWrapped<Tag, ChildMessage, Key>, ArrayItem<Parent[Field]>, ChildMessage, Key, Field>;
|
|
289
|
-
readonly child: <Parent, ParentMessage, Child, ChildMessage, Services>(link: Link<Parent, ParentMessage, Child, ChildMessage, string>, update: (model: Child, message: ChildMessage) => Update.Return<Child, ChildMessage, Services>, view: (model: Child, h: HtmlBuilder<ChildMessage>) => Html, slotId: string) => {
|
|
290
|
-
readonly update: (parent: Parent, message: ChildMessage) => Update.Return<Parent, ParentMessage, Services>;
|
|
291
|
-
readonly view: PlacedView<Parent, ParentMessage, void>;
|
|
292
|
-
};
|
|
293
|
-
};
|
|
294
|
-
//#endregion
|
|
295
|
-
//#region ../bundle/src/collection.d.ts
|
|
296
|
-
declare const PlacedCollectionTypeId: unique symbol;
|
|
297
|
-
interface EachConfig<Args, Parent, LinkMessage, Message, OutMessage, OutStepMessage, R2, Key extends string = string, ParentSeed = Parent> {
|
|
298
|
-
/**
|
|
299
|
-
* The args every item's `init` and `update` receive: a static value, or a
|
|
300
|
-
* factory from the parent seed, computed once per initialization and
|
|
301
|
-
* retained. Adding items requires `initial`/`config` to have run; `update`
|
|
302
|
-
* on a Model no initialization produced derives per use instead.
|
|
303
|
-
*/
|
|
304
|
-
readonly args?: ArgsSource<ParentSeed, Args>;
|
|
305
|
-
/** Handles an item's OutMessage in parent terms, with the item already written back. */
|
|
306
|
-
readonly onOut?: (outMessage: OutMessage, key: Key, context: Update.FoldContext<Message, LinkMessage>) => Update.Step<NoInfer<Parent>, OutStepMessage, R2>;
|
|
307
|
-
/** Observes each item's Messages in parent terms, after the item has handled it and its `onOut` has run. */
|
|
308
|
-
readonly onMessage?: (message: Message, key: Key) => Update.Step<NoInfer<Parent>, OutStepMessage, R2>;
|
|
309
|
-
/** Prefix for the collection's Subscription keys. Defaults to `Name@path[]`. */
|
|
310
|
-
readonly key?: string;
|
|
311
|
-
readonly when?: (parent: Parent, key: Key) => boolean;
|
|
312
|
-
}
|
|
313
|
-
type CollectionView<Parent, ParentMessage, ViewInputs, Key extends string = string> = [ViewInputs] extends [void] ? <H extends BuilderLike>(parent: Parent, h: ViewBuilder<H, ParentMessage>, key: Key) => Html : <H extends BuilderLike>(parent: Parent, h: ViewBuilder<H, ParentMessage>, key: Key, viewInputs: ViewInputs) => Html;
|
|
314
|
-
type CollectionHelpers<Parent, ParentMessage, R, Helpers, Key extends string = string> = { readonly [K in keyof Helpers]: Helpers[K] extends ((model: any, ...input: infer Input) => any) ? (key: Key, ...input: Input) => Update.Step<Parent, ParentMessage, R> : never; };
|
|
315
|
-
interface PlacedCollection<Name extends string, Parent, ParentMessage, Model, Message, R, S, ViewInputs, Helpers, Field extends string = string, Key extends string = string, Claimed extends string = string> {
|
|
316
|
-
readonly [PlacedCollectionTypeId]: typeof PlacedCollectionTypeId;
|
|
317
|
-
/** Types only: the record field this collection owns, or `string` when unknown. */
|
|
318
|
-
readonly field?: Field;
|
|
319
|
-
/** Types only: the parent Message tag this collection routes, or `string` when unknown. */
|
|
320
|
-
readonly claims?: Claimed;
|
|
321
|
-
readonly name: Name;
|
|
322
|
-
/** `Name@path[]`, or the configured `key`: the prefix of every Subscription key. */
|
|
323
|
-
readonly key: string;
|
|
324
|
-
/** The encoded args as text, when the bundle has an args Schema. */
|
|
325
|
-
readonly argsSummary: string | undefined;
|
|
326
|
-
/** Whether `args` was given as a seed factory; resolved once per initialization. */
|
|
327
|
-
readonly hasDynamicArgs: boolean;
|
|
328
|
-
/**
|
|
329
|
-
* Derives the factory's args from `seed` and retains them for `add`,
|
|
330
|
-
* `update`, and Subscriptions. A no-op for static args.
|
|
331
|
-
*/
|
|
332
|
-
readonly resolveArgs: (seed: unknown) => void;
|
|
333
|
-
readonly link: CollectionLink<Parent, ParentMessage, Model, Message, Key>;
|
|
334
|
-
/** Folds the Message into its item; `None` when it is not this collection's. A missing key leaves the parent unchanged. */
|
|
335
|
-
readonly update: (parent: Parent, message: AnyMessage) => Option.Option<Update.Return<Parent, ParentMessage, R>>;
|
|
336
|
-
/**
|
|
337
|
-
* Writes a new item from `init` and starts its Commands. `prepare` adjusts the
|
|
338
|
-
* initial Model first, for what only the parent knows, such as the item's id.
|
|
339
|
-
* An existing item is replaced.
|
|
340
|
-
*/
|
|
341
|
-
readonly add: (key: Key, prepare?: (model: Model) => Model) => Update.Step<Parent, ParentMessage, R>;
|
|
342
|
-
/** Removes an item; its Subscriptions stop with it, and later Messages for it are ignored. */
|
|
343
|
-
readonly remove: (key: Key) => Update.Step<Parent, ParentMessage, never>;
|
|
344
|
-
readonly subscriptions: Subscription.Subscriptions<Parent, ParentMessage, S>;
|
|
345
|
-
/** One item's view; nothing when the key is missing. */
|
|
346
|
-
readonly view: CollectionView<Parent, ParentMessage, ViewInputs, Key>;
|
|
347
|
-
/** Every item's view, in the order of the Link's `entries`. */
|
|
348
|
-
readonly viewAll: <H extends BuilderLike>(parent: Parent, h: ViewBuilder<H, ParentMessage>, ...viewInputs: [ViewInputs] extends [void] ? [] : [viewInputs: ViewInputs]) => ReadonlyArray<Html>;
|
|
349
|
-
readonly helpers: CollectionHelpers<Parent, ParentMessage, R, Helpers, Key>;
|
|
350
|
-
}
|
|
351
|
-
//#endregion
|
|
352
|
-
//#region ../bundle/src/bundle.d.ts
|
|
353
|
-
/**
|
|
354
|
-
* The parent seed a factory observes: the parent without the placement's own
|
|
355
|
-
* field, or the whole parent where the field is unknown (`string`).
|
|
356
|
-
*/
|
|
357
|
-
type SeedFor<Parent, Field extends string> = string extends Field ? Parent : Omit<Parent, Field>;
|
|
358
|
-
declare const BundleTypeId: unique symbol;
|
|
359
|
-
/** A child Managed Resource entry: its requirements are an `Option`, so the entry can release. */
|
|
360
|
-
type ResourceEntry<Model, Message> = ManagedResource.Entry<Model, Message, Option.Option<any>, any, any>;
|
|
361
|
-
type ResourceEntries<Model, Message> = Readonly<Record<string, ResourceEntry<Model, Message>>>;
|
|
362
|
-
/** A programmatic entry point, like `Dialog.open`: the child Model plus any input. */
|
|
363
|
-
type Helper<Model, Message, OutMessage, R> = (model: Model, ...input: ReadonlyArray<any>) => Update.ReturnWithOutMessage<Model, Message, OutMessage, R>;
|
|
364
|
-
interface BundleSpec<Name extends string, Args, Model, Message extends AnyMessage, OutMessage, R, S, ViewInputs, Resources extends ResourceEntries<Model, Message>, Helpers extends Readonly<Record<string, Helper<Model, Message, OutMessage, R>>>> {
|
|
365
|
-
readonly name: Name;
|
|
366
|
-
readonly Model: Schema.Codec<Model, unknown>;
|
|
367
|
-
readonly Message: Schema.Codec<Message, unknown>;
|
|
368
|
-
/**
|
|
369
|
-
* The args Schema. When given, `Args` is inferred from it, a placement's args
|
|
370
|
-
* are checked against it, and Module lists them.
|
|
371
|
-
*/
|
|
372
|
-
readonly args?: Schema.Codec<Args, unknown>;
|
|
373
|
-
/** Set by `with`: the bound args, encoded as text, for Module. */
|
|
374
|
-
readonly preset?: string | undefined;
|
|
375
|
-
/** Runs when the bundle is placed; its Commands start with the placement. */
|
|
376
|
-
readonly init: (args: Args) => Update.Return<Model, Message, R>;
|
|
377
|
-
readonly update: (model: Model, message: Message, args: Args) => Update.ReturnWithOutMessage<Model, Message, OutMessage, R>;
|
|
378
|
-
readonly subscriptions?: (args: Args) => Subscription.Subscriptions<Model, Message, S>;
|
|
379
|
-
readonly resources?: (args: Args) => Resources;
|
|
380
|
-
readonly view?: Submodel.View<Model, Message, ViewInputs>;
|
|
381
|
-
readonly helpers?: Helpers;
|
|
382
|
-
}
|
|
383
|
-
interface Bundle$1<Name extends string, Args, Model, Message extends AnyMessage, OutMessage, R, S, ViewInputs, Resources extends ResourceEntries<Model, Message>, Helpers extends Readonly<Record<string, Helper<Model, Message, OutMessage, R>>>> extends BundleSpec<Name, Args, Model, Message, OutMessage, R, S, ViewInputs, Resources, Helpers>, Pipeable.Pipeable {
|
|
384
|
-
readonly [BundleTypeId]: typeof BundleTypeId;
|
|
385
|
-
/**
|
|
386
|
-
* A preset: the same bundle with its args bound, so placements need no `args`.
|
|
387
|
-
* The args are checked against the args Schema when there is one.
|
|
388
|
-
*/
|
|
389
|
-
readonly with: (args: Args) => Bundle$1<Name, void, Model, Message, OutMessage, R, S, ViewInputs, Resources, Helpers>;
|
|
390
|
-
/** Places the bundle where `link` points. */
|
|
391
|
-
readonly at: <Parent, LinkMessage, Field extends string, OutStepMessage = never, R2 = never>(link: Link<Parent, LinkMessage, Model, Message, Field>, ...config: PlaceConfigParam<Args, Parent, LinkMessage, Message, OutMessage, OutStepMessage, R2, SeedFor<Parent, Field>>) => Placed<Name, Parent, LinkMessage | OutStepMessage, Model, Message, R | R2, S, ViewInputs, Resources, Helpers, Field, TagOf<LinkMessage>>;
|
|
392
|
-
/** Places the bundle once per key of the collection `link` points at. */
|
|
393
|
-
readonly each: [keyof Resources] extends [never] ? <Parent, LinkMessage, Key extends string, Field extends string, OutStepMessage = never, R2 = never>(link: CollectionLink<Parent, LinkMessage, Model, Message, Key, Field>, ...config: EachConfigParam<Args, Parent, LinkMessage, Message, OutMessage, OutStepMessage, R2, Key, SeedFor<Parent, Field>>) => PlacedCollection<Name, Parent, LinkMessage | OutStepMessage, Model, Message, R | R2, S, ViewInputs, Helpers, Field, Key, TagOf<LinkMessage>> : Invalid<'Bundle.each does not support Managed Resources yet: the runtime provides a resource by one tag, so items would share it'>;
|
|
394
|
-
}
|
|
11
|
+
//#region src/settings.d.ts
|
|
395
12
|
/**
|
|
396
|
-
*
|
|
397
|
-
*
|
|
398
|
-
* `
|
|
399
|
-
*
|
|
400
|
-
* parent where the field is unknown.
|
|
13
|
+
* Block metadata: the control the inspector draws a prop with, where its
|
|
14
|
+
* Schema alone does not say, as
|
|
15
|
+
* `Heading.pipe(Block.annotate(Builder.controls({ text: Input.multiline() })))`.
|
|
16
|
+
* `Input.hidden()` leaves a prop out of the inspector.
|
|
401
17
|
*/
|
|
402
|
-
|
|
403
|
-
/** Prefix for the placement's Subscription and resource keys. Defaults to `Name@path`. */
|
|
404
|
-
readonly key?: string;
|
|
405
|
-
/** A gate beside the Link's own: the child's Subscriptions and resources run only while both hold. */
|
|
406
|
-
readonly when?: (parent: Parent) => boolean;
|
|
407
|
-
/** Observes each of the child's Messages in parent terms, after the child handled it. */
|
|
408
|
-
readonly onMessage?: Required<PlaceConfig<Args, Parent, LinkMessage, Message, OutMessage, OutStepMessage, R2, ParentSeed>>['onMessage'];
|
|
409
|
-
} & ([Args] extends [void] ? {
|
|
410
|
-
readonly args?: never;
|
|
411
|
-
} : {
|
|
412
|
-
readonly args: ArgsSource<ParentSeed, Args>;
|
|
413
|
-
}) & ([OutMessage] extends [never] ? {
|
|
414
|
-
readonly onOut?: never;
|
|
415
|
-
} : {
|
|
416
|
-
readonly onOut: Required<PlaceConfig<Args, Parent, LinkMessage, Message, OutMessage, OutStepMessage, R2, ParentSeed>>['onOut'];
|
|
417
|
-
});
|
|
418
|
-
/** The config argument is optional only when it would be empty. */
|
|
419
|
-
type PlaceConfigParam<Args, Parent, LinkMessage, Message, OutMessage, OutStepMessage, R2, ParentSeed = Parent> = [Args] extends [void] ? [OutMessage] extends [never] ? [config?: PlacementConfig<Args, Parent, LinkMessage, Message, OutMessage, OutStepMessage, R2, ParentSeed>] : [config: PlacementConfig<Args, Parent, LinkMessage, Message, OutMessage, OutStepMessage, R2, ParentSeed>] : [config: PlacementConfig<Args, Parent, LinkMessage, Message, OutMessage, OutStepMessage, R2, ParentSeed>];
|
|
420
|
-
type EachOptions<Args, Parent, LinkMessage, Message, OutMessage, OutStepMessage, R2, Key extends string = string, ParentSeed = Parent> = {
|
|
421
|
-
readonly key?: string;
|
|
422
|
-
/** A gate per item beside the Link's own: an item's Subscriptions run only while both hold. */
|
|
423
|
-
readonly when?: (parent: Parent, key: Key) => boolean;
|
|
424
|
-
/** Observes each item's Messages in parent terms, after the item handled it. */
|
|
425
|
-
readonly onMessage?: Required<EachConfig<Args, Parent, LinkMessage, Message, OutMessage, OutStepMessage, R2, Key, ParentSeed>>['onMessage'];
|
|
426
|
-
} & ([Args] extends [void] ? {
|
|
427
|
-
readonly args?: never;
|
|
428
|
-
} : {
|
|
429
|
-
readonly args: ArgsSource<ParentSeed, Args>;
|
|
430
|
-
}) & ([OutMessage] extends [never] ? {
|
|
431
|
-
readonly onOut?: never;
|
|
432
|
-
} : {
|
|
433
|
-
readonly onOut: Required<EachConfig<Args, Parent, LinkMessage, Message, OutMessage, OutStepMessage, R2, Key, ParentSeed>>['onOut'];
|
|
434
|
-
});
|
|
435
|
-
type EachConfigParam<Args, Parent, LinkMessage, Message, OutMessage, OutStepMessage, R2, Key extends string = string, ParentSeed = Parent> = [Args] extends [void] ? [OutMessage] extends [never] ? [config?: EachOptions<Args, Parent, LinkMessage, Message, OutMessage, OutStepMessage, R2, Key, ParentSeed>] : [config: EachOptions<Args, Parent, LinkMessage, Message, OutMessage, OutStepMessage, R2, Key, ParentSeed>] : [config: EachOptions<Args, Parent, LinkMessage, Message, OutMessage, OutStepMessage, R2, Key, ParentSeed>];
|
|
436
|
-
//#endregion
|
|
437
|
-
//#region src/settings.d.ts
|
|
18
|
+
declare const controls: (given: Readonly<Record<string, Control>>) => Metadata;
|
|
438
19
|
/** A form over `fields`, named `name`, with the controls `hints` asks for. */
|
|
439
20
|
declare const make: (name: string, fields: Readonly<Record<string, Schema.Top>>, hints: Readonly<Record<string, Control>>) => {
|
|
440
21
|
form: {
|
|
441
|
-
|
|
22
|
+
pipe<A>(this: A): A;
|
|
23
|
+
pipe<A, B = never>(this: A, ab: (_: A) => B): B;
|
|
24
|
+
pipe<A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C;
|
|
25
|
+
pipe<A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D;
|
|
26
|
+
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;
|
|
27
|
+
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;
|
|
28
|
+
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;
|
|
29
|
+
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;
|
|
30
|
+
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;
|
|
31
|
+
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;
|
|
32
|
+
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;
|
|
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>(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;
|
|
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>(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;
|
|
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>(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;
|
|
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>(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;
|
|
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>(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;
|
|
38
|
+
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;
|
|
39
|
+
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;
|
|
40
|
+
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;
|
|
41
|
+
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;
|
|
42
|
+
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;
|
|
43
|
+
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;
|
|
44
|
+
name: string;
|
|
45
|
+
options: import("foldkit-form").FormOptions<Readonly<Record<string, Schema.Top>>, {
|
|
46
|
+
readonly [x: string]: import("foldkit-entity").EntityField<string, string, Schema.Top>;
|
|
47
|
+
}, never, {}, Readonly<Record<string, Control<unknown>>>>;
|
|
48
|
+
types: {
|
|
49
|
+
readonly Name: string;
|
|
50
|
+
readonly E: Entity<string, Readonly<Record<string, Schema.Top>>, {}, {}>;
|
|
51
|
+
readonly Fields: Readonly<Record<string, Schema.Top>>;
|
|
52
|
+
readonly Members: {
|
|
53
|
+
readonly [x: string]: import("foldkit-entity").EntityField<string, string, Schema.Top>;
|
|
54
|
+
};
|
|
55
|
+
readonly R: never;
|
|
56
|
+
readonly Nest: {};
|
|
57
|
+
readonly Inputs: Readonly<Record<string, Control<unknown>>>;
|
|
58
|
+
};
|
|
59
|
+
bundle: import("foldkit-bundle").BundleShape<string, void, import("foldkit-form").FormModel<Readonly<Record<string, Schema.Top>>, {
|
|
442
60
|
readonly [x: string]: import("foldkit-entity").EntityField<string, string, Schema.Top>;
|
|
443
61
|
}, import("foldkit-form").ControlsOf<Readonly<Record<string, Control<unknown>>>>>, {
|
|
62
|
+
readonly _tag: "About";
|
|
63
|
+
readonly subject: {
|
|
64
|
+
readonly [x: string]: string;
|
|
65
|
+
};
|
|
66
|
+
} | {
|
|
67
|
+
readonly _tag: "Blurred";
|
|
68
|
+
readonly key: string;
|
|
69
|
+
} | {
|
|
70
|
+
readonly _tag: "Changed";
|
|
71
|
+
readonly key: string;
|
|
72
|
+
readonly value: string | boolean | readonly string[];
|
|
73
|
+
} | {
|
|
74
|
+
readonly _tag: "Checked";
|
|
75
|
+
readonly key: string;
|
|
76
|
+
readonly draft: string | boolean | readonly string[];
|
|
77
|
+
readonly error: string | null;
|
|
78
|
+
} | {
|
|
79
|
+
readonly _tag: "Control";
|
|
80
|
+
readonly key: never;
|
|
81
|
+
readonly message: unknown;
|
|
82
|
+
} | {
|
|
444
83
|
readonly _tag: "Nested";
|
|
445
84
|
readonly key: string;
|
|
446
85
|
readonly row: string;
|
|
447
86
|
readonly message: unknown;
|
|
448
87
|
} | {
|
|
449
|
-
readonly _tag: "
|
|
450
|
-
|
|
451
|
-
readonly
|
|
88
|
+
readonly _tag: "Refused";
|
|
89
|
+
readonly key: string;
|
|
90
|
+
readonly error: string;
|
|
452
91
|
} | {
|
|
453
92
|
readonly _tag: "Reset";
|
|
454
93
|
} | {
|
|
@@ -458,35 +97,14 @@ declare const make: (name: string, fields: Readonly<Record<string, Schema.Top>>,
|
|
|
458
97
|
readonly _tag: "RowRemoved";
|
|
459
98
|
readonly key: string;
|
|
460
99
|
readonly row: string;
|
|
461
|
-
} | {
|
|
462
|
-
readonly _tag: "About";
|
|
463
|
-
readonly subject: {
|
|
464
|
-
readonly [x: string]: string;
|
|
465
|
-
};
|
|
466
|
-
} | {
|
|
467
|
-
readonly _tag: "Changed";
|
|
468
|
-
readonly key: string;
|
|
469
|
-
readonly value: string | boolean | readonly string[];
|
|
470
|
-
} | {
|
|
471
|
-
readonly _tag: "Blurred";
|
|
472
|
-
readonly key: string;
|
|
473
100
|
} | {
|
|
474
101
|
readonly _tag: "Searched";
|
|
475
102
|
readonly key: string;
|
|
476
103
|
readonly text: string;
|
|
477
104
|
} | {
|
|
478
|
-
readonly _tag: "
|
|
479
|
-
readonly key: string;
|
|
480
|
-
readonly draft: string | boolean | readonly string[];
|
|
481
|
-
readonly error: string | null;
|
|
482
|
-
} | {
|
|
483
|
-
readonly _tag: "Refused";
|
|
484
|
-
readonly key: string;
|
|
485
|
-
readonly error: string;
|
|
105
|
+
readonly _tag: "Submitted";
|
|
486
106
|
} | {
|
|
487
|
-
readonly _tag: "
|
|
488
|
-
readonly key: never;
|
|
489
|
-
readonly message: unknown;
|
|
107
|
+
readonly _tag: "ValidatedAll";
|
|
490
108
|
}, import("foldkit-form").Submitted<{
|
|
491
109
|
readonly [x: string]: unknown;
|
|
492
110
|
}>, never, never, void, {}, {
|
|
@@ -544,6 +162,17 @@ declare const make: (name: string, fields: Readonly<Record<string, Schema.Top>>,
|
|
|
544
162
|
row: Schema.String;
|
|
545
163
|
};
|
|
546
164
|
}>;
|
|
165
|
+
Check: import("foldkit/command").CommandDefinitionWithArgs<`${string}.check`, {
|
|
166
|
+
key: Schema.Literals<readonly [string, ...string[]]>;
|
|
167
|
+
draft: Schema.Union<readonly [Schema.String, Schema.Boolean, Schema.$Array<Schema.String>]>;
|
|
168
|
+
values: Schema.Unknown;
|
|
169
|
+
subject: Schema.$Record<Schema.String, Schema.String>;
|
|
170
|
+
}, import("effect/Effect").Effect<{
|
|
171
|
+
readonly _tag: "Checked";
|
|
172
|
+
readonly key: string;
|
|
173
|
+
readonly draft: string | boolean | readonly string[];
|
|
174
|
+
readonly error: string | null;
|
|
175
|
+
}, never, never>>;
|
|
547
176
|
input: import("foldkit-entity").EntityInput<Entity<string, Readonly<Record<string, Schema.Top>>, {}, {}>, Readonly<Record<string, Schema.Top>>, {
|
|
548
177
|
readonly [x: string]: import("foldkit-entity").EntityField<string, string, Schema.Top>;
|
|
549
178
|
}>;
|
|
@@ -568,19 +197,42 @@ declare const make: (name: string, fields: Readonly<Record<string, Schema.Top>>,
|
|
|
568
197
|
field: (model: import("foldkit-form").FormModel<Readonly<Record<string, Schema.Top>>, {
|
|
569
198
|
readonly [x: string]: import("foldkit-entity").EntityField<string, string, Schema.Top>;
|
|
570
199
|
}, import("foldkit-form").ControlsOf<Readonly<Record<string, Control<unknown>>>>>, key: string) => import("foldkit/fieldValidation").Field<import("foldkit-form").Draft>;
|
|
571
|
-
control: <K extends
|
|
200
|
+
control: <K extends keyof import("foldkit-form").ControlsOf<Readonly<Record<string, Control<unknown>>>> & Exclude<string & string, import("foldkit-form").NestedKey<{
|
|
201
|
+
readonly [x: string]: import("foldkit-entity").EntityField<string, string, Schema.Top>;
|
|
202
|
+
}>>>(key: K) => {
|
|
572
203
|
readonly field: (model: import("foldkit-form").FormModel<Readonly<Record<string, Schema.Top>>, {
|
|
573
204
|
readonly [x: string]: import("foldkit-entity").EntityField<string, string, Schema.Top>;
|
|
574
205
|
}, import("foldkit-form").ControlsOf<Readonly<Record<string, Control<unknown>>>>>) => import("foldkit/fieldValidation").Field<string>;
|
|
575
206
|
readonly send: (message: never) => {
|
|
207
|
+
readonly _tag: "About";
|
|
208
|
+
readonly subject: {
|
|
209
|
+
readonly [x: string]: string;
|
|
210
|
+
};
|
|
211
|
+
} | {
|
|
212
|
+
readonly _tag: "Blurred";
|
|
213
|
+
readonly key: string;
|
|
214
|
+
} | {
|
|
215
|
+
readonly _tag: "Changed";
|
|
216
|
+
readonly key: string;
|
|
217
|
+
readonly value: string | boolean | readonly string[];
|
|
218
|
+
} | {
|
|
219
|
+
readonly _tag: "Checked";
|
|
220
|
+
readonly key: string;
|
|
221
|
+
readonly draft: string | boolean | readonly string[];
|
|
222
|
+
readonly error: string | null;
|
|
223
|
+
} | {
|
|
224
|
+
readonly _tag: "Control";
|
|
225
|
+
readonly key: never;
|
|
226
|
+
readonly message: unknown;
|
|
227
|
+
} | {
|
|
576
228
|
readonly _tag: "Nested";
|
|
577
229
|
readonly key: string;
|
|
578
230
|
readonly row: string;
|
|
579
231
|
readonly message: unknown;
|
|
580
232
|
} | {
|
|
581
|
-
readonly _tag: "
|
|
582
|
-
|
|
583
|
-
readonly
|
|
233
|
+
readonly _tag: "Refused";
|
|
234
|
+
readonly key: string;
|
|
235
|
+
readonly error: string;
|
|
584
236
|
} | {
|
|
585
237
|
readonly _tag: "Reset";
|
|
586
238
|
} | {
|
|
@@ -590,35 +242,14 @@ declare const make: (name: string, fields: Readonly<Record<string, Schema.Top>>,
|
|
|
590
242
|
readonly _tag: "RowRemoved";
|
|
591
243
|
readonly key: string;
|
|
592
244
|
readonly row: string;
|
|
593
|
-
} | {
|
|
594
|
-
readonly _tag: "About";
|
|
595
|
-
readonly subject: {
|
|
596
|
-
readonly [x: string]: string;
|
|
597
|
-
};
|
|
598
|
-
} | {
|
|
599
|
-
readonly _tag: "Changed";
|
|
600
|
-
readonly key: string;
|
|
601
|
-
readonly value: string | boolean | readonly string[];
|
|
602
|
-
} | {
|
|
603
|
-
readonly _tag: "Blurred";
|
|
604
|
-
readonly key: string;
|
|
605
245
|
} | {
|
|
606
246
|
readonly _tag: "Searched";
|
|
607
247
|
readonly key: string;
|
|
608
248
|
readonly text: string;
|
|
609
249
|
} | {
|
|
610
|
-
readonly _tag: "
|
|
611
|
-
readonly key: string;
|
|
612
|
-
readonly draft: string | boolean | readonly string[];
|
|
613
|
-
readonly error: string | null;
|
|
614
|
-
} | {
|
|
615
|
-
readonly _tag: "Refused";
|
|
616
|
-
readonly key: string;
|
|
617
|
-
readonly error: string;
|
|
250
|
+
readonly _tag: "Submitted";
|
|
618
251
|
} | {
|
|
619
|
-
readonly _tag: "
|
|
620
|
-
readonly key: never;
|
|
621
|
-
readonly message: unknown;
|
|
252
|
+
readonly _tag: "ValidatedAll";
|
|
622
253
|
};
|
|
623
254
|
};
|
|
624
255
|
search: (model: import("foldkit-form").FormModel<Readonly<Record<string, Schema.Top>>, {
|
|
@@ -628,15 +259,38 @@ declare const make: (name: string, fields: Readonly<Record<string, Schema.Top>>,
|
|
|
628
259
|
readonly [x: string]: import("foldkit-entity").EntityField<string, string, Schema.Top>;
|
|
629
260
|
}, import("foldkit-form").ControlsOf<Readonly<Record<string, Control<unknown>>>>>) => Readonly<Record<string, string>>;
|
|
630
261
|
nested: {};
|
|
631
|
-
row: <K extends
|
|
262
|
+
row: <K extends Extract<string & string, import("foldkit-form").NestedKey<{
|
|
263
|
+
readonly [x: string]: import("foldkit-entity").EntityField<string, string, Schema.Top>;
|
|
264
|
+
}>>>(key: K, row: string) => import("foldkit-form").RowHandle<K extends never ? NonNullable<{}[K]> : import("foldkit-form").NestedForm, {
|
|
265
|
+
readonly _tag: "About";
|
|
266
|
+
readonly subject: {
|
|
267
|
+
readonly [x: string]: string;
|
|
268
|
+
};
|
|
269
|
+
} | {
|
|
270
|
+
readonly _tag: "Blurred";
|
|
271
|
+
readonly key: string;
|
|
272
|
+
} | {
|
|
273
|
+
readonly _tag: "Changed";
|
|
274
|
+
readonly key: string;
|
|
275
|
+
readonly value: string | boolean | readonly string[];
|
|
276
|
+
} | {
|
|
277
|
+
readonly _tag: "Checked";
|
|
278
|
+
readonly key: string;
|
|
279
|
+
readonly draft: string | boolean | readonly string[];
|
|
280
|
+
readonly error: string | null;
|
|
281
|
+
} | {
|
|
282
|
+
readonly _tag: "Control";
|
|
283
|
+
readonly key: never;
|
|
284
|
+
readonly message: unknown;
|
|
285
|
+
} | {
|
|
632
286
|
readonly _tag: "Nested";
|
|
633
287
|
readonly key: string;
|
|
634
288
|
readonly row: string;
|
|
635
289
|
readonly message: unknown;
|
|
636
290
|
} | {
|
|
637
|
-
readonly _tag: "
|
|
638
|
-
|
|
639
|
-
readonly
|
|
291
|
+
readonly _tag: "Refused";
|
|
292
|
+
readonly key: string;
|
|
293
|
+
readonly error: string;
|
|
640
294
|
} | {
|
|
641
295
|
readonly _tag: "Reset";
|
|
642
296
|
} | {
|
|
@@ -646,35 +300,14 @@ declare const make: (name: string, fields: Readonly<Record<string, Schema.Top>>,
|
|
|
646
300
|
readonly _tag: "RowRemoved";
|
|
647
301
|
readonly key: string;
|
|
648
302
|
readonly row: string;
|
|
649
|
-
} | {
|
|
650
|
-
readonly _tag: "About";
|
|
651
|
-
readonly subject: {
|
|
652
|
-
readonly [x: string]: string;
|
|
653
|
-
};
|
|
654
|
-
} | {
|
|
655
|
-
readonly _tag: "Changed";
|
|
656
|
-
readonly key: string;
|
|
657
|
-
readonly value: string | boolean | readonly string[];
|
|
658
|
-
} | {
|
|
659
|
-
readonly _tag: "Blurred";
|
|
660
|
-
readonly key: string;
|
|
661
303
|
} | {
|
|
662
304
|
readonly _tag: "Searched";
|
|
663
305
|
readonly key: string;
|
|
664
306
|
readonly text: string;
|
|
665
307
|
} | {
|
|
666
|
-
readonly _tag: "
|
|
667
|
-
readonly key: string;
|
|
668
|
-
readonly draft: string | boolean | readonly string[];
|
|
669
|
-
readonly error: string | null;
|
|
670
|
-
} | {
|
|
671
|
-
readonly _tag: "Refused";
|
|
672
|
-
readonly key: string;
|
|
673
|
-
readonly error: string;
|
|
308
|
+
readonly _tag: "Submitted";
|
|
674
309
|
} | {
|
|
675
|
-
readonly _tag: "
|
|
676
|
-
readonly key: never;
|
|
677
|
-
readonly message: unknown;
|
|
310
|
+
readonly _tag: "ValidatedAll";
|
|
678
311
|
}>;
|
|
679
312
|
isFollowing: (model: import("foldkit-form").FormModel<Readonly<Record<string, Schema.Top>>, {
|
|
680
313
|
readonly [x: string]: import("foldkit-entity").EntityField<string, string, Schema.Top>;
|
|
@@ -715,14 +348,35 @@ declare const make: (name: string, fields: Readonly<Record<string, Schema.Top>>,
|
|
|
715
348
|
args?: Record<string, unknown>;
|
|
716
349
|
key?: string;
|
|
717
350
|
effect: import("effect/Effect").Effect<{
|
|
351
|
+
readonly _tag: "About";
|
|
352
|
+
readonly subject: {
|
|
353
|
+
readonly [x: string]: string;
|
|
354
|
+
};
|
|
355
|
+
} | {
|
|
356
|
+
readonly _tag: "Blurred";
|
|
357
|
+
readonly key: string;
|
|
358
|
+
} | {
|
|
359
|
+
readonly _tag: "Changed";
|
|
360
|
+
readonly key: string;
|
|
361
|
+
readonly value: string | boolean | readonly string[];
|
|
362
|
+
} | {
|
|
363
|
+
readonly _tag: "Checked";
|
|
364
|
+
readonly key: string;
|
|
365
|
+
readonly draft: string | boolean | readonly string[];
|
|
366
|
+
readonly error: string | null;
|
|
367
|
+
} | {
|
|
368
|
+
readonly _tag: "Control";
|
|
369
|
+
readonly key: never;
|
|
370
|
+
readonly message: unknown;
|
|
371
|
+
} | {
|
|
718
372
|
readonly _tag: "Nested";
|
|
719
373
|
readonly key: string;
|
|
720
374
|
readonly row: string;
|
|
721
375
|
readonly message: unknown;
|
|
722
376
|
} | {
|
|
723
|
-
readonly _tag: "
|
|
724
|
-
|
|
725
|
-
readonly
|
|
377
|
+
readonly _tag: "Refused";
|
|
378
|
+
readonly key: string;
|
|
379
|
+
readonly error: string;
|
|
726
380
|
} | {
|
|
727
381
|
readonly _tag: "Reset";
|
|
728
382
|
} | {
|
|
@@ -732,35 +386,14 @@ declare const make: (name: string, fields: Readonly<Record<string, Schema.Top>>,
|
|
|
732
386
|
readonly _tag: "RowRemoved";
|
|
733
387
|
readonly key: string;
|
|
734
388
|
readonly row: string;
|
|
735
|
-
} | {
|
|
736
|
-
readonly _tag: "About";
|
|
737
|
-
readonly subject: {
|
|
738
|
-
readonly [x: string]: string;
|
|
739
|
-
};
|
|
740
|
-
} | {
|
|
741
|
-
readonly _tag: "Changed";
|
|
742
|
-
readonly key: string;
|
|
743
|
-
readonly value: string | boolean | readonly string[];
|
|
744
|
-
} | {
|
|
745
|
-
readonly _tag: "Blurred";
|
|
746
|
-
readonly key: string;
|
|
747
389
|
} | {
|
|
748
390
|
readonly _tag: "Searched";
|
|
749
391
|
readonly key: string;
|
|
750
392
|
readonly text: string;
|
|
751
393
|
} | {
|
|
752
|
-
readonly _tag: "
|
|
753
|
-
readonly key: string;
|
|
754
|
-
readonly draft: string | boolean | readonly string[];
|
|
755
|
-
readonly error: string | null;
|
|
756
|
-
} | {
|
|
757
|
-
readonly _tag: "Refused";
|
|
758
|
-
readonly key: string;
|
|
759
|
-
readonly error: string;
|
|
394
|
+
readonly _tag: "Submitted";
|
|
760
395
|
} | {
|
|
761
|
-
readonly _tag: "
|
|
762
|
-
readonly key: never;
|
|
763
|
-
readonly message: unknown;
|
|
396
|
+
readonly _tag: "ValidatedAll";
|
|
764
397
|
}, never, never>;
|
|
765
398
|
}>[];
|
|
766
399
|
};
|
|
@@ -775,14 +408,35 @@ declare const make: (name: string, fields: Readonly<Record<string, Schema.Top>>,
|
|
|
775
408
|
args?: Record<string, unknown>;
|
|
776
409
|
key?: string;
|
|
777
410
|
effect: import("effect/Effect").Effect<{
|
|
411
|
+
readonly _tag: "About";
|
|
412
|
+
readonly subject: {
|
|
413
|
+
readonly [x: string]: string;
|
|
414
|
+
};
|
|
415
|
+
} | {
|
|
416
|
+
readonly _tag: "Blurred";
|
|
417
|
+
readonly key: string;
|
|
418
|
+
} | {
|
|
419
|
+
readonly _tag: "Changed";
|
|
420
|
+
readonly key: string;
|
|
421
|
+
readonly value: string | boolean | readonly string[];
|
|
422
|
+
} | {
|
|
423
|
+
readonly _tag: "Checked";
|
|
424
|
+
readonly key: string;
|
|
425
|
+
readonly draft: string | boolean | readonly string[];
|
|
426
|
+
readonly error: string | null;
|
|
427
|
+
} | {
|
|
428
|
+
readonly _tag: "Control";
|
|
429
|
+
readonly key: never;
|
|
430
|
+
readonly message: unknown;
|
|
431
|
+
} | {
|
|
778
432
|
readonly _tag: "Nested";
|
|
779
433
|
readonly key: string;
|
|
780
434
|
readonly row: string;
|
|
781
435
|
readonly message: unknown;
|
|
782
436
|
} | {
|
|
783
|
-
readonly _tag: "
|
|
784
|
-
|
|
785
|
-
readonly
|
|
437
|
+
readonly _tag: "Refused";
|
|
438
|
+
readonly key: string;
|
|
439
|
+
readonly error: string;
|
|
786
440
|
} | {
|
|
787
441
|
readonly _tag: "Reset";
|
|
788
442
|
} | {
|
|
@@ -792,35 +446,14 @@ declare const make: (name: string, fields: Readonly<Record<string, Schema.Top>>,
|
|
|
792
446
|
readonly _tag: "RowRemoved";
|
|
793
447
|
readonly key: string;
|
|
794
448
|
readonly row: string;
|
|
795
|
-
} | {
|
|
796
|
-
readonly _tag: "About";
|
|
797
|
-
readonly subject: {
|
|
798
|
-
readonly [x: string]: string;
|
|
799
|
-
};
|
|
800
|
-
} | {
|
|
801
|
-
readonly _tag: "Changed";
|
|
802
|
-
readonly key: string;
|
|
803
|
-
readonly value: string | boolean | readonly string[];
|
|
804
|
-
} | {
|
|
805
|
-
readonly _tag: "Blurred";
|
|
806
|
-
readonly key: string;
|
|
807
449
|
} | {
|
|
808
450
|
readonly _tag: "Searched";
|
|
809
451
|
readonly key: string;
|
|
810
452
|
readonly text: string;
|
|
811
453
|
} | {
|
|
812
|
-
readonly _tag: "
|
|
813
|
-
readonly key: string;
|
|
814
|
-
readonly draft: string | boolean | readonly string[];
|
|
815
|
-
readonly error: string | null;
|
|
816
|
-
} | {
|
|
817
|
-
readonly _tag: "Refused";
|
|
818
|
-
readonly key: string;
|
|
819
|
-
readonly error: string;
|
|
454
|
+
readonly _tag: "Submitted";
|
|
820
455
|
} | {
|
|
821
|
-
readonly _tag: "
|
|
822
|
-
readonly key: never;
|
|
823
|
-
readonly message: unknown;
|
|
456
|
+
readonly _tag: "ValidatedAll";
|
|
824
457
|
}, never, never>;
|
|
825
458
|
}>[];
|
|
826
459
|
};
|
|
@@ -838,43 +471,6 @@ declare const make: (name: string, fields: Readonly<Record<string, Schema.Top>>,
|
|
|
838
471
|
readonly [x: string]: unknown;
|
|
839
472
|
} | undefined;
|
|
840
473
|
};
|
|
841
|
-
pipe<A>(this: A): A;
|
|
842
|
-
pipe<A, B = never>(this: A, ab: (_: A) => B): B;
|
|
843
|
-
pipe<A, B_1 = never, C = never>(this: A, ab: (_: A) => B_1, bc: (_: B_1) => C): C;
|
|
844
|
-
pipe<A, B_2 = never, C_1 = never, D = never>(this: A, ab: (_: A) => B_2, bc: (_: B_2) => C_1, cd: (_: C_1) => D): D;
|
|
845
|
-
pipe<A, B_3 = never, C_2 = never, D_1 = never, E_1 = never>(this: A, ab: (_: A) => B_3, bc: (_: B_3) => C_2, cd: (_: C_2) => D_1, de: (_: D_1) => E_1): E_1;
|
|
846
|
-
pipe<A, B_4 = never, C_3 = never, D_2 = never, E_2 = never, F = never>(this: A, ab: (_: A) => B_4, bc: (_: B_4) => C_3, cd: (_: C_3) => D_2, de: (_: D_2) => E_2, ef: (_: E_2) => F): F;
|
|
847
|
-
pipe<A, B_5 = never, C_4 = never, D_3 = never, E_3 = never, F_1 = never, G = never>(this: A, ab: (_: A) => B_5, bc: (_: B_5) => C_4, cd: (_: C_4) => D_3, de: (_: D_3) => E_3, ef: (_: E_3) => F_1, fg: (_: F_1) => G): G;
|
|
848
|
-
pipe<A, B_6 = never, C_5 = never, D_4 = never, E_4 = never, F_2 = never, G_1 = never, H = never>(this: A, ab: (_: A) => B_6, bc: (_: B_6) => C_5, cd: (_: C_5) => D_4, de: (_: D_4) => E_4, ef: (_: E_4) => F_2, fg: (_: F_2) => G_1, gh: (_: G_1) => H): H;
|
|
849
|
-
pipe<A, B_7 = never, C_6 = never, D_5 = never, E_5 = never, F_3 = never, G_2 = never, H_1 = never, I = never>(this: A, ab: (_: A) => B_7, bc: (_: B_7) => C_6, cd: (_: C_6) => D_5, de: (_: D_5) => E_5, ef: (_: E_5) => F_3, fg: (_: F_3) => G_2, gh: (_: G_2) => H_1, hi: (_: H_1) => I): I;
|
|
850
|
-
pipe<A, B_8 = never, C_7 = never, D_6 = never, E_6 = never, F_4 = never, G_3 = never, H_2 = never, I_1 = never, J = never>(this: A, ab: (_: A) => B_8, bc: (_: B_8) => C_7, cd: (_: C_7) => D_6, de: (_: D_6) => E_6, ef: (_: E_6) => F_4, fg: (_: F_4) => G_3, gh: (_: G_3) => H_2, hi: (_: H_2) => I_1, ij: (_: I_1) => J): J;
|
|
851
|
-
pipe<A, B_9 = never, C_8 = never, D_7 = never, E_7 = never, F_5 = never, G_4 = never, H_3 = never, I_2 = never, J_1 = never, K = never>(this: A, ab: (_: A) => B_9, bc: (_: B_9) => C_8, cd: (_: C_8) => D_7, de: (_: D_7) => E_7, ef: (_: E_7) => F_5, fg: (_: F_5) => G_4, gh: (_: G_4) => H_3, hi: (_: H_3) => I_2, ij: (_: I_2) => J_1, jk: (_: J_1) => K): K;
|
|
852
|
-
pipe<A, B_10 = never, C_9 = never, D_8 = never, E_8 = never, F_6 = never, G_5 = never, H_4 = never, I_3 = never, J_2 = never, K_1 = never, L = never>(this: A, ab: (_: A) => B_10, bc: (_: B_10) => C_9, cd: (_: C_9) => D_8, de: (_: D_8) => E_8, ef: (_: E_8) => F_6, fg: (_: F_6) => G_5, gh: (_: G_5) => H_4, hi: (_: H_4) => I_3, ij: (_: I_3) => J_2, jk: (_: J_2) => K_1, kl: (_: K_1) => L): L;
|
|
853
|
-
pipe<A, B_11 = never, C_10 = never, D_9 = never, E_9 = never, F_7 = never, G_6 = never, H_5 = never, I_4 = never, J_3 = never, K_2 = never, L_1 = never, M = never>(this: A, ab: (_: A) => B_11, bc: (_: B_11) => C_10, cd: (_: C_10) => D_9, de: (_: D_9) => E_9, ef: (_: E_9) => F_7, fg: (_: F_7) => G_6, gh: (_: G_6) => H_5, hi: (_: H_5) => I_4, ij: (_: I_4) => J_3, jk: (_: J_3) => K_2, kl: (_: K_2) => L_1, lm: (_: L_1) => M): M;
|
|
854
|
-
pipe<A, B_12 = never, C_11 = never, D_10 = never, E_10 = never, F_8 = never, G_7 = never, H_6 = never, I_5 = never, J_4 = never, K_3 = never, L_2 = never, M_1 = never, N = never>(this: A, ab: (_: A) => B_12, bc: (_: B_12) => C_11, cd: (_: C_11) => D_10, de: (_: D_10) => E_10, ef: (_: E_10) => F_8, fg: (_: F_8) => G_7, gh: (_: G_7) => H_6, hi: (_: H_6) => I_5, ij: (_: I_5) => J_4, jk: (_: J_4) => K_3, kl: (_: K_3) => L_2, lm: (_: L_2) => M_1, mn: (_: M_1) => N): N;
|
|
855
|
-
pipe<A, B_13 = never, C_12 = never, D_11 = never, E_11 = never, F_9 = never, G_8 = never, H_7 = never, I_6 = never, J_5 = never, K_4 = never, L_3 = never, M_2 = never, N_1 = never, O = never>(this: A, ab: (_: A) => B_13, bc: (_: B_13) => C_12, cd: (_: C_12) => D_11, de: (_: D_11) => E_11, ef: (_: E_11) => F_9, fg: (_: F_9) => G_8, gh: (_: G_8) => H_7, hi: (_: H_7) => I_6, ij: (_: I_6) => J_5, jk: (_: J_5) => K_4, kl: (_: K_4) => L_3, lm: (_: L_3) => M_2, mn: (_: M_2) => N_1, no: (_: N_1) => O): O;
|
|
856
|
-
pipe<A, B_14 = never, C_13 = never, D_12 = never, E_12 = never, F_10 = never, G_9 = never, H_8 = never, I_7 = never, J_6 = never, K_5 = never, L_4 = never, M_3 = never, N_2 = never, O_1 = never, P = never>(this: A, ab: (_: A) => B_14, bc: (_: B_14) => C_13, cd: (_: C_13) => D_12, de: (_: D_12) => E_12, ef: (_: E_12) => F_10, fg: (_: F_10) => G_9, gh: (_: G_9) => H_8, hi: (_: H_8) => I_7, ij: (_: I_7) => J_6, jk: (_: J_6) => K_5, kl: (_: K_5) => L_4, lm: (_: L_4) => M_3, mn: (_: M_3) => N_2, no: (_: N_2) => O_1, op: (_: O_1) => P): P;
|
|
857
|
-
pipe<A, B_15 = never, C_14 = never, D_13 = never, E_13 = never, F_11 = never, G_10 = never, H_9 = never, I_8 = never, J_7 = never, K_6 = never, L_5 = never, M_4 = never, N_3 = never, O_2 = never, P_1 = never, Q = never>(this: A, ab: (_: A) => B_15, bc: (_: B_15) => C_14, cd: (_: C_14) => D_13, de: (_: D_13) => E_13, ef: (_: E_13) => F_11, fg: (_: F_11) => G_10, gh: (_: G_10) => H_9, hi: (_: H_9) => I_8, ij: (_: I_8) => J_7, jk: (_: J_7) => K_6, kl: (_: K_6) => L_5, lm: (_: L_5) => M_4, mn: (_: M_4) => N_3, no: (_: N_3) => O_2, op: (_: O_2) => P_1, pq: (_: P_1) => Q): Q;
|
|
858
|
-
pipe<A, B_16 = never, C_15 = never, D_14 = never, E_14 = never, F_12 = never, G_11 = never, H_10 = never, I_9 = never, J_8 = never, K_7 = never, L_6 = never, M_5 = never, N_4 = never, O_3 = never, P_2 = never, Q_1 = never, R_1 = never>(this: A, ab: (_: A) => B_16, bc: (_: B_16) => C_15, cd: (_: C_15) => D_14, de: (_: D_14) => E_14, ef: (_: E_14) => F_12, fg: (_: F_12) => G_11, gh: (_: G_11) => H_10, hi: (_: H_10) => I_9, ij: (_: I_9) => J_8, jk: (_: J_8) => K_7, kl: (_: K_7) => L_6, lm: (_: L_6) => M_5, mn: (_: M_5) => N_4, no: (_: N_4) => O_3, op: (_: O_3) => P_2, pq: (_: P_2) => Q_1, qr: (_: Q_1) => R_1): R_1;
|
|
859
|
-
pipe<A, B_17 = never, C_16 = never, D_15 = never, E_15 = never, F_13 = never, G_12 = never, H_11 = never, I_10 = never, J_9 = never, K_8 = never, L_7 = never, M_6 = never, N_5 = never, O_4 = never, P_3 = never, Q_2 = never, R_2 = never, S = never>(this: A, ab: (_: A) => B_17, bc: (_: B_17) => C_16, cd: (_: C_16) => D_15, de: (_: D_15) => E_15, ef: (_: E_15) => F_13, fg: (_: F_13) => G_12, gh: (_: G_12) => H_11, hi: (_: H_11) => I_10, ij: (_: I_10) => J_9, jk: (_: J_9) => K_8, kl: (_: K_8) => L_7, lm: (_: L_7) => M_6, mn: (_: M_6) => N_5, no: (_: N_5) => O_4, op: (_: O_4) => P_3, pq: (_: P_3) => Q_2, qr: (_: Q_2) => R_2, rs: (_: R_2) => S): S;
|
|
860
|
-
pipe<A, B_18 = never, C_17 = never, D_16 = never, E_16 = never, F_14 = never, G_13 = never, H_12 = never, I_11 = never, J_10 = never, K_9 = never, L_8 = never, M_7 = never, N_6 = never, O_5 = never, P_4 = never, Q_3 = never, R_3 = never, S_1 = never, T = never>(this: A, ab: (_: A) => B_18, bc: (_: B_18) => C_17, cd: (_: C_17) => D_16, de: (_: D_16) => E_16, ef: (_: E_16) => F_14, fg: (_: F_14) => G_13, gh: (_: G_13) => H_12, hi: (_: H_12) => I_11, ij: (_: I_11) => J_10, jk: (_: J_10) => K_9, kl: (_: K_9) => L_8, lm: (_: L_8) => M_7, mn: (_: M_7) => N_6, no: (_: N_6) => O_5, op: (_: O_5) => P_4, pq: (_: P_4) => Q_3, qr: (_: Q_3) => R_3, rs: (_: R_3) => S_1, st: (_: S_1) => T): T;
|
|
861
|
-
pipe<A, B_19 = never, C_18 = never, D_17 = never, E_17 = never, F_15 = never, G_14 = never, H_13 = never, I_12 = never, J_11 = never, K_10 = never, L_9 = never, M_8 = never, N_7 = never, O_6 = never, P_5 = never, Q_4 = never, R_4 = never, S_2 = never, T_1 = never, U = never>(this: A, ab: (_: A) => B_19, bc: (_: B_19) => C_18, cd: (_: C_18) => D_17, de: (_: D_17) => E_17, ef: (_: E_17) => F_15, fg: (_: F_15) => G_14, gh: (_: G_14) => H_13, hi: (_: H_13) => I_12, ij: (_: I_12) => J_11, jk: (_: J_11) => K_10, kl: (_: K_10) => L_9, lm: (_: L_9) => M_8, mn: (_: M_8) => N_7, no: (_: N_7) => O_6, op: (_: O_6) => P_5, pq: (_: P_5) => Q_4, qr: (_: Q_4) => R_4, rs: (_: R_4) => S_2, st: (_: S_2) => T_1, tu: (_: T_1) => U): U;
|
|
862
|
-
pipe<A, B_20 = never, C_19 = never, D_18 = never, E_18 = never, F_16 = never, G_15 = never, H_14 = never, I_13 = never, J_12 = never, K_11 = never, L_10 = never, M_9 = never, N_8 = never, O_7 = never, P_6 = never, Q_5 = never, R_5 = never, S_3 = never, T_2 = never, U_1 = never>(this: A, ab: (_: A) => B_20, bc: (_: B_20) => C_19, cd: (_: C_19) => D_18, de: (_: D_18) => E_18, ef: (_: E_18) => F_16, fg: (_: F_16) => G_15, gh: (_: G_15) => H_14, hi: (_: H_14) => I_13, ij: (_: I_13) => J_12, jk: (_: J_12) => K_11, kl: (_: K_11) => L_10, lm: (_: L_10) => M_9, mn: (_: M_9) => N_8, no: (_: N_8) => O_7, op: (_: O_7) => P_6, pq: (_: P_6) => Q_5, qr: (_: Q_5) => R_5, rs: (_: R_5) => S_3, st: (_: S_3) => T_2, tu: (_: T_2) => U_1): U_1;
|
|
863
|
-
name: string;
|
|
864
|
-
options: import("foldkit-form").FormOptions<Readonly<Record<string, Schema.Top>>, {
|
|
865
|
-
readonly [x: string]: import("foldkit-entity").EntityField<string, string, Schema.Top>;
|
|
866
|
-
}, never, {}, Readonly<Record<string, Control<unknown>>>>;
|
|
867
|
-
types: {
|
|
868
|
-
readonly Name: string;
|
|
869
|
-
readonly E: Entity<string, Readonly<Record<string, Schema.Top>>, {}, {}>;
|
|
870
|
-
readonly Fields: Readonly<Record<string, Schema.Top>>;
|
|
871
|
-
readonly Members: {
|
|
872
|
-
readonly [x: string]: import("foldkit-entity").EntityField<string, string, Schema.Top>;
|
|
873
|
-
};
|
|
874
|
-
readonly R: never;
|
|
875
|
-
readonly Nest: {};
|
|
876
|
-
readonly Inputs: Readonly<Record<string, Control<unknown>>>;
|
|
877
|
-
};
|
|
878
474
|
};
|
|
879
475
|
/** Every key the form's Schema names, edited or shown. */
|
|
880
476
|
keys: string[];
|
|
@@ -902,45 +498,37 @@ declare const make: (name: string, fields: Readonly<Record<string, Schema.Top>>,
|
|
|
902
498
|
readonly [x: string]: import("foldkit-entity").EntityField<string, string, Schema.Top>;
|
|
903
499
|
}, import("foldkit-form").ControlsOf<Readonly<Record<string, Control<unknown>>>>>>;
|
|
904
500
|
encodeMessage: (message: {
|
|
905
|
-
readonly _tag: "
|
|
501
|
+
readonly _tag: "About";
|
|
502
|
+
readonly subject: {
|
|
503
|
+
readonly [x: string]: string;
|
|
504
|
+
};
|
|
505
|
+
} | {
|
|
506
|
+
readonly _tag: "Blurred";
|
|
906
507
|
readonly key: string;
|
|
907
|
-
readonly error: string;
|
|
908
508
|
} | {
|
|
909
509
|
readonly _tag: "Changed";
|
|
910
510
|
readonly key: string;
|
|
911
511
|
readonly value: string | boolean | readonly string[];
|
|
912
|
-
} | {
|
|
913
|
-
readonly _tag: "Blurred";
|
|
914
|
-
readonly key: string;
|
|
915
|
-
} | {
|
|
916
|
-
readonly _tag: "ValidatedAll";
|
|
917
|
-
} | {
|
|
918
|
-
readonly _tag: "Submitted";
|
|
919
|
-
} | {
|
|
920
|
-
readonly _tag: "Reset";
|
|
921
512
|
} | {
|
|
922
513
|
readonly _tag: "Checked";
|
|
923
514
|
readonly key: string;
|
|
924
515
|
readonly draft: string | boolean | readonly string[];
|
|
925
516
|
readonly error: string | null;
|
|
926
517
|
} | {
|
|
927
|
-
readonly _tag: "
|
|
928
|
-
readonly
|
|
929
|
-
|
|
930
|
-
};
|
|
931
|
-
} | {
|
|
932
|
-
readonly _tag: "Searched";
|
|
933
|
-
readonly key: string;
|
|
934
|
-
readonly text: string;
|
|
518
|
+
readonly _tag: "Control";
|
|
519
|
+
readonly key: never;
|
|
520
|
+
readonly message: unknown;
|
|
935
521
|
} | {
|
|
936
522
|
readonly _tag: "Nested";
|
|
937
523
|
readonly key: string;
|
|
938
524
|
readonly row: string;
|
|
939
525
|
readonly message: unknown;
|
|
940
526
|
} | {
|
|
941
|
-
readonly _tag: "
|
|
942
|
-
readonly key:
|
|
943
|
-
readonly
|
|
527
|
+
readonly _tag: "Refused";
|
|
528
|
+
readonly key: string;
|
|
529
|
+
readonly error: string;
|
|
530
|
+
} | {
|
|
531
|
+
readonly _tag: "Reset";
|
|
944
532
|
} | {
|
|
945
533
|
readonly _tag: "RowAdded";
|
|
946
534
|
readonly key: string;
|
|
@@ -948,47 +536,47 @@ declare const make: (name: string, fields: Readonly<Record<string, Schema.Top>>,
|
|
|
948
536
|
readonly _tag: "RowRemoved";
|
|
949
537
|
readonly key: string;
|
|
950
538
|
readonly row: string;
|
|
951
|
-
}) => Schema.Json;
|
|
952
|
-
decodeMessage: (held: Schema.Json) => Option.Option<{
|
|
953
|
-
readonly _tag: "Refused";
|
|
954
|
-
readonly key: string;
|
|
955
|
-
readonly error: string;
|
|
956
539
|
} | {
|
|
957
|
-
readonly _tag: "
|
|
540
|
+
readonly _tag: "Searched";
|
|
958
541
|
readonly key: string;
|
|
959
|
-
readonly
|
|
542
|
+
readonly text: string;
|
|
960
543
|
} | {
|
|
961
|
-
readonly _tag: "
|
|
962
|
-
readonly key: string;
|
|
544
|
+
readonly _tag: "Submitted";
|
|
963
545
|
} | {
|
|
964
546
|
readonly _tag: "ValidatedAll";
|
|
547
|
+
}) => Schema.Json;
|
|
548
|
+
decodeMessage: (held: Schema.Json) => Option.Option<{
|
|
549
|
+
readonly _tag: "About";
|
|
550
|
+
readonly subject: {
|
|
551
|
+
readonly [x: string]: string;
|
|
552
|
+
};
|
|
965
553
|
} | {
|
|
966
|
-
readonly _tag: "
|
|
554
|
+
readonly _tag: "Blurred";
|
|
555
|
+
readonly key: string;
|
|
967
556
|
} | {
|
|
968
|
-
readonly _tag: "
|
|
557
|
+
readonly _tag: "Changed";
|
|
558
|
+
readonly key: string;
|
|
559
|
+
readonly value: string | boolean | readonly string[];
|
|
969
560
|
} | {
|
|
970
561
|
readonly _tag: "Checked";
|
|
971
562
|
readonly key: string;
|
|
972
563
|
readonly draft: string | boolean | readonly string[];
|
|
973
564
|
readonly error: string | null;
|
|
974
565
|
} | {
|
|
975
|
-
readonly _tag: "
|
|
976
|
-
readonly
|
|
977
|
-
|
|
978
|
-
};
|
|
979
|
-
} | {
|
|
980
|
-
readonly _tag: "Searched";
|
|
981
|
-
readonly key: string;
|
|
982
|
-
readonly text: string;
|
|
566
|
+
readonly _tag: "Control";
|
|
567
|
+
readonly key: never;
|
|
568
|
+
readonly message: unknown;
|
|
983
569
|
} | {
|
|
984
570
|
readonly _tag: "Nested";
|
|
985
571
|
readonly key: string;
|
|
986
572
|
readonly row: string;
|
|
987
573
|
readonly message: unknown;
|
|
988
574
|
} | {
|
|
989
|
-
readonly _tag: "
|
|
990
|
-
readonly key:
|
|
991
|
-
readonly
|
|
575
|
+
readonly _tag: "Refused";
|
|
576
|
+
readonly key: string;
|
|
577
|
+
readonly error: string;
|
|
578
|
+
} | {
|
|
579
|
+
readonly _tag: "Reset";
|
|
992
580
|
} | {
|
|
993
581
|
readonly _tag: "RowAdded";
|
|
994
582
|
readonly key: string;
|
|
@@ -996,6 +584,14 @@ declare const make: (name: string, fields: Readonly<Record<string, Schema.Top>>,
|
|
|
996
584
|
readonly _tag: "RowRemoved";
|
|
997
585
|
readonly key: string;
|
|
998
586
|
readonly row: string;
|
|
587
|
+
} | {
|
|
588
|
+
readonly _tag: "Searched";
|
|
589
|
+
readonly key: string;
|
|
590
|
+
readonly text: string;
|
|
591
|
+
} | {
|
|
592
|
+
readonly _tag: "Submitted";
|
|
593
|
+
} | {
|
|
594
|
+
readonly _tag: "ValidatedAll";
|
|
999
595
|
}>;
|
|
1000
596
|
/**
|
|
1001
597
|
* A Message of the Bundle behind `key`'s control (an `Input.bundle`), as the
|
|
@@ -1003,45 +599,37 @@ declare const make: (name: string, fields: Readonly<Record<string, Schema.Top>>,
|
|
|
1003
599
|
* so it is checked here: a key not edited by one throws.
|
|
1004
600
|
*/
|
|
1005
601
|
control: (key: string, message: unknown) => {
|
|
1006
|
-
readonly _tag: "
|
|
602
|
+
readonly _tag: "About";
|
|
603
|
+
readonly subject: {
|
|
604
|
+
readonly [x: string]: string;
|
|
605
|
+
};
|
|
606
|
+
} | {
|
|
607
|
+
readonly _tag: "Blurred";
|
|
1007
608
|
readonly key: string;
|
|
1008
|
-
readonly error: string;
|
|
1009
609
|
} | {
|
|
1010
610
|
readonly _tag: "Changed";
|
|
1011
611
|
readonly key: string;
|
|
1012
612
|
readonly value: string | boolean | readonly string[];
|
|
1013
|
-
} | {
|
|
1014
|
-
readonly _tag: "Blurred";
|
|
1015
|
-
readonly key: string;
|
|
1016
|
-
} | {
|
|
1017
|
-
readonly _tag: "ValidatedAll";
|
|
1018
|
-
} | {
|
|
1019
|
-
readonly _tag: "Submitted";
|
|
1020
|
-
} | {
|
|
1021
|
-
readonly _tag: "Reset";
|
|
1022
613
|
} | {
|
|
1023
614
|
readonly _tag: "Checked";
|
|
1024
615
|
readonly key: string;
|
|
1025
616
|
readonly draft: string | boolean | readonly string[];
|
|
1026
617
|
readonly error: string | null;
|
|
1027
618
|
} | {
|
|
1028
|
-
readonly _tag: "
|
|
1029
|
-
readonly
|
|
1030
|
-
|
|
1031
|
-
};
|
|
1032
|
-
} | {
|
|
1033
|
-
readonly _tag: "Searched";
|
|
1034
|
-
readonly key: string;
|
|
1035
|
-
readonly text: string;
|
|
619
|
+
readonly _tag: "Control";
|
|
620
|
+
readonly key: never;
|
|
621
|
+
readonly message: unknown;
|
|
1036
622
|
} | {
|
|
1037
623
|
readonly _tag: "Nested";
|
|
1038
624
|
readonly key: string;
|
|
1039
625
|
readonly row: string;
|
|
1040
626
|
readonly message: unknown;
|
|
1041
627
|
} | {
|
|
1042
|
-
readonly _tag: "
|
|
1043
|
-
readonly key:
|
|
1044
|
-
readonly
|
|
628
|
+
readonly _tag: "Refused";
|
|
629
|
+
readonly key: string;
|
|
630
|
+
readonly error: string;
|
|
631
|
+
} | {
|
|
632
|
+
readonly _tag: "Reset";
|
|
1045
633
|
} | {
|
|
1046
634
|
readonly _tag: "RowAdded";
|
|
1047
635
|
readonly key: string;
|
|
@@ -1049,6 +637,14 @@ declare const make: (name: string, fields: Readonly<Record<string, Schema.Top>>,
|
|
|
1049
637
|
readonly _tag: "RowRemoved";
|
|
1050
638
|
readonly key: string;
|
|
1051
639
|
readonly row: string;
|
|
640
|
+
} | {
|
|
641
|
+
readonly _tag: "Searched";
|
|
642
|
+
readonly key: string;
|
|
643
|
+
readonly text: string;
|
|
644
|
+
} | {
|
|
645
|
+
readonly _tag: "Submitted";
|
|
646
|
+
} | {
|
|
647
|
+
readonly _tag: "ValidatedAll";
|
|
1052
648
|
};
|
|
1053
649
|
/**
|
|
1054
650
|
* What a new value starts from, as the Document stores it: each field's
|
|
@@ -1146,13 +742,13 @@ export declare const Layers: Bundle.Declared<Bundle.Bundle<"TreeNavigation", {
|
|
|
1146
742
|
readonly current: string | null;
|
|
1147
743
|
readonly toggled: readonly string[];
|
|
1148
744
|
}, {
|
|
1149
|
-
readonly _tag: "
|
|
745
|
+
readonly _tag: "Closed";
|
|
1150
746
|
readonly id: string;
|
|
1151
747
|
} | {
|
|
1152
|
-
readonly _tag: "
|
|
748
|
+
readonly _tag: "Focused";
|
|
1153
749
|
readonly id: string;
|
|
1154
750
|
} | {
|
|
1155
|
-
readonly _tag: "
|
|
751
|
+
readonly _tag: "Opened";
|
|
1156
752
|
readonly id: string;
|
|
1157
753
|
}, never, never, never, void, {}, {}>, "layers">;
|
|
1158
754
|
export declare const layersArgs: TreeNavigation.Args;
|
|
@@ -1165,19 +761,19 @@ export declare const Announcer: Bundle.Declared<Bundle.Bundle<"LiveAnnounce", {
|
|
|
1165
761
|
readonly assertive: string;
|
|
1166
762
|
readonly pending: {
|
|
1167
763
|
readonly message: string;
|
|
1168
|
-
readonly politeness: "
|
|
764
|
+
readonly politeness: "assertive" | "polite";
|
|
1169
765
|
} | null;
|
|
1170
766
|
readonly generation: number;
|
|
1171
767
|
}, {
|
|
1172
|
-
readonly _tag: "
|
|
1173
|
-
readonly
|
|
768
|
+
readonly _tag: "Announced";
|
|
769
|
+
readonly message: string;
|
|
770
|
+
readonly politeness: "assertive" | "polite";
|
|
1174
771
|
} | {
|
|
1175
772
|
readonly _tag: "Cleared";
|
|
1176
773
|
readonly generation: number;
|
|
1177
774
|
} | {
|
|
1178
|
-
readonly _tag: "
|
|
1179
|
-
readonly
|
|
1180
|
-
readonly politeness: "polite" | "assertive";
|
|
775
|
+
readonly _tag: "Read";
|
|
776
|
+
readonly generation: number;
|
|
1181
777
|
}, never, never, never, void, {}, {}>, "announcer">;
|
|
1182
778
|
/** Where over a node a drop lands: before it, inside it, or after it. */
|
|
1183
779
|
export declare const DropZone: Schema.Literals<readonly ["before", "inside", "after"]>;
|
|
@@ -1222,7 +818,7 @@ export type Drag = typeof Drag.Type;
|
|
|
1222
818
|
/** A value of the page's context, as the editor previews it. */
|
|
1223
819
|
export declare const ContextValue: Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean, Schema.Null]>;
|
|
1224
820
|
export type ContextValue = typeof ContextValue.Type;
|
|
1225
|
-
declare const Model
|
|
821
|
+
export declare const Model: Schema.Struct<{
|
|
1226
822
|
/** The page and its undo steps: `page.present` is the Document being edited. */
|
|
1227
823
|
readonly page: Schema.Struct<{
|
|
1228
824
|
readonly past: Schema.$Array<Schema.Codec<{
|
|
@@ -1377,7 +973,7 @@ declare const Model$1: Schema.Struct<{
|
|
|
1377
973
|
readonly assertive: string;
|
|
1378
974
|
readonly pending: {
|
|
1379
975
|
readonly message: string;
|
|
1380
|
-
readonly politeness: "
|
|
976
|
+
readonly politeness: "assertive" | "polite";
|
|
1381
977
|
} | null;
|
|
1382
978
|
readonly generation: number;
|
|
1383
979
|
}, unknown, never, never>;
|
|
@@ -1386,7 +982,7 @@ declare const Model$1: Schema.Struct<{
|
|
|
1386
982
|
readonly toggled: readonly string[];
|
|
1387
983
|
}, unknown, never, never>;
|
|
1388
984
|
}>;
|
|
1389
|
-
type Model
|
|
985
|
+
export type Model = typeof Model.Type;
|
|
1390
986
|
/** One form the inspector draws for the selected node, and its Model. */
|
|
1391
987
|
export interface InspectedForm {
|
|
1392
988
|
/** Which it is, as `Inspected` names it: `props`, or `on:<event>:<action>`. */
|
|
@@ -1406,25 +1002,25 @@ export interface Inspecting {
|
|
|
1406
1002
|
*/
|
|
1407
1003
|
readonly on: Readonly<Record<string, InspectedForm>>;
|
|
1408
1004
|
}
|
|
1409
|
-
declare const Message
|
|
1005
|
+
export declare const Message: import("foldkit/message").MessageUnion<{
|
|
1410
1006
|
readonly Selected: {
|
|
1411
|
-
|
|
1007
|
+
id: Schema.brand<Schema.NonEmptyString, "@foldkit-composition/NodeId">;
|
|
1412
1008
|
};
|
|
1413
1009
|
/** Nothing is selected. */
|
|
1414
1010
|
readonly Deselected: {};
|
|
1415
1011
|
readonly Hovered: {
|
|
1416
|
-
|
|
1012
|
+
id: Schema.brand<Schema.NonEmptyString, "@foldkit-composition/NodeId">;
|
|
1417
1013
|
};
|
|
1418
1014
|
/** The pointer left every node. */
|
|
1419
1015
|
readonly Unhovered: {};
|
|
1420
1016
|
/** An Operation, from a button, a key, a drag, or an agent. */
|
|
1421
1017
|
readonly Applied: {
|
|
1422
|
-
|
|
1018
|
+
op: Schema.Codec<Operation, unknown, never, never>;
|
|
1423
1019
|
};
|
|
1424
1020
|
/** A new node of a Block, with the Block's starting props, once an id is minted. */
|
|
1425
1021
|
readonly InsertAsked: {
|
|
1426
|
-
|
|
1427
|
-
|
|
1022
|
+
block: Schema.String;
|
|
1023
|
+
at: Schema.Union<readonly [Schema.TaggedStruct<"Root", {
|
|
1428
1024
|
readonly index: import("effect/Schema").Int;
|
|
1429
1025
|
}>, Schema.TaggedStruct<"Region", {
|
|
1430
1026
|
readonly parent: import("effect/Schema").brand<import("effect/Schema").NonEmptyString, "@foldkit-composition/NodeId">;
|
|
@@ -1434,8 +1030,8 @@ declare const Message$1: import("foldkit/message").MessageUnion<{
|
|
|
1434
1030
|
};
|
|
1435
1031
|
/** A copy of a node and everything it holds, once ids are minted. */
|
|
1436
1032
|
readonly DuplicateAsked: {
|
|
1437
|
-
|
|
1438
|
-
|
|
1033
|
+
id: Schema.brand<Schema.NonEmptyString, "@foldkit-composition/NodeId">;
|
|
1034
|
+
at: Schema.Union<readonly [Schema.TaggedStruct<"Root", {
|
|
1439
1035
|
readonly index: import("effect/Schema").Int;
|
|
1440
1036
|
}>, Schema.TaggedStruct<"Region", {
|
|
1441
1037
|
readonly parent: import("effect/Schema").brand<import("effect/Schema").NonEmptyString, "@foldkit-composition/NodeId">;
|
|
@@ -1445,8 +1041,8 @@ declare const Message$1: import("foldkit/message").MessageUnion<{
|
|
|
1445
1041
|
};
|
|
1446
1042
|
/** One of the Catalog's patterns, once ids are minted for its nodes. */
|
|
1447
1043
|
readonly PatternAsked: {
|
|
1448
|
-
|
|
1449
|
-
|
|
1044
|
+
pattern: Schema.String;
|
|
1045
|
+
at: Schema.Union<readonly [Schema.TaggedStruct<"Root", {
|
|
1450
1046
|
readonly index: import("effect/Schema").Int;
|
|
1451
1047
|
}>, Schema.TaggedStruct<"Region", {
|
|
1452
1048
|
readonly parent: import("effect/Schema").brand<import("effect/Schema").NonEmptyString, "@foldkit-composition/NodeId">;
|
|
@@ -1456,17 +1052,17 @@ declare const Message$1: import("foldkit/message").MessageUnion<{
|
|
|
1456
1052
|
};
|
|
1457
1053
|
/** The selected node and all it holds, copied. */
|
|
1458
1054
|
readonly CopyAsked: {
|
|
1459
|
-
|
|
1055
|
+
id: Schema.brand<Schema.NonEmptyString, "@foldkit-composition/NodeId">;
|
|
1460
1056
|
};
|
|
1461
1057
|
/** The selected node and all it holds, copied and removed. */
|
|
1462
1058
|
readonly CutAsked: {
|
|
1463
|
-
|
|
1059
|
+
id: Schema.brand<Schema.NonEmptyString, "@foldkit-composition/NodeId">;
|
|
1464
1060
|
};
|
|
1465
1061
|
/** A paste: the system clipboard is read, and what it holds goes in by the selection. */
|
|
1466
1062
|
readonly PasteAsked: {};
|
|
1467
1063
|
/** What the system clipboard held for a paste; none when it could not be read. */
|
|
1468
1064
|
readonly ClipboardRead: {
|
|
1469
|
-
|
|
1065
|
+
text: Schema.OptionFromNullOr<Schema.String>;
|
|
1470
1066
|
};
|
|
1471
1067
|
/**
|
|
1472
1068
|
* Text on the page is asked to be edited in place: a double-click on it, or
|
|
@@ -1474,26 +1070,26 @@ declare const Message$1: import("foldkit/message").MessageUnion<{
|
|
|
1474
1070
|
* (`data-composition-field`), which is checked here.
|
|
1475
1071
|
*/
|
|
1476
1072
|
readonly EditingAsked: {
|
|
1477
|
-
|
|
1073
|
+
field: Schema.String;
|
|
1478
1074
|
};
|
|
1479
1075
|
/** What the field being edited holds now. */
|
|
1480
1076
|
readonly FieldTyped: {
|
|
1481
|
-
|
|
1482
|
-
|
|
1077
|
+
field: Schema.String;
|
|
1078
|
+
text: Schema.String;
|
|
1483
1079
|
};
|
|
1484
1080
|
/** Editing ended with the text kept: Enter, or leaving the field. */
|
|
1485
1081
|
readonly EditingCommitted: {
|
|
1486
|
-
|
|
1487
|
-
|
|
1082
|
+
field: Schema.String;
|
|
1083
|
+
text: Schema.String;
|
|
1488
1084
|
};
|
|
1489
1085
|
/** Editing ended with the text put back as it began: Escape. */
|
|
1490
1086
|
readonly EditingCancelled: {
|
|
1491
|
-
|
|
1087
|
+
field: Schema.String;
|
|
1492
1088
|
};
|
|
1493
1089
|
/** The ids a request waited for. */
|
|
1494
1090
|
readonly Minted: {
|
|
1495
|
-
|
|
1496
|
-
|
|
1091
|
+
ids: Schema.$Array<Schema.brand<Schema.NonEmptyString, "@foldkit-composition/NodeId">>;
|
|
1092
|
+
request: Schema.Union<readonly [Schema.TaggedStruct<"Insert", {
|
|
1497
1093
|
readonly block: Schema.String;
|
|
1498
1094
|
readonly at: Schema.Union<readonly [Schema.TaggedStruct<"Root", {
|
|
1499
1095
|
readonly index: import("effect/Schema").Int;
|
|
@@ -1546,8 +1142,8 @@ declare const Message$1: import("foldkit/message").MessageUnion<{
|
|
|
1546
1142
|
* it runs is decided in `update`, from the Model as it is then.
|
|
1547
1143
|
*/
|
|
1548
1144
|
readonly KeyPressed: {
|
|
1549
|
-
|
|
1550
|
-
|
|
1145
|
+
key: Schema.String;
|
|
1146
|
+
modifiers: Schema.Struct<{
|
|
1551
1147
|
readonly shiftKey: Schema.Boolean;
|
|
1552
1148
|
readonly ctrlKey: Schema.Boolean;
|
|
1553
1149
|
readonly altKey: Schema.Boolean;
|
|
@@ -1557,14 +1153,14 @@ declare const Message$1: import("foldkit/message").MessageUnion<{
|
|
|
1557
1153
|
readonly Undid: {};
|
|
1558
1154
|
readonly Redid: {};
|
|
1559
1155
|
readonly PanelChosen: {
|
|
1560
|
-
|
|
1156
|
+
panel: Schema.Literals<readonly ["insert", "layers", "properties"]>;
|
|
1561
1157
|
};
|
|
1562
1158
|
readonly ViewportChosen: {
|
|
1563
|
-
|
|
1159
|
+
viewport: Schema.Literals<readonly ["wide", "medium", "narrow"]>;
|
|
1564
1160
|
};
|
|
1565
1161
|
/** A pointer drag of a node began: it is selected, and nothing moves until the drop. */
|
|
1566
1162
|
readonly DragStarted: {
|
|
1567
|
-
|
|
1163
|
+
source: Schema.Union<readonly [Schema.TaggedStruct<"Existing", {
|
|
1568
1164
|
readonly id: Schema.brand<Schema.NonEmptyString, "@foldkit-composition/NodeId">;
|
|
1569
1165
|
}>, Schema.TaggedStruct<"New", {
|
|
1570
1166
|
readonly block: Schema.String;
|
|
@@ -1572,13 +1168,13 @@ declare const Message$1: import("foldkit/message").MessageUnion<{
|
|
|
1572
1168
|
};
|
|
1573
1169
|
/** The dragged node is over another, in a zone of it. */
|
|
1574
1170
|
readonly DraggedOver: {
|
|
1575
|
-
|
|
1576
|
-
|
|
1171
|
+
id: Schema.brand<Schema.NonEmptyString, "@foldkit-composition/NodeId">;
|
|
1172
|
+
zone: Schema.Literals<readonly ["before", "inside", "after"]>;
|
|
1577
1173
|
};
|
|
1578
1174
|
/** The dragged node is over a node's empty Region, by name: a drop goes into it. */
|
|
1579
1175
|
readonly DraggedOverRegion: {
|
|
1580
|
-
|
|
1581
|
-
|
|
1176
|
+
id: Schema.brand<Schema.NonEmptyString, "@foldkit-composition/NodeId">;
|
|
1177
|
+
region: Schema.String;
|
|
1582
1178
|
};
|
|
1583
1179
|
/** The dragged node is over nothing. */
|
|
1584
1180
|
readonly DraggedOff: {};
|
|
@@ -1592,12 +1188,12 @@ declare const Message$1: import("foldkit/message").MessageUnion<{
|
|
|
1592
1188
|
readonly DragCancelled: {};
|
|
1593
1189
|
/** The author previews the page with one context key set. */
|
|
1594
1190
|
readonly PreviewChosen: {
|
|
1595
|
-
|
|
1596
|
-
|
|
1191
|
+
key: Schema.String;
|
|
1192
|
+
value: Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean, Schema.Null]>;
|
|
1597
1193
|
};
|
|
1598
1194
|
/** The author previews the page with one context key unset. */
|
|
1599
1195
|
readonly PreviewCleared: {
|
|
1600
|
-
|
|
1196
|
+
key: Schema.String;
|
|
1601
1197
|
};
|
|
1602
1198
|
/**
|
|
1603
1199
|
* A Message of one of a node's forms (`Inspecting`), encoded to JSON. One for
|
|
@@ -1605,39 +1201,47 @@ declare const Message$1: import("foldkit/message").MessageUnion<{
|
|
|
1605
1201
|
* Command answering late, is ignored.
|
|
1606
1202
|
*/
|
|
1607
1203
|
readonly Inspected: {
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1204
|
+
id: Schema.brand<Schema.NonEmptyString, "@foldkit-composition/NodeId">;
|
|
1205
|
+
form: Schema.String;
|
|
1206
|
+
message: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
1611
1207
|
};
|
|
1612
1208
|
readonly GotAnnouncerMessage: {
|
|
1613
1209
|
readonly message: Schema.Codec<{
|
|
1614
|
-
readonly _tag: "
|
|
1615
|
-
readonly
|
|
1210
|
+
readonly _tag: "Announced";
|
|
1211
|
+
readonly message: string;
|
|
1212
|
+
readonly politeness: "assertive" | "polite";
|
|
1616
1213
|
} | {
|
|
1617
1214
|
readonly _tag: "Cleared";
|
|
1618
1215
|
readonly generation: number;
|
|
1619
1216
|
} | {
|
|
1620
|
-
readonly _tag: "
|
|
1621
|
-
readonly
|
|
1622
|
-
readonly politeness: "polite" | "assertive";
|
|
1217
|
+
readonly _tag: "Read";
|
|
1218
|
+
readonly generation: number;
|
|
1623
1219
|
}, unknown, never, never>;
|
|
1624
1220
|
};
|
|
1625
1221
|
readonly GotLayersMessage: {
|
|
1626
1222
|
readonly message: Schema.Codec<{
|
|
1627
|
-
readonly _tag: "
|
|
1223
|
+
readonly _tag: "Closed";
|
|
1628
1224
|
readonly id: string;
|
|
1629
1225
|
} | {
|
|
1630
|
-
readonly _tag: "
|
|
1226
|
+
readonly _tag: "Focused";
|
|
1631
1227
|
readonly id: string;
|
|
1632
1228
|
} | {
|
|
1633
|
-
readonly _tag: "
|
|
1229
|
+
readonly _tag: "Opened";
|
|
1634
1230
|
readonly id: string;
|
|
1635
1231
|
}, unknown, never, never>;
|
|
1636
1232
|
};
|
|
1637
1233
|
}>;
|
|
1638
|
-
type Message
|
|
1234
|
+
export type Message = typeof Message.Type;
|
|
1639
1235
|
/** What a new node of each Block starts with. A Block without starting props is not offered. */
|
|
1640
1236
|
export type Starters<Blocks extends AnyBlock> = { readonly [B in Blocks as B['name']]?: PropsOf<B>; };
|
|
1237
|
+
/** The Operation that moves a node `delta` places among its siblings; none at an end. */
|
|
1238
|
+
declare const moveBy: (document: Document, id: NodeId, delta: number) => Option.Option<Operation>;
|
|
1239
|
+
/** The Document being edited. */
|
|
1240
|
+
declare const documentOf: (model: Pick<Model, 'page'>) => Document;
|
|
1241
|
+
/** The Model showing another Document: what a fill, a reset or a restored revision does. */
|
|
1242
|
+
declare const replace: (model: Model, document: Document) => Model;
|
|
1243
|
+
/** The Model with nothing in flight, as a stored draft is shown again: no hover, no drag, no undo, no refusal. */
|
|
1244
|
+
declare const settle: (model: Model) => Model;
|
|
1641
1245
|
/**
|
|
1642
1246
|
* A key that runs a command, named as `KeyboardEvent.key` names it. `mod` is
|
|
1643
1247
|
* Ctrl, or ⌘ on a Mac. `mod` and `alt` must be as given; `shift` must be as
|
|
@@ -1659,7 +1263,7 @@ export interface BuilderCommand {
|
|
|
1659
1263
|
/** Where a drawn Builder offers it: with the selected node's actions, in the toolbar, or by key only. */
|
|
1660
1264
|
readonly placement: ReadonlyArray<'node' | 'toolbar' | 'keyboard'>;
|
|
1661
1265
|
/** The Message it sends now; none while it has nothing to do, which disables its button. */
|
|
1662
|
-
readonly run: (model: Pick<Model
|
|
1266
|
+
readonly run: (model: Pick<Model, 'page' | 'selected'>) => Option.Option<Message>;
|
|
1663
1267
|
}
|
|
1664
1268
|
export declare const Builder: {
|
|
1665
1269
|
/**
|
|
@@ -1668,7 +1272,7 @@ export declare const Builder: {
|
|
|
1668
1272
|
* `Heading.pipe(Block.annotate(Builder.controls({ text: Input.multiline() })))`.
|
|
1669
1273
|
* `Input.hidden()` leaves a prop out of the inspector.
|
|
1670
1274
|
*/
|
|
1671
|
-
controls:
|
|
1275
|
+
controls: typeof controls;
|
|
1672
1276
|
/**
|
|
1673
1277
|
* A Builder for a Catalog: its Bundle, the form control that places it as a
|
|
1674
1278
|
* key, and the helpers a view uses. `starters` gives the props a new node of
|
|
@@ -1761,7 +1365,7 @@ export declare const Builder: {
|
|
|
1761
1365
|
readonly selected: Option.Option<string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">>;
|
|
1762
1366
|
readonly hovered: Option.Option<string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">>;
|
|
1763
1367
|
readonly panel: "insert" | "layers" | "properties";
|
|
1764
|
-
readonly viewport: "
|
|
1368
|
+
readonly viewport: "medium" | "narrow" | "wide";
|
|
1765
1369
|
readonly refused: Option.Option<{
|
|
1766
1370
|
readonly code: string;
|
|
1767
1371
|
readonly message: string;
|
|
@@ -1776,7 +1380,7 @@ export declare const Builder: {
|
|
|
1776
1380
|
};
|
|
1777
1381
|
readonly over: Option.Option<{
|
|
1778
1382
|
readonly id: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
1779
|
-
readonly zone: "
|
|
1383
|
+
readonly zone: "after" | "before" | "inside";
|
|
1780
1384
|
readonly region: Option.Option<string>;
|
|
1781
1385
|
}>;
|
|
1782
1386
|
readonly at: Option.Option<{
|
|
@@ -1828,7 +1432,7 @@ export declare const Builder: {
|
|
|
1828
1432
|
readonly assertive: string;
|
|
1829
1433
|
readonly pending: {
|
|
1830
1434
|
readonly message: string;
|
|
1831
|
-
readonly politeness: "
|
|
1435
|
+
readonly politeness: "assertive" | "polite";
|
|
1832
1436
|
} | null;
|
|
1833
1437
|
readonly generation: number;
|
|
1834
1438
|
};
|
|
@@ -1837,55 +1441,44 @@ export declare const Builder: {
|
|
|
1837
1441
|
readonly toggled: readonly string[];
|
|
1838
1442
|
};
|
|
1839
1443
|
}, {
|
|
1840
|
-
readonly _tag: "
|
|
1841
|
-
readonly
|
|
1842
|
-
readonly _tag: "Focused";
|
|
1843
|
-
readonly id: string;
|
|
1844
|
-
} | {
|
|
1845
|
-
readonly _tag: "Opened";
|
|
1846
|
-
readonly id: string;
|
|
1847
|
-
} | {
|
|
1848
|
-
readonly _tag: "Closed";
|
|
1849
|
-
readonly id: string;
|
|
1850
|
-
};
|
|
1444
|
+
readonly _tag: "Applied";
|
|
1445
|
+
readonly op: Operation;
|
|
1851
1446
|
} | {
|
|
1852
|
-
readonly _tag: "
|
|
1853
|
-
readonly
|
|
1854
|
-
readonly _tag: "Read";
|
|
1855
|
-
readonly generation: number;
|
|
1856
|
-
} | {
|
|
1857
|
-
readonly _tag: "Cleared";
|
|
1858
|
-
readonly generation: number;
|
|
1859
|
-
} | {
|
|
1860
|
-
readonly _tag: "Announced";
|
|
1861
|
-
readonly message: string;
|
|
1862
|
-
readonly politeness: "polite" | "assertive";
|
|
1863
|
-
};
|
|
1447
|
+
readonly _tag: "ClipboardRead";
|
|
1448
|
+
readonly text: Option.Option<string>;
|
|
1864
1449
|
} | {
|
|
1865
|
-
readonly _tag: "
|
|
1450
|
+
readonly _tag: "CopyAsked";
|
|
1866
1451
|
readonly id: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
1867
1452
|
} | {
|
|
1868
|
-
readonly _tag: "
|
|
1869
|
-
} | {
|
|
1870
|
-
readonly _tag: "Hovered";
|
|
1453
|
+
readonly _tag: "CutAsked";
|
|
1871
1454
|
readonly id: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
1872
1455
|
} | {
|
|
1873
|
-
readonly _tag: "
|
|
1456
|
+
readonly _tag: "Deselected";
|
|
1874
1457
|
} | {
|
|
1875
|
-
readonly _tag: "
|
|
1876
|
-
readonly op: Operation;
|
|
1458
|
+
readonly _tag: "DragCancelled";
|
|
1877
1459
|
} | {
|
|
1878
|
-
readonly _tag: "
|
|
1879
|
-
|
|
1880
|
-
readonly
|
|
1881
|
-
|
|
1882
|
-
readonly
|
|
1460
|
+
readonly _tag: "DragDropped";
|
|
1461
|
+
} | {
|
|
1462
|
+
readonly _tag: "DragStarted";
|
|
1463
|
+
readonly source: {
|
|
1464
|
+
readonly _tag: "Existing";
|
|
1465
|
+
readonly id: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
1883
1466
|
} | {
|
|
1884
|
-
readonly _tag: "
|
|
1885
|
-
readonly
|
|
1886
|
-
readonly region: string;
|
|
1887
|
-
readonly index: number;
|
|
1467
|
+
readonly _tag: "New";
|
|
1468
|
+
readonly block: string;
|
|
1888
1469
|
};
|
|
1470
|
+
} | {
|
|
1471
|
+
readonly _tag: "DraggedOff";
|
|
1472
|
+
} | {
|
|
1473
|
+
readonly _tag: "DraggedOver";
|
|
1474
|
+
readonly id: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
1475
|
+
readonly zone: "after" | "before" | "inside";
|
|
1476
|
+
} | {
|
|
1477
|
+
readonly _tag: "DraggedOverPage";
|
|
1478
|
+
} | {
|
|
1479
|
+
readonly _tag: "DraggedOverRegion";
|
|
1480
|
+
readonly id: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
1481
|
+
readonly region: string;
|
|
1889
1482
|
} | {
|
|
1890
1483
|
readonly _tag: "DuplicateAsked";
|
|
1891
1484
|
readonly id: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
@@ -1899,8 +1492,50 @@ export declare const Builder: {
|
|
|
1899
1492
|
readonly index: number;
|
|
1900
1493
|
};
|
|
1901
1494
|
} | {
|
|
1902
|
-
readonly _tag: "
|
|
1903
|
-
readonly
|
|
1495
|
+
readonly _tag: "EditingAsked";
|
|
1496
|
+
readonly field: string;
|
|
1497
|
+
} | {
|
|
1498
|
+
readonly _tag: "EditingCancelled";
|
|
1499
|
+
readonly field: string;
|
|
1500
|
+
} | {
|
|
1501
|
+
readonly _tag: "EditingCommitted";
|
|
1502
|
+
readonly field: string;
|
|
1503
|
+
readonly text: string;
|
|
1504
|
+
} | {
|
|
1505
|
+
readonly _tag: "FieldTyped";
|
|
1506
|
+
readonly field: string;
|
|
1507
|
+
readonly text: string;
|
|
1508
|
+
} | {
|
|
1509
|
+
readonly _tag: "GotAnnouncerMessage";
|
|
1510
|
+
readonly message: {
|
|
1511
|
+
readonly _tag: "Announced";
|
|
1512
|
+
readonly message: string;
|
|
1513
|
+
readonly politeness: "assertive" | "polite";
|
|
1514
|
+
} | {
|
|
1515
|
+
readonly _tag: "Cleared";
|
|
1516
|
+
readonly generation: number;
|
|
1517
|
+
} | {
|
|
1518
|
+
readonly _tag: "Read";
|
|
1519
|
+
readonly generation: number;
|
|
1520
|
+
};
|
|
1521
|
+
} | {
|
|
1522
|
+
readonly _tag: "GotLayersMessage";
|
|
1523
|
+
readonly message: {
|
|
1524
|
+
readonly _tag: "Closed";
|
|
1525
|
+
readonly id: string;
|
|
1526
|
+
} | {
|
|
1527
|
+
readonly _tag: "Focused";
|
|
1528
|
+
readonly id: string;
|
|
1529
|
+
} | {
|
|
1530
|
+
readonly _tag: "Opened";
|
|
1531
|
+
readonly id: string;
|
|
1532
|
+
};
|
|
1533
|
+
} | {
|
|
1534
|
+
readonly _tag: "Hovered";
|
|
1535
|
+
readonly id: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
1536
|
+
} | {
|
|
1537
|
+
readonly _tag: "InsertAsked";
|
|
1538
|
+
readonly block: string;
|
|
1904
1539
|
readonly at: {
|
|
1905
1540
|
readonly _tag: "Root";
|
|
1906
1541
|
readonly index: number;
|
|
@@ -1911,30 +1546,19 @@ export declare const Builder: {
|
|
|
1911
1546
|
readonly index: number;
|
|
1912
1547
|
};
|
|
1913
1548
|
} | {
|
|
1914
|
-
readonly _tag: "
|
|
1915
|
-
readonly id: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
1916
|
-
} | {
|
|
1917
|
-
readonly _tag: "CutAsked";
|
|
1549
|
+
readonly _tag: "Inspected";
|
|
1918
1550
|
readonly id: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
1551
|
+
readonly form: string;
|
|
1552
|
+
readonly message: Schema.Json;
|
|
1919
1553
|
} | {
|
|
1920
|
-
readonly _tag: "
|
|
1921
|
-
|
|
1922
|
-
readonly
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
readonly _tag: "FieldTyped";
|
|
1929
|
-
readonly field: string;
|
|
1930
|
-
readonly text: string;
|
|
1931
|
-
} | {
|
|
1932
|
-
readonly _tag: "EditingCommitted";
|
|
1933
|
-
readonly field: string;
|
|
1934
|
-
readonly text: string;
|
|
1935
|
-
} | {
|
|
1936
|
-
readonly _tag: "EditingCancelled";
|
|
1937
|
-
readonly field: string;
|
|
1554
|
+
readonly _tag: "KeyPressed";
|
|
1555
|
+
readonly key: string;
|
|
1556
|
+
readonly modifiers: {
|
|
1557
|
+
readonly shiftKey: boolean;
|
|
1558
|
+
readonly ctrlKey: boolean;
|
|
1559
|
+
readonly altKey: boolean;
|
|
1560
|
+
readonly metaKey: boolean;
|
|
1561
|
+
};
|
|
1938
1562
|
} | {
|
|
1939
1563
|
readonly _tag: "Minted";
|
|
1940
1564
|
readonly ids: readonly (string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">)[];
|
|
@@ -2005,50 +1629,23 @@ export declare const Builder: {
|
|
|
2005
1629
|
readonly index: number;
|
|
2006
1630
|
};
|
|
2007
1631
|
};
|
|
2008
|
-
} | {
|
|
2009
|
-
readonly _tag: "KeyPressed";
|
|
2010
|
-
readonly key: string;
|
|
2011
|
-
readonly modifiers: {
|
|
2012
|
-
readonly shiftKey: boolean;
|
|
2013
|
-
readonly ctrlKey: boolean;
|
|
2014
|
-
readonly altKey: boolean;
|
|
2015
|
-
readonly metaKey: boolean;
|
|
2016
|
-
};
|
|
2017
|
-
} | {
|
|
2018
|
-
readonly _tag: "Undid";
|
|
2019
|
-
} | {
|
|
2020
|
-
readonly _tag: "Redid";
|
|
2021
1632
|
} | {
|
|
2022
1633
|
readonly _tag: "PanelChosen";
|
|
2023
1634
|
readonly panel: "insert" | "layers" | "properties";
|
|
2024
1635
|
} | {
|
|
2025
|
-
readonly _tag: "
|
|
2026
|
-
readonly viewport: "wide" | "medium" | "narrow";
|
|
1636
|
+
readonly _tag: "PasteAsked";
|
|
2027
1637
|
} | {
|
|
2028
|
-
readonly _tag: "
|
|
2029
|
-
readonly
|
|
2030
|
-
|
|
2031
|
-
readonly
|
|
1638
|
+
readonly _tag: "PatternAsked";
|
|
1639
|
+
readonly pattern: string;
|
|
1640
|
+
readonly at: {
|
|
1641
|
+
readonly _tag: "Root";
|
|
1642
|
+
readonly index: number;
|
|
2032
1643
|
} | {
|
|
2033
|
-
readonly _tag: "
|
|
2034
|
-
readonly
|
|
1644
|
+
readonly _tag: "Region";
|
|
1645
|
+
readonly parent: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
1646
|
+
readonly region: string;
|
|
1647
|
+
readonly index: number;
|
|
2035
1648
|
};
|
|
2036
|
-
} | {
|
|
2037
|
-
readonly _tag: "DraggedOver";
|
|
2038
|
-
readonly id: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
2039
|
-
readonly zone: "before" | "inside" | "after";
|
|
2040
|
-
} | {
|
|
2041
|
-
readonly _tag: "DraggedOverRegion";
|
|
2042
|
-
readonly id: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
2043
|
-
readonly region: string;
|
|
2044
|
-
} | {
|
|
2045
|
-
readonly _tag: "DraggedOff";
|
|
2046
|
-
} | {
|
|
2047
|
-
readonly _tag: "DraggedOverPage";
|
|
2048
|
-
} | {
|
|
2049
|
-
readonly _tag: "DragDropped";
|
|
2050
|
-
} | {
|
|
2051
|
-
readonly _tag: "DragCancelled";
|
|
2052
1649
|
} | {
|
|
2053
1650
|
readonly _tag: "PreviewChosen";
|
|
2054
1651
|
readonly key: string;
|
|
@@ -2057,10 +1654,17 @@ export declare const Builder: {
|
|
|
2057
1654
|
readonly _tag: "PreviewCleared";
|
|
2058
1655
|
readonly key: string;
|
|
2059
1656
|
} | {
|
|
2060
|
-
readonly _tag: "
|
|
1657
|
+
readonly _tag: "Redid";
|
|
1658
|
+
} | {
|
|
1659
|
+
readonly _tag: "Selected";
|
|
2061
1660
|
readonly id: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
2062
|
-
|
|
2063
|
-
readonly
|
|
1661
|
+
} | {
|
|
1662
|
+
readonly _tag: "Undid";
|
|
1663
|
+
} | {
|
|
1664
|
+
readonly _tag: "Unhovered";
|
|
1665
|
+
} | {
|
|
1666
|
+
readonly _tag: "ViewportChosen";
|
|
1667
|
+
readonly viewport: "medium" | "narrow" | "wide";
|
|
2064
1668
|
}, never, never, never, void, {}, {}>;
|
|
2065
1669
|
initial: {
|
|
2066
1670
|
readonly page: {
|
|
@@ -2129,7 +1733,7 @@ export declare const Builder: {
|
|
|
2129
1733
|
readonly selected: Option.Option<string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">>;
|
|
2130
1734
|
readonly hovered: Option.Option<string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">>;
|
|
2131
1735
|
readonly panel: "insert" | "layers" | "properties";
|
|
2132
|
-
readonly viewport: "
|
|
1736
|
+
readonly viewport: "medium" | "narrow" | "wide";
|
|
2133
1737
|
readonly refused: Option.Option<{
|
|
2134
1738
|
readonly code: string;
|
|
2135
1739
|
readonly message: string;
|
|
@@ -2144,7 +1748,7 @@ export declare const Builder: {
|
|
|
2144
1748
|
};
|
|
2145
1749
|
readonly over: Option.Option<{
|
|
2146
1750
|
readonly id: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
2147
|
-
readonly zone: "
|
|
1751
|
+
readonly zone: "after" | "before" | "inside";
|
|
2148
1752
|
readonly region: Option.Option<string>;
|
|
2149
1753
|
}>;
|
|
2150
1754
|
readonly at: Option.Option<{
|
|
@@ -2196,7 +1800,7 @@ export declare const Builder: {
|
|
|
2196
1800
|
readonly assertive: string;
|
|
2197
1801
|
readonly pending: {
|
|
2198
1802
|
readonly message: string;
|
|
2199
|
-
readonly politeness: "
|
|
1803
|
+
readonly politeness: "assertive" | "polite";
|
|
2200
1804
|
} | null;
|
|
2201
1805
|
readonly generation: number;
|
|
2202
1806
|
};
|
|
@@ -2273,7 +1877,7 @@ export declare const Builder: {
|
|
|
2273
1877
|
readonly selected: Option.Option<string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">>;
|
|
2274
1878
|
readonly hovered: Option.Option<string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">>;
|
|
2275
1879
|
readonly panel: "insert" | "layers" | "properties";
|
|
2276
|
-
readonly viewport: "
|
|
1880
|
+
readonly viewport: "medium" | "narrow" | "wide";
|
|
2277
1881
|
readonly refused: Option.Option<{
|
|
2278
1882
|
readonly code: string;
|
|
2279
1883
|
readonly message: string;
|
|
@@ -2288,7 +1892,7 @@ export declare const Builder: {
|
|
|
2288
1892
|
};
|
|
2289
1893
|
readonly over: Option.Option<{
|
|
2290
1894
|
readonly id: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
2291
|
-
readonly zone: "
|
|
1895
|
+
readonly zone: "after" | "before" | "inside";
|
|
2292
1896
|
readonly region: Option.Option<string>;
|
|
2293
1897
|
}>;
|
|
2294
1898
|
readonly at: Option.Option<{
|
|
@@ -2340,7 +1944,7 @@ export declare const Builder: {
|
|
|
2340
1944
|
readonly assertive: string;
|
|
2341
1945
|
readonly pending: {
|
|
2342
1946
|
readonly message: string;
|
|
2343
|
-
readonly politeness: "
|
|
1947
|
+
readonly politeness: "assertive" | "polite";
|
|
2344
1948
|
} | null;
|
|
2345
1949
|
readonly generation: number;
|
|
2346
1950
|
};
|
|
@@ -2349,55 +1953,44 @@ export declare const Builder: {
|
|
|
2349
1953
|
readonly toggled: readonly string[];
|
|
2350
1954
|
};
|
|
2351
1955
|
}, {
|
|
2352
|
-
readonly _tag: "
|
|
2353
|
-
readonly
|
|
2354
|
-
readonly _tag: "Focused";
|
|
2355
|
-
readonly id: string;
|
|
2356
|
-
} | {
|
|
2357
|
-
readonly _tag: "Opened";
|
|
2358
|
-
readonly id: string;
|
|
2359
|
-
} | {
|
|
2360
|
-
readonly _tag: "Closed";
|
|
2361
|
-
readonly id: string;
|
|
2362
|
-
};
|
|
1956
|
+
readonly _tag: "Applied";
|
|
1957
|
+
readonly op: Operation;
|
|
2363
1958
|
} | {
|
|
2364
|
-
readonly _tag: "
|
|
2365
|
-
readonly
|
|
2366
|
-
readonly _tag: "Read";
|
|
2367
|
-
readonly generation: number;
|
|
2368
|
-
} | {
|
|
2369
|
-
readonly _tag: "Cleared";
|
|
2370
|
-
readonly generation: number;
|
|
2371
|
-
} | {
|
|
2372
|
-
readonly _tag: "Announced";
|
|
2373
|
-
readonly message: string;
|
|
2374
|
-
readonly politeness: "polite" | "assertive";
|
|
2375
|
-
};
|
|
1959
|
+
readonly _tag: "ClipboardRead";
|
|
1960
|
+
readonly text: Option.Option<string>;
|
|
2376
1961
|
} | {
|
|
2377
|
-
readonly _tag: "
|
|
1962
|
+
readonly _tag: "CopyAsked";
|
|
2378
1963
|
readonly id: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
2379
1964
|
} | {
|
|
2380
|
-
readonly _tag: "
|
|
2381
|
-
} | {
|
|
2382
|
-
readonly _tag: "Hovered";
|
|
1965
|
+
readonly _tag: "CutAsked";
|
|
2383
1966
|
readonly id: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
2384
1967
|
} | {
|
|
2385
|
-
readonly _tag: "
|
|
1968
|
+
readonly _tag: "Deselected";
|
|
2386
1969
|
} | {
|
|
2387
|
-
readonly _tag: "
|
|
2388
|
-
readonly op: Operation;
|
|
1970
|
+
readonly _tag: "DragCancelled";
|
|
2389
1971
|
} | {
|
|
2390
|
-
readonly _tag: "
|
|
2391
|
-
|
|
2392
|
-
readonly
|
|
2393
|
-
|
|
2394
|
-
readonly
|
|
1972
|
+
readonly _tag: "DragDropped";
|
|
1973
|
+
} | {
|
|
1974
|
+
readonly _tag: "DragStarted";
|
|
1975
|
+
readonly source: {
|
|
1976
|
+
readonly _tag: "Existing";
|
|
1977
|
+
readonly id: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
2395
1978
|
} | {
|
|
2396
|
-
readonly _tag: "
|
|
2397
|
-
readonly
|
|
2398
|
-
readonly region: string;
|
|
2399
|
-
readonly index: number;
|
|
1979
|
+
readonly _tag: "New";
|
|
1980
|
+
readonly block: string;
|
|
2400
1981
|
};
|
|
1982
|
+
} | {
|
|
1983
|
+
readonly _tag: "DraggedOff";
|
|
1984
|
+
} | {
|
|
1985
|
+
readonly _tag: "DraggedOver";
|
|
1986
|
+
readonly id: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
1987
|
+
readonly zone: "after" | "before" | "inside";
|
|
1988
|
+
} | {
|
|
1989
|
+
readonly _tag: "DraggedOverPage";
|
|
1990
|
+
} | {
|
|
1991
|
+
readonly _tag: "DraggedOverRegion";
|
|
1992
|
+
readonly id: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
1993
|
+
readonly region: string;
|
|
2401
1994
|
} | {
|
|
2402
1995
|
readonly _tag: "DuplicateAsked";
|
|
2403
1996
|
readonly id: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
@@ -2411,8 +2004,50 @@ export declare const Builder: {
|
|
|
2411
2004
|
readonly index: number;
|
|
2412
2005
|
};
|
|
2413
2006
|
} | {
|
|
2414
|
-
readonly _tag: "
|
|
2415
|
-
readonly
|
|
2007
|
+
readonly _tag: "EditingAsked";
|
|
2008
|
+
readonly field: string;
|
|
2009
|
+
} | {
|
|
2010
|
+
readonly _tag: "EditingCancelled";
|
|
2011
|
+
readonly field: string;
|
|
2012
|
+
} | {
|
|
2013
|
+
readonly _tag: "EditingCommitted";
|
|
2014
|
+
readonly field: string;
|
|
2015
|
+
readonly text: string;
|
|
2016
|
+
} | {
|
|
2017
|
+
readonly _tag: "FieldTyped";
|
|
2018
|
+
readonly field: string;
|
|
2019
|
+
readonly text: string;
|
|
2020
|
+
} | {
|
|
2021
|
+
readonly _tag: "GotAnnouncerMessage";
|
|
2022
|
+
readonly message: {
|
|
2023
|
+
readonly _tag: "Announced";
|
|
2024
|
+
readonly message: string;
|
|
2025
|
+
readonly politeness: "assertive" | "polite";
|
|
2026
|
+
} | {
|
|
2027
|
+
readonly _tag: "Cleared";
|
|
2028
|
+
readonly generation: number;
|
|
2029
|
+
} | {
|
|
2030
|
+
readonly _tag: "Read";
|
|
2031
|
+
readonly generation: number;
|
|
2032
|
+
};
|
|
2033
|
+
} | {
|
|
2034
|
+
readonly _tag: "GotLayersMessage";
|
|
2035
|
+
readonly message: {
|
|
2036
|
+
readonly _tag: "Closed";
|
|
2037
|
+
readonly id: string;
|
|
2038
|
+
} | {
|
|
2039
|
+
readonly _tag: "Focused";
|
|
2040
|
+
readonly id: string;
|
|
2041
|
+
} | {
|
|
2042
|
+
readonly _tag: "Opened";
|
|
2043
|
+
readonly id: string;
|
|
2044
|
+
};
|
|
2045
|
+
} | {
|
|
2046
|
+
readonly _tag: "Hovered";
|
|
2047
|
+
readonly id: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
2048
|
+
} | {
|
|
2049
|
+
readonly _tag: "InsertAsked";
|
|
2050
|
+
readonly block: string;
|
|
2416
2051
|
readonly at: {
|
|
2417
2052
|
readonly _tag: "Root";
|
|
2418
2053
|
readonly index: number;
|
|
@@ -2423,30 +2058,19 @@ export declare const Builder: {
|
|
|
2423
2058
|
readonly index: number;
|
|
2424
2059
|
};
|
|
2425
2060
|
} | {
|
|
2426
|
-
readonly _tag: "
|
|
2427
|
-
readonly id: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
2428
|
-
} | {
|
|
2429
|
-
readonly _tag: "CutAsked";
|
|
2061
|
+
readonly _tag: "Inspected";
|
|
2430
2062
|
readonly id: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
2063
|
+
readonly form: string;
|
|
2064
|
+
readonly message: Schema.Json;
|
|
2431
2065
|
} | {
|
|
2432
|
-
readonly _tag: "
|
|
2433
|
-
|
|
2434
|
-
readonly
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
readonly _tag: "FieldTyped";
|
|
2441
|
-
readonly field: string;
|
|
2442
|
-
readonly text: string;
|
|
2443
|
-
} | {
|
|
2444
|
-
readonly _tag: "EditingCommitted";
|
|
2445
|
-
readonly field: string;
|
|
2446
|
-
readonly text: string;
|
|
2447
|
-
} | {
|
|
2448
|
-
readonly _tag: "EditingCancelled";
|
|
2449
|
-
readonly field: string;
|
|
2066
|
+
readonly _tag: "KeyPressed";
|
|
2067
|
+
readonly key: string;
|
|
2068
|
+
readonly modifiers: {
|
|
2069
|
+
readonly shiftKey: boolean;
|
|
2070
|
+
readonly ctrlKey: boolean;
|
|
2071
|
+
readonly altKey: boolean;
|
|
2072
|
+
readonly metaKey: boolean;
|
|
2073
|
+
};
|
|
2450
2074
|
} | {
|
|
2451
2075
|
readonly _tag: "Minted";
|
|
2452
2076
|
readonly ids: readonly (string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">)[];
|
|
@@ -2508,59 +2132,32 @@ export declare const Builder: {
|
|
|
2508
2132
|
readonly _tag: "Pattern";
|
|
2509
2133
|
readonly pattern: string;
|
|
2510
2134
|
readonly at: {
|
|
2511
|
-
readonly _tag: "Root";
|
|
2512
|
-
readonly index: number;
|
|
2513
|
-
} | {
|
|
2514
|
-
readonly _tag: "Region";
|
|
2515
|
-
readonly parent: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
2516
|
-
readonly region: string;
|
|
2517
|
-
readonly index: number;
|
|
2518
|
-
};
|
|
2519
|
-
};
|
|
2520
|
-
} | {
|
|
2521
|
-
readonly _tag: "KeyPressed";
|
|
2522
|
-
readonly key: string;
|
|
2523
|
-
readonly modifiers: {
|
|
2524
|
-
readonly shiftKey: boolean;
|
|
2525
|
-
readonly ctrlKey: boolean;
|
|
2526
|
-
readonly altKey: boolean;
|
|
2527
|
-
readonly metaKey: boolean;
|
|
2135
|
+
readonly _tag: "Root";
|
|
2136
|
+
readonly index: number;
|
|
2137
|
+
} | {
|
|
2138
|
+
readonly _tag: "Region";
|
|
2139
|
+
readonly parent: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
2140
|
+
readonly region: string;
|
|
2141
|
+
readonly index: number;
|
|
2142
|
+
};
|
|
2528
2143
|
};
|
|
2529
|
-
} | {
|
|
2530
|
-
readonly _tag: "Undid";
|
|
2531
|
-
} | {
|
|
2532
|
-
readonly _tag: "Redid";
|
|
2533
2144
|
} | {
|
|
2534
2145
|
readonly _tag: "PanelChosen";
|
|
2535
2146
|
readonly panel: "insert" | "layers" | "properties";
|
|
2536
2147
|
} | {
|
|
2537
|
-
readonly _tag: "
|
|
2538
|
-
readonly viewport: "wide" | "medium" | "narrow";
|
|
2148
|
+
readonly _tag: "PasteAsked";
|
|
2539
2149
|
} | {
|
|
2540
|
-
readonly _tag: "
|
|
2541
|
-
readonly
|
|
2542
|
-
|
|
2543
|
-
readonly
|
|
2150
|
+
readonly _tag: "PatternAsked";
|
|
2151
|
+
readonly pattern: string;
|
|
2152
|
+
readonly at: {
|
|
2153
|
+
readonly _tag: "Root";
|
|
2154
|
+
readonly index: number;
|
|
2544
2155
|
} | {
|
|
2545
|
-
readonly _tag: "
|
|
2546
|
-
readonly
|
|
2156
|
+
readonly _tag: "Region";
|
|
2157
|
+
readonly parent: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
2158
|
+
readonly region: string;
|
|
2159
|
+
readonly index: number;
|
|
2547
2160
|
};
|
|
2548
|
-
} | {
|
|
2549
|
-
readonly _tag: "DraggedOver";
|
|
2550
|
-
readonly id: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
2551
|
-
readonly zone: "before" | "inside" | "after";
|
|
2552
|
-
} | {
|
|
2553
|
-
readonly _tag: "DraggedOverRegion";
|
|
2554
|
-
readonly id: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
2555
|
-
readonly region: string;
|
|
2556
|
-
} | {
|
|
2557
|
-
readonly _tag: "DraggedOff";
|
|
2558
|
-
} | {
|
|
2559
|
-
readonly _tag: "DraggedOverPage";
|
|
2560
|
-
} | {
|
|
2561
|
-
readonly _tag: "DragDropped";
|
|
2562
|
-
} | {
|
|
2563
|
-
readonly _tag: "DragCancelled";
|
|
2564
2161
|
} | {
|
|
2565
2162
|
readonly _tag: "PreviewChosen";
|
|
2566
2163
|
readonly key: string;
|
|
@@ -2569,10 +2166,17 @@ export declare const Builder: {
|
|
|
2569
2166
|
readonly _tag: "PreviewCleared";
|
|
2570
2167
|
readonly key: string;
|
|
2571
2168
|
} | {
|
|
2572
|
-
readonly _tag: "
|
|
2169
|
+
readonly _tag: "Redid";
|
|
2170
|
+
} | {
|
|
2171
|
+
readonly _tag: "Selected";
|
|
2573
2172
|
readonly id: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
2574
|
-
|
|
2575
|
-
readonly
|
|
2173
|
+
} | {
|
|
2174
|
+
readonly _tag: "Undid";
|
|
2175
|
+
} | {
|
|
2176
|
+
readonly _tag: "Unhovered";
|
|
2177
|
+
} | {
|
|
2178
|
+
readonly _tag: "ViewportChosen";
|
|
2179
|
+
readonly viewport: "medium" | "narrow" | "wide";
|
|
2576
2180
|
}, {
|
|
2577
2181
|
readonly format: 1;
|
|
2578
2182
|
readonly roots: readonly (string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">)[];
|
|
@@ -2597,7 +2201,7 @@ export declare const Builder: {
|
|
|
2597
2201
|
* The same control, drawn by another view, such as
|
|
2598
2202
|
* `BuilderView.submodel(view)` from `foldkit-mixins-builder`.
|
|
2599
2203
|
*/
|
|
2600
|
-
inputWith: <ViewInputs>(drawn: Submodel.View<Model
|
|
2204
|
+
inputWith: <ViewInputs>(drawn: Submodel.View<Model, Message, ViewInputs>) => import("foldkit-form").BundleControl<{
|
|
2601
2205
|
readonly page: {
|
|
2602
2206
|
readonly past: readonly {
|
|
2603
2207
|
readonly format: 1;
|
|
@@ -2664,7 +2268,7 @@ export declare const Builder: {
|
|
|
2664
2268
|
readonly selected: Option.Option<string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">>;
|
|
2665
2269
|
readonly hovered: Option.Option<string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">>;
|
|
2666
2270
|
readonly panel: "insert" | "layers" | "properties";
|
|
2667
|
-
readonly viewport: "
|
|
2271
|
+
readonly viewport: "medium" | "narrow" | "wide";
|
|
2668
2272
|
readonly refused: Option.Option<{
|
|
2669
2273
|
readonly code: string;
|
|
2670
2274
|
readonly message: string;
|
|
@@ -2679,7 +2283,7 @@ export declare const Builder: {
|
|
|
2679
2283
|
};
|
|
2680
2284
|
readonly over: Option.Option<{
|
|
2681
2285
|
readonly id: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
2682
|
-
readonly zone: "
|
|
2286
|
+
readonly zone: "after" | "before" | "inside";
|
|
2683
2287
|
readonly region: Option.Option<string>;
|
|
2684
2288
|
}>;
|
|
2685
2289
|
readonly at: Option.Option<{
|
|
@@ -2731,7 +2335,7 @@ export declare const Builder: {
|
|
|
2731
2335
|
readonly assertive: string;
|
|
2732
2336
|
readonly pending: {
|
|
2733
2337
|
readonly message: string;
|
|
2734
|
-
readonly politeness: "
|
|
2338
|
+
readonly politeness: "assertive" | "polite";
|
|
2735
2339
|
} | null;
|
|
2736
2340
|
readonly generation: number;
|
|
2737
2341
|
};
|
|
@@ -2740,55 +2344,44 @@ export declare const Builder: {
|
|
|
2740
2344
|
readonly toggled: readonly string[];
|
|
2741
2345
|
};
|
|
2742
2346
|
}, {
|
|
2743
|
-
readonly _tag: "
|
|
2744
|
-
readonly
|
|
2745
|
-
readonly _tag: "Focused";
|
|
2746
|
-
readonly id: string;
|
|
2747
|
-
} | {
|
|
2748
|
-
readonly _tag: "Opened";
|
|
2749
|
-
readonly id: string;
|
|
2750
|
-
} | {
|
|
2751
|
-
readonly _tag: "Closed";
|
|
2752
|
-
readonly id: string;
|
|
2753
|
-
};
|
|
2347
|
+
readonly _tag: "Applied";
|
|
2348
|
+
readonly op: Operation;
|
|
2754
2349
|
} | {
|
|
2755
|
-
readonly _tag: "
|
|
2756
|
-
readonly
|
|
2757
|
-
readonly _tag: "Read";
|
|
2758
|
-
readonly generation: number;
|
|
2759
|
-
} | {
|
|
2760
|
-
readonly _tag: "Cleared";
|
|
2761
|
-
readonly generation: number;
|
|
2762
|
-
} | {
|
|
2763
|
-
readonly _tag: "Announced";
|
|
2764
|
-
readonly message: string;
|
|
2765
|
-
readonly politeness: "polite" | "assertive";
|
|
2766
|
-
};
|
|
2350
|
+
readonly _tag: "ClipboardRead";
|
|
2351
|
+
readonly text: Option.Option<string>;
|
|
2767
2352
|
} | {
|
|
2768
|
-
readonly _tag: "
|
|
2353
|
+
readonly _tag: "CopyAsked";
|
|
2769
2354
|
readonly id: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
2770
2355
|
} | {
|
|
2771
|
-
readonly _tag: "
|
|
2772
|
-
} | {
|
|
2773
|
-
readonly _tag: "Hovered";
|
|
2356
|
+
readonly _tag: "CutAsked";
|
|
2774
2357
|
readonly id: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
2775
2358
|
} | {
|
|
2776
|
-
readonly _tag: "
|
|
2359
|
+
readonly _tag: "Deselected";
|
|
2777
2360
|
} | {
|
|
2778
|
-
readonly _tag: "
|
|
2779
|
-
readonly op: Operation;
|
|
2361
|
+
readonly _tag: "DragCancelled";
|
|
2780
2362
|
} | {
|
|
2781
|
-
readonly _tag: "
|
|
2782
|
-
|
|
2783
|
-
readonly
|
|
2784
|
-
|
|
2785
|
-
readonly
|
|
2363
|
+
readonly _tag: "DragDropped";
|
|
2364
|
+
} | {
|
|
2365
|
+
readonly _tag: "DragStarted";
|
|
2366
|
+
readonly source: {
|
|
2367
|
+
readonly _tag: "Existing";
|
|
2368
|
+
readonly id: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
2786
2369
|
} | {
|
|
2787
|
-
readonly _tag: "
|
|
2788
|
-
readonly
|
|
2789
|
-
readonly region: string;
|
|
2790
|
-
readonly index: number;
|
|
2370
|
+
readonly _tag: "New";
|
|
2371
|
+
readonly block: string;
|
|
2791
2372
|
};
|
|
2373
|
+
} | {
|
|
2374
|
+
readonly _tag: "DraggedOff";
|
|
2375
|
+
} | {
|
|
2376
|
+
readonly _tag: "DraggedOver";
|
|
2377
|
+
readonly id: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
2378
|
+
readonly zone: "after" | "before" | "inside";
|
|
2379
|
+
} | {
|
|
2380
|
+
readonly _tag: "DraggedOverPage";
|
|
2381
|
+
} | {
|
|
2382
|
+
readonly _tag: "DraggedOverRegion";
|
|
2383
|
+
readonly id: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
2384
|
+
readonly region: string;
|
|
2792
2385
|
} | {
|
|
2793
2386
|
readonly _tag: "DuplicateAsked";
|
|
2794
2387
|
readonly id: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
@@ -2802,8 +2395,50 @@ export declare const Builder: {
|
|
|
2802
2395
|
readonly index: number;
|
|
2803
2396
|
};
|
|
2804
2397
|
} | {
|
|
2805
|
-
readonly _tag: "
|
|
2806
|
-
readonly
|
|
2398
|
+
readonly _tag: "EditingAsked";
|
|
2399
|
+
readonly field: string;
|
|
2400
|
+
} | {
|
|
2401
|
+
readonly _tag: "EditingCancelled";
|
|
2402
|
+
readonly field: string;
|
|
2403
|
+
} | {
|
|
2404
|
+
readonly _tag: "EditingCommitted";
|
|
2405
|
+
readonly field: string;
|
|
2406
|
+
readonly text: string;
|
|
2407
|
+
} | {
|
|
2408
|
+
readonly _tag: "FieldTyped";
|
|
2409
|
+
readonly field: string;
|
|
2410
|
+
readonly text: string;
|
|
2411
|
+
} | {
|
|
2412
|
+
readonly _tag: "GotAnnouncerMessage";
|
|
2413
|
+
readonly message: {
|
|
2414
|
+
readonly _tag: "Announced";
|
|
2415
|
+
readonly message: string;
|
|
2416
|
+
readonly politeness: "assertive" | "polite";
|
|
2417
|
+
} | {
|
|
2418
|
+
readonly _tag: "Cleared";
|
|
2419
|
+
readonly generation: number;
|
|
2420
|
+
} | {
|
|
2421
|
+
readonly _tag: "Read";
|
|
2422
|
+
readonly generation: number;
|
|
2423
|
+
};
|
|
2424
|
+
} | {
|
|
2425
|
+
readonly _tag: "GotLayersMessage";
|
|
2426
|
+
readonly message: {
|
|
2427
|
+
readonly _tag: "Closed";
|
|
2428
|
+
readonly id: string;
|
|
2429
|
+
} | {
|
|
2430
|
+
readonly _tag: "Focused";
|
|
2431
|
+
readonly id: string;
|
|
2432
|
+
} | {
|
|
2433
|
+
readonly _tag: "Opened";
|
|
2434
|
+
readonly id: string;
|
|
2435
|
+
};
|
|
2436
|
+
} | {
|
|
2437
|
+
readonly _tag: "Hovered";
|
|
2438
|
+
readonly id: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
2439
|
+
} | {
|
|
2440
|
+
readonly _tag: "InsertAsked";
|
|
2441
|
+
readonly block: string;
|
|
2807
2442
|
readonly at: {
|
|
2808
2443
|
readonly _tag: "Root";
|
|
2809
2444
|
readonly index: number;
|
|
@@ -2814,30 +2449,19 @@ export declare const Builder: {
|
|
|
2814
2449
|
readonly index: number;
|
|
2815
2450
|
};
|
|
2816
2451
|
} | {
|
|
2817
|
-
readonly _tag: "
|
|
2818
|
-
readonly id: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
2819
|
-
} | {
|
|
2820
|
-
readonly _tag: "CutAsked";
|
|
2452
|
+
readonly _tag: "Inspected";
|
|
2821
2453
|
readonly id: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
2454
|
+
readonly form: string;
|
|
2455
|
+
readonly message: Schema.Json;
|
|
2822
2456
|
} | {
|
|
2823
|
-
readonly _tag: "
|
|
2824
|
-
|
|
2825
|
-
readonly
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
readonly _tag: "FieldTyped";
|
|
2832
|
-
readonly field: string;
|
|
2833
|
-
readonly text: string;
|
|
2834
|
-
} | {
|
|
2835
|
-
readonly _tag: "EditingCommitted";
|
|
2836
|
-
readonly field: string;
|
|
2837
|
-
readonly text: string;
|
|
2838
|
-
} | {
|
|
2839
|
-
readonly _tag: "EditingCancelled";
|
|
2840
|
-
readonly field: string;
|
|
2457
|
+
readonly _tag: "KeyPressed";
|
|
2458
|
+
readonly key: string;
|
|
2459
|
+
readonly modifiers: {
|
|
2460
|
+
readonly shiftKey: boolean;
|
|
2461
|
+
readonly ctrlKey: boolean;
|
|
2462
|
+
readonly altKey: boolean;
|
|
2463
|
+
readonly metaKey: boolean;
|
|
2464
|
+
};
|
|
2841
2465
|
} | {
|
|
2842
2466
|
readonly _tag: "Minted";
|
|
2843
2467
|
readonly ids: readonly (string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">)[];
|
|
@@ -2908,50 +2532,23 @@ export declare const Builder: {
|
|
|
2908
2532
|
readonly index: number;
|
|
2909
2533
|
};
|
|
2910
2534
|
};
|
|
2911
|
-
} | {
|
|
2912
|
-
readonly _tag: "KeyPressed";
|
|
2913
|
-
readonly key: string;
|
|
2914
|
-
readonly modifiers: {
|
|
2915
|
-
readonly shiftKey: boolean;
|
|
2916
|
-
readonly ctrlKey: boolean;
|
|
2917
|
-
readonly altKey: boolean;
|
|
2918
|
-
readonly metaKey: boolean;
|
|
2919
|
-
};
|
|
2920
|
-
} | {
|
|
2921
|
-
readonly _tag: "Undid";
|
|
2922
|
-
} | {
|
|
2923
|
-
readonly _tag: "Redid";
|
|
2924
2535
|
} | {
|
|
2925
2536
|
readonly _tag: "PanelChosen";
|
|
2926
2537
|
readonly panel: "insert" | "layers" | "properties";
|
|
2927
2538
|
} | {
|
|
2928
|
-
readonly _tag: "
|
|
2929
|
-
readonly viewport: "wide" | "medium" | "narrow";
|
|
2539
|
+
readonly _tag: "PasteAsked";
|
|
2930
2540
|
} | {
|
|
2931
|
-
readonly _tag: "
|
|
2932
|
-
readonly
|
|
2933
|
-
|
|
2934
|
-
readonly
|
|
2541
|
+
readonly _tag: "PatternAsked";
|
|
2542
|
+
readonly pattern: string;
|
|
2543
|
+
readonly at: {
|
|
2544
|
+
readonly _tag: "Root";
|
|
2545
|
+
readonly index: number;
|
|
2935
2546
|
} | {
|
|
2936
|
-
readonly _tag: "
|
|
2937
|
-
readonly
|
|
2547
|
+
readonly _tag: "Region";
|
|
2548
|
+
readonly parent: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
2549
|
+
readonly region: string;
|
|
2550
|
+
readonly index: number;
|
|
2938
2551
|
};
|
|
2939
|
-
} | {
|
|
2940
|
-
readonly _tag: "DraggedOver";
|
|
2941
|
-
readonly id: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
2942
|
-
readonly zone: "before" | "inside" | "after";
|
|
2943
|
-
} | {
|
|
2944
|
-
readonly _tag: "DraggedOverRegion";
|
|
2945
|
-
readonly id: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
2946
|
-
readonly region: string;
|
|
2947
|
-
} | {
|
|
2948
|
-
readonly _tag: "DraggedOff";
|
|
2949
|
-
} | {
|
|
2950
|
-
readonly _tag: "DraggedOverPage";
|
|
2951
|
-
} | {
|
|
2952
|
-
readonly _tag: "DragDropped";
|
|
2953
|
-
} | {
|
|
2954
|
-
readonly _tag: "DragCancelled";
|
|
2955
2552
|
} | {
|
|
2956
2553
|
readonly _tag: "PreviewChosen";
|
|
2957
2554
|
readonly key: string;
|
|
@@ -2960,10 +2557,17 @@ export declare const Builder: {
|
|
|
2960
2557
|
readonly _tag: "PreviewCleared";
|
|
2961
2558
|
readonly key: string;
|
|
2962
2559
|
} | {
|
|
2963
|
-
readonly _tag: "
|
|
2560
|
+
readonly _tag: "Redid";
|
|
2561
|
+
} | {
|
|
2562
|
+
readonly _tag: "Selected";
|
|
2964
2563
|
readonly id: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
2965
|
-
|
|
2966
|
-
readonly
|
|
2564
|
+
} | {
|
|
2565
|
+
readonly _tag: "Undid";
|
|
2566
|
+
} | {
|
|
2567
|
+
readonly _tag: "Unhovered";
|
|
2568
|
+
} | {
|
|
2569
|
+
readonly _tag: "ViewportChosen";
|
|
2570
|
+
readonly viewport: "medium" | "narrow" | "wide";
|
|
2967
2571
|
}, {
|
|
2968
2572
|
readonly format: 1;
|
|
2969
2573
|
readonly roots: readonly (string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">)[];
|
|
@@ -2985,7 +2589,7 @@ export declare const Builder: {
|
|
|
2985
2589
|
};
|
|
2986
2590
|
}, {}>;
|
|
2987
2591
|
/** Where a new node of a Block goes, given the selection; none where it may not go. */
|
|
2988
|
-
placeFor: (document: Document, selected: Option.Option<NodeId>, block: Blocks[
|
|
2592
|
+
placeFor: (document: Document, selected: Option.Option<NodeId>, block: Blocks['name']) => Option.Option<{
|
|
2989
2593
|
readonly _tag: "Root";
|
|
2990
2594
|
readonly index: number;
|
|
2991
2595
|
} | {
|
|
@@ -3004,7 +2608,7 @@ export declare const Builder: {
|
|
|
3004
2608
|
readonly region: string;
|
|
3005
2609
|
readonly index: number;
|
|
3006
2610
|
}>;
|
|
3007
|
-
moveBy:
|
|
2611
|
+
moveBy: typeof moveBy;
|
|
3008
2612
|
/** Where what is dragged over `target`, in `zone`, would go; none where it may not. */
|
|
3009
2613
|
dropAt: (document: Document, dragged: DragSource, target: NodeId, zone: DropZone) => Option.Option<{
|
|
3010
2614
|
readonly _tag: "Root";
|
|
@@ -3015,23 +2619,23 @@ export declare const Builder: {
|
|
|
3015
2619
|
readonly region: string;
|
|
3016
2620
|
readonly index: number;
|
|
3017
2621
|
}>;
|
|
3018
|
-
replace:
|
|
3019
|
-
settle:
|
|
2622
|
+
replace: typeof replace;
|
|
2623
|
+
settle: typeof settle;
|
|
3020
2624
|
/** The editor's commands: what a key, a node's action or the toolbar runs. */
|
|
3021
2625
|
commands: readonly BuilderCommand[];
|
|
3022
|
-
keyCommand: (model: Pick<Model
|
|
3023
|
-
keyPressed: (model: Pick<Model
|
|
2626
|
+
keyCommand: (model: Pick<Model, 'page' | 'selected' | 'editing'>, key: string, modifiers: KeyboardModifiers) => Option.Option<Message>;
|
|
2627
|
+
keyPressed: (model: Pick<Model, 'editing'>, key: string, modifiers: KeyboardModifiers) => Option.Option<Message>;
|
|
3024
2628
|
/**
|
|
3025
2629
|
* The selected node's settings form and its Model, for the inspector to
|
|
3026
2630
|
* draw: the Model it holds for the node, else one filled from the props.
|
|
3027
2631
|
*/
|
|
3028
|
-
inspecting: (model: Pick<Model
|
|
2632
|
+
inspecting: (model: Pick<Model, 'page' | 'selected' | 'inspector'>) => Option.Option<Inspecting>;
|
|
3029
2633
|
/** The Blocks a new node may be, in the Catalog's order: those with starting props. */
|
|
3030
2634
|
offered: string[];
|
|
3031
2635
|
/** The Document a Builder Model is editing: its history's present. */
|
|
3032
|
-
document:
|
|
2636
|
+
document: typeof documentOf;
|
|
3033
2637
|
};
|
|
3034
2638
|
};
|
|
3035
2639
|
//#endregion
|
|
3036
|
-
export {
|
|
2640
|
+
export type { EditWords, Settings };
|
|
3037
2641
|
//# sourceMappingURL=index.d.mts.map
|