foldkit 0.157.0 → 0.158.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/dist/devTools/host.d.ts +2 -2
  2. package/dist/devTools/host.d.ts.map +1 -1
  3. package/dist/devTools/host.js +1 -1
  4. package/dist/experimental/machine/machine.d.ts +278 -84
  5. package/dist/experimental/machine/machine.d.ts.map +1 -1
  6. package/dist/experimental/machine/machine.js +362 -212
  7. package/dist/runtime/browserListeners.d.ts +7 -1
  8. package/dist/runtime/browserListeners.d.ts.map +1 -1
  9. package/dist/runtime/browserScheduler.d.ts +3 -0
  10. package/dist/runtime/browserScheduler.d.ts.map +1 -0
  11. package/dist/runtime/browserScheduler.js +22 -0
  12. package/dist/runtime/crashUI.d.ts +36 -5
  13. package/dist/runtime/crashUI.d.ts.map +1 -1
  14. package/dist/runtime/crashUI.js +55 -2
  15. package/dist/runtime/devToolsConfig.d.ts +85 -0
  16. package/dist/runtime/devToolsConfig.d.ts.map +1 -0
  17. package/dist/runtime/devToolsConfig.js +49 -0
  18. package/dist/runtime/devToolsIntegration.d.ts +56 -0
  19. package/dist/runtime/devToolsIntegration.d.ts.map +1 -0
  20. package/dist/runtime/devToolsIntegration.js +186 -0
  21. package/dist/runtime/dispatch.d.ts +10 -0
  22. package/dist/runtime/dispatch.d.ts.map +1 -0
  23. package/dist/runtime/dispatch.js +4 -0
  24. package/dist/runtime/documentMetadata.d.ts +3 -0
  25. package/dist/runtime/documentMetadata.d.ts.map +1 -0
  26. package/dist/runtime/documentMetadata.js +148 -0
  27. package/dist/runtime/duplicateIdScanner.d.ts +16 -0
  28. package/dist/runtime/duplicateIdScanner.d.ts.map +1 -0
  29. package/dist/runtime/duplicateIdScanner.js +70 -0
  30. package/dist/runtime/hmrModelBridge.d.ts +4 -0
  31. package/dist/runtime/hmrModelBridge.d.ts.map +1 -0
  32. package/dist/runtime/hmrModelBridge.js +43 -0
  33. package/dist/runtime/hostConnector.d.ts +61 -0
  34. package/dist/runtime/hostConnector.d.ts.map +1 -0
  35. package/dist/runtime/hostConnector.js +141 -0
  36. package/dist/runtime/hydrationHandoff.d.ts +44 -0
  37. package/dist/runtime/hydrationHandoff.d.ts.map +1 -0
  38. package/dist/runtime/hydrationHandoff.js +395 -0
  39. package/dist/runtime/index.d.ts +16 -1
  40. package/dist/runtime/index.d.ts.map +1 -1
  41. package/dist/runtime/index.js +5 -1
  42. package/dist/runtime/makeApplication.d.ts +71 -0
  43. package/dist/runtime/makeApplication.d.ts.map +1 -0
  44. package/dist/runtime/makeApplication.js +98 -0
  45. package/dist/runtime/makeElement.d.ts +69 -0
  46. package/dist/runtime/makeElement.d.ts.map +1 -0
  47. package/dist/runtime/makeElement.js +81 -0
  48. package/dist/runtime/managedResourceFibers.d.ts +18 -0
  49. package/dist/runtime/managedResourceFibers.d.ts.map +1 -0
  50. package/dist/runtime/managedResourceFibers.js +47 -0
  51. package/dist/runtime/messageQueue.d.ts +27 -0
  52. package/dist/runtime/messageQueue.d.ts.map +1 -0
  53. package/dist/runtime/messageQueue.js +133 -0
  54. package/dist/runtime/public.d.ts +2 -3
  55. package/dist/runtime/public.d.ts.map +1 -1
  56. package/dist/runtime/public.js +1 -1
  57. package/dist/runtime/renderer.d.ts +69 -0
  58. package/dist/runtime/renderer.d.ts.map +1 -0
  59. package/dist/runtime/renderer.js +512 -0
  60. package/dist/runtime/resourceProvider.d.ts +33 -0
  61. package/dist/runtime/resourceProvider.d.ts.map +1 -0
  62. package/dist/runtime/resourceProvider.js +98 -0
  63. package/dist/runtime/runtime.d.ts +133 -412
  64. package/dist/runtime/runtime.d.ts.map +1 -1
  65. package/dist/runtime/runtime.js +118 -2184
  66. package/dist/runtime/runtimeStatus.d.ts +15 -0
  67. package/dist/runtime/runtimeStatus.d.ts.map +1 -0
  68. package/dist/runtime/runtimeStatus.js +6 -0
  69. package/dist/runtime/slowPhase.d.ts +82 -0
  70. package/dist/runtime/slowPhase.d.ts.map +1 -0
  71. package/dist/runtime/slowPhase.js +83 -0
  72. package/dist/runtime/start.d.ts +96 -0
  73. package/dist/runtime/start.d.ts.map +1 -0
  74. package/dist/runtime/start.js +99 -0
  75. package/dist/runtime/subscriptionFibers.d.ts +21 -0
  76. package/dist/runtime/subscriptionFibers.d.ts.map +1 -0
  77. package/dist/runtime/subscriptionFibers.js +47 -0
  78. package/dist/runtime/visibility.d.ts +8 -0
  79. package/dist/runtime/visibility.d.ts.map +1 -0
  80. package/dist/runtime/visibility.js +6 -0
  81. package/dist/test/scene.js +1 -1
  82. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  export { DEVTOOLS_HOST_ID } from '../html/index.js';
