foldkit-primitives 0.15.3 → 0.15.4

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 (59) hide show
  1. package/dist/device/index.d.mts +10 -20
  2. package/dist/device/index.d.mts.map +1 -1
  3. package/dist/device/index.mjs +6 -11
  4. package/dist/device/index.mjs.map +1 -1
  5. package/dist/dom/index.d.mts +1 -37
  6. package/dist/dom/index.d.mts.map +1 -1
  7. package/dist/dom/index.mjs +18 -35
  8. package/dist/dom/index.mjs.map +1 -1
  9. package/dist/{editable-text-1D31qthY.d.mts → editable-text-Bg7vil7h.d.mts} +1 -13
  10. package/dist/editable-text-Bg7vil7h.d.mts.map +1 -0
  11. package/dist/events/index.d.mts +1 -17
  12. package/dist/events/index.d.mts.map +1 -1
  13. package/dist/events/index.mjs +10 -18
  14. package/dist/events/index.mjs.map +1 -1
  15. package/dist/{follow-tab-stop-Caog2qg1.mjs → follow-tab-stop-DM5EI4Ci.mjs} +8 -15
  16. package/dist/{follow-tab-stop-Caog2qg1.mjs.map → follow-tab-stop-DM5EI4Ci.mjs.map} +1 -1
  17. package/dist/{index-CmmxqSEi.d.mts → index-Bomdwb7e.d.mts} +4 -11
  18. package/dist/index-Bomdwb7e.d.mts.map +1 -0
  19. package/dist/index.d.mts +3 -3
  20. package/dist/index.mjs +3 -3
  21. package/dist/{input-modality-BXD383jg.mjs → input-modality-XwQOFLip.mjs} +2 -3
  22. package/dist/{input-modality-BXD383jg.mjs.map → input-modality-XwQOFLip.mjs.map} +1 -1
  23. package/dist/{input-modality-BY-bSrEc.d.mts → input-modality-l7InESYh.d.mts} +1 -3
  24. package/dist/input-modality-l7InESYh.d.mts.map +1 -0
  25. package/dist/interaction/index.d.mts +2 -3
  26. package/dist/interaction/index.d.mts.map +1 -1
  27. package/dist/interaction/index.mjs +24 -44
  28. package/dist/interaction/index.mjs.map +1 -1
  29. package/dist/{internal-DP-xLKbT.mjs → internal-C4gHodLc.mjs} +2 -3
  30. package/dist/{internal-DP-xLKbT.mjs.map → internal-C4gHodLc.mjs.map} +1 -1
  31. package/dist/media/index.d.mts +0 -6
  32. package/dist/media/index.d.mts.map +1 -1
  33. package/dist/media/index.mjs +3 -6
  34. package/dist/media/index.mjs.map +1 -1
  35. package/dist/motion/index.d.mts +1 -1
  36. package/dist/motion/index.mjs +1 -1
  37. package/dist/{motion-DmFDppRn.mjs → motion-BmlJCjn6.mjs} +6 -10
  38. package/dist/{motion-DmFDppRn.mjs.map → motion-BmlJCjn6.mjs.map} +1 -1
  39. package/dist/net/index.d.mts +0 -10
  40. package/dist/net/index.d.mts.map +1 -1
  41. package/dist/net/index.mjs +6 -11
  42. package/dist/net/index.mjs.map +1 -1
  43. package/dist/observers/index.d.mts +0 -8
  44. package/dist/observers/index.d.mts.map +1 -1
  45. package/dist/observers/index.mjs +4 -8
  46. package/dist/observers/index.mjs.map +1 -1
  47. package/dist/{rolldown-runtime-D7D4PA-g.mjs → rolldown-runtime-D8jQpDG7.mjs} +1 -2
  48. package/dist/state/index.d.mts +0 -12
  49. package/dist/state/index.d.mts.map +1 -1
  50. package/dist/state/index.mjs +7 -13
  51. package/dist/state/index.mjs.map +1 -1
  52. package/dist/time/index.d.mts +0 -12
  53. package/dist/time/index.d.mts.map +1 -1
  54. package/dist/time/index.mjs +6 -12
  55. package/dist/time/index.mjs.map +1 -1
  56. package/package.json +3 -3
  57. package/dist/editable-text-1D31qthY.d.mts.map +0 -1
  58. package/dist/index-CmmxqSEi.d.mts.map +0 -1
  59. package/dist/input-modality-BY-bSrEc.d.mts.map +0 -1
