@muraldevkit/ui-toolkit 1.28.0 → 1.29.1

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.
@@ -0,0 +1 @@
1
+ export * from './useVirtualKeyboard';
@@ -0,0 +1 @@
1
+ export * from './useVirtualKeyboard';
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Custom event name for the virtual keyboard.
3
+ */
4
+ export declare const MRL_VIRTUAL_KEYBOARD_EVENT_NAME = "mrl-virtual-keyboard";
5
+ /**
6
+ * Virtual keyboard event with the keyboard height information.
7
+ */
8
+ export type MrlVirtualKeyboardEvent = CustomEvent<{
9
+ height: number;
10
+ }>;
11
+ /**
12
+ * Utility function to dispatch MrlKeyboardEvent from consumer
13
+ *
14
+ * @param height the height of the virtual keyboard, 0 if closed
15
+ */
16
+ export declare function dispatchMrlKeyboardEvent(height: number): void;
17
+ /**
18
+ * Hook to access the virtual keyboard height
19
+ *
20
+ * @param disabled If disabled will always return 0
21
+ * @param content If a content is passed, this hook will return the height of the overlap between content and keyboard
22
+ * @returns virtual keyboard height or 0 if there isn't any.
23
+ */
24
+ export declare function useVirtualKeyboard(disabled: boolean, content?: HTMLElement | null): number;
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  export * from './components';
2
2
  export * from './utils';
3
3
  export * from './contexts';
4
+ export * from './hooks';