@sprawlify/primitives 0.0.111 → 0.0.112

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 (105) hide show
  1. package/dist/collection.d.cts +2 -2
  2. package/dist/collection.d.mts +2 -2
  3. package/dist/{focus-visible-GXKbbuiq.mjs → focus-visible-BuLf8M9F.mjs} +10 -9
  4. package/dist/{focus-visible-JdJXqMic.cjs → focus-visible-Co_9bW09.cjs} +14 -7
  5. package/dist/focus-visible.cjs +2 -1
  6. package/dist/focus-visible.d.cts +2 -1
  7. package/dist/focus-visible.d.mts +2 -1
  8. package/dist/focus-visible.mjs +2 -2
  9. package/dist/{list-collection-Cjgbx_9l.d.cts → list-collection-B_8BN0XB.d.cts} +1 -1
  10. package/dist/{list-collection-IF510iNl.d.mts → list-collection-DkRA5LOq.d.mts} +1 -1
  11. package/dist/machines/angle-slider/index.d.cts +1 -1
  12. package/dist/machines/angle-slider/index.d.mts +1 -1
  13. package/dist/machines/carousel/index.d.cts +1 -1
  14. package/dist/machines/carousel/index.d.mts +1 -1
  15. package/dist/machines/cascade-select/index.cjs +7 -2
  16. package/dist/machines/cascade-select/index.d.cts +2 -2
  17. package/dist/machines/cascade-select/index.d.mts +2 -2
  18. package/dist/machines/cascade-select/index.mjs +7 -2
  19. package/dist/machines/checkbox/index.cjs +1 -1
  20. package/dist/machines/checkbox/index.d.cts +1 -1
  21. package/dist/machines/checkbox/index.d.mts +1 -1
  22. package/dist/machines/checkbox/index.mjs +1 -1
  23. package/dist/machines/clipboard/index.d.cts +1 -1
  24. package/dist/machines/clipboard/index.d.mts +1 -1
  25. package/dist/machines/collapsible/index.d.cts +1 -1
  26. package/dist/machines/collapsible/index.d.mts +1 -1
  27. package/dist/machines/color-picker/index.d.cts +1 -1
  28. package/dist/machines/color-picker/index.d.mts +1 -1
  29. package/dist/machines/combobox/index.cjs +9 -3
  30. package/dist/machines/combobox/index.d.cts +2 -2
  31. package/dist/machines/combobox/index.d.mts +2 -2
  32. package/dist/machines/combobox/index.mjs +9 -3
  33. package/dist/machines/date-picker/index.d.cts +1 -1
  34. package/dist/machines/date-picker/index.d.mts +1 -1
  35. package/dist/machines/dialog/index.d.cts +1 -1
  36. package/dist/machines/dialog/index.d.mts +1 -1
  37. package/dist/machines/drawer/index.d.cts +1 -1
  38. package/dist/machines/drawer/index.d.mts +1 -1
  39. package/dist/machines/dropdown-menu/index.cjs +7 -2
  40. package/dist/machines/dropdown-menu/index.d.cts +1 -1
  41. package/dist/machines/dropdown-menu/index.d.mts +1 -1
  42. package/dist/machines/dropdown-menu/index.mjs +7 -2
  43. package/dist/machines/file-upload/index.d.cts +1 -1
  44. package/dist/machines/file-upload/index.d.mts +1 -1
  45. package/dist/machines/floating-panel/index.d.cts +1 -1
  46. package/dist/machines/floating-panel/index.d.mts +1 -1
  47. package/dist/machines/hover-card/index.d.cts +1 -1
  48. package/dist/machines/hover-card/index.d.mts +1 -1
  49. package/dist/machines/image-cropper/index.d.cts +1 -1
  50. package/dist/machines/image-cropper/index.d.mts +1 -1
  51. package/dist/machines/listbox/index.cjs +1 -1
  52. package/dist/machines/listbox/index.d.cts +3 -3
  53. package/dist/machines/listbox/index.d.mts +3 -3
  54. package/dist/machines/listbox/index.mjs +1 -1
  55. package/dist/machines/marquee/index.d.cts +3 -3
  56. package/dist/machines/marquee/index.d.mts +3 -3
  57. package/dist/machines/navigation-menu/index.d.cts +1 -1
  58. package/dist/machines/navigation-menu/index.d.mts +1 -1
  59. package/dist/machines/number-input/index.d.cts +1 -1
  60. package/dist/machines/number-input/index.d.mts +1 -1
  61. package/dist/machines/pagination/index.d.cts +1 -1
  62. package/dist/machines/pagination/index.d.mts +1 -1
  63. package/dist/machines/password-input/index.d.cts +1 -1
  64. package/dist/machines/password-input/index.d.mts +1 -1
  65. package/dist/machines/popover/index.d.cts +1 -1
  66. package/dist/machines/popover/index.d.mts +1 -1
  67. package/dist/machines/progress/index.d.cts +1 -1
  68. package/dist/machines/progress/index.d.mts +1 -1
  69. package/dist/machines/radio-group/index.cjs +1 -1
  70. package/dist/machines/radio-group/index.d.cts +1 -1
  71. package/dist/machines/radio-group/index.d.mts +1 -1
  72. package/dist/machines/radio-group/index.mjs +1 -1
  73. package/dist/machines/scroll-area/index.d.cts +1 -1
  74. package/dist/machines/scroll-area/index.d.mts +1 -1
  75. package/dist/machines/select/index.cjs +7 -2
  76. package/dist/machines/select/index.d.cts +2 -2
  77. package/dist/machines/select/index.d.mts +2 -2
  78. package/dist/machines/select/index.mjs +7 -2
  79. package/dist/machines/signature-pad/index.d.cts +1 -1
  80. package/dist/machines/signature-pad/index.d.mts +1 -1
  81. package/dist/machines/slider/index.d.cts +1 -1
  82. package/dist/machines/slider/index.d.mts +1 -1
  83. package/dist/machines/splitter/index.d.cts +1 -1
  84. package/dist/machines/splitter/index.d.mts +1 -1
  85. package/dist/machines/steps/index.d.cts +1 -1
  86. package/dist/machines/steps/index.d.mts +1 -1
  87. package/dist/machines/switch/index.cjs +1 -1
  88. package/dist/machines/switch/index.mjs +1 -1
  89. package/dist/machines/tabs/index.d.cts +1 -1
  90. package/dist/machines/tabs/index.d.mts +1 -1
  91. package/dist/machines/tags-input/index.d.cts +1 -1
  92. package/dist/machines/tags-input/index.d.mts +1 -1
  93. package/dist/machines/timer/index.d.cts +1 -1
  94. package/dist/machines/timer/index.d.mts +1 -1
  95. package/dist/machines/toast/index.d.cts +3 -3
  96. package/dist/machines/toast/index.d.mts +3 -3
  97. package/dist/machines/tooltip/index.cjs +6 -6
  98. package/dist/machines/tooltip/index.d.cts +1 -1
  99. package/dist/machines/tooltip/index.d.mts +1 -1
  100. package/dist/machines/tooltip/index.mjs +7 -7
  101. package/dist/machines/tour/index.d.cts +1 -1
  102. package/dist/machines/tour/index.d.mts +1 -1
  103. package/dist/{selection-BmS2RDMq.d.cts → selection-Bb_ZSVxe.d.cts} +1 -1
  104. package/dist/{selection-6urf-c8j.d.mts → selection-DdNvrKbj.d.mts} +1 -1
  105. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  import { a as CollectionSearchState, c as FlatTreeNode, d as TreeCollectionMethods, f as TreeCollectionOptions, g as ValuePath, i as CollectionSearchOptions, l as FlatTreeNodeMeta, m as TreeSkipFn, n as CollectionMethods, p as TreeNode, r as CollectionOptions, s as FilePathTreeNode, t as CollectionItem, u as IndexPath } from "./types-D-7AMgSE.cjs";