@@ -1,14 +1,14 @@
1
- import { t as __exportAll } from "../rolldown-runtime-D7D4PA-g.mjs";
2
- import { A as FocusScope, C as targetOf, D as Moved, E as MoveStarted, O as HideOutside, S as Targets, T as MoveEnded, _ as PointerDrag, a as TextCommitted, b as TargetHovered, d as DragPlace, f as DragStarted, i as TextCancelled, j as tabbableWithin, k as ScrollLock, l as DragCancelled, m as DraggedOver, n as EditAsked, o as TextEdited, p as DragZone, r as EditableText, s as textOf, t as FollowTabStop, u as DragDropped, v as boxOf, w as Move, x as TargetPressed, y as zoneOf } from "../follow-tab-stop-Caog2qg1.mjs";
3
- import { n as perInput, r as sameIds, t as clearQuery } from "../internal-DP-xLKbT.mjs";
4
- import { a as modalityOfKey, i as Modality, t as InputModality } from "../input-modality-BXD383jg.mjs";
1
+ import { t as __exportAll } from "../rolldown-runtime-D8jQpDG7.mjs";
2
+ import { A as FocusScope, C as targetOf, D as Moved, E as MoveStarted, O as HideOutside, S as Targets, T as MoveEnded, _ as PointerDrag, a as TextCommitted, b as TargetHovered, d as DragPlace, f as DragStarted, i as TextCancelled, j as tabbableWithin, k as ScrollLock, l as DragCancelled, m as DraggedOver, n as EditAsked, o as TextEdited, p as DragZone, r as EditableText, s as textOf, t as FollowTabStop, u as DragDropped, v as boxOf, w as Move, x as TargetPressed, y as zoneOf } from "../follow-tab-stop-DM5EI4Ci.mjs";
3
+ import { n as perInput, r as sameIds, t as clearQuery } from "../internal-C4gHodLc.mjs";
4
+ import { a as modalityOfKey, i as Modality, t as InputModality } from "../input-modality-XwQOFLip.mjs";
5
5
  import { Effect, Option, Queue, Schema, Stream } from "effect";
6
6
  import * as Mount from "foldkit/mount";
7
7
  import { defineMessageUnion } from "foldkit/message";
8
8
  import * as Subscription from "foldkit/subscription";
9
9
  import { Bundle } from "foldkit-bundle";
10
10
  import { Behavior, Capability } from "foldkit-mixins";
