v-float 0.7.2 → 0.9.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 (61) hide show
  1. package/LICENSE +20 -20
  2. package/README.md +346 -327
  3. package/dist/composables/index.d.ts +1 -3
  4. package/dist/composables/index.d.ts.map +1 -1
  5. package/dist/composables/interactions/index.d.ts +2 -2
  6. package/dist/composables/interactions/index.d.ts.map +1 -1
  7. package/dist/composables/interactions/navigation-strategies.d.ts +36 -0
  8. package/dist/composables/interactions/navigation-strategies.d.ts.map +1 -0
  9. package/dist/composables/interactions/polygon.d.ts +2 -2
  10. package/dist/composables/interactions/polygon.d.ts.map +1 -1
  11. package/dist/composables/interactions/use-click.d.ts +2 -2
  12. package/dist/composables/interactions/use-click.d.ts.map +1 -1
  13. package/dist/composables/interactions/use-escape-key.d.ts +2 -2
  14. package/dist/composables/interactions/use-escape-key.d.ts.map +1 -1
  15. package/dist/composables/interactions/use-focus-trap.d.ts +41 -0
  16. package/dist/composables/interactions/use-focus-trap.d.ts.map +1 -0
  17. package/dist/composables/interactions/use-focus.d.ts +30 -25
  18. package/dist/composables/interactions/use-focus.d.ts.map +1 -1
  19. package/dist/composables/interactions/use-hover.d.ts +2 -2
  20. package/dist/composables/interactions/use-hover.d.ts.map +1 -1
  21. package/dist/composables/interactions/use-list-navigation.d.ts +109 -0
  22. package/dist/composables/interactions/use-list-navigation.d.ts.map +1 -0
  23. package/dist/composables/middlewares/arrow.d.ts +1 -2
  24. package/dist/composables/middlewares/arrow.d.ts.map +1 -1
  25. package/dist/composables/middlewares/index.d.ts +2 -1
  26. package/dist/composables/middlewares/index.d.ts.map +1 -1
  27. package/dist/composables/positioning/index.d.ts +5 -0
  28. package/dist/composables/positioning/index.d.ts.map +1 -0
  29. package/dist/composables/positioning/use-arrow.d.ts.map +1 -0
  30. package/dist/composables/{interactions → positioning}/use-client-point.d.ts +2 -2
  31. package/dist/composables/positioning/use-client-point.d.ts.map +1 -0
  32. package/dist/composables/{use-floating-tree.d.ts → positioning/use-floating-tree.d.ts} +134 -11
  33. package/dist/composables/positioning/use-floating-tree.d.ts.map +1 -0
  34. package/dist/composables/{use-floating.d.ts → positioning/use-floating.d.ts} +21 -6
  35. package/dist/composables/positioning/use-floating.d.ts.map +1 -0
  36. package/dist/composables/utils/is-using-keyboard.d.ts +2 -0
  37. package/dist/composables/utils/is-using-keyboard.d.ts.map +1 -0
  38. package/dist/composables/utils/use-active-descendant.d.ts +8 -0
  39. package/dist/composables/utils/use-active-descendant.d.ts.map +1 -0
  40. package/dist/types.d.ts +15 -0
  41. package/dist/types.d.ts.map +1 -1
  42. package/dist/utils.d.ts +84 -7
  43. package/dist/utils.d.ts.map +1 -1
  44. package/dist/v-float.es.js +2749 -1836
  45. package/dist/v-float.umd.js +4 -1
  46. package/package.json +74 -76
  47. package/dist/composables/interactions/use-client-point.d.ts.map +0 -1
  48. package/dist/composables/interactions/utils/browser-detection.d.ts +0 -23
  49. package/dist/composables/interactions/utils/browser-detection.d.ts.map +0 -1
  50. package/dist/composables/interactions/utils/element-detection.d.ts +0 -53
  51. package/dist/composables/interactions/utils/element-detection.d.ts.map +0 -1
  52. package/dist/composables/interactions/utils/event-utils.d.ts +0 -30
  53. package/dist/composables/interactions/utils/event-utils.d.ts.map +0 -1
  54. package/dist/composables/interactions/utils/index.d.ts +0 -11
  55. package/dist/composables/interactions/utils/index.d.ts.map +0 -1
  56. package/dist/composables/interactions/utils/tree-context.d.ts +0 -32
  57. package/dist/composables/interactions/utils/tree-context.d.ts.map +0 -1
  58. package/dist/composables/use-arrow.d.ts.map +0 -1
  59. package/dist/composables/use-floating-tree.d.ts.map +0 -1
  60. package/dist/composables/use-floating.d.ts.map +0 -1
  61. /package/dist/composables/{use-arrow.d.ts → positioning/use-arrow.d.ts} +0 -0
