foldkit-bundle-surface 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -9,6 +9,123 @@ import { CallableTaggedStruct } from "foldkit/schema";
9
9
  import { Html, HtmlBuilder } from "foldkit/html";
10
10
  import "foldkit/url";
11
11
  import "foldkit/message";
12
+ //#region ../bundle/src/placed.d.ts
13
+ declare const PlacedTypeId: unique symbol;
14
+ /**
15
+ * Args for a placement: a static value, or a factory deriving them from the
16
+ * parent seed — the fields `assembly.initial(rest)` was given, before any
17
+ * placement initialised. A factory runs once per initialization and its result
18
+ * is retained for the placement's `init`, `update`, helpers, Subscriptions,
19
+ * and resources; it never re-runs against changing parent state, so keep it
20
+ * pure of its seed.
21
+ *
22
+ * When no initialization ran — a hand-built Model in a test, which never went
23
+ * through `initial` — `update` derives from the given parent per use, without
24
+ * retaining, so each Model is folded with its own seed.
25
+ *
26
+ * Read only seed fields (route, auth, workspace, ...), never sibling
27
+ * placement fields: every factory sees the same base seed, so a sibling read
28
+ * is consistently absent rather than order-dependent.
29
+ */
30
+ type ArgsSource<Seed, Args> = Args | ((seed: Seed) => Args);
31
+ interface PlaceConfig<Args, Parent, LinkMessage, Message, OutMessage, OutStepMessage, R2, ParentSeed = Parent> {
32
+ /**
33
+ * The bundle's args: a static value, or a factory from the parent seed (the
34
+ * fields `assembly.initial(rest)` was given, minus this placement's own
35
+ * field). A factory is computed once per initialization and retained for
36
+ * `init`, `update`, and helpers. Subscriptions and resources built from it
37
+ * require `initial`/`config` to have run first; a bundle with neither
38
+ * contributes empty records either way.
39
+ */
40
+ readonly args?: ArgsSource<ParentSeed, Args>;
41
+ /** Handles the child's OutMessage in parent terms, with the child already written back. */
42
+ readonly onOut?: (outMessage: OutMessage, context: Update.FoldContext<Message, LinkMessage>) => Update.Step<NoInfer<Parent>, OutStepMessage, R2>;
43
+ /**
44
+ * Observes each of the child's Messages in parent terms, after the child has
45
+ * handled it and its `onOut` has run, so the parent's own update needs no arm
46
+ * for the wrapper. Helpers are not Messages and do not reach it.
47
+ */
48
+ readonly onMessage?: (message: Message) => Update.Step<NoInfer<Parent>, OutStepMessage, R2>;
49
+ /** Prefix for the placement's Subscription and resource keys. Defaults to `Name@path`. */
50
+ readonly key?: string;
51
+ /** A gate beside the Link's own: Subscriptions and resources run only while both hold. */
52
+ readonly when?: (parent: Parent) => boolean;
53
+ }
54
+ /** A lifted resource record: each child entry in parent terms, keyed by the placement. */
55
+ 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]>>;
56
+ 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; };
57
+ interface Placed<Name extends string, Parent, ParentMessage, Model, Message, R, S, ViewInputs, Resources, Helpers, Field extends string = string, Claimed extends string = string> {
58
+ readonly [PlacedTypeId]: typeof PlacedTypeId;
59
+ /** Types only: the top-level Model field this placement owns, or `string` when unknown. */
60
+ readonly field?: Field;
61
+ /** Types only: the parent Message tag this placement routes, or `string` when unknown. */
62
+ readonly claims?: Claimed;
63
+ readonly name: Name;
64
+ /** `Name@path`, or the configured `key`: the prefix of every Subscription and resource key. */
65
+ readonly key: string;
66
+ /** The encoded args as text, when the bundle has an args Schema. */
67
+ readonly argsSummary: string | undefined;
68
+ /** Whether `args` was given as a seed factory; resolved once per initialization. */
69
+ readonly hasDynamicArgs: boolean;
70
+ /**
71
+ * Derives the factory's args from `seed`, validates them against the
72
+ * bundle's args Schema, and retains them for `init`, `update`, helpers,
73
+ * Subscriptions, and resources. A no-op for static args. The assembly calls
74
+ * this with the base seed before running inits, so every factory sees the
75
+ * same parent state whatever the placement order.
76
+ */
77
+ readonly resolveArgs: (seed: unknown) => void;
78
+ /**
79
+ * Assembly use: marks the placement skipped because `rest` provides its
80
+ * top-level field, so its factory never runs and its records contribute
81
+ * nothing while the child is absent. Cleared by the next `resolveArgs`.
82
+ */
83
+ readonly skipArgs: () => void;
84
+ readonly link: Link$1<Parent, ParentMessage, Model, Message>;
85
+ /** Writes the child's initial Model and starts its `init` Commands. */
86
+ readonly init: Update.Step<Parent, ParentMessage, R>;
87
+ /** Folds the Message when it belongs to this placement; `None` otherwise. */
88
+ readonly update: (parent: Parent, message: AnyMessage$1) => Option.Option<Update.Return<Parent, ParentMessage, R>>;
89
+ readonly subscriptions: Subscription.Subscriptions<Parent, ParentMessage, S>;
90
+ readonly resources: PlacedResources<Parent, ParentMessage, Resources>;
91
+ /**
92
+ * Renders the child through `h.submodel`; nothing while the child is absent.
93
+ * Generic over the parent's whole Message, which must include this placement's.
94
+ */
95
+ readonly view: PlacedView<Parent, ParentMessage, ViewInputs>;
96
+ /**
97
+ * The same view in another slot, for rendering one placement in two DOM
98
+ * positions (desktop and mobile). `h.submodel` throws on a repeated slot.
99
+ */
100
+ readonly viewIn: (slot: string) => PlacedView<Parent, ParentMessage, ViewInputs>;
101
+ readonly helpers: PlacedHelpers<Parent, ParentMessage, R, Helpers>;
102
+ }
103
+ /**
104
+ * What a placement's view needs of a builder: `submodel`, and `OnClick` to
105
+ * read its Message from. A wrapper of Foldkit's builder that keeps both, such
106
+ * as `foldkit-ssr`'s resumable builder, is one.
107
+ */
108
+ type BuilderLike = Pick<HtmlBuilder<any>, 'submodel' | 'OnClick'>;
109
+ 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;
110
+ /** A readable type error: intersected onto a parameter, its message names the fix. */
111
+ interface Invalid<Message extends string> {
112
+ readonly invalid: Message;
113
+ }
114
+ type BuilderMessage<H> = H extends {
115
+ readonly OnClick: (message: infer M, ...rest: any) => any;
116
+ } ? M : never;
117
+ /**
118
+ * The parent's `h`, checked to accept this placement's Messages. Generic over the
119
+ * whole builder rather than its Message: inferring a Message through
120
+ * `HtmlBuilder` costs thousands of type instantiations per call, while the
121
+ * builder infers as itself and its Message is extracted once per builder type.
122
+ */
123
+ 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">);
124
+ /** The tag of a Link's parent variant, or `string` when it cannot be read. */
125
+ type TagOf<LinkMessage> = LinkMessage extends {
126
+ readonly _tag: infer Tag extends string;
127
+ } ? Tag : string;
128
+ //#endregion
12
129
  //#region ../bundle/src/link.d.ts
13
130
  declare const LinkTypeId: unique symbol;
14
131
  /** The parent Message variant `Tag({ message })` that carries a child's Messages. */
