awai-react 0.0.1-alpha-1 → 0.0.1-alpha-3
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/README.md +1 -0
- package/dist/index.d.ts +4 -2
- package/dist/index.js +26 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +26 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +9 -2
package/README.md
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
<p>React hooks for <a href="https://awai.vercel.app">Awai</a> integration</p>
|
|
5
5
|
|
|
6
6
|
<div>
|
|
7
|
+
<img src="https://github.com/yuriyyakym/awai-react/actions/workflows/tests.yml/badge.svg" />
|
|
7
8
|
<img src="https://img.shields.io/badge/stability-experimental-blue.svg" />
|
|
8
9
|
<img src="https://img.shields.io/badge/License-MIT-blue.svg" />
|
|
9
10
|
</div>
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import { WritableState, WritableAsyncState, State, AsyncState, Setter, AsyncSetter, ReadableState
|
|
1
|
+
import { ReadableAsyncState, InferReadableType, WritableState, WritableAsyncState, State, AsyncState, Setter, AsyncSetter, ReadableState } from 'awai';
|
|
2
|
+
|
|
3
|
+
declare const useAsyncStateValue: <Q, T extends ReadableAsyncState<Q>>(readable: T) => InferReadableType<T>;
|
|
2
4
|
|
|
3
5
|
declare const useSetState: <Q extends WritableState<T> | WritableAsyncState<T>, T = any>(writable: Q) => Q["set"];
|
|
4
6
|
|
|
@@ -8,4 +10,4 @@ declare function useState<T>(state: AsyncState<T>): Return<AsyncState<T>>;
|
|
|
8
10
|
|
|
9
11
|
declare const useStateValue: <T extends ReadableState<any> | ReadableAsyncState<any>>(readable: T) => InferReadableType<T>;
|
|
10
12
|
|
|
11
|
-
export { useSetState, useState, useStateValue };
|
|
13
|
+
export { useAsyncStateValue, useSetState, useState, useStateValue };
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,27 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var awai = require('awai');
|
|
4
3
|
var react = require('react');
|
|
4
|
+
var awai = require('awai');
|
|
5
|
+
|
|
6
|
+
const useAsyncStateValue = (readable) => {
|
|
7
|
+
const [state, setState] = react.useState(readable.getAsync);
|
|
8
|
+
react.useEffect(() => {
|
|
9
|
+
let mounted = true;
|
|
10
|
+
setState(readable.getAsync());
|
|
11
|
+
(async () => {
|
|
12
|
+
while (mounted) {
|
|
13
|
+
await readable.events.changed;
|
|
14
|
+
if (mounted) {
|
|
15
|
+
setState(readable.getAsync());
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
})();
|
|
19
|
+
return () => {
|
|
20
|
+
mounted = false;
|
|
21
|
+
};
|
|
22
|
+
}, [readable]);
|
|
23
|
+
return state;
|
|
24
|
+
};
|
|
5
25
|
|
|
6
26
|
const useSetState = (writable) => {
|
|
7
27
|
return writable.set;
|
|
@@ -9,16 +29,17 @@ const useSetState = (writable) => {
|
|
|
9
29
|
|
|
10
30
|
const useStateValue = (readable) => {
|
|
11
31
|
const [state, setState] = react.useState(readable.get);
|
|
12
|
-
if (awai.isReadableAsyncState(readable) &&
|
|
32
|
+
if (awai.isReadableAsyncState(readable) && readable.get() === void 0) {
|
|
13
33
|
throw new Promise((resolve) => readable.events.changed.then(resolve));
|
|
14
34
|
}
|
|
15
35
|
react.useEffect(() => {
|
|
16
36
|
let mounted = true;
|
|
37
|
+
setState(readable.get());
|
|
17
38
|
(async () => {
|
|
18
39
|
while (mounted) {
|
|
19
|
-
await readable.events.changed;
|
|
40
|
+
const newValue = await readable.events.changed;
|
|
20
41
|
if (mounted) {
|
|
21
|
-
setState(
|
|
42
|
+
setState(newValue);
|
|
22
43
|
}
|
|
23
44
|
}
|
|
24
45
|
})();
|
|
@@ -35,6 +56,7 @@ function useState(state) {
|
|
|
35
56
|
return [value, setValue];
|
|
36
57
|
}
|
|
37
58
|
|
|
59
|
+
exports.useAsyncStateValue = useAsyncStateValue;
|
|
38
60
|
exports.useSetState = useSetState;
|
|
39
61
|
exports.useState = useState;
|
|
40
62
|
exports.useStateValue = useStateValue;
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/useSetState.ts","../src/useStateValue.ts","../src/useState.ts"],"sourcesContent":["import type { WritableAsyncState, WritableState } from 'awai';\n\nconst useSetState = <Q extends WritableState<T> | WritableAsyncState<T>, T = any>(\n writable: Q,\n): Q['set'] => {\n return writable.set;\n};\n\nexport default useSetState;\n","import {\n type InferReadableType,\n type ReadableAsyncState,\n type ReadableState,\n isReadableAsyncState,\n} from 'awai';\nimport { useEffect, useState } from 'react';\n\nconst useStateValue = <T extends ReadableState<any> | ReadableAsyncState<any>>(\n readable: T,\n): InferReadableType<T> => {\n const [state, setState] = useState<T | undefined>(readable.get);\n\n if (isReadableAsyncState(readable) &&
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/useAsyncStateValue.ts","../src/useSetState.ts","../src/useStateValue.ts","../src/useState.ts"],"sourcesContent":["import { type InferReadableType, type ReadableAsyncState, AsyncValue } from 'awai';\nimport { useEffect, useState } from 'react';\n\nconst useAsyncStateValue = <Q, T extends ReadableAsyncState<Q>>(\n readable: T,\n): InferReadableType<T> => {\n const [state, setState] = useState<AsyncValue<Q>>(readable.getAsync);\n\n useEffect(() => {\n let mounted = true;\n\n setState(readable.getAsync());\n\n (async () => {\n while (mounted) {\n /**\n * @todo Cleanup on unmount\n * @url https://github.com/yuriyyakym/awai/issues/1\n */\n await readable.events.changed;\n if (mounted) {\n setState(readable.getAsync());\n }\n }\n })();\n\n return () => {\n mounted = false;\n };\n }, [readable]);\n\n return state as InferReadableType<T>;\n};\n\nexport default useAsyncStateValue;\n","import type { WritableAsyncState, WritableState } from 'awai';\n\nconst useSetState = <Q extends WritableState<T> | WritableAsyncState<T>, T = any>(\n writable: Q,\n): Q['set'] => {\n return writable.set;\n};\n\nexport default useSetState;\n","import {\n type InferReadableType,\n type ReadableAsyncState,\n type ReadableState,\n isReadableAsyncState,\n} from 'awai';\nimport { useEffect, useState } from 'react';\n\nconst useStateValue = <T extends ReadableState<any> | ReadableAsyncState<any>>(\n readable: T,\n): InferReadableType<T> => {\n const [state, setState] = useState<T | undefined>(readable.get);\n\n if (isReadableAsyncState(readable) && readable.get() === undefined) {\n throw new Promise((resolve) => readable.events.changed.then(resolve));\n }\n\n useEffect(() => {\n let mounted = true;\n\n setState(readable.get());\n\n (async () => {\n while (mounted) {\n /**\n * @todo Cleanup on unmount\n * @url https://github.com/yuriyyakym/awai/issues/1\n */\n const newValue = await readable.events.changed;\n if (mounted) {\n setState(newValue);\n }\n }\n })();\n\n return () => {\n mounted = false;\n };\n }, [readable]);\n\n return state as InferReadableType<T>;\n};\n\nexport default useStateValue;\n","import type { AsyncSetter, AsyncState, Setter, State } from 'awai';\n\nimport useSetState from './useSetState';\nimport useStateValue from './useStateValue';\n\ntype Return<T> = T extends State<infer U>\n ? [U, Setter<U>]\n : T extends AsyncState<infer V>\n ? [V, AsyncSetter<V>]\n : never;\n\nfunction useState<T>(state: State<T>): Return<State<T>>;\nfunction useState<T>(state: AsyncState<T>): Return<AsyncState<T>>;\nfunction useState<T>(state: State<T> | AsyncState<T>) {\n const value = useStateValue(state);\n const setValue = useSetState(state);\n\n return [value, setValue];\n}\n\nexport default useState;\n"],"names":["useState","useEffect","isReadableAsyncState"],"mappings":";;;;;AAGM,MAAA,kBAAA,GAAqB,CACzB,QACyB,KAAA;AACzB,EAAA,MAAM,CAAC,KAAO,EAAA,QAAQ,CAAI,GAAAA,cAAA,CAAwB,SAAS,QAAQ,CAAA,CAAA;AAEnE,EAAAC,eAAA,CAAU,MAAM;AACd,IAAA,IAAI,OAAU,GAAA,IAAA,CAAA;AAEd,IAAS,QAAA,CAAA,QAAA,CAAS,UAAU,CAAA,CAAA;AAE5B,IAAA,CAAC,YAAY;AACX,MAAA,OAAO,OAAS,EAAA;AAKd,QAAA,MAAM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,CAAC,QAAQ,CAAC,CAAA,CAAA;AAEb,EAAO,OAAA,KAAA,CAAA;AACT;;AC5BA,SAAS,SAAY,KAAiC,EAAA;AACpD,EAAM,MAAA,KAAA,GAAQ,cAAc,KAAK,CAAA,CAAA;AACjC,EAAM,MAAA,QAAA,GAAW,YAAY,KAAK,CAAA,CAAA;AAElC,EAAO,OAAA,CAAC,OAAO,QAAQ,CAAA,CAAA;AACzB;;;;;;;"}
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
|
-
import { isReadableAsyncState } from 'awai';
|
|
2
1
|
import { useState as useState$1, useEffect } from 'react';
|
|
2
|
+
import { isReadableAsyncState } from 'awai';
|
|
3
|
+
|
|
4
|
+
const useAsyncStateValue = (readable) => {
|
|
5
|
+
const [state, setState] = useState$1(readable.getAsync);
|
|
6
|
+
useEffect(() => {
|
|
7
|
+
let mounted = true;
|
|
8
|
+
setState(readable.getAsync());
|
|
9
|
+
(async () => {
|
|
10
|
+
while (mounted) {
|
|
11
|
+
await readable.events.changed;
|
|
12
|
+
if (mounted) {
|
|
13
|
+
setState(readable.getAsync());
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
})();
|
|
17
|
+
return () => {
|
|
18
|
+
mounted = false;
|
|
19
|
+
};
|
|
20
|
+
}, [readable]);
|
|
21
|
+
return state;
|
|
22
|
+
};
|
|
3
23
|
|
|
4
24
|
const useSetState = (writable) => {
|
|
5
25
|
return writable.set;
|
|
@@ -7,16 +27,17 @@ const useSetState = (writable) => {
|
|
|
7
27
|
|
|
8
28
|
const useStateValue = (readable) => {
|
|
9
29
|
const [state, setState] = useState$1(readable.get);
|
|
10
|
-
if (isReadableAsyncState(readable) &&
|
|
30
|
+
if (isReadableAsyncState(readable) && readable.get() === void 0) {
|
|
11
31
|
throw new Promise((resolve) => readable.events.changed.then(resolve));
|
|
12
32
|
}
|
|
13
33
|
useEffect(() => {
|
|
14
34
|
let mounted = true;
|
|
35
|
+
setState(readable.get());
|
|
15
36
|
(async () => {
|
|
16
37
|
while (mounted) {
|
|
17
|
-
await readable.events.changed;
|
|
38
|
+
const newValue = await readable.events.changed;
|
|
18
39
|
if (mounted) {
|
|
19
|
-
setState(
|
|
40
|
+
setState(newValue);
|
|
20
41
|
}
|
|
21
42
|
}
|
|
22
43
|
})();
|
|
@@ -33,5 +54,5 @@ function useState(state) {
|
|
|
33
54
|
return [value, setValue];
|
|
34
55
|
}
|
|
35
56
|
|
|
36
|
-
export { useSetState, useState, useStateValue };
|
|
57
|
+
export { useAsyncStateValue, useSetState, useState, useStateValue };
|
|
37
58
|
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../src/useSetState.ts","../src/useStateValue.ts","../src/useState.ts"],"sourcesContent":["import type { WritableAsyncState, WritableState } from 'awai';\n\nconst useSetState = <Q extends WritableState<T> | WritableAsyncState<T>, T = any>(\n writable: Q,\n): Q['set'] => {\n return writable.set;\n};\n\nexport default useSetState;\n","import {\n type InferReadableType,\n type ReadableAsyncState,\n type ReadableState,\n isReadableAsyncState,\n} from 'awai';\nimport { useEffect, useState } from 'react';\n\nconst useStateValue = <T extends ReadableState<any> | ReadableAsyncState<any>>(\n readable: T,\n): InferReadableType<T> => {\n const [state, setState] = useState<T | undefined>(readable.get);\n\n if (isReadableAsyncState(readable) &&
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../src/useAsyncStateValue.ts","../src/useSetState.ts","../src/useStateValue.ts","../src/useState.ts"],"sourcesContent":["import { type InferReadableType, type ReadableAsyncState, AsyncValue } from 'awai';\nimport { useEffect, useState } from 'react';\n\nconst useAsyncStateValue = <Q, T extends ReadableAsyncState<Q>>(\n readable: T,\n): InferReadableType<T> => {\n const [state, setState] = useState<AsyncValue<Q>>(readable.getAsync);\n\n useEffect(() => {\n let mounted = true;\n\n setState(readable.getAsync());\n\n (async () => {\n while (mounted) {\n /**\n * @todo Cleanup on unmount\n * @url https://github.com/yuriyyakym/awai/issues/1\n */\n await readable.events.changed;\n if (mounted) {\n setState(readable.getAsync());\n }\n }\n })();\n\n return () => {\n mounted = false;\n };\n }, [readable]);\n\n return state as InferReadableType<T>;\n};\n\nexport default useAsyncStateValue;\n","import type { WritableAsyncState, WritableState } from 'awai';\n\nconst useSetState = <Q extends WritableState<T> | WritableAsyncState<T>, T = any>(\n writable: Q,\n): Q['set'] => {\n return writable.set;\n};\n\nexport default useSetState;\n","import {\n type InferReadableType,\n type ReadableAsyncState,\n type ReadableState,\n isReadableAsyncState,\n} from 'awai';\nimport { useEffect, useState } from 'react';\n\nconst useStateValue = <T extends ReadableState<any> | ReadableAsyncState<any>>(\n readable: T,\n): InferReadableType<T> => {\n const [state, setState] = useState<T | undefined>(readable.get);\n\n if (isReadableAsyncState(readable) && readable.get() === undefined) {\n throw new Promise((resolve) => readable.events.changed.then(resolve));\n }\n\n useEffect(() => {\n let mounted = true;\n\n setState(readable.get());\n\n (async () => {\n while (mounted) {\n /**\n * @todo Cleanup on unmount\n * @url https://github.com/yuriyyakym/awai/issues/1\n */\n const newValue = await readable.events.changed;\n if (mounted) {\n setState(newValue);\n }\n }\n })();\n\n return () => {\n mounted = false;\n };\n }, [readable]);\n\n return state as InferReadableType<T>;\n};\n\nexport default useStateValue;\n","import type { AsyncSetter, AsyncState, Setter, State } from 'awai';\n\nimport useSetState from './useSetState';\nimport useStateValue from './useStateValue';\n\ntype Return<T> = T extends State<infer U>\n ? [U, Setter<U>]\n : T extends AsyncState<infer V>\n ? [V, AsyncSetter<V>]\n : never;\n\nfunction useState<T>(state: State<T>): Return<State<T>>;\nfunction useState<T>(state: AsyncState<T>): Return<AsyncState<T>>;\nfunction useState<T>(state: State<T> | AsyncState<T>) {\n const value = useStateValue(state);\n const setValue = useSetState(state);\n\n return [value, setValue];\n}\n\nexport default useState;\n"],"names":["useState"],"mappings":";;;AAGM,MAAA,kBAAA,GAAqB,CACzB,QACyB,KAAA;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,EAAA;AAKd,QAAM,MAAA,QAAA,GAAW,MAAM,QAAA,CAAS,MAAO,CAAA,OAAA,CAAA;AACvC,QAAA,IAAI,OAAS,EAAA;AACX,UAAA,QAAA,CAAS,QAAQ,CAAA,CAAA;AAAA,SACnB;AAAA,OACF;AAAA,KACC,GAAA,CAAA;AAEH,IAAA,OAAO,MAAM;AACX,MAAU,OAAA,GAAA,KAAA,CAAA;AAAA,KACZ,CAAA;AAAA,GACF,EAAG,CAAC,QAAQ,CAAC,CAAA,CAAA;AAEb,EAAO,OAAA,KAAA,CAAA;AACT;;AC5BA,SAAS,SAAY,KAAiC,EAAA;AACpD,EAAM,MAAA,KAAA,GAAQ,cAAc,KAAK,CAAA,CAAA;AACjC,EAAM,MAAA,QAAA,GAAW,YAAY,KAAK,CAAA,CAAA;AAElC,EAAO,OAAA,CAAC,OAAO,QAAQ,CAAA,CAAA;AACzB;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "awai-react",
|
|
3
|
-
"version": "0.0.1-alpha-
|
|
3
|
+
"version": "0.0.1-alpha-3",
|
|
4
4
|
"author": "Yuriy Yakym",
|
|
5
5
|
"description": "React hooks for Awai integration",
|
|
6
6
|
"license": "MIT",
|
|
@@ -12,7 +12,9 @@
|
|
|
12
12
|
"dist"
|
|
13
13
|
],
|
|
14
14
|
"scripts": {
|
|
15
|
-
"build": "rm -rf dist && rollup -c rollup.config.js"
|
|
15
|
+
"build": "rm -rf dist && rollup -c rollup.config.js",
|
|
16
|
+
"test": "jest",
|
|
17
|
+
"test:watch": "jest --watch"
|
|
16
18
|
},
|
|
17
19
|
"repository": {
|
|
18
20
|
"type": "git",
|
|
@@ -31,12 +33,17 @@
|
|
|
31
33
|
"async"
|
|
32
34
|
],
|
|
33
35
|
"devDependencies": {
|
|
36
|
+
"@testing-library/react": "^14.0.0",
|
|
37
|
+
"@types/jest": "^29.5.3",
|
|
34
38
|
"@types/react": "^18.2.16",
|
|
35
39
|
"awai": "^0.0.1-alpha-3",
|
|
40
|
+
"jest": "^29.6.2",
|
|
41
|
+
"jest-environment-jsdom": "^29.6.2",
|
|
36
42
|
"react": "^18.2.0",
|
|
37
43
|
"rollup": "^3.26.3",
|
|
38
44
|
"rollup-plugin-dts": "^5.3.0",
|
|
39
45
|
"rollup-plugin-esbuild": "^5.0.0",
|
|
46
|
+
"ts-jest": "^29.1.1",
|
|
40
47
|
"typescript": "^5.1.6"
|
|
41
48
|
},
|
|
42
49
|
"peerDependencies": {
|