@@ -1,6 +1,4 @@
1
+ export * from './positioning';
1
2
  export * from './interactions';
2
3
  export * from './middlewares';
3
- export * from './use-arrow';
4
- export * from './use-floating';
5
- export * from './use-floating-tree';
6
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/composables/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,eAAe,CAAA;AAC7B,cAAc,aAAa,CAAA;AAC3B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,qBAAqB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/composables/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,eAAe,CAAA"}
@@ -1,7 +1,7 @@
1
1
  export * from './use-click';
2
- export { type AxisConstraint, type Coordinates, type TrackingMode, type UseClientPointContext, type UseClientPointOptions, type UseClientPointReturn, useClientPoint, } from './use-client-point';
3
2
  export * from './use-escape-key';
4
3
  export * from './use-focus';
5
4
  export * from './use-hover';
6
- export * from './utils';
5
+ export * from './use-list-navigation';
6
+ export * from './use-focus-trap';
7
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/composables/interactions/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EACzB,cAAc,GACf,MAAM,oBAAoB,CAAA;AAC3B,cAAc,kBAAkB,CAAA;AAChC,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,SAAS,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/composables/interactions/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,kBAAkB,CAAA;AAChC,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,uBAAuB,CAAA;AACrC,cAAc,kBAAkB,CAAA"}
@@ -0,0 +1,36 @@
1
+ export type NavigationAction = {
2
+ type: "navigate";
3
+ index: number | null;
4
+ } | {
5
+ type: "close";
6
+ };
7
+ export interface StrategyContext {
8
+ current: number | null;
9
+ items: Array<HTMLElement | null>;
10
+ isRtl: boolean;
11
+ loop: boolean;
12
+ allowEscape: boolean;
13
+ isVirtual: boolean;
14
+ cols: number;
15
+ nested: boolean;
16
+ isDisabled: (index: number) => boolean;
17
+ findNextEnabled: (start: number, dir: 1 | -1, wrap: boolean) => number | null;
18
+ getFirstEnabledIndex: () => number | null;
19
+ getLastEnabledIndex: () => number | null;
20
+ }
21
+ export interface NavigationStrategy {
22
+ handleKey(key: string, context: StrategyContext): NavigationAction | null;
23
+ }
24
+ export declare class VerticalNavigationStrategy implements NavigationStrategy {
25
+ handleKey(key: string, context: StrategyContext): NavigationAction | null;
26
+ }
27
+ export declare class HorizontalNavigationStrategy implements NavigationStrategy {
28
+ handleKey(key: string, context: StrategyContext): NavigationAction | null;
29
+ }
30
+ export declare class GridNavigationStrategy implements NavigationStrategy {
31
+ private fallbackToLinear;
32
+ private loopDirection;
33
+ constructor(fallbackToLinear?: boolean, loopDirection?: "row" | "next");
34
+ handleKey(key: string, context: StrategyContext): NavigationAction | null;
35
+ }
36
+ //# sourceMappingURL=navigation-strategies.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"navigation-strategies.d.ts","sourceRoot":"","sources":["../../../src/composables/interactions/navigation-strategies.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,gBAAgB,GAAG;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,GAAG;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,CAAA;AAE7F,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;IACtB,KAAK,EA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FloatingElement } from '../use-floating';
1
+ import { TreeNode } from '../positioning/use-floating-tree';
2
+ import { AnchorElement, FloatingContext, FloatingElement } from '../positioning/use-floating';
3
3
  type Point = [number, number];
4
4
  type Polygon = Point[];
