foldkit 0.100.1 → 0.101.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 (34) hide show
  1. package/README.md +1 -1
  2. package/dist/devTools/overlay.d.ts.map +1 -1
  3. package/dist/devTools/overlay.js +19 -39
  4. package/dist/runtime/runtime.d.ts +10 -10
  5. package/dist/runtime/runtime.d.ts.map +1 -1
  6. package/dist/runtime/runtime.js +3 -2
  7. package/dist/runtime/subscription.d.ts +139 -19
  8. package/dist/runtime/subscription.d.ts.map +1 -1
  9. package/dist/runtime/subscription.js +90 -9
  10. package/dist/subscription/animationFrame.d.ts +23 -26
  11. package/dist/subscription/animationFrame.d.ts.map +1 -1
  12. package/dist/subscription/animationFrame.js +17 -18
  13. package/dist/subscription/public.d.ts +2 -2
  14. package/dist/subscription/public.d.ts.map +1 -1
  15. package/dist/subscription/public.js +1 -1
  16. package/dist/ui/dragAndDrop/index.d.ts +383 -101
  17. package/dist/ui/dragAndDrop/index.d.ts.map +1 -1
  18. package/dist/ui/dragAndDrop/index.js +19 -24
  19. package/dist/ui/dragAndDrop/public.d.ts +1 -1
  20. package/dist/ui/dragAndDrop/public.d.ts.map +1 -1
  21. package/dist/ui/dragAndDrop/public.js +1 -1
  22. package/dist/ui/slider/index.d.ts +193 -87
  23. package/dist/ui/slider/index.d.ts.map +1 -1
  24. package/dist/ui/slider/index.js +12 -19
  25. package/dist/ui/slider/public.d.ts +1 -1
  26. package/dist/ui/slider/public.d.ts.map +1 -1
  27. package/dist/ui/slider/public.js +1 -1
  28. package/dist/ui/virtualList/index.d.ts +45 -39
  29. package/dist/ui/virtualList/index.d.ts.map +1 -1
  30. package/dist/ui/virtualList/index.js +5 -12
  31. package/dist/ui/virtualList/public.d.ts +1 -1
  32. package/dist/ui/virtualList/public.d.ts.map +1 -1
  33. package/dist/ui/virtualList/public.js +1 -1
  34. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { Effect, Queue, Stream } from 'effect';