2
- export { __setDevToolsOverlay } from '../runtime/runtime.js';
3
- export type { DevToolsOverlay } from '../runtime/runtime.js';
2
+ export { __setDevToolsOverlay } from '../runtime/devToolsConfig.js';
3
+ export type { DevToolsOverlay } from '../runtime/devToolsConfig.js';
4
4
  export { INIT_INDEX, latestEntryIndex } from './store.js';
5
5
  export type { CommandRecord, DevToolsStore, MountRecord, StoreState, } from './store.js';
6
6
  export { toInspectableValue } from './serialize.js';
@@ -1 +1 @@
1
- {"version":3,"file":"host.d.ts","sourceRoot":"","sources":["../../src/devTools/host.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AACnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAA;AAC5D,YAAY,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAE5D,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAEzD,YAAY,EACV,aAAa,EACb,aAAa,EACb,WAAW,EACX,UAAU,GACX,MAAM,YAAY,CAAA;AAEnB,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AAEnD,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,QAAQ,GACT,MAAM,mBAAmB,CAAA"}
1
+ {"version":3,"file":"host.d.ts","sourceRoot":"","sources":["../../src/devTools/host.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AACnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAA;AACnE,YAAY,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAA;AAEnE,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAEzD,YAAY,EACV,aAAa,EACb,aAAa,EACb,WAAW,EACX,UAAU,GACX,MAAM,YAAY,CAAA;AAEnB,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AAEnD,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,QAAQ,GACT,MAAM,mBAAmB,CAAA"}
@@ -1,5 +1,5 @@
1
1
  export { DEVTOOLS_HOST_ID } from '../html/index.js';
2
- export { __setDevToolsOverlay } from '../runtime/runtime.js';
2
+ export { __setDevToolsOverlay } from '../runtime/devToolsConfig.js';
3
3
  export { INIT_INDEX, latestEntryIndex } from './store.js';
4
4
  export { toInspectableValue } from './serialize.js';
5
5
  export { GOT_MESSAGE_PATTERN, extractSubmodelInfo, isTagged, } from './submodelPath.js';
@@ -1,4 +1,4 @@
1
- import { Option, Schema } from 'effect';
1
+ import { Array, Option, Schema } from 'effect';
2
2
  import type { Command } from '../../command/index.js';
3
3
  import type * as Update from '../../update/index.js';
4
4
  /** Any value discriminated by a `_tag` field. Both states and Messages satisfy this shape. */
@@ -11,50 +11,67 @@ export type TagOf<Union extends Tagged> = Union['_tag'];
11
11
  export type Variant<Union extends Tagged, Tag extends TagOf<Union>> = Extract<Union, Readonly<{
12
12
  _tag: Tag;
13
13
  }>>;
14
+ declare const NoMachineContextTypeId: unique symbol;
15
+ type NoMachineContext = typeof NoMachineContextTypeId;
16
+ type IsAny<Value> = 0 extends 1 & Value ? true : false;
17
+ type IsNever<Value> = [Value] extends [never] ? true : false;
18
+ type HasMachineContext<Context> = IsAny<Context> extends true ? true : [Context] extends [never] ? true : [Context] extends [NoMachineContext] ? false : true;
19
+ type ContextArguments<Context> = HasMachineContext<Context> extends true ? [context: Context] : [];
20
+ type MachineContextArgument<Context> = IsAny<Context> extends true ? Context : IsNever<Context> extends true ? Context : undefined extends Context ? Exclude<Context, void | undefined> | undefined : Context;
21
+ type MachineContextArguments<Context> = HasMachineContext<Context> extends true ? [context: MachineContextArgument<Context>] : [];
14
22
  /**
15
- * The single argument an Edge's `build` and `commands` callbacks receive:
16
- * the source state, the triggering Message, and the guard value produced by
17
- * the Edge's {@link when} guard (`void` on unguarded and boolean-guarded
18
- * Edges). Destructure the fields you need.
23
+ * The single argument an Edge handler receives: the source state, the
24
+ * triggering Message, the guard value produced by the Edge's {@link when}
25
+ * guard (`void` on unguarded and boolean-guarded Edges), and the read-only
26
+ * context declared for the Machine when one exists. Destructure the fields you
27
+ * need.
19
28
  */
20
- export type EdgeInput<SourceState extends Tagged, TriggerMessage extends Tagged, GuardValue = void> = Readonly<{
29
+ export type EdgeInput<SourceState extends Tagged, TriggerMessage extends Tagged, GuardValue = void, Context = NoMachineContext> = HasMachineContext<Context> extends true ? Readonly<{
30
+ state: SourceState;
31
+ message: TriggerMessage;
32
+ guardValue: GuardValue;
33
+ context: Context;
34
+ }> : Readonly<{
21
35
  state: SourceState;
22
36
  message: TriggerMessage;
23
37
  guardValue: GuardValue;
24
38
  }>;
25
39
  /**
26
40
  * A single transition edge. The target state tag is a literal value, so the
27
- * edge set of a Machine is enumerable data. `build` constructs the target
28
- * variant from its {@link EdgeInput}. `maybeCommands` holds transition-time
29
- * effects, dispatched as ordinary Commands.
41
+ * edge set of a Machine is enumerable data. `handler` returns the target
42
+ * variant and any transition-time Commands as an `Update.Return` record.
30
43
  *
31
- * The correlation between `target` and `build`'s return variant is enforced
44
+ * The correlation between `target` and `handler`'s Model variant is enforced
32
45
  * by {@link to}'s signature, not by this type. Keeping this type free of the
33
46
  * target tag is what lets TypeScript infer the source state and trigger
34
- * Message from the transition table position.
47
+ * Message from the transition-map position.
35
48
  *
36
49
  * Construct with {@link to}.
37
50
  */
38
- export type Edge<State extends Tagged, Message extends Tagged, SourceState extends State, TriggerMessage extends Message, GuardValue = void, R = never> = Readonly<{
51
+ export type Edge<State extends Tagged, Message extends Tagged, SourceState extends State, TriggerMessage extends Message, GuardValue = void, R = never, Context = NoMachineContext> = Readonly<{
39
52
  _tag: 'Edge';
40
53
  target: TagOf<State>;
41
- build: (input: EdgeInput<SourceState, TriggerMessage, unknown>) => State;
42
- maybeCommands: Option.Option<(input: EdgeInput<SourceState, TriggerMessage, unknown>) => ReadonlyArray<Command<Message, never, R>>>;
54
+ handler: (input: EdgeInput<SourceState, TriggerMessage, unknown, Context>) => Update.Return<State, Message, R>;
43
55
  readonly '~foldkit/EdgeGuardValue'?: GuardValue;
44
56
  }>;
45
57
  /** A guarded Edge that fires only when its guard passes. Construct with {@link when}. */
46
- export type When<State extends Tagged, Message extends Tagged, SourceState extends State, TriggerMessage extends Message, GuardValue = unknown, R = never> = Readonly<{
58
+ export type When<State extends Tagged, Message extends Tagged, SourceState extends State, TriggerMessage extends Message, GuardValue = unknown, R = never, Context = NoMachineContext> = Readonly<{
47
59
  _tag: 'When';
48
- guard: (state: SourceState, message: TriggerMessage) => Option.Option<unknown>;
49
- edge: Edge<State, Message, SourceState, TriggerMessage, GuardValue, R>;
60
+ guard: (state: SourceState, message: TriggerMessage, ...context: ContextArguments<Context>) => Option.Option<unknown>;
61
+ edge: Edge<State, Message, SourceState, TriggerMessage, GuardValue, R, Context>;
50
62
  }>;
51
63
  /** The unconditional fallback Edge at the end of a guard list. Construct with {@link otherwise}. */
52
- export type Otherwise<State extends Tagged, Message extends Tagged, SourceState extends State, TriggerMessage extends Message, R = never> = Readonly<{
64
+ export type Otherwise<State extends Tagged, Message extends Tagged, SourceState extends State, TriggerMessage extends Message, R = never, Context = NoMachineContext> = Readonly<{
53
65
  _tag: 'Otherwise';
54
- edge: Edge<State, Message, SourceState, TriggerMessage, void, R>;
66
+ edge: Edge<State, Message, SourceState, TriggerMessage, void, R, Context>;
55
67
  }>;
56
- /** One entry in an ordered guard list: a {@link When} or the {@link Otherwise} fallback. */
57
- export type GuardedEdge<State extends Tagged, Message extends Tagged, SourceState extends State, TriggerMessage extends Message, R = never> = When<State, Message, SourceState, TriggerMessage, unknown, R> | Otherwise<State, Message, SourceState, TriggerMessage, R>;
68
+ /** An explicit no-transition fallback at the end of a guard list. Construct with {@link ignore}. */
69
+ export type Ignore = Readonly<{
70
+ _tag: 'Ignore';
71
+ }>;
72
+ /** One entry in an ordered guard list: a {@link When}, the {@link Otherwise}
73
+ * transition fallback, or the {@link Ignore} no-transition fallback. */
74
+ export type GuardedEdge<State extends Tagged, Message extends Tagged, SourceState extends State, TriggerMessage extends Message, R = never, Context = NoMachineContext> = When<State, Message, SourceState, TriggerMessage, unknown, R, Context> | Otherwise<State, Message, SourceState, TriggerMessage, R, Context> | Ignore;
58
75
  type OptionValue<MaybeValue> = MaybeValue extends Option.Option<infer Value> ? Value : never;
59
76
  type GuardValueOf<GuardResult> = [GuardResult] extends [boolean] ? void : OptionValue<GuardResult>;
60
77
  /**
@@ -66,51 +83,119 @@ type GuardValueOf<GuardResult> = [GuardResult] extends [boolean] ? void : Option
66
83
  *
67
84
  * @experimental Ships from `foldkit/experimental/machine`; expect breaking changes while the API settles.
68
85
  */
69
- export type TransitionTable<State extends Tagged, Message extends Tagged, R = never> = Readonly<{
86
+ export type TransitionTable<State extends Tagged, Message extends Tagged, R = never, Context = NoMachineContext> = Readonly<{
70
87
  [SourceTag in TagOf<State>]?: Readonly<{
71
88
  on: Readonly<{
72
- [MessageTag in TagOf<Message>]?: Edge<State, Message, Variant<State, SourceTag>, Variant<Message, MessageTag>, void, R> | ReadonlyArray<GuardedEdge<State, Message, Variant<State, SourceTag>, Variant<Message, MessageTag>, R>>;
89
+ [MessageTag in TagOf<Message>]?: Edge<State, Message, Variant<State, SourceTag>, Variant<Message, MessageTag>, void, R, Context> | ReadonlyArray<GuardedEdge<State, Message, Variant<State, SourceTag>, Variant<Message, MessageTag>, R, Context>>;
73
90
  }>;
74
91
  }>;
75
92
  }>;
93
+ declare const ForStatesTypeId: unique symbol;
94
+ declare const ForStatesVarianceTypeId: unique symbol;
95
+ type ForStatesFragment<State extends Tagged, Message extends Tagged, R, Context, SourceTags extends ReadonlyArray<string> = ReadonlyArray<TagOf<State>>> = Readonly<{
96
+ _tag: 'ForStates';
97
+ [ForStatesTypeId]: typeof ForStatesTypeId;
98
+ sourceTags: SourceTags;
99
+ on: unknown;
100
+ readonly [ForStatesVarianceTypeId]?: Readonly<{
101
+ state: State;
102
+ message: Message;
103
+ requirements: R;
104
+ context: Context;
105
+ }>;
106
+ }>;
107
+ type SharedTransitionMap<State extends Tagged, Message extends Tagged, SourceState extends State, R, Context> = Readonly<{
108
+ [MessageTag in TagOf<Message>]?: Edge<State, Message, SourceState, Variant<Message, MessageTag>, void, R, Context> | ReadonlyArray<GuardedEdge<State, Message, SourceState, Variant<Message, MessageTag>, R, Context>>;
109
+ }>;
110
+ type RequirementsOfGuarded<Value> = Value extends When<any, any, any, any, any, infer R, any> ? R : Value extends Otherwise<any, any, any, any, infer R, any> ? R : never;
111
+ type RequirementsOfTransition<Value> = Value extends Edge<any, any, any, any, any, infer R, any> ? R : Value extends ReadonlyArray<infer GuardedEdge> ? RequirementsOfGuarded<GuardedEdge> : never;
112
+ type RequirementsOfTransitionMap<Transitions> = RequirementsOfTransition<NonNullable<Transitions[keyof Transitions]>>;
113
+ type ForStatesBuilder<SourceTags extends Array.NonEmptyReadonlyArray<string>> = Readonly<{
114
+ on: <State extends Tagged, Message extends Tagged, Context, R, const Transitions extends SharedTransitionMap<State, Message, Variant<State, Extract<SourceTags[number], TagOf<State>>>, R, Context>>(transitions: Exclude<SourceTags[number], TagOf<State>> extends never ? Exclude<keyof Transitions, TagOf<Message>> extends never ? Transitions : never : never) => ForStatesFragment<State, Message, RequirementsOfTransitionMap<Transitions>, Context, SourceTags>;
115
+ }>;
116
+ /** Selects source state tags for a shared transition map. The `on` handler's
117
+ * `state` is narrowed to the union of the selected variants, and its `message`
118
+ * is narrowed by the map key.
119
+ *
120
+ * Add the resulting fragment to a Machine definition's `shared` array. Shared
121
+ * transitions are defaults: a state-local transition for the same Message
122
+ * replaces the shared transition. Defining the same state/Message pair in two
123
+ * shared fragments throws when the Machine is defined.
124
+ *
125
+ * @example
126
+ * ```ts
127
+ * shared: [
128
+ * forStates(['Editing', 'Reviewing']).on({
129
+ * ClickedCancel: to('Cancelled', ({ state }) => ({
130
+ * model: CheckoutState.Cancelled({ draftId: state.draftId }),
131
+ * })),
132
+ * }),
133
+ * ]
134
+ * ```
135
+ *
136
+ * @experimental Ships from `foldkit/experimental/machine`; expect breaking changes while the API settles.
137
+ */
138
+ export declare const forStates: <const SourceTags extends Array.NonEmptyReadonlyArray<string>>(sourceTags: SourceTags) => ForStatesBuilder<SourceTags>;
139
+ /** The transition table entry for one source state. Use this alias when
140
+ * extracting an entry from a Machine's `states` record to preserve the source
141
+ * state and triggering Message narrowing inside its Edges.
142
+ *
143
+ * @experimental Ships from `foldkit/experimental/machine`; expect breaking changes while the API settles.
144
+ */
145
+ export type StateTransitions<State extends Tagged, Message extends Tagged, SourceTag extends TagOf<State>, R = never, Context = NoMachineContext> = NonNullable<TransitionTable<State, Message, R, Context>[SourceTag]>;
76
146
  /**
77
147
  * Declares a transition Edge to the state variant named by `target`. The
78
- * `build` callback receives an {@link EdgeInput} whose state and Message are
79
- * narrowed to the variants the Edge sits under in the transition table, and
80
- * must return the target variant. Optional `commands` attach transition-time
81
- * effects.
148
+ * `handler` receives an {@link EdgeInput} whose state and Message are narrowed
149
+ * to the variants the Edge sits under in a state-local or shared transition
150
+ * map, and returns an `Update.Return` record whose `model` is the target
151
+ * variant and whose optional `commands` are transition-time effects. When the
152
+ * Machine declares a context, the input also contains that context for the
153
+ * current transition.
82
154
  *
83
- * The `commands` callback may return Commands whose Effects need services. The
84
- * requirements they carry flow into the Machine's `R` through {@link define}.
155
+ * The handler's `commands` field may contain Commands whose Effects need
156
+ * services. The requirements they carry flow into the Machine's `R` through
157
+ * {@link define}.
85
158
  *
86
- * Only meaningful inside a {@link TransitionTable}: the source and trigger
87
- * types flow in from the table position contextually.
159
+ * Only meaningful inside a Machine definition's state-local or shared
160
+ * transition map: the source and trigger types flow in from that position
161
+ * contextually.
88
162
  *
89
163
  * @experimental Ships from `foldkit/experimental/machine`; expect breaking changes while the API settles.
90
164
  */
91
- export declare const to: <State extends Tagged, Message extends Tagged, SourceState extends State, TriggerMessage extends Message, const TargetTag extends TagOf<State>, R = never>(target: TargetTag, build: (input: NoInfer<EdgeInput<SourceState, TriggerMessage>>) => NoInfer<Variant<State, TargetTag>>, commands?: (input: NoInfer<EdgeInput<SourceState, TriggerMessage>>) => ReadonlyArray<Command<NoInfer<Message>, never, R>>) => Edge<State, Message, SourceState, TriggerMessage, void, R>;
165
+ export declare const to: <State extends Tagged, Message extends Tagged, SourceState extends State, TriggerMessage extends Message, const TargetTag extends TagOf<State>, R = never, Context = NoMachineContext>(target: TargetTag, handler: (input: NoInfer<EdgeInput<SourceState, TriggerMessage, void, Context>>) => Update.Return<NoInfer<Variant<State, TargetTag>>, NoInfer<Message>, R>) => Edge<State, Message, SourceState, TriggerMessage, void, R, Context>;
92
166
  /**
93
167
  * Guards an Edge. Guard lists run in order, and the first guard that passes
94
168
  * fires its Edge. A guard either resolves the state and Message to an
95
169
  * `Option` (returning `Option.some` passes, and the wrapped value flows into
96
- * the Edge's build and commands callbacks as `guardValue`) or returns a
170
+ * the Edge's handler as `guardValue`) or returns a
97
171
  * plain boolean when there is nothing to extract (returning `true` passes,
98
172
  * and `guardValue` is `void`).
99
173
  *
100
- * The state and Message parameters are `NoInfer` so they resolve from the
101
- * guard list's table position alone.
174
+ * When the Machine declares a context, the guard receives it as a third
175
+ * parameter and its Edge handler receives it in {@link EdgeInput}. The state,
176
+ * Message, and context parameters are `NoInfer` so they resolve from the guard
177
+ * list's transition-map position alone.
178
+ *
179
+ * @experimental Ships from `foldkit/experimental/machine`; expect breaking changes while the API settles.
180
+ */
181
+ export declare const when: <State extends Tagged, Message extends Tagged, SourceState extends State, TriggerMessage extends Message, GuardResult extends Option.Option<unknown> | boolean, const TargetTag extends TagOf<State>, R = never, Context = NoMachineContext>(guard: (state: NoInfer<SourceState>, message: NoInfer<TriggerMessage>, ...context: ContextArguments<NoInfer<Context>>) => GuardResult, target: TargetTag, handler: (input: NoInfer<EdgeInput<SourceState, TriggerMessage, GuardValueOf<GuardResult>, Context>>) => Update.Return<NoInfer<Variant<State, TargetTag>>, NoInfer<Message>, R>) => When<State, Message, SourceState, TriggerMessage, GuardValueOf<GuardResult>, R, Context>;
182
+ /**
183
+ * The unconditional fallback at the end of a guard list. Its Edge handler may
184
+ * return Commands whose Effects need services, threading their requirements
185
+ * into the Machine's `R` the same way {@link to} and {@link when} do.
102
186
  *
103
187
  * @experimental Ships from `foldkit/experimental/machine`; expect breaking changes while the API settles.
104
188
  */
105
- export declare const when: <State extends Tagged, Message extends Tagged, SourceState extends State, TriggerMessage extends Message, GuardResult extends Option.Option<unknown> | boolean, const TargetTag extends TagOf<State>, R = never>(guard: (state: NoInfer<SourceState>, message: NoInfer<TriggerMessage>) => GuardResult, target: TargetTag, build: (input: NoInfer<EdgeInput<SourceState, TriggerMessage, GuardValueOf<GuardResult>>>) => NoInfer<Variant<State, TargetTag>>, commands?: (input: NoInfer<EdgeInput<SourceState, TriggerMessage, GuardValueOf<GuardResult>>>) => ReadonlyArray<Command<NoInfer<Message>, never, R>>) => When<State, Message, SourceState, TriggerMessage, GuardValueOf<GuardResult>, R>;
189
+ export declare const otherwise: <State extends Tagged, Message extends Tagged, SourceState extends State, TriggerMessage extends Message, R = never, Context = NoMachineContext>(edge: Edge<State, Message, SourceState, TriggerMessage, void, R, Context>) => Otherwise<State, Message, SourceState, TriggerMessage, R, Context>;
106
190
  /**
107
- * The unconditional fallback at the end of a guard list. Its edge may carry
108
- * Commands whose Effects need services, threading their requirements into the
109
- * Machine's `R` the same way {@link to} and {@link when} do.
191
+ * Declares that a Message is intentionally ignored when every preceding
192
+ * {@link when} guard declines. Evaluation stops at this fallback, and
193
+ * {@link Machine.step} reports `ExplicitlyIgnored`. Edges listed after it are
194
+ * reported by {@link Machine.deadTransitions} as `ShadowedByIgnore`.
110
195
  *
111
196
  * @experimental Ships from `foldkit/experimental/machine`; expect breaking changes while the API settles.
112
197
  */
113
- export declare const otherwise: <State extends Tagged, Message extends Tagged, SourceState extends State, TriggerMessage extends Message, R = never>(edge: Edge<State, Message, SourceState, TriggerMessage, void, R>) => Otherwise<State, Message, SourceState, TriggerMessage, R>;
198
+ export declare const ignore: () => Ignore;
114
199
  /** A step that matched an Edge: the next state plus any transition-time Commands. */
115
200
  export type Transitioned<State extends Tagged, Message extends Tagged, R = never> = Readonly<{
116
201
  _tag: 'Transitioned';
@@ -120,12 +205,29 @@ export type Transitioned<State extends Tagged, Message extends Tagged, R = never
120
205
  state: State;
121
206
  commands: ReadonlyArray<Command<Message, never, R>>;
122
207
  }>;
123
- /** A step that matched no Edge: the state is unchanged and the Message is observable as ignored. */
208
+ /**
209
+ * Why a step matched no Edge. `OutOfAlphabet` means the Message tag appears
210
+ * in no state's `on` record anywhere in the table, so the Message is outside
211
+ * the Machine's alphabet. `NotApplicable` means the Message tag is in the
212
+ * alphabet, but no Edge for it exists from the current state, whether the
213
+ * state is absent from the table or its `on` record lacks the tag.
214
+ * `GuardsFellThrough` means an Edge entry exists for this state and Message,
215
+ * but every guard declined and no {@link otherwise} or {@link ignore} fallback
216
+ * was present.
217
+ * `ExplicitlyIgnored` means evaluation reached an {@link ignore} fallback.
218
+ */
219
+ export type IgnoredReason = 'OutOfAlphabet' | 'NotApplicable' | 'GuardsFellThrough' | 'ExplicitlyIgnored';
220
+ /**
221
+ * A step that matched no Edge: the state is unchanged and the Message is
222
+ * observable as ignored. `reason` distinguishes the four causes, described
223
+ * on {@link IgnoredReason}.
224
+ */
124
225
  export type Ignored<State extends Tagged, Message extends Tagged> = Readonly<{
125
226
  _tag: 'Ignored';
126
227
  stateTag: TagOf<State>;
127
228
  messageTag: TagOf<Message>;
128
229
  state: State;
230
+ reason: IgnoredReason;
129
231
  }>;
130
232
  /** The observable outcome of one step: `Transitioned` or `Ignored`.
131
233
  *
@@ -153,9 +255,10 @@ export type EdgeSummary<State extends Tagged, Message extends Tagged> = Readonly
153
255
  * Why an Edge cannot fire in a walk of the declared Edge set:
154
256
  * `UnreachableSource` means no path from the walk roots reaches the Edge's
155
257
  * source state, and `ShadowedByOtherwise` means an earlier `otherwise` in the
156
- * Edge's guard list always fires first.
258
+ * Edge's guard list always fires first. `ShadowedByIgnore` means an earlier
259
+ * {@link ignore} stops evaluation first.
157
260
  */
158
- export type DeadTransitionReason = 'UnreachableSource' | 'ShadowedByOtherwise';
261
+ export type DeadTransitionReason = 'UnreachableSource' | 'ShadowedByOtherwise' | 'ShadowedByIgnore';
159
262
  /** An Edge that cannot fire in a walk of the declared Edge set, with the reason. */
160
263
  export type DeadTransition<State extends Tagged, Message extends Tagged> = Readonly<{
161
264
  edge: EdgeSummary<State, Message>;
@@ -165,48 +268,100 @@ export type DeadTransition<State extends Tagged, Message extends Tagged> = Reado
165
268
  *
166
269
  * @experimental Ships from `foldkit/experimental/machine`; expect breaking changes while the API settles.
167
270
  */
168
- export type Machine<State extends Tagged, Message extends Tagged, R = never> = Readonly<{
271
+ export type Machine<State extends Tagged, Message extends Tagged, R = never, Context = NoMachineContext> = Readonly<{
169
272
  initial: State;
170
273
  stateTags: ReadonlyArray<TagOf<State>>;
171
274
  edges: ReadonlyArray<EdgeSummary<State, Message>>;
172
275
  /** Runs one Message through the Machine as a Foldkit update. The returned
173
276
  * `Update.Return<State, Message, R>` stores the next Machine state in
174
- * `model` and any transition-time Commands in `commands`, so `transition`
175
- * can be passed directly to `Update.foldChild`. Use `step` when code needs
176
- * to distinguish a `Transitioned` result from an `Ignored` result or
177
- * inspect Edge metadata. */
178
- transition: (state: State, message: Message) => Update.Return<State, Message, R>;
179
- step: (state: State, message: Message) => TransitionResult<State, Message, R>;
180
- /** The state tags a walk of the declared Edge set visits starting from `tag`. */
277
+ * `model` and any transition-time Commands in `commands`. Use {@link fold}
278
+ * to read and write the Machine state inside an enclosing Model. Use `step`
279
+ * when code needs to distinguish a `Transitioned` result from an `Ignored`
280
+ * result or inspect Edge metadata.
281
+ */
282
+ transition: (state: State, message: Message, ...context: MachineContextArguments<Context>) => Update.Return<State, Message, R>;
283
+ step: (state: State, message: Message, ...context: MachineContextArguments<Context>) => TransitionResult<State, Message, R>;
284
+ /**
285
+ * The state tags a walk of the statically selectable declared Edges visits
286
+ * starting from `tag`. Edges listed after an `otherwise` or {@link ignore}
287
+ * are excluded because the runtime can never select them.
288
+ */
181
289
  reachableFrom: (tag: TagOf<State>) => ReadonlySet<TagOf<State>>;
182
290
  /**
183
- * The state tags a walk of the declared Edge set never visits, starting
184
- * from the initial state's tag plus `extraRoots`. The walk sees only the
185
- * declared Edges, so state changes made outside `transition` and `step`
186
- * are invisible to it, and it always starts at `initial`. Entry points
187
- * other than `initial`, such as restored persistence, deep links, or SSR
188
- * hydration, must be passed as `extraRoots`, or the states they enter are
189
- * reported unreachable even though the running program visits them.
291
+ * The state tags a walk of the statically selectable declared Edges never
292
+ * visits, starting from the initial state's tag plus `extraRoots`. Edges
293
+ * listed after an `otherwise` or {@link ignore} are excluded because the
294
+ * runtime can never select them. The walk sees only declared Edges, so state
295
+ * changes made outside `transition` and `step` are invisible to it, and it
296
+ * always starts at `initial`. Entry points other than `initial`, such as
297
+ * restored persistence, deep links, or SSR hydration, must be passed as
298
+ * `extraRoots`, or the states they enter are reported unreachable even
299
+ * though the running program visits them.
190
300
  */
191
301
  unreachableStates: (extraRoots?: ReadonlyArray<TagOf<State>>) => ReadonlyArray<TagOf<State>>;
192
302
  /**
193
303
  * The Edges that cannot fire in a walk of the declared Edge set starting
194
304
  * from the initial state's tag plus `extraRoots`, each with its
195
- * {@link DeadTransitionReason}. The same assumptions as
196
- * `unreachableStates` apply: the walk cannot see state changes made
197
- * outside `transition` and `step`, and entry points other than `initial`
198
- * must be passed as `extraRoots`, or their outgoing Edges are reported as
199
- * `UnreachableSource` even though the running program fires them.
305
+ * {@link DeadTransitionReason}. Each Edge appears at most once;
306
+ * `ShadowedByOtherwise` and `ShadowedByIgnore` take precedence when a source
307
+ * is also unreachable. The same assumptions as `unreachableStates` apply:
308
+ * the walk cannot see state changes made outside `transition` and `step`,
309
+ * and entry points other than `initial` must be passed as `extraRoots`, or
310
+ * their outgoing Edges are reported as `UnreachableSource` even though the
311
+ * running program fires them.
200
312
  */
201
313
  deadTransitions: (extraRoots?: ReadonlyArray<TagOf<State>>) => ReadonlyArray<DeadTransition<State, Message>>;
202
314
  toMermaid: () => string;
203
315
  }>;
316
+ type FoldContextField<ParentModel, Context> = HasMachineContext<Context> extends true ? Readonly<{
317
+ context: (model: NoInfer<ParentModel>) => NoInfer<MachineContextArgument<Context>>;
318
+ }> : Readonly<{
319
+ context?: never;
320
+ }>;
321
+ /** The capabilities needed to fold a Machine state field into its enclosing
322
+ * Model. `read` returns an `Option` because the field may be absent in the
323
+ * current Model variant; `write` replaces it after a transition. A contextual
324
+ * Machine also requires `context`, which reads the current context from the
325
+ * enclosing Model for each transition. */
326
+ export type FoldConfig<ParentModel, State extends Tagged, Message extends Tagged, R = never, Context = NoMachineContext> = Readonly<{
327
+ machine: Machine<State, Message, R, Context>;
328
+ read: (model: ParentModel) => Option.Option<State>;
329
+ write: (model: ParentModel, nextState: State) => ParentModel;
330
+ }> & FoldContextField<ParentModel, Context>;
331
+ /** Folds a Machine state field into an enclosing Model. Any transition-time
332
+ * Commands pass through unchanged.
333
+ *
334
+ * When `read` returns `None`, the fold returns the original Model without
335
+ * running a transition. For a contextual Machine, `context` is read only when
336
+ * the Machine state is present and is supplied to that transition.
337
+ *
338
+ * ```ts
339
+ * const foldUpload = Machine.fold({
340
+ * machine: uploadMachine,
341
+ * read: (model: Model) => Option.some(model.upload),
342
+ * write: (model, nextUpload) =>
343
+ * evo(model, { upload: () => nextUpload }),
344
+ * context: model => model.uploadQueues,
345
+ * })
346
+ *
347
+ * // Data-first in update
348
+ * foldUpload(model, message)
349
+ *
350
+ * // Data-last in a composed update
351
+ * Update.combine(model, [foldUpload(message), recordUploadAttempt])
352
+ * ```
353
+ *
354
+ * @experimental Ships from `foldkit/experimental/machine`; expect breaking changes while the API settles.
355
+ */
356
+ export declare const fold: {
357
+ <ParentModel, State extends Tagged, Message extends Tagged, R = never, Context = NoMachineContext>(config: FoldConfig<ParentModel, State, Message, R, Context>): Update.Fold<ParentModel, Message, Message, R>;
358
+ };
204
359
  /**
205
360
  * The Schemas a Machine is defined over: the state union and the Message
206
361
  * union. Passed to `define`'s first stage so the type parameters are
207
- * fully resolved before the transition table is checked.
362
+ * fully resolved before the Machine definition is checked.
208
363
  */
209
- export type MachineSchemas<State extends Tagged, Message extends Tagged> = Readonly<{
364
+ type MachineSchemaFields<State extends Tagged, Message extends Tagged> = Readonly<{
210
365
  state: Schema.Top & Readonly<{
211
366
  Type: State;
212
367
  members: ReadonlyArray<Schema.Top>;
@@ -215,29 +370,54 @@ export type MachineSchemas<State extends Tagged, Message extends Tagged> = Reado
215
370
  Type: Message;
216
371
  }>;
217
372
  }>;
218
- /** The Machine definition: the initial state and the transition table.
373
+ /**
374
+ * The Schemas a Machine is defined over, including an optional read-only
375
+ * context Schema. A declared context is required by the Machine's guards,
376
+ * Edge handlers, `transition`, and `step`.
377
+ */
378
+ export type MachineSchemas<State extends Tagged, Message extends Tagged, ContextSchema extends Schema.Top | undefined = undefined> = MachineSchemaFields<State, Message> & ([ContextSchema] extends [Schema.Top] ? Readonly<{
379
+ context: ContextSchema;
380
+ }> : Readonly<{
381
+ context?: never;
382
+ }>);
383
+ /** The Machine definition: the initial state, shared transition defaults, and
384
+ * the state-local transition table. A state-local transition replaces a
385
+ * shared transition for the same state and Message.
219
386
  *
220
387
  * @experimental Ships from `foldkit/experimental/machine`; expect breaking changes while the API settles.
221
388
  */
222
- export type MachineDefinition<State extends Tagged, Message extends Tagged, R = never> = Readonly<{
389
+ export type MachineDefinition<State extends Tagged, Message extends Tagged, R = never, Context = NoMachineContext> = Readonly<{
223
390
  initial: State;
224
- states: TransitionTable<State, Message, R>;
391
+ shared?: ReadonlyArray<ForStatesFragment<State, Message, R, Context>>;
392
+ states: TransitionTable<State, Message, R, Context>;
225
393
  }>;
226
394
  /**
227
- * Compiles a declarative transition table into a {@link Machine}.
395
+ * Compiles a declarative Machine definition into a {@link Machine}.
228
396
  *
229
397
  * Two stages: the first takes the state and Message union Schemas and fixes
230
- * the type parameters, the second takes the initial state and the transition
231
- * table. The split is what lets TypeScript narrow `state` and `message`
232
- * inside every Edge from its table position: a single-call form checks the
233
- * table while the type parameters are still being inferred, and the
234
- * narrowing collapses.
398
+ * the type parameters, the second takes the initial state, optional shared
399
+ * transition defaults, and the state-local transition table. The split is
400
+ * what lets TypeScript narrow `state` and `message` inside every Edge from its
401
+ * transition-map position: a single-call form checks the definition while the
402
+ * type parameters are still being inferred, and the narrowing collapses.
403
+ *
404
+ * Build shared defaults with {@link forStates}. Each fragment is expanded
405
+ * into the ordinary state-local table before dispatch and static analysis. A
406
+ * state-local transition replaces its shared default for that state and
407
+ * Message; overlapping shared fragments throw when the Machine is defined.
408
+ *
409
+ * The Machine is not a runtime: `transition` returns an `Update.Return`, so the
410
+ * Machine state lives in the Model and the Foldkit runtime never learns the
411
+ * Machine exists. Use {@link fold} to read and write a Machine state field in
412
+ * an enclosing Model. Messages that match no Edge leave the state unchanged;
413
+ * use `step` when the `Ignored` outcome should be observable.
235
414
  *
236
- * The Machine is not a runtime: `transition` has the same shape as a Foldkit
237
- * `update` branch and returns `[nextState, commands]`, so the machine state
238
- * lives in the Model and the Foldkit runtime never learns the Machine
239
- * exists. Messages that match no Edge leave the state unchanged; use `step`
240
- * when the `Ignored` outcome should be observable.
415
+ * Declare a `context` Schema when transitions need a read-only view of data
416
+ * outside the Machine state. The context is passed to guards and Edge handlers
417
+ * on each call; it is not decoded, stored, or included in static analysis. Data
418
+ * that the state owns for its lifetime belongs in the state as a snapshot.
419
+ * Values that should be visible as facts in Story tests and DevTools should
420
+ * still enter through Messages.
241
421
  *
242
422
  * Because every Edge names a literal target tag, the Edge set is plain data:
243
423
  * `reachableFrom`, `unreachableStates`, `deadTransitions`, and `toMermaid`
@@ -249,23 +429,37 @@ export type MachineDefinition<State extends Tagged, Message extends Tagged, R =
249
429
  * distinct services `R` cannot be inferred to their union, so supply it on the
250
430
  * second call: `define(schemas)<UploadsClient | SaveClient>({ ... })`.
251
431
  *
252
- * @example An edge Command that needs a service
432
+ * @example Read external Model data through context
253
433
  * ```ts
254
- * const machine = define({ state: DialogState, message: DialogMessage })({
434
+ * const machine = define({
435
+ * state: DialogState,
436
+ * message: DialogMessage,
437
+ * context: UploadQueues,
438
+ * })({
255
439
  * initial: Idle(),
256
440
  * states: {
257
441
  * Idle: {
258
442
  * on: {
259
- * ClickedSubmit: to('Uploading', () => Uploading(), () => [Presign()]),
443
+ * ClickedSubmit: [
444
+ * when(
445
+ * (_state, message, queues) => queues.has(message.fileId),
446
+ * 'Uploading',
447
+ * ({ message, context: queues }) => ({
448
+ * model: Uploading({ fileId: message.fileId }),
449
+ * commands: [UploadFromQueue({ queues, fileId: message.fileId })],
450
+ * }),
451
+ * ),
452
+ * ],
260
453
  * },
261
454
  * },
262
455
  * },
263
456
  * })
264
- * // Commands on the return from machine.transition(...) require UploadsClient.
457
+ * machine.transition(model.dialog, message, model.uploadQueues)
265
458
  * ```
266
459
  *
267
460
  * @experimental Ships from `foldkit/experimental/machine`; expect breaking changes while the API settles.
268
461
  */
269
- export declare const define: <State extends Tagged, Message extends Tagged>(schemas: MachineSchemas<State, Message>) => <R = never>(definition: MachineDefinition<State, Message, R>) => Machine<State, Message, R>;
462
+ export declare function define<State extends Tagged, Message extends Tagged, ContextSchema extends Schema.Top>(schemas: MachineSchemas<State, Message, ContextSchema>): <R = never>(definition: MachineDefinition<State, Message, R, ContextSchema['Type']>) => Machine<State, Message, R, ContextSchema['Type']>;
463
+ export declare function define<State extends Tagged, Message extends Tagged>(schemas: MachineSchemas<State, Message>): <R = never>(definition: MachineDefinition<State, Message, R>) => Machine<State, Message, R>;
270
464
  export {};
271
465
  //# sourceMappingURL=machine.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"machine.d.ts","sourceRoot":"","sources":["../../../src/experimental/machine/machine.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,MAAM,EAAqB,MAAM,EAAQ,MAAM,QAAQ,CAAA;AAE9E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AACrD,OAAO,KAAK,KAAK,MAAM,MAAM,uBAAuB,CAAA;AAIpD,8FAA8F;AAC9F,MAAM,MAAM,MAAM,GAAG,QAAQ,CAAC;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CAAA;AAE/C,sDAAsD;AACtD,MAAM,MAAM,KAAK,CAAC,KAAK,SAAS,MAAM,IAAI,KAAK,CAAC,MAAM,CAAC,CAAA;AAEvD,mEAAmE;AACnE,MAAM,MAAM,OAAO,CAAC,KAAK,SAAS,MAAM,EAAE,GAAG,SAAS,KAAK,CAAC,KAAK,CAAC,IAAI,OAAO,CAC3E,KAAK,EACL,QAAQ,CAAC;IAAE,IAAI,EAAE,GAAG,CAAA;CAAE,CAAC,CACxB,CAAA;AAID;;;;;GAKG;AACH,MAAM,MAAM,SAAS,CACnB,WAAW,SAAS,MAAM,EAC1B,cAAc,SAAS,MAAM,EAC7B,UAAU,GAAG,IAAI,IACf,QAAQ,CAAC;IACX,KAAK,EAAE,WAAW,CAAA;IAClB,OAAO,EAAE,cAAc,CAAA;IACvB,UAAU,EAAE,UAAU,CAAA;CACvB,CAAC,CAAA;AAEF;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,IAAI,CACd,KAAK,SAAS,MAAM,EACpB,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