@@ -37,8 +154,14 @@ interface Wrapper$1<Tag extends string, ChildMessage> {
37
154
  type AnyMessage$1 = {
38
155
  readonly _tag: string;
39
156
  };
40
- interface Link$1<Parent, ParentMessage, Child, ChildMessage> extends Pipeable.Pipeable {
157
+ /**
158
+ * `Field` is the parent's top-level field the child is written into, when the
159
+ * Link is one: `never` for a child nested deeper, and `string` when unknown.
160
+ */
161
+ interface Link$1<Parent, ParentMessage, Child, ChildMessage, Field extends string = string> extends Pipeable.Pipeable {
41
162
  readonly [LinkTypeId]: typeof LinkTypeId;
163
+ /** Types only: the top-level field, so `placements.initial` knows who writes it. */
164
+ readonly field?: Field;
42
165
  readonly read: (parent: Parent) => Option.Option<Child>;
43
166
  readonly write: (parent: Parent, child: Child) => Parent;
44
167
  readonly toParentMessage: (message: ChildMessage) => ParentMessage;
@@ -53,14 +176,35 @@ interface Link$1<Parent, ParentMessage, Child, ChildMessage> extends Pipeable.Pi
53
176
  /** The application a Link built from a Surface field ref belongs to, for its Module contract. */
54
177
  readonly owner?: object | undefined;
55
178
  }
56
- interface MakeConfig<Parent, Tag extends string, Child, ChildMessage> {
179
+ /** A Message union's variant `Tag({ message })`, as `defineMessageUnion` declares it. */
180
+ type Variant = {
181
+ readonly fields: {
182
+ readonly _tag: Schema.tag<string>;
183
+ readonly message: Schema.Top;
184
+ };
185
+ };
186
+ type VariantTag<V extends Variant> = V['fields']['_tag'] extends Schema.tag<infer Tag extends string> ? Tag : never;
187
+ 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'>;
188
+ /**
189
+ * The parent variant `Tag({ message })` for a child's Messages: from a tag and
190
+ * the child's Message Schema, whose `cases` then go into the parent's union, or
191
+ * from a variant the parent's union already declares.
192
+ */
193
+ declare function wrapper<const Tag extends string, ChildMessage>(tag: Tag, childMessage: Schema.Codec<ChildMessage, unknown>): Wrapper$1<Tag, ChildMessage>;
194
+ declare function wrapper<V extends Variant>(variant: V & OnlyMessage<V>): Wrapper$1<VariantTag<V>, V['fields']['message']['Type']>;
195
+ interface MakeConfig<Parent, Tag extends string, Child, ChildMessage, Path> {
57
196
  readonly read: (parent: Parent) => Option.Option<Child>;
58
197
  readonly write: (parent: Parent, child: Child) => Parent;
59
198
  readonly wrapper: Wrapper$1<Tag, ChildMessage>;
60
199
  readonly when?: (parent: Parent) => boolean;
61
- readonly path: ReadonlyArray<string>;
200
+ readonly path: Path;
62
201
  readonly owner?: object | undefined;
63
202
  }
203
+ /**
204
+ * The top-level field a path names. `initial` treats a one-segment path as the
205
+ * field the placement writes, so a longer one names none.
206
+ */
207
+ type FieldOfPath<Path> = Path extends readonly [infer Field extends string] ? Field : Path extends readonly [string, ...ReadonlyArray<string>] ? never : string;
64
208
  type OptionKeys<Parent> = { [K in keyof Parent]: Parent[K] extends Option.Option<unknown> ? K : never; }[keyof Parent] & string;
65
209
  type OptionValue<A> = A extends Option.Option<infer Value> ? Value : never;
66
210
  /** The parent Message variant `Tag({ key, message })` that carries one collection item's Messages. */
@@ -86,7 +230,9 @@ interface KeyedWrapper<Tag extends string, ChildMessage, Key extends string = st
86
230
  * business: a record by key, an array identified by id, or anything with these
87
231
  * operations. `entries` is the order views and Subscriptions follow.
88
232
  */
89
- interface CollectionLink<Parent, ParentMessage, Child, ChildMessage, Key extends string = string> {
233
+ interface CollectionLink<Parent, ParentMessage, Child, ChildMessage, Key extends string = string, Field extends string = string> {
234
+ /** Types only: the top-level field holding the items, or `string` when unknown. */
235
+ readonly field?: Field;
90
236
  /** The storage with no items, for a parent's initial Model. */
91
237
  readonly empty: unknown;
92
238
  readonly entries: (parent: Parent) => ReadonlyArray<readonly [key: Key, child: Child]>;
@@ -106,119 +252,75 @@ type RecordValue<A> = A extends Readonly<Record<string, infer Value>> ? Value :
106
252
  type ArrayKeys<Parent> = { [K in keyof Parent]: Parent[K] extends ReadonlyArray<unknown> ? K : never; }[keyof Parent] & string;
107
253
  type ArrayItem<A> = A extends ReadonlyArray<infer Item> ? Item : never;
108
254
  declare const Link$1: {
109
- readonly wrapper: <const Tag extends string, ChildMessage>(tag: Tag, childMessage: Schema.Codec<ChildMessage, unknown>) => Wrapper$1<Tag, ChildMessage>;
110
- readonly make: <Parent, const Tag extends string, Child, ChildMessage>(config: MakeConfig<Parent, Tag, Child, ChildMessage>) => Link$1<Parent, Wrapped<Tag, ChildMessage>, Child, ChildMessage>;
255
+ readonly wrapper: typeof wrapper;
256
+ readonly make: <Parent, const Tag extends string, Child, ChildMessage, const Path extends ReadonlyArray<string> = readonly string[]>(config: MakeConfig<Parent, Tag, Child, ChildMessage, Path>) => Link$1<Parent, Wrapped<Tag, ChildMessage>, Child, ChildMessage, FieldOfPath<Path>>;
111
257
  readonly field: <Parent>() => <const Key extends keyof Parent & string, const Tag extends string, ChildMessage>(key: Key, wrap: Wrapper$1<Tag, ChildMessage>, options?: {
112
258
  readonly when?: (parent: Parent) => boolean;
113
- }) => Link$1<Parent, Wrapped<Tag, ChildMessage>, Parent[Key], ChildMessage>;
259
+ }) => Link$1<Parent, Wrapped<Tag, ChildMessage>, Parent[Key], ChildMessage, Key>;
114
260
  readonly optional: <Parent>() => <const Key extends OptionKeys<Parent>, const Tag extends string, ChildMessage>(key: Key, wrap: Wrapper$1<Tag, ChildMessage>, options?: {
115
261
  readonly when?: (parent: Parent) => boolean;
116
- }) => Link$1<Parent, Wrapped<Tag, ChildMessage>, OptionValue<Parent[Key]>, ChildMessage>;
117
- readonly compose: <A, AMessage, B, BMessage extends AnyMessage$1, C, CMessage>(outer: Link$1<A, AMessage, B, BMessage>, inner: Link$1<B, BMessage, C, CMessage>) => Link$1<A, AMessage, C, CMessage>;
262
+ }) => Link$1<Parent, Wrapped<Tag, ChildMessage>, OptionValue<Parent[Key]>, ChildMessage, Key>;
263
+ readonly compose: <A, AMessage, B, BMessage extends AnyMessage$1, C, CMessage>(outer: Link$1<A, AMessage, B, BMessage, string>, inner: Link$1<B, BMessage, C, CMessage, string>) => Link$1<A, AMessage, C, CMessage, never>;
118
264
  readonly andThen: {
119
- <B, BMessage extends AnyMessage$1, C, CMessage>(inner: Link$1<B, BMessage, C, CMessage>): <A, AMessage>(outer: Link$1<A, AMessage, B, BMessage>) => Link$1<A, AMessage, C, CMessage>;
120
- <A, AMessage, B, BMessage extends AnyMessage$1, C, CMessage>(outer: Link$1<A, AMessage, B, BMessage>, inner: Link$1<B, BMessage, C, CMessage>): Link$1<A, AMessage, C, CMessage>;
265
+ <B, BMessage extends AnyMessage$1, C, CMessage>(inner: Link$1<B, BMessage, C, CMessage, string>): <A, AMessage>(outer: Link$1<A, AMessage, B, BMessage, string>) => Link$1<A, AMessage, C, CMessage, never>;
266
+ <A, AMessage, B, BMessage extends AnyMessage$1, C, CMessage>(outer: Link$1<A, AMessage, B, BMessage, string>, inner: Link$1<B, BMessage, C, CMessage, string>): Link$1<A, AMessage, C, CMessage, never>;
121
267
  };
122
268
  readonly when: {
123
- <Parent>(predicate: (parent: Parent) => boolean): <ParentMessage, Child, ChildMessage>(self: Link$1<Parent, ParentMessage, Child, ChildMessage>) => Link$1<Parent, ParentMessage, Child, ChildMessage>;
124
- <Parent, ParentMessage, Child, ChildMessage>(self: Link$1<Parent, ParentMessage, Child, ChildMessage>, predicate: (parent: Parent) => boolean): Link$1<Parent, ParentMessage, Child, ChildMessage>;
269
+ <Parent>(predicate: (parent: Parent) => boolean): <ParentMessage, Child, ChildMessage, Field extends string>(self: Link$1<Parent, ParentMessage, Child, ChildMessage, Field>) => Link$1<Parent, ParentMessage, Child, ChildMessage, Field>;
270
+ <Parent, ParentMessage, Child, ChildMessage, Field extends string>(self: Link$1<Parent, ParentMessage, Child, ChildMessage, Field>, predicate: (parent: Parent) => boolean): Link$1<Parent, ParentMessage, Child, ChildMessage, Field>;
271
+ };
272
+ readonly foldInit: <Parent, ParentMessage, Child, ChildMessage, Field extends string>(link: Link$1<Parent, ParentMessage, Child, ChildMessage, Field>, rest: Omit<Parent, Field>) => {
273
+ readonly toParentModel: (child: Child) => Parent;
274
+ readonly toParentMessage: (message: ChildMessage) => ParentMessage;
125
275
  };
126
276
  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>;
127
277
  readonly collection: <Parent>() => <const Field extends RecordKeys<Parent>, const Tag extends string, ChildMessage, Key extends string>(field: Field, wrap: KeyedWrapper<Tag, ChildMessage, Key>, options?: {
128
278
  readonly when?: (parent: Parent, key: Key) => boolean;
129
- }) => CollectionLink<Parent, KeyedWrapped<Tag, ChildMessage, Key>, RecordValue<Parent[Field]>, ChildMessage, Key>;
279
+ }) => CollectionLink<Parent, KeyedWrapped<Tag, ChildMessage, Key>, RecordValue<Parent[Field]>, ChildMessage, Key, Field>;
130
280
  readonly collectionById: <Parent>() => <const Field extends ArrayKeys<Parent>, const Tag extends string, ChildMessage, Key extends string>(field: Field, wrap: KeyedWrapper<Tag, ChildMessage, Key>, options: {
131
281
  readonly id: (item: ArrayItem<Parent[Field]>) => Key;
132
282
  readonly when?: (parent: Parent, key: Key) => boolean;
133
- }) => CollectionLink<Parent, KeyedWrapped<Tag, ChildMessage, Key>, ArrayItem<Parent[Field]>, ChildMessage, Key>;
283
+ }) => CollectionLink<Parent, KeyedWrapped<Tag, ChildMessage, Key>, ArrayItem<Parent[Field]>, ChildMessage, Key, Field>;
134
284
  };