2
- import { n as isListCollection, t as ListCollection } from "./list-collection-Cjgbx_9l.cjs";
3
- import { a as isGridCollection, i as GridCollectionOptions, n as SelectionMode, r as GridCollection, t as Selection } from "./selection-BmS2RDMq.cjs";
2
+ import { n as isListCollection, t as ListCollection } from "./list-collection-B_8BN0XB.cjs";
3
+ import { a as isGridCollection, i as GridCollectionOptions, n as SelectionMode, r as GridCollection, t as Selection } from "./selection-Bb_ZSVxe.cjs";
4
4
  import { n as filePathToTree, r as flattenedToTree, t as TreeCollection } from "./tree-collection-DlqV5kYO.cjs";
5
5
  export { CollectionItem, CollectionMethods, CollectionOptions, CollectionSearchOptions, CollectionSearchState, FilePathTreeNode, FlatTreeNode, FlatTreeNodeMeta, GridCollection, GridCollectionOptions, IndexPath, ListCollection, Selection, SelectionMode, TreeCollection, TreeCollectionMethods, TreeCollectionOptions, TreeNode, TreeSkipFn, ValuePath, filePathToTree, flattenedToTree, isGridCollection, isListCollection };
@@ -1,5 +1,5 @@
1
1
  import { a as CollectionSearchState, c as FlatTreeNode, d as TreeCollectionMethods, f as TreeCollectionOptions, g as ValuePath, i as CollectionSearchOptions, l as FlatTreeNodeMeta, m as TreeSkipFn, n as CollectionMethods, p as TreeNode, r as CollectionOptions, s as FilePathTreeNode, t as CollectionItem, u as IndexPath } from "./types-9uw8LHpE.mjs";
2
- import { n as isListCollection, t as ListCollection } from "./list-collection-IF510iNl.mjs";
3
- import { a as isGridCollection, i as GridCollectionOptions, n as SelectionMode, r as GridCollection, t as Selection } from "./selection-6urf-c8j.mjs";
2
+ import { n as isListCollection, t as ListCollection } from "./list-collection-DkRA5LOq.mjs";
3
+ import { a as isGridCollection, i as GridCollectionOptions, n as SelectionMode, r as GridCollection, t as Selection } from "./selection-DdNvrKbj.mjs";
4
4
  import { n as filePathToTree, r as flattenedToTree, t as TreeCollection } from "./tree-collection-Dlf9EUrT.mjs";
5
5
  export { CollectionItem, CollectionMethods, CollectionOptions, CollectionSearchOptions, CollectionSearchState, FilePathTreeNode, FlatTreeNode, FlatTreeNodeMeta, GridCollection, GridCollectionOptions, IndexPath, ListCollection, Selection, SelectionMode, TreeCollection, TreeCollectionMethods, TreeCollectionOptions, TreeNode, TreeSkipFn, ValuePath, filePathToTree, flattenedToTree, isGridCollection, isListCollection };
@@ -1,4 +1,4 @@
1
- import { Bt as isMac, Ot as isVirtualClick, ht as getEventTarget, on as getWindow, tn as getDocument } from "./dom-query-BFuRs3l4.mjs";
1
+ import { Bt as isMac, Ot as isVirtualClick, en as getActiveElement, ht as getEventTarget, on as getWindow, tn as getDocument } from "./dom-query-BFuRs3l4.mjs";
2
2
  //#region src/shared/focus-visible/index.ts
