foldkit 0.86.0 → 0.88.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 (154) hide show
  1. package/dist/command/index.d.ts +60 -13
  2. package/dist/command/index.d.ts.map +1 -1
  3. package/dist/command/index.js +41 -16
  4. package/dist/command/public.d.ts +1 -1
  5. package/dist/command/public.d.ts.map +1 -1
  6. package/dist/devTools/overlay.d.ts +44 -20
  7. package/dist/devTools/overlay.d.ts.map +1 -1
  8. package/dist/devTools/overlay.js +120 -79
  9. package/dist/devTools/protocol.d.ts +48 -11
  10. package/dist/devTools/protocol.d.ts.map +1 -1
  11. package/dist/devTools/protocol.js +8 -3
  12. package/dist/devTools/serialize.d.ts +8 -2
  13. package/dist/devTools/serialize.d.ts.map +1 -1
  14. package/dist/devTools/serialize.js +11 -2
  15. package/dist/devTools/store.d.ts +8 -4
  16. package/dist/devTools/store.d.ts.map +1 -1
  17. package/dist/devTools/store.js +6 -6
  18. package/dist/devTools/webSocketBridge.d.ts.map +1 -1
  19. package/dist/devTools/webSocketBridge.js +2 -2
  20. package/dist/{task → dom}/dom.d.ts +10 -10
  21. package/dist/dom/dom.d.ts.map +1 -0
  22. package/dist/{task → dom}/dom.js +15 -15
  23. package/dist/{task → dom}/elementMovement.d.ts +1 -1
  24. package/dist/dom/elementMovement.d.ts.map +1 -0
  25. package/dist/{task → dom}/elementMovement.js +3 -3
  26. package/dist/{task → dom}/error.d.ts +0 -8
  27. package/dist/dom/error.d.ts.map +1 -0
  28. package/dist/{task → dom}/error.js +0 -3
  29. package/dist/dom/index.d.ts +8 -0
  30. package/dist/dom/index.d.ts.map +1 -0
  31. package/dist/dom/index.js +6 -0
  32. package/dist/{task → dom}/inert.d.ts +4 -3
  33. package/dist/dom/inert.d.ts.map +1 -0
  34. package/dist/{task → dom}/inert.js +4 -3
  35. package/dist/dom/public.d.ts +3 -0
  36. package/dist/dom/public.d.ts.map +1 -0
  37. package/dist/dom/public.js +1 -0
  38. package/dist/{task → dom}/scrollLock.d.ts +3 -3
  39. package/dist/dom/scrollLock.d.ts.map +1 -0
  40. package/dist/{task → dom}/scrollLock.js +3 -3
  41. package/dist/dom/waitForAnimation.d.ts +17 -0
  42. package/dist/dom/waitForAnimation.d.ts.map +1 -0
  43. package/dist/dom/waitForAnimation.js +23 -0
  44. package/dist/index.d.ts +2 -1
  45. package/dist/index.d.ts.map +1 -1
  46. package/dist/index.js +2 -1
  47. package/dist/render/index.d.ts +2 -0
  48. package/dist/render/index.d.ts.map +1 -0
  49. package/dist/render/index.js +1 -0
  50. package/dist/render/public.d.ts +2 -0
  51. package/dist/render/public.d.ts.map +1 -0
  52. package/dist/render/public.js +1 -0
  53. package/dist/render/render.d.ts +40 -0
  54. package/dist/render/render.d.ts.map +1 -0
  55. package/dist/render/render.js +48 -0
  56. package/dist/runtime/runtime.d.ts.map +1 -1
  57. package/dist/runtime/runtime.js +12 -5
  58. package/dist/test/apps/counter.d.ts +14 -13
  59. package/dist/test/apps/counter.d.ts.map +1 -1
  60. package/dist/test/apps/counter.js +6 -3
  61. package/dist/test/apps/formChild.d.ts +4 -17
  62. package/dist/test/apps/formChild.d.ts.map +1 -1
  63. package/dist/test/apps/formChild.js +4 -6
  64. package/dist/test/apps/login.d.ts +3 -6
  65. package/dist/test/apps/login.d.ts.map +1 -1
  66. package/dist/test/apps/login.js +2 -3
  67. package/dist/test/apps/resumeUpload.d.ts +9 -7
  68. package/dist/test/apps/resumeUpload.d.ts.map +1 -1
  69. package/dist/test/apps/resumeUpload.js +4 -6
  70. package/dist/test/internal.d.ts +58 -13
  71. package/dist/test/internal.d.ts.map +1 -1
  72. package/dist/test/internal.js +121 -39
  73. package/dist/test/scene.d.ts +14 -3
  74. package/dist/test/scene.d.ts.map +1 -1
  75. package/dist/test/scene.js +21 -15
  76. package/dist/test/story.d.ts +15 -5
  77. package/dist/test/story.d.ts.map +1 -1
  78. package/dist/test/story.js +22 -15
  79. package/dist/ui/animation/update.d.ts +7 -5
  80. package/dist/ui/animation/update.d.ts.map +1 -1
  81. package/dist/ui/animation/update.js +8 -9
  82. package/dist/ui/calendar/index.d.ts +7 -8
  83. package/dist/ui/calendar/index.d.ts.map +1 -1
  84. package/dist/ui/calendar/index.js +8 -11
  85. package/dist/ui/calendar/public.d.ts +1 -1
  86. package/dist/ui/calendar/public.d.ts.map +1 -1
  87. package/dist/ui/calendar/public.js +1 -1
  88. package/dist/ui/combobox/multi.d.ts +1 -0
  89. package/dist/ui/combobox/multi.d.ts.map +1 -1
  90. package/dist/ui/combobox/shared.d.ts +32 -17
  91. package/dist/ui/combobox/shared.d.ts.map +1 -1
  92. package/dist/ui/combobox/shared.js +18 -29
  93. package/dist/ui/combobox/single.d.ts +1 -0
  94. package/dist/ui/combobox/single.d.ts.map +1 -1
  95. package/dist/ui/dialog/index.d.ts +10 -5
  96. package/dist/ui/dialog/index.d.ts.map +1 -1
  97. package/dist/ui/dialog/index.js +12 -11
  98. package/dist/ui/disclosure/index.d.ts +5 -3
  99. package/dist/ui/disclosure/index.d.ts.map +1 -1
  100. package/dist/ui/disclosure/index.js +4 -4
  101. package/dist/ui/dragAndDrop/index.d.ts +14 -7
  102. package/dist/ui/dragAndDrop/index.d.ts.map +1 -1
  103. package/dist/ui/dragAndDrop/index.js +20 -9
  104. package/dist/ui/listbox/multi.d.ts +2 -1
  105. package/dist/ui/listbox/multi.d.ts.map +1 -1
  106. package/dist/ui/listbox/shared.d.ts +41 -22
  107. package/dist/ui/listbox/shared.d.ts.map +1 -1
  108. package/dist/ui/listbox/shared.js +22 -35
  109. package/dist/ui/listbox/single.d.ts +2 -1
  110. package/dist/ui/listbox/single.d.ts.map +1 -1
  111. package/dist/ui/menu/index.d.ts +40 -22
  112. package/dist/ui/menu/index.d.ts.map +1 -1
  113. package/dist/ui/menu/index.js +26 -38
  114. package/dist/ui/popover/index.d.ts +26 -16
  115. package/dist/ui/popover/index.d.ts.map +1 -1
  116. package/dist/ui/popover/index.js +15 -22
  117. package/dist/ui/radioGroup/index.d.ts +6 -3
  118. package/dist/ui/radioGroup/index.d.ts.map +1 -1
  119. package/dist/ui/radioGroup/index.js +6 -11
  120. package/dist/ui/tabs/index.d.ts +6 -3
  121. package/dist/ui/tabs/index.d.ts.map +1 -1
  122. package/dist/ui/tabs/index.js +14 -24
  123. package/dist/ui/toast/index.d.ts +4 -0
  124. package/dist/ui/toast/index.d.ts.map +1 -1
  125. package/dist/ui/toast/update.d.ts +11 -3
  126. package/dist/ui/toast/update.d.ts.map +1 -1
  127. package/dist/ui/toast/update.js +8 -5
  128. package/dist/ui/tooltip/index.d.ts +6 -3
  129. package/dist/ui/tooltip/index.d.ts.map +1 -1
  130. package/dist/ui/tooltip/index.js +2 -5
  131. package/dist/ui/virtualList/index.d.ts +7 -3
  132. package/dist/ui/virtualList/index.d.ts.map +1 -1
  133. package/dist/ui/virtualList/index.js +15 -4
  134. package/package.json +9 -5
  135. package/dist/task/dom.d.ts.map +0 -1
  136. package/dist/task/elementMovement.d.ts.map +0 -1
  137. package/dist/task/error.d.ts.map +0 -1
  138. package/dist/task/index.d.ts +0 -10
  139. package/dist/task/index.d.ts.map +0 -1
  140. package/dist/task/index.js +0 -8
  141. package/dist/task/inert.d.ts.map +0 -1
  142. package/dist/task/public.d.ts +0 -2
  143. package/dist/task/public.d.ts.map +0 -1
  144. package/dist/task/public.js +0 -1
  145. package/dist/task/random.d.ts +0 -21
  146. package/dist/task/random.d.ts.map +0 -1
  147. package/dist/task/random.js +0 -20
  148. package/dist/task/scrollLock.d.ts.map +0 -1
  149. package/dist/task/time.d.ts +0 -43
  150. package/dist/task/time.d.ts.map +0 -1
  151. package/dist/task/time.js +0 -53
  152. package/dist/task/timing.d.ts +0 -62
  153. package/dist/task/timing.d.ts.map +0 -1
  154. package/dist/task/timing.js +0 -77
