@trackunit/react-components 0.1.84 → 0.1.86
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/index.cjs
CHANGED
|
@@ -1179,7 +1179,7 @@ const useDebounce = (value, delay = 500) => {
|
|
|
1179
1179
|
* Get the device pixel ratio, potentially rounded and capped.
|
|
1180
1180
|
* Will emit new values if it changes.
|
|
1181
1181
|
*
|
|
1182
|
-
* @param {DevicePixelRatioOptions} options
|
|
1182
|
+
* @param {DevicePixelRatioOptions} options the options object
|
|
1183
1183
|
* @returns { number } The current device pixel ratio, or the default if none can be resolved
|
|
1184
1184
|
*/
|
|
1185
1185
|
function useDevicePixelRatio(options) {
|
|
@@ -1228,8 +1228,8 @@ function getDevicePixelRatio(options) {
|
|
|
1228
1228
|
/**
|
|
1229
1229
|
* The useLocalStorage hook works like useState, but saves to localstorage.
|
|
1230
1230
|
*
|
|
1231
|
-
* @param {string}
|
|
1232
|
-
* @param {string | null | undefined}
|
|
1231
|
+
* @param {string} key - The key the values is saved under.
|
|
1232
|
+
* @param {string | null | undefined} initialValue - The initial value for the state/local storage item
|
|
1233
1233
|
* @returns {string | null | undefined} value
|
|
1234
1234
|
*/
|
|
1235
1235
|
const useLocalStorage = (key, initialValue) => {
|
package/index.js
CHANGED
|
@@ -1152,7 +1152,7 @@ const useDebounce = (value, delay = 500) => {
|
|
|
1152
1152
|
* Get the device pixel ratio, potentially rounded and capped.
|
|
1153
1153
|
* Will emit new values if it changes.
|
|
1154
1154
|
*
|
|
1155
|
-
* @param {DevicePixelRatioOptions} options
|
|
1155
|
+
* @param {DevicePixelRatioOptions} options the options object
|
|
1156
1156
|
* @returns { number } The current device pixel ratio, or the default if none can be resolved
|
|
1157
1157
|
*/
|
|
1158
1158
|
function useDevicePixelRatio(options) {
|
|
@@ -1201,8 +1201,8 @@ function getDevicePixelRatio(options) {
|
|
|
1201
1201
|
/**
|
|
1202
1202
|
* The useLocalStorage hook works like useState, but saves to localstorage.
|
|
1203
1203
|
*
|
|
1204
|
-
* @param {string}
|
|
1205
|
-
* @param {string | null | undefined}
|
|
1204
|
+
* @param {string} key - The key the values is saved under.
|
|
1205
|
+
* @param {string | null | undefined} initialValue - The initial value for the state/local storage item
|
|
1206
1206
|
* @returns {string | null | undefined} value
|
|
1207
1207
|
*/
|
|
1208
1208
|
const useLocalStorage = (key, initialValue) => {
|
package/package.json
CHANGED
|
@@ -16,9 +16,9 @@ export declare const usePopoverContext: () => {
|
|
|
16
16
|
className?: string | undefined;
|
|
17
17
|
dataTestId?: string | undefined;
|
|
18
18
|
};
|
|
19
|
-
placement: import("@floating-ui/
|
|
20
|
-
strategy: import("@floating-ui/
|
|
21
|
-
middlewareData: import("@floating-ui/
|
|
19
|
+
placement: import("@floating-ui/core").Placement;
|
|
20
|
+
strategy: import("@floating-ui/core").Strategy;
|
|
21
|
+
middlewareData: import("@floating-ui/core").MiddlewareData;
|
|
22
22
|
x: number | null;
|
|
23
23
|
y: number | null;
|
|
24
24
|
update: () => void;
|
|
@@ -26,11 +26,11 @@ export declare const usePopoverContext: () => {
|
|
|
26
26
|
floating: (node: HTMLElement | null) => void;
|
|
27
27
|
positionReference: (node: import("@floating-ui/react").ReferenceType | null) => void;
|
|
28
28
|
context: {
|
|
29
|
-
placement: import("@floating-ui/
|
|
30
|
-
strategy: import("@floating-ui/
|
|
29
|
+
placement: import("@floating-ui/core").Placement;
|
|
30
|
+
strategy: import("@floating-ui/core").Strategy;
|
|
31
31
|
x: number | null;
|
|
32
32
|
y: number | null;
|
|
33
|
-
middlewareData: import("@floating-ui/
|
|
33
|
+
middlewareData: import("@floating-ui/core").MiddlewareData;
|
|
34
34
|
update: () => void;
|
|
35
35
|
reference: (node: import("@floating-ui/react").ReferenceType | null) => void;
|
|
36
36
|
floating: (node: HTMLElement | null) => void;
|
|
@@ -24,7 +24,7 @@ export interface DevicePixelRatioOptions {
|
|
|
24
24
|
* Get the device pixel ratio, potentially rounded and capped.
|
|
25
25
|
* Will emit new values if it changes.
|
|
26
26
|
*
|
|
27
|
-
* @param {DevicePixelRatioOptions} options
|
|
27
|
+
* @param {DevicePixelRatioOptions} options the options object
|
|
28
28
|
* @returns { number } The current device pixel ratio, or the default if none can be resolved
|
|
29
29
|
*/
|
|
30
30
|
export declare function useDevicePixelRatio(options?: DevicePixelRatioOptions): number;
|
|
@@ -2,8 +2,8 @@ import { Dispatch, SetStateAction } from "react";
|
|
|
2
2
|
/**
|
|
3
3
|
* The useLocalStorage hook works like useState, but saves to localstorage.
|
|
4
4
|
*
|
|
5
|
-
* @param {string}
|
|
6
|
-
* @param {string | null | undefined}
|
|
5
|
+
* @param {string} key - The key the values is saved under.
|
|
6
|
+
* @param {string | null | undefined} initialValue - The initial value for the state/local storage item
|
|
7
7
|
* @returns {string | null | undefined} value
|
|
8
8
|
*/
|
|
9
9
|
export declare const useLocalStorage: <TValue = string | null | undefined>(key: string, initialValue?: TValue | undefined) => [TValue | null, Dispatch<SetStateAction<TValue | null>>, () => void];
|