@mantine/hooks 5.10.1 → 6.0.0-alpha.0
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/cjs/use-id/use-id.js +12 -16
- package/cjs/use-id/use-id.js.map +1 -1
- package/cjs/use-id/use-react-id.js +18 -0
- package/cjs/use-id/use-react-id.js.map +1 -0
- package/cjs/use-os/use-os.js +14 -5
- package/cjs/use-os/use-os.js.map +1 -1
- package/esm/use-id/use-id.js +12 -12
- package/esm/use-id/use-id.js.map +1 -1
- package/esm/use-id/use-react-id.js +10 -0
- package/esm/use-id/use-react-id.js.map +1 -0
- package/esm/use-os/use-os.js +14 -5
- package/esm/use-os/use-os.js.map +1 -1
- package/lib/use-id/use-id.d.ts.map +1 -1
- package/lib/use-id/use-react-id.d.ts +2 -0
- package/lib/use-id/use-react-id.d.ts.map +1 -0
- package/lib/use-os/use-os.d.ts +5 -1
- package/lib/use-os/use-os.d.ts.map +1 -1
- package/package.json +1 -1
package/cjs/use-id/use-id.js
CHANGED
|
@@ -4,27 +4,23 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
6
|
var useIsomorphicEffect = require('../use-isomorphic-effect/use-isomorphic-effect.js');
|
|
7
|
+
var useReactId = require('./use-react-id.js');
|
|
8
|
+
var randomId = require('../utils/random-id/random-id.js');
|
|
7
9
|
|
|
8
|
-
function
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
const randomId = () => `mantine-${Math.random().toString(36).slice(2, 11)}`;
|
|
13
|
-
const useReactId = React__default["useId".toString()] || (() => void 0);
|
|
14
|
-
function useClientId() {
|
|
15
|
-
const [uuid, setUuid] = React.useState("");
|
|
10
|
+
function useId(staticId) {
|
|
11
|
+
const reactId = useReactId.useReactId();
|
|
12
|
+
const [uuid, setUuid] = React.useState(reactId);
|
|
16
13
|
useIsomorphicEffect.useIsomorphicEffect(() => {
|
|
17
|
-
setUuid(randomId());
|
|
14
|
+
setUuid(randomId.randomId());
|
|
18
15
|
}, []);
|
|
16
|
+
if (typeof staticId === "string") {
|
|
17
|
+
return staticId;
|
|
18
|
+
}
|
|
19
|
+
if (typeof window === "undefined") {
|
|
20
|
+
return reactId;
|
|
21
|
+
}
|
|
19
22
|
return uuid;
|
|
20
23
|
}
|
|
21
|
-
function getReactId() {
|
|
22
|
-
const id = useReactId();
|
|
23
|
-
return id ? `mantine-${id.replace(/:/g, "")}` : "";
|
|
24
|
-
}
|
|
25
|
-
function useId(staticId) {
|
|
26
|
-
return typeof staticId === "string" ? staticId : getReactId() || useClientId();
|
|
27
|
-
}
|
|
28
24
|
|
|
29
25
|
exports.useId = useId;
|
|
30
26
|
//# sourceMappingURL=use-id.js.map
|
package/cjs/use-id/use-id.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-id.js","sources":["../../src/use-id/use-id.ts"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"use-id.js","sources":["../../src/use-id/use-id.ts"],"sourcesContent":["import { useState } from 'react';\nimport { useIsomorphicEffect } from '../use-isomorphic-effect/use-isomorphic-effect';\nimport { randomId } from '../utils';\nimport { useReactId } from './use-react-id';\n\nexport function useId(staticId?: string) {\n const reactId = useReactId();\n const [uuid, setUuid] = useState(reactId);\n\n useIsomorphicEffect(() => {\n setUuid(randomId());\n }, []);\n\n if (typeof staticId === 'string') {\n return staticId;\n }\n\n if (typeof window === 'undefined') {\n return reactId;\n }\n\n return uuid;\n}\n"],"names":["useReactId","useState","useIsomorphicEffect","randomId"],"mappings":";;;;;;;;;AAIO,SAAS,KAAK,CAAC,QAAQ,EAAE;AAChC,EAAE,MAAM,OAAO,GAAGA,qBAAU,EAAE,CAAC;AAC/B,EAAE,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAGC,cAAQ,CAAC,OAAO,CAAC,CAAC;AAC5C,EAAEC,uCAAmB,CAAC,MAAM;AAC5B,IAAI,OAAO,CAACC,iBAAQ,EAAE,CAAC,CAAC;AACxB,GAAG,EAAE,EAAE,CAAC,CAAC;AACT,EAAE,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE;AACpC,IAAI,OAAO,QAAQ,CAAC;AACpB,GAAG;AACH,EAAE,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;AACrC,IAAI,OAAO,OAAO,CAAC;AACnB,GAAG;AACH,EAAE,OAAO,IAAI,CAAC;AACd;;;;"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var React = require('react');
|
|
6
|
+
|
|
7
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e['default'] : e; }
|
|
8
|
+
|
|
9
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
10
|
+
|
|
11
|
+
const __useId = React__default["useId".toString()] || (() => void 0);
|
|
12
|
+
function useReactId() {
|
|
13
|
+
const id = __useId();
|
|
14
|
+
return id ? `mantine-${id.replace(/:/g, "")}` : "";
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
exports.useReactId = useReactId;
|
|
18
|
+
//# sourceMappingURL=use-react-id.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-react-id.js","sources":["../../src/use-id/use-react-id.ts"],"sourcesContent":["import React from 'react';\n\nconst __useId: () => string | undefined = (React as any)['useId'.toString()] || (() => undefined);\n\nexport function useReactId() {\n const id = __useId();\n return id ? `mantine-${id.replace(/:/g, '')}` : '';\n}\n"],"names":["React"],"mappings":";;;;;;;;;;AACA,MAAM,OAAO,GAAGA,cAAK,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,KAAK,MAAM,KAAK,CAAC,CAAC,CAAC;AACrD,SAAS,UAAU,GAAG;AAC7B,EAAE,MAAM,EAAE,GAAG,OAAO,EAAE,CAAC;AACvB,EAAE,OAAO,EAAE,GAAG,CAAC,QAAQ,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC;AACrD;;;;"}
|
package/cjs/use-os/use-os.js
CHANGED
|
@@ -2,7 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
var React = require('react');
|
|
6
|
+
var useIsomorphicEffect = require('../use-isomorphic-effect/use-isomorphic-effect.js');
|
|
7
|
+
|
|
5
8
|
function getOS() {
|
|
9
|
+
if (typeof window === "undefined") {
|
|
10
|
+
return "undetermined";
|
|
11
|
+
}
|
|
6
12
|
const { userAgent } = window.navigator;
|
|
7
13
|
const macosPlatforms = /(Macintosh)|(MacIntel)|(MacPPC)|(Mac68K)/i;
|
|
8
14
|
const windowsPlatforms = /(Win32)|(Win64)|(Windows)|(WinCE)/i;
|
|
@@ -24,11 +30,14 @@ function getOS() {
|
|
|
24
30
|
}
|
|
25
31
|
return "undetermined";
|
|
26
32
|
}
|
|
27
|
-
function useOs() {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
33
|
+
function useOs(options = { getValueInEffect: true }) {
|
|
34
|
+
const [value, setValue] = React.useState(options.getValueInEffect ? "undetermined" : getOS());
|
|
35
|
+
useIsomorphicEffect.useIsomorphicEffect(() => {
|
|
36
|
+
if (options.getValueInEffect) {
|
|
37
|
+
setValue(getOS);
|
|
38
|
+
}
|
|
39
|
+
}, []);
|
|
40
|
+
return value;
|
|
32
41
|
}
|
|
33
42
|
|
|
34
43
|
exports.useOs = useOs;
|
package/cjs/use-os/use-os.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-os.js","sources":["../../src/use-os/use-os.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"use-os.js","sources":["../../src/use-os/use-os.ts"],"sourcesContent":["import { useState } from 'react';\nimport { useIsomorphicEffect } from '../use-isomorphic-effect/use-isomorphic-effect';\n\nexport type OS = 'undetermined' | 'macos' | 'ios' | 'windows' | 'android' | 'linux';\n\nfunction getOS(): OS {\n if (typeof window === 'undefined') {\n return 'undetermined';\n }\n\n const { userAgent } = window.navigator;\n const macosPlatforms = /(Macintosh)|(MacIntel)|(MacPPC)|(Mac68K)/i;\n const windowsPlatforms = /(Win32)|(Win64)|(Windows)|(WinCE)/i;\n const iosPlatforms = /(iPhone)|(iPad)|(iPod)/i;\n\n if (macosPlatforms.test(userAgent)) {\n return 'macos';\n }\n if (iosPlatforms.test(userAgent)) {\n return 'ios';\n }\n if (windowsPlatforms.test(userAgent)) {\n return 'windows';\n }\n if (/Android/i.test(userAgent)) {\n return 'android';\n }\n if (/Linux/i.test(userAgent)) {\n return 'linux';\n }\n\n return 'undetermined';\n}\n\ninterface UseOsOptions {\n getValueInEffect: boolean;\n}\n\nexport function useOs(options: UseOsOptions = { getValueInEffect: true }): OS {\n const [value, setValue] = useState<OS>(options.getValueInEffect ? 'undetermined' : getOS());\n\n useIsomorphicEffect(() => {\n if (options.getValueInEffect) {\n setValue(getOS);\n }\n }, []);\n\n return value;\n}\n"],"names":["useState","useIsomorphicEffect"],"mappings":";;;;;;;AAEA,SAAS,KAAK,GAAG;AACjB,EAAE,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;AACrC,IAAI,OAAO,cAAc,CAAC;AAC1B,GAAG;AACH,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,CAAC,SAAS,CAAC;AACzC,EAAE,MAAM,cAAc,GAAG,2CAA2C,CAAC;AACrE,EAAE,MAAM,gBAAgB,GAAG,oCAAoC,CAAC;AAChE,EAAE,MAAM,YAAY,GAAG,yBAAyB,CAAC;AACjD,EAAE,IAAI,cAAc,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE;AACtC,IAAI,OAAO,OAAO,CAAC;AACnB,GAAG;AACH,EAAE,IAAI,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE;AACpC,IAAI,OAAO,KAAK,CAAC;AACjB,GAAG;AACH,EAAE,IAAI,gBAAgB,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE;AACxC,IAAI,OAAO,SAAS,CAAC;AACrB,GAAG;AACH,EAAE,IAAI,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE;AAClC,IAAI,OAAO,SAAS,CAAC;AACrB,GAAG;AACH,EAAE,IAAI,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE;AAChC,IAAI,OAAO,OAAO,CAAC;AACnB,GAAG;AACH,EAAE,OAAO,cAAc,CAAC;AACxB,CAAC;AACM,SAAS,KAAK,CAAC,OAAO,GAAG,EAAE,gBAAgB,EAAE,IAAI,EAAE,EAAE;AAC5D,EAAE,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAGA,cAAQ,CAAC,OAAO,CAAC,gBAAgB,GAAG,cAAc,GAAG,KAAK,EAAE,CAAC,CAAC;AAC1F,EAAEC,uCAAmB,CAAC,MAAM;AAC5B,IAAI,IAAI,OAAO,CAAC,gBAAgB,EAAE;AAClC,MAAM,QAAQ,CAAC,KAAK,CAAC,CAAC;AACtB,KAAK;AACL,GAAG,EAAE,EAAE,CAAC,CAAC;AACT,EAAE,OAAO,KAAK,CAAC;AACf;;;;"}
|
package/esm/use-id/use-id.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { useState } from 'react';
|
|
2
2
|
import { useIsomorphicEffect } from '../use-isomorphic-effect/use-isomorphic-effect.js';
|
|
3
|
+
import { useReactId } from './use-react-id.js';
|
|
4
|
+
import { randomId } from '../utils/random-id/random-id.js';
|
|
3
5
|
|
|
4
|
-
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
const [uuid, setUuid] = useState("");
|
|
6
|
+
function useId(staticId) {
|
|
7
|
+
const reactId = useReactId();
|
|
8
|
+
const [uuid, setUuid] = useState(reactId);
|
|
8
9
|
useIsomorphicEffect(() => {
|
|
9
10
|
setUuid(randomId());
|
|
10
11
|
}, []);
|
|
12
|
+
if (typeof staticId === "string") {
|
|
13
|
+
return staticId;
|
|
14
|
+
}
|
|
15
|
+
if (typeof window === "undefined") {
|
|
16
|
+
return reactId;
|
|
17
|
+
}
|
|
11
18
|
return uuid;
|
|
12
19
|
}
|
|
13
|
-
function getReactId() {
|
|
14
|
-
const id = useReactId();
|
|
15
|
-
return id ? `mantine-${id.replace(/:/g, "")}` : "";
|
|
16
|
-
}
|
|
17
|
-
function useId(staticId) {
|
|
18
|
-
return typeof staticId === "string" ? staticId : getReactId() || useClientId();
|
|
19
|
-
}
|
|
20
20
|
|
|
21
21
|
export { useId };
|
|
22
22
|
//# sourceMappingURL=use-id.js.map
|
package/esm/use-id/use-id.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-id.js","sources":["../../src/use-id/use-id.ts"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"use-id.js","sources":["../../src/use-id/use-id.ts"],"sourcesContent":["import { useState } from 'react';\nimport { useIsomorphicEffect } from '../use-isomorphic-effect/use-isomorphic-effect';\nimport { randomId } from '../utils';\nimport { useReactId } from './use-react-id';\n\nexport function useId(staticId?: string) {\n const reactId = useReactId();\n const [uuid, setUuid] = useState(reactId);\n\n useIsomorphicEffect(() => {\n setUuid(randomId());\n }, []);\n\n if (typeof staticId === 'string') {\n return staticId;\n }\n\n if (typeof window === 'undefined') {\n return reactId;\n }\n\n return uuid;\n}\n"],"names":[],"mappings":";;;;;AAIO,SAAS,KAAK,CAAC,QAAQ,EAAE;AAChC,EAAE,MAAM,OAAO,GAAG,UAAU,EAAE,CAAC;AAC/B,EAAE,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAC,OAAO,CAAC,CAAC;AAC5C,EAAE,mBAAmB,CAAC,MAAM;AAC5B,IAAI,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;AACxB,GAAG,EAAE,EAAE,CAAC,CAAC;AACT,EAAE,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE;AACpC,IAAI,OAAO,QAAQ,CAAC;AACpB,GAAG;AACH,EAAE,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;AACrC,IAAI,OAAO,OAAO,CAAC;AACnB,GAAG;AACH,EAAE,OAAO,IAAI,CAAC;AACd;;;;"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
const __useId = React["useId".toString()] || (() => void 0);
|
|
4
|
+
function useReactId() {
|
|
5
|
+
const id = __useId();
|
|
6
|
+
return id ? `mantine-${id.replace(/:/g, "")}` : "";
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export { useReactId };
|
|
10
|
+
//# sourceMappingURL=use-react-id.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-react-id.js","sources":["../../src/use-id/use-react-id.ts"],"sourcesContent":["import React from 'react';\n\nconst __useId: () => string | undefined = (React as any)['useId'.toString()] || (() => undefined);\n\nexport function useReactId() {\n const id = __useId();\n return id ? `mantine-${id.replace(/:/g, '')}` : '';\n}\n"],"names":[],"mappings":";;AACA,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,KAAK,MAAM,KAAK,CAAC,CAAC,CAAC;AACrD,SAAS,UAAU,GAAG;AAC7B,EAAE,MAAM,EAAE,GAAG,OAAO,EAAE,CAAC;AACvB,EAAE,OAAO,EAAE,GAAG,CAAC,QAAQ,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC;AACrD;;;;"}
|
package/esm/use-os/use-os.js
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
import { useIsomorphicEffect } from '../use-isomorphic-effect/use-isomorphic-effect.js';
|
|
3
|
+
|
|
1
4
|
function getOS() {
|
|
5
|
+
if (typeof window === "undefined") {
|
|
6
|
+
return "undetermined";
|
|
7
|
+
}
|
|
2
8
|
const { userAgent } = window.navigator;
|
|
3
9
|
const macosPlatforms = /(Macintosh)|(MacIntel)|(MacPPC)|(Mac68K)/i;
|
|
4
10
|
const windowsPlatforms = /(Win32)|(Win64)|(Windows)|(WinCE)/i;
|
|
@@ -20,11 +26,14 @@ function getOS() {
|
|
|
20
26
|
}
|
|
21
27
|
return "undetermined";
|
|
22
28
|
}
|
|
23
|
-
function useOs() {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
29
|
+
function useOs(options = { getValueInEffect: true }) {
|
|
30
|
+
const [value, setValue] = useState(options.getValueInEffect ? "undetermined" : getOS());
|
|
31
|
+
useIsomorphicEffect(() => {
|
|
32
|
+
if (options.getValueInEffect) {
|
|
33
|
+
setValue(getOS);
|
|
34
|
+
}
|
|
35
|
+
}, []);
|
|
36
|
+
return value;
|
|
28
37
|
}
|
|
29
38
|
|
|
30
39
|
export { useOs };
|
package/esm/use-os/use-os.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-os.js","sources":["../../src/use-os/use-os.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"use-os.js","sources":["../../src/use-os/use-os.ts"],"sourcesContent":["import { useState } from 'react';\nimport { useIsomorphicEffect } from '../use-isomorphic-effect/use-isomorphic-effect';\n\nexport type OS = 'undetermined' | 'macos' | 'ios' | 'windows' | 'android' | 'linux';\n\nfunction getOS(): OS {\n if (typeof window === 'undefined') {\n return 'undetermined';\n }\n\n const { userAgent } = window.navigator;\n const macosPlatforms = /(Macintosh)|(MacIntel)|(MacPPC)|(Mac68K)/i;\n const windowsPlatforms = /(Win32)|(Win64)|(Windows)|(WinCE)/i;\n const iosPlatforms = /(iPhone)|(iPad)|(iPod)/i;\n\n if (macosPlatforms.test(userAgent)) {\n return 'macos';\n }\n if (iosPlatforms.test(userAgent)) {\n return 'ios';\n }\n if (windowsPlatforms.test(userAgent)) {\n return 'windows';\n }\n if (/Android/i.test(userAgent)) {\n return 'android';\n }\n if (/Linux/i.test(userAgent)) {\n return 'linux';\n }\n\n return 'undetermined';\n}\n\ninterface UseOsOptions {\n getValueInEffect: boolean;\n}\n\nexport function useOs(options: UseOsOptions = { getValueInEffect: true }): OS {\n const [value, setValue] = useState<OS>(options.getValueInEffect ? 'undetermined' : getOS());\n\n useIsomorphicEffect(() => {\n if (options.getValueInEffect) {\n setValue(getOS);\n }\n }, []);\n\n return value;\n}\n"],"names":[],"mappings":";;;AAEA,SAAS,KAAK,GAAG;AACjB,EAAE,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;AACrC,IAAI,OAAO,cAAc,CAAC;AAC1B,GAAG;AACH,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,CAAC,SAAS,CAAC;AACzC,EAAE,MAAM,cAAc,GAAG,2CAA2C,CAAC;AACrE,EAAE,MAAM,gBAAgB,GAAG,oCAAoC,CAAC;AAChE,EAAE,MAAM,YAAY,GAAG,yBAAyB,CAAC;AACjD,EAAE,IAAI,cAAc,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE;AACtC,IAAI,OAAO,OAAO,CAAC;AACnB,GAAG;AACH,EAAE,IAAI,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE;AACpC,IAAI,OAAO,KAAK,CAAC;AACjB,GAAG;AACH,EAAE,IAAI,gBAAgB,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE;AACxC,IAAI,OAAO,SAAS,CAAC;AACrB,GAAG;AACH,EAAE,IAAI,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE;AAClC,IAAI,OAAO,SAAS,CAAC;AACrB,GAAG;AACH,EAAE,IAAI,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE;AAChC,IAAI,OAAO,OAAO,CAAC;AACnB,GAAG;AACH,EAAE,OAAO,cAAc,CAAC;AACxB,CAAC;AACM,SAAS,KAAK,CAAC,OAAO,GAAG,EAAE,gBAAgB,EAAE,IAAI,EAAE,EAAE;AAC5D,EAAE,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,OAAO,CAAC,gBAAgB,GAAG,cAAc,GAAG,KAAK,EAAE,CAAC,CAAC;AAC1F,EAAE,mBAAmB,CAAC,MAAM;AAC5B,IAAI,IAAI,OAAO,CAAC,gBAAgB,EAAE;AAClC,MAAM,QAAQ,CAAC,KAAK,CAAC,CAAC;AACtB,KAAK;AACL,GAAG,EAAE,EAAE,CAAC,CAAC;AACT,EAAE,OAAO,KAAK,CAAC;AACf;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-id.d.ts","sourceRoot":"","sources":["../../src/use-id/use-id.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"use-id.d.ts","sourceRoot":"","sources":["../../src/use-id/use-id.ts"],"names":[],"mappings":"AAKA,wBAAgB,KAAK,CAAC,QAAQ,CAAC,EAAE,MAAM,UAiBtC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-react-id.d.ts","sourceRoot":"","sources":["../../src/use-id/use-react-id.ts"],"names":[],"mappings":"AAIA,wBAAgB,UAAU,WAGzB"}
|
package/lib/use-os/use-os.d.ts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
export type OS = 'undetermined' | 'macos' | 'ios' | 'windows' | 'android' | 'linux';
|
|
2
|
-
|
|
2
|
+
interface UseOsOptions {
|
|
3
|
+
getValueInEffect: boolean;
|
|
4
|
+
}
|
|
5
|
+
export declare function useOs(options?: UseOsOptions): OS;
|
|
6
|
+
export {};
|
|
3
7
|
//# sourceMappingURL=use-os.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-os.d.ts","sourceRoot":"","sources":["../../src/use-os/use-os.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"use-os.d.ts","sourceRoot":"","sources":["../../src/use-os/use-os.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,EAAE,GAAG,cAAc,GAAG,OAAO,GAAG,KAAK,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;AA+BpF,UAAU,YAAY;IACpB,gBAAgB,EAAE,OAAO,CAAC;CAC3B;AAED,wBAAgB,KAAK,CAAC,OAAO,GAAE,YAAyC,GAAG,EAAE,CAU5E"}
|