135
285
  //#endregion
136
- //#region ../bundle/src/placed.d.ts
137
- declare const PlacedTypeId: unique symbol;
138
- interface PlaceConfig<Args, Parent, LinkMessage, Message, OutMessage, OutStepMessage, R2> {
139
- readonly args?: Args;
140
- /** Handles the child's OutMessage in parent terms, with the child already written back. */
141
- readonly onOut?: (outMessage: OutMessage, context: Update.FoldContext<Message, LinkMessage>) => Update.Step<NoInfer<Parent>, OutStepMessage, R2>;
142
- /** Prefix for the placement's Subscription and resource keys. Defaults to `Name@path`. */
143
- readonly key?: string;
144
- /** A gate beside the Link's own: Subscriptions and resources run only while both hold. */
145
- readonly when?: (parent: Parent) => boolean;
146
- }
147
- /** A lifted resource record: each child entry in parent terms, keyed by the placement. */
148
- 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, any> ? ManagedResource.Entry<Parent, ParentMessage, Requirements, Value, Service> : never; }[keyof Resources]>>;
149
- 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; };
150
- interface Placed<Name extends string, Parent, ParentMessage, Model, Message, R, S, ViewInputs, Resources, Helpers, Field extends string = string> {
151
- readonly [PlacedTypeId]: typeof PlacedTypeId;
152
- /** Types only: the top-level Model field this placement owns, or `string` when unknown. */
153
- readonly field?: Field;
154
- readonly name: Name;
155
- /** `Name@path`, or the configured `key`: the prefix of every Subscription and resource key. */
156
- readonly key: string;
157
- /** The encoded args as text, when the bundle has an args Schema. */
158
- readonly argsSummary: string | undefined;
159
- readonly link: Link$1<Parent, ParentMessage, Model, Message>;
160
- /** Writes the child's initial Model and starts its `init` Commands. */
161
- readonly init: Update.Step<Parent, ParentMessage, R>;
162
- /** Folds the Message when it belongs to this placement; `None` otherwise. */
163
- readonly update: (parent: Parent, message: AnyMessage$1) => Option.Option<Update.Return<Parent, ParentMessage, R>>;
164
- readonly subscriptions: Subscription.Subscriptions<Parent, ParentMessage, S>;
165
- readonly resources: PlacedResources<Parent, ParentMessage, Resources>;
166
- /**
167
- * Renders the child through `h.submodel`; nothing while the child is absent.
168
- * Generic over the parent's whole Message, which must include this placement's.
169
- */
170
- readonly view: PlacedView<Parent, ParentMessage, ViewInputs>;
171
- /**
172
- * The same view in another slot, for rendering one placement in two DOM
173
- * positions (desktop and mobile). `h.submodel` throws on a repeated slot.
174
- */
175
- readonly viewIn: (slot: string) => PlacedView<Parent, ParentMessage, ViewInputs>;
176
- readonly helpers: PlacedHelpers<Parent, ParentMessage, R, Helpers>;
177
- }
178
- /**
179
- * What a placement's view needs of a builder: `submodel`, and `OnClick` to
180
- * read its Message from. A wrapper of Foldkit's builder that keeps both, such
181
- * as `foldkit-ssr`'s resumable builder, is one.
182
- */
183
- type BuilderLike = Pick<HtmlBuilder<any>, 'submodel' | 'OnClick'>;
184
- 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;
185
- /** A readable type error: intersected onto a parameter, its message names the fix. */
186
- interface Invalid<Message extends string> {
187
- readonly invalid: Message;
188
- }
189
- type BuilderMessage<H> = H extends {
190
- readonly OnClick: (message: infer M, ...rest: any) => any;
191
- } ? M : never;
192
- /**
193
- * The parent's `h`, checked to accept this placement's Messages. Generic over the
194
- * whole builder rather than its Message: inferring a Message through
195
- * `HtmlBuilder` costs thousands of type instantiations per call, while the
196
- * builder infers as itself and its Message is extracted once per builder type.
197
- */
198
- 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">);
199
- //#endregion
200
286
  //#region ../bundle/src/collection.d.ts
