foldkit 0.128.1 → 0.130.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 (104) hide show
  1. package/THIRD-PARTY-NOTICES.md +30 -0
  2. package/dist/brand/brand.d.ts +25 -0
  3. package/dist/brand/brand.d.ts.map +1 -0
  4. package/dist/brand/brand.js +50 -0
  5. package/dist/brand/index.d.ts +2 -0
  6. package/dist/brand/index.d.ts.map +1 -0
  7. package/dist/brand/index.js +1 -0
  8. package/dist/brand/public.d.ts +2 -0
  9. package/dist/brand/public.d.ts.map +1 -0
  10. package/dist/brand/public.js +1 -0
  11. package/dist/canvas/view.d.ts.map +1 -1
  12. package/dist/canvas/view.js +1 -1
  13. package/dist/command/index.d.ts +6 -1
  14. package/dist/command/index.d.ts.map +1 -1
  15. package/dist/command/interruptible/index.d.ts +2 -0
  16. package/dist/command/interruptible/index.d.ts.map +1 -0
  17. package/dist/command/interruptible/index.js +1 -0
  18. package/dist/command/interruptible/interruptible.d.ts +177 -0
  19. package/dist/command/interruptible/interruptible.d.ts.map +1 -0
  20. package/dist/command/interruptible/interruptible.js +155 -0
  21. package/dist/command/interruptible/public.d.ts +3 -0
  22. package/dist/command/interruptible/public.d.ts.map +1 -0
  23. package/dist/command/interruptible/public.js +1 -0
  24. package/dist/command/public.d.ts +1 -0
  25. package/dist/command/public.d.ts.map +1 -1
  26. package/dist/command/public.js +1 -0
  27. package/dist/devTools/protocol.d.ts +1 -1
  28. package/dist/devTools/protocol.d.ts.map +1 -1
  29. package/dist/devTools/protocol.js +1 -1
  30. package/dist/devTools/store.js +2 -2
  31. package/dist/devTools/webSocketBridge.d.ts +1 -1
  32. package/dist/devTools/webSocketBridge.js +1 -1
  33. package/dist/html/index.d.ts +18 -18
  34. package/dist/html/index.d.ts.map +1 -1
  35. package/dist/html/index.js +530 -460
  36. package/dist/html/lazy.d.ts +1 -1
  37. package/dist/html/lazy.d.ts.map +1 -1
  38. package/dist/html/lazy.js +11 -2
  39. package/dist/propsModule.d.ts +1 -1
  40. package/dist/propsModule.d.ts.map +1 -1
  41. package/dist/propsModule.js +6 -1
  42. package/dist/runtime/runtime.d.ts.map +1 -1
  43. package/dist/runtime/runtime.js +472 -279
  44. package/dist/snabbdom/attributes.d.ts +4 -0
  45. package/dist/snabbdom/attributes.d.ts.map +1 -0
  46. package/dist/snabbdom/attributes.js +63 -0
  47. package/dist/snabbdom/class.d.ts +4 -0
  48. package/dist/snabbdom/class.d.ts.map +1 -0
  49. package/dist/snabbdom/class.js +31 -0
  50. package/dist/snabbdom/dataset.d.ts +4 -0
  51. package/dist/snabbdom/dataset.d.ts.map +1 -0
  52. package/dist/snabbdom/dataset.js +42 -0
  53. package/dist/snabbdom/eventlisteners.d.ts +11 -0
  54. package/dist/snabbdom/eventlisteners.d.ts.map +1 -0
  55. package/dist/snabbdom/eventlisteners.js +85 -0
  56. package/dist/snabbdom/h.d.ts +11 -0
  57. package/dist/snabbdom/h.d.ts.map +1 -0
  58. package/dist/snabbdom/h.js +61 -0
  59. package/dist/snabbdom/hooks.d.ts +24 -0
  60. package/dist/snabbdom/hooks.d.ts.map +1 -0
  61. package/dist/snabbdom/hooks.js +1 -0
  62. package/dist/snabbdom/htmldomapi.d.ts +34 -0
  63. package/dist/snabbdom/htmldomapi.d.ts.map +1 -0
  64. package/dist/snabbdom/htmldomapi.js +111 -0
  65. package/dist/snabbdom/index.d.ts +15 -0
  66. package/dist/snabbdom/index.d.ts.map +1 -0
  67. package/dist/snabbdom/index.js +9 -0
  68. package/dist/snabbdom/init.d.ts +14 -0
  69. package/dist/snabbdom/init.d.ts.map +1 -0
  70. package/dist/snabbdom/init.js +486 -0
  71. package/dist/snabbdom/is.d.ts +3 -0
  72. package/dist/snabbdom/is.d.ts.map +1 -0
  73. package/dist/snabbdom/is.js +7 -0
  74. package/dist/snabbdom/module.d.ts +11 -0
  75. package/dist/snabbdom/module.d.ts.map +1 -0
  76. package/dist/snabbdom/module.js +1 -0
  77. package/dist/snabbdom/props.d.ts +2 -0
  78. package/dist/snabbdom/props.d.ts.map +1 -0
  79. package/dist/snabbdom/props.js +1 -0
  80. package/dist/snabbdom/style.d.ts +9 -0
  81. package/dist/snabbdom/style.d.ts.map +1 -0
  82. package/dist/snabbdom/style.js +123 -0
  83. package/dist/snabbdom/tovnode.d.ts +4 -0
  84. package/dist/snabbdom/tovnode.d.ts.map +1 -0
  85. package/dist/snabbdom/tovnode.js +69 -0
  86. package/dist/snabbdom/vnode.d.ts +46 -0
  87. package/dist/snabbdom/vnode.d.ts.map +1 -0
  88. package/dist/snabbdom/vnode.js +13 -0
  89. package/dist/test/apps/uploads.d.ts +81 -0
  90. package/dist/test/apps/uploads.d.ts.map +1 -0
  91. package/dist/test/apps/uploads.js +102 -0
  92. package/dist/test/internal.d.ts +16 -2
  93. package/dist/test/internal.d.ts.map +1 -1
  94. package/dist/test/internal.js +20 -4
  95. package/dist/vdom.d.ts +2 -2
  96. package/dist/vdom.d.ts.map +1 -1
  97. package/dist/vdom.js +1 -1
  98. package/package.json +7 -5
  99. package/dist/runtime/messagePriority.d.ts +0 -17
  100. package/dist/runtime/messagePriority.d.ts.map +0 -1
  101. package/dist/runtime/messagePriority.js +0 -33
  102. package/dist/runtime/renderLoop.d.ts +0 -27
  103. package/dist/runtime/renderLoop.d.ts.map +0 -1
  104. package/dist/runtime/renderLoop.js +0 -25
