@xyo-network/react-archivist 2.81.1 → 2.81.3
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/package.json
CHANGED
|
@@ -16,17 +16,17 @@
|
|
|
16
16
|
"@xylabs/react-button": "^3.4.0",
|
|
17
17
|
"@xylabs/react-flexbox": "^3.4.0",
|
|
18
18
|
"@xylabs/react-promise": "^3.4.0",
|
|
19
|
-
"@xyo-network/archivist-memory": "^2.110.
|
|
20
|
-
"@xyo-network/archivist-model": "^2.110.
|
|
21
|
-
"@xyo-network/boundwitness-builder": "^2.110.
|
|
22
|
-
"@xyo-network/boundwitness-model": "^2.110.
|
|
23
|
-
"@xyo-network/module-events": "^2.110.
|
|
24
|
-
"@xyo-network/module-model": "^2.110.
|
|
25
|
-
"@xyo-network/module-wrapper": "^2.110.
|
|
26
|
-
"@xyo-network/payload-model": "^2.110.
|
|
27
|
-
"@xyo-network/react-module": "^2.81.
|
|
28
|
-
"@xyo-network/react-node": "^2.81.
|
|
29
|
-
"@xyo-network/react-wallet": "^2.81.
|
|
19
|
+
"@xyo-network/archivist-memory": "^2.110.5",
|
|
20
|
+
"@xyo-network/archivist-model": "^2.110.5",
|
|
21
|
+
"@xyo-network/boundwitness-builder": "^2.110.5",
|
|
22
|
+
"@xyo-network/boundwitness-model": "^2.110.5",
|
|
23
|
+
"@xyo-network/module-events": "^2.110.5",
|
|
24
|
+
"@xyo-network/module-model": "^2.110.5",
|
|
25
|
+
"@xyo-network/module-wrapper": "^2.110.5",
|
|
26
|
+
"@xyo-network/payload-model": "^2.110.5",
|
|
27
|
+
"@xyo-network/react-module": "^2.81.3",
|
|
28
|
+
"@xyo-network/react-node": "^2.81.3",
|
|
29
|
+
"@xyo-network/react-wallet": "^2.81.3",
|
|
30
30
|
"react-icons": "^5.2.1"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
@@ -39,10 +39,10 @@
|
|
|
39
39
|
"description": "Common React library for all XYO projects that use React",
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@storybook/react": "^7.6.20",
|
|
42
|
-
"@xylabs/ts-scripts-yarn3": "^3.
|
|
43
|
-
"@xylabs/tsconfig-react": "^3.
|
|
44
|
-
"@xyo-network/account": "^2.110.
|
|
45
|
-
"@xyo-network/node-memory": "^2.110.
|
|
42
|
+
"@xylabs/ts-scripts-yarn3": "^3.12.1",
|
|
43
|
+
"@xylabs/tsconfig-react": "^3.12.1",
|
|
44
|
+
"@xyo-network/account": "^2.110.5",
|
|
45
|
+
"@xyo-network/node-memory": "^2.110.5",
|
|
46
46
|
"typescript": "^5.5.3"
|
|
47
47
|
},
|
|
48
48
|
"docs": "dist/docs.json",
|
|
@@ -95,6 +95,6 @@
|
|
|
95
95
|
},
|
|
96
96
|
"sideEffects": false,
|
|
97
97
|
"types": "dist/browser/index.d.ts",
|
|
98
|
-
"version": "2.81.
|
|
98
|
+
"version": "2.81.3",
|
|
99
99
|
"type": "module"
|
|
100
100
|
}
|
|
@@ -8,7 +8,7 @@ import { ArchivistInsertQuerySchema, ArchivistInstance } from '@xyo-network/arch
|
|
|
8
8
|
import { QueryBoundWitnessBuilder } from '@xyo-network/boundwitness-builder'
|
|
9
9
|
import { MemoryNode } from '@xyo-network/node-memory'
|
|
10
10
|
|
|
11
|
-
import { ArchivistCard } from './Card'
|
|
11
|
+
import { ArchivistCard } from './Card.js'
|
|
12
12
|
|
|
13
13
|
const StorybookEntry = {
|
|
14
14
|
component: ArchivistCard,
|
|
@@ -4,7 +4,7 @@ import { usePromise } from '@xylabs/react-promise'
|
|
|
4
4
|
//import { Account } from '@xyo-network/account'
|
|
5
5
|
//import { BoundWitnessBuilder } from '@xyo-network/boundwitness-builder'
|
|
6
6
|
//import { Payload } from '@xyo-network/payload-model'
|
|
7
|
-
import { ArchivistStats } from './ArchivistStats'
|
|
7
|
+
import { ArchivistStats } from './ArchivistStats.js'
|
|
8
8
|
|
|
9
9
|
//const account = Account.randomSync()
|
|
10
10
|
//const payload = () => ({ schema: 'network.xyo.payload', timestamp: Date.now() })
|
|
@@ -7,7 +7,7 @@ import { QueryBoundWitnessBuilder } from '@xyo-network/boundwitness-builder'
|
|
|
7
7
|
import { MemoryNode } from '@xyo-network/node-memory'
|
|
8
8
|
import { useState } from 'react'
|
|
9
9
|
|
|
10
|
-
import { MemoryArchivistsStats } from './MemoryArchivistStats'
|
|
10
|
+
import { MemoryArchivistsStats } from './MemoryArchivistStats.js'
|
|
11
11
|
|
|
12
12
|
const StorybookEntry = {
|
|
13
13
|
component: MemoryArchivistsStats,
|
|
@@ -4,8 +4,8 @@ import { ArchivistModule } from '@xyo-network/archivist-model'
|
|
|
4
4
|
import { NodeProvider } from '@xyo-network/react-node'
|
|
5
5
|
import { useState } from 'react'
|
|
6
6
|
|
|
7
|
-
import {
|
|
8
|
-
import { ArchivistDetails } from './Details'
|
|
7
|
+
import { useWeakArchivistFromNode } from '../../hooks/index.js'
|
|
8
|
+
import { ArchivistDetails } from './Details.js'
|
|
9
9
|
|
|
10
10
|
const StorybookEntry = {
|
|
11
11
|
argTypes: {},
|
|
@@ -19,22 +19,22 @@ const StorybookEntry = {
|
|
|
19
19
|
} as Meta<typeof ArchivistDetails>
|
|
20
20
|
|
|
21
21
|
const TemplateInner: StoryFn<typeof ArchivistDetails> = (args) => {
|
|
22
|
-
const [archivist] =
|
|
22
|
+
const [archivist] = useWeakArchivistFromNode()
|
|
23
23
|
|
|
24
|
-
return <ArchivistDetails address={archivist?.address} {...args}></ArchivistDetails>
|
|
24
|
+
return <ArchivistDetails address={archivist?.deref()?.address} {...args}></ArchivistDetails>
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
const TemplateInnerWithData: StoryFn<typeof ArchivistDetails> = (args) => {
|
|
28
|
-
const [archivist] =
|
|
28
|
+
const [archivist] = useWeakArchivistFromNode()
|
|
29
29
|
const [archivistWithData, setArchivistWithData] = useState<ArchivistModule>()
|
|
30
30
|
|
|
31
31
|
useAsyncEffect(
|
|
32
32
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
33
33
|
async (mounted) => {
|
|
34
|
-
if (archivist) {
|
|
35
|
-
await archivist.insert([{ schema: 'network.xyo.test' }])
|
|
34
|
+
if (archivist?.deref()) {
|
|
35
|
+
await archivist.deref()?.insert([{ schema: 'network.xyo.test' }])
|
|
36
36
|
if (mounted()) {
|
|
37
|
-
setArchivistWithData(archivist)
|
|
37
|
+
setArchivistWithData(archivist.deref())
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
},
|