@@ -1,10 +1,20 @@
1
1
  import { Schema as S } from 'effect';
2
+ /** A serialized Command produced during a Message dispatch (or `init`). `args` is `Some` when the Command's definition declared an args record, and carries the runtime values used to construct the Command instance. */
3
+ export declare const SerializedCommand: S.Struct<{
4
+ readonly name: S.String;
5
+ readonly args: S.OptionFromNullOr<S.$Record<S.String, S.Unknown>>;
6
+ }>;
7
+ /** A serialized Command suitable for transmission over the WS protocol. */
8
+ export type SerializedCommand = typeof SerializedCommand.Type;
2
9
  /** A serialized history entry as it appears on the wire. `submodelPath` lists `Got<Child>Message` wrapper tags from outer to inner when the entry came up through a Submodel chain; `maybeLeafTag` is `Some` with the innermost child Message tag when one exists. `mountStartNames` lists Mounts that fired during the render after this Message; `mountEndNames` lists Mounts whose elements were unmounted during that render. The Messages dispatched by mount Effects appear as their own entries elsewhere in history. */
3
10
  export declare const SerializedEntry: S.Struct<{
4
11
  readonly index: S.Number;
5
12
  readonly tag: S.String;
6
13
  readonly message: S.Unknown;
7
- readonly commandNames: S.$Array<S.String>;
14
+ readonly commands: S.$Array<S.Struct<{
15
+ readonly name: S.String;
16
+ readonly args: S.OptionFromNullOr<S.$Record<S.String, S.Unknown>>;
17
+ }>>;
8
18
  readonly mountStartNames: S.$Array<S.String>;
9
19
  readonly mountEndNames: S.$Array<S.String>;
10
20
  readonly timestamp: S.Number;
@@ -100,7 +110,10 @@ export declare const ResponseMessages: import("../schema/index.js").CallableTagg
100
110
  readonly index: S.Number;
101
111
  readonly tag: S.String;
102
112
  readonly message: S.Unknown;
103
- readonly commandNames: S.$Array<S.String>;
113
+ readonly commands: S.$Array<S.Struct<{
114
+ readonly name: S.String;
115
+ readonly args: S.OptionFromNullOr<S.$Record<S.String, S.Unknown>>;
116
+ }>>;
104
117
  readonly mountStartNames: S.$Array<S.String>;
105
118
  readonly mountEndNames: S.$Array<S.String>;
106
119
  readonly timestamp: S.Number;
@@ -118,7 +131,10 @@ export declare const ResponseMessage: import("../schema/index.js").CallableTagge
118
131
  readonly index: S.Number;
119
132
  readonly tag: S.String;
120
133
  readonly message: S.Unknown;
121
- readonly commandNames: S.$Array<S.String>;
134
+ readonly commands: S.$Array<S.Struct<{
135
+ readonly name: S.String;
136
+ readonly args: S.OptionFromNullOr<S.$Record<S.String, S.Unknown>>;
137
+ }>>;
122
138
  readonly mountStartNames: S.$Array<S.String>;
123
139
  readonly mountEndNames: S.$Array<S.String>;
124
140
  readonly timestamp: S.Number;
@@ -153,10 +169,13 @@ export declare const ResponseRuntimes: import("../schema/index.js").CallableTagg
153
169
  readonly title: S.String;
154
170
  }>>;
155
171
  }>;
