chayns-api 3.6.5 → 3.6.7
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.
- package/dist/cjs/calls/appleSafeAreaListener.js +13 -4
- package/dist/cjs/hooks/useSafeArea.js +11 -25
- package/dist/cjs/wrapper/AppWrapper.js +51 -13
- package/dist/cjs/wrapper/normalizeFunctions.js +61 -32
- package/dist/esm/calls/appleSafeAreaListener.js +12 -3
- package/dist/esm/hooks/useSafeArea.js +12 -26
- package/dist/esm/wrapper/AppWrapper.js +51 -13
- package/dist/esm/wrapper/normalizeFunctions.js +61 -32
- package/dist/types/calls/appleSafeAreaListener.d.ts +5 -5
- package/dist/types/wrapper/AppWrapper.d.ts +3 -1
- package/package.json +1 -1
- package/tests/safe-area.test.cjs +71 -320
- package/dist/cjs/utils/appleSafeArea.js +0 -101
- package/dist/esm/utils/appleSafeArea.js +0 -92
- package/dist/types/utils/appleSafeArea.d.ts +0 -9
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { AppleSafeArea, ChaynsReactFunctions } from '../types/IChaynsReact';
|
|
2
|
-
type AppleSafeAreaFunctions = Pick<ChaynsReactFunctions, 'addAppleSafeAreaListener' | 'removeAppleSafeAreaListener' | 'getAppleSafeArea'>;
|
|
3
|
-
type SafeAreaCallback = (value: AppleSafeArea) => void;
|
|
4
|
-
type Subscribe = (callback: SafeAreaCallback) => unknown;
|
|
5
|
-
/** Shares one upstream subscription and the latest value for each native host. */
|
|
6
|
-
export declare const getAppleSafeAreaFunctions: (host: object, subscribe: Subscribe) => AppleSafeAreaFunctions;
|
|
7
|
-
/** Uses a dedicated callback name so other AppWrapper instances cannot overwrite it. */
|
|
8
|
-
export declare const getAppAppleSafeAreaFunctions: () => AppleSafeAreaFunctions;
|
|
9
|
-
export {};
|