@tamagui/use-presence
Advanced tools
Comparing version 1.122.1 to 1.122.2
{ | ||
"name": "@tamagui/use-presence", | ||
"version": "1.122.1", | ||
"version": "1.122.2", | ||
"types": "./types/index.d.ts", | ||
@@ -34,6 +34,6 @@ "main": "dist/cjs", | ||
"dependencies": { | ||
"@tamagui/web": "1.122.1" | ||
"@tamagui/web": "1.122.2" | ||
}, | ||
"devDependencies": { | ||
"@tamagui/build": "1.122.1", | ||
"@tamagui/build": "1.122.2", | ||
"react": "*" | ||
@@ -40,0 +40,0 @@ }, |
@@ -28,8 +28,8 @@ import type { PresenceContextProps, UsePresenceResult } from '@tamagui/web' | ||
*/ | ||
export function useIsPresent() { | ||
export function useIsPresent(): boolean { | ||
return isPresent(React.useContext(PresenceContext)) | ||
} | ||
export function isPresent(context: PresenceContextProps | null) { | ||
export function isPresent(context: PresenceContextProps | null): boolean { | ||
return context === null ? true : context.isPresent | ||
} |
@@ -1,3 +0,4 @@ | ||
export { PresenceContext, ResetPresence } from './PresenceContext'; | ||
export { isPresent, useIsPresent, usePresence } from './usePresence'; | ||
export { PresenceContext, ResetPresence } from "./PresenceContext"; | ||
export { isPresent, useIsPresent, usePresence } from "./usePresence"; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -1,7 +0,6 @@ | ||
import type { PresenceContextProps } from '@tamagui/web'; | ||
import * as React from 'react'; | ||
import type { PresenceContextProps } from "@tamagui/web"; | ||
import * as React from "react"; | ||
export declare const PresenceContext: React.Context<PresenceContextProps | null>; | ||
export declare const ResetPresence: (props: { | ||
children?: any; | ||
}) => import("react/jsx-runtime").JSX.Element; | ||
export declare const ResetPresence: (props: { children?: any }) => JSX.Element; | ||
//# sourceMappingURL=PresenceContext.d.ts.map |
@@ -1,9 +0,10 @@ | ||
import type { PresenceContextProps, UsePresenceResult } from '@tamagui/web'; | ||
import type { PresenceContextProps, UsePresenceResult } from "@tamagui/web"; | ||
export declare function usePresence(): UsePresenceResult; | ||
/** | ||
* Similar to `usePresence`, except `useIsPresent` simply returns whether or not the component is present. | ||
* There is no `safeToRemove` function. | ||
*/ | ||
* Similar to `usePresence`, except `useIsPresent` simply returns whether or not the component is present. | ||
* There is no `safeToRemove` function. | ||
*/ | ||
export declare function useIsPresent(): boolean; | ||
export declare function isPresent(context: PresenceContextProps | null): boolean; | ||
//# sourceMappingURL=usePresence.d.ts.map |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
34381
556
+ Added@tamagui/compose-refs@1.122.2(transitive)
+ Added@tamagui/constants@1.122.2(transitive)
+ Added@tamagui/helpers@1.122.2(transitive)
+ Added@tamagui/normalize-css-color@1.122.2(transitive)
+ Added@tamagui/simple-hash@1.122.2(transitive)
+ Added@tamagui/timer@1.122.2(transitive)
+ Added@tamagui/types@1.122.2(transitive)
+ Added@tamagui/use-did-finish-ssr@1.122.2(transitive)
+ Added@tamagui/use-event@1.122.2(transitive)
+ Added@tamagui/use-force-update@1.122.2(transitive)
+ Added@tamagui/web@1.122.2(transitive)
- Removed@tamagui/compose-refs@1.122.1(transitive)
- Removed@tamagui/constants@1.122.1(transitive)
- Removed@tamagui/helpers@1.122.1(transitive)
- Removed@tamagui/normalize-css-color@1.122.1(transitive)
- Removed@tamagui/simple-hash@1.122.1(transitive)
- Removed@tamagui/timer@1.122.1(transitive)
- Removed@tamagui/types@1.122.1(transitive)
- Removed@tamagui/use-did-finish-ssr@1.122.1(transitive)
- Removed@tamagui/use-event@1.122.1(transitive)
- Removed@tamagui/use-force-update@1.122.1(transitive)
- Removed@tamagui/web@1.122.1(transitive)
Updated@tamagui/web@1.122.2