@stonecrop/utilities 0.2.67 → 0.3.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.
@@ -1,6 +1,6 @@
1
1
  import { onBeforeUnmount, onMounted, ref, watch } from 'vue';
2
2
  import { useFocusWithin } from '@vueuse/core';
3
- import { useElementVisibility } from '@/composables/visibility';
3
+ import { useElementVisibility } from './visibility';
4
4
  // helper functions
5
5
  const isVisible = (element) => {
6
6
  let isVisible = useElementVisibility(element).value;
@@ -1,4 +1,4 @@
1
- import type { KeyboardNavigationOptions, KeypressHandlers } from '@/types';
1
+ import type { KeyboardNavigationOptions, KeypressHandlers } from '../types';
2
2
  /**
3
3
  * Default keypress handlers for keyboard navigation
4
4
  * @public
@@ -1 +1 @@
1
- {"version":3,"file":"keyboard.d.ts","sourceRoot":"","sources":["../../../src/composables/keyboard.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,yBAAyB,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAuM1E;;;GAGG;AACH,eAAO,MAAM,uBAAuB,EAAE,gBA6HrC,CAAA;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,yBAAyB,EAAE,QA2IlE"}
1
+ {"version":3,"file":"keyboard.d.ts","sourceRoot":"","sources":["../../../src/composables/keyboard.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,yBAAyB,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAuM3E;;;GAGG;AACH,eAAO,MAAM,uBAAuB,EAAE,gBA6HrC,CAAA;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,yBAAyB,EAAE,QA2IlE"}
@@ -6,7 +6,7 @@ import { Ref } from 'vue';
6
6
  * Default keypress handlers for keyboard navigation
7
7
  * @public
8
8
  */
9
- export declare const defaultKeypressHandlers: KeypressHandlers_2;
9
+ export declare const defaultKeypressHandlers: KeypressHandlers;
10
10
 
11
11
  /**
12
12
  * Install all utility components
@@ -25,23 +25,6 @@ export declare type KeyboardNavigationOptions = {
25
25
  handlers?: KeypressHandlers;
26
26
  };
27
27
 
28
- /**
29
- * Keyboard navigation options
30
- * @public
31
- */
32
- declare type KeyboardNavigationOptions_2 = {
33
- parent?: string | HTMLElement | Ref<HTMLElement>
34
- selectors?:
35
- | string
36
- | HTMLElement
37
- | HTMLElement[]
38
- | ComponentPublicInstance[]
39
- | Ref<HTMLElement>
40
- | Ref<HTMLElement[]>
41
- | Ref<ComponentPublicInstance[]>
42
- handlers?: KeypressHandlers_2
43
- }
44
-
45
28
  /**
46
29
  * Key press handlers
47
30
  * @public
@@ -50,19 +33,11 @@ export declare type KeypressHandlers = {
50
33
  [key: string]: (ev: KeyboardEvent) => any;
51
34
  };
52
35
 
53
- /**
54
- * Key press handlers
55
- * @public
56
- */
57
- declare type KeypressHandlers_2 = {
58
- [key: string]: (ev: KeyboardEvent) => any
59
- }
60
-
61
36
  /**
62
37
  * Keyboard navigation composable
63
38
  * @param options - Keyboard navigation options
64
39
  * @public
65
40
  */
66
- export declare function useKeyboardNav(options: KeyboardNavigationOptions_2[]): void;
41
+ export declare function useKeyboardNav(options: KeyboardNavigationOptions[]): void;
67
42
 
68
43
  export { }