@contember/react-utils
Advanced tools
Comparing version 1.2.0-rc.18 to 1.2.0
import { createContext, useContext } from "react"; | ||
import { useWindowSize } from "./useWindowSize.js"; | ||
const ContainerWidthContext = createContext(null); | ||
const ContainerWidthContext = createContext(void 0); | ||
ContainerWidthContext.displayName = "ContainerWidthContext"; | ||
@@ -5,0 +5,0 @@ function useContainerWidth() { |
@@ -43,5 +43,5 @@ import { useRef, useLayoutEffect } from "react"; | ||
} | ||
} else { | ||
throw new Error("Exhaustive error: Expecting element to be instance of HTMLElement"); | ||
} | ||
} else { | ||
throw new Error("Exhaustive error: Expecting element to be instance of HTMLElement"); | ||
} | ||
@@ -48,0 +48,0 @@ }, [interval, refOrElement, scopedConsoleRef]); |
@@ -29,2 +29,3 @@ import { createNonNullableContextFactory } from "./context/createNonNullableContextFactory.js"; | ||
import { useOnElementResize } from "./hooks/useOnElementResize.js"; | ||
import { useOnScrollWithin } from "./hooks/useOnScrollWithin.js"; | ||
import { useOnWindowResize } from "./hooks/useOnWindowResize.js"; | ||
@@ -97,2 +98,3 @@ import { usePreviousValue } from "./hooks/usePreviousValue.js"; | ||
useOnElementResize, | ||
useOnScrollWithin, | ||
useOnWindowResize, | ||
@@ -99,0 +101,0 @@ usePreviousValue, |
import { createContext, useContext } from "react"; | ||
import { useWindowSize } from "./useWindowSize.js"; | ||
const ContainerWidthContext = createContext(null); | ||
const ContainerWidthContext = createContext(void 0); | ||
ContainerWidthContext.displayName = "ContainerWidthContext"; | ||
@@ -5,0 +5,0 @@ function useContainerWidth() { |
@@ -43,5 +43,5 @@ import { useRef, useLayoutEffect } from "react"; | ||
} | ||
} else { | ||
throw new Error("Exhaustive error: Expecting element to be instance of HTMLElement"); | ||
} | ||
} else { | ||
throw new Error("Exhaustive error: Expecting element to be instance of HTMLElement"); | ||
} | ||
@@ -48,0 +48,0 @@ }, [interval, refOrElement, scopedConsoleRef]); |
@@ -29,2 +29,3 @@ import { createNonNullableContextFactory } from "./context/createNonNullableContextFactory.js"; | ||
import { useOnElementResize } from "./hooks/useOnElementResize.js"; | ||
import { useOnScrollWithin } from "./hooks/useOnScrollWithin.js"; | ||
import { useOnWindowResize } from "./hooks/useOnWindowResize.js"; | ||
@@ -97,2 +98,3 @@ import { usePreviousValue } from "./hooks/usePreviousValue.js"; | ||
useOnElementResize, | ||
useOnScrollWithin, | ||
useOnWindowResize, | ||
@@ -99,0 +101,0 @@ usePreviousValue, |
@@ -25,2 +25,3 @@ export * from './unwrapRefValue'; | ||
export * from './useOnElementResize'; | ||
export * from './useOnScrollWithin'; | ||
export * from './useOnWindowResize'; | ||
@@ -27,0 +28,0 @@ export * from './usePreviousValue'; |
export type ContainerWidthContextType = number; | ||
export declare const ContainerWidthContext: import("react").Context<number | null>; | ||
export declare const ContainerWidthContext: import("react").Context<number | null | undefined>; | ||
export declare function useContainerWidth(): number; | ||
//# sourceMappingURL=useContainerWidth.d.ts.map |
{ | ||
"name": "@contember/react-utils", | ||
"license": "Apache-2.0", | ||
"version": "1.2.0-rc.18", | ||
"version": "1.2.0", | ||
"type": "module", | ||
@@ -11,2 +11,3 @@ "sideEffects": false, | ||
"import": { | ||
"types": "./dist/types/index.d.ts", | ||
"development": "./dist/development/index.js", | ||
@@ -34,6 +35,5 @@ "production": "./dist/production/index.js", | ||
"dependencies": { | ||
"@contember/utilities": "1.2.0-rc.18", | ||
"@contember/utilities": "1.2.0", | ||
"fast-deep-equal": "^3.1.3" | ||
}, | ||
"stableVersion": "0.0.0" | ||
} | ||
} |
@@ -25,2 +25,3 @@ export * from './unwrapRefValue' | ||
export * from './useOnElementResize' | ||
export * from './useOnScrollWithin' | ||
export * from './useOnWindowResize' | ||
@@ -27,0 +28,0 @@ export * from './usePreviousValue' |
@@ -5,3 +5,3 @@ import { createContext, useContext } from 'react' | ||
export type ContainerWidthContextType = number | ||
export const ContainerWidthContext = createContext<ContainerWidthContextType | null>(null) | ||
export const ContainerWidthContext = createContext<ContainerWidthContextType | null | undefined>(undefined) | ||
ContainerWidthContext.displayName = 'ContainerWidthContext' | ||
@@ -8,0 +8,0 @@ |
@@ -63,7 +63,7 @@ import { useLayoutEffect, useRef } from 'react' | ||
} | ||
} else { | ||
throw new Error('Exhaustive error: Expecting element to be instance of HTMLElement') | ||
} | ||
} else { | ||
throw new Error('Exhaustive error: Expecting element to be instance of HTMLElement') | ||
} | ||
}, [interval, refOrElement, scopedConsoleRef]) | ||
} |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
360205
3954
1
+ Added@contember/utilities@1.2.0(transitive)
- Removed@contember/utilities@1.2.0-rc.18(transitive)
Updated@contember/utilities@1.2.0