@assistant-ui/tap 0.5.11 → 0.5.12
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 +21 -364
- package/dist/core/ResourceFiber.d.ts +9 -5
- package/dist/core/ResourceFiber.d.ts.map +1 -1
- package/dist/core/ResourceFiber.js +47 -45
- package/dist/core/ResourceFiber.js.map +1 -1
- package/dist/core/context.d.ts +7 -5
- package/dist/core/context.d.ts.map +1 -1
- package/dist/core/context.js +16 -15
- package/dist/core/context.js.map +1 -1
- package/dist/core/createResourceRoot.d.ts +8 -4
- package/dist/core/createResourceRoot.d.ts.map +1 -1
- package/dist/core/createResourceRoot.js +25 -26
- package/dist/core/createResourceRoot.js.map +1 -1
- package/dist/core/helpers/callResourceFn.d.ts +1 -2
- package/dist/core/helpers/callResourceFn.js +15 -13
- package/dist/core/helpers/callResourceFn.js.map +1 -1
- package/dist/core/helpers/commit.d.ts +7 -3
- package/dist/core/helpers/commit.d.ts.map +1 -1
- package/dist/core/helpers/commit.js +33 -50
- package/dist/core/helpers/commit.js.map +1 -1
- package/dist/core/helpers/env.d.ts +4 -1
- package/dist/core/helpers/env.d.ts.map +1 -1
- package/dist/core/helpers/env.js +5 -2
- package/dist/core/helpers/env.js.map +1 -1
- package/dist/core/helpers/execution-context.d.ts +8 -4
- package/dist/core/helpers/execution-context.d.ts.map +1 -1
- package/dist/core/helpers/execution-context.js +22 -27
- package/dist/core/helpers/execution-context.js.map +1 -1
- package/dist/core/helpers/root.d.ts +10 -6
- package/dist/core/helpers/root.d.ts.map +1 -1
- package/dist/core/helpers/root.js +45 -48
- package/dist/core/helpers/root.js.map +1 -1
- package/dist/core/resource.d.ts +8 -4
- package/dist/core/resource.d.ts.map +1 -1
- package/dist/core/resource.js +13 -9
- package/dist/core/resource.js.map +1 -1
- package/dist/core/scheduler.d.ts +11 -9
- package/dist/core/scheduler.d.ts.map +1 -1
- package/dist/core/scheduler.js +70 -83
- package/dist/core/scheduler.js.map +1 -1
- package/dist/core/types.d.ts +56 -55
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/types.js +0 -2
- package/dist/core/withKey.d.ts +6 -2
- package/dist/core/withKey.d.ts.map +1 -1
- package/dist/core/withKey.js +9 -2
- package/dist/core/withKey.js.map +1 -1
- package/dist/hooks/tap-callback.d.ts +4 -1
- package/dist/hooks/tap-callback.d.ts.map +1 -1
- package/dist/hooks/tap-callback.js +6 -3
- package/dist/hooks/tap-callback.js.map +1 -1
- package/dist/hooks/tap-const.d.ts +4 -1
- package/dist/hooks/tap-const.d.ts.map +1 -1
- package/dist/hooks/tap-const.js +7 -3
- package/dist/hooks/tap-const.js.map +1 -1
- package/dist/hooks/tap-effect-event.d.ts +4 -1
- package/dist/hooks/tap-effect-event.d.ts.map +1 -1
- package/dist/hooks/tap-effect-event.js +31 -29
- package/dist/hooks/tap-effect-event.js.map +1 -1
- package/dist/hooks/tap-effect.d.ts +8 -5
- package/dist/hooks/tap-effect.d.ts.map +1 -1
- package/dist/hooks/tap-effect.js +35 -45
- package/dist/hooks/tap-effect.js.map +1 -1
- package/dist/hooks/tap-memo.d.ts +4 -1
- package/dist/hooks/tap-memo.d.ts.map +1 -1
- package/dist/hooks/tap-memo.js +17 -13
- package/dist/hooks/tap-memo.js.map +1 -1
- package/dist/hooks/tap-reducer.d.ts +7 -5
- package/dist/hooks/tap-reducer.d.ts.map +1 -1
- package/dist/hooks/tap-reducer.js +70 -76
- package/dist/hooks/tap-reducer.js.map +1 -1
- package/dist/hooks/tap-ref.d.ts +9 -6
- package/dist/hooks/tap-ref.d.ts.map +1 -1
- package/dist/hooks/tap-ref.js +7 -5
- package/dist/hooks/tap-ref.js.map +1 -1
- package/dist/hooks/tap-resource.d.ts +7 -3
- package/dist/hooks/tap-resource.d.ts.map +1 -1
- package/dist/hooks/tap-resource.js +31 -22
- package/dist/hooks/tap-resource.js.map +1 -1
- package/dist/hooks/tap-resources.d.ts +6 -2
- package/dist/hooks/tap-resources.d.ts.map +1 -1
- package/dist/hooks/tap-resources.js +74 -96
- package/dist/hooks/tap-resources.js.map +1 -1
- package/dist/hooks/tap-state.d.ts +7 -7
- package/dist/hooks/tap-state.d.ts.map +1 -1
- package/dist/hooks/tap-state.js +7 -5
- package/dist/hooks/tap-state.js.map +1 -1
- package/dist/hooks/utils/depsShallowEqual.d.ts +4 -1
- package/dist/hooks/utils/depsShallowEqual.d.ts.map +1 -1
- package/dist/hooks/utils/depsShallowEqual.js +8 -8
- package/dist/hooks/utils/depsShallowEqual.js.map +1 -1
- package/dist/hooks/utils/tapHook.d.ts +8 -4
- package/dist/hooks/utils/tapHook.d.ts.map +1 -1
- package/dist/hooks/utils/tapHook.js +17 -20
- package/dist/hooks/utils/tapHook.js.map +1 -1
- package/dist/index.d.ts +18 -18
- package/dist/index.js +17 -23
- package/dist/react/index.d.ts +2 -2
- package/dist/react/index.js +2 -2
- package/dist/react/use-resource.d.ts +6 -2
- package/dist/react/use-resource.d.ts.map +1 -1
- package/dist/react/use-resource.js +41 -36
- package/dist/react/use-resource.js.map +1 -1
- package/dist/tapResourceRoot.d.ts +18 -14
- package/dist/tapResourceRoot.d.ts.map +1 -1
- package/dist/tapResourceRoot.js +68 -77
- package/dist/tapResourceRoot.js.map +1 -1
- package/package.json +8 -8
- package/src/core/types.ts +1 -2
- package/dist/core/helpers/callResourceFn.d.ts.map +0 -1
- package/dist/core/types.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/react/index.d.ts.map +0 -1
- package/dist/react/index.js.map +0 -1
|
@@ -1,16 +1,20 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
import { ResourceElement } from "./core/types.js";
|
|
2
|
+
|
|
3
|
+
//#region src/tapResourceRoot.d.ts
|
|
4
|
+
declare namespace tapResourceRoot {
|
|
5
|
+
type Unsubscribe = () => void;
|
|
6
|
+
interface SubscribableResource<TState> {
|
|
7
|
+
/**
|
|
8
|
+
* Get the current state of the store.
|
|
9
|
+
*/
|
|
10
|
+
getValue(): TState;
|
|
11
|
+
/**
|
|
12
|
+
* Subscribe to the store.
|
|
13
|
+
*/
|
|
14
|
+
subscribe(listener: () => void): Unsubscribe;
|
|
15
|
+
}
|
|
14
16
|
}
|
|
15
|
-
|
|
17
|
+
declare const tapResourceRoot: <TState>(element: ResourceElement<TState>) => tapResourceRoot.SubscribableResource<TState>;
|
|
18
|
+
//#endregion
|
|
19
|
+
export { tapResourceRoot };
|
|
16
20
|
//# sourceMappingURL=tapResourceRoot.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tapResourceRoot.d.ts","
|
|
1
|
+
{"version":3,"file":"tapResourceRoot.d.ts","names":[],"sources":["../src/tapResourceRoot.ts"],"mappings":";;;kBAoBiB,eAAA;EAAA,KACH,WAAA;EAAA,UAEK,oBAAA;IAHa;;;IAO5B,QAAA,IAAY,MAAA;IAJG;;;IASf,SAAA,CAAU,QAAA,eAAuB,WAAW;EAAA;AAAA;AAAA,cAMnC,eAAA,WACX,OAAA,EAAS,eAAA,CAAgB,MAAA,MACxB,eAAA,CAAgB,oBAAA,CAAqB,MAAA"}
|
package/dist/tapResourceRoot.js
CHANGED
|
@@ -1,82 +1,73 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { isDevelopment } from "./core/helpers/env.js";
|
|
2
|
+
import { commitRoot, createResourceFiberRoot, setRootVersion } from "./core/helpers/root.js";
|
|
3
|
+
import { tapEffect } from "./hooks/tap-effect.js";
|
|
4
|
+
import { tapRef } from "./hooks/tap-ref.js";
|
|
3
5
|
import { tapConst } from "./hooks/tap-const.js";
|
|
4
6
|
import { tapMemo } from "./hooks/tap-memo.js";
|
|
5
|
-
import { tapEffect } from "./hooks/tap-effect.js";
|
|
6
7
|
import { tapEffectEvent } from "./hooks/tap-effect-event.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
if (scheduler.isDirty || valueRef.current === render.output)
|
|
69
|
-
return;
|
|
70
|
-
valueRef.current = render.output;
|
|
71
|
-
// biome-ignore lint/suspicious/useIterableCallbackReturn: forEach callback intentionally has no return
|
|
72
|
-
subscribers.forEach((callback) => callback());
|
|
73
|
-
});
|
|
74
|
-
return tapMemo(() => ({
|
|
75
|
-
getValue: () => valueRef.current,
|
|
76
|
-
subscribe: (listener) => {
|
|
77
|
-
subscribers.add(listener);
|
|
78
|
-
return () => subscribers.delete(listener);
|
|
79
|
-
},
|
|
80
|
-
}), []);
|
|
8
|
+
import { commitResourceFiber, createResourceFiber, renderResourceFiber, unmountResourceFiber } from "./core/ResourceFiber.js";
|
|
9
|
+
import { UpdateScheduler } from "./core/scheduler.js";
|
|
10
|
+
//#region src/tapResourceRoot.ts
|
|
11
|
+
const tapResourceRoot = (element) => {
|
|
12
|
+
const scheduler = tapConst(() => new UpdateScheduler(() => handleUpdate(null)), []);
|
|
13
|
+
const queue = tapConst(() => [], []);
|
|
14
|
+
const fiber = tapMemo(() => {
|
|
15
|
+
element.key;
|
|
16
|
+
return createResourceFiber(element.type, createResourceFiberRoot((callback) => {
|
|
17
|
+
if (!scheduler.isDirty && !callback()) return;
|
|
18
|
+
queue.push(callback);
|
|
19
|
+
scheduler.markDirty();
|
|
20
|
+
}));
|
|
21
|
+
}, [element.type, element.key]);
|
|
22
|
+
setRootVersion(fiber.root, fiber.root.committedVersion);
|
|
23
|
+
const render = renderResourceFiber(fiber, element.props);
|
|
24
|
+
const isMountedRef = tapRef(false);
|
|
25
|
+
const committedPropsRef = tapRef(element.props);
|
|
26
|
+
const valueRef = tapRef(render.output);
|
|
27
|
+
const subscribers = tapConst(() => /* @__PURE__ */ new Set(), []);
|
|
28
|
+
const handleUpdate = tapEffectEvent((render) => {
|
|
29
|
+
if (render === null) {
|
|
30
|
+
setRootVersion(fiber.root, 2);
|
|
31
|
+
setRootVersion(fiber.root, 1);
|
|
32
|
+
queue.forEach((callback) => {
|
|
33
|
+
if (isDevelopment && fiber.devStrictMode) callback();
|
|
34
|
+
callback();
|
|
35
|
+
});
|
|
36
|
+
if (isDevelopment && fiber.devStrictMode) renderResourceFiber(fiber, committedPropsRef.current);
|
|
37
|
+
render = renderResourceFiber(fiber, committedPropsRef.current);
|
|
38
|
+
}
|
|
39
|
+
if (scheduler.isDirty) throw new Error("Scheduler is dirty, this should never happen");
|
|
40
|
+
commitRoot(fiber.root);
|
|
41
|
+
queue.length = 0;
|
|
42
|
+
if (isMountedRef.current) commitResourceFiber(fiber, render);
|
|
43
|
+
if (scheduler.isDirty || valueRef.current === render.output) return;
|
|
44
|
+
valueRef.current = render.output;
|
|
45
|
+
subscribers.forEach((callback) => callback());
|
|
46
|
+
});
|
|
47
|
+
tapEffect(() => {
|
|
48
|
+
isMountedRef.current = true;
|
|
49
|
+
return () => {
|
|
50
|
+
isMountedRef.current = false;
|
|
51
|
+
unmountResourceFiber(fiber);
|
|
52
|
+
};
|
|
53
|
+
}, [fiber]);
|
|
54
|
+
tapEffect(() => {
|
|
55
|
+
committedPropsRef.current = render.props;
|
|
56
|
+
commitRoot(fiber.root);
|
|
57
|
+
commitResourceFiber(fiber, render);
|
|
58
|
+
if (scheduler.isDirty || valueRef.current === render.output) return;
|
|
59
|
+
valueRef.current = render.output;
|
|
60
|
+
subscribers.forEach((callback) => callback());
|
|
61
|
+
});
|
|
62
|
+
return tapMemo(() => ({
|
|
63
|
+
getValue: () => valueRef.current,
|
|
64
|
+
subscribe: (listener) => {
|
|
65
|
+
subscribers.add(listener);
|
|
66
|
+
return () => subscribers.delete(listener);
|
|
67
|
+
}
|
|
68
|
+
}), []);
|
|
81
69
|
};
|
|
70
|
+
//#endregion
|
|
71
|
+
export { tapResourceRoot };
|
|
72
|
+
|
|
82
73
|
//# sourceMappingURL=tapResourceRoot.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tapResourceRoot.js","
|
|
1
|
+
{"version":3,"file":"tapResourceRoot.js","names":[],"sources":["../src/tapResourceRoot.ts"],"sourcesContent":["import {\n commitResourceFiber,\n createResourceFiber,\n renderResourceFiber,\n unmountResourceFiber,\n} from \"./core/ResourceFiber\";\nimport { UpdateScheduler } from \"./core/scheduler\";\nimport { tapConst } from \"./hooks/tap-const\";\nimport { tapMemo } from \"./hooks/tap-memo\";\nimport { tapEffect } from \"./hooks/tap-effect\";\nimport { tapEffectEvent } from \"./hooks/tap-effect-event\";\nimport { tapRef } from \"./hooks/tap-ref\";\nimport type { RenderResult, ResourceElement } from \"./core/types\";\nimport { isDevelopment } from \"./core/helpers/env\";\nimport {\n commitRoot,\n createResourceFiberRoot,\n setRootVersion,\n} from \"./core/helpers/root\";\n\nexport namespace tapResourceRoot {\n export type Unsubscribe = () => void;\n\n export interface SubscribableResource<TState> {\n /**\n * Get the current state of the store.\n */\n getValue(): TState;\n\n /**\n * Subscribe to the store.\n */\n subscribe(listener: () => void): Unsubscribe;\n }\n}\n\n// currently we never reset the root, because rollbakcs are not supported in tapResourceRoot\n\nexport const tapResourceRoot = <TState>(\n element: ResourceElement<TState>,\n): tapResourceRoot.SubscribableResource<TState> => {\n const scheduler = tapConst(\n () => new UpdateScheduler(() => handleUpdate(null)),\n [],\n );\n const queue = tapConst(() => [] as (() => void)[], []);\n\n const fiber = tapMemo(() => {\n void element.key;\n\n return createResourceFiber(\n element.type,\n createResourceFiberRoot((callback) => {\n if (!scheduler.isDirty && !callback()) return;\n queue.push(callback);\n scheduler.markDirty();\n }),\n );\n }, [element.type, element.key]);\n\n setRootVersion(fiber.root, fiber.root.committedVersion);\n const render = renderResourceFiber(fiber, element.props);\n\n const isMountedRef = tapRef(false);\n const committedPropsRef = tapRef(element.props);\n const valueRef = tapRef<TState>(render.output);\n const subscribers = tapConst(() => new Set<() => void>(), []);\n const handleUpdate = tapEffectEvent((render: RenderResult | null) => {\n if (render === null) {\n setRootVersion(fiber.root, 2);\n setRootVersion(fiber.root, 1);\n\n queue.forEach((callback) => {\n if (isDevelopment && fiber.devStrictMode) {\n callback();\n }\n\n callback();\n });\n\n if (isDevelopment && fiber.devStrictMode) {\n void renderResourceFiber(fiber, committedPropsRef.current);\n }\n\n render = renderResourceFiber(fiber, committedPropsRef.current);\n }\n\n if (scheduler.isDirty)\n throw new Error(\"Scheduler is dirty, this should never happen\");\n\n commitRoot(fiber.root);\n queue.length = 0;\n\n if (isMountedRef.current) {\n commitResourceFiber(fiber, render);\n }\n\n if (scheduler.isDirty || valueRef.current === render.output) return;\n valueRef.current = render.output;\n // biome-ignore lint/suspicious/useIterableCallbackReturn: forEach callback intentionally has no return\n subscribers.forEach((callback) => callback());\n });\n\n tapEffect(() => {\n isMountedRef.current = true;\n return () => {\n isMountedRef.current = false;\n unmountResourceFiber(fiber);\n };\n }, [fiber]);\n\n tapEffect(() => {\n committedPropsRef.current = render.props;\n commitRoot(fiber.root);\n commitResourceFiber(fiber, render);\n\n if (scheduler.isDirty || valueRef.current === render.output) return;\n valueRef.current = render.output;\n // biome-ignore lint/suspicious/useIterableCallbackReturn: forEach callback intentionally has no return\n subscribers.forEach((callback) => callback());\n });\n\n return tapMemo(\n () => ({\n getValue: () => valueRef.current,\n subscribe: (listener: () => void) => {\n subscribers.add(listener);\n return () => subscribers.delete(listener);\n },\n }),\n [],\n );\n};\n"],"mappings":";;;;;;;;;;AAsCA,MAAa,mBACX,YACiD;CACjD,MAAM,YAAY,eACV,IAAI,sBAAsB,aAAa,IAAI,CAAC,GAClD,CAAC,CACH;CACA,MAAM,QAAQ,eAAe,CAAC,GAAqB,CAAC,CAAC;CAErD,MAAM,QAAQ,cAAc;EAC1B,QAAa;EAEb,OAAO,oBACL,QAAQ,MACR,yBAAyB,aAAa;GACpC,IAAI,CAAC,UAAU,WAAW,CAAC,SAAS,GAAG;GACvC,MAAM,KAAK,QAAQ;GACnB,UAAU,UAAU;EACtB,CAAC,CACH;CACF,GAAG,CAAC,QAAQ,MAAM,QAAQ,GAAG,CAAC;CAE9B,eAAe,MAAM,MAAM,MAAM,KAAK,gBAAgB;CACtD,MAAM,SAAS,oBAAoB,OAAO,QAAQ,KAAK;CAEvD,MAAM,eAAe,OAAO,KAAK;CACjC,MAAM,oBAAoB,OAAO,QAAQ,KAAK;CAC9C,MAAM,WAAW,OAAe,OAAO,MAAM;CAC7C,MAAM,cAAc,+BAAe,IAAI,IAAgB,GAAG,CAAC,CAAC;CAC5D,MAAM,eAAe,gBAAgB,WAAgC;EACnE,IAAI,WAAW,MAAM;GACnB,eAAe,MAAM,MAAM,CAAC;GAC5B,eAAe,MAAM,MAAM,CAAC;GAE5B,MAAM,SAAS,aAAa;IAC1B,IAAI,iBAAiB,MAAM,eACzB,SAAS;IAGX,SAAS;GACX,CAAC;GAED,IAAI,iBAAiB,MAAM,eACzB,oBAAyB,OAAO,kBAAkB,OAAO;GAG3D,SAAS,oBAAoB,OAAO,kBAAkB,OAAO;EAC/D;EAEA,IAAI,UAAU,SACZ,MAAM,IAAI,MAAM,8CAA8C;EAEhE,WAAW,MAAM,IAAI;EACrB,MAAM,SAAS;EAEf,IAAI,aAAa,SACf,oBAAoB,OAAO,MAAM;EAGnC,IAAI,UAAU,WAAW,SAAS,YAAY,OAAO,QAAQ;EAC7D,SAAS,UAAU,OAAO;EAE1B,YAAY,SAAS,aAAa,SAAS,CAAC;CAC9C,CAAC;CAED,gBAAgB;EACd,aAAa,UAAU;EACvB,aAAa;GACX,aAAa,UAAU;GACvB,qBAAqB,KAAK;EAC5B;CACF,GAAG,CAAC,KAAK,CAAC;CAEV,gBAAgB;EACd,kBAAkB,UAAU,OAAO;EACnC,WAAW,MAAM,IAAI;EACrB,oBAAoB,OAAO,MAAM;EAEjC,IAAI,UAAU,WAAW,SAAS,YAAY,OAAO,QAAQ;EAC7D,SAAS,UAAU,OAAO;EAE1B,YAAY,SAAS,aAAa,SAAS,CAAC;CAC9C,CAAC;CAED,OAAO,eACE;EACL,gBAAgB,SAAS;EACzB,YAAY,aAAyB;GACnC,YAAY,IAAI,QAAQ;GACxB,aAAa,YAAY,OAAO,QAAQ;EAC1C;CACF,IACA,CAAC,CACH;AACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@assistant-ui/tap",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.12",
|
|
4
4
|
"description": "Zero-dependency reactive state management inspired by React hooks",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"state-management",
|
|
@@ -46,15 +46,15 @@
|
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@testing-library/dom": "^10.4.1",
|
|
48
48
|
"@testing-library/react": "^16.3.2",
|
|
49
|
-
"@types/node": "^25.
|
|
50
|
-
"@types/react": "^19.2.
|
|
49
|
+
"@types/node": "^25.9.1",
|
|
50
|
+
"@types/react": "^19.2.15",
|
|
51
51
|
"@types/react-dom": "^19.2.3",
|
|
52
|
-
"@vitest/ui": "^4.1.
|
|
52
|
+
"@vitest/ui": "^4.1.7",
|
|
53
53
|
"jsdom": "^29.1.1",
|
|
54
|
-
"react": "^19.2.
|
|
55
|
-
"react-dom": "^19.2.
|
|
56
|
-
"vitest": "^4.1.
|
|
57
|
-
"@assistant-ui/x-buildutils": "0.0.
|
|
54
|
+
"react": "^19.2.6",
|
|
55
|
+
"react-dom": "^19.2.6",
|
|
56
|
+
"vitest": "^4.1.7",
|
|
57
|
+
"@assistant-ui/x-buildutils": "0.0.9"
|
|
58
58
|
},
|
|
59
59
|
"publishConfig": {
|
|
60
60
|
"access": "public",
|
package/src/core/types.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import type { tapEffect } from "../hooks/tap-effect";
|
|
2
|
-
import type { fnSymbol } from "./helpers/callResourceFn";
|
|
3
2
|
|
|
4
3
|
export type ResourceElement<R, P = any> = {
|
|
5
|
-
readonly type: Resource<R, P
|
|
4
|
+
readonly type: Resource<R, P>;
|
|
6
5
|
readonly props: P;
|
|
7
6
|
readonly key?: string | number;
|
|
8
7
|
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"callResourceFn.d.ts","sourceRoot":"","sources":["../../../src/core/helpers/callResourceFn.ts"],"names":[],"mappings":""}
|
package/dist/core/types.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/core/types.ts"],"names":[],"mappings":""}
|
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,2BAAwB;AAC3C,OAAO,EAAE,OAAO,EAAE,0BAAuB;AAGzC,OAAO,EAAE,QAAQ,EAAE,6BAA0B;AAC7C,OAAO,EAAE,UAAU,EAAE,0BAA0B,EAAE,+BAA4B;AAC7E,OAAO,EAAE,SAAS,EAAE,8BAA2B;AAG/C,OAAO,EAAE,MAAM,EAAE,2BAAwB;AACzC,OAAO,EAAE,QAAQ,EAAE,6BAA0B;AAC7C,OAAO,EAAE,OAAO,EAAE,4BAAyB;AAC3C,OAAO,EAAE,WAAW,EAAE,gCAA6B;AACnD,OAAO,EAAE,cAAc,EAAE,oCAAiC;AAG1D,OAAO,EAAE,WAAW,EAAE,gCAA6B;AACnD,OAAO,EAAE,YAAY,EAAE,iCAA8B;AAGrD,OAAO,EAAE,eAAe,EAAE,6BAA0B;AAGpD,OAAO,EAAE,kBAAkB,EAAE,qCAAkC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,4BAAyB;AAGtD,OAAO,EACL,qBAAqB,EACrB,GAAG,EACH,mBAAmB,GACpB,0BAAuB;AAGxB,YAAY,EACV,QAAQ,EACR,qBAAqB,EACrB,eAAe,GAChB,wBAAqB"}
|
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,2BAAwB;AAC3C,OAAO,EAAE,OAAO,EAAE,0BAAuB;AAEzC,kBAAkB;AAClB,OAAO,EAAE,QAAQ,EAAE,6BAA0B;AAC7C,OAAO,EAAE,UAAU,EAAE,0BAA0B,EAAE,+BAA4B;AAC7E,OAAO,EAAE,SAAS,EAAE,8BAA2B;AAE/C,gBAAgB;AAChB,OAAO,EAAE,MAAM,EAAE,2BAAwB;AACzC,OAAO,EAAE,QAAQ,EAAE,6BAA0B;AAC7C,OAAO,EAAE,OAAO,EAAE,4BAAyB;AAC3C,OAAO,EAAE,WAAW,EAAE,gCAA6B;AACnD,OAAO,EAAE,cAAc,EAAE,oCAAiC;AAE1D,YAAY;AACZ,OAAO,EAAE,WAAW,EAAE,gCAA6B;AACnD,OAAO,EAAE,YAAY,EAAE,iCAA8B;AAErD,eAAe;AACf,OAAO,EAAE,eAAe,EAAE,6BAA0B;AAEpD,aAAa;AACb,OAAO,EAAE,kBAAkB,EAAE,qCAAkC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,4BAAyB;AAEtD,UAAU;AACV,OAAO,EACL,qBAAqB,EACrB,GAAG,EACH,mBAAmB,GACpB,0BAAuB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/react/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,0BAAuB"}
|
package/dist/react/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/react/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,0BAAuB"}
|