156
- /** Response carrying the recorded init data. `maybeModel` is `None` until the runtime has finished its first render and recorded init; once set it stays set for the rest of the runtime's life. `commandNames` lists the Commands returned from the application's `init` function in the order they were produced. `mountStartNames` lists the Mounts that fired during the initial render. */
172
+ /** Response carrying the recorded init data. `maybeModel` is `None` until the runtime has finished its first render and recorded init; once set it stays set for the rest of the runtime's life. `commands` lists the Commands returned from the application's `init` function in the order they were produced, with their args when declared. `mountStartNames` lists the Mounts that fired during the initial render. */
157
173
  export declare const ResponseInit: import("../schema/index.js").CallableTaggedStruct<"ResponseInit", {
158
174
  maybeModel: S.OptionFromNullOr<S.Unknown>;
159
- commandNames: S.$Array<S.String>;
175
+ commands: S.$Array<S.Struct<{
176
+ readonly name: S.String;
177
+ readonly args: S.OptionFromNullOr<S.$Record<S.String, S.Unknown>>;
178
+ }>>;
160
179
  mountStartNames: S.$Array<S.String>;
161
180
  }>;
162
181
  /** Response carrying a snapshot of the runtime's DevTools state. `currentIndex` is the absolute index of the most recently recorded Message, or -1 when no Messages have been recorded yet. `startIndex` is the earliest absolute index still retained in the rolling buffer (older entries are evicted past `maxEntries`). `totalEntries` is the number of retained entries. `isPaused` is true while the runtime is paused at a replayed snapshot; `maybePausedAtIndex` is `Some(index)` then and `None` otherwise. `hasInitModel` is true once the runtime has finished initialising. */
