@seedprotocol/react 0.8.1 → 0.8.2-next.1774.gc97b5ba
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/dist/SeedClientGate.d.ts +2 -2
- package/dist/SeedProvider.d.ts +2 -1
- package/dist/SeedProvider.d.ts.map +1 -1
- package/dist/index.js +704 -690
- package/dist/index.js.map +1 -1
- package/dist/useAddressesProp.d.ts +7 -4
- package/dist/useAddressesProp.d.ts.map +1 -1
- package/package.json +5 -4
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { MutableRefObject } from 'react';
|
|
2
2
|
import { SeedConstructorOptions } from '@seedprotocol/sdk';
|
|
3
3
|
/**
|
|
4
|
-
* Applies a component's `addresses` prop
|
|
5
|
-
*
|
|
6
|
-
* `client.setAddresses`
|
|
7
|
-
*
|
|
4
|
+
* Applies a component's `addresses` prop. A first init applies the mount value; a repeat init (a
|
|
5
|
+
* remount) leaves the stored addresses alone, so on mount this compares a value that holds an
|
|
6
|
+
* address with the stored ones and calls `client.setAddresses` when they differ: an app that
|
|
7
|
+
* unmounts its provider across a user switch gets the new user's addresses. An empty mount value
|
|
8
|
+
* leaves the stored addresses, since apps pass `[]` before a wallet reconnects. After mount it calls
|
|
9
|
+
* `client.setAddresses` whenever the prop holds different addresses. Every call waits for
|
|
10
|
+
* `initRef`'s init and they apply in order. Leaving the prop out (`undefined`) changes nothing.
|
|
8
11
|
*/
|
|
9
12
|
export declare function useAddressesProp(addresses: SeedConstructorOptions['addresses'], initRef: MutableRefObject<Promise<void> | undefined>, label: string): void;
|
|
10
13
|
//# sourceMappingURL=useAddressesProp.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAddressesProp.d.ts","sourceRoot":"","sources":["../src/useAddressesProp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,gBAAgB,EAAE,MAAM,OAAO,CAAA;AAEhE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAA;
|
|
1
|
+
{"version":3,"file":"useAddressesProp.d.ts","sourceRoot":"","sources":["../src/useAddressesProp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,gBAAgB,EAAE,MAAM,OAAO,CAAA;AAEhE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAA;AAgB/D;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAC9B,SAAS,EAAE,sBAAsB,CAAC,WAAW,CAAC,EAC9C,OAAO,EAAE,gBAAgB,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC,EACpD,KAAK,EAAE,MAAM,GACZ,IAAI,CAsCN"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seedprotocol/react",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.2-next.1774.gc97b5ba",
|
|
4
4
|
"description": "React hooks and components for Seed Protocol: live schemas, models, items and properties from @seedprotocol/sdk, backed by TanStack Query",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"seed-protocol",
|
|
@@ -37,10 +37,11 @@
|
|
|
37
37
|
"build": "rimraf dist && vite build && node ../../scripts/fix-dts-specifiers.js",
|
|
38
38
|
"test": "cd ../.. && vitest run --reporter=default --config vite.config.js --project=browser-react",
|
|
39
39
|
"test:watch": "cd ../.. && vitest --config vite.config.js --project=browser-react",
|
|
40
|
-
"test:browser": "cd ../.. && vitest --config vite.config.js --project=browser"
|
|
40
|
+
"test:browser": "cd ../.. && vitest --config vite.config.js --project=browser",
|
|
41
|
+
"prepublishOnly": "node ../../scripts/check-publish-manifest.js"
|
|
41
42
|
},
|
|
42
43
|
"peerDependencies": {
|
|
43
|
-
"@seedprotocol/sdk": "0.8.
|
|
44
|
+
"@seedprotocol/sdk": "0.8.2-next.1774.gc97b5ba",
|
|
44
45
|
"react": "^18 || ^19",
|
|
45
46
|
"react-dom": "^18 || ^19",
|
|
46
47
|
"@tanstack/react-query": "^5"
|
|
@@ -54,7 +55,7 @@
|
|
|
54
55
|
"xstate": "^5.28.0"
|
|
55
56
|
},
|
|
56
57
|
"devDependencies": {
|
|
57
|
-
"@seedprotocol/sdk": "0.8.
|
|
58
|
+
"@seedprotocol/sdk": "0.8.2-next.1774.gc97b5ba",
|
|
58
59
|
"vite-plugin-dts": "^4.5.4",
|
|
59
60
|
"@tanstack/react-query": "^5.104.1",
|
|
60
61
|
"@testing-library/react": "^16.3.1",
|