3
3
  function isValidKey(e) {
4
4
  return !(e.metaKey || !isMac() && e.altKey || e.ctrlKey || e.key === "Control" || e.key === "Shift" || e.key === "Meta");
@@ -15,9 +15,11 @@ const nonTextInputTypes = new Set([
15
15
  "reset"
16
16
  ]);
17
17
  function isKeyboardFocusEvent(isTextInput, modality, e) {
18
- const target = e ? getEventTarget(e) : null;
19
- const win = getWindow(target);
20
- isTextInput = isTextInput || target instanceof win.HTMLInputElement && !nonTextInputTypes.has(target?.type) || target instanceof win.HTMLTextAreaElement || target instanceof win.HTMLElement && target.isContentEditable;
18
+ const eventTarget = e ? getEventTarget(e) : null;
19
+ const doc = getDocument(eventTarget);
20
+ const win = getWindow(eventTarget);
21
+ const activeElement = getActiveElement(doc);
22
+ isTextInput = isTextInput || activeElement instanceof win.HTMLInputElement && !nonTextInputTypes.has(activeElement?.type) || activeElement instanceof win.HTMLTextAreaElement || activeElement instanceof win.HTMLElement && activeElement.isContentEditable;
21
23
  return !(isTextInput && modality === "keyboard" && e instanceof win.KeyboardEvent && !Reflect.has(FOCUS_VISIBLE_INPUT_KEYS, e.key));
22
24
  }
23
25
  let currentModality = null;
@@ -25,6 +27,7 @@ let changeHandlers = /* @__PURE__ */ new Set();
25
27
  let listenerMap = /* @__PURE__ */ new Map();
26
28
  let hasEventBeforeFocus = false;
27
29
  let hasBlurredWindowRecently = false;
30
+ let ignoreFocusEvent = false;
28
31
  const FOCUS_VISIBLE_INPUT_KEYS = {
29
32
  Tab: true,
30
33
  Escape: true
@@ -54,7 +57,7 @@ function handleClickEvent(e) {
54
57
  }
55
58
  function handleFocusEvent(e) {
56
59
  const target = getEventTarget(e);
57
- if (target === getWindow(target) || target === getDocument(target)) return;
60
+ if (target === getWindow(target) || target === getDocument(target) || !e.isTrusted) return;
58
61
  if (!hasEventBeforeFocus && !hasBlurredWindowRecently) {
59
62
  currentModality = "virtual";
60
63
  triggerChangeHandlers("virtual", e);
@@ -72,8 +75,6 @@ function setupGlobalFocusEvents(root) {
72
75
  const doc = getDocument(root);
73
76
  let focus = win.HTMLElement.prototype.focus;
74
77
  function patchedFocus() {
75
- currentModality = "virtual";
76
- triggerChangeHandlers("virtual", null);
77
78
  hasEventBeforeFocus = true;
78
79
  focus.apply(this, arguments);
79
80
  }
@@ -148,7 +149,7 @@ function trackInteractionModality(props) {
148
149
  };
149
150
  }
150
151
  function isFocusVisible() {
151
- return currentModality === "keyboard";
152
+ return currentModality === "keyboard" || currentModality === "virtual";
152
153
  }
153
154
  function trackFocusVisible(props = {}) {
154
155
  const { isTextInput, autoFocus, onChange, root } = props;
@@ -170,4 +171,4 @@ function trackFocusVisible(props = {}) {
170
171
  };
171
172
  }
172
173
  //#endregion
173
- export { trackFocusVisible as a, setInteractionModality as i, isFocusVisible as n, trackInteractionModality as o, listenerMap as r, getInteractionModality as t };
174
+ export { setInteractionModality as a, listenerMap as i, ignoreFocusEvent as n, trackFocusVisible as o, isFocusVisible as r, trackInteractionModality as s, getInteractionModality as t };
@@ -15,9 +15,11 @@ const nonTextInputTypes = new Set([
15
15
  "reset"
16
16
  ]);
17
17
  function isKeyboardFocusEvent(isTextInput, modality, e) {
18
- const target = e ? require_dom_query.getEventTarget(e) : null;
19
- const win = require_dom_query.getWindow(target);
20
- isTextInput = isTextInput || target instanceof win.HTMLInputElement && !nonTextInputTypes.has(target?.type) || target instanceof win.HTMLTextAreaElement || target instanceof win.HTMLElement && target.isContentEditable;
18
+ const eventTarget = e ? require_dom_query.getEventTarget(e) : null;
19
+ const doc = require_dom_query.getDocument(eventTarget);
20
+ const win = require_dom_query.getWindow(eventTarget);
21
+ const activeElement = require_dom_query.getActiveElement(doc);
22
+ isTextInput = isTextInput || activeElement instanceof win.HTMLInputElement && !nonTextInputTypes.has(activeElement?.type) || activeElement instanceof win.HTMLTextAreaElement || activeElement instanceof win.HTMLElement && activeElement.isContentEditable;
21
23
  return !(isTextInput && modality === "keyboard" && e instanceof win.KeyboardEvent && !Reflect.has(FOCUS_VISIBLE_INPUT_KEYS, e.key));
22
24
  }
23
25
  let currentModality = null;
@@ -25,6 +27,7 @@ let changeHandlers = /* @__PURE__ */ new Set();
25
27
  let listenerMap = /* @__PURE__ */ new Map();
26
28
  let hasEventBeforeFocus = false;
27
29
  let hasBlurredWindowRecently = false;
30
+ let ignoreFocusEvent = false;
28
31
  const FOCUS_VISIBLE_INPUT_KEYS = {
29
32
  Tab: true,
30
33
  Escape: true
@@ -54,7 +57,7 @@ function handleClickEvent(e) {
54
57
  }
55
58
  function handleFocusEvent(e) {
56
59
  const target = require_dom_query.getEventTarget(e);
57
- if (target === require_dom_query.getWindow(target) || target === require_dom_query.getDocument(target)) return;
60
+ if (target === require_dom_query.getWindow(target) || target === require_dom_query.getDocument(target) || !e.isTrusted) return;
58
61
  if (!hasEventBeforeFocus && !hasBlurredWindowRecently) {
59
62
  currentModality = "virtual";
60
63
  triggerChangeHandlers("virtual", e);
@@ -72,8 +75,6 @@ function setupGlobalFocusEvents(root) {
72
75
  const doc = require_dom_query.getDocument(root);
73
76
  let focus = win.HTMLElement.prototype.focus;
74
77
  function patchedFocus() {
75
- currentModality = "virtual";
76
- triggerChangeHandlers("virtual", null);
77
78
  hasEventBeforeFocus = true;
78
79
  focus.apply(this, arguments);
79
80
  }
@@ -148,7 +149,7 @@ function trackInteractionModality(props) {
148
149
  };
149
150
  }
150
151
  function isFocusVisible() {
151
- return currentModality === "keyboard";
152
+ return currentModality === "keyboard" || currentModality === "virtual";
152
153
  }
153
154
  function trackFocusVisible(props = {}) {
154
155
  const { isTextInput, autoFocus, onChange, root } = props;
@@ -176,6 +177,12 @@ Object.defineProperty(exports, "getInteractionModality", {
176
177
  return getInteractionModality;
177
178
  }
178
179
  });
180
+ Object.defineProperty(exports, "ignoreFocusEvent", {
181
+ enumerable: true,
182
+ get: function() {
183
+ return ignoreFocusEvent;
184
+ }
185
+ });
179
186
  Object.defineProperty(exports, "isFocusVisible", {
180
187
  enumerable: true,
181
188
  get: function() {
@@ -1,7 +1,8 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  require("./dom-query-BUO7rGsg.cjs");
3
- const require_focus_visible = require("./focus-visible-JdJXqMic.cjs");
3
+ const require_focus_visible = require("./focus-visible-Co_9bW09.cjs");
4
4
  exports.getInteractionModality = require_focus_visible.getInteractionModality;
5
+ exports.ignoreFocusEvent = require_focus_visible.ignoreFocusEvent;
5
6
  exports.isFocusVisible = require_focus_visible.isFocusVisible;
6
7
  exports.listenerMap = require_focus_visible.listenerMap;
7
8
  exports.setInteractionModality = require_focus_visible.setInteractionModality;
@@ -5,6 +5,7 @@ interface GlobalListenerData {
5
5
  focus: VoidFunction;
6
6
  }
7
7
  declare let listenerMap: Map<Window, GlobalListenerData>;
8
+ declare let ignoreFocusEvent: boolean;
8
9
  declare function getInteractionModality(): Modality | null;
9
10
  declare function setInteractionModality(modality: Modality): void;
10
11
  interface InteractionModalityChangeDetails {
@@ -28,4 +29,4 @@ interface FocusVisibleProps {
28
29
  }
29
30
  declare function trackFocusVisible(props?: FocusVisibleProps): VoidFunction;
30
31
  //#endregion
31
- export { FocusVisibleChangeDetails, FocusVisibleProps, InteractionModalityChangeDetails, InteractionModalityProps, Modality, getInteractionModality, isFocusVisible, listenerMap, setInteractionModality, trackFocusVisible, trackInteractionModality };
32
+ export { FocusVisibleChangeDetails, FocusVisibleProps, InteractionModalityChangeDetails, InteractionModalityProps, Modality, getInteractionModality, ignoreFocusEvent, isFocusVisible, listenerMap, setInteractionModality, trackFocusVisible, trackInteractionModality };
@@ -5,6 +5,7 @@ interface GlobalListenerData {
5
5
  focus: VoidFunction;
6
6
  }
7
7
  declare let listenerMap: Map<Window, GlobalListenerData>;
8
+ declare let ignoreFocusEvent: boolean;
8
9
  declare function getInteractionModality(): Modality | null;
9
10
  declare function setInteractionModality(modality: Modality): void;
10
11
  interface InteractionModalityChangeDetails {
@@ -28,4 +29,4 @@ interface FocusVisibleProps {
28
29
  }
29
30
  declare function trackFocusVisible(props?: FocusVisibleProps): VoidFunction;
30
31
  //#endregion
31
- export { FocusVisibleChangeDetails, FocusVisibleProps, InteractionModalityChangeDetails, InteractionModalityProps, Modality, getInteractionModality, isFocusVisible, listenerMap, setInteractionModality, trackFocusVisible, trackInteractionModality };
32
+ export { FocusVisibleChangeDetails, FocusVisibleProps, InteractionModalityChangeDetails, InteractionModalityProps, Modality, getInteractionModality, ignoreFocusEvent, isFocusVisible, listenerMap, setInteractionModality, trackFocusVisible, trackInteractionModality };
@@ -1,3 +1,3 @@
1
1
  import "./dom-query-BFuRs3l4.mjs";
2
- import { a as trackFocusVisible, i as setInteractionModality, n as isFocusVisible, o as trackInteractionModality, r as listenerMap, t as getInteractionModality } from "./focus-visible-GXKbbuiq.mjs";
3
- export { getInteractionModality, isFocusVisible, listenerMap, setInteractionModality, trackFocusVisible, trackInteractionModality };
2
+ import { a as setInteractionModality, i as listenerMap, n as ignoreFocusEvent, o as trackFocusVisible, r as isFocusVisible, s as trackInteractionModality, t as getInteractionModality } from "./focus-visible-BuLf8M9F.mjs";
3
+ export { getInteractionModality, ignoreFocusEvent, isFocusVisible, listenerMap, setInteractionModality, trackFocusVisible, trackInteractionModality };
@@ -46,7 +46,7 @@ declare class ListCollection<T extends CollectionItem = CollectionItem> {
46
46
  moveBefore: (value: string, ...values: string[]) => ListCollection<T>;
47
47
  moveAfter: (value: string, ...values: string[]) => ListCollection<T>;
48
48
  reorder: (fromIndex: number, toIndex: number) => ListCollection<T>;
49
- compareValue: (a: string, b: string) => 1 | 0 | -1;
49
+ compareValue: (a: string, b: string) => 0 | 1 | -1;
50
50
  private range;
51
51
  getValueRange: (from: string | null, to: string | null) => string[];
52
52
  toString: () => string;
@@ -46,7 +46,7 @@ declare class ListCollection<T extends CollectionItem = CollectionItem> {
46
46
  moveBefore: (value: string, ...values: string[]) => ListCollection<T>;
47
47
  moveAfter: (value: string, ...values: string[]) => ListCollection<T>;
48
48
  reorder: (fromIndex: number, toIndex: number) => ListCollection<T>;
49
- compareValue: (a: string, b: string) => 1 | 0 | -1;
49
+ compareValue: (a: string, b: string) => 0 | 1 | -1;
50
50
  private range;
51
51
  getValueRange: (from: string | null, to: string | null) => string[];
52
52
  toString: () => string;
@@ -3,7 +3,7 @@ import { p as Machine, u as EventObject, y as Service } from "../../types-B24gMT
3
3
  import { b as NormalizeProps, g as RequiredBy, r as DirectionProperty, t as CommonProperties, x as PropTypes } from "../../index-CLRsezW5.cjs";
4
4
 
5
5
  //#region src/machines/angle-slider/angle-slider.anatomy.d.ts
6
- declare const anatomy: AnatomyInstance<"root" | "label" | "control" | "track" | "thumb" | "valueText" | "markerGroup" | "marker">;
6
+ declare const anatomy: AnatomyInstance<"root" | "label" | "control" | "thumb" | "track" | "marker" | "valueText" | "markerGroup">;
7
7
  //#endregion
8
8
  //#region src/machines/angle-slider/angle-slider.types.d.ts
9
9
  interface ValueChangeDetails {
@@ -3,7 +3,7 @@ import { p as Machine, u as EventObject, y as Service } from "../../types-DUM9rz
3
3
  import { b as NormalizeProps, g as RequiredBy, r as DirectionProperty, t as CommonProperties, x as PropTypes } from "../../index-BVFlU3b9.mjs";
4
4
 
5
5
  //#region src/machines/angle-slider/angle-slider.anatomy.d.ts
6
- declare const anatomy: AnatomyInstance<"root" | "label" | "control" | "track" | "thumb" | "valueText" | "markerGroup" | "marker">;
6
+ declare const anatomy: AnatomyInstance<"root" | "label" | "control" | "thumb" | "track" | "marker" | "valueText" | "markerGroup">;
7
7
  //#endregion
8
8
  //#region src/machines/angle-slider/angle-slider.types.d.ts
9
9
  interface ValueChangeDetails {
@@ -3,7 +3,7 @@ import { p as Machine, u as EventObject, y as Service } from "../../types-B24gMT
3
3
  import { b as NormalizeProps, d as Orientation, f as OrientationProperty, g as RequiredBy, r as DirectionProperty, t as CommonProperties, x as PropTypes } from "../../index-CLRsezW5.cjs";
4
4
 
5
5
  //#region src/machines/carousel/carousel.anatomy.d.ts
6
- declare const anatomy: AnatomyInstance<"root" | "control" | "indicator" | "item" | "itemGroup" | "nextTrigger" | "prevTrigger" | "indicatorGroup" | "autoplayTrigger" | "progressText">;
6
+ declare const anatomy: AnatomyInstance<"root" | "indicator" | "control" | "item" | "prevTrigger" | "nextTrigger" | "itemGroup" | "indicatorGroup" | "autoplayTrigger" | "progressText">;
7
7
  //#endregion
8
8
  //#region src/machines/carousel/carousel.types.d.ts
9
9
  interface PageChangeDetails {
@@ -3,7 +3,7 @@ import { p as Machine, u as EventObject, y as Service } from "../../types-DUM9rz
3
3
  import { b as NormalizeProps, d as Orientation, f as OrientationProperty, g as RequiredBy, r as DirectionProperty, t as CommonProperties, x as PropTypes } from "../../index-BVFlU3b9.mjs";
4
4
 
5
5
  //#region src/machines/carousel/carousel.anatomy.d.ts
6
- declare const anatomy: AnatomyInstance<"root" | "control" | "indicator" | "item" | "itemGroup" | "nextTrigger" | "prevTrigger" | "indicatorGroup" | "autoplayTrigger" | "progressText">;
6
+ declare const anatomy: AnatomyInstance<"root" | "indicator" | "control" | "item" | "prevTrigger" | "nextTrigger" | "itemGroup" | "indicatorGroup" | "autoplayTrigger" | "progressText">;
7
7
  //#endregion
8
8
  //#region src/machines/carousel/carousel.types.d.ts
9
9
  interface PageChangeDetails {
@@ -6,6 +6,7 @@ const require_collection = require("../../collection-BBgC8xCb.cjs");
6
6
  const require_core = require("../../core-DwdPztGA.cjs");
7
7
  require("../../interact-outside-Bg-QSXqp.cjs");
8
8
  const require_dismissable = require("../../dismissable-DxjbwsOf.cjs");
9
+ const require_focus_visible = require("../../focus-visible-Co_9bW09.cjs");
9
10
  const require_popper = require("../../popper-viCrafLC.cjs");
10
11
  const require_rect_utils = require("../../rect-utils-D3RkAaHK.cjs");
11
12
  const require_create_props = require("../../create-props-DP39rHnH.cjs");
@@ -749,6 +750,7 @@ const machine = require_core.createMachine({
749
750
  exit: ["clearHighlightedValue", "scrollContentToTop"],
750
751
  effects: [
751
752
  "trackDismissableElement",
753
+ "trackFocusVisible",
752
754
  "computePlacement",
753
755
  "scrollToHighlightedItems"
754
756
  ],
@@ -973,6 +975,9 @@ const machine = require_core.createMachine({
973
975
  }
974
976
  });
975
977
  },
978
+ trackFocusVisible({ scope }) {
979
+ return require_focus_visible.trackFocusVisible({ root: scope.getRootNode?.() });
980
+ },
976
981
  trackDismissableElement({ scope, send, prop }) {
977
982
  const contentEl = () => dom.getContentEl(scope);
978
983
  let restoreFocus = true;
@@ -1004,13 +1009,13 @@ const machine = require_core.createMachine({
1004
1009
  }
1005
1010
  });
1006
1011
  },
1007
- scrollToHighlightedItems({ context, prop, scope, event }) {
1012
+ scrollToHighlightedItems({ context, prop, scope }) {
1008
1013
  let cleanups = [];
1009
1014
  const exec = (immediate) => {
1010
1015
  const highlightedValue = context.get("highlightedValue");
1011
1016
  const highlightedIndexPath = context.get("highlightedIndexPath");
1012
1017
  if (!highlightedIndexPath.length) return;
1013
- if (event.current().type.includes("POINTER")) return;
1018
+ if (require_focus_visible.getInteractionModality() !== "keyboard") return;
1014
1019
  dom.getListEls(scope).forEach((listEl, index) => {
1015
1020
  const itemPath = highlightedIndexPath.slice(0, index + 1);
1016
1021
  const itemEl = dom.getItemEl(scope, highlightedValue.toString());
@@ -8,8 +8,8 @@ import { c as Placement, d as PositioningOptions } from "../../types-CZAtqGqH.cj
8
8
  import { a as Point } from "../../types-CLXYEgfm.cjs";
9
9
 
10
10
  //#region src/machines/cascade-select/cascade-select.anatomy.d.ts
11
- declare const anatomy: AnatomyInstance<"root" | "label" | "control" | "indicator" | "valueText" | "trigger" | "item" | "itemIndicator" | "content" | "positioner" | "itemText" | "list" | "clearTrigger">;
12
- declare const parts: Record<"root" | "label" | "control" | "indicator" | "valueText" | "trigger" | "item" | "itemIndicator" | "content" | "positioner" | "itemText" | "list" | "clearTrigger", AnatomyPart>;
11
+ declare const anatomy: AnatomyInstance<"root" | "indicator" | "label" | "control" | "content" | "item" | "itemIndicator" | "itemText" | "trigger" | "valueText" | "clearTrigger" | "positioner" | "list">;
12
+ declare const parts: Record<"root" | "indicator" | "label" | "control" | "content" | "item" | "itemIndicator" | "itemText" | "trigger" | "valueText" | "clearTrigger" | "positioner" | "list", AnatomyPart>;
13
13
  //#endregion
14
14
  //#region src/machines/cascade-select/cascade-select.collection.d.ts
15
15
  declare const collection: {
@@ -8,8 +8,8 @@ import { p as PositioningOptions, u as Placement } from "../../index-fMh0VDkR.mj
8
8
  import { a as Point } from "../../types-DU764tY_.mjs";
9
9
 
10
10
  //#region src/machines/cascade-select/cascade-select.anatomy.d.ts
11
- declare const anatomy: AnatomyInstance<"root" | "label" | "control" | "indicator" | "valueText" | "trigger" | "item" | "itemIndicator" | "content" | "positioner" | "itemText" | "list" | "clearTrigger">;
12
- declare const parts: Record<"root" | "label" | "control" | "indicator" | "valueText" | "trigger" | "item" | "itemIndicator" | "content" | "positioner" | "itemText" | "list" | "clearTrigger", AnatomyPart>;
11
+ declare const anatomy: AnatomyInstance<"root" | "indicator" | "label" | "control" | "content" | "item" | "itemIndicator" | "itemText" | "trigger" | "valueText" | "clearTrigger" | "positioner" | "list">;
12
+ declare const parts: Record<"root" | "indicator" | "label" | "control" | "content" | "item" | "itemIndicator" | "itemText" | "trigger" | "valueText" | "clearTrigger" | "positioner" | "list", AnatomyPart>;
13
13
  //#endregion
14
14
  //#region src/machines/cascade-select/cascade-select.collection.d.ts
15
15
  declare const collection: {
@@ -5,6 +5,7 @@ import { t as TreeCollection } from "../../collection-DgzidRvr.mjs";
5
5
  import { a as createMachine, i as createGuards } from "../../core-Ci9Yu6QI.mjs";
6
6
  import "../../interact-outside-Ba50N1a5.mjs";
7
7
  import { n as trackDismissableElement } from "../../dismissable-B9k5K6f9.mjs";
8
+ import { o as trackFocusVisible, t as getInteractionModality } from "../../focus-visible-BuLf8M9F.mjs";
8
9
  import { n as getPlacement, t as getPlacementStyles } from "../../popper-BlgbmdAn.mjs";
9
10
  import { B as getRectCorners, D as closestSideToPoint, L as createPoint, R as createRect, i as isPointInPolygon } from "../../rect-utils-B5xqFvKC.mjs";
10
11
  import { t as createProps } from "../../create-props-DFW8DUsC.mjs";
@@ -748,6 +749,7 @@ const machine = createMachine({
748
749
  exit: ["clearHighlightedValue", "scrollContentToTop"],
749
750
  effects: [
750
751
  "trackDismissableElement",
752
+ "trackFocusVisible",
751
753
  "computePlacement",
752
754
  "scrollToHighlightedItems"
753
755
  ],
@@ -972,6 +974,9 @@ const machine = createMachine({
972
974
  }
973
975
  });
974
976
  },
977
+ trackFocusVisible({ scope }) {
978
+ return trackFocusVisible({ root: scope.getRootNode?.() });
979
+ },
975
980
  trackDismissableElement({ scope, send, prop }) {
976
981
  const contentEl = () => dom.getContentEl(scope);
977
982
  let restoreFocus = true;
@@ -1003,13 +1008,13 @@ const machine = createMachine({
1003
1008
  }
1004
1009
  });
1005
1010
  },
1006
- scrollToHighlightedItems({ context, prop, scope, event }) {
1011
+ scrollToHighlightedItems({ context, prop, scope }) {
1007
1012
  let cleanups = [];
1008
1013
  const exec = (immediate) => {
1009
1014
  const highlightedValue = context.get("highlightedValue");
1010
1015
  const highlightedIndexPath = context.get("highlightedIndexPath");
1011
1016
  if (!highlightedIndexPath.length) return;
1012
- if (event.current().type.includes("POINTER")) return;
1017
+ if (getInteractionModality() !== "keyboard") return;
1013
1018
  dom.getListEls(scope).forEach((listEl, index) => {
1014
1019
  const itemPath = highlightedIndexPath.slice(0, index + 1);
1015
1020
  const itemEl = dom.getItemEl(scope, highlightedValue.toString());
@@ -3,7 +3,7 @@ const require_create_anatomy = require("../../create-anatomy-BnwEmNnc.cjs");
3
3
  const require_dom_query = require("../../dom-query-BUO7rGsg.cjs");
4
4
  const require_utils = require("../../utils-ByNiZU8f.cjs");
5
5
  const require_core = require("../../core-DwdPztGA.cjs");
6
- const require_focus_visible = require("../../focus-visible-JdJXqMic.cjs");
6
+ const require_focus_visible = require("../../focus-visible-Co_9bW09.cjs");
7
7
  const require_create_props = require("../../create-props-DP39rHnH.cjs");
8
8
  //#region src/machines/checkbox/checkbox.anatomy.ts
9
9
  const anatomy = require_create_anatomy.createAnatomy("checkbox").parts("root", "label", "control", "indicator");
@@ -3,7 +3,7 @@ import { p as Machine, u as EventObject, y as Service } from "../../types-B24gMT
3
3
  import { b as NormalizeProps, g as RequiredBy, r as DirectionProperty, t as CommonProperties, x as PropTypes } from "../../index-CLRsezW5.cjs";
4
4
 
5
5
  //#region src/machines/checkbox/checkbox.anatomy.d.ts
6
- declare const anatomy: AnatomyInstance<"root" | "label" | "control" | "indicator">;
6
+ declare const anatomy: AnatomyInstance<"root" | "indicator" | "label" | "control">;
7
7
  //#endregion
8
8
  //#region src/machines/checkbox/checkbox.types.d.ts
9
9
  type CheckedState = boolean | "indeterminate";
@@ -3,7 +3,7 @@ import { p as Machine, u as EventObject, y as Service } from "../../types-DUM9rz
3
3
  import { b as NormalizeProps, g as RequiredBy, r as DirectionProperty, t as CommonProperties, x as PropTypes } from "../../index-BVFlU3b9.mjs";
4
4
 
5
5
  //#region src/machines/checkbox/checkbox.anatomy.d.ts
6
- declare const anatomy: AnatomyInstance<"root" | "label" | "control" | "indicator">;
6
+ declare const anatomy: AnatomyInstance<"root" | "indicator" | "label" | "control">;
7
7
  //#endregion
8
8
  //#region src/machines/checkbox/checkbox.types.d.ts
9
9
  type CheckedState = boolean | "indeterminate";
@@ -2,7 +2,7 @@ import { t as createAnatomy } from "../../create-anatomy-Dr0evdYy.mjs";
2
2
  import { T as trackPress, a as visuallyHiddenStyle, ht as getEventTarget, lt as trackFormControl, rt as dispatchInputCheckedEvent, st as setElementChecked, xn as dataAttr } from "../../dom-query-BFuRs3l4.mjs";
3
3
  import { u as createSplitProps } from "../../utils-VVoZ_v29.mjs";
4
4
  import { a as createMachine, i as createGuards } from "../../core-Ci9Yu6QI.mjs";
5
- import { a as trackFocusVisible, n as isFocusVisible } from "../../focus-visible-GXKbbuiq.mjs";
5
+ import { o as trackFocusVisible, r as isFocusVisible } from "../../focus-visible-BuLf8M9F.mjs";
6
6
  import { t as createProps } from "../../create-props-DFW8DUsC.mjs";
7
7
  //#region src/machines/checkbox/checkbox.anatomy.ts
8
8
  const anatomy = createAnatomy("checkbox").parts("root", "label", "control", "indicator");
@@ -3,7 +3,7 @@ import { p as Machine, y as Service } from "../../types-B24gMTKq.cjs";
3
3
  import { b as NormalizeProps, g as RequiredBy, t as CommonProperties, x as PropTypes } from "../../index-CLRsezW5.cjs";
4
4
 
5
5
  //#region src/machines/clipboard/clipboard.anatomy.d.ts
6
- declare const anatomy: AnatomyInstance<"root" | "label" | "control" | "indicator" | "trigger" | "input">;
6
+ declare const anatomy: AnatomyInstance<"root" | "indicator" | "label" | "control" | "input" | "trigger">;
7
7
  //#endregion
8
8
  //#region src/machines/clipboard/clipboard.types.d.ts
9
9
  interface CopyStatusDetails {
@@ -3,7 +3,7 @@ import { p as Machine, y as Service } from "../../types-DUM9rzfD.mjs";
3
3
  import { b as NormalizeProps, g as RequiredBy, t as CommonProperties, x as PropTypes } from "../../index-BVFlU3b9.mjs";
4
4
 
5
5
  //#region src/machines/clipboard/clipboard.anatomy.d.ts
6
- declare const anatomy: AnatomyInstance<"root" | "label" | "control" | "indicator" | "trigger" | "input">;
6
+ declare const anatomy: AnatomyInstance<"root" | "indicator" | "label" | "control" | "input" | "trigger">;
7
7
  //#endregion
8
8
  //#region src/machines/clipboard/clipboard.types.d.ts
9
9
  interface CopyStatusDetails {
@@ -3,7 +3,7 @@ import { p as Machine, y as Service } from "../../types-B24gMTKq.cjs";
3
3
  import { b as NormalizeProps, r as DirectionProperty, t as CommonProperties, x as PropTypes } from "../../index-CLRsezW5.cjs";
4
4
 
5
5
  //#region src/machines/collapsible/collapsible.anatomy.d.ts
6
- declare const anatomy: AnatomyInstance<"root" | "indicator" | "trigger" | "content">;
6
+ declare const anatomy: AnatomyInstance<"root" | "indicator" | "content" | "trigger">;
7
7
  //#endregion
8
8
  //#region src/machines/collapsible/collapsible.types.d.ts
9
9
  interface OpenChangeDetails {
@@ -3,7 +3,7 @@ import { p as Machine, y as Service } from "../../types-DUM9rzfD.mjs";
3
3
  import { b as NormalizeProps, r as DirectionProperty, t as CommonProperties, x as PropTypes } from "../../index-BVFlU3b9.mjs";
4
4
 
5
5
  //#region src/machines/collapsible/collapsible.anatomy.d.ts
6
- declare const anatomy: AnatomyInstance<"root" | "indicator" | "trigger" | "content">;
6
+ declare const anatomy: AnatomyInstance<"root" | "indicator" | "content" | "trigger">;
7
7
  //#endregion
8
8
  //#region src/machines/collapsible/collapsible.types.d.ts
9
9
  interface OpenChangeDetails {
@@ -6,7 +6,7 @@ import { c as PointerDownOutsideEvent, i as InteractOutsideHandlers, n as FocusO
6
6
  import { d as PositioningOptions } from "../../types-CZAtqGqH.cjs";
7
7
 
8
8
  //#region src/machines/color-picker/color-picker.anatomy.d.ts
9
- declare const anatomy: Anatomy<"root" | "label" | "control" | "valueText" | "trigger" | "area" | "content" | "positioner" | "areaThumb" | "areaBackground" | "channelSlider" | "channelSliderLabel" | "channelSliderTrack" | "channelSliderThumb" | "channelSliderValueText" | "channelInput" | "transparencyGrid" | "swatchGroup" | "swatchTrigger" | "swatchIndicator" | "swatch" | "eyeDropperTrigger" | "formatTrigger" | "formatSelect">;
9
+ declare const anatomy: Anatomy<"root" | "label" | "control" | "content" | "trigger" | "area" | "valueText" | "positioner" | "areaThumb" | "areaBackground" | "channelSlider" | "channelSliderLabel" | "channelSliderTrack" | "channelSliderThumb" | "channelSliderValueText" | "channelInput" | "transparencyGrid" | "swatchGroup" | "swatchTrigger" | "swatchIndicator" | "swatch" | "eyeDropperTrigger" | "formatTrigger" | "formatSelect">;
10
10
  //#endregion
11
11
  //#region src/machines/color-picker/color-picker.types.d.ts
12
12
  type ExtendedColorChannel = ColorChannel | "hex" | "css";
@@ -6,7 +6,7 @@ import { c as PointerDownOutsideEvent, i as InteractOutsideHandlers, n as FocusO
6
6
  import { p as PositioningOptions } from "../../index-fMh0VDkR.mjs";
7
7
 
8
8
  //#region src/machines/color-picker/color-picker.anatomy.d.ts
9
- declare const anatomy: Anatomy<"root" | "label" | "control" | "valueText" | "trigger" | "area" | "content" | "positioner" | "areaThumb" | "areaBackground" | "channelSlider" | "channelSliderLabel" | "channelSliderTrack" | "channelSliderThumb" | "channelSliderValueText" | "channelInput" | "transparencyGrid" | "swatchGroup" | "swatchTrigger" | "swatchIndicator" | "swatch" | "eyeDropperTrigger" | "formatTrigger" | "formatSelect">;
9
+ declare const anatomy: Anatomy<"root" | "label" | "control" | "content" | "trigger" | "area" | "valueText" | "positioner" | "areaThumb" | "areaBackground" | "channelSlider" | "channelSliderLabel" | "channelSliderTrack" | "channelSliderThumb" | "channelSliderValueText" | "channelInput" | "transparencyGrid" | "swatchGroup" | "swatchTrigger" | "swatchIndicator" | "swatch" | "eyeDropperTrigger" | "formatTrigger" | "formatSelect">;
10
10
  //#endregion
11
11
  //#region src/machines/color-picker/color-picker.types.d.ts
12
12
  type ExtendedColorChannel = ColorChannel | "hex" | "css";
@@ -6,6 +6,7 @@ const require_collection = require("../../collection-BBgC8xCb.cjs");
6
6
  const require_core = require("../../core-DwdPztGA.cjs");
7
7
  require("../../interact-outside-Bg-QSXqp.cjs");
8
8
  const require_dismissable = require("../../dismissable-DxjbwsOf.cjs");
9
+ const require_focus_visible = require("../../focus-visible-Co_9bW09.cjs");
9
10
  const require_popper = require("../../popper-viCrafLC.cjs");
10
11
  const require_create_props = require("../../create-props-DP39rHnH.cjs");
11
12
  //#region src/machines/combobox/combobox.anatomy.ts
@@ -830,6 +831,7 @@ const machine = createMachine({
830
831
  tags: ["open", "focused"],
831
832
  entry: ["setInitialFocus"],
832
833
  effects: [
834
+ "trackFocusVisible",
833
835
  "scrollToHighlightedItem",
834
836
  "trackDismissableLayer",
835
837
  "trackPlacement"
@@ -978,6 +980,7 @@ const machine = createMachine({
978
980
  suggesting: {
979
981
  tags: ["open", "focused"],
980
982
  effects: [
983
+ "trackFocusVisible",
981
984
  "trackDismissableLayer",
982
985
  "scrollToHighlightedItem",
983
986
  "trackPlacement"
@@ -1152,6 +1155,9 @@ const machine = createMachine({
1152
1155
  hasCollectionItems: ({ prop }) => prop("collection").size > 0
1153
1156
  },
1154
1157
  effects: {
1158
+ trackFocusVisible({ scope }) {
1159
+ return require_focus_visible.trackFocusVisible({ root: scope.getRootNode?.() });
1160
+ },
1155
1161
  trackDismissableLayer({ send, prop, scope }) {
1156
1162
  if (prop("disableLayer")) return;
1157
1163
  const contentEl = () => getContentEl(scope);
@@ -1195,13 +1201,13 @@ const machine = createMachine({
1195
1201
  }
1196
1202
  });
1197
1203
  },
1198
- scrollToHighlightedItem({ context, prop, scope, event }) {
1204
+ scrollToHighlightedItem({ context, prop, scope }) {
1199
1205
  const inputEl = getInputEl(scope);
1200
1206
  let cleanups = [];
1201
1207
  const exec = (immediate) => {
1202
- const pointer = event.current().type.includes("POINTER");
1208
+ if (require_focus_visible.getInteractionModality() !== "keyboard") return;
1203
1209
  const highlightedValue = context.get("highlightedValue");
1204
- if (pointer || !highlightedValue) return;
1210
+ if (!highlightedValue) return;
1205
1211
  const contentEl = getContentEl(scope);
1206
1212
  const scrollToIndexFn = prop("scrollToIndexFn");
1207
1213
  if (scrollToIndexFn) {
@@ -1,13 +1,13 @@
1
1
  import { n as AnatomyInstance } from "../../create-anatomy-9eFQs7lO.cjs";
2
2
  import { r as CollectionOptions, t as CollectionItem } from "../../types-D-7AMgSE.cjs";
3
- import { t as ListCollection } from "../../list-collection-Cjgbx_9l.cjs";
3
+ import { t as ListCollection } from "../../list-collection-B_8BN0XB.cjs";
4
4
  import { p as Machine, u as EventObject, y as Service } from "../../types-B24gMTKq.cjs";
5
5
  import { b as NormalizeProps, g as RequiredBy, r as DirectionProperty, t as CommonProperties, x as PropTypes } from "../../index-CLRsezW5.cjs";
6
6
  import { c as PointerDownOutsideEvent, i as InteractOutsideHandlers, n as FocusOutsideEvent, r as InteractOutsideEvent } from "../../index-DzWGFhcS.cjs";
7
7
  import { c as Placement, d as PositioningOptions } from "../../types-CZAtqGqH.cjs";
8
8
 
9
9
  //#region src/machines/combobox/combobox.anatomy.d.ts
10
- declare const anatomy: AnatomyInstance<"root" | "label" | "control" | "trigger" | "input" | "item" | "itemIndicator" | "itemGroup" | "content" | "positioner" | "itemText" | "list" | "clearTrigger" | "itemGroupLabel">;
10
+ declare const anatomy: AnatomyInstance<"root" | "label" | "control" | "content" | "item" | "itemIndicator" | "input" | "itemText" | "trigger" | "itemGroup" | "clearTrigger" | "positioner" | "list" | "itemGroupLabel">;
11
11
  //#endregion
12
12
  //#region src/machines/combobox/combobox.collection.d.ts
13
13
  declare const collection: {
@@ -1,13 +1,13 @@
1
1
  import { n as AnatomyInstance } from "../../create-anatomy-BedZVdg0.mjs";
2
2
  import { r as CollectionOptions, t as CollectionItem } from "../../types-9uw8LHpE.mjs";
3
- import { t as ListCollection } from "../../list-collection-IF510iNl.mjs";
3
+ import { t as ListCollection } from "../../list-collection-DkRA5LOq.mjs";
4
4
  import { p as Machine, u as EventObject, y as Service } from "../../types-DUM9rzfD.mjs";
5
5
  import { b as NormalizeProps, g as RequiredBy, r as DirectionProperty, t as CommonProperties, x as PropTypes } from "../../index-BVFlU3b9.mjs";
6
6
  import { c as PointerDownOutsideEvent, i as InteractOutsideHandlers, n as FocusOutsideEvent, r as InteractOutsideEvent } from "../../index-CGNNiDyE.mjs";
7
7
  import { p as PositioningOptions, u as Placement } from "../../index-fMh0VDkR.mjs";
8
8
 
9
9
  //#region src/machines/combobox/combobox.anatomy.d.ts
10
- declare const anatomy: AnatomyInstance<"root" | "label" | "control" | "trigger" | "input" | "item" | "itemIndicator" | "itemGroup" | "content" | "positioner" | "itemText" | "list" | "clearTrigger" | "itemGroupLabel">;
10
+ declare const anatomy: AnatomyInstance<"root" | "label" | "control" | "content" | "item" | "itemIndicator" | "input" | "itemText" | "trigger" | "itemGroup" | "clearTrigger" | "positioner" | "list" | "itemGroupLabel">;
11
11
  //#endregion
12
12
  //#region src/machines/combobox/combobox.collection.d.ts
13
13
  declare const collection: {
@@ -5,6 +5,7 @@ import { s as ListCollection } from "../../collection-DgzidRvr.mjs";
5
5
  import { o as setup } from "../../core-Ci9Yu6QI.mjs";
6
6
  import "../../interact-outside-Ba50N1a5.mjs";
7
7
  import { n as trackDismissableElement } from "../../dismissable-B9k5K6f9.mjs";
8
+ import { o as trackFocusVisible, t as getInteractionModality } from "../../focus-visible-BuLf8M9F.mjs";
8
9
  import { n as getPlacement, t as getPlacementStyles } from "../../popper-BlgbmdAn.mjs";
9
10
  import { t as createProps } from "../../create-props-DFW8DUsC.mjs";
10
11
  //#region src/machines/combobox/combobox.anatomy.ts
@@ -829,6 +830,7 @@ const machine = createMachine({
829
830
  tags: ["open", "focused"],
830
831
  entry: ["setInitialFocus"],
831
832
  effects: [
833
+ "trackFocusVisible",
832
834
  "scrollToHighlightedItem",
833
835
  "trackDismissableLayer",
834
836
  "trackPlacement"
@@ -977,6 +979,7 @@ const machine = createMachine({
977
979
  suggesting: {
978
980
  tags: ["open", "focused"],
979
981
  effects: [
982
+ "trackFocusVisible",
980
983
  "trackDismissableLayer",
981
984
  "scrollToHighlightedItem",
982
985
  "trackPlacement"
@@ -1151,6 +1154,9 @@ const machine = createMachine({
1151
1154
  hasCollectionItems: ({ prop }) => prop("collection").size > 0
1152
1155
  },
1153
1156
  effects: {
1157
+ trackFocusVisible({ scope }) {
1158
+ return trackFocusVisible({ root: scope.getRootNode?.() });
1159
+ },
1154
1160
  trackDismissableLayer({ send, prop, scope }) {
1155
1161
  if (prop("disableLayer")) return;
1156
1162
  const contentEl = () => getContentEl(scope);
@@ -1194,13 +1200,13 @@ const machine = createMachine({
1194
1200
  }
1195
1201
  });
1196
1202
  },
1197
- scrollToHighlightedItem({ context, prop, scope, event }) {
1203
+ scrollToHighlightedItem({ context, prop, scope }) {
1198
1204
  const inputEl = getInputEl(scope);
1199
1205
  let cleanups = [];
1200
1206
  const exec = (immediate) => {
1201
- const pointer = event.current().type.includes("POINTER");
1207
+ if (getInteractionModality() !== "keyboard") return;
1202
1208
  const highlightedValue = context.get("highlightedValue");
1203
- if (pointer || !highlightedValue) return;
1209
+ if (!highlightedValue) return;
1204
1210
  const contentEl = getContentEl(scope);
1205
1211
  const scrollToIndexFn = prop("scrollToIndexFn");
1206
1212
  if (scrollToIndexFn) {