@soverius-ai/browser-models-react 0.1.0 → 0.2.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/index.d.ts +5 -0
- package/index.js +1 -9
- package/lib/use-model-store.d.ts +2 -1
- package/package.json +4 -3
package/index.d.ts
CHANGED
package/index.js
CHANGED
|
@@ -1,9 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
// src/lib/use-model-store.ts
|
|
3
|
-
function n(e) {
|
|
4
|
-
return t(e.subscribe, e.getState, e.getState);
|
|
5
|
-
}
|
|
6
|
-
function r(t, n = !0) {
|
|
7
|
-
e(() => n ? t.connectDevtools() : void 0, [t, n]);
|
|
8
|
-
}
|
|
9
|
-
export { r as useDevtools, n as useModelStore };
|
|
1
|
+
import{useEffect as t,useSyncExternalStore as r}from"react";function s(e){return r(e.subscribe,e.getState,e.getState)}function u(e,o=!0){t(()=>o?e.connectDevtools():void 0,[e,o])}export{u as useDevtools,s as useModelStore};
|
package/lib/use-model-store.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ModelState, ModelStore } from '@soverius-ai/browser-models';
|
|
2
|
+
import type { BrowserModelsAgent } from '@soverius-ai/browser-models-agui';
|
|
2
3
|
/**
|
|
3
4
|
* The state of a model store as React state. The component re-renders on every change.
|
|
4
5
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@soverius-ai/browser-models-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"types": "./index.d.ts",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -14,10 +14,11 @@
|
|
|
14
14
|
"license": "MIT",
|
|
15
15
|
"homepage": "https://browser-models.soverius.ai",
|
|
16
16
|
"type": "module",
|
|
17
|
-
"description": "React hooks for @soverius-ai/browser-models: model state and debugger wiring.",
|
|
17
|
+
"description": "React hooks for @soverius-ai/browser-models-agui: model state and debugger wiring.",
|
|
18
18
|
"peerDependencies": {
|
|
19
19
|
"react": "^19.0.0",
|
|
20
|
-
"@soverius-ai/browser-models": "0.
|
|
20
|
+
"@soverius-ai/browser-models": "0.2.0",
|
|
21
|
+
"@soverius-ai/browser-models-agui": "0.2.0"
|
|
21
22
|
},
|
|
22
23
|
"module": "./index.js",
|
|
23
24
|
"repository": {
|