201
287
  declare const PlacedCollectionTypeId: unique symbol;
202
- interface EachConfig<Args, Parent, LinkMessage, Message, OutMessage, OutStepMessage, R2, Key extends string = string> {
203
- /** The args every item's `init` and `update` receive. */
204
- readonly args?: Args;
288
+ interface EachConfig<Args, Parent, LinkMessage, Message, OutMessage, OutStepMessage, R2, Key extends string = string, ParentSeed = Parent> {
289
+ /**
290
+ * The args every item's `init` and `update` receive: a static value, or a
291
+ * factory from the parent seed, computed once per initialization and
292
+ * retained. Adding items requires `initial`/`config` to have run; `update`
293
+ * on a Model no initialization produced derives per use instead.
294
+ */
295
+ readonly args?: ArgsSource<ParentSeed, Args>;
205
296
  /** Handles an item's OutMessage in parent terms, with the item already written back. */
206
297
  readonly onOut?: (outMessage: OutMessage, key: Key, context: Update.FoldContext<Message, LinkMessage>) => Update.Step<NoInfer<Parent>, OutStepMessage, R2>;
298
+ /** Observes each item's Messages in parent terms, after the item has handled it and its `onOut` has run. */
299
+ readonly onMessage?: (message: Message, key: Key) => Update.Step<NoInfer<Parent>, OutStepMessage, R2>;
207
300
  /** Prefix for the collection's Subscription keys. Defaults to `Name@path[]`. */
208
301
  readonly key?: string;
209
302
  readonly when?: (parent: Parent, key: Key) => boolean;
210
303
  }
211
304
  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;
212
305
  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; };