@@ -0,0 +1,30 @@
1
+ # Third-Party Notices
2
+
3
+ This package includes a vendored fork of snabbdom v3.6.3
4
+ (https://github.com/snabbdom/snabbdom), compiled into the published dist
5
+ output from `src/snabbdom/`. The fork and its changes are documented in
6
+ `src/snabbdom/README.md` in the repository. The original license follows.
7
+
8
+ ## snabbdom
9
+
10
+ The MIT License (MIT)
11
+
12
+ Copyright (c) 2015 Simon Friis Vindum
13
+
14
+ Permission is hereby granted, free of charge, to any person obtaining a copy
15
+ of this software and associated documentation files (the "Software"), to deal
16
+ in the Software without restriction, including without limitation the rights
17
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
18
+ copies of the Software, and to permit persons to whom the Software is
19
+ furnished to do so, subject to the following conditions:
20
+
21
+ The above copyright notice and this permission notice shall be included in all
22
+ copies or substantial portions of the Software.
23
+
24
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
25
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
26
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
27
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
28
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
29
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
30
+ SOFTWARE.
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Stamps a framework-managed identity onto a view result.
3
+ *
4
+ * Identity is the differ's second axis, independent of user-facing keys: it
5
+ * answers "which view arm produced this node" rather than "which sibling is
6
+ * this". Identity never enters the keyed index; it joins the differ's
7
+ * compatibility check exactly where the selector is consulted, so an identity
8
+ * mismatch replaces the node instead of patching it, and switching between
9
+ * conditional view arms tears down the old subtree even when both arms render
10
+ * the same tag.
11
+ *
12
+ * Stamping is set-if-absent and mutates the vnode in place: a vnode that
13
+ * already carries an identity (including a memoized vnode returned from a
14
+ * cache) is left untouched, so branding is idempotent and never breaks
15
+ * reference equality that the renderer relies on. Vnodes are stamped directly;
16
+ * for an array result each vnode element is stamped with the same identity.
17
+ * Any other value passes through unchanged.
18
+ *
19
+ * `@foldkit/vite-plugin` injects a call to this around every function return
20
+ * in application modules at build time, so identity attaches at view-function
21
+ * boundaries regardless of the branching syntax that selected the function.
22
+ * Application code does not call it by hand.
23
+ */
24
+ export declare const brandViewResult: <A>(result: A, identity: string) => A;
25
+ //# sourceMappingURL=brand.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"brand.d.ts","sourceRoot":"","sources":["../../src/brand/brand.ts"],"names":[],"mappings":"AAmBA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,eAAe,GAAI,CAAC,EAAE,QAAQ,CAAC,EAAE,UAAU,MAAM,KAAG,CAWhE,CAAA"}
@@ -0,0 +1,50 @@
1
+ const isVNode = (value) => typeof value === 'object' &&
2
+ value !== null &&
3
+ 'sel' in value &&
4
+ typeof value.sel === 'string' &&
5
+ 'data' in value &&
6
+ 'children' in value &&
7
+ 'text' in value &&
8
+ 'elm' in value &&
9
+ 'key' in value;
10
+ const stampIdentity = (target, identity) => {
11
+ if (target.identity === undefined) {
12
+ target.identity = identity;
13
+ }
14
+ };
15
+ /**
16
+ * Stamps a framework-managed identity onto a view result.
17
+ *
18
+ * Identity is the differ's second axis, independent of user-facing keys: it
19
+ * answers "which view arm produced this node" rather than "which sibling is
20
+ * this". Identity never enters the keyed index; it joins the differ's
21
+ * compatibility check exactly where the selector is consulted, so an identity
22
+ * mismatch replaces the node instead of patching it, and switching between
23
+ * conditional view arms tears down the old subtree even when both arms render
24
+ * the same tag.
25
+ *
26
+ * Stamping is set-if-absent and mutates the vnode in place: a vnode that
27
+ * already carries an identity (including a memoized vnode returned from a
28
+ * cache) is left untouched, so branding is idempotent and never breaks
29
+ * reference equality that the renderer relies on. Vnodes are stamped directly;
30
+ * for an array result each vnode element is stamped with the same identity.
31
+ * Any other value passes through unchanged.
32
+ *
33
+ * `@foldkit/vite-plugin` injects a call to this around every function return
34
+ * in application modules at build time, so identity attaches at view-function
35
+ * boundaries regardless of the branching syntax that selected the function.
36
+ * Application code does not call it by hand.
37
+ */
38
+ export const brandViewResult = (result, identity) => {
39
+ if (isVNode(result)) {
40
+ stampIdentity(result, identity);
41
+ }
42
+ else if (Array.isArray(result)) {
43
+ for (const element of result) {
44
+ if (isVNode(element)) {
45
+ stampIdentity(element, identity);
46
+ }
47
+ }
48
+ }
49
+ return result;
50
+ };
@@ -0,0 +1,2 @@
1
+ export * from './brand.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/brand/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA"}
@@ -0,0 +1 @@
1
+ export * from './brand.js';
@@ -0,0 +1,2 @@
1
+ export { brandViewResult } from './index.js';
2
+ //# sourceMappingURL=public.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../src/brand/public.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA"}
@@ -0,0 +1 @@
1
+ export { brandViewResult } from './index.js';
@@ -1 +1 @@
1
- {"version":3,"file":"view.d.ts","sourceRoot":"","sources":["../../src/canvas/view.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,IAAI,EAAqB,MAAM,kBAAkB,CAAA;AAE/D,OAAO,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAE9C;;;;;GAKG;AACH,MAAM,MAAM,UAAU,CAAC,OAAO,IAAI,QAAQ,CAAC;IACzC,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,aAAa,CAAC,KAAK,CAAC,CAAA;IAC5B,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC9B,aAAa,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,KAAK,KAAK,OAAO,CAAC,GAAG,SAAS,CAAA;IACvD,aAAa,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,KAAK,KAAK,OAAO,CAAC,GAAG,SAAS,CAAA;IACvD,WAAW,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,KAAK,KAAK,OAAO,CAAC,GAAG,SAAS,CAAA;CACtD,CAAC,CAAA;AA8BF;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,IAAI,GAAI,OAAO,EAAE,QAAQ,UAAU,CAAC,OAAO,CAAC,KAAG,IAwE3D,CAAA"}
1
+ {"version":3,"file":"view.d.ts","sourceRoot":"","sources":["../../src/canvas/view.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,IAAI,EAAqB,MAAM,kBAAkB,CAAA;AAI/D,OAAO,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAE9C;;;;;GAKG;AACH,MAAM,MAAM,UAAU,CAAC,OAAO,IAAI,QAAQ,CAAC;IACzC,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,aAAa,CAAC,KAAK,CAAC,CAAA;IAC5B,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC9B,aAAa,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,KAAK,KAAK,OAAO,CAAC,GAAG,SAAS,CAAA;IACvD,aAAa,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,KAAK,KAAK,OAAO,CAAC,GAAG,SAAS,CAAA;IACvD,WAAW,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,KAAK,KAAK,OAAO,CAAC,GAAG,SAAS,CAAA;CACtD,CAAC,CAAA;AA8BF;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,IAAI,GAAI,OAAO,EAAE,QAAQ,UAAU,CAAC,OAAO,CAAC,KAAG,IAwE3D,CAAA"}
@@ -1,6 +1,6 @@
1
1
  import { Array, Predicate, Record, String, pipe } from 'effect';
2
- import { h } from 'snabbdom';
3
2
  import { __requireDispatch } from '../html/index.js';
3
+ import { h } from '../snabbdom/index.js';
4
4
  import { paintScene } from './paint.js';
5
5
  /**
6
6
  * Per-element 2D context cache. Keyed by the live `<canvas>` element so the
@@ -3,14 +3,19 @@ import { Effect, Schema } from 'effect';
3
3
  export declare const CommandDefinitionTypeId: unique symbol;
4
4
  /** Type-level brand for CommandDefinition values. */
5
5
  export type CommandDefinitionTypeId = typeof CommandDefinitionTypeId;
6
- /** A named Effect that produces a message, optionally carrying the args used to construct it. */
6
+ /** A named Effect that produces a message, optionally carrying the args used
7
+ * to construct it. `key` is present on Commands built by
8
+ * `Interruptible.define`: it addresses the invocation in the runtime's
9
+ * interrupt registry so a later Interrupt Command can stop it. */
7
10
  export type Command<T, E = never, R = never> = [T] extends [Schema.Top] ? Readonly<{
8
11
  name: string;
9
12
  args?: Record<string, unknown>;
13
+ key?: string;
10
14
  effect: Effect.Effect<Schema.Schema.Type<T>, E, R>;
11
15
  }> : Readonly<{
12
16
  name: string;
13
17
  args?: Record<string, unknown>;
18
+ key?: string;
14
19
  effect: Effect.Effect<T, E, R>;
15
20
  }>;
16
21
  /** A Command definition for a Command with no declared args. Call as `Definition()` to produce a Command instance. */
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/command/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,MAAM,EAAuB,MAAM,EAAE,MAAM,QAAQ,CAAA;AAEnE,qDAAqD;AAErD,eAAO,MAAM,uBAAuB,EAAE,OAAO,MAEN,CAAA;AAEvC,qDAAqD;AACrD,MAAM,MAAM,uBAAuB,GAAG,OAAO,uBAAuB,CAAA;AAEpE,iGAAiG;AACjG,MAAM,MAAM,OAAO,CAAC,CAAC,EAAE,CAAC,GAAG,KAAK,EAAE,CAAC,GAAG,KAAK,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,GAAG,CAAC,GACnE,QAAQ,CAAC;IACP,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC9B,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAA;CACnD,CAAC,G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AM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;QAC9B,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC,EAAE,CAAC,CAAC,CAAA;KACvC,CAAC,CACH,CAAA;CAmBF,CAAA"}
@@ -0,0 +1,2 @@
1
+ export * from './interruptible.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/command/interruptible/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA"}
@@ -0,0 +1 @@
1
+ export * from './interruptible.js';
@@ -0,0 +1,177 @@
1
+ import { Context, Effect, Fiber, Schema } from 'effect';
2
+ import { CommandDefinitionTypeId } from '../index.js';
3
+ /** At least one in-flight Command held the interrupt key, and every holder
4
+ * has been stopped. Their declared result Messages are guaranteed never to
5
+ * dispatch. */
6
+ export declare const Interrupted: import("../../schema/index.js").CallableTaggedStruct<"Interrupted", {}>;
7
+ /** At least one in-flight Command held the interrupt key, and every holder
8
+ * has been stopped. Their declared result Messages are guaranteed never to
9
+ * dispatch. */
10
+ export type Interrupted = typeof Interrupted.Type;
11
+ /** No Command holds the interrupt key: every target already completed (its
12
+ * result Message dispatched or will dispatch) or was never dispatched. The
13
+ * two cases are indistinguishable by design. */
14
+ export declare const NotFound: import("../../schema/index.js").CallableTaggedStruct<"NotFound", {}>;
15
+ /** No Command holds the interrupt key: every target already completed (its
16
+ * result Message dispatched or will dispatch) or was never dispatched. The
17
+ * two cases are indistinguishable by design. */
18
+ export type NotFound = typeof NotFound.Type;
19
+ /** The result of an Interrupt Command: {@link Interrupted} when at least one
20
+ * holder was stopped, {@link NotFound} when nothing held the key.
21
+ * Interruption itself cannot fail. */
22
+ export declare const Outcome: Schema.Union<readonly [import("../../schema/index.js").CallableTaggedStruct<"Interrupted", {}>, import("../../schema/index.js").CallableTaggedStruct<"NotFound", {}>]>;
23
+ /** The result of an Interrupt Command: {@link Interrupted} when at least one
24
+ * holder was stopped, {@link NotFound} when nothing held the key.
25
+ * Interruption itself cannot fail. */
26
+ export type Outcome = typeof Outcome.Type;
27
+ /** @internal The per-runtime-instance map from interrupt key to the fibers
28
+ * of the interruptible Commands currently holding it. A key is an address,
29
+ * not a lock: any number of invocations may hold one key concurrently, and
30
+ * dispatching under a held key never interrupts anything. Commands register
31
+ * under their key for the duration of their Effect; Interrupt Commands look
32
+ * the key up and interrupt every holder. Internal to the runtime. */
33
+ export type __Registry = Readonly<{
34
+ lookup: (key: string) => ReadonlyArray<Fiber.Fiber<unknown, unknown>>;
35
+ register: (key: string, fiber: Fiber.Fiber<unknown, unknown>) => void;
36
+ release: (key: string, fiber: Fiber.Fiber<unknown, unknown>) => void;
37
+ interrupt: (key: string) => Effect.Effect<Outcome>;
38
+ }>;
39
+ /** @internal Creates an interrupt registry. The runtime creates one per
40
+ * instance and provides it through {@link __CurrentRegistry}. Internal to
41
+ * the runtime. */
42
+ export declare const __makeRegistry: () => __Registry;
43
+ /** Reference through which the runtime provides the current instance's
44
+ * interrupt registry to Command Effects. A Reference has a default value, so
45
+ * reading it never adds a service requirement; the default is a shared
46
+ * registry for Effects run outside a runtime (unit tests). Internal to the
47
+ * runtime. */
48
+ export declare const __CurrentRegistry: Context.Reference<Readonly<{
49
+ lookup: (key: string) => ReadonlyArray<Fiber.Fiber<unknown, unknown>>;
50
+ register: (key: string, fiber: Fiber.Fiber<unknown, unknown>) => void;
51
+ release: (key: string, fiber: Fiber.Fiber<unknown, unknown>) => void;
52
+ interrupt: (key: string) => Effect.Effect<Outcome>;
53
+ }>>;
54
+ /** An Interrupt Command definition derived from an interruptible Command
55
+ * definition with no declared args. Call as `Definition.Interrupt(toMessage)`
56
+ * to produce a Command that interrupts every holder of the definition's key. */
57
+ export interface InterruptDefinitionNoArgs<Name extends string> {
58
+ readonly [CommandDefinitionTypeId]: CommandDefinitionTypeId;
59
+ readonly name: `${Name}.Interrupt`;
60
+ <ToMessage>(toMessage: (outcome: Outcome) => ToMessage): Readonly<{
61
+ name: `${Name}.Interrupt`;
62
+ interruptsKey: string;
63
+ effect: Effect.Effect<ToMessage>;
64
+ }>;
65
+ }
66
+ /** An Interrupt Command definition derived from an interruptible Command
67
+ * definition with declared args. Call as
68
+ * `Definition.Interrupt(keyArgs, toMessage)` to produce a Command that
69
+ * interrupts every holder of the key derived from `keyArgs`. */
70
+ export interface InterruptDefinitionWithArgs<Name extends string, KeyArgs> {
71
+ readonly [CommandDefinitionTypeId]: CommandDefinitionTypeId;
72
+ readonly name: `${Name}.Interrupt`;
73
+ <ToMessage>(keyArgs: KeyArgs, toMessage: (outcome: Outcome) => ToMessage): Readonly<{
74
+ name: `${Name}.Interrupt`;
75
+ args: KeyArgs;
76
+ interruptsKey: string;
77
+ effect: Effect.Effect<ToMessage>;
78
+ }>;
79
+ }
80
+ /** An interruptible Command definition with no declared args; its key is the
81
+ * Command name. Call as `Definition()` to produce a Command instance; use
82
+ * `Definition.Interrupt` to build the Command that stops it. */
83
+ export interface DefinitionNoArgs<Name extends string, Eff extends Effect.Effect<any, any, any>> {
84
+ readonly [CommandDefinitionTypeId]: CommandDefinitionTypeId;
85
+ readonly name: Name;
86
+ readonly Interrupt: InterruptDefinitionNoArgs<Name>;
87
+ (): Readonly<{
88
+ name: Name;
89
+ key: string;
90
+ effect: Eff;
91
+ }>;
92
+ }
93
+ /** An interruptible Command definition with declared args and a key derived
94
+ * from them, namespaced by the Command name. Call as `Definition(args)` to
95
+ * produce a Command instance; use `Definition.Interrupt` to build the
96
+ * Command that stops every holder of a specific key. */
97
+ export interface DefinitionWithArgs<Name extends string, Fields extends Schema.Struct.Fields, KeyArgs extends Partial<Schema.Schema.Type<Schema.Struct<Fields>>>, Eff extends Effect.Effect<any, any, any>> {
98
+ readonly [CommandDefinitionTypeId]: CommandDefinitionTypeId;
99
+ readonly name: Name;
100
+ readonly Interrupt: InterruptDefinitionWithArgs<Name, KeyArgs>;
101
+ (args: Schema.Schema.Type<Schema.Struct<Fields>>): Readonly<{
102
+ name: Name;
103
+ args: Schema.Schema.Type<Schema.Struct<Fields>>;
104
+ key: string;
105
+ effect: Eff;
106
+ }>;
107
+ }
108
+ /**
109
+ * Defines an interruptible Command. Like `Command.define`, but every
110
+ * invocation registers under a key in the runtime's interrupt registry for
111
+ * the duration of its Effect, and the returned Definition carries an
112
+ * `Interrupt` constructor that builds the Command to stop it.
113
+ *
114
+ * Keys are namespaced by the Command name automatically. With no declared
115
+ * args the key is the Command name itself. With declared args, `toKey` maps
116
+ * them to the part that distinguishes invocations, and the full key becomes
117
+ * `` `${name}:${toKey(args)}` ``, so keys never collide across definitions
118
+ * and call sites never restate the name. Derive the key part from the Model
119
+ * identity that owns the in-flight work (a list item id, an entity id), never
120
+ * from a generated value: the update function is pure, and any invocation you
121
+ * can meaningfully target is already distinguished by data in the Model.
122
+ *
123
+ * Semantics:
124
+ *
125
+ * - A key is an address, not a lock. Any number of invocations may run under
126
+ * one key concurrently, and dispatching never interrupts anything.
127
+ * Interruption only happens when update returns an Interrupt Command.
128
+ * - `Definition.Interrupt` produces a Command whose Effect interrupts every
129
+ * current holder of the key and results in `toMessage(outcome)`. The
130
+ * outcome is `Interrupted` when at least one holder was stopped (the
131
+ * stopped holders' result Messages are guaranteed never to dispatch) or
132
+ * `NotFound` when nothing held the key. Name the result Message
133
+ * `CompletedCancel<CommandName>`.
134
+ * - To dispatch a replacement after cancelling, sequence through the
135
+ * Interrupt's result Message: return the new Command from the
136
+ * `CompletedCancel<CommandName>` handler. Commands in one batch run
137
+ * concurrently with no execution-order guarantee, so `[Interrupt, Next]`
138
+ * in a single list is a race, not a sequence.
139
+ *
140
+ * For work that should stop when the Model says so, reach for a Subscription
141
+ * or ManagedResource instead; interruption is for one-shot async work that is
142
+ * structurally a Command (for example an in-flight HTTP request, a file read,
143
+ * or an upload).
144
+ *
145
+ * @example No args
146
+ * ```ts
147
+ * const SyncLibrary = Command.Interruptible.define(
148
+ * 'SyncLibrary',
149
+ * SucceededSyncLibrary,
150
+ * FailedSyncLibrary,
151
+ * )(Effect.gen(function* () { ... }))
152
+ * // Call sites:
153
+ * SyncLibrary()
154
+ * SyncLibrary.Interrupt(outcome => CompletedCancelSyncLibrary({ outcome }))
155
+ * ```
156
+ *
157
+ * @example With args, key derived from them
158
+ * ```ts
159
+ * const UploadFile = Command.Interruptible.define(
160
+ * 'UploadFile',
161
+ * { uploadId: S.Number, file: S.instanceOf(File) },
162
+ * ({ uploadId }: { uploadId: number }) => String(uploadId),
163
+ * SucceededUploadFile,
164
+ * FailedUploadFile,
165
+ * )(({ uploadId, file }) =>
166
+ * Effect.gen(function* () { ... }),
167
+ * )
168
+ * // Call sites:
169
+ * UploadFile({ uploadId: 1, file })
170
+ * UploadFile.Interrupt({ uploadId: 1 }, outcome =>
171
+ * CompletedCancelUploadFile({ uploadId: 1, outcome }),
172
+ * )
173
+ * ```
174
+ */
175
+ export declare function define<const Name extends string, Results extends ReadonlyArray<Schema.Top>>(name: Name, ...results: Results): <Eff extends Effect.Effect<Schema.Schema.Type<Results[number]>, any, any>>(effect: Eff) => DefinitionNoArgs<Name, Eff>;
176
+ export declare function define<const Name extends string, Fields extends Schema.Struct.Fields, KeyArgs extends Partial<Schema.Schema.Type<Schema.Struct<Fields>>>, Results extends ReadonlyArray<Schema.Top>>(name: Name, args: Fields, toKey: (keyArgs: KeyArgs) => string, ...results: Results): <Eff extends Effect.Effect<Schema.Schema.Type<Results[number]>, any, any>>(effectBuilder: (args: Schema.Schema.Type<Schema.Struct<Fields>>) => Eff) => DefinitionWithArgs<Name, Fields, KeyArgs, Eff>;
177
+ //# sourceMappingURL=interruptible.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interruptible.d.ts","sourceRoot":"","sources":["../../../src/command/interruptible/interruptible.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,OAAO,EACP,MAAM,EACN,KAAK,EAGL,MAAM,EACP,MAAM,QAAQ,CAAA;AAGf,OAAO,EAAE,uBAAuB,EAAE,MAA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{ Array, Context, Effect, Fiber, Option, Predicate, Schema, } from 'effect';
2
+ import { ts } from '../../schema/index.js';
3
+ import { CommandDefinitionTypeId } from '../index.js';
4
+ /** At least one in-flight Command held the interrupt key, and every holder
5
+ * has been stopped. Their declared result Messages are guaranteed never to
6
+ * dispatch. */
7
+ export const Interrupted = ts('Interrupted');
8
+ /** No Command holds the interrupt key: every target already completed (its
9
+ * result Message dispatched or will dispatch) or was never dispatched. The
10
+ * two cases are indistinguishable by design. */
11
+ export const NotFound = ts('NotFound');
12
+ /** The result of an Interrupt Command: {@link Interrupted} when at least one
13
+ * holder was stopped, {@link NotFound} when nothing held the key.
14
+ * Interruption itself cannot fail. */
15
+ export const Outcome = Schema.Union([Interrupted, NotFound]);
16
+ /** @internal Creates an interrupt registry. The runtime creates one per
17
+ * instance and provides it through {@link __CurrentRegistry}. Internal to
18
+ * the runtime. */
19
+ export const __makeRegistry = () => {
20
+ const holders = new Map();
21
+ const lookup = (key) => Option.match(Option.fromNullishOr(holders.get(key)), {
22
+ onNone: () => [],
23
+ onSome: fibers => Array.fromIterable(fibers),
24
+ });
25
+ const register = (key, fiber) => {
26
+ Option.match(Option.fromNullishOr(holders.get(key)), {
27
+ onNone: () => {
28
+ holders.set(key, new Set([fiber]));
29
+ },
30
+ onSome: fibers => {
31
+ fibers.add(fiber);
32
+ },
33
+ });
34
+ };
35
+ const release = (key, fiber) => {
36
+ const maybeFibers = Option.fromNullishOr(holders.get(key));
37
+ if (Option.isSome(maybeFibers)) {
38
+ maybeFibers.value.delete(fiber);
39
+ if (maybeFibers.value.size === 0) {
40
+ holders.delete(key);
41
+ }
42
+ }
43
+ };
44
+ // NOTE: `Effect.suspend` defers the lookup to each run of the returned
45
+ // Effect. Without it the holders would be snapshotted when the Effect
46
+ // value is built, so a stored or retried Interrupt Effect would act on
47
+ // stale fibers instead of whatever holds the key at run time.
48
+ const interrupt = (key) => Effect.suspend(() => Array.match(lookup(key), {
49
+ onEmpty: () => Effect.succeed(NotFound()),
50
+ onNonEmpty: fibers => Effect.map(Fiber.interruptAll(fibers), () => Interrupted()),
51
+ }));
52
+ return { lookup, register, release, interrupt };
53
+ };
54
+ /** Reference through which the runtime provides the current instance's
55
+ * interrupt registry to Command Effects. A Reference has a default value, so
56
+ * reading it never adds a service requirement; the default is a shared
57
+ * registry for Effects run outside a runtime (unit tests). Internal to the
58
+ * runtime. */
59
+ export const __CurrentRegistry = Context.Reference('foldkit/Command/Interruptible/CurrentRegistry', { defaultValue: __makeRegistry });
60
+ // NOTE: registration and its cleanup must attach as one atomic step, the
61
+ // same guarantee `Effect.acquireRelease` gives, built by hand here. The
62
+ // whole region is uninterruptible except the Command's own Effect, which
63
+ // `restore` makes interruptible again. If an interrupt could land after
64
+ // `register` but before `ensuring` attached, the fiber would die without
65
+ // ever removing itself from the registry, and every later Interrupt would
66
+ // report `Interrupted` against that dead entry forever.
67
+ const registerKeyWhileRunning = (key, effect) => Effect.withFiber(fiber => Effect.gen(function* () {
68
+ const registry = yield* __CurrentRegistry;
69
+ return yield* Effect.uninterruptibleMask(restore => Effect.suspend(() => {
70
+ registry.register(key, fiber);
71
+ return restore(effect).pipe(Effect.ensuring(Effect.sync(() => registry.release(key, fiber))));
72
+ }));
73
+ }));
74
+ const makeInterruptEffect = (key, toMessage) => Effect.gen(function* () {
75
+ const registry = yield* __CurrentRegistry;
76
+ const outcome = yield* registry.interrupt(key);
77
+ return toMessage(outcome);
78
+ });
79
+ const brandAsDefinition = (definition, name) => {
80
+ Object.defineProperty(definition, 'name', {
81
+ value: name,
82
+ configurable: true,
83
+ });
84
+ Object.defineProperty(definition, CommandDefinitionTypeId, {
85
+ value: CommandDefinitionTypeId,
86
+ });
87
+ };
88
+ const makeInterruptDefinitionNoArgs = (name, key) => {
89
+ const interruptName = `${name}.Interrupt`;
90
+ const definition = (toMessage) => ({
91
+ name: interruptName,
92
+ interruptsKey: key,
93
+ effect: makeInterruptEffect(key, toMessage),
94
+ messageMappers: [],
95
+ });
96
+ brandAsDefinition(definition, interruptName);
97
+ return definition;
98
+ };
99
+ const makeInterruptDefinitionWithArgs = (name, toFullKey) => {
100
+ const interruptName = `${name}.Interrupt`;
101
+ const definition = (keyArgs, toMessage) => {
102
+ const key = toFullKey(keyArgs);
103
+ return {
104
+ name: interruptName,
105
+ args: keyArgs,
106
+ interruptsKey: key,
107
+ effect: makeInterruptEffect(key, toMessage),
108
+ messageMappers: [],
109
+ };
110
+ };
111
+ brandAsDefinition(definition, interruptName);
112
+ return definition;
113
+ };
114
+ export function define(name, ...rest) {
115
+ const [maybeArgs, maybeToKey] = rest;
116
+ const isArgsRecord = Predicate.isObject(maybeArgs) && !Schema.isSchema(maybeArgs);
117
+ if (!isArgsRecord) {
118
+ const key = name;
119
+ return (effect) => {
120
+ const definition = () => ({
121
+ name,
122
+ key,
123
+ effect: registerKeyWhileRunning(key, effect),
124
+ messageMappers: [],
125
+ });
126
+ brandAsDefinition(definition, name);
127
+ Object.defineProperty(definition, 'Interrupt', {
128
+ value: makeInterruptDefinitionNoArgs(name, key),
129
+ });
130
+ /* eslint-disable-next-line @typescript-eslint/consistent-type-assertions */
131
+ return definition;
132
+ };
133
+ }
134
+ /* eslint-disable-next-line @typescript-eslint/consistent-type-assertions */
135
+ const toKey = maybeToKey;
136
+ const toFullKey = (keyArgs) => `${name}:${toKey(keyArgs)}`;
137
+ return (effectBuilder) => {
138
+ const definition = (args) => {
139
+ const key = toFullKey(args);
140
+ return {
141
+ name,
142
+ args,
143
+ key,
144
+ effect: registerKeyWhileRunning(key, effectBuilder(args)),
145
+ messageMappers: [],
146
+ };
147
+ };
148
+ brandAsDefinition(definition, name);
149
+ Object.defineProperty(definition, 'Interrupt', {
150
+ value: makeInterruptDefinitionWithArgs(name, toFullKey),
151
+ });
152
+ /* eslint-disable-next-line @typescript-eslint/consistent-type-assertions */
153
+ return definition;
154
+ };
155
+ }
@@ -0,0 +1,3 @@
1
+ export type { DefinitionNoArgs, DefinitionWithArgs, InterruptDefinitionNoArgs, InterruptDefinitionWithArgs, } from './index.js';
2
+ export { define, Interrupted, NotFound, Outcome } from './index.js';
3
+ //# sourceMappingURL=public.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../../src/command/interruptible/public.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,gBAAgB,EAChB,kBAAkB,EAClB,yBAAyB,EACzB,2BAA2B,GAC5B,MAAM,YAAY,CAAA;AACnB,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA"}
@@ -0,0 +1 @@
1
+ export { define, Interrupted, NotFound, Outcome } from './index.js';
@@ -1,3 +1,4 @@
1
1
  export type { Command, CommandDefinition, CommandDefinitionNoArgs, CommandDefinitionWithArgs, } from './index.js';
2
2
  export { CommandDefinitionTypeId, define, mapEffect, mapMessage, mapMessages, } from './index.js';
3
+ export * as Interruptible from './interruptible/public.js';
3
4
  //# sourceMappingURL=public.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../src/command/public.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,OAAO,EACP,iBAAiB,EACjB,uBAAuB,EACvB,yBAAyB,GAC1B,MAAM,YAAY,CAAA;AACnB,OAAO,EACL,uBAAuB,EACvB,MAAM,EACN,SAAS,EACT,UAAU,EACV,WAAW,GACZ,MAAM,YAAY,CAAA"}
1
+ {"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../src/command/public.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,OAAO,EACP,iBAAiB,EACjB,uBAAuB,EACvB,yBAAyB,GAC1B,MAAM,YAAY,CAAA;AACnB,OAAO,EACL,uBAAuB,EACvB,MAAM,EACN,SAAS,EACT,UAAU,EACV,WAAW,GACZ,MAAM,YAAY,CAAA;AACnB,OAAO,KAAK,aAAa,MAAM,2BAA2B,CAAA"}
@@ -1 +1,2 @@
1
1
  export { CommandDefinitionTypeId, define, mapEffect, mapMessage, mapMessages, } from './index.js';
2
+ export * as Interruptible from './interruptible/public.js';
@@ -265,7 +265,7 @@ export declare const ResponseReplayed: import("../schema/index.js").CallableTagg
265
265
  }>;
266
266
  /** Response confirming the runtime resumed normal execution. */
267
267
  export declare const ResponseResumed: import("../schema/index.js").CallableTaggedStruct<"ResponseResumed", {}>;
268
- /** Response confirming a Message was dispatched. The `acceptedAtIndex` is the absolute history index where the entry is predicted to land. Computed from the runtime's history length at dispatch time. The Message reaches the runtime's update loop asynchronously, so concurrent Messages produced by the runtime itself could in principle shift ordering; in practice the bridge is the only external dispatch source and the runtime queue serializes Messages, so this index is reliable for correlation. */
268
+ /** Response confirming a Message was dispatched. The `acceptedAtIndex` is the absolute history index where the entry is predicted to land. Computed from the runtime's history length at dispatch time. The runtime processes Messages in arrival order and the bridge is the only external dispatch source, so this index is reliable for correlation. */
269
269
  export declare const ResponseDispatched: import("../schema/index.js").CallableTaggedStruct<"ResponseDispatched", {
270
270
  acceptedAtIndex: S.Number;
271
271
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../../src/devTools/protocol.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,MAAM,IAAI,CAAC,EAAE,MAAM,QAAQ,CAAA;AAM5C,0NAA0N;AAC1N,eAAO,MAAM,iBAAiB;;;EAG5B,CAAA;AACF,2EAA2E;AAC3E,MAAM,MAAM,iBAAiB,GAAG,OAAO,iBAAiB,CAAC,IAAI,CAAA;AAE7D,0MAA0M;AAC1M,eAAO,MAAM,eAAe;;;EAG1B,CAAA;AACF,yFAAyF;AACzF,MAAM,MAAM,eAAe,GAAG,OAAO,eAAe,CAAC,IAAI,CAAA;AAEzD,wfAAwf;AACxf,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;EAa1B,CAAA;AACF,iFAAiF;AACjF,MAAM,MAAM,eAAe,GAAG,OAAO,eAAe,CAAC,IAAI,CAAA;AAEzD,wHAAwH;AACxH,eAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGxB,CAAA;AACF,uEAAuE;AACvE,MAAM,MAAM,aAAa,GAAG,OAAO,aAAa,CAAC,IAAI,CAAA;AAErD,0FAA0F;AAC1F,eAAO,MAAM,UAAU;;;;;;;;;;;EAGrB,CAAA;AACF,uDAAuD;AACvD,MAAM,MAAM,UAAU,GAAG,OAAO,UAAU,CAAC,IAAI,CAAA"}
@@ -165,7 +165,7 @@ export const ResponseReplayed = ts('ResponseReplayed', {
165
165
  });
166
166
  /** Response confirming the runtime resumed normal execution. */
167
167
  export const ResponseResumed = ts('ResponseResumed');
168
- /** Response confirming a Message was dispatched. The `acceptedAtIndex` is the absolute history index where the entry is predicted to land. Computed from the runtime's history length at dispatch time. The Message reaches the runtime's update loop asynchronously, so concurrent Messages produced by the runtime itself could in principle shift ordering; in practice the bridge is the only external dispatch source and the runtime queue serializes Messages, so this index is reliable for correlation. */
168
+ /** Response confirming a Message was dispatched. The `acceptedAtIndex` is the absolute history index where the entry is predicted to land. Computed from the runtime's history length at dispatch time. The runtime processes Messages in arrival order and the bridge is the only external dispatch source, so this index is reliable for correlation. */
169
169
  export const ResponseDispatched = ts('ResponseDispatched', {
170
170
  acceptedAtIndex: S.Number,
171
171
  });