5
5
  export interface SafePolygonOptions {
@@ -1 +1 @@
1
- {"version":3,"file":"polygon.d.ts","sourceRoot":"","sources":["../../../src/composables/interactions/polygon.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAA;AAE/D,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAGtF,KAAK,KAAK,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;AAC7B,KAAK,OAAO,GAAG,KAAK,EAAE,CAAA;AAoDtB,MAAM,WAAW,kBAAkB;IACjC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAA;CAC7C;AAED,MAAM,WAAW,+BAA+B;IAC9C,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;IACT,SAAS,EAAE,eAAe,CAAC,WAAW,CAAC,CAAC,OAAO,CAAC,CAAA;IAChD,QAAQ,EAAE;QACR,YAAY,EAAE,aAAa,GAAG,IAAI,CAAA;QAClC,QAAQ,EAAE,eAAe,GAAG,IAAI,CAAA;KACjC,CAAA;IACD,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE;QAAE,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAC,eAAe,CAAC,CAAC,CAAA;KAAE,CAAA;CACzD;AAED;;;;GAIG;AACH,wBAAgB,WAAW,C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Getter } from 'vue';
2
- import { FloatingContext } from '..';
3
- import { TreeNode } from '../use-floating-tree';
2
+ import { FloatingContext } from '../positioning/use-floating';
3
+ import { TreeNode } from '../positioning/use-floating-tree';
4
4
  /**
5
5
  * Enables showing/hiding the floating element when clicking the reference element
6
6
  * and optionally when clicking outside both the reference and floating elements.
@@ -1 +1 @@
1
- {"version":3,"file":"use-click.d.ts","sourceRoot":"","sources":["../../../src/composables/interactions/use-click.ts"],"names":[],"mappings":"AAEA,OAAO,EAAY,KAAK,gBAAgB,EAA8C,MAAM,KAAK,CAAA;AACjG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AACpD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAA;AAiB/D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,wBAAgB,QAAQ,CACtB,OAAO,EAAE,eAAe,GAAG,QAAQ,CAAC,eAAe,CAAC,EACpD,OAAO,GAAE,eAAoB,GAC5B,IAAI,CA6PN;AA0CD;;GAEG;AACH,MAAM,WAAW,eAAe;IAG9B;;;OAGG;IACH,OAAO,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAA;IAEnC;;;;OAIG;IACH,KAAK,CAAC,EAAE,gBAAgB,CAAC,OAAO,GAAG,WAAW,CAAC,CAAA;IAE/C;;;OAGG;IACH,MAAM,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAA;IAElC;;;OAGG;IACH,WAAW,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAA;IAEvC;;;OAGG;IACH,cAAc,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAA;IAE1C;;;OAGG;IACH,WAAW,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAA;IAIvC;;;OAGG;IACH,YAAY,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAA;IAExC;;;OAGG;IACH,YAAY,CAAC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AO,CAAC,CAAA;IAE1C;;;OAGG;IACH,WAAW,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAA;IAIvC;;;OAGG;IACH,YAAY,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAA;IAExC;;;OAGG;IACH,YAAY,CAAC,EAAE,gBAAgB,CAAC,aAAa,GAAG,WAAW,GAAG,OAAO,CAAC,CAAA;IAEtE;;;OAGG;IACH,cAAc,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAA;IAE1C;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,eAAe,KAAK,IAAI,CAAA;IAEtE;;;OAGG;IACH,qBAAqB,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAA;IAEjD;;;OAGG;IACH,gBAAgB,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAA;CAC7C"}
@@ -1,6 +1,6 @@
1
1
  import { MaybeRefOrGetter } from 'vue';
2
- import { FloatingContext } from '..';
3
- import { TreeNode } from '../use-floating-tree';
2
+ import { FloatingContext } from '../positioning/use-floating';
3
+ import { TreeNode } from '../positioning/use-floating-tree';
4
4
  export interface UseEscapeKeyOptions {
5
5
  /**
6
6
  * Condition to enable the escape key listener.
@@ -1 +1 @@
1
- {"version":3,"file":"use-escape-key.d.ts","sourceRoot":"","sources":["../../../src/composables/interactions/use-escape-key.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,gBAAgB,EAAgB,MAAM,KAAK,CAAA;AACzD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AACpD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAA;AAO/D,MAAM,WAAW,mBAAmB;IAClC;;;OAGG;IACH,OAAO,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAA;IAEnC;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;IAEjB;;;OAGG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAA;CAC1C;AAMD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,wBAAgB,YAAY,CAC1B,OAAO,EAAE,eAAe,GAAG,QAAQ,CAAC,eAAe,CAAC,EACpD,OAAO,GAAE,mBAAwB,GAChC,IAAI,CAiCN"}
1
+ {"version":3,"file":"use-escape-key.d.ts","sourceRoot":"","sources":["../../../src/composables/interactions/use-escape-key.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,gBAAgB,EAAgB,MAAM,KAAK,CAAA;AACzD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAA;AAC7E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,6CAA6C,CAAA;AAO3E,MAAM,WAAW,mBAAmB;IAClC;;;OAGG;IACH,OAAO,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAA;IAEnC;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;IAEjB;;;OAGG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAA;CAC1C;AAMD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,wBAAgB,YAAY,CAC1B,OAAO,EAAE,eAAe,GAAG,QAAQ,CAAC,eAAe,CAAC,EACpD,OAAO,GAAE,mBAAwB,GAChC,IAAI,CAiCN"}
@@ -0,0 +1,41 @@
1
+ import { MaybeRefOrGetter } from 'vue';
2
+ import { FloatingContext } from '../positioning/use-floating';
3
+ import { TreeNode } from '../positioning/use-floating-tree';
4
+ export interface UseFocusTrapOptions {
5
+ /** Enables the focus trap when true. @default true */
6
+ enabled?: MaybeRefOrGetter<boolean>;
7
+ /** When true, hides/inerts content outside the trap. @default false */
8
+ modal?: MaybeRefOrGetter<boolean>;
9
+ /** When true, inserts hidden focus guards to aid wrap-around. @default true */
10
+ guards?: MaybeRefOrGetter<boolean>;
11
+ /** Wrap order preference when cycling with Tab. @default ['content'] */
12
+ order?: MaybeRefOrGetter<Array<"content" | "reference" | "floating">>;
13
+ /** Initial focus target policy on activation. @default 'first' */
14
+ initialFocus?: MaybeRefOrGetter<number | HTMLElement | (() => HTMLElement | null) | "first" | "last">;
15
+ /** Returns focus to previously focused element on deactivate. @default true */
16
+ returnFocus?: MaybeRefOrGetter<boolean>;
17
+ /** Restores focus to nearest tabbable if active node disappears. @default false */
18
+ restoreFocus?: MaybeRefOrGetter<boolean>;
19
+ /** On non-modal, close when focus escapes the trap. @default false */
20
+ closeOnFocusOut?: MaybeRefOrGetter<boolean>;
21
+ /** Pass preventScroll to focus operations. @default true */
22
+ preventScroll?: MaybeRefOrGetter<boolean>;
23
+ /** Apply `inert` (when supported) to outside elements while modal. @default false */
24
+ outsideElementsInert?: MaybeRefOrGetter<boolean>;
25
+ }
26
+ export interface UseFocusTrapReturn {
27
+ cleanup: () => void;
28
+ }
29
+ /**
30
+ * Traps keyboard focus within the floating element, optionally in a modal manner.
31
+ *
32
+ * Supports nested traps; only the deepest open node activates trapping when used with a tree.
33
+ * Provides optional focus guards, initial focus, focus return, and close-on-escape behavior.
34
+ *
35
+ * @param context - FloatingContext or TreeNode<FloatingContext> to trap within
36
+ * @param options - Configuration options controlling trap behavior
37
+ * @returns Cleanup API
38
+ */
39
+ export declare function useFocusTrap(context: FloatingContext | TreeNode<FloatingContext>, options?: UseFocusTrapOptions): UseFocusTrapReturn;
40
+ export type { FloatingContext };
41
+ //# sourceMappingURL=use-focus-trap.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-focus-trap.d.ts","sourceRoot":"","sources":["../../../src/composables/interactions/use-focus-trap.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,gBAAgB,EAOtB,MAAM,KAAK,CAAA;AACZ,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAA;AAC7E,OAA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Context } from '..';
3
- import { TreeNode } from '../use-floating-tree';
2
+ import { FloatingContext } from '../positioning/use-floating';
3
+ import { Tree } from '../positioning/use-floating-tree';
4
4
  /**
5
- * Enables showing/hiding the floating element when focusing the reference element.
5
+ * Enables showing/hiding the floating element when the reference element receives or loses focus.
6
6
  *
7
- * This composable is responsible for KEYBOARD-ONLY interactions. For a complete user experience,
8
- * it should be composed with other hooks like `useClick`, `useHover`, and `useEscapeKey`.
7
+ * Keyboard-only interaction hook. Compose with `useClick`, `useHover`, `useEscapeKey` for a complete UX.
9
8
  *
10
- * The composable supports both standalone usage with FloatingContext and tree-aware
11
- * usage with TreeNode<FloatingContext> for complex nested floating UI structures.
9
+ * Tree-aware behavior is enabled by providing a `tree` option and passing the corresponding
10
+ * FloatingContext (i.e., the node's `.data`). IDs are only relevant for tree-aware usage and are
11
+ * automatically assigned when using `useFloatingTree().addNode(...)`.
12
12
  *
13
- * @param context - The floating context or tree node with open state and change handler.
14
- * @param options - Configuration options for focus behavior.
13
+ * @param context - The floating context for this element (not a TreeNode).
14
+ * @param options - Configuration options. Provide `tree` to enable tree-aware behavior.
15
15
  *
16
- * @example Basic standalone usage
16
+ * @example Standalone
17
17
  * ```ts
18
- * const context = useFloating(...)
19
- * useFocus(context, {
20
- * enabled: true,
21
- * requireFocusVisible: true
22
- * })
18
+ * const ctx = useFloating(...)
19
+ * useFocus(ctx)
23
20
  * ```
24
21
  *
25
- * @example Tree-aware usage for nested floating elements
22
+ * @example Tree-aware
26
23
  * ```ts
27
- * const tree = useFloatingTree(rootContext)
28
- * const parentNode = tree.root
29
- * const childNode = tree.addNode(childContext, parentNode.id)
24
+ * const tree = useFloatingTree(rootAnchor, rootFloating)
25
+ * const parent = tree.root
26
+ * const child = tree.addNode(childAnchor, childFloating, { parentId: parent.id })
30
27
  *
31
- * // Tree-aware behavior: parent stays open when focus moves to child,
32
- * // but closes when focus moves outside hierarchy
33
- * useFocus(parentNode, { requireFocusVisible: true })
34
- * useFocus(childNode, { requireFocusVisible: true })
28
+ * useFocus(parent.data, { tree })
29
+ * useFocus(child.data, { tree })
35
30
  * ```
36
31
  */
37
- export declare function useFocus(context: FloatingContext | TreeNode<FloatingContext>, options?: UseFocusOptions): UseFocusReturn;
32
+ export declare function useFocus(context: FloatingContext, options?: UseFocusOptions): UseFocusReturn;
38
33
  export interface UseFocusOptions {
39
34
  /**
40
35
  * Whether focus event listeners are enabled
@@ -47,9 +42,19 @@ export interface UseFocusOptions {
47
42
  * @default true
48
43
  */
49
44
  requireFocusVisible?: MaybeRefOrGetter<boolean>;
45
+ /**
46
+ * When provided, enables tree-aware focus handling.
47
+ */
48
+ tree?: Tree<FloatingContext>;
50
49
  }
51
50
  /**
52
51
  * Return value of the useFocus composable
53
52
  */
54
- export type UseFocusReturn = undefined;
53
+ export interface UseFocusReturn {
54
+ /**
55
+ * Cleanup function that removes all event listeners and clears pending timeouts.
56
+ * Useful for manual cleanup in testing scenarios.
57
+ */
58
+ cleanup: () => void;
59
+ }
55
60
  //# sourceMappingURL=use-focus.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-focus.d.ts","sourceRoot":"","sources":["../../../src/composables/interactions/use-focus.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,gBAAgB,EAMtB,MAAM,KAAK,CAAA;AACZ,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AACpD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAA;AAc/D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAgB,QAAQ,CACtB,OAAO,EAAE,eAAe,GAAG,QAAQ,CAAC,eAAe,CAAC,EACpD,OAAO,GAAE,eAAoB,GAC5B,cAAc,CAwIhB;AAMD,MAAM,WAAW,eAAe;IAC9B;;;OAGG;IACH,OAAO,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAA;IAEnC;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAA;CAChD;AAED;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,SAAS,CAAA"}
1
+ {"version":3,"file":"use-focus.d.ts","sourceRoot":"","sources":["../../../src/composables/interactions/use-focus.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,gBAAgB,EAOtB,MAAM,KAAK,CAAA;AACZ,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAA;AAC7E,OAAO,KAAK,EAAE,IAAI,EAAY,MAAM,6CAA6C,CAAA;AAmBjF;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,wBAAgB,QAAQ,CACtB,OAAO,EAAE,eAAe,EACxB,OAAO,GAAE,eAAoB,GAC5B,cAAc,CAsMhB;AAMD,MAAM,WAAW,eAAe;IAC9B;;;OAGG;IACH,OAAO,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAA;IAEnC;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAA;IAE/C;;OAEG;IACH,IAAI,CAAC,EAAE,IAAI,CAAC,eAAe,CAAC,CAAA;CAC7B;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B;;;OAGG;IACH,OAAO,EAAE,MAAM,IAAI,CAAA;CACpB"}
@@ -1,6 +1,6 @@
1
1
  import { MaybeRef } from 'vue';
2
- import { TreeNode } from '../use-floating-tree';
3
- import { FloatingContext } from '../use-floating';
2
+ import { TreeNode } from '../positioning/use-floating-tree';
3
+ import { FloatingContext } from '../positioning/use-floating';
4
4
  import { SafePolygonOptions } from './polygon';
5
5
  export interface UseHoverOptions {
6
6
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"use-hover.d.ts","sourceRoot":"","sources":["../../../src/composables/interactions/use-hover.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,QAAQ,EAKd,MAAM,KAAK,CAAA;AACZ,OAAO,KAAK,EAAE,QAAQ,EAAE,MAA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C,EAAE,QAAQ,CAAC,MAAM,GAAG;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;IAE5D;;;;;OAKG;IACH,MAAM,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAA;IAEzB;;;OAGG;IACH,SAAS,CAAC,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAA;IAE7B;;;;;;;OAOG;IACH,WAAW,CAAC,EAAE,QAAQ,CAAC,OAAO,GAAG,kBAAkB,CAAC,CAAA;CACrD;AAqED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,wBAAgB,QAAQ,CACtB,OAAO,EAAE,eAAe,GAAG,QAAQ,CAAC,eAAe,CAAC,EACpD,OAAO,GAAE,eAAoB,GAC5B,IAAI,CA8ON"}
@@ -0,0 +1,109 @@
1
+ import { MaybeRefOrGetter, Ref } from 'vue';
2
+ import { FloatingContext } from '../positioning/use-floating';
3
+ import { TreeNode } from '../positioning/use-floating-tree';
4
+ /**
5
+ * Options for configuring list-style keyboard/mouse navigation behavior.
6
+ *
7
+ * This interface drives how items in a floating list/grid are navigated,
8
+ * focused, and announced (including support for virtual focus).
9
+ */
10
+ export interface UseListNavigationOptions {
11
+ /**
12
+ * Reactive collection of list item elements in DOM order.
13
+ * Null entries are allowed while items mount/unmount.
14
+ */
15
+ listRef: Ref<Array<HTMLElement | null>>;
16
+ /**
17
+ * The currently active (navigated) index. Null means no active item.
18
+ */
19
+ activeIndex?: MaybeRefOrGetter<number | null>;
20
+ /**
21
+ * Callback invoked when navigation sets a new active index.
22
+ */
23
+ onNavigate?: (index: number | null) => void;
24
+ /**
25
+ * Whether navigation behavior is enabled.
26
+ */
27
+ enabled?: MaybeRefOrGetter<boolean>;
28
+ /**
29
+ * If true, arrow-key navigation wraps from end-to-start and vice versa.
30
+ */
31
+ loop?: MaybeRefOrGetter<boolean>;
32
+ /**
33
+ * Primary navigation orientation.
34
+ * - "vertical": Up/Down to navigate
35
+ * - "horizontal": Left/Right to navigate
36
+ * - "both": Grid navigation (supports cols/itemSizes)
37
+ */
38
+ orientation?: MaybeRefOrGetter<"vertical" | "horizontal" | "both">;
39
+ /**
40
+ * Indices that should be treated as disabled and skipped by navigation.
41
+ * Can be an array of indices or a predicate.
42
+ */
43
+ disabledIndices?: Array<number> | ((index: number) => boolean);
44
+ /**
45
+ * If true, hovering an item moves the active index to that item.
46
+ */
47
+ focusItemOnHover?: MaybeRefOrGetter<boolean>;
48
+ /**
49
+ * If true, pressing an arrow key when closed opens and moves focus.
50
+ */
51
+ openOnArrowKeyDown?: MaybeRefOrGetter<boolean>;
52
+ /**
53
+ * Controls automatic scrolling when the active item changes.
54
+ * true for default "nearest" behavior or a custom ScrollIntoViewOptions.
55
+ */
56
+ scrollItemIntoView?: boolean | ScrollIntoViewOptions;
57
+ /**
58
+ * Index to prefer when opening (e.g., currently selected option).
59
+ */
60
+ selectedIndex?: MaybeRefOrGetter<number | null>;
61
+ /**
62
+ * Controls focusing an item when the list opens.
63
+ * - true: always focus an item
64
+ * - false: never focus an item
65
+ * - "auto": focus based on input modality/heuristics
66
+ */
67
+ focusItemOnOpen?: MaybeRefOrGetter<boolean | "auto">;
68
+ /**
69
+ * Whether this list is nested inside another navigable list.
70
+ * Affects cross-orientation close/open key handling.
71
+ */
72
+ nested?: MaybeRefOrGetter<boolean>;
73
+ /**
74
+ * Parent list orientation when nested, for cross-navigation behavior.
75
+ */
76
+ parentOrientation?: MaybeRefOrGetter<"vertical" | "horizontal" | "both">;
77
+ /**
78
+ * Right-to-left layout flag affecting horizontal arrow semantics.
79
+ */
80
+ rtl?: MaybeRefOrGetter<boolean>;
81
+ /**
82
+ * Enables virtual focus mode (aria-activedescendant) instead of DOM focus.
83
+ */
84
+ virtual?: MaybeRefOrGetter<boolean>;
85
+ /**
86
+ * Receives the HTMLElement corresponding to the virtual active item.
87
+ * Used for aria-activedescendant and screen reader announcement.
88
+ */
89
+ virtualItemRef?: Ref<HTMLElement | null>;
90
+ /**
91
+ * Column count for grid navigation when orientation is "both".
92
+ */
93
+ cols?: MaybeRefOrGetter<number>;
94
+ /**
95
+ * If true, allows escaping to a null active index via keyboard (e.g., ArrowDown on last).
96
+ */
97
+ allowEscape?: MaybeRefOrGetter<boolean>;
98
+ /**
99
+ * Defines the wrapping behavior for grid navigation when moving horizontally past the end of a row.
100
+ * - "row": Wraps to the start of the *same* row (default).
101
+ * - "next": Moves to the start of the *next* row (or previous row if moving left).
102
+ */
103
+ gridLoopDirection?: MaybeRefOrGetter<"row" | "next">;
104
+ }
105
+ export interface UseListNavigationReturn {
106
+ cleanup: () => void;
107
+ }
108
+ export declare function useListNavigation(context: FloatingContext | TreeNode<FloatingContext>, options: UseListNavigationOptions): UseListNavigationReturn;
109
+ //# sourceMappingURL=use-list-navigation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-list-navigation.d.ts","sourceRoot":"","sources":["../../../src/composables/interactions/use-list-navigation.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,gBAAgB,EAErB,KAAK,GAAG,EAKT,MAAM,KAAK,CAAA;AACZ,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAA;AAC7E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,6CAA6C,CAAA;AAY3E;;;;;GAKG;AACH,MAAM,WAAW,wBAAwB;IACvC;;;OAGG;IACH,OAAO,EAAE,GAAG,CAAC,KAAK,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC,CAAA;IAEvC;;OAEG;IACH,WAAW,CAAC,EAAE,gBAAgB,CAAC,MAAM,GAAG,IAAI,CAAC,CAAA;IAE7C;;OAEG;IACH,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAA;IAE3C;;OAEG;IACH,OAAO,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAA;IAEnC;;OAEG;IACH,I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,GAAG,MAAM,CAAC,CAAA;CACrD;AAED,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,MAAM,IAAI,CAAA;CACpB;AAED,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,eAAe,GAAG,QAAQ,CAAC,eAAe,CAAC,EACpD,OAAO,EAAE,wBAAwB,GAChC,uBAAuB,CA+VzB"}
@@ -14,13 +14,12 @@ export interface ArrowMiddlewareOptions {
14
14
  element: Ref<HTMLElement | null>;
15
15
  }
16
16
  /**
17
- * Positions an inner element of the floating element such that it is centered to the reference element.
17
+ * Positions an inner element of the floating element such that it is centered to the anchor element.
18
18
  *
19
19
  * This middleware is used to position arrow elements within floating elements.
20
20
  *
21
21
  * @param options - The arrow options including padding and element reference
22
22
  * @returns A middleware function for arrow positioning
23
- * @see https://floating-ui.com/docs/arrow
24
23
  */
25
24
  export declare function arrow(options: ArrowMiddlewareOptions): Middleware;
26
25
  //# sourceMappingURL=arrow.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"arrow.d.ts","sourceRoot":"","sources":["../../../src/composables/middlewares/arrow.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAE3D,OAAO,EAAE,KAAK,GAAG,EAAW,MAAM,KAAK,CAAA;AAMvC;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;IAEjB;;OAEG;IACH,OAAO,EAAE,GAAG,CAAC,WAAW,GAAG,IAAI,CAAC,CAAA;CACjC;AAMD;;;;;;;;GAQG;AACH,wBAAgB,KAAK,CAAC,OAAO,EAAE,sBAAsB,GAAG,UAAU,CAcjE"}
1
+ {"version":3,"file":"arrow.d.ts","sourceRoot":"","sources":["../../../src/composables/middlewares/arrow.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAE3D,OAAO,EAAE,KAAK,GAAG,EAAW,MAAM,KAAK,CAAA;AAMvC;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;IAEjB;;OAEG;IACH,OAAO,EAAE,GAAG,CAAC,WAAW,GAAG,IAAI,CAAC,CAAA;CACjC;AAMD;;;;;;;GAOG;AACH,wBAAgB,KAAK,CAAC,OAAO,EAAE,sBAAsB,GAAG,UAAU,CAcjE"}
@@ -1,3 +1,4 @@
1
1
  export type { Middleware, Placement, Strategy } from '@floating-ui/dom';
2
- export { arrow, autoPlacement, flip, hide, offset, shift, size } from '@floating-ui/dom';
2
+ export { autoPlacement, flip, hide, offset, shift, size } from '@floating-ui/dom';
3
+ export { arrow } from './arrow';
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/composables/middlewares/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AACvE,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/composables/middlewares/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AACvE,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AACjF,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA"}
@@ -0,0 +1,5 @@
1
+ export * from './use-arrow';
2
+ export * from './use-client-point';
3
+ export * from './use-floating';
4
+ export * from './use-floating-tree';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/composables/positioning/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,oBAAoB,CAAA;AAClC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,qBAAqB,CAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-arrow.d.ts","sourceRoot":"","sources":["../../../src/composables/positioning/use-arrow.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAE3C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAMrD;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA;IAE3B;;OAEG;IACH,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA;IAE3B;;OAEG;IACH,WAAW,EAAE,WAAW,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;CACjD;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B;;;;;;;;;;OAUG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAMD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,QAAQ,CACtB,OAAO,EAAE,GAAG,CAAC,WAAW,GAAG,IAAI,CAAC,EAChC,OAAO,EAAE,eAAe,EACxB,OAAO,GAAE,eAAoB,GAC5B,cAAc,CAyDhB"}
@@ -1,6 +1,6 @@
1
- import { VirtualElement } from '@floating-ui/dom';
2
1
  import { MaybeRefOrGetter, Ref } from 'vue';
3
- import { AnchorElement } from '../use-floating';
2
+ import { VirtualElement } from '../../types';
3
+ import { AnchorElement } from './use-floating';
4
4
  /**
5
5
  * Represents 2D coordinates with optional null values for unset states
6
6
  */
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-client-point.d.ts","sourceR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