pangea-lib 4.0.549 → 4.0.551

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.
@@ -5,3 +5,4 @@ export { useFocusTrap } from './use-focus-trap.composable';
5
5
  export { useInputAria } from './use-input-aria.composable';
6
6
  export { useInputGroupProps } from './use-input-group-props.composable';
7
7
  export { useScrollListener } from './use-scroll-listener.composable';
8
+ export { useVisualViewport } from './use-visual-viewport.composable';
@@ -0,0 +1,17 @@
1
+ import { Ref } from 'vue';
2
+
3
+ type MaybeElementRef = Readonly<Ref<HTMLElement | null | undefined>>;
4
+ /**
5
+ * Keeps a fixed overlay aligned to the visual viewport while it is open. On
6
+ * mobile, opening the on-screen keyboard shrinks the visual viewport but not
7
+ * the layout viewport, so a `position: fixed` overlay sized to the layout
8
+ * viewport (`top: 0; bottom: 0`) keeps its full height and its lower part (and
9
+ * its vertically centered content) stays hidden behind the keyboard and out of
10
+ * scroll reach — because before the keyboard everything fit, so no scroll
11
+ * existed. This syncs the overlay's `top`/`height` to `window.visualViewport`
12
+ * so it always matches the visible area, making the content reachable and
13
+ * scrollable. Falls back to the CSS layout (no inline styles) when the overlay
14
+ * is closed or the API is unavailable.
15
+ */
16
+ export declare function useVisualViewport(overlay: MaybeElementRef, isActive: Readonly<Ref<boolean>>): void;
17
+ export {};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pangea-lib",
3
3
  "description": "",
4
- "version": "4.0.549",
4
+ "version": "4.0.551",
5
5
  "author": "Gianfranco Raselli",
6
6
  "license": "ISC",
7
7
  "homepage": "https://github.com/GianfrancoRaselli/pangea-lib#readme",