@xyo-network/react-diviner 8.0.0 → 9.0.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/dist/browser/index.mjs +1 -1
- package/dist/browser/index.mjs.map +7 -1
- package/package.json +58 -58
package/dist/browser/index.mjs
CHANGED
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/hooks/node/useDivinerFromNode.tsx", "../../src/hooks/node/useDivinersFromNode.tsx", "../../src/hooks/node/useWeakDivinerFromNode.tsx", "../../src/hooks/node/useWeakDivinersFromNode.tsx"],
|
|
4
|
+
"sourcesContent": ["import type { DivinerInstance } from '@xyo-network/diviner-model'\nimport { asDivinerInstance } from '@xyo-network/diviner-model'\nimport type { ModuleFromNodeConfig } from '@xyo-network/react-node'\nimport { useModuleFromNode } from '@xyo-network/react-node'\n\n/** @deprecated use useWeakDivinerFromNode */\nexport const useDivinerFromNode = (\n nameOrAddressOrInstance?: string | DivinerInstance,\n config?: ModuleFromNodeConfig,\n): [DivinerInstance | undefined, Error | undefined] => {\n const [mod, error] = useModuleFromNode(nameOrAddressOrInstance, config)\n const instance = asDivinerInstance(mod)\n if (mod && !instance) {\n const error = new Error(`Resolved module is not a DivinerInstance [${mod.config?.schema}:${mod.config?.name}:${mod.address}]`)\n console.error(error.message)\n return [undefined, error]\n }\n return [instance, error]\n}\n", "import type { DivinerInstance } from '@xyo-network/diviner-model'\nimport { isDivinerInstance } from '@xyo-network/diviner-model'\nimport type { ModuleIdentifier } from '@xyo-network/module-model'\nimport type { ModuleFromNodeConfig } from '@xyo-network/react-node'\nimport { useModulesFromNode } from '@xyo-network/react-node'\n\n/** @deprecated use useWeakDivinersFromNode */\nexport const useDivinersFromNode = (\n ids?: ModuleIdentifier[],\n config?: ModuleFromNodeConfig,\n): [DivinerInstance[] | null | undefined, Error | undefined] => {\n const [modules, error] = useModulesFromNode(ids, config)\n if (error) {\n return [null, error]\n }\n return modules\n ? [\n // eslint-disable-next-line unicorn/no-array-reduce\n modules.reduce<DivinerInstance[]>((prev, mod) => {\n if (isDivinerInstance(mod)) {\n prev.push(mod)\n }\n return prev\n }, []),\n undefined,\n ]\n : [modules, error]\n}\n", "import type { DivinerInstance } from '@xyo-network/diviner-model'\nimport { isDivinerInstance } from '@xyo-network/diviner-model'\nimport type { WeakModuleFromNodeConfig } from '@xyo-network/react-node'\nimport { useWeakModuleFromNode } from '@xyo-network/react-node'\n\nexport const useWeakDivinerFromNode = (\n nameOrAddressOrInstance?: string | DivinerInstance,\n config?: WeakModuleFromNodeConfig,\n): [WeakRef<DivinerInstance> | undefined, Error | undefined] => {\n return useWeakModuleFromNode<DivinerInstance>(nameOrAddressOrInstance, { identity: isDivinerInstance, ...config })\n}\n", "import { exists } from '@xylabs/sdk-js'\nimport type { DivinerInstance } from '@xyo-network/diviner-model'\nimport { asDivinerInstance } from '@xyo-network/diviner-model'\nimport type { ModuleIdentifier } from '@xyo-network/module-model'\nimport type { ModuleFromNodeConfig } from '@xyo-network/react-node'\nimport { useWeakModulesFromNode } from '@xyo-network/react-node'\n\nexport const useWeakDivinersFromNode = (\n ids?: ModuleIdentifier[],\n config?: ModuleFromNodeConfig,\n): [WeakRef<DivinerInstance>[] | null | undefined, Error | undefined] => {\n const [modules, error] = useWeakModulesFromNode(ids, config)\n if (error) {\n return [null, error]\n }\n return [\n modules\n ?.map((mod) => {\n const instance = asDivinerInstance(mod?.deref())\n if (instance) {\n return new WeakRef(instance)\n }\n })\n .filter(exists) ?? [],\n undefined,\n ]\n}\n"],
|
|
5
|
+
"mappings": ";AACA,SAAS,yBAAyB;AAElC,SAAS,yBAAyB;AAG3B,IAAM,qBAAqB,CAChC,yBACA,WACqD;AACrD,QAAM,CAAC,KAAK,KAAK,IAAI,kBAAkB,yBAAyB,MAAM;AACtE,QAAM,WAAW,kBAAkB,GAAG;AACtC,MAAI,OAAO,CAAC,UAAU;AACp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AM,KAAK,CAAC;AAAA,IACtB;AAAA,EACF;AACF;",
|
|
6
|
+
"names": ["error", "isDivinerInstance", "asDivinerInstance"]
|
|
7
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/react-diviner",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "9.0.0",
|
|
4
4
|
"description": "Common React library for all XYO projects that use React",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"xyo",
|
|
@@ -41,89 +41,89 @@
|
|
|
41
41
|
"README.md"
|
|
42
42
|
],
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@xyo-network/react-node": "~
|
|
44
|
+
"@xyo-network/react-node": "~9.0.0"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@bitauth/libauth": "~3.0.0",
|
|
48
|
-
"@mui/icons-material": "
|
|
49
|
-
"@mui/material": "
|
|
50
|
-
"@mui/system": "
|
|
51
|
-
"@mui/x-tree-view": "~9.1",
|
|
48
|
+
"@mui/icons-material": "^9.0.1",
|
|
49
|
+
"@mui/material": "^9.0.1",
|
|
50
|
+
"@mui/system": "^9.0.1",
|
|
51
|
+
"@mui/x-tree-view": "~9.1.0",
|
|
52
52
|
"@opentelemetry/api": "^1.9.1",
|
|
53
53
|
"@opentelemetry/sdk-trace-base": "^2.7.1",
|
|
54
54
|
"@scure/base": "~2.2.0",
|
|
55
|
-
"@xylabs/react-async-effect": "~
|
|
56
|
-
"@xylabs/react-flexbox": "~
|
|
57
|
-
"@xylabs/react-promise": "~
|
|
58
|
-
"@xylabs/react-shared": "~
|
|
59
|
-
"@xylabs/sdk-js": "^
|
|
60
|
-
"@xylabs/threads": "~
|
|
61
|
-
"@xylabs/toolchain": "~
|
|
62
|
-
"@xylabs/tsconfig": "^
|
|
63
|
-
"@xylabs/tsconfig-dom": "^
|
|
64
|
-
"@xylabs/tsconfig-react": "~
|
|
65
|
-
"@xyo-network/account": "~
|
|
66
|
-
"@xyo-network/account-model": "^
|
|
67
|
-
"@xyo-network/boundwitness-builder": "^
|
|
68
|
-
"@xyo-network/boundwitness-model": "^
|
|
69
|
-
"@xyo-network/boundwitness-wrapper": "~
|
|
70
|
-
"@xyo-network/config-payload-plugin": "~
|
|
71
|
-
"@xyo-network/diviner-model": "^
|
|
72
|
-
"@xyo-network/manifest-model": "~
|
|
73
|
-
"@xyo-network/module-model": "^
|
|
74
|
-
"@xyo-network/node-memory": "~
|
|
75
|
-
"@xyo-network/node-model": "^
|
|
76
|
-
"@xyo-network/payload-builder": "^
|
|
77
|
-
"@xyo-network/payload-model": "^
|
|
78
|
-
"@xyo-network/query-payload-plugin": "~
|
|
79
|
-
"@xyo-network/wallet-model": "^
|
|
55
|
+
"@xylabs/react-async-effect": "~9.0.0",
|
|
56
|
+
"@xylabs/react-flexbox": "~9.0.0",
|
|
57
|
+
"@xylabs/react-promise": "~9.0.0",
|
|
58
|
+
"@xylabs/react-shared": "~9.0.0",
|
|
59
|
+
"@xylabs/sdk-js": "^6.0.2",
|
|
60
|
+
"@xylabs/threads": "~6.0.2",
|
|
61
|
+
"@xylabs/toolchain": "~8.1.1",
|
|
62
|
+
"@xylabs/tsconfig": "^8.1.1",
|
|
63
|
+
"@xylabs/tsconfig-dom": "^8.1.1",
|
|
64
|
+
"@xylabs/tsconfig-react": "~8.1.1",
|
|
65
|
+
"@xyo-network/account": "~6.0.0",
|
|
66
|
+
"@xyo-network/account-model": "^6.0.0",
|
|
67
|
+
"@xyo-network/boundwitness-builder": "^6.0.0",
|
|
68
|
+
"@xyo-network/boundwitness-model": "^6.0.0",
|
|
69
|
+
"@xyo-network/boundwitness-wrapper": "~6.0.0",
|
|
70
|
+
"@xyo-network/config-payload-plugin": "~6.0.0",
|
|
71
|
+
"@xyo-network/diviner-model": "^6.0.0",
|
|
72
|
+
"@xyo-network/manifest-model": "~6.0.0",
|
|
73
|
+
"@xyo-network/module-model": "^6.0.0",
|
|
74
|
+
"@xyo-network/node-memory": "~6.0.0",
|
|
75
|
+
"@xyo-network/node-model": "^6.0.0",
|
|
76
|
+
"@xyo-network/payload-builder": "^6.0.0",
|
|
77
|
+
"@xyo-network/payload-model": "^6.0.0",
|
|
78
|
+
"@xyo-network/query-payload-plugin": "~6.0.0",
|
|
79
|
+
"@xyo-network/wallet-model": "^6.0.0",
|
|
80
80
|
"async-mutex": "^0.5.0",
|
|
81
81
|
"bn.js": "^5.2.3",
|
|
82
82
|
"buffer": "^6.0.3",
|
|
83
83
|
"chalk": "^5.6.2",
|
|
84
84
|
"debug": "~4.4.3",
|
|
85
|
-
"eslint": "^10.
|
|
85
|
+
"eslint": "^10.4.0",
|
|
86
86
|
"ethers": "^6.16.0",
|
|
87
87
|
"hash-wasm": "~4.12.0",
|
|
88
|
-
"lru-cache": "^11.
|
|
88
|
+
"lru-cache": "^11.5.0",
|
|
89
89
|
"observable-fns": "~0.6.1",
|
|
90
90
|
"pako": "^2.1.0",
|
|
91
91
|
"react": "^19.2.6",
|
|
92
92
|
"react-dom": "^19.2.6",
|
|
93
|
-
"typescript": "^
|
|
93
|
+
"typescript": "^6.0.3",
|
|
94
94
|
"wasm-feature-detect": "~1.8.0",
|
|
95
95
|
"zod": "^4.4.3"
|
|
96
96
|
},
|
|
97
97
|
"peerDependencies": {
|
|
98
98
|
"@bitauth/libauth": "~3.0",
|
|
99
|
-
"@mui/icons-material": "
|
|
100
|
-
"@mui/material": "
|
|
101
|
-
"@mui/system": "
|
|
99
|
+
"@mui/icons-material": "^9.0",
|
|
100
|
+
"@mui/material": "^9.0",
|
|
101
|
+
"@mui/system": "^9.0",
|
|
102
102
|
"@mui/x-tree-view": "~9.1",
|
|
103
103
|
"@opentelemetry/api": "^1.9",
|
|
104
104
|
"@opentelemetry/sdk-trace-base": "^2.7",
|
|
105
105
|
"@scure/base": "~2.2",
|
|
106
|
-
"@xylabs/react-async-effect": "~
|
|
107
|
-
"@xylabs/react-flexbox": "~
|
|
108
|
-
"@xylabs/react-promise": "~
|
|
109
|
-
"@xylabs/react-shared": "~
|
|
110
|
-
"@xylabs/sdk-js": "^
|
|
111
|
-
"@xylabs/threads": "~
|
|
112
|
-
"@xyo-network/account": "~
|
|
113
|
-
"@xyo-network/account-model": "^
|
|
114
|
-
"@xyo-network/boundwitness-builder": "^
|
|
115
|
-
"@xyo-network/boundwitness-model": "^
|
|
116
|
-
"@xyo-network/boundwitness-wrapper": "~
|
|
117
|
-
"@xyo-network/config-payload-plugin": "~
|
|
118
|
-
"@xyo-network/diviner-model": "^
|
|
119
|
-
"@xyo-network/manifest-model": "~
|
|
120
|
-
"@xyo-network/module-model": "^
|
|
121
|
-
"@xyo-network/node-memory": "~
|
|
122
|
-
"@xyo-network/node-model": "^
|
|
123
|
-
"@xyo-network/payload-builder": "^
|
|
124
|
-
"@xyo-network/payload-model": "^
|
|
125
|
-
"@xyo-network/query-payload-plugin": "~
|
|
126
|
-
"@xyo-network/wallet-model": "^
|
|
106
|
+
"@xylabs/react-async-effect": "~9.0",
|
|
107
|
+
"@xylabs/react-flexbox": "~9.0",
|
|
108
|
+
"@xylabs/react-promise": "~9.0",
|
|
109
|
+
"@xylabs/react-shared": "~9.0",
|
|
110
|
+
"@xylabs/sdk-js": "^6.0",
|
|
111
|
+
"@xylabs/threads": "~6.0",
|
|
112
|
+
"@xyo-network/account": "~6.0",
|
|
113
|
+
"@xyo-network/account-model": "^6.0",
|
|
114
|
+
"@xyo-network/boundwitness-builder": "^6.0",
|
|
115
|
+
"@xyo-network/boundwitness-model": "^6.0",
|
|
116
|
+
"@xyo-network/boundwitness-wrapper": "~6.0",
|
|
117
|
+
"@xyo-network/config-payload-plugin": "~6.0",
|
|
118
|
+
"@xyo-network/diviner-model": "^6.0",
|
|
119
|
+
"@xyo-network/manifest-model": "~6.0",
|
|
120
|
+
"@xyo-network/module-model": "^6.0",
|
|
121
|
+
"@xyo-network/node-memory": "~6.0",
|
|
122
|
+
"@xyo-network/node-model": "^6.0",
|
|
123
|
+
"@xyo-network/payload-builder": "^6.0",
|
|
124
|
+
"@xyo-network/payload-model": "^6.0",
|
|
125
|
+
"@xyo-network/query-payload-plugin": "~6.0",
|
|
126
|
+
"@xyo-network/wallet-model": "^6.0",
|
|
127
127
|
"async-mutex": "^0.5",
|
|
128
128
|
"bn.js": "^5.2",
|
|
129
129
|
"buffer": "^6.0",
|