213
- interface PlacedCollection<Name extends string, Parent, ParentMessage, Model, Message, R, S, ViewInputs, Helpers, Field extends string = string, Key extends string = string> {
306
+ 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> {
214
307
  readonly [PlacedCollectionTypeId]: typeof PlacedCollectionTypeId;
215
308
  /** Types only: the record field this collection owns, or `string` when unknown. */
216
309
  readonly field?: Field;
310
+ /** Types only: the parent Message tag this collection routes, or `string` when unknown. */
311
+ readonly claims?: Claimed;
217
312
  readonly name: Name;
218
313
  /** `Name@path[]`, or the configured `key`: the prefix of every Subscription key. */
219
314
  readonly key: string;
220
315
  /** The encoded args as text, when the bundle has an args Schema. */
221
316
  readonly argsSummary: string | undefined;
317
+ /** Whether `args` was given as a seed factory; resolved once per initialization. */
318
+ readonly hasDynamicArgs: boolean;
319
+ /**
320
+ * Derives the factory's args from `seed` and retains them for `add`,
321
+ * `update`, and Subscriptions. A no-op for static args.
322
+ */
323
+ readonly resolveArgs: (seed: unknown) => void;
222
324
  readonly link: CollectionLink<Parent, ParentMessage, Model, Message, Key>;
223
325
  /** Folds the Message into its item; `None` when it is not this collection's. A missing key leaves the parent unchanged. */
224
326
  readonly update: (parent: Parent, message: AnyMessage$1) => Option.Option<Update.Return<Parent, ParentMessage, R>>;
@@ -254,6 +356,11 @@ type BundleParts<B> = B extends Bundle$1<infer Name, infer Args, infer Model, in
254
356
  } : never;
255
357
  //#endregion
256
358
  //#region ../bundle/src/bundle.d.ts
359
+ /**
360
+ * The parent seed a factory observes: the parent without the placement's own
361
+ * field, or the whole parent where the field is unknown (`string`).
362
+ */
363
+ type SeedFor<Parent, Field extends string> = string extends Field ? Parent : Omit<Parent, Field>;
257
364
  declare const BundleTypeId: unique symbol;
258
365
  /** A child Managed Resource entry: its requirements are an `Option`, so the entry can release. */
259
366
  type ResourceEntry<Model, Message> = ManagedResource.Entry<Model, Message, Option.Option<any>, any, any>;
@@ -287,44 +394,51 @@ interface Bundle$1<Name extends string, Args, Model, Message extends AnyMessage$
287
394
  */
288
395
  readonly with: (args: Args) => Bundle$1<Name, void, Model, Message, OutMessage, R, S, ViewInputs, Resources, Helpers>;
289
396
  /** Places the bundle where `link` points. */
290
- readonly at: <Parent, LinkMessage, OutStepMessage = never, R2 = never>(link: Link$1<Parent, LinkMessage, Model, Message>, ...config: PlaceConfigParam<Args, Parent, LinkMessage, Message, OutMessage, OutStepMessage, R2>) => Placed<Name, Parent, LinkMessage | OutStepMessage, Model, Message, R | R2, S, ViewInputs, Resources, Helpers>;
397
+ readonly at: <Parent, LinkMessage, Field extends string, OutStepMessage = never, R2 = never>(link: Link$1<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>>;
291
398
  /** Places the bundle once per key of the collection `link` points at. */
292
- readonly each: [keyof Resources] extends [never] ? <Parent, LinkMessage, Key extends string, OutStepMessage = never, R2 = never>(link: CollectionLink<Parent, LinkMessage, Model, Message, Key>, ...config: EachConfigParam<Args, Parent, LinkMessage, Message, OutMessage, OutStepMessage, R2, Key>) => PlacedCollection<Name, Parent, LinkMessage | OutStepMessage, Model, Message, R | R2, S, ViewInputs, Helpers, string, Key> : Invalid<'Bundle.each does not support Managed Resources yet: the runtime provides a resource by one tag, so items would share it'>;
399
+ 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'>;
293
400
  }
294
401
  /**
295
402
  * What placing needs: `args` when `init` takes them, and `onOut` when the
296
403
  * bundle has an OutMessage, so an OutMessage is never dropped by omission.
404
+ * `args` is a static value or a factory from the parent seed (the parent
405
+ * without this placement's own field); the seed type defaults to the whole
406
+ * parent where the field is unknown.
297
407
  */
298
- type PlacementConfig<Args, Parent, LinkMessage, Message, OutMessage, OutStepMessage, R2> = {
408
+ type PlacementConfig<Args, Parent, LinkMessage, Message, OutMessage, OutStepMessage, R2, ParentSeed = Parent> = {
299
409
  /** Prefix for the placement's Subscription and resource keys. Defaults to `Name@path`. */
300
410
  readonly key?: string;
301
411
  /** A gate beside the Link's own: the child's Subscriptions and resources run only while both hold. */
302
412
  readonly when?: (parent: Parent) => boolean;
413
+ /** Observes each of the child's Messages in parent terms, after the child handled it. */
414
+ readonly onMessage?: Required<PlaceConfig<Args, Parent, LinkMessage, Message, OutMessage, OutStepMessage, R2, ParentSeed>>['onMessage'];
303
415
  } & ([Args] extends [void] ? {
304
416
  readonly args?: never;
305
417
  } : {
306
- readonly args: Args;
418
+ readonly args: ArgsSource<ParentSeed, Args>;
307
419
  }) & ([OutMessage] extends [never] ? {
308
420
  readonly onOut?: never;
309
421
  } : {
310
- readonly onOut: Required<PlaceConfig<Args, Parent, LinkMessage, Message, OutMessage, OutStepMessage, R2>>['onOut'];
422
+ readonly onOut: Required<PlaceConfig<Args, Parent, LinkMessage, Message, OutMessage, OutStepMessage, R2, ParentSeed>>['onOut'];
311
423
  });
312
424
  /** The config argument is optional only when it would be empty. */
313
- type PlaceConfigParam<Args, Parent, LinkMessage, Message, OutMessage, OutStepMessage, R2> = [Args] extends [void] ? [OutMessage] extends [never] ? [config?: PlacementConfig<Args, Parent, LinkMessage, Message, OutMessage, OutStepMessage, R2>] : [config: PlacementConfig<Args, Parent, LinkMessage, Message, OutMessage, OutStepMessage, R2>] : [config: PlacementConfig<Args, Parent, LinkMessage, Message, OutMessage, OutStepMessage, R2>];
314
- type EachOptions<Args, Parent, LinkMessage, Message, OutMessage, OutStepMessage, R2, Key extends string = string> = {
425
+ 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>];
426
+ type EachOptions<Args, Parent, LinkMessage, Message, OutMessage, OutStepMessage, R2, Key extends string = string, ParentSeed = Parent> = {
315
427
  readonly key?: string;
316
428
  /** A gate per item beside the Link's own: an item's Subscriptions run only while both hold. */
317
429
  readonly when?: (parent: Parent, key: Key) => boolean;
430
+ /** Observes each item's Messages in parent terms, after the item handled it. */
431
+ readonly onMessage?: Required<EachConfig<Args, Parent, LinkMessage, Message, OutMessage, OutStepMessage, R2, Key, ParentSeed>>['onMessage'];
318
432
  } & ([Args] extends [void] ? {
319
433
  readonly args?: never;
320
434
  } : {
321
- readonly args: Args;
435
+ readonly args: ArgsSource<ParentSeed, Args>;
322
436
  }) & ([OutMessage] extends [never] ? {
323
437
  readonly onOut?: never;
324
438
  } : {
325
- readonly onOut: Required<EachConfig<Args, Parent, LinkMessage, Message, OutMessage, OutStepMessage, R2, Key>>['onOut'];
439
+ readonly onOut: Required<EachConfig<Args, Parent, LinkMessage, Message, OutMessage, OutStepMessage, R2, Key, ParentSeed>>['onOut'];
326
440
  });
327
- type EachConfigParam<Args, Parent, LinkMessage, Message, OutMessage, OutStepMessage, R2, Key extends string = string> = [Args] extends [void] ? [OutMessage] extends [never] ? [config?: EachOptions<Args, Parent, LinkMessage, Message, OutMessage, OutStepMessage, R2, Key>] : [config: EachOptions<Args, Parent, LinkMessage, Message, OutMessage, OutStepMessage, R2, Key>] : [config: EachOptions<Args, Parent, LinkMessage, Message, OutMessage, OutStepMessage, R2, Key>];
441
+ 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>];
328
442
  /** Any bundle, for APIs that accept one without caring about its types. */
329
443
  type AnyBundle = Bundle$1<string, any, any, any, any, any, any, any, any, any>;
330
444
  //#endregion
@@ -332,8 +446,8 @@ type AnyBundle = Bundle$1<string, any, any, any, any, any, any, any, any, any>;
332
446
  type P<B> = BundleParts<B>;
333
447
  /** Collections cannot place a bundle with Managed Resources; reported at the bundle. */
334
448
  type WithoutResources<B> = [keyof P<B>['Resources']] extends [never] ? unknown : Invalid<'A collection cannot place a bundle with Managed Resources: the runtime provides a resource by one tag, so every item would share it'>;
335
- type PlacedBy<B extends AnyBundle, Model, LinkMessage, OutStepMessage, R2, Field extends string> = Placed<P<B>['Name'], Model, LinkMessage | OutStepMessage, P<B>['Model'], P<B>['Message'], P<B>['R'] | R2, P<B>['S'], P<B>['ViewInputs'], P<B>['Resources'], P<B>['Helpers'], Field>;
336
- type CollectionBy<B extends AnyBundle, Model, LinkMessage, OutStepMessage, R2, Field extends string> = PlacedCollection<P<B>['Name'], Model, LinkMessage | OutStepMessage, P<B>['Model'], P<B>['Message'], P<B>['R'] | R2, P<B>['S'], P<B>['ViewInputs'], P<B>['Helpers'], Field>;
449
+ type PlacedBy<B extends AnyBundle, Model, LinkMessage, OutStepMessage, R2, Field extends string> = Placed<P<B>['Name'], Model, LinkMessage | OutStepMessage, P<B>['Model'], P<B>['Message'], P<B>['R'] | R2, P<B>['S'], P<B>['ViewInputs'], P<B>['Resources'], P<B>['Helpers'], Field, TagOf<LinkMessage>>;
450
+ type CollectionBy<B extends AnyBundle, Model, LinkMessage, OutStepMessage, R2, Field extends string> = PlacedCollection<P<B>['Name'], Model, LinkMessage | OutStepMessage, P<B>['Model'], P<B>['Message'], P<B>['R'] | R2, P<B>['S'], P<B>['ViewInputs'], P<B>['Helpers'], Field, string, TagOf<LinkMessage>>;
337
451
  //#endregion
338
452
  //#region src/index.d.ts
339
453
  type AnyPlacement = AnyPlaced | AnyPlacedCollection;
@@ -344,7 +458,7 @@ type AssemblyItems = {
344
458
  export declare const BundleSurface: {
345
459
  readonly link: <Root, Value, const Tag extends string, ChildMessage>(ref: FieldRef<Root, Value>, wrapper: Wrapper<Tag, ChildMessage>, options?: {
346
460
  readonly when?: (parent: Root) => boolean;
347
- }) => Link<Root, import("foldkit-bundle").Wrapped<Tag, ChildMessage>, Value, ChildMessage>;
461
+ }) => Link<Root, import("foldkit-bundle").Wrapped<Tag, ChildMessage>, Value, ChildMessage, string>;
348
462
  readonly contract: <Root, F extends Schema.Struct.Fields, Cases extends Record<string, Schema.Struct.Fields>>(app: AppScope<Root, F, Cases>, placement: AnyPlacement) => Contract;
349
463
  readonly module: <Root, F extends Schema.Struct.Fields, Cases extends Record<string, Schema.Struct.Fields>>(app: AppScope<Root, F, Cases>, assembly: AssemblyItems, items?: readonly ModuleItem<Root>[]) => Module<Root, F, Cases>;
350
464
  readonly parent: <Root, F extends Schema.Struct.Fields, Cases extends Record<string, Schema.Struct.Fields>>(app: AppScope<Root, F, Cases>) => {
@@ -353,25 +467,25 @@ export declare const BundleSurface: {
353
467
  Model: Schema.Codec<Root, unknown, never, never>;
354
468
  Message: Schema.Codec<Schema.Schema.Type<import("foldkit/message").MessageUnion<Cases>> & AnyMessage, unknown, never, never>;
355
469
  withServices: <S>() => Bundle.Parent<Root, Schema.Schema.Type<import("foldkit/message").MessageUnion<Cases>> & AnyMessage, S>;
356
- at: <B extends Bundle.AnyBundle, const Field extends { [K in keyof Root]: [Root[K]] extends [Bundle.BundleParts<B>["Model"]] ? [Bundle.BundleParts<B>["Model"]] extends [Root[K]] ? K : never : never; }[keyof Root] & string, OutStepMessage = never, R2 = never>(declared: Bundle.Declared<B, Field>, ...config: Bundle.PlaceConfigParam<Bundle.BundleParts<B>["Args"], Root, import("foldkit-bundle").Wrapped<`Got${Capitalize<Field>}Message`, Bundle.BundleParts<B>["Message"]>, Bundle.BundleParts<B>["Message"], Bundle.BundleParts<B>["OutMessage"], OutStepMessage, R2> & ([import("foldkit-bundle").Wrapped<`Got${Capitalize<Field>}Message`, Bundle.BundleParts<B>["Message"]>] extends [Schema.Schema.Type<import("foldkit/message").MessageUnion<Cases>> & AnyMessage] ? unknown : import("foldkit-bundle").Invalid<"The parent Message does not include this placement's wrapper variant; spread its cases into defineMessageUnion">)) => PlacedBy<B, Root, import("foldkit-bundle").Wrapped<`Got${Capitalize<Field>}Message`, Bundle.BundleParts<B>["Message"]>, OutStepMessage, R2, Field>;
357
- place: <B extends Bundle.AnyBundle, const Field_1 extends { [K in keyof Root]: [Root[K]] extends [Bundle.BundleParts<B>["Model"]] ? [Bundle.BundleParts<B>["Model"]] extends [Root[K]] ? K : never : never; }[keyof Root] & string, OutStepMessage_1 = never, R2_1 = never>(bundle: B, field: Field_1, ...config: Bundle.PlaceConfigParam<Bundle.BundleParts<B>["Args"], Root, import("foldkit-bundle").Wrapped<`Got${Capitalize<Field_1>}Message`, Bundle.BundleParts<B>["Message"]>, Bundle.BundleParts<B>["Message"], Bundle.BundleParts<B>["OutMessage"], OutStepMessage_1, R2_1> & ([import("foldkit-bundle").Wrapped<`Got${Capitalize<Field_1>}Message`, Bundle.BundleParts<B>["Message"]>] extends [Schema.Schema.Type<import("foldkit/message").MessageUnion<Cases>> & AnyMessage] ? unknown : import("foldkit-bundle").Invalid<"The parent Message does not include this placement's wrapper variant; spread its cases into defineMessageUnion">)) => PlacedBy<B, Root, import("foldkit-bundle").Wrapped<`Got${Capitalize<Field_1>}Message`, Bundle.BundleParts<B>["Message"]>, OutStepMessage_1, R2_1, Field_1>;
358
- each: <B extends Bundle.AnyBundle, const Field_2 extends { [K in keyof Root]: Root[K] extends Readonly<Record<string, infer V>> ? [V] extends [Bundle.BundleParts<B>["Model"]] ? [Bundle.BundleParts<B>["Model"]] extends [V] ? K : never : never : never; }[keyof Root] & string, OutStepMessage_2 = never, R2_2 = never>(declared: Bundle.DeclaredEach<B, Field_2>, ...config: Bundle.EachConfigParam<Bundle.BundleParts<B>["Args"], Root, import("foldkit-bundle").KeyedWrapped<`Got${Capitalize<Field_2>}Message`, Bundle.BundleParts<B>["Message"]>, Bundle.BundleParts<B>["Message"], Bundle.BundleParts<B>["OutMessage"], OutStepMessage_2, R2_2, string> & ([import("foldkit-bundle").KeyedWrapped<`Got${Capitalize<Field_2>}Message`, Bundle.BundleParts<B>["Message"]>] extends [Schema.Schema.Type<import("foldkit/message").MessageUnion<Cases>> & AnyMessage] ? unknown : import("foldkit-bundle").Invalid<"The parent Message does not include this placement's wrapper variant; spread its cases into defineMessageUnion">)) => CollectionBy<B, Root, import("foldkit-bundle").KeyedWrapped<`Got${Capitalize<Field_2>}Message`, Bundle.BundleParts<B>["Message"]>, OutStepMessage_2, R2_2, Field_2>;
359
- placeEach: <B extends Bundle.AnyBundle, const Field_3 extends { [K in keyof Root]: Root[K] extends Readonly<Record<string, infer V>> ? [V] extends [Bundle.BundleParts<B>["Model"]] ? [Bundle.BundleParts<B>["Model"]] extends [V] ? K : never : never : never; }[keyof Root] & string, OutStepMessage_3 = never, R2_3 = never>(bundle: B & WithoutResources<B>, field: Field_3, ...config: Bundle.EachConfigParam<Bundle.BundleParts<B>["Args"], Root, import("foldkit-bundle").KeyedWrapped<`Got${Capitalize<Field_3>}Message`, Bundle.BundleParts<B>["Message"]>, Bundle.BundleParts<B>["Message"], Bundle.BundleParts<B>["OutMessage"], OutStepMessage_3, R2_3, string> & ([import("foldkit-bundle").KeyedWrapped<`Got${Capitalize<Field_3>}Message`, Bundle.BundleParts<B>["Message"]>] extends [Schema.Schema.Type<import("foldkit/message").MessageUnion<Cases>> & AnyMessage] ? unknown : import("foldkit-bundle").Invalid<"The parent Message does not include this placement's wrapper variant; spread its cases into defineMessageUnion">)) => CollectionBy<B, Root, import("foldkit-bundle").KeyedWrapped<`Got${Capitalize<Field_3>}Message`, Bundle.BundleParts<B>["Message"]>, OutStepMessage_3, R2_3, Field_3>;
360
- assemble: <const Ps extends readonly (import("foldkit-bundle").Placed<string, Root, Schema.Schema.Type<import("foldkit/message").MessageUnion<Cases>> & AnyMessage, any, any, any, any, any, any, any, string> | import("foldkit-bundle").PlacedCollection<string, Root, Schema.Schema.Type<import("foldkit/message").MessageUnion<Cases>> & AnyMessage, any, any, any, any, any, any, any, any> | import("foldkit-bundle").Wiring<Root, Schema.Schema.Type<import("foldkit/message").MessageUnion<Cases>> & AnyMessage, any>)[]>(...items: Ps) => Bundle.Assembly<Root, Schema.Schema.Type<import("foldkit/message").MessageUnion<Cases>> & AnyMessage, Ps, never>;
470
+ at: <B extends Bundle.AnyBundle, const Field extends { [K in keyof Root]: [Root[K]] extends [Bundle.BundleParts<B>["Model"]] ? [Bundle.BundleParts<B>["Model"]] extends [Root[K]] ? K : never : never; }[keyof Root] & string, OutStepMessage = never, R2 = never>(declared: Bundle.Declared<B, Field>, ...config: Bundle.PlaceConfigParam<Bundle.BundleParts<B>["Args"], Root, import("foldkit-bundle").Wrapped<`Got${Capitalize<Field>}Message`, Bundle.BundleParts<B>["Message"]>, Bundle.BundleParts<B>["Message"], Bundle.BundleParts<B>["OutMessage"], OutStepMessage, R2, Omit<Root, Field>> & ([import("foldkit-bundle").Wrapped<`Got${Capitalize<Field>}Message`, Bundle.BundleParts<B>["Message"]>] extends [Schema.Schema.Type<import("foldkit/message").MessageUnion<Cases>> & AnyMessage] ? unknown : import("foldkit-bundle").Invalid<"The parent Message does not include this placement's wrapper variant; spread its cases into defineMessageUnion">)) => PlacedBy<B, Root, import("foldkit-bundle").Wrapped<`Got${Capitalize<Field>}Message`, Bundle.BundleParts<B>["Message"]>, OutStepMessage, R2, Field>;
471
+ place: <B extends Bundle.AnyBundle, const Field_1 extends { [K in keyof Root]: [Root[K]] extends [Bundle.BundleParts<B>["Model"]] ? [Bundle.BundleParts<B>["Model"]] extends [Root[K]] ? K : never : never; }[keyof Root] & string, OutStepMessage_1 = never, R2_1 = never>(bundle: B, field: Field_1, ...config: Bundle.PlaceConfigParam<Bundle.BundleParts<B>["Args"], Root, import("foldkit-bundle").Wrapped<`Got${Capitalize<Field_1>}Message`, Bundle.BundleParts<B>["Message"]>, Bundle.BundleParts<B>["Message"], Bundle.BundleParts<B>["OutMessage"], OutStepMessage_1, R2_1, Omit<Root, Field_1>> & ([import("foldkit-bundle").Wrapped<`Got${Capitalize<Field_1>}Message`, Bundle.BundleParts<B>["Message"]>] extends [Schema.Schema.Type<import("foldkit/message").MessageUnion<Cases>> & AnyMessage] ? unknown : import("foldkit-bundle").Invalid<"The parent Message does not include this placement's wrapper variant; spread its cases into defineMessageUnion">)) => PlacedBy<B, Root, import("foldkit-bundle").Wrapped<`Got${Capitalize<Field_1>}Message`, Bundle.BundleParts<B>["Message"]>, OutStepMessage_1, R2_1, Field_1>;
472
+ each: <B extends Bundle.AnyBundle, const Field_2 extends { [K in keyof Root]: Root[K] extends Readonly<Record<string, infer V>> ? [V] extends [Bundle.BundleParts<B>["Model"]] ? [Bundle.BundleParts<B>["Model"]] extends [V] ? K : never : never : never; }[keyof Root] & string, OutStepMessage_2 = never, R2_2 = never>(declared: Bundle.DeclaredEach<B, Field_2>, ...config: Bundle.EachConfigParam<Bundle.BundleParts<B>["Args"], Root, import("foldkit-bundle").KeyedWrapped<`Got${Capitalize<Field_2>}Message`, Bundle.BundleParts<B>["Message"]>, Bundle.BundleParts<B>["Message"], Bundle.BundleParts<B>["OutMessage"], OutStepMessage_2, R2_2, string, Omit<Root, Field_2>> & ([import("foldkit-bundle").KeyedWrapped<`Got${Capitalize<Field_2>}Message`, Bundle.BundleParts<B>["Message"]>] extends [Schema.Schema.Type<import("foldkit/message").MessageUnion<Cases>> & AnyMessage] ? unknown : import("foldkit-bundle").Invalid<"The parent Message does not include this placement's wrapper variant; spread its cases into defineMessageUnion">)) => CollectionBy<B, Root, import("foldkit-bundle").KeyedWrapped<`Got${Capitalize<Field_2>}Message`, Bundle.BundleParts<B>["Message"]>, OutStepMessage_2, R2_2, Field_2>;
473
+ placeEach: <B extends Bundle.AnyBundle, const Field_3 extends { [K in keyof Root]: Root[K] extends Readonly<Record<string, infer V>> ? [V] extends [Bundle.BundleParts<B>["Model"]] ? [Bundle.BundleParts<B>["Model"]] extends [V] ? K : never : never : never; }[keyof Root] & string, OutStepMessage_3 = never, R2_3 = never>(bundle: B & WithoutResources<B>, field: Field_3, ...config: Bundle.EachConfigParam<Bundle.BundleParts<B>["Args"], Root, import("foldkit-bundle").KeyedWrapped<`Got${Capitalize<Field_3>}Message`, Bundle.BundleParts<B>["Message"]>, Bundle.BundleParts<B>["Message"], Bundle.BundleParts<B>["OutMessage"], OutStepMessage_3, R2_3, string, Omit<Root, Field_3>> & ([import("foldkit-bundle").KeyedWrapped<`Got${Capitalize<Field_3>}Message`, Bundle.BundleParts<B>["Message"]>] extends [Schema.Schema.Type<import("foldkit/message").MessageUnion<Cases>> & AnyMessage] ? unknown : import("foldkit-bundle").Invalid<"The parent Message does not include this placement's wrapper variant; spread its cases into defineMessageUnion">)) => CollectionBy<B, Root, import("foldkit-bundle").KeyedWrapped<`Got${Capitalize<Field_3>}Message`, Bundle.BundleParts<B>["Message"]>, OutStepMessage_3, R2_3, Field_3>;
474
+ assemble: <const Ps extends readonly (import("foldkit-bundle").Placed<string, Root, Schema.Schema.Type<import("foldkit/message").MessageUnion<Cases>> & AnyMessage, any, any, any, any, any, any, any, string, string> | import("foldkit-bundle").PlacedCollection<string, Root, Schema.Schema.Type<import("foldkit/message").MessageUnion<Cases>> & AnyMessage, any, any, any, any, any, any, any, any, string> | import("foldkit-bundle").Wiring<Root, Schema.Schema.Type<import("foldkit/message").MessageUnion<Cases>> & AnyMessage, any>)[]>(...items: Ps) => Bundle.Assembly<Root, Schema.Schema.Type<import("foldkit/message").MessageUnion<Cases>> & AnyMessage, Ps, never>;
361
475
  link: {
362
476
  readonly field: <const Key extends keyof Root & string, const Tag extends string, ChildMessage>(key: Key, wrapper: Wrapper<Tag, ChildMessage>, options?: {
363
477
  readonly when?: (parent: Root) => boolean;
364
- } | undefined) => Link<Root, import("foldkit-bundle").Wrapped<Tag, ChildMessage>, Root[Key], ChildMessage>;
478
+ } | undefined) => Link<Root, import("foldkit-bundle").Wrapped<Tag, ChildMessage>, Root[Key], ChildMessage, Key>;
365
479
  readonly optional: <const Key extends { [K in keyof Root]: Root[K] extends Option.Option<unknown> ? K : never; }[keyof Root] & string, const Tag_1 extends string, ChildMessage_1>(key: Key, wrap: Wrapper<Tag_1, ChildMessage_1>, options?: {
366
480
  readonly when?: (parent: Root) => boolean;
367
- } | undefined) => Link<Root, import("foldkit-bundle").Wrapped<Tag_1, ChildMessage_1>, Root[Key] extends (infer T) ? T extends Root[Key] ? T extends Option.Option<infer Value> ? Value : never : never : never, ChildMessage_1>;
481
+ } | undefined) => Link<Root, import("foldkit-bundle").Wrapped<Tag_1, ChildMessage_1>, Root[Key] extends (infer T) ? T extends Root[Key] ? T extends Option.Option<infer Value> ? Value : never : never : never, ChildMessage_1, Key>;
368
482
  readonly collection: <const Field_4 extends { [K in keyof Root]: Root[K] extends Readonly<Record<string, unknown>> ? K : never; }[keyof Root] & string, const Tag_2 extends string, ChildMessage_2, Key extends string>(field: Field_4, wrap: import("foldkit-bundle").KeyedWrapper<Tag_2, ChildMessage_2, Key>, options?: {
369
483
  readonly when?: (parent: Root, key: Key) => boolean;
370
- } | undefined) => import("foldkit-bundle").CollectionLink<Root, import("foldkit-bundle").KeyedWrapped<Tag_2, ChildMessage_2, Key>, Root[Field_4] extends (infer T) ? T extends Root[Field_4] ? T extends Readonly<Record<string, infer Value>> ? Value : never : never : never, ChildMessage_2, Key>;
484
+ } | undefined) => import("foldkit-bundle").CollectionLink<Root, import("foldkit-bundle").KeyedWrapped<Tag_2, ChildMessage_2, Key>, Root[Field_4] extends (infer T) ? T extends Root[Field_4] ? T extends Readonly<Record<string, infer Value>> ? Value : never : never : never, ChildMessage_2, Key, Field_4>;
371
485
  readonly collectionById: <const Field_4 extends { [K in keyof Root]: Root[K] extends readonly unknown[] ? K : never; }[keyof Root] & string, const Tag_3 extends string, ChildMessage_3, Key_1 extends string>(field: Field_4, wrap: import("foldkit-bundle").KeyedWrapper<Tag_3, ChildMessage_3, Key_1>, options: {
372
486
  readonly id: (item: Root[Field_4] extends (infer T) ? T extends Root[Field_4] ? T extends readonly (infer Item)[] ? Item : never : never : never) => Key_1;
373
487
  readonly when?: (parent: Root, key: Key_1) => boolean;
374
- }) => import("foldkit-bundle").CollectionLink<Root, import("foldkit-bundle").KeyedWrapped<Tag_3, ChildMessage_3, Key_1>, Root[Field_4] extends (infer T) ? T extends Root[Field_4] ? T extends readonly (infer Item)[] ? Item : never : never : never, ChildMessage_3, Key_1>;
488
+ }) => import("foldkit-bundle").CollectionLink<Root, import("foldkit-bundle").KeyedWrapped<Tag_3, ChildMessage_3, Key_1>, Root[Field_4] extends (infer T) ? T extends Root[Field_4] ? T extends readonly (infer Item)[] ? Item : never : never : never, ChildMessage_3, Key_1, Field_4>;
375
489
  };
