foldkit-builder 0.1.2 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -6
- package/dist/index.d.mts +677 -1043
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +28 -0
- package/dist/index.mjs.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, {}, {
|
|
@@ -568,19 +186,42 @@ declare const make: (name: string, fields: Readonly<Record<string, Schema.Top>>,
|
|
|
568
186
|
field: (model: import("foldkit-form").FormModel<Readonly<Record<string, Schema.Top>>, {
|
|
569
187
|
readonly [x: string]: import("foldkit-entity").EntityField<string, string, Schema.Top>;
|
|
570
188
|
}, import("foldkit-form").ControlsOf<Readonly<Record<string, Control<unknown>>>>>, key: string) => import("foldkit/fieldValidation").Field<import("foldkit-form").Draft>;
|
|
571
|
-
control: <K extends
|
|
189
|
+
control: <K extends keyof import("foldkit-form").ControlsOf<Readonly<Record<string, Control<unknown>>>> & Exclude<string & string, import("foldkit-form").NestedKey<{
|
|
190
|
+
readonly [x: string]: import("foldkit-entity").EntityField<string, string, Schema.Top>;
|
|
191
|
+
}>>>(key: K) => {
|
|
572
192
|
readonly field: (model: import("foldkit-form").FormModel<Readonly<Record<string, Schema.Top>>, {
|
|
573
193
|
readonly [x: string]: import("foldkit-entity").EntityField<string, string, Schema.Top>;
|
|
574
194
|
}, import("foldkit-form").ControlsOf<Readonly<Record<string, Control<unknown>>>>>) => import("foldkit/fieldValidation").Field<string>;
|
|
575
195
|
readonly send: (message: never) => {
|
|
196
|
+
readonly _tag: "About";
|
|
197
|
+
readonly subject: {
|
|
198
|
+
readonly [x: string]: string;
|
|
199
|
+
};
|
|
200
|
+
} | {
|
|
201
|
+
readonly _tag: "Blurred";
|
|
202
|
+
readonly key: string;
|
|
203
|
+
} | {
|
|
204
|
+
readonly _tag: "Changed";
|
|
205
|
+
readonly key: string;
|
|
206
|
+
readonly value: string | boolean | readonly string[];
|
|
207
|
+
} | {
|
|
208
|
+
readonly _tag: "Checked";
|
|
209
|
+
readonly key: string;
|
|
210
|
+
readonly draft: string | boolean | readonly string[];
|
|
211
|
+
readonly error: string | null;
|
|
212
|
+
} | {
|
|
213
|
+
readonly _tag: "Control";
|
|
214
|
+
readonly key: never;
|
|
215
|
+
readonly message: unknown;
|
|
216
|
+
} | {
|
|
576
217
|
readonly _tag: "Nested";
|
|
577
218
|
readonly key: string;
|
|
578
219
|
readonly row: string;
|
|
579
220
|
readonly message: unknown;
|
|
580
221
|
} | {
|
|
581
|
-
readonly _tag: "
|
|
582
|
-
|
|
583
|
-
readonly
|
|
222
|
+
readonly _tag: "Refused";
|
|
223
|
+
readonly key: string;
|
|
224
|
+
readonly error: string;
|
|
584
225
|
} | {
|
|
585
226
|
readonly _tag: "Reset";
|
|
586
227
|
} | {
|
|
@@ -590,35 +231,14 @@ declare const make: (name: string, fields: Readonly<Record<string, Schema.Top>>,
|
|
|
590
231
|
readonly _tag: "RowRemoved";
|
|
591
232
|
readonly key: string;
|
|
592
233
|
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
234
|
} | {
|
|
606
235
|
readonly _tag: "Searched";
|
|
607
236
|
readonly key: string;
|
|
608
237
|
readonly text: string;
|
|
609
238
|
} | {
|
|
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;
|
|
239
|
+
readonly _tag: "Submitted";
|
|
618
240
|
} | {
|
|
619
|
-
readonly _tag: "
|
|
620
|
-
readonly key: never;
|
|
621
|
-
readonly message: unknown;
|
|
241
|
+
readonly _tag: "ValidatedAll";
|
|
622
242
|
};
|
|
623
243
|
};
|
|
624
244
|
search: (model: import("foldkit-form").FormModel<Readonly<Record<string, Schema.Top>>, {
|
|
@@ -628,15 +248,38 @@ declare const make: (name: string, fields: Readonly<Record<string, Schema.Top>>,
|
|
|
628
248
|
readonly [x: string]: import("foldkit-entity").EntityField<string, string, Schema.Top>;
|
|
629
249
|
}, import("foldkit-form").ControlsOf<Readonly<Record<string, Control<unknown>>>>>) => Readonly<Record<string, string>>;
|
|
630
250
|
nested: {};
|
|
631
|
-
row: <K extends
|
|
251
|
+
row: <K extends Extract<string & string, import("foldkit-form").NestedKey<{
|
|
252
|
+
readonly [x: string]: import("foldkit-entity").EntityField<string, string, Schema.Top>;
|
|
253
|
+
}>>>(key: K, row: string) => import("foldkit-form").RowHandle<K extends never ? NonNullable<{}[K]> : import("foldkit-form").NestedForm, {
|
|
254
|
+
readonly _tag: "About";
|
|
255
|
+
readonly subject: {
|
|
256
|
+
readonly [x: string]: string;
|
|
257
|
+
};
|
|
258
|
+
} | {
|
|
259
|
+
readonly _tag: "Blurred";
|
|
260
|
+
readonly key: string;
|
|
261
|
+
} | {
|
|
262
|
+
readonly _tag: "Changed";
|
|
263
|
+
readonly key: string;
|
|
264
|
+
readonly value: string | boolean | readonly string[];
|
|
265
|
+
} | {
|
|
266
|
+
readonly _tag: "Checked";
|
|
267
|
+
readonly key: string;
|
|
268
|
+
readonly draft: string | boolean | readonly string[];
|
|
269
|
+
readonly error: string | null;
|
|
270
|
+
} | {
|
|
271
|
+
readonly _tag: "Control";
|
|
272
|
+
readonly key: never;
|
|
273
|
+
readonly message: unknown;
|
|
274
|
+
} | {
|
|
632
275
|
readonly _tag: "Nested";
|
|
633
276
|
readonly key: string;
|
|
634
277
|
readonly row: string;
|
|
635
278
|
readonly message: unknown;
|
|
636
279
|
} | {
|
|
637
|
-
readonly _tag: "
|
|
638
|
-
|
|
639
|
-
readonly
|
|
280
|
+
readonly _tag: "Refused";
|
|
281
|
+
readonly key: string;
|
|
282
|
+
readonly error: string;
|
|
640
283
|
} | {
|
|
641
284
|
readonly _tag: "Reset";
|
|
642
285
|
} | {
|
|
@@ -646,35 +289,14 @@ declare const make: (name: string, fields: Readonly<Record<string, Schema.Top>>,
|
|
|
646
289
|
readonly _tag: "RowRemoved";
|
|
647
290
|
readonly key: string;
|
|
648
291
|
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
292
|
} | {
|
|
662
293
|
readonly _tag: "Searched";
|
|
663
294
|
readonly key: string;
|
|
664
295
|
readonly text: string;
|
|
665
296
|
} | {
|
|
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;
|
|
297
|
+
readonly _tag: "Submitted";
|
|
674
298
|
} | {
|
|
675
|
-
readonly _tag: "
|
|
676
|
-
readonly key: never;
|
|
677
|
-
readonly message: unknown;
|
|
299
|
+
readonly _tag: "ValidatedAll";
|
|
678
300
|
}>;
|
|
679
301
|
isFollowing: (model: import("foldkit-form").FormModel<Readonly<Record<string, Schema.Top>>, {
|
|
680
302
|
readonly [x: string]: import("foldkit-entity").EntityField<string, string, Schema.Top>;
|
|
@@ -715,14 +337,35 @@ declare const make: (name: string, fields: Readonly<Record<string, Schema.Top>>,
|
|
|
715
337
|
args?: Record<string, unknown>;
|
|
716
338
|
key?: string;
|
|
717
339
|
effect: import("effect/Effect").Effect<{
|
|
340
|
+
readonly _tag: "About";
|
|
341
|
+
readonly subject: {
|
|
342
|
+
readonly [x: string]: string;
|
|
343
|
+
};
|
|
344
|
+
} | {
|
|
345
|
+
readonly _tag: "Blurred";
|
|
346
|
+
readonly key: string;
|
|
347
|
+
} | {
|
|
348
|
+
readonly _tag: "Changed";
|
|
349
|
+
readonly key: string;
|
|
350
|
+
readonly value: string | boolean | readonly string[];
|
|
351
|
+
} | {
|
|
352
|
+
readonly _tag: "Checked";
|
|
353
|
+
readonly key: string;
|
|
354
|
+
readonly draft: string | boolean | readonly string[];
|
|
355
|
+
readonly error: string | null;
|
|
356
|
+
} | {
|
|
357
|
+
readonly _tag: "Control";
|
|
358
|
+
readonly key: never;
|
|
359
|
+
readonly message: unknown;
|
|
360
|
+
} | {
|
|
718
361
|
readonly _tag: "Nested";
|
|
719
362
|
readonly key: string;
|
|
720
363
|
readonly row: string;
|
|
721
364
|
readonly message: unknown;
|
|
722
365
|
} | {
|
|
723
|
-
readonly _tag: "
|
|
724
|
-
|
|
725
|
-
readonly
|
|
366
|
+
readonly _tag: "Refused";
|
|
367
|
+
readonly key: string;
|
|
368
|
+
readonly error: string;
|
|
726
369
|
} | {
|
|
727
370
|
readonly _tag: "Reset";
|
|
728
371
|
} | {
|
|
@@ -732,35 +375,14 @@ declare const make: (name: string, fields: Readonly<Record<string, Schema.Top>>,
|
|
|
732
375
|
readonly _tag: "RowRemoved";
|
|
733
376
|
readonly key: string;
|
|
734
377
|
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
378
|
} | {
|
|
748
379
|
readonly _tag: "Searched";
|
|
749
380
|
readonly key: string;
|
|
750
381
|
readonly text: string;
|
|
751
382
|
} | {
|
|
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;
|
|
383
|
+
readonly _tag: "Submitted";
|
|
760
384
|
} | {
|
|
761
|
-
readonly _tag: "
|
|
762
|
-
readonly key: never;
|
|
763
|
-
readonly message: unknown;
|
|
385
|
+
readonly _tag: "ValidatedAll";
|
|
764
386
|
}, never, never>;
|
|
765
387
|
}>[];
|
|
766
388
|
};
|
|
@@ -775,14 +397,35 @@ declare const make: (name: string, fields: Readonly<Record<string, Schema.Top>>,
|
|
|
775
397
|
args?: Record<string, unknown>;
|
|
776
398
|
key?: string;
|
|
777
399
|
effect: import("effect/Effect").Effect<{
|
|
400
|
+
readonly _tag: "About";
|
|
401
|
+
readonly subject: {
|
|
402
|
+
readonly [x: string]: string;
|
|
403
|
+
};
|
|
404
|
+
} | {
|
|
405
|
+
readonly _tag: "Blurred";
|
|
406
|
+
readonly key: string;
|
|
407
|
+
} | {
|
|
408
|
+
readonly _tag: "Changed";
|
|
409
|
+
readonly key: string;
|
|
410
|
+
readonly value: string | boolean | readonly string[];
|
|
411
|
+
} | {
|
|
412
|
+
readonly _tag: "Checked";
|
|
413
|
+
readonly key: string;
|
|
414
|
+
readonly draft: string | boolean | readonly string[];
|
|
415
|
+
readonly error: string | null;
|
|
416
|
+
} | {
|
|
417
|
+
readonly _tag: "Control";
|
|
418
|
+
readonly key: never;
|
|
419
|
+
readonly message: unknown;
|
|
420
|
+
} | {
|
|
778
421
|
readonly _tag: "Nested";
|
|
779
422
|
readonly key: string;
|
|
780
423
|
readonly row: string;
|
|
781
424
|
readonly message: unknown;
|
|
782
425
|
} | {
|
|
783
|
-
readonly _tag: "
|
|
784
|
-
|
|
785
|
-
readonly
|
|
426
|
+
readonly _tag: "Refused";
|
|
427
|
+
readonly key: string;
|
|
428
|
+
readonly error: string;
|
|
786
429
|
} | {
|
|
787
430
|
readonly _tag: "Reset";
|
|
788
431
|
} | {
|
|
@@ -792,35 +435,14 @@ declare const make: (name: string, fields: Readonly<Record<string, Schema.Top>>,
|
|
|
792
435
|
readonly _tag: "RowRemoved";
|
|
793
436
|
readonly key: string;
|
|
794
437
|
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
438
|
} | {
|
|
808
439
|
readonly _tag: "Searched";
|
|
809
440
|
readonly key: string;
|
|
810
441
|
readonly text: string;
|
|
811
442
|
} | {
|
|
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;
|
|
443
|
+
readonly _tag: "Submitted";
|
|
820
444
|
} | {
|
|
821
|
-
readonly _tag: "
|
|
822
|
-
readonly key: never;
|
|
823
|
-
readonly message: unknown;
|
|
445
|
+
readonly _tag: "ValidatedAll";
|
|
824
446
|
}, never, never>;
|
|
825
447
|
}>[];
|
|
826
448
|
};
|
|
@@ -833,47 +455,10 @@ declare const make: (name: string, fields: Readonly<Record<string, Schema.Top>>,
|
|
|
833
455
|
readonly [x: string]: import("foldkit-entity").EntityField<string, string, Schema.Top>;
|
|
834
456
|
}, import("foldkit-form").ControlsOf<Readonly<Record<string, Control<unknown>>>>>) => boolean;
|
|
835
457
|
value: (model: import("foldkit-form").FormModel<Readonly<Record<string, Schema.Top>>, {
|
|
836
|
-
readonly [x: string]: import("foldkit-entity").EntityField<string, string, Schema.Top>;
|
|
837
|
-
}, import("foldkit-form").ControlsOf<Readonly<Record<string, Control<unknown>>>>>) => {
|
|
838
|
-
readonly [x: string]: unknown;
|
|
839
|
-
} | undefined;
|
|
840
|
-
};
|
|
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>>>;
|
|
458
|
+
readonly [x: string]: import("foldkit-entity").EntityField<string, string, Schema.Top>;
|
|
459
|
+
}, import("foldkit-form").ControlsOf<Readonly<Record<string, Control<unknown>>>>>) => {
|
|
460
|
+
readonly [x: string]: unknown;
|
|
461
|
+
} | undefined;
|
|
877
462
|
};
|
|
878
463
|
};
|
|
879
464
|
/** Every key the form's Schema names, edited or shown. */
|
|
@@ -902,45 +487,37 @@ declare const make: (name: string, fields: Readonly<Record<string, Schema.Top>>,
|
|
|
902
487
|
readonly [x: string]: import("foldkit-entity").EntityField<string, string, Schema.Top>;
|
|
903
488
|
}, import("foldkit-form").ControlsOf<Readonly<Record<string, Control<unknown>>>>>>;
|
|
904
489
|
encodeMessage: (message: {
|
|
905
|
-
readonly _tag: "
|
|
490
|
+
readonly _tag: "About";
|
|
491
|
+
readonly subject: {
|
|
492
|
+
readonly [x: string]: string;
|
|
493
|
+
};
|
|
494
|
+
} | {
|
|
495
|
+
readonly _tag: "Blurred";
|
|
906
496
|
readonly key: string;
|
|
907
|
-
readonly error: string;
|
|
908
497
|
} | {
|
|
909
498
|
readonly _tag: "Changed";
|
|
910
499
|
readonly key: string;
|
|
911
500
|
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
501
|
} | {
|
|
922
502
|
readonly _tag: "Checked";
|
|
923
503
|
readonly key: string;
|
|
924
504
|
readonly draft: string | boolean | readonly string[];
|
|
925
505
|
readonly error: string | null;
|
|
926
506
|
} | {
|
|
927
|
-
readonly _tag: "
|
|
928
|
-
readonly
|
|
929
|
-
|
|
930
|
-
};
|
|
931
|
-
} | {
|
|
932
|
-
readonly _tag: "Searched";
|
|
933
|
-
readonly key: string;
|
|
934
|
-
readonly text: string;
|
|
507
|
+
readonly _tag: "Control";
|
|
508
|
+
readonly key: never;
|
|
509
|
+
readonly message: unknown;
|
|
935
510
|
} | {
|
|
936
511
|
readonly _tag: "Nested";
|
|
937
512
|
readonly key: string;
|
|
938
513
|
readonly row: string;
|
|
939
514
|
readonly message: unknown;
|
|
940
515
|
} | {
|
|
941
|
-
readonly _tag: "
|
|
942
|
-
readonly key:
|
|
943
|
-
readonly
|
|
516
|
+
readonly _tag: "Refused";
|
|
517
|
+
readonly key: string;
|
|
518
|
+
readonly error: string;
|
|
519
|
+
} | {
|
|
520
|
+
readonly _tag: "Reset";
|
|
944
521
|
} | {
|
|
945
522
|
readonly _tag: "RowAdded";
|
|
946
523
|
readonly key: string;
|
|
@@ -948,47 +525,47 @@ declare const make: (name: string, fields: Readonly<Record<string, Schema.Top>>,
|
|
|
948
525
|
readonly _tag: "RowRemoved";
|
|
949
526
|
readonly key: string;
|
|
950
527
|
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
528
|
} | {
|
|
957
|
-
readonly _tag: "
|
|
529
|
+
readonly _tag: "Searched";
|
|
958
530
|
readonly key: string;
|
|
959
|
-
readonly
|
|
531
|
+
readonly text: string;
|
|
960
532
|
} | {
|
|
961
|
-
readonly _tag: "
|
|
962
|
-
readonly key: string;
|
|
533
|
+
readonly _tag: "Submitted";
|
|
963
534
|
} | {
|
|
964
535
|
readonly _tag: "ValidatedAll";
|
|
536
|
+
}) => Schema.Json;
|
|
537
|
+
decodeMessage: (held: Schema.Json) => Option.Option<{
|
|
538
|
+
readonly _tag: "About";
|
|
539
|
+
readonly subject: {
|
|
540
|
+
readonly [x: string]: string;
|
|
541
|
+
};
|
|
965
542
|
} | {
|
|
966
|
-
readonly _tag: "
|
|
543
|
+
readonly _tag: "Blurred";
|
|
544
|
+
readonly key: string;
|
|
967
545
|
} | {
|
|
968
|
-
readonly _tag: "
|
|
546
|
+
readonly _tag: "Changed";
|
|
547
|
+
readonly key: string;
|
|
548
|
+
readonly value: string | boolean | readonly string[];
|
|
969
549
|
} | {
|
|
970
550
|
readonly _tag: "Checked";
|
|
971
551
|
readonly key: string;
|
|
972
552
|
readonly draft: string | boolean | readonly string[];
|
|
973
553
|
readonly error: string | null;
|
|
974
554
|
} | {
|
|
975
|
-
readonly _tag: "
|
|
976
|
-
readonly
|
|
977
|
-
|
|
978
|
-
};
|
|
979
|
-
} | {
|
|
980
|
-
readonly _tag: "Searched";
|
|
981
|
-
readonly key: string;
|
|
982
|
-
readonly text: string;
|
|
555
|
+
readonly _tag: "Control";
|
|
556
|
+
readonly key: never;
|
|
557
|
+
readonly message: unknown;
|
|
983
558
|
} | {
|
|
984
559
|
readonly _tag: "Nested";
|
|
985
560
|
readonly key: string;
|
|
986
561
|
readonly row: string;
|
|
987
562
|
readonly message: unknown;
|
|
988
563
|
} | {
|
|
989
|
-
readonly _tag: "
|
|
990
|
-
readonly key:
|
|
991
|
-
readonly
|
|
564
|
+
readonly _tag: "Refused";
|
|
565
|
+
readonly key: string;
|
|
566
|
+
readonly error: string;
|
|
567
|
+
} | {
|
|
568
|
+
readonly _tag: "Reset";
|
|
992
569
|
} | {
|
|
993
570
|
readonly _tag: "RowAdded";
|
|
994
571
|
readonly key: string;
|
|
@@ -996,6 +573,14 @@ declare const make: (name: string, fields: Readonly<Record<string, Schema.Top>>,
|
|
|
996
573
|
readonly _tag: "RowRemoved";
|
|
997
574
|
readonly key: string;
|
|
998
575
|
readonly row: string;
|
|
576
|
+
} | {
|
|
577
|
+
readonly _tag: "Searched";
|
|
578
|
+
readonly key: string;
|
|
579
|
+
readonly text: string;
|
|
580
|
+
} | {
|
|
581
|
+
readonly _tag: "Submitted";
|
|
582
|
+
} | {
|
|
583
|
+
readonly _tag: "ValidatedAll";
|
|
999
584
|
}>;
|
|
1000
585
|
/**
|
|
1001
586
|
* A Message of the Bundle behind `key`'s control (an `Input.bundle`), as the
|
|
@@ -1003,45 +588,37 @@ declare const make: (name: string, fields: Readonly<Record<string, Schema.Top>>,
|
|
|
1003
588
|
* so it is checked here: a key not edited by one throws.
|
|
1004
589
|
*/
|
|
1005
590
|
control: (key: string, message: unknown) => {
|
|
1006
|
-
readonly _tag: "
|
|
591
|
+
readonly _tag: "About";
|
|
592
|
+
readonly subject: {
|
|
593
|
+
readonly [x: string]: string;
|
|
594
|
+
};
|
|
595
|
+
} | {
|
|
596
|
+
readonly _tag: "Blurred";
|
|
1007
597
|
readonly key: string;
|
|
1008
|
-
readonly error: string;
|
|
1009
598
|
} | {
|
|
1010
599
|
readonly _tag: "Changed";
|
|
1011
600
|
readonly key: string;
|
|
1012
601
|
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
602
|
} | {
|
|
1023
603
|
readonly _tag: "Checked";
|
|
1024
604
|
readonly key: string;
|
|
1025
605
|
readonly draft: string | boolean | readonly string[];
|
|
1026
606
|
readonly error: string | null;
|
|
1027
607
|
} | {
|
|
1028
|
-
readonly _tag: "
|
|
1029
|
-
readonly
|
|
1030
|
-
|
|
1031
|
-
};
|
|
1032
|
-
} | {
|
|
1033
|
-
readonly _tag: "Searched";
|
|
1034
|
-
readonly key: string;
|
|
1035
|
-
readonly text: string;
|
|
608
|
+
readonly _tag: "Control";
|
|
609
|
+
readonly key: never;
|
|
610
|
+
readonly message: unknown;
|
|
1036
611
|
} | {
|
|
1037
612
|
readonly _tag: "Nested";
|
|
1038
613
|
readonly key: string;
|
|
1039
614
|
readonly row: string;
|
|
1040
615
|
readonly message: unknown;
|
|
1041
616
|
} | {
|
|
1042
|
-
readonly _tag: "
|
|
1043
|
-
readonly key:
|
|
1044
|
-
readonly
|
|
617
|
+
readonly _tag: "Refused";
|
|
618
|
+
readonly key: string;
|
|
619
|
+
readonly error: string;
|
|
620
|
+
} | {
|
|
621
|
+
readonly _tag: "Reset";
|
|
1045
622
|
} | {
|
|
1046
623
|
readonly _tag: "RowAdded";
|
|
1047
624
|
readonly key: string;
|
|
@@ -1049,6 +626,14 @@ declare const make: (name: string, fields: Readonly<Record<string, Schema.Top>>,
|
|
|
1049
626
|
readonly _tag: "RowRemoved";
|
|
1050
627
|
readonly key: string;
|
|
1051
628
|
readonly row: string;
|
|
629
|
+
} | {
|
|
630
|
+
readonly _tag: "Searched";
|
|
631
|
+
readonly key: string;
|
|
632
|
+
readonly text: string;
|
|
633
|
+
} | {
|
|
634
|
+
readonly _tag: "Submitted";
|
|
635
|
+
} | {
|
|
636
|
+
readonly _tag: "ValidatedAll";
|
|
1052
637
|
};
|
|
1053
638
|
/**
|
|
1054
639
|
* What a new value starts from, as the Document stores it: each field's
|
|
@@ -1146,13 +731,13 @@ export declare const Layers: Bundle.Declared<Bundle.Bundle<"TreeNavigation", {
|
|
|
1146
731
|
readonly current: string | null;
|
|
1147
732
|
readonly toggled: readonly string[];
|
|
1148
733
|
}, {
|
|
1149
|
-
readonly _tag: "
|
|
734
|
+
readonly _tag: "Closed";
|
|
1150
735
|
readonly id: string;
|
|
1151
736
|
} | {
|
|
1152
|
-
readonly _tag: "
|
|
737
|
+
readonly _tag: "Focused";
|
|
1153
738
|
readonly id: string;
|
|
1154
739
|
} | {
|
|
1155
|
-
readonly _tag: "
|
|
740
|
+
readonly _tag: "Opened";
|
|
1156
741
|
readonly id: string;
|
|
1157
742
|
}, never, never, never, void, {}, {}>, "layers">;
|
|
1158
743
|
export declare const layersArgs: TreeNavigation.Args;
|
|
@@ -1165,19 +750,19 @@ export declare const Announcer: Bundle.Declared<Bundle.Bundle<"LiveAnnounce", {
|
|
|
1165
750
|
readonly assertive: string;
|
|
1166
751
|
readonly pending: {
|
|
1167
752
|
readonly message: string;
|
|
1168
|
-
readonly politeness: "
|
|
753
|
+
readonly politeness: "assertive" | "polite";
|
|
1169
754
|
} | null;
|
|
1170
755
|
readonly generation: number;
|
|
1171
756
|
}, {
|
|
1172
|
-
readonly _tag: "
|
|
1173
|
-
readonly
|
|
757
|
+
readonly _tag: "Announced";
|
|
758
|
+
readonly message: string;
|
|
759
|
+
readonly politeness: "assertive" | "polite";
|
|
1174
760
|
} | {
|
|
1175
761
|
readonly _tag: "Cleared";
|
|
1176
762
|
readonly generation: number;
|
|
1177
763
|
} | {
|
|
1178
|
-
readonly _tag: "
|
|
1179
|
-
readonly
|
|
1180
|
-
readonly politeness: "polite" | "assertive";
|
|
764
|
+
readonly _tag: "Read";
|
|
765
|
+
readonly generation: number;
|
|
1181
766
|
}, never, never, never, void, {}, {}>, "announcer">;
|
|
1182
767
|
/** Where over a node a drop lands: before it, inside it, or after it. */
|
|
1183
768
|
export declare const DropZone: Schema.Literals<readonly ["before", "inside", "after"]>;
|
|
@@ -1222,7 +807,7 @@ export type Drag = typeof Drag.Type;
|
|
|
1222
807
|
/** A value of the page's context, as the editor previews it. */
|
|
1223
808
|
export declare const ContextValue: Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean, Schema.Null]>;
|
|
1224
809
|
export type ContextValue = typeof ContextValue.Type;
|
|
1225
|
-
declare const Model
|
|
810
|
+
export declare const Model: Schema.Struct<{
|
|
1226
811
|
/** The page and its undo steps: `page.present` is the Document being edited. */
|
|
1227
812
|
readonly page: Schema.Struct<{
|
|
1228
813
|
readonly past: Schema.$Array<Schema.Codec<{
|
|
@@ -1377,7 +962,7 @@ declare const Model$1: Schema.Struct<{
|
|
|
1377
962
|
readonly assertive: string;
|
|
1378
963
|
readonly pending: {
|
|
1379
964
|
readonly message: string;
|
|
1380
|
-
readonly politeness: "
|
|
965
|
+
readonly politeness: "assertive" | "polite";
|
|
1381
966
|
} | null;
|
|
1382
967
|
readonly generation: number;
|
|
1383
968
|
}, unknown, never, never>;
|
|
@@ -1386,7 +971,7 @@ declare const Model$1: Schema.Struct<{
|
|
|
1386
971
|
readonly toggled: readonly string[];
|
|
1387
972
|
}, unknown, never, never>;
|
|
1388
973
|
}>;
|
|
1389
|
-
type Model
|
|
974
|
+
export type Model = typeof Model.Type;
|
|
1390
975
|
/** One form the inspector draws for the selected node, and its Model. */
|
|
1391
976
|
export interface InspectedForm {
|
|
1392
977
|
/** Which it is, as `Inspected` names it: `props`, or `on:<event>:<action>`. */
|
|
@@ -1406,25 +991,25 @@ export interface Inspecting {
|
|
|
1406
991
|
*/
|
|
1407
992
|
readonly on: Readonly<Record<string, InspectedForm>>;
|
|
1408
993
|
}
|
|
1409
|
-
declare const Message
|
|
994
|
+
export declare const Message: import("foldkit/message").MessageUnion<{
|
|
1410
995
|
readonly Selected: {
|
|
1411
|
-
|
|
996
|
+
id: Schema.brand<Schema.NonEmptyString, "@foldkit-composition/NodeId">;
|
|
1412
997
|
};
|
|
1413
998
|
/** Nothing is selected. */
|
|
1414
999
|
readonly Deselected: {};
|
|
1415
1000
|
readonly Hovered: {
|
|
1416
|
-
|
|
1001
|
+
id: Schema.brand<Schema.NonEmptyString, "@foldkit-composition/NodeId">;
|
|
1417
1002
|
};
|
|
1418
1003
|
/** The pointer left every node. */
|
|
1419
1004
|
readonly Unhovered: {};
|
|
1420
1005
|
/** An Operation, from a button, a key, a drag, or an agent. */
|
|
1421
1006
|
readonly Applied: {
|
|
1422
|
-
|
|
1007
|
+
op: Schema.Codec<Operation, unknown, never, never>;
|
|
1423
1008
|
};
|
|
1424
1009
|
/** A new node of a Block, with the Block's starting props, once an id is minted. */
|
|
1425
1010
|
readonly InsertAsked: {
|
|
1426
|
-
|
|
1427
|
-
|
|
1011
|
+
block: Schema.String;
|
|
1012
|
+
at: Schema.Union<readonly [Schema.TaggedStruct<"Root", {
|
|
1428
1013
|
readonly index: import("effect/Schema").Int;
|
|
1429
1014
|
}>, Schema.TaggedStruct<"Region", {
|
|
1430
1015
|
readonly parent: import("effect/Schema").brand<import("effect/Schema").NonEmptyString, "@foldkit-composition/NodeId">;
|
|
@@ -1434,8 +1019,8 @@ declare const Message$1: import("foldkit/message").MessageUnion<{
|
|
|
1434
1019
|
};
|
|
1435
1020
|
/** A copy of a node and everything it holds, once ids are minted. */
|
|
1436
1021
|
readonly DuplicateAsked: {
|
|
1437
|
-
|
|
1438
|
-
|
|
1022
|
+
id: Schema.brand<Schema.NonEmptyString, "@foldkit-composition/NodeId">;
|
|
1023
|
+
at: Schema.Union<readonly [Schema.TaggedStruct<"Root", {
|
|
1439
1024
|
readonly index: import("effect/Schema").Int;
|
|
1440
1025
|
}>, Schema.TaggedStruct<"Region", {
|
|
1441
1026
|
readonly parent: import("effect/Schema").brand<import("effect/Schema").NonEmptyString, "@foldkit-composition/NodeId">;
|
|
@@ -1445,8 +1030,8 @@ declare const Message$1: import("foldkit/message").MessageUnion<{
|
|
|
1445
1030
|
};
|
|
1446
1031
|
/** One of the Catalog's patterns, once ids are minted for its nodes. */
|
|
1447
1032
|
readonly PatternAsked: {
|
|
1448
|
-
|
|
1449
|
-
|
|
1033
|
+
pattern: Schema.String;
|
|
1034
|
+
at: Schema.Union<readonly [Schema.TaggedStruct<"Root", {
|
|
1450
1035
|
readonly index: import("effect/Schema").Int;
|
|
1451
1036
|
}>, Schema.TaggedStruct<"Region", {
|
|
1452
1037
|
readonly parent: import("effect/Schema").brand<import("effect/Schema").NonEmptyString, "@foldkit-composition/NodeId">;
|
|
@@ -1456,17 +1041,17 @@ declare const Message$1: import("foldkit/message").MessageUnion<{
|
|
|
1456
1041
|
};
|
|
1457
1042
|
/** The selected node and all it holds, copied. */
|
|
1458
1043
|
readonly CopyAsked: {
|
|
1459
|
-
|
|
1044
|
+
id: Schema.brand<Schema.NonEmptyString, "@foldkit-composition/NodeId">;
|
|
1460
1045
|
};
|
|
1461
1046
|
/** The selected node and all it holds, copied and removed. */
|
|
1462
1047
|
readonly CutAsked: {
|
|
1463
|
-
|
|
1048
|
+
id: Schema.brand<Schema.NonEmptyString, "@foldkit-composition/NodeId">;
|
|
1464
1049
|
};
|
|
1465
1050
|
/** A paste: the system clipboard is read, and what it holds goes in by the selection. */
|
|
1466
1051
|
readonly PasteAsked: {};
|
|
1467
1052
|
/** What the system clipboard held for a paste; none when it could not be read. */
|
|
1468
1053
|
readonly ClipboardRead: {
|
|
1469
|
-
|
|
1054
|
+
text: Schema.OptionFromNullOr<Schema.String>;
|
|
1470
1055
|
};
|
|
1471
1056
|
/**
|
|
1472
1057
|
* Text on the page is asked to be edited in place: a double-click on it, or
|
|
@@ -1474,26 +1059,26 @@ declare const Message$1: import("foldkit/message").MessageUnion<{
|
|
|
1474
1059
|
* (`data-composition-field`), which is checked here.
|
|
1475
1060
|
*/
|
|
1476
1061
|
readonly EditingAsked: {
|
|
1477
|
-
|
|
1062
|
+
field: Schema.String;
|
|
1478
1063
|
};
|
|
1479
1064
|
/** What the field being edited holds now. */
|
|
1480
1065
|
readonly FieldTyped: {
|
|
1481
|
-
|
|
1482
|
-
|
|
1066
|
+
field: Schema.String;
|
|
1067
|
+
text: Schema.String;
|
|
1483
1068
|
};
|
|
1484
1069
|
/** Editing ended with the text kept: Enter, or leaving the field. */
|
|
1485
1070
|
readonly EditingCommitted: {
|
|
1486
|
-
|
|
1487
|
-
|
|
1071
|
+
field: Schema.String;
|
|
1072
|
+
text: Schema.String;
|
|
1488
1073
|
};
|
|
1489
1074
|
/** Editing ended with the text put back as it began: Escape. */
|
|
1490
1075
|
readonly EditingCancelled: {
|
|
1491
|
-
|
|
1076
|
+
field: Schema.String;
|
|
1492
1077
|
};
|
|
1493
1078
|
/** The ids a request waited for. */
|
|
1494
1079
|
readonly Minted: {
|
|
1495
|
-
|
|
1496
|
-
|
|
1080
|
+
ids: Schema.$Array<Schema.brand<Schema.NonEmptyString, "@foldkit-composition/NodeId">>;
|
|
1081
|
+
request: Schema.Union<readonly [Schema.TaggedStruct<"Insert", {
|
|
1497
1082
|
readonly block: Schema.String;
|
|
1498
1083
|
readonly at: Schema.Union<readonly [Schema.TaggedStruct<"Root", {
|
|
1499
1084
|
readonly index: import("effect/Schema").Int;
|
|
@@ -1541,17 +1126,30 @@ declare const Message$1: import("foldkit/message").MessageUnion<{
|
|
|
1541
1126
|
}>]>;
|
|
1542
1127
|
}>]>;
|
|
1543
1128
|
};
|
|
1129
|
+
/**
|
|
1130
|
+
* A key a command binds, pressed on the layers or the canvas: which command
|
|
1131
|
+
* it runs is decided in `update`, from the Model as it is then.
|
|
1132
|
+
*/
|
|
1133
|
+
readonly KeyPressed: {
|
|
1134
|
+
key: Schema.String;
|
|
1135
|
+
modifiers: Schema.Struct<{
|
|
1136
|
+
readonly shiftKey: Schema.Boolean;
|
|
1137
|
+
readonly ctrlKey: Schema.Boolean;
|
|
1138
|
+
readonly altKey: Schema.Boolean;
|
|
1139
|
+
readonly metaKey: Schema.Boolean;
|
|
1140
|
+
}>;
|
|
1141
|
+
};
|
|
1544
1142
|
readonly Undid: {};
|
|
1545
1143
|
readonly Redid: {};
|
|
1546
1144
|
readonly PanelChosen: {
|
|
1547
|
-
|
|
1145
|
+
panel: Schema.Literals<readonly ["insert", "layers", "properties"]>;
|
|
1548
1146
|
};
|
|
1549
1147
|
readonly ViewportChosen: {
|
|
1550
|
-
|
|
1148
|
+
viewport: Schema.Literals<readonly ["wide", "medium", "narrow"]>;
|
|
1551
1149
|
};
|
|
1552
1150
|
/** A pointer drag of a node began: it is selected, and nothing moves until the drop. */
|
|
1553
1151
|
readonly DragStarted: {
|
|
1554
|
-
|
|
1152
|
+
source: Schema.Union<readonly [Schema.TaggedStruct<"Existing", {
|
|
1555
1153
|
readonly id: Schema.brand<Schema.NonEmptyString, "@foldkit-composition/NodeId">;
|
|
1556
1154
|
}>, Schema.TaggedStruct<"New", {
|
|
1557
1155
|
readonly block: Schema.String;
|
|
@@ -1559,13 +1157,13 @@ declare const Message$1: import("foldkit/message").MessageUnion<{
|
|
|
1559
1157
|
};
|
|
1560
1158
|
/** The dragged node is over another, in a zone of it. */
|
|
1561
1159
|
readonly DraggedOver: {
|
|
1562
|
-
|
|
1563
|
-
|
|
1160
|
+
id: Schema.brand<Schema.NonEmptyString, "@foldkit-composition/NodeId">;
|
|
1161
|
+
zone: Schema.Literals<readonly ["before", "inside", "after"]>;
|
|
1564
1162
|
};
|
|
1565
1163
|
/** The dragged node is over a node's empty Region, by name: a drop goes into it. */
|
|
1566
1164
|
readonly DraggedOverRegion: {
|
|
1567
|
-
|
|
1568
|
-
|
|
1165
|
+
id: Schema.brand<Schema.NonEmptyString, "@foldkit-composition/NodeId">;
|
|
1166
|
+
region: Schema.String;
|
|
1569
1167
|
};
|
|
1570
1168
|
/** The dragged node is over nothing. */
|
|
1571
1169
|
readonly DraggedOff: {};
|
|
@@ -1579,12 +1177,12 @@ declare const Message$1: import("foldkit/message").MessageUnion<{
|
|
|
1579
1177
|
readonly DragCancelled: {};
|
|
1580
1178
|
/** The author previews the page with one context key set. */
|
|
1581
1179
|
readonly PreviewChosen: {
|
|
1582
|
-
|
|
1583
|
-
|
|
1180
|
+
key: Schema.String;
|
|
1181
|
+
value: Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean, Schema.Null]>;
|
|
1584
1182
|
};
|
|
1585
1183
|
/** The author previews the page with one context key unset. */
|
|
1586
1184
|
readonly PreviewCleared: {
|
|
1587
|
-
|
|
1185
|
+
key: Schema.String;
|
|
1588
1186
|
};
|
|
1589
1187
|
/**
|
|
1590
1188
|
* A Message of one of a node's forms (`Inspecting`), encoded to JSON. One for
|
|
@@ -1592,39 +1190,47 @@ declare const Message$1: import("foldkit/message").MessageUnion<{
|
|
|
1592
1190
|
* Command answering late, is ignored.
|
|
1593
1191
|
*/
|
|
1594
1192
|
readonly Inspected: {
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1193
|
+
id: Schema.brand<Schema.NonEmptyString, "@foldkit-composition/NodeId">;
|
|
1194
|
+
form: Schema.String;
|
|
1195
|
+
message: Schema.Codec<Schema.Json, Schema.Json, never, never>;
|
|
1598
1196
|
};
|
|
1599
1197
|
readonly GotAnnouncerMessage: {
|
|
1600
1198
|
readonly message: Schema.Codec<{
|
|
1601
|
-
readonly _tag: "
|
|
1602
|
-
readonly
|
|
1199
|
+
readonly _tag: "Announced";
|
|
1200
|
+
readonly message: string;
|
|
1201
|
+
readonly politeness: "assertive" | "polite";
|
|
1603
1202
|
} | {
|
|
1604
1203
|
readonly _tag: "Cleared";
|
|
1605
1204
|
readonly generation: number;
|
|
1606
1205
|
} | {
|
|
1607
|
-
readonly _tag: "
|
|
1608
|
-
readonly
|
|
1609
|
-
readonly politeness: "polite" | "assertive";
|
|
1206
|
+
readonly _tag: "Read";
|
|
1207
|
+
readonly generation: number;
|
|
1610
1208
|
}, unknown, never, never>;
|
|
1611
1209
|
};
|
|
1612
1210
|
readonly GotLayersMessage: {
|
|
1613
1211
|
readonly message: Schema.Codec<{
|
|
1614
|
-
readonly _tag: "
|
|
1212
|
+
readonly _tag: "Closed";
|
|
1615
1213
|
readonly id: string;
|
|
1616
1214
|
} | {
|
|
1617
|
-
readonly _tag: "
|
|
1215
|
+
readonly _tag: "Focused";
|
|
1618
1216
|
readonly id: string;
|
|
1619
1217
|
} | {
|
|
1620
|
-
readonly _tag: "
|
|
1218
|
+
readonly _tag: "Opened";
|
|
1621
1219
|
readonly id: string;
|
|
1622
1220
|
}, unknown, never, never>;
|
|
1623
1221
|
};
|
|
1624
1222
|
}>;
|
|
1625
|
-
type Message
|
|
1223
|
+
export type Message = typeof Message.Type;
|
|
1626
1224
|
/** What a new node of each Block starts with. A Block without starting props is not offered. */
|
|
1627
1225
|
export type Starters<Blocks extends AnyBlock> = { readonly [B in Blocks as B['name']]?: PropsOf<B>; };
|
|
1226
|
+
/** The Operation that moves a node `delta` places among its siblings; none at an end. */
|
|
1227
|
+
declare const moveBy: (document: Document, id: NodeId, delta: number) => Option.Option<Operation>;
|
|
1228
|
+
/** The Document being edited. */
|
|
1229
|
+
declare const documentOf: (model: Pick<Model, 'page'>) => Document;
|
|
1230
|
+
/** The Model showing another Document: what a fill, a reset or a restored revision does. */
|
|
1231
|
+
declare const replace: (model: Model, document: Document) => Model;
|
|
1232
|
+
/** The Model with nothing in flight, as a stored draft is shown again: no hover, no drag, no undo, no refusal. */
|
|
1233
|
+
declare const settle: (model: Model) => Model;
|
|
1628
1234
|
/**
|
|
1629
1235
|
* A key that runs a command, named as `KeyboardEvent.key` names it. `mod` is
|
|
1630
1236
|
* Ctrl, or ⌘ on a Mac. `mod` and `alt` must be as given; `shift` must be as
|
|
@@ -1646,7 +1252,7 @@ export interface BuilderCommand {
|
|
|
1646
1252
|
/** Where a drawn Builder offers it: with the selected node's actions, in the toolbar, or by key only. */
|
|
1647
1253
|
readonly placement: ReadonlyArray<'node' | 'toolbar' | 'keyboard'>;
|
|
1648
1254
|
/** The Message it sends now; none while it has nothing to do, which disables its button. */
|
|
1649
|
-
readonly run: (model: Pick<Model
|
|
1255
|
+
readonly run: (model: Pick<Model, 'page' | 'selected'>) => Option.Option<Message>;
|
|
1650
1256
|
}
|
|
1651
1257
|
export declare const Builder: {
|
|
1652
1258
|
/**
|
|
@@ -1655,7 +1261,7 @@ export declare const Builder: {
|
|
|
1655
1261
|
* `Heading.pipe(Block.annotate(Builder.controls({ text: Input.multiline() })))`.
|
|
1656
1262
|
* `Input.hidden()` leaves a prop out of the inspector.
|
|
1657
1263
|
*/
|
|
1658
|
-
controls:
|
|
1264
|
+
controls: typeof controls;
|
|
1659
1265
|
/**
|
|
1660
1266
|
* A Builder for a Catalog: its Bundle, the form control that places it as a
|
|
1661
1267
|
* key, and the helpers a view uses. `starters` gives the props a new node of
|
|
@@ -1748,7 +1354,7 @@ export declare const Builder: {
|
|
|
1748
1354
|
readonly selected: Option.Option<string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">>;
|
|
1749
1355
|
readonly hovered: Option.Option<string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">>;
|
|
1750
1356
|
readonly panel: "insert" | "layers" | "properties";
|
|
1751
|
-
readonly viewport: "
|
|
1357
|
+
readonly viewport: "medium" | "narrow" | "wide";
|
|
1752
1358
|
readonly refused: Option.Option<{
|
|
1753
1359
|
readonly code: string;
|
|
1754
1360
|
readonly message: string;
|
|
@@ -1763,7 +1369,7 @@ export declare const Builder: {
|
|
|
1763
1369
|
};
|
|
1764
1370
|
readonly over: Option.Option<{
|
|
1765
1371
|
readonly id: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
1766
|
-
readonly zone: "
|
|
1372
|
+
readonly zone: "after" | "before" | "inside";
|
|
1767
1373
|
readonly region: Option.Option<string>;
|
|
1768
1374
|
}>;
|
|
1769
1375
|
readonly at: Option.Option<{
|
|
@@ -1815,52 +1421,107 @@ export declare const Builder: {
|
|
|
1815
1421
|
readonly assertive: string;
|
|
1816
1422
|
readonly pending: {
|
|
1817
1423
|
readonly message: string;
|
|
1818
|
-
readonly politeness: "
|
|
1424
|
+
readonly politeness: "assertive" | "polite";
|
|
1819
1425
|
} | null;
|
|
1820
1426
|
readonly generation: number;
|
|
1821
1427
|
};
|
|
1822
|
-
readonly layers: {
|
|
1823
|
-
readonly current: string | null;
|
|
1824
|
-
readonly toggled: readonly string[];
|
|
1825
|
-
};
|
|
1826
|
-
}, {
|
|
1428
|
+
readonly layers: {
|
|
1429
|
+
readonly current: string | null;
|
|
1430
|
+
readonly toggled: readonly string[];
|
|
1431
|
+
};
|
|
1432
|
+
}, {
|
|
1433
|
+
readonly _tag: "Applied";
|
|
1434
|
+
readonly op: Operation;
|
|
1435
|
+
} | {
|
|
1436
|
+
readonly _tag: "ClipboardRead";
|
|
1437
|
+
readonly text: Option.Option<string>;
|
|
1438
|
+
} | {
|
|
1439
|
+
readonly _tag: "CopyAsked";
|
|
1440
|
+
readonly id: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
1441
|
+
} | {
|
|
1442
|
+
readonly _tag: "CutAsked";
|
|
1443
|
+
readonly id: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
1444
|
+
} | {
|
|
1445
|
+
readonly _tag: "Deselected";
|
|
1446
|
+
} | {
|
|
1447
|
+
readonly _tag: "DragCancelled";
|
|
1448
|
+
} | {
|
|
1449
|
+
readonly _tag: "DragDropped";
|
|
1450
|
+
} | {
|
|
1451
|
+
readonly _tag: "DragStarted";
|
|
1452
|
+
readonly source: {
|
|
1453
|
+
readonly _tag: "Existing";
|
|
1454
|
+
readonly id: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
1455
|
+
} | {
|
|
1456
|
+
readonly _tag: "New";
|
|
1457
|
+
readonly block: string;
|
|
1458
|
+
};
|
|
1459
|
+
} | {
|
|
1460
|
+
readonly _tag: "DraggedOff";
|
|
1461
|
+
} | {
|
|
1462
|
+
readonly _tag: "DraggedOver";
|
|
1463
|
+
readonly id: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
1464
|
+
readonly zone: "after" | "before" | "inside";
|
|
1465
|
+
} | {
|
|
1466
|
+
readonly _tag: "DraggedOverPage";
|
|
1467
|
+
} | {
|
|
1468
|
+
readonly _tag: "DraggedOverRegion";
|
|
1469
|
+
readonly id: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
1470
|
+
readonly region: string;
|
|
1471
|
+
} | {
|
|
1472
|
+
readonly _tag: "DuplicateAsked";
|
|
1473
|
+
readonly id: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
1474
|
+
readonly at: {
|
|
1475
|
+
readonly _tag: "Root";
|
|
1476
|
+
readonly index: number;
|
|
1477
|
+
} | {
|
|
1478
|
+
readonly _tag: "Region";
|
|
1479
|
+
readonly parent: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
1480
|
+
readonly region: string;
|
|
1481
|
+
readonly index: number;
|
|
1482
|
+
};
|
|
1483
|
+
} | {
|
|
1484
|
+
readonly _tag: "EditingAsked";
|
|
1485
|
+
readonly field: string;
|
|
1486
|
+
} | {
|
|
1487
|
+
readonly _tag: "EditingCancelled";
|
|
1488
|
+
readonly field: string;
|
|
1489
|
+
} | {
|
|
1490
|
+
readonly _tag: "EditingCommitted";
|
|
1491
|
+
readonly field: string;
|
|
1492
|
+
readonly text: string;
|
|
1493
|
+
} | {
|
|
1494
|
+
readonly _tag: "FieldTyped";
|
|
1495
|
+
readonly field: string;
|
|
1496
|
+
readonly text: string;
|
|
1497
|
+
} | {
|
|
1498
|
+
readonly _tag: "GotAnnouncerMessage";
|
|
1499
|
+
readonly message: {
|
|
1500
|
+
readonly _tag: "Announced";
|
|
1501
|
+
readonly message: string;
|
|
1502
|
+
readonly politeness: "assertive" | "polite";
|
|
1503
|
+
} | {
|
|
1504
|
+
readonly _tag: "Cleared";
|
|
1505
|
+
readonly generation: number;
|
|
1506
|
+
} | {
|
|
1507
|
+
readonly _tag: "Read";
|
|
1508
|
+
readonly generation: number;
|
|
1509
|
+
};
|
|
1510
|
+
} | {
|
|
1827
1511
|
readonly _tag: "GotLayersMessage";
|
|
1828
1512
|
readonly message: {
|
|
1829
|
-
readonly _tag: "
|
|
1513
|
+
readonly _tag: "Closed";
|
|
1830
1514
|
readonly id: string;
|
|
1831
1515
|
} | {
|
|
1832
|
-
readonly _tag: "
|
|
1516
|
+
readonly _tag: "Focused";
|
|
1833
1517
|
readonly id: string;
|
|
1834
1518
|
} | {
|
|
1835
|
-
readonly _tag: "
|
|
1519
|
+
readonly _tag: "Opened";
|
|
1836
1520
|
readonly id: string;
|
|
1837
1521
|
};
|
|
1838
|
-
} | {
|
|
1839
|
-
readonly _tag: "GotAnnouncerMessage";
|
|
1840
|
-
readonly message: {
|
|
1841
|
-
readonly _tag: "Read";
|
|
1842
|
-
readonly generation: number;
|
|
1843
|
-
} | {
|
|
1844
|
-
readonly _tag: "Cleared";
|
|
1845
|
-
readonly generation: number;
|
|
1846
|
-
} | {
|
|
1847
|
-
readonly _tag: "Announced";
|
|
1848
|
-
readonly message: string;
|
|
1849
|
-
readonly politeness: "polite" | "assertive";
|
|
1850
|
-
};
|
|
1851
|
-
} | {
|
|
1852
|
-
readonly _tag: "Selected";
|
|
1853
|
-
readonly id: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
1854
|
-
} | {
|
|
1855
|
-
readonly _tag: "Deselected";
|
|
1856
1522
|
} | {
|
|
1857
1523
|
readonly _tag: "Hovered";
|
|
1858
1524
|
readonly id: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
1859
|
-
} | {
|
|
1860
|
-
readonly _tag: "Unhovered";
|
|
1861
|
-
} | {
|
|
1862
|
-
readonly _tag: "Applied";
|
|
1863
|
-
readonly op: Operation;
|
|
1864
1525
|
} | {
|
|
1865
1526
|
readonly _tag: "InsertAsked";
|
|
1866
1527
|
readonly block: string;
|
|
@@ -1874,54 +1535,19 @@ export declare const Builder: {
|
|
|
1874
1535
|
readonly index: number;
|
|
1875
1536
|
};
|
|
1876
1537
|
} | {
|
|
1877
|
-
readonly _tag: "
|
|
1538
|
+
readonly _tag: "Inspected";
|
|
1878
1539
|
readonly id: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
1879
|
-
readonly
|
|
1880
|
-
|
|
1881
|
-
readonly index: number;
|
|
1882
|
-
} | {
|
|
1883
|
-
readonly _tag: "Region";
|
|
1884
|
-
readonly parent: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
1885
|
-
readonly region: string;
|
|
1886
|
-
readonly index: number;
|
|
1887
|
-
};
|
|
1540
|
+
readonly form: string;
|
|
1541
|
+
readonly message: Schema.Json;
|
|
1888
1542
|
} | {
|
|
1889
|
-
readonly _tag: "
|
|
1890
|
-
readonly
|
|
1891
|
-
readonly
|
|
1892
|
-
readonly
|
|
1893
|
-
readonly
|
|
1894
|
-
|
|
1895
|
-
readonly
|
|
1896
|
-
readonly parent: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
1897
|
-
readonly region: string;
|
|
1898
|
-
readonly index: number;
|
|
1543
|
+
readonly _tag: "KeyPressed";
|
|
1544
|
+
readonly key: string;
|
|
1545
|
+
readonly modifiers: {
|
|
1546
|
+
readonly shiftKey: boolean;
|
|
1547
|
+
readonly ctrlKey: boolean;
|
|
1548
|
+
readonly altKey: boolean;
|
|
1549
|
+
readonly metaKey: boolean;
|
|
1899
1550
|
};
|
|
1900
|
-
} | {
|
|
1901
|
-
readonly _tag: "CopyAsked";
|
|
1902
|
-
readonly id: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
1903
|
-
} | {
|
|
1904
|
-
readonly _tag: "CutAsked";
|
|
1905
|
-
readonly id: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
1906
|
-
} | {
|
|
1907
|
-
readonly _tag: "PasteAsked";
|
|
1908
|
-
} | {
|
|
1909
|
-
readonly _tag: "ClipboardRead";
|
|
1910
|
-
readonly text: Option.Option<string>;
|
|
1911
|
-
} | {
|
|
1912
|
-
readonly _tag: "EditingAsked";
|
|
1913
|
-
readonly field: string;
|
|
1914
|
-
} | {
|
|
1915
|
-
readonly _tag: "FieldTyped";
|
|
1916
|
-
readonly field: string;
|
|
1917
|
-
readonly text: string;
|
|
1918
|
-
} | {
|
|
1919
|
-
readonly _tag: "EditingCommitted";
|
|
1920
|
-
readonly field: string;
|
|
1921
|
-
readonly text: string;
|
|
1922
|
-
} | {
|
|
1923
|
-
readonly _tag: "EditingCancelled";
|
|
1924
|
-
readonly field: string;
|
|
1925
1551
|
} | {
|
|
1926
1552
|
readonly _tag: "Minted";
|
|
1927
1553
|
readonly ids: readonly (string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">)[];
|
|
@@ -1992,41 +1618,23 @@ export declare const Builder: {
|
|
|
1992
1618
|
readonly index: number;
|
|
1993
1619
|
};
|
|
1994
1620
|
};
|
|
1995
|
-
} | {
|
|
1996
|
-
readonly _tag: "Undid";
|
|
1997
|
-
} | {
|
|
1998
|
-
readonly _tag: "Redid";
|
|
1999
1621
|
} | {
|
|
2000
1622
|
readonly _tag: "PanelChosen";
|
|
2001
1623
|
readonly panel: "insert" | "layers" | "properties";
|
|
2002
1624
|
} | {
|
|
2003
|
-
readonly _tag: "
|
|
2004
|
-
readonly viewport: "wide" | "medium" | "narrow";
|
|
1625
|
+
readonly _tag: "PasteAsked";
|
|
2005
1626
|
} | {
|
|
2006
|
-
readonly _tag: "
|
|
2007
|
-
readonly
|
|
2008
|
-
|
|
2009
|
-
readonly
|
|
1627
|
+
readonly _tag: "PatternAsked";
|
|
1628
|
+
readonly pattern: string;
|
|
1629
|
+
readonly at: {
|
|
1630
|
+
readonly _tag: "Root";
|
|
1631
|
+
readonly index: number;
|
|
2010
1632
|
} | {
|
|
2011
|
-
readonly _tag: "
|
|
2012
|
-
readonly
|
|
1633
|
+
readonly _tag: "Region";
|
|
1634
|
+
readonly parent: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
1635
|
+
readonly region: string;
|
|
1636
|
+
readonly index: number;
|
|
2013
1637
|
};
|
|
2014
|
-
} | {
|
|
2015
|
-
readonly _tag: "DraggedOver";
|
|
2016
|
-
readonly id: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
2017
|
-
readonly zone: "before" | "inside" | "after";
|
|
2018
|
-
} | {
|
|
2019
|
-
readonly _tag: "DraggedOverRegion";
|
|
2020
|
-
readonly id: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
2021
|
-
readonly region: string;
|
|
2022
|
-
} | {
|
|
2023
|
-
readonly _tag: "DraggedOff";
|
|
2024
|
-
} | {
|
|
2025
|
-
readonly _tag: "DraggedOverPage";
|
|
2026
|
-
} | {
|
|
2027
|
-
readonly _tag: "DragDropped";
|
|
2028
|
-
} | {
|
|
2029
|
-
readonly _tag: "DragCancelled";
|
|
2030
1638
|
} | {
|
|
2031
1639
|
readonly _tag: "PreviewChosen";
|
|
2032
1640
|
readonly key: string;
|
|
@@ -2035,10 +1643,17 @@ export declare const Builder: {
|
|
|
2035
1643
|
readonly _tag: "PreviewCleared";
|
|
2036
1644
|
readonly key: string;
|
|
2037
1645
|
} | {
|
|
2038
|
-
readonly _tag: "
|
|
1646
|
+
readonly _tag: "Redid";
|
|
1647
|
+
} | {
|
|
1648
|
+
readonly _tag: "Selected";
|
|
2039
1649
|
readonly id: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
2040
|
-
|
|
2041
|
-
readonly
|
|
1650
|
+
} | {
|
|
1651
|
+
readonly _tag: "Undid";
|
|
1652
|
+
} | {
|
|
1653
|
+
readonly _tag: "Unhovered";
|
|
1654
|
+
} | {
|
|
1655
|
+
readonly _tag: "ViewportChosen";
|
|
1656
|
+
readonly viewport: "medium" | "narrow" | "wide";
|
|
2042
1657
|
}, never, never, never, void, {}, {}>;
|
|
2043
1658
|
initial: {
|
|
2044
1659
|
readonly page: {
|
|
@@ -2107,7 +1722,7 @@ export declare const Builder: {
|
|
|
2107
1722
|
readonly selected: Option.Option<string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">>;
|
|
2108
1723
|
readonly hovered: Option.Option<string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">>;
|
|
2109
1724
|
readonly panel: "insert" | "layers" | "properties";
|
|
2110
|
-
readonly viewport: "
|
|
1725
|
+
readonly viewport: "medium" | "narrow" | "wide";
|
|
2111
1726
|
readonly refused: Option.Option<{
|
|
2112
1727
|
readonly code: string;
|
|
2113
1728
|
readonly message: string;
|
|
@@ -2122,7 +1737,7 @@ export declare const Builder: {
|
|
|
2122
1737
|
};
|
|
2123
1738
|
readonly over: Option.Option<{
|
|
2124
1739
|
readonly id: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
2125
|
-
readonly zone: "
|
|
1740
|
+
readonly zone: "after" | "before" | "inside";
|
|
2126
1741
|
readonly region: Option.Option<string>;
|
|
2127
1742
|
}>;
|
|
2128
1743
|
readonly at: Option.Option<{
|
|
@@ -2174,7 +1789,7 @@ export declare const Builder: {
|
|
|
2174
1789
|
readonly assertive: string;
|
|
2175
1790
|
readonly pending: {
|
|
2176
1791
|
readonly message: string;
|
|
2177
|
-
readonly politeness: "
|
|
1792
|
+
readonly politeness: "assertive" | "polite";
|
|
2178
1793
|
} | null;
|
|
2179
1794
|
readonly generation: number;
|
|
2180
1795
|
};
|
|
@@ -2251,7 +1866,7 @@ export declare const Builder: {
|
|
|
2251
1866
|
readonly selected: Option.Option<string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">>;
|
|
2252
1867
|
readonly hovered: Option.Option<string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">>;
|
|
2253
1868
|
readonly panel: "insert" | "layers" | "properties";
|
|
2254
|
-
readonly viewport: "
|
|
1869
|
+
readonly viewport: "medium" | "narrow" | "wide";
|
|
2255
1870
|
readonly refused: Option.Option<{
|
|
2256
1871
|
readonly code: string;
|
|
2257
1872
|
readonly message: string;
|
|
@@ -2266,7 +1881,7 @@ export declare const Builder: {
|
|
|
2266
1881
|
};
|
|
2267
1882
|
readonly over: Option.Option<{
|
|
2268
1883
|
readonly id: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
2269
|
-
readonly zone: "
|
|
1884
|
+
readonly zone: "after" | "before" | "inside";
|
|
2270
1885
|
readonly region: Option.Option<string>;
|
|
2271
1886
|
}>;
|
|
2272
1887
|
readonly at: Option.Option<{
|
|
@@ -2318,7 +1933,7 @@ export declare const Builder: {
|
|
|
2318
1933
|
readonly assertive: string;
|
|
2319
1934
|
readonly pending: {
|
|
2320
1935
|
readonly message: string;
|
|
2321
|
-
readonly politeness: "
|
|
1936
|
+
readonly politeness: "assertive" | "polite";
|
|
2322
1937
|
} | null;
|
|
2323
1938
|
readonly generation: number;
|
|
2324
1939
|
};
|
|
@@ -2327,70 +1942,47 @@ export declare const Builder: {
|
|
|
2327
1942
|
readonly toggled: readonly string[];
|
|
2328
1943
|
};
|
|
2329
1944
|
}, {
|
|
2330
|
-
readonly _tag: "
|
|
2331
|
-
readonly
|
|
2332
|
-
readonly _tag: "Focused";
|
|
2333
|
-
readonly id: string;
|
|
2334
|
-
} | {
|
|
2335
|
-
readonly _tag: "Opened";
|
|
2336
|
-
readonly id: string;
|
|
2337
|
-
} | {
|
|
2338
|
-
readonly _tag: "Closed";
|
|
2339
|
-
readonly id: string;
|
|
2340
|
-
};
|
|
1945
|
+
readonly _tag: "Applied";
|
|
1946
|
+
readonly op: Operation;
|
|
2341
1947
|
} | {
|
|
2342
|
-
readonly _tag: "
|
|
2343
|
-
readonly
|
|
2344
|
-
readonly _tag: "Read";
|
|
2345
|
-
readonly generation: number;
|
|
2346
|
-
} | {
|
|
2347
|
-
readonly _tag: "Cleared";
|
|
2348
|
-
readonly generation: number;
|
|
2349
|
-
} | {
|
|
2350
|
-
readonly _tag: "Announced";
|
|
2351
|
-
readonly message: string;
|
|
2352
|
-
readonly politeness: "polite" | "assertive";
|
|
2353
|
-
};
|
|
1948
|
+
readonly _tag: "ClipboardRead";
|
|
1949
|
+
readonly text: Option.Option<string>;
|
|
2354
1950
|
} | {
|
|
2355
|
-
readonly _tag: "
|
|
1951
|
+
readonly _tag: "CopyAsked";
|
|
2356
1952
|
readonly id: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
2357
1953
|
} | {
|
|
2358
|
-
readonly _tag: "
|
|
2359
|
-
} | {
|
|
2360
|
-
readonly _tag: "Hovered";
|
|
1954
|
+
readonly _tag: "CutAsked";
|
|
2361
1955
|
readonly id: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
2362
1956
|
} | {
|
|
2363
|
-
readonly _tag: "
|
|
1957
|
+
readonly _tag: "Deselected";
|
|
2364
1958
|
} | {
|
|
2365
|
-
readonly _tag: "
|
|
2366
|
-
readonly op: Operation;
|
|
1959
|
+
readonly _tag: "DragCancelled";
|
|
2367
1960
|
} | {
|
|
2368
|
-
readonly _tag: "
|
|
2369
|
-
|
|
2370
|
-
readonly
|
|
2371
|
-
|
|
2372
|
-
readonly
|
|
1961
|
+
readonly _tag: "DragDropped";
|
|
1962
|
+
} | {
|
|
1963
|
+
readonly _tag: "DragStarted";
|
|
1964
|
+
readonly source: {
|
|
1965
|
+
readonly _tag: "Existing";
|
|
1966
|
+
readonly id: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
2373
1967
|
} | {
|
|
2374
|
-
readonly _tag: "
|
|
2375
|
-
readonly
|
|
2376
|
-
readonly region: string;
|
|
2377
|
-
readonly index: number;
|
|
1968
|
+
readonly _tag: "New";
|
|
1969
|
+
readonly block: string;
|
|
2378
1970
|
};
|
|
2379
1971
|
} | {
|
|
2380
|
-
readonly _tag: "
|
|
1972
|
+
readonly _tag: "DraggedOff";
|
|
1973
|
+
} | {
|
|
1974
|
+
readonly _tag: "DraggedOver";
|
|
2381
1975
|
readonly id: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
2382
|
-
readonly
|
|
2383
|
-
readonly _tag: "Root";
|
|
2384
|
-
readonly index: number;
|
|
2385
|
-
} | {
|
|
2386
|
-
readonly _tag: "Region";
|
|
2387
|
-
readonly parent: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
2388
|
-
readonly region: string;
|
|
2389
|
-
readonly index: number;
|
|
2390
|
-
};
|
|
1976
|
+
readonly zone: "after" | "before" | "inside";
|
|
2391
1977
|
} | {
|
|
2392
|
-
readonly _tag: "
|
|
2393
|
-
|
|
1978
|
+
readonly _tag: "DraggedOverPage";
|
|
1979
|
+
} | {
|
|
1980
|
+
readonly _tag: "DraggedOverRegion";
|
|
1981
|
+
readonly id: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
1982
|
+
readonly region: string;
|
|
1983
|
+
} | {
|
|
1984
|
+
readonly _tag: "DuplicateAsked";
|
|
1985
|
+
readonly id: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
2394
1986
|
readonly at: {
|
|
2395
1987
|
readonly _tag: "Root";
|
|
2396
1988
|
readonly index: number;
|
|
@@ -2401,30 +1993,73 @@ export declare const Builder: {
|
|
|
2401
1993
|
readonly index: number;
|
|
2402
1994
|
};
|
|
2403
1995
|
} | {
|
|
2404
|
-
readonly _tag: "
|
|
2405
|
-
readonly
|
|
2406
|
-
} | {
|
|
2407
|
-
readonly _tag: "CutAsked";
|
|
2408
|
-
readonly id: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
2409
|
-
} | {
|
|
2410
|
-
readonly _tag: "PasteAsked";
|
|
1996
|
+
readonly _tag: "EditingAsked";
|
|
1997
|
+
readonly field: string;
|
|
2411
1998
|
} | {
|
|
2412
|
-
readonly _tag: "
|
|
2413
|
-
readonly
|
|
1999
|
+
readonly _tag: "EditingCancelled";
|
|
2000
|
+
readonly field: string;
|
|
2414
2001
|
} | {
|
|
2415
|
-
readonly _tag: "
|
|
2002
|
+
readonly _tag: "EditingCommitted";
|
|
2416
2003
|
readonly field: string;
|
|
2004
|
+
readonly text: string;
|
|
2417
2005
|
} | {
|
|
2418
2006
|
readonly _tag: "FieldTyped";
|
|
2419
2007
|
readonly field: string;
|
|
2420
2008
|
readonly text: string;
|
|
2421
2009
|
} | {
|
|
2422
|
-
readonly _tag: "
|
|
2423
|
-
readonly
|
|
2424
|
-
|
|
2010
|
+
readonly _tag: "GotAnnouncerMessage";
|
|
2011
|
+
readonly message: {
|
|
2012
|
+
readonly _tag: "Announced";
|
|
2013
|
+
readonly message: string;
|
|
2014
|
+
readonly politeness: "assertive" | "polite";
|
|
2015
|
+
} | {
|
|
2016
|
+
readonly _tag: "Cleared";
|
|
2017
|
+
readonly generation: number;
|
|
2018
|
+
} | {
|
|
2019
|
+
readonly _tag: "Read";
|
|
2020
|
+
readonly generation: number;
|
|
2021
|
+
};
|
|
2022
|
+
} | {
|
|
2023
|
+
readonly _tag: "GotLayersMessage";
|
|
2024
|
+
readonly message: {
|
|
2025
|
+
readonly _tag: "Closed";
|
|
2026
|
+
readonly id: string;
|
|
2027
|
+
} | {
|
|
2028
|
+
readonly _tag: "Focused";
|
|
2029
|
+
readonly id: string;
|
|
2030
|
+
} | {
|
|
2031
|
+
readonly _tag: "Opened";
|
|
2032
|
+
readonly id: string;
|
|
2033
|
+
};
|
|
2034
|
+
} | {
|
|
2035
|
+
readonly _tag: "Hovered";
|
|
2036
|
+
readonly id: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
2037
|
+
} | {
|
|
2038
|
+
readonly _tag: "InsertAsked";
|
|
2039
|
+
readonly block: string;
|
|
2040
|
+
readonly at: {
|
|
2041
|
+
readonly _tag: "Root";
|
|
2042
|
+
readonly index: number;
|
|
2043
|
+
} | {
|
|
2044
|
+
readonly _tag: "Region";
|
|
2045
|
+
readonly parent: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
2046
|
+
readonly region: string;
|
|
2047
|
+
readonly index: number;
|
|
2048
|
+
};
|
|
2425
2049
|
} | {
|
|
2426
|
-
readonly _tag: "
|
|
2427
|
-
readonly
|
|
2050
|
+
readonly _tag: "Inspected";
|
|
2051
|
+
readonly id: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
2052
|
+
readonly form: string;
|
|
2053
|
+
readonly message: Schema.Json;
|
|
2054
|
+
} | {
|
|
2055
|
+
readonly _tag: "KeyPressed";
|
|
2056
|
+
readonly key: string;
|
|
2057
|
+
readonly modifiers: {
|
|
2058
|
+
readonly shiftKey: boolean;
|
|
2059
|
+
readonly ctrlKey: boolean;
|
|
2060
|
+
readonly altKey: boolean;
|
|
2061
|
+
readonly metaKey: boolean;
|
|
2062
|
+
};
|
|
2428
2063
|
} | {
|
|
2429
2064
|
readonly _tag: "Minted";
|
|
2430
2065
|
readonly ids: readonly (string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">)[];
|
|
@@ -2495,41 +2130,23 @@ export declare const Builder: {
|
|
|
2495
2130
|
readonly index: number;
|
|
2496
2131
|
};
|
|
2497
2132
|
};
|
|
2498
|
-
} | {
|
|
2499
|
-
readonly _tag: "Undid";
|
|
2500
|
-
} | {
|
|
2501
|
-
readonly _tag: "Redid";
|
|
2502
2133
|
} | {
|
|
2503
2134
|
readonly _tag: "PanelChosen";
|
|
2504
2135
|
readonly panel: "insert" | "layers" | "properties";
|
|
2505
2136
|
} | {
|
|
2506
|
-
readonly _tag: "
|
|
2507
|
-
readonly viewport: "wide" | "medium" | "narrow";
|
|
2137
|
+
readonly _tag: "PasteAsked";
|
|
2508
2138
|
} | {
|
|
2509
|
-
readonly _tag: "
|
|
2510
|
-
readonly
|
|
2511
|
-
|
|
2512
|
-
readonly
|
|
2139
|
+
readonly _tag: "PatternAsked";
|
|
2140
|
+
readonly pattern: string;
|
|
2141
|
+
readonly at: {
|
|
2142
|
+
readonly _tag: "Root";
|
|
2143
|
+
readonly index: number;
|
|
2513
2144
|
} | {
|
|
2514
|
-
readonly _tag: "
|
|
2515
|
-
readonly
|
|
2145
|
+
readonly _tag: "Region";
|
|
2146
|
+
readonly parent: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
2147
|
+
readonly region: string;
|
|
2148
|
+
readonly index: number;
|
|
2516
2149
|
};
|
|
2517
|
-
} | {
|
|
2518
|
-
readonly _tag: "DraggedOver";
|
|
2519
|
-
readonly id: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
2520
|
-
readonly zone: "before" | "inside" | "after";
|
|
2521
|
-
} | {
|
|
2522
|
-
readonly _tag: "DraggedOverRegion";
|
|
2523
|
-
readonly id: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
2524
|
-
readonly region: string;
|
|
2525
|
-
} | {
|
|
2526
|
-
readonly _tag: "DraggedOff";
|
|
2527
|
-
} | {
|
|
2528
|
-
readonly _tag: "DraggedOverPage";
|
|
2529
|
-
} | {
|
|
2530
|
-
readonly _tag: "DragDropped";
|
|
2531
|
-
} | {
|
|
2532
|
-
readonly _tag: "DragCancelled";
|
|
2533
2150
|
} | {
|
|
2534
2151
|
readonly _tag: "PreviewChosen";
|
|
2535
2152
|
readonly key: string;
|
|
@@ -2538,10 +2155,17 @@ export declare const Builder: {
|
|
|
2538
2155
|
readonly _tag: "PreviewCleared";
|
|
2539
2156
|
readonly key: string;
|
|
2540
2157
|
} | {
|
|
2541
|
-
readonly _tag: "
|
|
2158
|
+
readonly _tag: "Redid";
|
|
2159
|
+
} | {
|
|
2160
|
+
readonly _tag: "Selected";
|
|
2542
2161
|
readonly id: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
2543
|
-
|
|
2544
|
-
readonly
|
|
2162
|
+
} | {
|
|
2163
|
+
readonly _tag: "Undid";
|
|
2164
|
+
} | {
|
|
2165
|
+
readonly _tag: "Unhovered";
|
|
2166
|
+
} | {
|
|
2167
|
+
readonly _tag: "ViewportChosen";
|
|
2168
|
+
readonly viewport: "medium" | "narrow" | "wide";
|
|
2545
2169
|
}, {
|
|
2546
2170
|
readonly format: 1;
|
|
2547
2171
|
readonly roots: readonly (string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">)[];
|
|
@@ -2566,7 +2190,7 @@ export declare const Builder: {
|
|
|
2566
2190
|
* The same control, drawn by another view, such as
|
|
2567
2191
|
* `BuilderView.submodel(view)` from `foldkit-mixins-builder`.
|
|
2568
2192
|
*/
|
|
2569
|
-
inputWith: <ViewInputs>(drawn: Submodel.View<Model
|
|
2193
|
+
inputWith: <ViewInputs>(drawn: Submodel.View<Model, Message, ViewInputs>) => import("foldkit-form").BundleControl<{
|
|
2570
2194
|
readonly page: {
|
|
2571
2195
|
readonly past: readonly {
|
|
2572
2196
|
readonly format: 1;
|
|
@@ -2633,7 +2257,7 @@ export declare const Builder: {
|
|
|
2633
2257
|
readonly selected: Option.Option<string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">>;
|
|
2634
2258
|
readonly hovered: Option.Option<string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">>;
|
|
2635
2259
|
readonly panel: "insert" | "layers" | "properties";
|
|
2636
|
-
readonly viewport: "
|
|
2260
|
+
readonly viewport: "medium" | "narrow" | "wide";
|
|
2637
2261
|
readonly refused: Option.Option<{
|
|
2638
2262
|
readonly code: string;
|
|
2639
2263
|
readonly message: string;
|
|
@@ -2648,7 +2272,7 @@ export declare const Builder: {
|
|
|
2648
2272
|
};
|
|
2649
2273
|
readonly over: Option.Option<{
|
|
2650
2274
|
readonly id: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
2651
|
-
readonly zone: "
|
|
2275
|
+
readonly zone: "after" | "before" | "inside";
|
|
2652
2276
|
readonly region: Option.Option<string>;
|
|
2653
2277
|
}>;
|
|
2654
2278
|
readonly at: Option.Option<{
|
|
@@ -2700,7 +2324,7 @@ export declare const Builder: {
|
|
|
2700
2324
|
readonly assertive: string;
|
|
2701
2325
|
readonly pending: {
|
|
2702
2326
|
readonly message: string;
|
|
2703
|
-
readonly politeness: "
|
|
2327
|
+
readonly politeness: "assertive" | "polite";
|
|
2704
2328
|
} | null;
|
|
2705
2329
|
readonly generation: number;
|
|
2706
2330
|
};
|
|
@@ -2709,55 +2333,44 @@ export declare const Builder: {
|
|
|
2709
2333
|
readonly toggled: readonly string[];
|
|
2710
2334
|
};
|
|
2711
2335
|
}, {
|
|
2712
|
-
readonly _tag: "
|
|
2713
|
-
readonly
|
|
2714
|
-
readonly _tag: "Focused";
|
|
2715
|
-
readonly id: string;
|
|
2716
|
-
} | {
|
|
2717
|
-
readonly _tag: "Opened";
|
|
2718
|
-
readonly id: string;
|
|
2719
|
-
} | {
|
|
2720
|
-
readonly _tag: "Closed";
|
|
2721
|
-
readonly id: string;
|
|
2722
|
-
};
|
|
2336
|
+
readonly _tag: "Applied";
|
|
2337
|
+
readonly op: Operation;
|
|
2723
2338
|
} | {
|
|
2724
|
-
readonly _tag: "
|
|
2725
|
-
readonly
|
|
2726
|
-
readonly _tag: "Read";
|
|
2727
|
-
readonly generation: number;
|
|
2728
|
-
} | {
|
|
2729
|
-
readonly _tag: "Cleared";
|
|
2730
|
-
readonly generation: number;
|
|
2731
|
-
} | {
|
|
2732
|
-
readonly _tag: "Announced";
|
|
2733
|
-
readonly message: string;
|
|
2734
|
-
readonly politeness: "polite" | "assertive";
|
|
2735
|
-
};
|
|
2339
|
+
readonly _tag: "ClipboardRead";
|
|
2340
|
+
readonly text: Option.Option<string>;
|
|
2736
2341
|
} | {
|
|
2737
|
-
readonly _tag: "
|
|
2342
|
+
readonly _tag: "CopyAsked";
|
|
2738
2343
|
readonly id: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
2739
2344
|
} | {
|
|
2740
|
-
readonly _tag: "
|
|
2741
|
-
} | {
|
|
2742
|
-
readonly _tag: "Hovered";
|
|
2345
|
+
readonly _tag: "CutAsked";
|
|
2743
2346
|
readonly id: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
2744
2347
|
} | {
|
|
2745
|
-
readonly _tag: "
|
|
2348
|
+
readonly _tag: "Deselected";
|
|
2746
2349
|
} | {
|
|
2747
|
-
readonly _tag: "
|
|
2748
|
-
readonly op: Operation;
|
|
2350
|
+
readonly _tag: "DragCancelled";
|
|
2749
2351
|
} | {
|
|
2750
|
-
readonly _tag: "
|
|
2751
|
-
|
|
2752
|
-
readonly
|
|
2753
|
-
|
|
2754
|
-
readonly
|
|
2352
|
+
readonly _tag: "DragDropped";
|
|
2353
|
+
} | {
|
|
2354
|
+
readonly _tag: "DragStarted";
|
|
2355
|
+
readonly source: {
|
|
2356
|
+
readonly _tag: "Existing";
|
|
2357
|
+
readonly id: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
2755
2358
|
} | {
|
|
2756
|
-
readonly _tag: "
|
|
2757
|
-
readonly
|
|
2758
|
-
readonly region: string;
|
|
2759
|
-
readonly index: number;
|
|
2359
|
+
readonly _tag: "New";
|
|
2360
|
+
readonly block: string;
|
|
2760
2361
|
};
|
|
2362
|
+
} | {
|
|
2363
|
+
readonly _tag: "DraggedOff";
|
|
2364
|
+
} | {
|
|
2365
|
+
readonly _tag: "DraggedOver";
|
|
2366
|
+
readonly id: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
2367
|
+
readonly zone: "after" | "before" | "inside";
|
|
2368
|
+
} | {
|
|
2369
|
+
readonly _tag: "DraggedOverPage";
|
|
2370
|
+
} | {
|
|
2371
|
+
readonly _tag: "DraggedOverRegion";
|
|
2372
|
+
readonly id: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
2373
|
+
readonly region: string;
|
|
2761
2374
|
} | {
|
|
2762
2375
|
readonly _tag: "DuplicateAsked";
|
|
2763
2376
|
readonly id: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
@@ -2771,8 +2384,50 @@ export declare const Builder: {
|
|
|
2771
2384
|
readonly index: number;
|
|
2772
2385
|
};
|
|
2773
2386
|
} | {
|
|
2774
|
-
readonly _tag: "
|
|
2775
|
-
readonly
|
|
2387
|
+
readonly _tag: "EditingAsked";
|
|
2388
|
+
readonly field: string;
|
|
2389
|
+
} | {
|
|
2390
|
+
readonly _tag: "EditingCancelled";
|
|
2391
|
+
readonly field: string;
|
|
2392
|
+
} | {
|
|
2393
|
+
readonly _tag: "EditingCommitted";
|
|
2394
|
+
readonly field: string;
|
|
2395
|
+
readonly text: string;
|
|
2396
|
+
} | {
|
|
2397
|
+
readonly _tag: "FieldTyped";
|
|
2398
|
+
readonly field: string;
|
|
2399
|
+
readonly text: string;
|
|
2400
|
+
} | {
|
|
2401
|
+
readonly _tag: "GotAnnouncerMessage";
|
|
2402
|
+
readonly message: {
|
|
2403
|
+
readonly _tag: "Announced";
|
|
2404
|
+
readonly message: string;
|
|
2405
|
+
readonly politeness: "assertive" | "polite";
|
|
2406
|
+
} | {
|
|
2407
|
+
readonly _tag: "Cleared";
|
|
2408
|
+
readonly generation: number;
|
|
2409
|
+
} | {
|
|
2410
|
+
readonly _tag: "Read";
|
|
2411
|
+
readonly generation: number;
|
|
2412
|
+
};
|
|
2413
|
+
} | {
|
|
2414
|
+
readonly _tag: "GotLayersMessage";
|
|
2415
|
+
readonly message: {
|
|
2416
|
+
readonly _tag: "Closed";
|
|
2417
|
+
readonly id: string;
|
|
2418
|
+
} | {
|
|
2419
|
+
readonly _tag: "Focused";
|
|
2420
|
+
readonly id: string;
|
|
2421
|
+
} | {
|
|
2422
|
+
readonly _tag: "Opened";
|
|
2423
|
+
readonly id: string;
|
|
2424
|
+
};
|
|
2425
|
+
} | {
|
|
2426
|
+
readonly _tag: "Hovered";
|
|
2427
|
+
readonly id: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
2428
|
+
} | {
|
|
2429
|
+
readonly _tag: "InsertAsked";
|
|
2430
|
+
readonly block: string;
|
|
2776
2431
|
readonly at: {
|
|
2777
2432
|
readonly _tag: "Root";
|
|
2778
2433
|
readonly index: number;
|
|
@@ -2783,30 +2438,19 @@ export declare const Builder: {
|
|
|
2783
2438
|
readonly index: number;
|
|
2784
2439
|
};
|
|
2785
2440
|
} | {
|
|
2786
|
-
readonly _tag: "
|
|
2787
|
-
readonly id: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
2788
|
-
} | {
|
|
2789
|
-
readonly _tag: "CutAsked";
|
|
2441
|
+
readonly _tag: "Inspected";
|
|
2790
2442
|
readonly id: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
2443
|
+
readonly form: string;
|
|
2444
|
+
readonly message: Schema.Json;
|
|
2791
2445
|
} | {
|
|
2792
|
-
readonly _tag: "
|
|
2793
|
-
|
|
2794
|
-
readonly
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
readonly _tag: "FieldTyped";
|
|
2801
|
-
readonly field: string;
|
|
2802
|
-
readonly text: string;
|
|
2803
|
-
} | {
|
|
2804
|
-
readonly _tag: "EditingCommitted";
|
|
2805
|
-
readonly field: string;
|
|
2806
|
-
readonly text: string;
|
|
2807
|
-
} | {
|
|
2808
|
-
readonly _tag: "EditingCancelled";
|
|
2809
|
-
readonly field: string;
|
|
2446
|
+
readonly _tag: "KeyPressed";
|
|
2447
|
+
readonly key: string;
|
|
2448
|
+
readonly modifiers: {
|
|
2449
|
+
readonly shiftKey: boolean;
|
|
2450
|
+
readonly ctrlKey: boolean;
|
|
2451
|
+
readonly altKey: boolean;
|
|
2452
|
+
readonly metaKey: boolean;
|
|
2453
|
+
};
|
|
2810
2454
|
} | {
|
|
2811
2455
|
readonly _tag: "Minted";
|
|
2812
2456
|
readonly ids: readonly (string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">)[];
|
|
@@ -2877,41 +2521,23 @@ export declare const Builder: {
|
|
|
2877
2521
|
readonly index: number;
|
|
2878
2522
|
};
|
|
2879
2523
|
};
|
|
2880
|
-
} | {
|
|
2881
|
-
readonly _tag: "Undid";
|
|
2882
|
-
} | {
|
|
2883
|
-
readonly _tag: "Redid";
|
|
2884
2524
|
} | {
|
|
2885
2525
|
readonly _tag: "PanelChosen";
|
|
2886
2526
|
readonly panel: "insert" | "layers" | "properties";
|
|
2887
2527
|
} | {
|
|
2888
|
-
readonly _tag: "
|
|
2889
|
-
readonly viewport: "wide" | "medium" | "narrow";
|
|
2528
|
+
readonly _tag: "PasteAsked";
|
|
2890
2529
|
} | {
|
|
2891
|
-
readonly _tag: "
|
|
2892
|
-
readonly
|
|
2893
|
-
|
|
2894
|
-
readonly
|
|
2530
|
+
readonly _tag: "PatternAsked";
|
|
2531
|
+
readonly pattern: string;
|
|
2532
|
+
readonly at: {
|
|
2533
|
+
readonly _tag: "Root";
|
|
2534
|
+
readonly index: number;
|
|
2895
2535
|
} | {
|
|
2896
|
-
readonly _tag: "
|
|
2897
|
-
readonly
|
|
2536
|
+
readonly _tag: "Region";
|
|
2537
|
+
readonly parent: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
2538
|
+
readonly region: string;
|
|
2539
|
+
readonly index: number;
|
|
2898
2540
|
};
|
|
2899
|
-
} | {
|
|
2900
|
-
readonly _tag: "DraggedOver";
|
|
2901
|
-
readonly id: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
2902
|
-
readonly zone: "before" | "inside" | "after";
|
|
2903
|
-
} | {
|
|
2904
|
-
readonly _tag: "DraggedOverRegion";
|
|
2905
|
-
readonly id: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
2906
|
-
readonly region: string;
|
|
2907
|
-
} | {
|
|
2908
|
-
readonly _tag: "DraggedOff";
|
|
2909
|
-
} | {
|
|
2910
|
-
readonly _tag: "DraggedOverPage";
|
|
2911
|
-
} | {
|
|
2912
|
-
readonly _tag: "DragDropped";
|
|
2913
|
-
} | {
|
|
2914
|
-
readonly _tag: "DragCancelled";
|
|
2915
2541
|
} | {
|
|
2916
2542
|
readonly _tag: "PreviewChosen";
|
|
2917
2543
|
readonly key: string;
|
|
@@ -2920,10 +2546,17 @@ export declare const Builder: {
|
|
|
2920
2546
|
readonly _tag: "PreviewCleared";
|
|
2921
2547
|
readonly key: string;
|
|
2922
2548
|
} | {
|
|
2923
|
-
readonly _tag: "
|
|
2549
|
+
readonly _tag: "Redid";
|
|
2550
|
+
} | {
|
|
2551
|
+
readonly _tag: "Selected";
|
|
2924
2552
|
readonly id: string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">;
|
|
2925
|
-
|
|
2926
|
-
readonly
|
|
2553
|
+
} | {
|
|
2554
|
+
readonly _tag: "Undid";
|
|
2555
|
+
} | {
|
|
2556
|
+
readonly _tag: "Unhovered";
|
|
2557
|
+
} | {
|
|
2558
|
+
readonly _tag: "ViewportChosen";
|
|
2559
|
+
readonly viewport: "medium" | "narrow" | "wide";
|
|
2927
2560
|
}, {
|
|
2928
2561
|
readonly format: 1;
|
|
2929
2562
|
readonly roots: readonly (string & import("effect/Brand").Brand<"@foldkit-composition/NodeId">)[];
|
|
@@ -2945,7 +2578,7 @@ export declare const Builder: {
|
|
|
2945
2578
|
};
|
|
2946
2579
|
}, {}>;
|
|
2947
2580
|
/** Where a new node of a Block goes, given the selection; none where it may not go. */
|
|
2948
|
-
placeFor: (document: Document, selected: Option.Option<NodeId>, block: Blocks[
|
|
2581
|
+
placeFor: (document: Document, selected: Option.Option<NodeId>, block: Blocks['name']) => Option.Option<{
|
|
2949
2582
|
readonly _tag: "Root";
|
|
2950
2583
|
readonly index: number;
|
|
2951
2584
|
} | {
|
|
@@ -2964,7 +2597,7 @@ export declare const Builder: {
|
|
|
2964
2597
|
readonly region: string;
|
|
2965
2598
|
readonly index: number;
|
|
2966
2599
|
}>;
|
|
2967
|
-
moveBy:
|
|
2600
|
+
moveBy: typeof moveBy;
|
|
2968
2601
|
/** Where what is dragged over `target`, in `zone`, would go; none where it may not. */
|
|
2969
2602
|
dropAt: (document: Document, dragged: DragSource, target: NodeId, zone: DropZone) => Option.Option<{
|
|
2970
2603
|
readonly _tag: "Root";
|
|
@@ -2975,22 +2608,23 @@ export declare const Builder: {
|
|
|
2975
2608
|
readonly region: string;
|
|
2976
2609
|
readonly index: number;
|
|
2977
2610
|
}>;
|
|
2978
|
-
replace:
|
|
2979
|
-
settle:
|
|
2611
|
+
replace: typeof replace;
|
|
2612
|
+
settle: typeof settle;
|
|
2980
2613
|
/** The editor's commands: what a key, a node's action or the toolbar runs. */
|
|
2981
2614
|
commands: readonly BuilderCommand[];
|
|
2982
|
-
keyCommand: (model: Pick<Model
|
|
2615
|
+
keyCommand: (model: Pick<Model, 'page' | 'selected' | 'editing'>, key: string, modifiers: KeyboardModifiers) => Option.Option<Message>;
|
|
2616
|
+
keyPressed: (model: Pick<Model, 'editing'>, key: string, modifiers: KeyboardModifiers) => Option.Option<Message>;
|
|
2983
2617
|
/**
|
|
2984
2618
|
* The selected node's settings form and its Model, for the inspector to
|
|
2985
2619
|
* draw: the Model it holds for the node, else one filled from the props.
|
|
2986
2620
|
*/
|
|
2987
|
-
inspecting: (model: Pick<Model
|
|
2621
|
+
inspecting: (model: Pick<Model, 'page' | 'selected' | 'inspector'>) => Option.Option<Inspecting>;
|
|
2988
2622
|
/** The Blocks a new node may be, in the Catalog's order: those with starting props. */
|
|
2989
2623
|
offered: string[];
|
|
2990
2624
|
/** The Document a Builder Model is editing: its history's present. */
|
|
2991
|
-
document:
|
|
2625
|
+
document: typeof documentOf;
|
|
2992
2626
|
};
|
|
2993
2627
|
};
|
|
2994
2628
|
//#endregion
|
|
2995
|
-
export {
|
|
2629
|
+
export type { EditWords, Settings };
|
|
2996
2630
|
//# sourceMappingURL=index.d.mts.map
|