@xyo-network/react-manifest 7.6.3 → 8.0.1
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 +22 -22
package/dist/browser/index.mjs
CHANGED
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/classes/ManifestNodeBuilder.ts", "../../src/components/ManifestNodeProvider.tsx", "../../src/lib/buildManifestNodes.ts"],
|
|
4
|
+
"sourcesContent": ["import { generateMnemonic } from '@scure/bip39'\nimport { wordlist } from '@scure/bip39/wordlists/english.js'\nimport type {\n Manifest, ModuleManifest, PackageManifestPayload,\n} from '@xyo-network/manifest'\nimport { ModuleFactoryLocator } from '@xyo-network/module-factory-locator'\nimport { ManifestWrapper } from '@xyo-network/sdk-js'\nimport { HDWallet } from '@xyo-network/wallet'\nimport type { WalletInstance } from '@xyo-network/wallet-model'\n\nimport type { CreatablePackageManifest } from '../types/index.ts'\n\nexport class ManifestNodeBuilder {\n locatedManifests: Manifest[] = []\n manifestWrapper: ManifestWrapper<void> | undefined\n\n private locator: ModuleFactoryLocator\n private manifestNodes: CreatablePackageManifest[]\n private topLevelNodeIndex: number\n private wallet?: WalletInstance\n\n constructor(\n manifestNodes?: CreatablePackageManifest[],\n wallet?: WalletInstance,\n locator?: ModuleFactoryLocator,\n topLevelNodeIndex?: number,\n ) {\n this.manifestNodes = manifestNodes ?? []\n this.wallet = wallet\n this.locator = locator ?? new ModuleFactoryLocator()\n this.topLevelNodeIndex = topLevelNodeIndex ?? 0\n }\n\n async create() {\n this.locatedManifests = (await Promise.all(this.manifestNodes.map(manifestNode => manifestNode(this.locator).nodes))).flat()\n return this\n }\n\n async loadNodes() {\n const wallet = this.wallet ?? (await this.randomWallet())\n const topLevelManifestNode = this.locatedManifests[this.topLevelNodeIndex]\n const publicChildren = this.locatedManifests.filter(node => node !== topLevelManifestNode) as ModuleManifest[]\n const wrapper = new ManifestWrapper(topLevelManifestNode as PackageManifestPayload, wallet, this.locator, publicChildren)\n const [node] = await wrapper.loadNodes()\n return node\n }\n\n async randomWallet() {\n const mnemonic = generateMnemonic(wordlist, 256)\n return await HDWallet.fromPhrase(mnemonic)\n }\n}\n", "import { usePromise } from '@xylabs/react-promise'\nimport { NodeProvider } from '@xyo-network/react-node-provider'\nimport type { PropsWithChildren } from 'react'\nimport React from 'react'\n\nimport { buildManifestNodes } from '../lib/index.ts'\nimport type { CreatablePackageManifest } from '../types/index.ts'\n\nexport interface ManifestNodeProviderProps extends PropsWithChildren {\n manifestNodes?: CreatablePackageManifest[]\n}\n\nexport const ManifestNodeProvider: React.FC<ManifestNodeProviderProps> = ({ children, manifestNodes }) => {\n const [indexedResultsNode] = usePromise(async () => await buildManifestNodes(manifestNodes), [manifestNodes])\n\n return <NodeProvider node={indexedResultsNode}>{children}</NodeProvider>\n}\n", "import { ManifestNodeBuilder } from '../classes/index.ts'\nimport type { CreatablePackageManifest } from '../types/index.ts'\n\nexport const buildManifestNodes = async (manifestNodes?: CreatablePackageManifest[]) => {\n // extract to function to make useful outside of the node provider\n try {\n if (manifestNodes) {\n const manifestNodeBuilder = new ManifestNodeBuilder(manifestNodes)\n await manifestNodeBuilder.create()\n return await manifestNodeBuilder.loadNodes()\n }\n } catch (e) {\n console.error('Error creating IndexedResultsNode', e)\n throw e\n }\n}\n"],
|
|
5
|
+
"mappings": ";AAAA,SAAS,wBAAwB;AACjC,SAAS,gBAAgB;AAIzB,SAAS,4BAA4B;AACrC,SAAS,uBAAuB;AAChC,SAAS,gBAAgB;AAKlB,IAAM,sBAAN,MAA0B;AAAA,EAC/B,mBAA+B,CAAC;AAAA,EAChC;AAAA,EAEQ;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAER,YACE,eACA,QACA,SACA,mBACA;AACA,SAAK,gBAAgB,iBAAiB,CAAC;AACvC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": ["node"]
|
|
7
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/react-manifest",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "8.0.1",
|
|
4
4
|
"description": "Common React library for all XYO projects that use React",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"xyo",
|
|
@@ -41,28 +41,28 @@
|
|
|
41
41
|
"README.md"
|
|
42
42
|
],
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@xyo-network/react-node-provider": "~
|
|
44
|
+
"@xyo-network/react-node-provider": "~8.0.1"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@bitauth/libauth": "~3.0.0",
|
|
48
48
|
"@metamask/providers": "^22.1.1",
|
|
49
|
-
"@mui/material": "^
|
|
49
|
+
"@mui/material": "^9.0.1",
|
|
50
50
|
"@opentelemetry/api": "^1.9.1",
|
|
51
51
|
"@opentelemetry/sdk-trace-base": "^2.7.1",
|
|
52
52
|
"@scure/base": "~2.2.0",
|
|
53
53
|
"@scure/bip39": "~2.2.0",
|
|
54
|
-
"@storybook/react-vite": "~10.
|
|
54
|
+
"@storybook/react-vite": "~10.4.0",
|
|
55
55
|
"@types/react": "^19.2.14",
|
|
56
|
-
"@xylabs/geo": "^5.1.
|
|
57
|
-
"@xylabs/react-async-effect": "~
|
|
58
|
-
"@xylabs/react-promise": "~
|
|
59
|
-
"@xylabs/react-shared": "~
|
|
60
|
-
"@xylabs/sdk-js": "^5.1.
|
|
61
|
-
"@xylabs/threads": "~5.1.
|
|
62
|
-
"@xylabs/toolchain": "~
|
|
63
|
-
"@xylabs/tsconfig": "^
|
|
64
|
-
"@xylabs/tsconfig-dom": "^
|
|
65
|
-
"@xylabs/tsconfig-react": "~
|
|
56
|
+
"@xylabs/geo": "^5.1.3",
|
|
57
|
+
"@xylabs/react-async-effect": "~8.0.3",
|
|
58
|
+
"@xylabs/react-promise": "~8.0.3",
|
|
59
|
+
"@xylabs/react-shared": "~8.0.3",
|
|
60
|
+
"@xylabs/sdk-js": "^5.1.3",
|
|
61
|
+
"@xylabs/threads": "~5.1.3",
|
|
62
|
+
"@xylabs/toolchain": "~8.0.6",
|
|
63
|
+
"@xylabs/tsconfig": "^8.0.6",
|
|
64
|
+
"@xylabs/tsconfig-dom": "^8.0.6",
|
|
65
|
+
"@xylabs/tsconfig-react": "~8.0.6",
|
|
66
66
|
"@xyo-network/account": "~5.6.2",
|
|
67
67
|
"@xyo-network/account-model": "^5.6.3",
|
|
68
68
|
"@xyo-network/api": "~5.6.2",
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
"buffer": "^6.0.3",
|
|
98
98
|
"chalk": "^5.6.2",
|
|
99
99
|
"debug": "~4.4.3",
|
|
100
|
-
"eslint": "^10.
|
|
100
|
+
"eslint": "^10.4.0",
|
|
101
101
|
"ethers": "^6.16.0",
|
|
102
102
|
"hash-wasm": "~4.12.0",
|
|
103
103
|
"idb": "^8.0.3",
|
|
@@ -108,9 +108,9 @@
|
|
|
108
108
|
"react": "^19.2.6",
|
|
109
109
|
"react-dom": "^19.2.6",
|
|
110
110
|
"store2": "~2.14.4",
|
|
111
|
-
"storybook": "^10.
|
|
112
|
-
"typescript": "^
|
|
113
|
-
"vite": "^8.0.
|
|
111
|
+
"storybook": "^10.4.0",
|
|
112
|
+
"typescript": "^6.0.3",
|
|
113
|
+
"vite": "^8.0.13",
|
|
114
114
|
"wasm-feature-detect": "~1.8.0",
|
|
115
115
|
"webextension-polyfill": "^0.12.0",
|
|
116
116
|
"zod": "^4.4.3"
|
|
@@ -118,15 +118,15 @@
|
|
|
118
118
|
"peerDependencies": {
|
|
119
119
|
"@bitauth/libauth": "~3.0",
|
|
120
120
|
"@metamask/providers": "^22.1",
|
|
121
|
-
"@mui/material": "^
|
|
121
|
+
"@mui/material": "^9.0",
|
|
122
122
|
"@opentelemetry/api": "^1.9",
|
|
123
123
|
"@opentelemetry/sdk-trace-base": "^2.7",
|
|
124
124
|
"@scure/base": "~2.2",
|
|
125
125
|
"@scure/bip39": "~2.2",
|
|
126
126
|
"@xylabs/geo": "^5.1",
|
|
127
|
-
"@xylabs/react-async-effect": "~
|
|
128
|
-
"@xylabs/react-promise": "~
|
|
129
|
-
"@xylabs/react-shared": "~
|
|
127
|
+
"@xylabs/react-async-effect": "~8.0",
|
|
128
|
+
"@xylabs/react-promise": "~8.0",
|
|
129
|
+
"@xylabs/react-shared": "~8.0",
|
|
130
130
|
"@xylabs/sdk-js": "^5.1",
|
|
131
131
|
"@xylabs/threads": "~5.1",
|
|
132
132
|
"@xyo-network/account": "~5.6",
|