376
490
  };
377
491
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../../bundle/src/link.d.ts","../../bundle/src/placed.d.ts","../../bundle/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O,OAAO,QACxB,cAAc,eAAe,OAAO,OAAO,SAAO,KAE7C,SAAS,MAAM,GAAG;;IAYF,SAAA,UAAA,eAAa,iBAAkB,WAAW,YAAO,OAAA,MAAA,GAAA"}
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../../bundle/src/placed.d.ts","../../bundle/src/link.d.ts","../../bundle/src/collection.d.ts","../../bundle/src/declare.d.ts","../../bundle/src/bundle.d.ts","../../bundle/src/parent.d.ts","../src/index.ts"],"mappings":";;;;;;;;;;;;cAYc;;;;;;;;;;;;;;;;;KAwBF,WAAW,MAAM,QAAQ,SAAS,MAAM,SAAS;UA2B5C,YAAY,MAAM,QAAQ,aAAa,SAAS,YAAY,gBAAgB,IAAI,aAAa;;;;;;;;;WASjG,OAAO,WAAW,YAAY;;WAE9B,SAAS,YAAY,YAAY,SAAS,OAAO,YAAY,SAAS,iBAAiB,OAAO,KAAK,QAAQ,SAAS,gBAAgB;;;;;;WAMpI,aAAa,SAAS,YAAY,OAAO,KAAK,QAAQ,SAAS,gBAAgB;;WAE/E;;WAEA,QAAQ,QAAQ;;;KAGjB,gBAAgB,QAAQ,eAAe,aAAa,SAAS,2BAC3D,WAAW,YAAY,UAAU,WAAW,gBAAgB,sBAAsB,oBAAoB,aAAa,eAAe,uBAAuB,MAAM,8BAA8B,gBAAgB,MAAM,QAAQ,eAAe,cAAc,OAAO,aAAa,MAAM,WAAW,gBAAgB,gCACnT;KACI,cAAc,QAAQ,eAAe,GAAG,uBACtC,WAAW,UAAU,QAAQ,aAAY,eAAe,aAAa,qBAAoB,OAAO,UAAU,OAAO,KAAK,QAAQ,eAAe;UAE1I,OAAO,qBAAqB,QAAQ,eAAe,OAAO,SAAS,GAAG,GAAG,YAAY,WAAW,SAAS,+BAA+B;YAC3I,sBAAsB;;WAEvB,QAAQ;;WAER,SAAS;WACT,MAAM;;WAEN;;WAEA;;WAEA;;;;;;;;WAQA,cAAc;;;;;;WAMd;WACA,MAAM,OAAK,QAAQ,eAAe,OA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E,eAAe,eAAe,MAAM;;;KCKlS,eAAe,YAAY;;KAG3B;WAA2B,YAAY,cAAc,eAAe;;qBA+F5D;WAjFC,OAAA,MAAM,aAAa,oBAAoB,cAAY,KAC1D,SAAS,MAAM,QAAM,SACjB,QAAQ,KAAK,eAAa;aACf,QAAQ,QAAQ;QAAkB,KAAA,+BAAA,QAAA,KAAA,eAAA,OAAA;WAkBtD,WAAA,MACA,UAAU,OAAO,OAAO,QACxB,cAAc,eAAe,OAAO,OAAO,SAAO,KAE7C,SAAS,MAAM,GAAG,QAAM,WAClB,iBACV;WAaD,SAAA,MACA,UAAU,OAAO,OAAO,QACxB,cAAc,eAAe,OAAO,OAAO,SAAO,KAE7C,SAAS,MAAM,GAAG,QAAM,UACnB,eAAa,iBACP,WAAW,YAAO,OAAA,MAAA,GAAA;WAclC,SAAA,MACA,UAAU,OAAO,OAAO,QACxB,cAAc,eAAe,OAAO,OAAO,SAAO,KAE7C,SAAS,MAAM,GAAG;;IAYF,SAAA,UAAA,eAAa,iBAAkB,WAAW,YAAO,OAAA,MAAA,GAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "foldkit-bundle-surface",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "foldkit-bundle placements as foldkit-surface Module contracts: each placement owns its Model path, validated with every other owner.",
5
5
  "keywords": [
6
6
  "foldkit",
@@ -26,6 +26,7 @@
26
26
  "sideEffects": false,
27
27
  "exports": {
28
28
  ".": {
29
+ "foldkit-plus:source": "./src/index.ts",
29
30
  "types": "./dist/index.d.mts",
30
31
  "import": "./dist/index.mjs"
31
32
  }
@@ -36,11 +37,11 @@
36
37
  "LICENSE"
37
38
  ],
38
39
  "dependencies": {
39
- "foldkit-bundle": "0.3.0",
40
- "foldkit-surface": "0.5.0"
40
+ "foldkit-bundle": "0.4.0",
41
+ "foldkit-surface": "0.5.1"
41
42
  },
42
43
  "peerDependencies": {
43
- "effect": "^4.0.0-rc.116",
44
+ "effect": ">=4.0.0-rc.116 <4.0.0-rc.118",
44
45
  "foldkit": "^0.163.0"
45
46
  },
46
47
  "devDependencies": {
@@ -50,7 +51,7 @@
50
51
  "jsdom": "26.1.0",
51
52
  "tsdown": "^0.23.0",
52
53
  "typescript": "5.9.3",
53
- "foldkit-mirror": "0.3.0"
54
+ "foldkit-mirror": "0.4.0"
54
55
  },
55
56
  "scripts": {
56
57
  "build": "tsdown",