1
+ import { Effect, Queue, Schema as S, Stream } from 'effect';
2
2
  const makeAnimationFrameStream = (toMessage) => Stream.callback(queue => Effect.acquireRelease(Effect.sync(() => {
3
3
  const state = {
4
4
  frameId: 0,
@@ -14,34 +14,33 @@ const makeAnimationFrameStream = (toMessage) => Stream.callback(queue => Effect.
14
14
  return state;
15
15
  }), state => Effect.sync(() => cancelAnimationFrame(state.frameId))).pipe(Effect.flatMap(() => Effect.never)));
16
16
  /**
17
- * Build a Subscription field config that emits a Message on every
17
+ * Build a Subscription that emits a Message on every
18
18
  * `requestAnimationFrame` tick, with the inter-frame delta in milliseconds.
19
19
  *
20
- * Pair with `S.Boolean` in the `SubscriptionDependencies` schema:
21
- *
22
20
  * @example
23
21
  * ```typescript
24
- * const SubscriptionDependencies = S.Struct({
25
- * frame: S.Boolean,
26
- * })
27
- *
28
- * const subscriptions = Subscription.makeSubscriptions(SubscriptionDependencies)<
29
- * Model,
30
- * Message
31
- * >({
22
+ * const subscriptions = Subscription.make<Model, Message>()(_entry => ({
32
23
  * frame: Subscription.animationFrame({
33
24
  * isActive: model => model.isPlaying,
34
25
  * toMessage: deltaTime => Tick({ deltaTime }),
35
26
  * }),
36
- * })
27
+ * }))
37
28
  * ```
38
29
  *
39
30
  * The browser pauses `requestAnimationFrame` when the tab is hidden, so
40
- * `deltaTime` may spike on the first frame after the tab regains focus.
41
- * Clamp it in the update function if your simulation is sensitive to large
42
- * jumps.
31
+ * `deltaTime` may spike to several seconds on the first frame after the
32
+ * tab regains focus. If your `update` function multiplies `deltaTime`
33
+ * against motion or physics, cap it to a reasonable maximum (32ms is
34
+ * typical) before using it. Otherwise a multi-second `deltaTime` can send
35
+ * moving objects flying across the screen in one frame.
36
+ *
37
+ * Returns an entry shape, not a branded Subscription. Pass it into
38
+ * `Subscription.make` as an entry value.
43
39
  */
44
40
  export const animationFrame = (config) => ({
45
- modelToDependencies: model => config.isActive(model),
46
- dependenciesToStream: isActive => Stream.when(makeAnimationFrameStream(config.toMessage), Effect.sync(() => isActive)),
41
+ dependenciesSchema: S.Struct({ isActive: S.Boolean }),
42
+ modelToDependencies: (model) => ({
43
+ isActive: config.isActive(model),
44
+ }),
45
+ dependenciesToStream: ({ isActive }) => Stream.when(makeAnimationFrameStream(config.toMessage), Effect.sync(() => isActive)),
47
46
  });
@@ -1,5 +1,5 @@
1
- export { makeSubscriptions } from '../runtime/subscription.js';
1
+ export { aggregate, lift, make, persistent } from '../runtime/subscription.js';
2
2
  export type { Subscription, Subscriptions } from '../runtime/subscription.js';
3
3
  export { animationFrame } from './animationFrame.js';
4
- export type { AnimationFrameConfig, AnimationFrameSubscription, } from './animationFrame.js';
4
+ export type { AnimationFrameConfig } from './animationFrame.js';
5
5
  //# sourceMappingURL=public.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../src/subscription/public.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAE9D,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAE7E,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAEpD,YAAY,EACV,oBAAoB,EACpB,0BAA0B,GAC3B,MAAM,qBAAqB,CAAA"}
1
+ {"version":3,"file":"public.d.ts","sourceRoot":"","sources":["../../src/subscription/public.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAA;AAE9E,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAE7E,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAEpD,YAAY,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAA"}
@@ -1,2 +1,2 @@
1
- export { makeSubscriptions } from '../runtime/subscription.js';
1
+ export { aggregate, lift, make, persistent } from '../runtime/subscription.js';
2
2
  export { animationFrame } from './animationFrame.js';
@@ -1,4 +1,4 @@
1
- import { Effect, Option, Schema as S } from 'effect';
1
+ import { Effect, Equivalence, Option, Schema as S, Stream } from 'effect';
2
2
  import * as Command from '../../command/index.js';
3
3
  import { type Attribute } from '../../html/index.js';
4
4
  declare const DropTarget: S.Struct<{
@@ -151,119 +151,401 @@ type UpdateReturn = readonly [
151
151
  ];
152
152
  /** Processes a drag-and-drop message and returns the next model, commands, and an optional out-message for the parent. */
153
153
  export declare const update: (model: Model, message: Message) => UpdateReturn;
154
- /** Schema describing the subscription dependencies for document-level drag tracking. */
155
- export declare const SubscriptionDependencies: S.Struct<{
156
- readonly documentPointer: S.Struct<{
157
- readonly dragActivity: S.Literals<readonly ["Idle", "Active"]>;
158
- readonly orientation: S.Literals<readonly ["Horizontal", "Vertical"]>;
159
- }>;
160
- readonly documentEscape: S.Struct<{
161
- readonly dragActivity: S.Literals<readonly ["Idle", "Active"]>;
162
- }>;
163
- readonly documentKeyboard: S.Struct<{
164
- readonly dragActivity: S.Literals<readonly ["Idle", "Active"]>;
165
- }>;
166
- readonly autoScroll: S.Struct<{
167
- readonly isDragging: S.Boolean;
168
- readonly clientY: S.Number;
169
- }>;
170
- }>;
171
154
  /** Document-level subscriptions for pointer and keyboard events during drag operations. */
172
- export declare const subscriptions: import("../../runtime/subscription.js").Subscriptions<{
173
- readonly id: string;
174
- readonly orientation: "Vertical" | "Horizontal";
175
- readonly activationThreshold: number;
176
- readonly dragState: {
177
- readonly _tag: "Idle";
178
- } | {
179
- readonly _tag: "Pending";
180
- readonly itemId: string;
181
- readonly containerId: string;
182
- readonly index: number;
183
- readonly origin: {
155
+ export declare const subscriptions: {
156
+ readonly documentPointer: {
157
+ readonly dependenciesSchema: S.Schema<{
158
+ readonly dragActivity: "Idle" | "Active";
159
+ readonly orientation: "Vertical" | "Horizontal";
160
+ }> & {
161
+ readonly fields: S.Struct.Fields;
162
+ };
163
+ readonly modelToDependencies: (model: {
164
+ readonly id: string;
165
+ readonly orientation: "Vertical" | "Horizontal";
166
+ readonly activationThreshold: number;
167
+ readonly dragState: {
168
+ readonly _tag: "Idle";
169
+ } | {
170
+ readonly _tag: "Pending";
171
+ readonly itemId: string;
172
+ readonly containerId: string;
173
+ readonly index: number;
174
+ readonly origin: {
175
+ readonly screenX: number;
176
+ readonly screenY: number;
177
+ };
178
+ } | {
179
+ readonly _tag: "Dragging";
180
+ readonly itemId: string;
181
+ readonly sourceContainerId: string;
182
+ readonly sourceIndex: number;
183
+ readonly origin: {
184
+ readonly screenX: number;
185
+ readonly screenY: number;
186
+ };
187
+ readonly current: {
188
+ readonly clientX: number;
189
+ readonly clientY: number;
190
+ };
191
+ readonly maybeDropTarget: Option.Option<{
192
+ readonly containerId: string;
193
+ readonly index: number;
194
+ }>;
195
+ } | {
196
+ readonly _tag: "KeyboardDragging";
197
+ readonly itemId: string;
198
+ readonly sourceContainerId: string;
199
+ readonly sourceIndex: number;
200
+ readonly targetContainerId: string;
201
+ readonly targetIndex: number;
202
+ };
203
+ }) => {
204
+ readonly dragActivity: "Idle" | "Active";
205
+ readonly orientation: "Vertical" | "Horizontal";
206
+ };
207
+ readonly keepAliveEquivalence?: never;
208
+ readonly dependenciesToStream: (dependencies: {
209
+ readonly dragActivity: "Idle" | "Active";
210
+ readonly orientation: "Vertical" | "Horizontal";
211
+ }) => Stream.Stream<{
212
+ readonly _tag: "CancelledDrag";
213
+ } | {
214
+ readonly _tag: "PressedDraggable";
215
+ readonly itemId: string;
216
+ readonly containerId: string;
217
+ readonly index: number;
184
218
  readonly screenX: number;
185
219
  readonly screenY: number;
186
- };
187
- } | {
188
- readonly _tag: "Dragging";
189
- readonly itemId: string;
190
- readonly sourceContainerId: string;
191
- readonly sourceIndex: number;
192
- readonly origin: {
220
+ } | {
221
+ readonly _tag: "MovedPointer";
193
222
  readonly screenX: number;
194
223
  readonly screenY: number;
224
+ readonly clientX: number;
225
+ readonly clientY: number;
226
+ readonly maybeDropTarget: Option.Option<{
227
+ readonly containerId: string;
228
+ readonly index: number;
229
+ }>;
230
+ } | {
231
+ readonly _tag: "ReleasedPointer";
232
+ } | {
233
+ readonly _tag: "ActivatedKeyboardDrag";
234
+ readonly itemId: string;
235
+ readonly containerId: string;
236
+ readonly index: number;
237
+ } | {
238
+ readonly _tag: "ResolvedKeyboardMove";
239
+ readonly targetContainerId: string;
240
+ readonly targetIndex: number;
241
+ } | {
242
+ readonly _tag: "ConfirmedKeyboardDrop";
243
+ } | {
244
+ readonly _tag: "PressedArrowKey";
245
+ readonly direction: "Left" | "Right" | "Up" | "Down" | "NextContainer" | "PreviousContainer";
246
+ } | {
247
+ readonly _tag: "CompletedAutoScroll";
248
+ } | {
249
+ readonly _tag: "CompletedFocusItem";
250
+ }, never, never>;
251
+ } & {
252
+ readonly __subscription: never;
253
+ };
254
+ readonly documentEscape: {
255
+ readonly dependenciesSchema: S.Schema<{
256
+ readonly dragActivity: "Idle" | "Active";
257
+ }> & {
258
+ readonly fields: S.Struct.Fields;
259
+ };
260
+ readonly modelToDependencies: (model: {
261
+ readonly id: string;
262
+ readonly orientation: "Vertical" | "Horizontal";
263
+ readonly activationThreshold: number;
264
+ readonly dragState: {
265
+ readonly _tag: "Idle";
266
+ } | {
267
+ readonly _tag: "Pending";
268
+ readonly itemId: string;
269
+ readonly containerId: string;
270
+ readonly index: number;
271
+ readonly origin: {
272
+ readonly screenX: number;
273
+ readonly screenY: number;
274
+ };
275
+ } | {
276
+ readonly _tag: "Dragging";
277
+ readonly itemId: string;
278
+ readonly sourceContainerId: string;
279
+ readonly sourceIndex: number;
280
+ readonly origin: {
281
+ readonly screenX: number;
282
+ readonly screenY: number;
283
+ };
284
+ readonly current: {
285
+ readonly clientX: number;
286
+ readonly clientY: number;
287
+ };
288
+ readonly maybeDropTarget: Option.Option<{
289
+ readonly containerId: string;
290
+ readonly index: number;
291
+ }>;
292
+ } | {
293
+ readonly _tag: "KeyboardDragging";
294
+ readonly itemId: string;
295
+ readonly sourceContainerId: string;
296
+ readonly sourceIndex: number;
297
+ readonly targetContainerId: string;
298
+ readonly targetIndex: number;
299
+ };
300
+ }) => {
301
+ readonly dragActivity: "Idle" | "Active";
195
302
  };
196
- readonly current: {
303
+ readonly keepAliveEquivalence?: never;
304
+ readonly dependenciesToStream: (dependencies: {
305
+ readonly dragActivity: "Idle" | "Active";
306
+ }) => Stream.Stream<{
307
+ readonly _tag: "CancelledDrag";
308
+ } | {
309
+ readonly _tag: "PressedDraggable";
310
+ readonly itemId: string;
311
+ readonly containerId: string;
312
+ readonly index: number;
313
+ readonly screenX: number;
314
+ readonly screenY: number;
315
+ } | {
316
+ readonly _tag: "MovedPointer";
317
+ readonly screenX: number;
318
+ readonly screenY: number;
197
319
  readonly clientX: number;
198
320
  readonly clientY: number;
321
+ readonly maybeDropTarget: Option.Option<{
322
+ readonly containerId: string;
323
+ readonly index: number;
324
+ }>;
325
+ } | {
326
+ readonly _tag: "ReleasedPointer";
327
+ } | {
328
+ readonly _tag: "ActivatedKeyboardDrag";
329
+ readonly itemId: string;
330
+ readonly containerId: string;
331
+ readonly index: number;
332
+ } | {
333
+ readonly _tag: "ResolvedKeyboardMove";
334
+ readonly targetContainerId: string;
335
+ readonly targetIndex: number;
336
+ } | {
337
+ readonly _tag: "ConfirmedKeyboardDrop";
338
+ } | {
339
+ readonly _tag: "PressedArrowKey";
340
+ readonly direction: "Left" | "Right" | "Up" | "Down" | "NextContainer" | "PreviousContainer";
341
+ } | {
342
+ readonly _tag: "CompletedAutoScroll";
343
+ } | {
344
+ readonly _tag: "CompletedFocusItem";
345
+ }, never, never>;
346
+ } & {
347
+ readonly __subscription: never;
348
+ };
349
+ readonly documentKeyboard: {
350
+ readonly dependenciesSchema: S.Schema<{
351
+ readonly dragActivity: "Idle" | "Active";
352
+ }> & {
353
+ readonly fields: S.Struct.Fields;
354
+ };
355
+ readonly modelToDependencies: (model: {
356
+ readonly id: string;
357
+ readonly orientation: "Vertical" | "Horizontal";
358
+ readonly activationThreshold: number;
359
+ readonly dragState: {
360
+ readonly _tag: "Idle";
361
+ } | {
362
+ readonly _tag: "Pending";
363
+ readonly itemId: string;
364
+ readonly containerId: string;
365
+ readonly index: number;
366
+ readonly origin: {
367
+ readonly screenX: number;
368
+ readonly screenY: number;
369
+ };
370
+ } | {
371
+ readonly _tag: "Dragging";
372
+ readonly itemId: string;
373
+ readonly sourceContainerId: string;
374
+ readonly sourceIndex: number;
375
+ readonly origin: {
376
+ readonly screenX: number;
377
+ readonly screenY: number;
378
+ };
379
+ readonly current: {
380
+ readonly clientX: number;
381
+ readonly clientY: number;
382
+ };
383
+ readonly maybeDropTarget: Option.Option<{
384
+ readonly containerId: string;
385
+ readonly index: number;
386
+ }>;
387
+ } | {
388
+ readonly _tag: "KeyboardDragging";
389
+ readonly itemId: string;
390
+ readonly sourceContainerId: string;
391
+ readonly sourceIndex: number;
392
+ readonly targetContainerId: string;
393
+ readonly targetIndex: number;
394
+ };
395
+ }) => {
396
+ readonly dragActivity: "Idle" | "Active";
199
397
  };
200
- readonly maybeDropTarget: Option.Option<{
398
+ readonly keepAliveEquivalence?: never;
399
+ readonly dependenciesToStream: (dependencies: {
400
+ readonly dragActivity: "Idle" | "Active";
401
+ }) => Stream.Stream<{
402
+ readonly _tag: "CancelledDrag";
403
+ } | {
404
+ readonly _tag: "PressedDraggable";
405
+ readonly itemId: string;
406
+ readonly containerId: string;
407
+ readonly index: number;
408
+ readonly screenX: number;
409
+ readonly screenY: number;
410
+ } | {
411
+ readonly _tag: "MovedPointer";
412
+ readonly screenX: number;
413
+ readonly screenY: number;
414
+ readonly clientX: number;
415
+ readonly clientY: number;
416
+ readonly maybeDropTarget: Option.Option<{
417
+ readonly containerId: string;
418
+ readonly index: number;
419
+ }>;
420
+ } | {
421
+ readonly _tag: "ReleasedPointer";
422
+ } | {
423
+ readonly _tag: "ActivatedKeyboardDrag";
424
+ readonly itemId: string;
201
425
  readonly containerId: string;
202
426
  readonly index: number;
427
+ } | {
428
+ readonly _tag: "ResolvedKeyboardMove";
429
+ readonly targetContainerId: string;
430
+ readonly targetIndex: number;
431
+ } | {
432
+ readonly _tag: "ConfirmedKeyboardDrop";
433
+ } | {
434
+ readonly _tag: "PressedArrowKey";
435
+ readonly direction: "Left" | "Right" | "Up" | "Down" | "NextContainer" | "PreviousContainer";
436
+ } | {
437
+ readonly _tag: "CompletedAutoScroll";
438
+ } | {
439
+ readonly _tag: "CompletedFocusItem";
440
+ }, never, never>;
441
+ } & {
442
+ readonly __subscription: never;
443
+ };
444
+ readonly autoScroll: {
445
+ readonly dependenciesSchema: S.Schema<{
446
+ readonly isDragging: boolean;
447
+ readonly clientY: number;
448
+ }> & {
449
+ readonly fields: S.Struct.Fields;
450
+ };
451
+ readonly modelToDependencies: (model: {
452
+ readonly id: string;
453
+ readonly orientation: "Vertical" | "Horizontal";
454
+ readonly activationThreshold: number;
455
+ readonly dragState: {
456
+ readonly _tag: "Idle";
457
+ } | {
458
+ readonly _tag: "Pending";
459
+ readonly itemId: string;
460
+ readonly containerId: string;
461
+ readonly index: number;
462
+ readonly origin: {
463
+ readonly screenX: number;
464
+ readonly screenY: number;
465
+ };
466
+ } | {
467
+ readonly _tag: "Dragging";
468
+ readonly itemId: string;
469
+ readonly sourceContainerId: string;
470
+ readonly sourceIndex: number;
471
+ readonly origin: {
472
+ readonly screenX: number;
473
+ readonly screenY: number;
474
+ };
475
+ readonly current: {
476
+ readonly clientX: number;
477
+ readonly clientY: number;
478
+ };
479
+ readonly maybeDropTarget: Option.Option<{
480
+ readonly containerId: string;
481
+ readonly index: number;
482
+ }>;
483
+ } | {
484
+ readonly _tag: "KeyboardDragging";
485
+ readonly itemId: string;
486
+ readonly sourceContainerId: string;
487
+ readonly sourceIndex: number;
488
+ readonly targetContainerId: string;
489
+ readonly targetIndex: number;
490
+ };
491
+ }) => {
492
+ readonly isDragging: boolean;
493
+ readonly clientY: number;
494
+ };
495
+ readonly keepAliveEquivalence: Equivalence.Equivalence<{
496
+ readonly isDragging: boolean;
497
+ readonly clientY: number;
203
498
  }>;
204
- } | {
205
- readonly _tag: "KeyboardDragging";
206
- readonly itemId: string;
207
- readonly sourceContainerId: string;
208
- readonly sourceIndex: number;
209
- readonly targetContainerId: string;
210
- readonly targetIndex: number;
499
+ readonly dependenciesToStream: (dependencies: {
500
+ readonly isDragging: boolean;
501
+ readonly clientY: number;
502
+ }, readDependencies: () => {
503
+ readonly isDragging: boolean;
504
+ readonly clientY: number;
505
+ }) => Stream.Stream<{
506
+ readonly _tag: "CancelledDrag";
507
+ } | {
508
+ readonly _tag: "PressedDraggable";
509
+ readonly itemId: string;
510
+ readonly containerId: string;
511
+ readonly index: number;
512
+ readonly screenX: number;
513
+ readonly screenY: number;
514
+ } | {
515
+ readonly _tag: "MovedPointer";
516
+ readonly screenX: number;
517
+ readonly screenY: number;
518
+ readonly clientX: number;
519
+ readonly clientY: number;
520
+ readonly maybeDropTarget: Option.Option<{
521
+ readonly containerId: string;
522
+ readonly index: number;
523
+ }>;
524
+ } | {
525
+ readonly _tag: "ReleasedPointer";
526
+ } | {
527
+ readonly _tag: "ActivatedKeyboardDrag";
528
+ readonly itemId: string;
529
+ readonly containerId: string;
530
+ readonly index: number;
531
+ } | {
532
+ readonly _tag: "ResolvedKeyboardMove";
533
+ readonly targetContainerId: string;
534
+ readonly targetIndex: number;
535
+ } | {
536
+ readonly _tag: "ConfirmedKeyboardDrop";
537
+ } | {
538
+ readonly _tag: "PressedArrowKey";
539
+ readonly direction: "Left" | "Right" | "Up" | "Down" | "NextContainer" | "PreviousContainer";
540
+ } | {
541
+ readonly _tag: "CompletedAutoScroll";
542
+ } | {
543
+ readonly _tag: "CompletedFocusItem";
544
+ }, never, never>;
545
+ } & {
546
+ readonly __subscription: never;
211
547
  };
212
- }, {
213
- readonly _tag: "CancelledDrag";
214
- } | {
215
- readonly _tag: "PressedDraggable";
216
- readonly itemId: string;
217
- readonly containerId: string;
218
- readonly index: number;
219
- readonly screenX: number;
220
- readonly screenY: number;
221
- } | {
222
- readonly _tag: "MovedPointer";
223
- readonly screenX: number;
224
- readonly screenY: number;
225
- readonly clientX: number;
226
- readonly clientY: number;
227
- readonly maybeDropTarget: Option.Option<{
228
- readonly containerId: string;
229
- readonly index: number;
230
- }>;
231
- } | {
232
- readonly _tag: "ReleasedPointer";
233
- } | {
234
- readonly _tag: "ActivatedKeyboardDrag";
235
- readonly itemId: string;
236
- readonly containerId: string;
237
- readonly index: number;
238
- } | {
239
- readonly _tag: "ResolvedKeyboardMove";
240
- readonly targetContainerId: string;
241
- readonly targetIndex: number;
242
- } | {
243
- readonly _tag: "ConfirmedKeyboardDrop";
244
- } | {
245
- readonly _tag: "PressedArrowKey";
246
- readonly direction: "Left" | "Right" | "Up" | "Down" | "NextContainer" | "PreviousContainer";
247
- } | {
248
- readonly _tag: "CompletedAutoScroll";
249
- } | {
250
- readonly _tag: "CompletedFocusItem";
251
- }, S.Struct<{
252
- readonly documentPointer: S.Struct<{
253
- readonly dragActivity: S.Literals<readonly ["Idle", "Active"]>;
254
- readonly orientation: S.Literals<readonly ["Horizontal", "Vertical"]>;
255
- }>;
256
- readonly documentEscape: S.Struct<{
257
- readonly dragActivity: S.Literals<readonly ["Idle", "Active"]>;
258
- }>;
259
- readonly documentKeyboard: S.Struct<{
260
- readonly dragActivity: S.Literals<readonly ["Idle", "Active"]>;
261
- }>;
262
- readonly autoScroll: S.Struct<{
263
- readonly isDragging: S.Boolean;
264
- readonly clientY: S.Number;
265
- }>;
266
- }>, never>;
548
+ };
267
549
  /** Messages the draggable view helper can dispatch. */
268
550
  export type DraggableMessage = typeof PressedDraggable.Type | typeof ActivatedKeyboardDrag.Type;
269
551
  /** Configuration for creating draggable attributes with `draggable`. */
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/dragAndDrop/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,MAAM,EAIN,MAAM,EAEN,MAAM,IAAI,CAAC,EAGZ,MAAM,QAAQ,CAAA;AAEf,OAAO,KAAK,OAA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