11
- //#region src/interaction/bundle-behavior.ts
11
+ // src/interaction/bundle-behavior.ts
12
12
  var bundle_behavior_exports = /* @__PURE__ */ __exportAll({
13
13
  BundleBehavior: () => BundleBehavior,
14
14
  fromBundle: () => fromBundle
@@ -41,8 +41,7 @@ const fromBundle = (declared) => (slots) => (spec, options) => {
41
41
  return Behavior.forSlots(slots)(built, options);
42
42
  };
43
43
  const BundleBehavior = { fromBundle };
44
- //#endregion
45
- //#region src/interaction/dismiss-layer.ts
44
+ // src/interaction/dismiss-layer.ts
46
45
  /**
47
46
  * Dismissable layers: Escape closes the topmost open layer, a pointer press
48
47
  * outside closes the layers it is outside of. One Bundle, placed once, owns
@@ -186,8 +185,7 @@ const behavior$14 = (_declared) => (slots) => (options) => Behavior.forSlots(slo
186
185
  attributes: ({ input, h }) => [h.Attribute(TRIGGER_ATTRIBUTE, options.id(input))]
187
186
  }) }
188
187
  }, { name: "DismissLayer" });
189
- //#endregion
190
- //#region src/interaction/editable-text.ts
188
+ // src/interaction/editable-text.ts
191
189
  /**
192
190
  * `EditableText` as a Behavior: attaches the `foldkit-primitives/dom` Mount to
193
191
  * a container slot and maps what it reports into the view's Messages. No
@@ -207,8 +205,7 @@ const behavior$13 = (slots) => (options) => Behavior.forSlots(slots)({ [options.
207
205
  requires: { capability: Capability.Container },
208
206
  mount: () => Mount.mapMessage(EditableText({ attribute: options.attribute }), options.toMessage)
209
207
  }) }, { name: "EditableText" });
210
- //#endregion
211
- //#region src/interaction/focus-scope.ts
208
+ // src/interaction/focus-scope.ts
212
209
  /**
213
210
  * `FocusScope` as a Behavior: attaches the `foldkit-primitives/dom` Mount to a
214
211
  * container slot. No Bundle, because which element has focus is a DOM fact.
@@ -233,8 +230,7 @@ const behavior$12 = (slots) => (options) => Behavior.forSlots(slots)({ [options.
233
230
  initialFocus: options.initialFocus ?? null
234
231
  })
235
232
  }) }, { name: "FocusScope" });
236
- //#endregion
237
- //#region src/interaction/focus-visible.ts
233
+ // src/interaction/focus-visible.ts
238
234
  var focus_visible_exports = /* @__PURE__ */ __exportAll({
239
235
  Modality: () => Modality,
240
236
  behavior: () => behavior$11,
@@ -245,8 +241,7 @@ const behavior$11 = (declared) => (slots) => (options) => Behavior.forSlots(slot
245
241
  requires: { capability: Capability.Focusable },
246
242
  attributes: ({ input, h }) => input[declared.field].modality === "keyboard" ? [h.DataAttribute("focus-visible", "true")] : []
247
243
  }) }, { name: "FocusVisible" });
248
- //#endregion
249
- //#region src/interaction/roving-tabindex.ts
244
+ // src/interaction/roving-tabindex.ts
250
245
  /**
251
246
  * One tab stop for a set of items (a toolbar, a tab list, a listbox): arrows
252
247
  * move focus between them, the rest stay out of the tab order. The current
@@ -392,8 +387,7 @@ const behavior$10 = (declared, args) => (slots) => (options) => {
392
387
  })
393
388
  }, { name: "RovingTabindex" });
394
389
  };
395
- //#endregion
396
- //#region src/interaction/grid-navigation.ts
390
+ // src/interaction/grid-navigation.ts
397
391
  /**
398
392
  * Two-dimensional arrow keys over a set of items laid out in rows of
399
393
  * `columns` (a calendar grid, a color swatch picker, an emoji palette). The
@@ -529,8 +523,7 @@ const behavior$9 = (declared, args) => (slots) => (options) => {
529
523
  })
530
524
  }, { name: "GridNavigation" });
531
525
  };
532
- //#endregion
533
- //#region src/interaction/layers.ts
526
+ // src/interaction/layers.ts
534
527
  var layers_exports = /* @__PURE__ */ __exportAll({
535
528
  hideOutside: () => hideOutside,
536
529
  hideOutsideMount: () => HideOutside,
@@ -545,8 +538,7 @@ const mountOn = (name, mount) => (slots) => (options) => Behavior.forSlots(slots
545
538
  const scrollLock = mountOn("ScrollLock", () => ScrollLock());
546
539
  /** Marks everything outside the container inert while it is mounted. */
547
540
  const hideOutside = mountOn("HideOutside", () => HideOutside());
548
- //#endregion
549
- //#region src/interaction/live-announce.ts
541
+ // src/interaction/live-announce.ts
550
542
  /**
551
543
  * Announcements for assistive technology: one Bundle, placed once, holds the
552
544
  * text of a polite and an assertive live region. An announcement waits
@@ -666,8 +658,7 @@ const view = (model, h) => h.div([h.Attribute(REGION_ATTRIBUTE, "regions")], [h.
666
658
  h.AriaLive("assertive"),
667
659
  h.AriaAtomic(true)
668
660
  ], [model.assertive])]);
669
- //#endregion
670
- //#region src/interaction/typeahead.ts
661
+ // src/interaction/typeahead.ts
671
662
  /**
672
663
  * Typeahead over a set of items: printable keys build a query that a timer
673
664
  * clears, and the query picks the item to move to. The query lives in the
@@ -780,8 +771,7 @@ const behavior$8 = (declared) => (slots) => (options) => {
780
771
  }
781
772
  }) }, { name: "Typeahead" });
782
773
  };
783
- //#endregion
784
- //#region src/interaction/list-navigation.ts
774
+ // src/interaction/list-navigation.ts
785
775
  /**
786
776
  * Keyboard navigation of a list in one placement: a roving tab stop, type to
787
777
  * find, and PageUp and PageDown. One Bundle holds the current item's id and
@@ -947,8 +937,7 @@ const behavior$7 = (declared, args) => (slots) => (options) => {
947
937
  })
948
938
  }, { name: "ListNavigation" });
949
939
  };
950
- //#endregion
951
- //#region src/interaction/press.ts
940
+ // src/interaction/press.ts
952
941
  /**
953
942
  * Press: pointer and keyboard activation of one element as one fact. A Mount
954
943
  * reports what the element saw (pointer down, up, cancel, key down, up,
@@ -1178,8 +1167,7 @@ const behavior$6 = (declared) => (slots) => (options) => BundleBehavior.fromBund
1178
1167
  attributes: ({ input, h }) => [...input[declared.field].pressed ? [h.DataAttribute("pressed", "true")] : [], ...options.disabled?.(input) === true ? [h.AriaDisabled(true)] : []],
1179
1168
  events: events()
1180
1169
  } }, { name: "Press" });
1181
- //#endregion
1182
- //#region src/interaction/long-press.ts
1170
+ // src/interaction/long-press.ts
1183
1171
  /**
1184
1172
  * LongPress: holding an element down for `thresholdMs` is one fact. It reads
1185
1173
  * the same facts `Press.events` reports; the threshold is a Command on
@@ -1293,8 +1281,7 @@ const behavior$5 = (declared) => (slots) => (options) => Behavior.forSlots(slots
1293
1281
  attributes: ({ input, h }) => input[declared.field].holding ? [h.DataAttribute("holding", "true")] : [],
1294
1282
  mount: () => Mount.mapMessage(events(), (fact) => declared.wrapper.make(fact))
1295
1283
  }) }, { name: "LongPress" });
1296
- //#endregion
1297
- //#region src/interaction/move.ts
1284
+ // src/interaction/move.ts
1298
1285
  /**
1299
1286
  * `Move` as a Behavior: attaches the `foldkit-primitives/dom` Mount to a
1300
1287
  * draggable slot and maps its facts into the view's Messages. No Bundle: a
@@ -1312,8 +1299,7 @@ const behavior$4 = (slots) => (options) => Behavior.forSlots(slots)({ [options.h
1312
1299
  requires: { capability: Capability.Draggable },
1313
1300
  mount: () => Mount.mapMessage(Move(), options.toMessage)
1314
1301
  }) }, { name: "Move" });
1315
- //#endregion
1316
- //#region src/interaction/overlay.ts
1302
+ // src/interaction/overlay.ts
1317
1303
  var overlay_exports = /* @__PURE__ */ __exportAll({
1318
1304
  behaviors: () => behaviors,
1319
1305
  modal: () => modal,
@@ -1368,8 +1354,7 @@ const behaviors = (slots) => (options) => [
1368
1354
  ...options.policy.scroll.lock ? [scrollLock(slots)({ container: options.layer })] : [],
1369
1355
  ...options.policy.inert ? [hideOutside(slots)({ container: options.layer })] : []
1370
1356
  ];
1371
- //#endregion
1372
- //#region src/interaction/selection.ts
1357
+ // src/interaction/selection.ts
1373
1358
  /**
1374
1359
  * Selection over a set of items: which ids are selected, and the anchor a
1375
1360
  * range extends from. `mode` is `'single'` (a click replaces), `'multiple'`
@@ -1498,8 +1483,7 @@ const behavior$3 = (declared, args) => (slots) => (options) => {
1498
1483
  }
1499
1484
  }, { name: "Selection" });
1500
1485
  };
1501
- //#endregion
1502
- //#region src/interaction/targets.ts
1486
+ // src/interaction/targets.ts
1503
1487
  /**
1504
1488
  * `Targets` as a Behavior: attaches the `foldkit-primitives/dom` Mount to a
1505
1489
  * container slot and maps what it reports into the view's Messages. No Bundle:
@@ -1520,8 +1504,7 @@ const behavior$2 = (slots) => (options) => Behavior.forSlots(slots)({ [options.c
1520
1504
  preventDefault: options.preventDefault ?? false
1521
1505
  }), options.toMessage)
1522
1506
  }) }, { name: "Targets" });
1523
- //#endregion
1524
- //#region src/interaction/pointer-drag.ts
1507
+ // src/interaction/pointer-drag.ts
1525
1508
  /**
1526
1509
  * `PointerDrag` as a Behavior: attaches the `foldkit-primitives/dom` Mount to
1527
1510
  * a container slot and maps what it reports into the view's Messages. No
@@ -1549,8 +1532,7 @@ const behavior$1 = (slots) => (options) => Behavior.forSlots(slots)({ [options.c
1549
1532
  ...options.part === void 0 ? {} : { part: options.part }
1550
1533
  }), options.toMessage)
1551
1534
  }) }, { name: "PointerDrag" });
1552
- //#endregion
1553
- //#region src/interaction/placing.ts
1535
+ // src/interaction/placing.ts
1554
1536
  /**
1555
1537
  * Keeps a floating panel inside the viewport: on insert it shifts left past
1556
1538
  * the right edge and flips above its trigger when the bottom overflows and
@@ -1797,8 +1779,7 @@ const keepWithin = (slots) => (options) => Behavior.forSlots(slots)({ [options.p
1797
1779
  requires: { capability: Capability.Container },
1798
1780
  mount: () => KeepWithin()
1799
1781
  }) }, { name: "KeepWithin" });
1800
- //#endregion
1801
- //#region src/interaction/tree-navigation.ts
1782
+ // src/interaction/tree-navigation.ts
1802
1783
  /**
1803
1784
  * Keyboard navigation of a tree (a file explorer, a page's layers, a nested
1804
1785
  * menu), after the WAI-ARIA tree pattern: one tab stop, Up and Down through the
@@ -2006,7 +1987,6 @@ const behavior = (declared, args) => (slots) => (options) => {
2006
1987
  })
2007
1988
  }, { name: "TreeNavigation" });
2008
1989
  };
2009
- //#endregion
2010
1990
  export { bundle_behavior_exports as BundleBehavior, dismiss_layer_exports as DismissLayer, editable_text_exports as EditableText, focus_scope_exports as FocusScope, focus_visible_exports as FocusVisible, grid_navigation_exports as GridNavigation, layers_exports as Layers, list_navigation_exports as ListNavigation, live_announce_exports as LiveAnnounce, long_press_exports as LongPress, move_exports as Move, overlay_exports as Overlay, placing_exports as Placing, pointer_drag_exports as PointerDrag, press_exports as Press, roving_tabindex_exports as RovingTabindex, selection_exports as Selection, targets_exports as Targets, tree_navigation_exports as TreeNavigation, typeahead_exports as Typeahead };
2011
1991
 
2012
1992
  //# sourceMappingURL=index.mjs.map