@@ -182,7 +201,10 @@ export declare const Response: S.Union<readonly [import("../schema/index.js").Ca
182
201
  readonly index: S.Number;
183
202
  readonly tag: S.String;
184
203
  readonly message: S.Unknown;
185
- readonly commandNames: S.$Array<S.String>;
204
+ readonly commands: S.$Array<S.Struct<{
205
+ readonly name: S.String;
206
+ readonly args: S.OptionFromNullOr<S.$Record<S.String, S.Unknown>>;
207
+ }>>;
186
208
  readonly mountStartNames: S.$Array<S.String>;
187
209
  readonly mountEndNames: S.$Array<S.String>;
188
210
  readonly timestamp: S.Number;
@@ -198,7 +220,10 @@ export declare const Response: S.Union<readonly [import("../schema/index.js").Ca
198
220
  readonly index: S.Number;
199
221
  readonly tag: S.String;
200
222
  readonly message: S.Unknown;
201
- readonly commandNames: S.$Array<S.String>;
223
+ readonly commands: S.$Array<S.Struct<{
224
+ readonly name: S.String;
225
+ readonly args: S.OptionFromNullOr<S.$Record<S.String, S.Unknown>>;
226
+ }>>;
202
227
  readonly mountStartNames: S.$Array<S.String>;
203
228
  readonly mountEndNames: S.$Array<S.String>;
204
229
  readonly timestamp: S.Number;
@@ -224,7 +249,10 @@ export declare const Response: S.Union<readonly [import("../schema/index.js").Ca
224
249
  }>>;
225
250
  }>, import("../schema/index.js").CallableTaggedStruct<"ResponseInit", {
226
251
  maybeModel: S.OptionFromNullOr<S.Unknown>;
227
- commandNames: S.$Array<S.String>;
252
+ commands: S.$Array<S.Struct<{
253
+ readonly name: S.String;
254
+ readonly args: S.OptionFromNullOr<S.$Record<S.String, S.Unknown>>;
255
+ }>>;
228
256
  mountStartNames: S.$Array<S.String>;
229
257
  }>, import("../schema/index.js").CallableTaggedStruct<"ResponseRuntimeState", {
230
258
  currentIndex: S.Number;
@@ -298,7 +326,10 @@ export declare const ResponseFrame: S.Struct<{
298
326
  readonly index: S.Number;
299
327
  readonly tag: S.String;
300
328
  readonly message: S.Unknown;
301
- readonly commandNames: S.$Array<S.String>;
329
+ readonly commands: S.$Array<S.Struct<{
330
+ readonly name: S.String;
331
+ readonly args: S.OptionFromNullOr<S.$Record<S.String, S.Unknown>>;
332
+ }>>;
302
333
  readonly mountStartNames: S.$Array<S.String>;
303
334
  readonly mountEndNames: S.$Array<S.String>;
304
335
  readonly timestamp: S.Number;
@@ -314,7 +345,10 @@ export declare const ResponseFrame: S.Struct<{
314
345
  readonly index: S.Number;
315
346
  readonly tag: S.String;
316
347
  readonly message: S.Unknown;
317
- readonly commandNames: S.$Array<S.String>;
348
+ readonly commands: S.$Array<S.Struct<{
349
+ readonly name: S.String;
350
+ readonly args: S.OptionFromNullOr<S.$Record<S.String, S.Unknown>>;
351
+ }>>;
318
352
  readonly mountStartNames: S.$Array<S.String>;
319
353
  readonly mountEndNames: S.$Array<S.String>;
320
354
  readonly timestamp: S.Number;
@@ -340,7 +374,10 @@ export declare const ResponseFrame: S.Struct<{
340
374
  }>>;
341
375
  }>, import("../schema/index.js").CallableTaggedStruct<"ResponseInit", {
342
376
  maybeModel: S.OptionFromNullOr<S.Unknown>;
343
- commandNames: S.$Array<S.String>;
377
+ commands: S.$Array<S.Struct<{
378
+ readonly name: S.String;
379
+ readonly args: S.OptionFromNullOr<S.$Record<S.String, S.Unknown>>;
380
+ }>>;
344
381
  mountStartNames: S.$Array<S.String>;
345
382
  }>, import("../schema/index.js").CallableTaggedStruct<"ResponseRuntimeState", {
346
383
  currentIndex: S.Number;
@@ -1 +1 @@
1
- {"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../../src/devTools/protocol.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC,EAAE,MAAM,QAAQ,CAAA;AAMpC,ggBAAggB;AAChgB,eAAO,MAAM,eAAe;;;;;;;;;;;;;EAa1B,CAAA;AACF,iFAAiF;AACjF,MAAM,MAAM,eAAe,GAAG,OAAO,eAAe,CAAC,IAAI,CAAA;AAEzD,wHAAwH;AACxH,eAAO,MAAM,YAAY;;EAEvB,CAAA;AACF,wCAAwC;AACxC,MAAM,MAAM,YAAY,GAAG,OAAO,YAAY,CAAC,IAAI,CAAA;AAEnD,kDAAkD;AAClD,eAAO,MAAM,WAAW;;;;EAItB,CAAA;AACF,kDAAkD;AAClD,MAAM,MAAM,WAAW,GAAG,OAAO,WAAW,CAAC,IAAI,CAAA;AAIjD,yFA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AIrC,0NAA0N;AAC1N,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;EAIvB,CAAA;AACF,2DAA2D;AAC3D,MAAM,MAAM,YAAY,GAAG,OAAO,YAAY,CAAC,IAAI,CAAA;AAEnD,uEAAuE;AACvE,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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"}
@@ -1,12 +1,17 @@
1
1
  import { Schema as S } from 'effect';
2
2
  import { ts } from '../schema/index.js';
3
3
  // SHARED
4
+ /** A serialized Command produced during a Message dispatch (or `init`). `args` is `Some` when the Command's definition declared an args record, and carries the runtime values used to construct the Command instance. */
5
+ export const SerializedCommand = S.Struct({
6
+ name: S.String,
7
+ args: S.OptionFromNullOr(S.Record(S.String, S.Unknown)),
8
+ });
4
9
  /** A serialized history entry as it appears on the wire. `submodelPath` lists `Got<Child>Message` wrapper tags from outer to inner when the entry came up through a Submodel chain; `maybeLeafTag` is `Some` with the innermost child Message tag when one exists. `mountStartNames` lists Mounts that fired during the render after this Message; `mountEndNames` lists Mounts whose elements were unmounted during that render. The Messages dispatched by mount Effects appear as their own entries elsewhere in history. */
5
10
  export const SerializedEntry = S.Struct({
6
11
  index: S.Number,
7
12
  tag: S.String,
8
13
  message: S.Unknown,
9
- commandNames: S.Array(S.String),
14
+ commands: S.Array(SerializedCommand),
10
15
  mountStartNames: S.Array(S.String),
11
16
  mountEndNames: S.Array(S.String),
12
17
  timestamp: S.Number,
@@ -113,10 +118,10 @@ export const ResponseDispatched = ts('ResponseDispatched', {
113
118
  export const ResponseRuntimes = ts('ResponseRuntimes', {
114
119
  runtimes: S.Array(RuntimeInfo),
115
120
  });
116
- /** Response carrying the recorded init data. `maybeModel` is `None` until the runtime has finished its first render and recorded init; once set it stays set for the rest of the runtime's life. `commandNames` lists the Commands returned from the application's `init` function in the order they were produced. `mountStartNames` lists the Mounts that fired during the initial render. */
121
+ /** Response carrying the recorded init data. `maybeModel` is `None` until the runtime has finished its first render and recorded init; once set it stays set for the rest of the runtime's life. `commands` lists the Commands returned from the application's `init` function in the order they were produced, with their args when declared. `mountStartNames` lists the Mounts that fired during the initial render. */
117
122
  export const ResponseInit = ts('ResponseInit', {
118
123
  maybeModel: S.OptionFromNullOr(S.Unknown),
119
- commandNames: S.Array(S.String),
124
+ commands: S.Array(SerializedCommand),
120
125
  mountStartNames: S.Array(S.String),
121
126
  });
122
127
  /** Response carrying a snapshot of the runtime's DevTools state. `currentIndex` is the absolute index of the most recently recorded Message, or -1 when no Messages have been recorded yet. `startIndex` is the earliest absolute index still retained in the rolling buffer (older entries are evicted past `maxEntries`). `totalEntries` is the number of retained entries. `isPaused` is true while the runtime is paused at a replayed snapshot; `maybePausedAtIndex` is `Some(index)` then and `None` otherwise. `hasInitModel` is true once the runtime has finished initialising. */
@@ -1,5 +1,5 @@
1
- import type { SerializedEntry } from './protocol.js';
2
- import type { HistoryEntry } from './store.js';
1
+ import type { SerializedCommand, SerializedEntry } from './protocol.js';
2
+ import type { CommandRecord, HistoryEntry } from './store.js';
3
3
  /**
4
4
  * Convert DOM-class instances (File, Blob, Date, URL) to plain-object
5
5
  * representations so the tree renderer's key-enumeration walk can see their
@@ -19,6 +19,12 @@ import type { HistoryEntry } from './store.js';
19
19
  * row lazy actually hits.
20
20
  */
21
21
  export declare const toInspectableValue: (value: unknown) => unknown;
22
+ /**
23
+ * Convert a runtime `CommandRecord` to its wire shape. Args are wrapped in an
24
+ * `Option` so `None` cleanly distinguishes argless Commands from Commands that
25
+ * happen to have an empty args record.
26
+ */
27
+ export declare const toSerializedCommand: (command: CommandRecord) => SerializedCommand;
22
28
  /**
23
29
  * Convert a `HistoryEntry` plus its absolute index into the wire-friendly
24
30
  * `SerializedEntry` shape. Flattens the diff's `HashSet` path collections to
@@ -1 +1 @@
1
- {"version":3,"file":"serialize.d.ts","sourceRoot":"","sources":["../../src/devTools/serialize.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AACpD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAwB9C;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,kBAAkB,GAAI,OAAO,OAAO,KAAG,OAUnD,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,GAC5B,OAAO,YAAY,EACnB,OAAO,MAAM,KACZ,eAoBF,CAAA"}
1
+ {"version":3,"file":"serialize.d.ts","sourceRoot":"","sources":["../../src/devTools/serialize.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AACvE,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAwB7D;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,kBAAkB,GAAI,OAAO,OAAO,KAAG,OAUnD,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,GAC9B,SAAS,aAAa,KACrB,iBAGD,CAAA;AAEF;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,GAC5B,OAAO,YAAY,EACnB,OAAO,MAAM,KACZ,eAoBF,CAAA"}
@@ -1,4 +1,4 @@
1
- import { Array as Array_, Function, Match as M, Predicate, Record, } from 'effect';
1
+ import { Array as Array_, Function, Match as M, Option, Predicate, Record, } from 'effect';
2
2
  import { extractSubmodelInfo } from './submodelPath.js';
3
3
  const inspectableCache = new WeakMap();
4
4
  const computeInspectableValue = (value) => M.value(value).pipe(M.when(M.instanceOf(File), file => ({
@@ -39,6 +39,15 @@ export const toInspectableValue = (value) => {
39
39
  inspectableCache.set(value, result);
40
40
  return result;
41
41
  };
42
+ /**
43
+ * Convert a runtime `CommandRecord` to its wire shape. Args are wrapped in an
44
+ * `Option` so `None` cleanly distinguishes argless Commands from Commands that
45
+ * happen to have an empty args record.
46
+ */
47
+ export const toSerializedCommand = (command) => ({
48
+ name: command.name,
49
+ args: Option.fromNullishOr(command.args),
50
+ });
42
51
  /**
43
52
  * Convert a `HistoryEntry` plus its absolute index into the wire-friendly
44
53
  * `SerializedEntry` shape. Flattens the diff's `HashSet` path collections to
@@ -51,7 +60,7 @@ export const toSerializedEntry = (entry, index) => {
51
60
  index,
52
61
  tag: entry.tag,
53
62
  message: toInspectableValue(entry.message),
54
- commandNames: entry.commandNames,
63
+ commands: Array_.map(entry.commands, toSerializedCommand),
55
64
  mountStartNames: entry.mountStartNames,
56
65
  mountEndNames: entry.mountEndNames,
57
66
  timestamp: entry.timestamp,
@@ -6,10 +6,14 @@ export type DiffResult = Readonly<{
6
6
  }>;
7
7
  export declare const emptyDiff: DiffResult;
8
8
  export declare const computeDiff: (previous: unknown, current: unknown) => DiffResult;
9
+ export type CommandRecord = Readonly<{
10
+ name: string;
11
+ args?: Record<string, unknown>;
12
+ }>;
9
13
  export type HistoryEntry = Readonly<{
10
14
  tag: string;
11
15
  message: unknown;
12
- commandNames: ReadonlyArray<string>;
16
+ commands: ReadonlyArray<CommandRecord>;
13
17
  mountStartNames: ReadonlyArray<string>;
14
18
  mountEndNames: ReadonlyArray<string>;
15
19
  timestamp: number;
@@ -20,7 +24,7 @@ export type StoreState = Readonly<{
20
24
  entries: ReadonlyArray<HistoryEntry>;
21
25
  keyframes: HashMap.HashMap<number, unknown>;
22
26
  maybeInitModel: Option.Option<unknown>;
23
- initCommandNames: ReadonlyArray<string>;
27
+ initCommands: ReadonlyArray<CommandRecord>;
24
28
  initMountStartNames: ReadonlyArray<string>;
25
29
  startIndex: number;
26
30
  isPaused: boolean;
@@ -34,10 +38,10 @@ export type Bridge = Readonly<{
34
38
  }>;
35
39
  export declare const createDevToolsStore: (bridge: Bridge, maxEntries?: number) => Effect.Effect<DevToolsStore>;
36
40
  export type DevToolsStore = Readonly<{
37
- recordInit: (model: unknown, commandNames: ReadonlyArray<string>, mountStartNames?: ReadonlyArray<string>) => Effect.Effect<void>;
41
+ recordInit: (model: unknown, commands: ReadonlyArray<CommandRecord>, mountStartNames?: ReadonlyArray<string>) => Effect.Effect<void>;
38
42
  recordMessage: (message: Readonly<{
39
43
  _tag: string;
40
- }>, modelBeforeUpdate: unknown, modelAfterUpdate: unknown, commandNames: ReadonlyArray<string>, isModelChanged: boolean) => Effect.Effect<void>;
44
+ }>, modelBeforeUpdate: unknown, modelAfterUpdate: unknown, commands: ReadonlyArray<CommandRecord>, isModelChanged: boolean) => Effect.Effect<void>;
41
45
  attachRenderedMounts: (mountStartNames: ReadonlyArray<string>, mountEndNames: ReadonlyArray<string>) => Effect.Effect<void>;
42
46
  getModelAtIndex: (index: number) => Effect.Effect<unknown>;
43
47
  getMessageAtIndex: (index: number) => Effect.Effect<Option.Option<unknown>>;
@@ -1 +1 @@
1
- {"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../src/devTools/store.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,MAAM,EACN,OAAO,EACP,OAAO,EAEP,MAAM,EAIN,eAAe,EAEhB,MAAM,QAAQ,CAAA;AAEf,eAAO,MAAM,UAAU,KAAK,CAAA;AAM5B,MAAM,MAAM,UAAU,GAAG,QAAQ,CAAC;IAChC,YAAY,EAAE,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAA;IACrC,aAAa,EAAE,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAA;CACvC,CAAC,CAAA;AAEF,eAAO,MAAM,SAAS,EAAE,UAGvB,CAAA;AAID,eAAO,MAAM,WAAW,GACtB,UAAU,OAAO,EACjB,SAAS,OAAO,KACf,UA6EF,CAAA;AAID,MAAM,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B,eAAe,EAAE,aAAa,CAAC,MAAM,CAAC,EACtC,aAAa,EAAE,aAAa,CAAC,MAAM,CAAC,KACjC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;IACxB,eAAe,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAA;IAC1D,iBAAiB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAA;IAC3E,cAAc,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAA;IAC5D,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;IAC9C,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;IAC3B,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;IAC1B,QAAQ,EAAE,eAAe,CAAC,eAAe,CAAC,UAAU,CAAC,CAAA;CACtD,CAAC,CAAA"}
@@ -67,7 +67,7 @@ const emptyState = {
67
67
  entries: [],
68
68
  keyframes: HashMap.empty(),
69
69
  maybeInitModel: Option.none(),
70
- initCommandNames: [],
70
+ initCommands: [],
71
71
  initMountStartNames: [],
72
72
  startIndex: 0,
73
73
  isPaused: false,
@@ -98,15 +98,15 @@ export const createDevToolsStore = (bridge, maxEntries = DEFAULT_MAX_ENTRIES) =>
98
98
  isPaused: state.isPaused && isPausedAtRetainedIndex,
99
99
  };
100
100
  };
101
- const recordInit = (model, commandNames, mountStartNames = []) => SubscriptionRef.update(stateRef, state => ({
101
+ const recordInit = (model, commands, mountStartNames = []) => SubscriptionRef.update(stateRef, state => ({
102
102
  ...state,
103
103
  maybeInitModel: Option.some(model),
104
- initCommandNames: commandNames,
104
+ initCommands: commands,
105
105
  initMountStartNames: mountStartNames,
106
106
  keyframes: HashMap.set(state.keyframes, 0, model),
107
107
  maybeLatestModel: Option.some(model),
108
108
  }));
109
- const recordMessage = (message, modelBeforeUpdate, modelAfterUpdate, commandNames, isModelChanged) => SubscriptionRef.update(stateRef, state => {
109
+ const recordMessage = (message, modelBeforeUpdate, modelAfterUpdate, commands, isModelChanged) => SubscriptionRef.update(stateRef, state => {
110
110
  const absoluteIndex = state.startIndex + state.entries.length;
111
111
  const diff = isModelChanged
112
112
  ? computeDiff(modelBeforeUpdate, modelAfterUpdate)
@@ -117,7 +117,7 @@ export const createDevToolsStore = (bridge, maxEntries = DEFAULT_MAX_ENTRIES) =>
117
117
  entries: Array.append(state.entries, {
118
118
  tag: message._tag,
119
119
  message,
120
- commandNames,
120
+ commands,
121
121
  mountStartNames: [],
122
122
  mountEndNames: [],
123
123
  timestamp: performance.now(),
@@ -197,7 +197,7 @@ export const createDevToolsStore = (bridge, maxEntries = DEFAULT_MAX_ENTRIES) =>
197
197
  const clear = SubscriptionRef.update(stateRef, state => ({
198
198
  ...emptyState,
199
199
  maybeInitModel: state.maybeInitModel,
200
- initCommandNames: state.initCommandNames,
200
+ initCommands: state.initCommands,
201
201
  initMountStartNames: state.initMountStartNames,
202
202
  keyframes: Option.match(state.maybeInitModel, {
203
203
  onNone: () => HashMap.empty(),
@@ -1 +1 @@
1
- {"version":3,"file":"webSocketBridge.d.ts","sourceRoot":"","sources":["../../src/devTools/webSocketBridge.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,MAAM,EAIN,MAAM,EAEN,MAAM,IAAI,CAAC,EAGZ,MAAM,QAAQ,CAAA;AA0Bf,OAAO,EAAE,KAAK,aAAa,EAAc,MAAM,YAAY,CAAA;AAQ3D,KAAK,GAAG,GAAG,WAAW,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAA;AAczC;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,oBAAoB,GAC/B,OAAO,aAAa,EACpB,KAAK,GAAG,EACR,UAAU,CAAC,OAAO,EAAE,OAAO,KAAK,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,EACnD,oBAAoB,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,KACnD,MAAM,CAAC,MAAM,CAAC,IAAI,CA+EjB,CAAA"}
1
+ {"version":3,"file":"webSocketBridge.d.ts","sourceRoot":"","sources":["../../src/devTools/webSocketBridge.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,MAAM,EAIN,MAAM,EAEN,MAAM,IAAI,CAAC,EAGZ,MAAM,QAAQ,CAAA;AA8Bf,OAAO,EAAE,KAAK,aAAa,EAAc,MAAM,YAAY,CAAA;AAQ3D,KAAK,GAAG,GAAG,WAAW,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAA;AAczC;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,oBAAoB,GAC/B,OAAO,aAAa,EACpB,KAAK,GAAG,EACR,UAAU,CAAC,OAAO,EAAE,OAAO,KAAK,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,EACnD,oBAAoB,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,KACnD,MAAM,CAAC,MAAM,CAAC,IAAI,CA+EjB,CAAA"}
@@ -1,7 +1,7 @@
1
1
  import { Array, Cause, Effect, Exit, HashMap, Match, Option, Order, Schema as S, SubscriptionRef, pipe, } from 'effect';
2
2
  import { OptionExt } from '../effectExtensions/index.js';
3
3
  import { EventConnected, EventDisconnected, EventFrame, KeyframeInfo, RequestFrame, ResponseDispatched, ResponseError, ResponseFrame, ResponseInit, ResponseKeyframes, ResponseMessage, ResponseMessages, ResponseModel, ResponseReplayed, ResponseResumed, ResponseRuntimeState, RuntimeInfo, } from './protocol.js';
4
- import { toInspectableValue, toSerializedEntry } from './serialize.js';
4
+ import { toInspectableValue, toSerializedCommand, toSerializedEntry, } from './serialize.js';
5
5
  import { INIT_INDEX } from './store.js';
6
6
  import { formatPathNotFound, resolvePath, summarizeValue, } from './summarize.js';
7
7
  const REQUEST_CHANNEL = 'foldkit:devTools:request';
@@ -168,7 +168,7 @@ const dispatchRequest = (store, dispatch, maybeMessageSchema, request) => Match.
168
168
  const state = yield* SubscriptionRef.get(store.stateRef);
169
169
  return ResponseInit({
170
170
  maybeModel: Option.map(state.maybeInitModel, toInspectableValue),
171
- commandNames: state.initCommandNames,
171
+ commands: Array.map(state.initCommands, toSerializedCommand),
172
172
  mountStartNames: state.initMountStartNames,
173
173
  });
174
174
  }),
@@ -4,7 +4,7 @@ import { ElementNotFound } from './error.js';
4
4
  * Focuses an element matching the given selector after the next render has
5
5
  * committed.
6
6
  *
7
- * Use `Task.focus` inside a Command for focus that's caused by a Message
7
+ * Use `Dom.focus` inside a Command for focus that's caused by a Message
8
8
  * dispatching: a dialog opening, an input becoming the active step in a
9
9
  * form, returning focus to a trigger button after a popover closes,
10
10
  * keyboard navigation across a stable layout. The Command fires from
@@ -20,14 +20,14 @@ import { ElementNotFound } from './error.js';
20
20
  *
21
21
  * @example
22
22
  * ```typescript
23
- * Task.focus('#email-input').pipe(Effect.ignore, Effect.as(CompletedFocusInput()))
23
+ * Dom.focus('#email-input').pipe(Effect.ignore, Effect.as(CompletedFocusInput()))
24
24
  * ```
25
25
  */
26
26
  export declare const focus: (selector: string) => Effect.Effect<void, ElementNotFound>;
27
27
  /**
28
28
  * Opens a dialog element using `show()` with high z-index, focus trapping,
29
29
  * and Escape key handling. Uses `show()` instead of `showModal()` so that
30
- * DevTools (and any other high-z-index overlay) remains interactive — the
30
+ * DevTools (and any other high-z-index overlay) remains interactive. The
31
31
  * Dialog component provides its own backdrop, scroll locking, and transitions.
32
32
  * Fails with `ElementNotFound` if the selector does not match an `HTMLDialogElement`.
33
33
  *
@@ -35,8 +35,8 @@ export declare const focus: (selector: string) => Effect.Effect<void, ElementNot
35
35
  *
36
36
  * @example
37
37
  * ```typescript
38
- * Task.showModal('#my-dialog').pipe(Effect.ignore, Effect.as(CompletedShowDialog()))
39
- * Task.showModal('#my-dialog', { focusSelector: '#search-input' }).pipe(Effect.ignore, Effect.as(CompletedShowDialog()))
38
+ * Dom.showModal('#my-dialog').pipe(Effect.ignore, Effect.as(CompletedShowDialog()))
39
+ * Dom.showModal('#my-dialog', { focusSelector: '#search-input' }).pipe(Effect.ignore, Effect.as(CompletedShowDialog()))
40
40
  * ```
41
41
  */
42
42
  export declare const showModal: (selector: string, options?: Readonly<{
@@ -49,7 +49,7 @@ export declare const showModal: (selector: string, options?: Readonly<{
49
49
  *
50
50
  * @example
51
51
  * ```typescript
52
- * Task.closeModal('#my-dialog').pipe(Effect.ignore, Effect.as(CompletedCloseDialog()))
52
+ * Dom.closeModal('#my-dialog').pipe(Effect.ignore, Effect.as(CompletedCloseDialog()))
53
53
  * ```
54
54
  */
55
55
  export declare const closeModal: (selector: string) => Effect.Effect<void, ElementNotFound>;
@@ -59,7 +59,7 @@ export declare const closeModal: (selector: string) => Effect.Effect<void, Eleme
59
59
  *
60
60
  * @example
61
61
  * ```typescript
62
- * Task.clickElement('#menu-item-2').pipe(Effect.ignore, Effect.as(CompletedClickItem()))
62
+ * Dom.clickElement('#menu-item-2').pipe(Effect.ignore, Effect.as(CompletedClickItem()))
63
63
  * ```
64
64
  */
65
65
  export declare const clickElement: (selector: string) => Effect.Effect<void, ElementNotFound>;
@@ -69,11 +69,11 @@ export declare const clickElement: (selector: string) => Effect.Effect<void, Ele
69
69
  *
70
70
  * @example
71
71
  * ```typescript
72
- * Task.scrollIntoView('#active-item').pipe(Effect.ignore, Effect.as(CompletedScrollIntoView()))
72
+ * Dom.scrollIntoView('#active-item').pipe(Effect.ignore, Effect.as(CompletedScrollIntoView()))
73
73
  * ```
74
74
  */
75
75
  export declare const scrollIntoView: (selector: string) => Effect.Effect<void, ElementNotFound>;
76
- /** Direction for focus advancement forward or backward in tab order. */
76
+ /** Direction for focus advancement: forward or backward in tab order. */
77
77
  export type FocusDirection = 'Next' | 'Previous';
78
78
  /**
79
79
  * Focuses the next or previous focusable element in the document relative to the element matching the given selector.
@@ -81,7 +81,7 @@ export type FocusDirection = 'Next' | 'Previous';
81
81
  *
82
82
  * @example
83
83
  * ```typescript
84
- * Task.advanceFocus('#menu-button', 'Next').pipe(Effect.ignore, Effect.as(CompletedAdvanceFocus()))
84
+ * Dom.advanceFocus('#menu-button', 'Next').pipe(Effect.ignore, Effect.as(CompletedAdvanceFocus()))
85
85
  * ```
86
86
  */
87
87
  export declare const advanceFocus: (selector: string, direction: FocusDirection) => Effect.Effect<void, ElementNotFound>;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dom.d.ts","sourceRoot":"","sources":["../../src/dom/dom.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,MAAM,EAMP,MAAM,QAAQ,CAAA;AAGf,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AA6B5C;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,KAAK,GAAI,UAAU,MAAM,KAAG,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,eAAe,CAKxE,CAAA;AAEJ;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,SAAS,GACpB,UAAU,MAAM,EAChB,UAAU,QAAQ,CAAC;IAAE,aAAa,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,KAC7C,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,eAAe,CAgDlC,CAAA;AAuBJ;;;;;;;;;GASG;AACH,eAAO,MAAM,UAAU,GACrB,UAAU,MAAM,KACf,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,eAAe,CAclC,CAAA;AAEJ;;;;;;;;GAQG;AACH,eAAO,MAAM,YAAY,GACvB,UAAU,MAAM,KACf,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,eAAe,CAKlC,CAAA;AAEJ;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc,GACzB,UAAU,MAAM,KACf,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,eAAe,CAKlC,CAAA;AAEJ,yEAAyE;AACzE,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,UAAU,CAAA;AAEhD;;;;;;;;GAQG;AACH,eAAO,MAAM,YAAY,GACvB,UAAU,MAAM,EAChB,WAAW,cAAc,KACxB,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,eAAe,CAiClC,CAAA"}
@@ -1,6 +1,6 @@
1
1
  import { Array, Effect, Equal, Function, Match as M, Number, Option, } from 'effect';
2
+ import { afterCommit } from '../render/render.js';
2
3
  import { ElementNotFound } from './error.js';
3
- import { afterRender } from './timing.js';
4
4
  const BASE_DIALOG_Z_INDEX = 2147483600;
5
5
  let openDialogCount = 0;
6
6
  const dialogCleanups = new WeakMap();
@@ -22,7 +22,7 @@ const queryHTMLElement = (selector) => Effect.suspend(() => {
22
22
  * Focuses an element matching the given selector after the next render has
23
23
  * committed.
24
24
  *
25
- * Use `Task.focus` inside a Command for focus that's caused by a Message
25
+ * Use `Dom.focus` inside a Command for focus that's caused by a Message
26
26
  * dispatching: a dialog opening, an input becoming the active step in a
27
27
  * form, returning focus to a trigger button after a popover closes,
28
28
  * keyboard navigation across a stable layout. The Command fires from
@@ -38,18 +38,18 @@ const queryHTMLElement = (selector) => Effect.suspend(() => {
38
38
  *
39
39
  * @example
40
40
  * ```typescript
41
- * Task.focus('#email-input').pipe(Effect.ignore, Effect.as(CompletedFocusInput()))
41
+ * Dom.focus('#email-input').pipe(Effect.ignore, Effect.as(CompletedFocusInput()))
42
42
  * ```
43
43
  */
44
44
  export const focus = (selector) => Effect.gen(function* () {
45
- yield* afterRender;
45
+ yield* afterCommit;
46
46
  const element = yield* queryHTMLElement(selector);
47
47
  element.focus();
48
48
  });
49
49
  /**
50
50
  * Opens a dialog element using `show()` with high z-index, focus trapping,
51
51
  * and Escape key handling. Uses `show()` instead of `showModal()` so that
52
- * DevTools (and any other high-z-index overlay) remains interactive — the
52
+ * DevTools (and any other high-z-index overlay) remains interactive. The
53
53
  * Dialog component provides its own backdrop, scroll locking, and transitions.
54
54
  * Fails with `ElementNotFound` if the selector does not match an `HTMLDialogElement`.
55
55
  *
@@ -57,12 +57,12 @@ export const focus = (selector) => Effect.gen(function* () {
57
57
  *
58
58
  * @example
59
59
  * ```typescript
60
- * Task.showModal('#my-dialog').pipe(Effect.ignore, Effect.as(CompletedShowDialog()))
61
- * Task.showModal('#my-dialog', { focusSelector: '#search-input' }).pipe(Effect.ignore, Effect.as(CompletedShowDialog()))
60
+ * Dom.showModal('#my-dialog').pipe(Effect.ignore, Effect.as(CompletedShowDialog()))
61
+ * Dom.showModal('#my-dialog', { focusSelector: '#search-input' }).pipe(Effect.ignore, Effect.as(CompletedShowDialog()))
62
62
  * ```
63
63
  */
64
64
  export const showModal = (selector, options) => Effect.gen(function* () {
65
- yield* afterRender;
65
+ yield* afterCommit;
66
66
  const element = document.querySelector(selector);
67
67
  if (!(element instanceof HTMLDialogElement)) {
68
68
  return yield* Effect.fail(new ElementNotFound({ selector }));
@@ -117,7 +117,7 @@ const trapFocusWithinDialog = (event, dialog) => {
117
117
  *
118
118
  * @example
119
119
  * ```typescript
120
- * Task.closeModal('#my-dialog').pipe(Effect.ignore, Effect.as(CompletedCloseDialog()))
120
+ * Dom.closeModal('#my-dialog').pipe(Effect.ignore, Effect.as(CompletedCloseDialog()))
121
121
  * ```
122
122
  */
123
123
  export const closeModal = (selector) => Effect.suspend(() => {
@@ -140,11 +140,11 @@ export const closeModal = (selector) => Effect.suspend(() => {
140
140
  *
141
141
  * @example
142
142
  * ```typescript
143
- * Task.clickElement('#menu-item-2').pipe(Effect.ignore, Effect.as(CompletedClickItem()))
143
+ * Dom.clickElement('#menu-item-2').pipe(Effect.ignore, Effect.as(CompletedClickItem()))
144
144
  * ```
145
145
  */
146
146
  export const clickElement = (selector) => Effect.gen(function* () {
147
- yield* afterRender;
147
+ yield* afterCommit;
148
148
  const element = yield* queryHTMLElement(selector);
149
149
  element.click();
150
150
  });
@@ -154,11 +154,11 @@ export const clickElement = (selector) => Effect.gen(function* () {
154
154
  *
155
155
  * @example
156
156
  * ```typescript
157
- * Task.scrollIntoView('#active-item').pipe(Effect.ignore, Effect.as(CompletedScrollIntoView()))
157
+ * Dom.scrollIntoView('#active-item').pipe(Effect.ignore, Effect.as(CompletedScrollIntoView()))
158
158
  * ```
159
159
  */
160
160
  export const scrollIntoView = (selector) => Effect.gen(function* () {
161
- yield* afterRender;
161
+ yield* afterCommit;
162
162
  const element = yield* queryHTMLElement(selector);
163
163
  element.scrollIntoView({ block: 'nearest' });
164
164
  });
@@ -168,11 +168,11 @@ export const scrollIntoView = (selector) => Effect.gen(function* () {
168
168
  *
169
169
  * @example
170
170
  * ```typescript
171
- * Task.advanceFocus('#menu-button', 'Next').pipe(Effect.ignore, Effect.as(CompletedAdvanceFocus()))
171
+ * Dom.advanceFocus('#menu-button', 'Next').pipe(Effect.ignore, Effect.as(CompletedAdvanceFocus()))
172
172
  * ```
173
173
  */
174
174
  export const advanceFocus = (selector, direction) => Effect.gen(function* () {
175
- yield* afterRender;
175
+ yield* afterCommit;
176
176
  const reference = yield* queryHTMLElement(selector);
177
177
  const focusableElements = Array.fromIterable(document.querySelectorAll(FOCUSABLE_SELECTOR));
178
178
  const referenceElementIndex = Array.findFirstIndex(focusableElements, Equal.equals(reference));
@@ -12,7 +12,7 @@ import { Effect } from 'effect';
12
12
  *
13
13
  * @example
14
14
  * ```typescript
15
- * Task.detectElementMovement('#menu-button').pipe(
15
+ * Dom.detectElementMovement('#menu-button').pipe(
16
16
  * Effect.as(DetectedButtonMovement()),
17
17
  * )
18
18
  * ```
@@ -0,0 +1 @@
1
+ {"version":3,"file":"elementMovement.d.ts","sourceRoot":"","sources":["../../src/dom/elementMovement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAM/B;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,qBAAqB,GAAI,UAAU,MAAM,KAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAmCvE,CAAA"}
@@ -1,5 +1,5 @@
1
1
  import { Effect } from 'effect';
2
- import { afterRender } from './timing.js';
2
+ import { afterCommit } from '../render/render.js';
3
3
  const rectToPosition = (rect) => `${rect.x},${rect.y}`;
4
4
  /**
5
5
  * Detects if the element matching the given selector moves in the viewport.
@@ -14,13 +14,13 @@ const rectToPosition = (rect) => `${rect.x},${rect.y}`;
14
14
  *
15
15
  * @example
16
16
  * ```typescript
17
- * Task.detectElementMovement('#menu-button').pipe(
17
+ * Dom.detectElementMovement('#menu-button').pipe(
18
18
  * Effect.as(DetectedButtonMovement()),
19
19
  * )
20
20
  * ```
21
21
  */
22
22
  export const detectElementMovement = (selector) => Effect.gen(function* () {
23
- yield* afterRender;
23
+ yield* afterCommit;
24
24
  return yield* Effect.callback((resume, signal) => {
25
25
  const element = document.querySelector(selector);
26
26
  if (!(element instanceof HTMLElement)) {
@@ -6,13 +6,5 @@ export declare class ElementNotFound extends ElementNotFound_base<{
6
6
  readonly selector: string;
7
7
  }> {
8
8
  }
9
- declare const TimeZoneError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
10
- readonly _tag: "TimeZoneError";
11
- } & Readonly<A>;
12
- /** Error indicating that the given timezone ID is invalid. */
13
- export declare class TimeZoneError extends TimeZoneError_base<{
14
- readonly zoneId: string;
15
- }> {
16
- }
17
9
  export {};
18
10
  //# sourceMappingURL=error.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../src/dom/error.ts"],"names":[],"mappings":";;;AAEA,qFAAqF;AACrF,qBAAa,eAAgB,SAAQ,qBAAoC;IACvE,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;CAC1B,CAAC;CAAG"}
@@ -2,6 +2,3 @@ import { Data } from 'effect';
2
2
  /** Error indicating that a DOM element matching the given selector was not found. */
3
3
  export class ElementNotFound extends Data.TaggedError('ElementNotFound') {
4
4
  }
5
- /** Error indicating that the given timezone ID is invalid. */
6
- export class TimeZoneError extends Data.TaggedError('TimeZoneError') {
7
- }
@@ -0,0 +1,8 @@
1
+ export { ElementNotFound } from './error.js';
2
+ export { advanceFocus, clickElement, closeModal, focus, scrollIntoView, showModal, } from './dom.js';
3
+ export type { FocusDirection } from './dom.js';
4
+ export { detectElementMovement } from './elementMovement.js';
5
+ export { inertOthers, restoreInert } from './inert.js';
6
+ export { lockScroll, unlockScroll } from './scrollLock.js';
7
+ export { waitForAnimationSettled } from './waitForAnimation.js';
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/dom/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAC5C,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,KAAK,EACL,cAAc,EACd,SAAS,GACV,MAAM,UAAU,CAAA;AACjB,YAAY,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAC9C,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAA;AAC5D,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AACtD,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAC1D,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAA"}