@xyo-network/react-archivist 2.76.3 → 2.76.5
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.1.7",
|
|
17
17
|
"@xylabs/react-flexbox": "^3.1.7",
|
|
18
18
|
"@xylabs/react-promise": "^3.1.7",
|
|
19
|
-
"@xyo-network/archivist-memory": "^2.
|
|
20
|
-
"@xyo-network/archivist-model": "^2.
|
|
21
|
-
"@xyo-network/boundwitness-builder": "^2.
|
|
22
|
-
"@xyo-network/boundwitness-model": "^2.
|
|
23
|
-
"@xyo-network/module-events": "^2.
|
|
24
|
-
"@xyo-network/module-model": "^2.
|
|
25
|
-
"@xyo-network/module-wrapper": "^2.
|
|
26
|
-
"@xyo-network/payload-model": "^2.
|
|
27
|
-
"@xyo-network/react-module": "~2.76.
|
|
28
|
-
"@xyo-network/react-node": "~2.76.
|
|
29
|
-
"@xyo-network/react-wallet": "~2.76.
|
|
19
|
+
"@xyo-network/archivist-memory": "^2.103.0",
|
|
20
|
+
"@xyo-network/archivist-model": "^2.103.0",
|
|
21
|
+
"@xyo-network/boundwitness-builder": "^2.103.0",
|
|
22
|
+
"@xyo-network/boundwitness-model": "^2.103.0",
|
|
23
|
+
"@xyo-network/module-events": "^2.103.0",
|
|
24
|
+
"@xyo-network/module-model": "^2.103.0",
|
|
25
|
+
"@xyo-network/module-wrapper": "^2.103.0",
|
|
26
|
+
"@xyo-network/payload-model": "^2.103.0",
|
|
27
|
+
"@xyo-network/react-module": "~2.76.5",
|
|
28
|
+
"@xyo-network/react-node": "~2.76.5",
|
|
29
|
+
"@xyo-network/react-wallet": "~2.76.5",
|
|
30
30
|
"react-icons": "^5.2.1"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
"@storybook/react": "^7.6.19",
|
|
42
42
|
"@xylabs/ts-scripts-yarn3": "^3.10.4",
|
|
43
43
|
"@xylabs/tsconfig-react": "^3.10.4",
|
|
44
|
-
"@xyo-network/account": "^2.
|
|
45
|
-
"@xyo-network/node-memory": "^2.
|
|
44
|
+
"@xyo-network/account": "^2.103.0",
|
|
45
|
+
"@xyo-network/node-memory": "^2.103.0",
|
|
46
46
|
"typescript": "^5.4.5"
|
|
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.76.
|
|
98
|
+
"version": "2.76.5",
|
|
99
99
|
"type": "module"
|
|
100
100
|
}
|
|
@@ -3,8 +3,8 @@ import { Meta, StoryFn } from '@storybook/react'
|
|
|
3
3
|
import { FlexCol } from '@xylabs/react-flexbox'
|
|
4
4
|
import { usePromise } from '@xylabs/react-promise'
|
|
5
5
|
import { Account } from '@xyo-network/account'
|
|
6
|
-
import { ArchivistInsertQuerySchema, ArchivistInstance } from '@xyo-network/archivist-model'
|
|
7
6
|
import { MemoryArchivist, MemoryArchivistConfigSchema } from '@xyo-network/archivist-memory'
|
|
7
|
+
import { ArchivistInsertQuerySchema, ArchivistInstance } from '@xyo-network/archivist-model'
|
|
8
8
|
import { QueryBoundWitnessBuilder } from '@xyo-network/boundwitness-builder'
|
|
9
9
|
import { MemoryNode } from '@xyo-network/node-memory'
|
|
10
10
|
|
|
@@ -25,7 +25,7 @@ const insertPayload = async (archivist?: ArchivistInstance) => {
|
|
|
25
25
|
const payload = { schema: 'network.xyo.payload', timestamp: Date.now() }
|
|
26
26
|
const insertQuery = { schema: ArchivistInsertQuerySchema }
|
|
27
27
|
const account = Account.randomSync()
|
|
28
|
-
const builder = await (await
|
|
28
|
+
const builder = await (await new QueryBoundWitnessBuilder().payloads([insertQuery, payload])).witness(account).query(insertQuery)
|
|
29
29
|
const [insertQueryBoundWitness, payloads] = await builder.build()
|
|
30
30
|
await archivist.insert([insertQueryBoundWitness, ...payloads])
|
|
31
31
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Meta, StoryFn } from '@storybook/react'
|
|
2
|
+
import { usePromise } from '@xylabs/react-promise'
|
|
2
3
|
import { Account } from '@xyo-network/account'
|
|
3
4
|
import { BoundWitnessBuilder } from '@xyo-network/boundwitness-builder'
|
|
4
5
|
import { Payload } from '@xyo-network/payload-model'
|
|
5
6
|
|
|
6
7
|
import { ArchivistStats } from './ArchivistStats'
|
|
7
|
-
import { usePromise } from '@xylabs/react-promise'
|
|
8
8
|
|
|
9
9
|
const account = Account.randomSync()
|
|
10
10
|
const payload = () => ({ schema: 'network.xyo.payload', timestamp: Date.now() })
|
|
@@ -20,9 +20,9 @@ const StorybookEntry = {
|
|
|
20
20
|
title: 'modules/archivist/ArchivistStats',
|
|
21
21
|
} as Meta<typeof ArchivistStats>
|
|
22
22
|
|
|
23
|
-
const Template: StoryFn<typeof ArchivistStats> = ({boundWitnesses, ...props}) => {
|
|
24
|
-
const [boundWitnessesProp] = usePromise(async () => boundWitnesses ? await Promise.all(boundWitnesses) : [], [boundWitnesses])
|
|
25
|
-
return boundWitnessesProp ? <ArchivistStats boundWitnesses={boundWitnessesProp} {...props} /> : <div/>
|
|
23
|
+
const Template: StoryFn<typeof ArchivistStats> = ({ boundWitnesses, ...props }) => {
|
|
24
|
+
const [boundWitnessesProp] = usePromise(async () => (boundWitnesses ? await Promise.all(boundWitnesses) : []), [boundWitnesses])
|
|
25
|
+
return boundWitnessesProp ? <ArchivistStats boundWitnesses={boundWitnessesProp} {...props} /> : <div />
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
const Default = Template.bind({})
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Meta, StoryFn } from '@storybook/react'
|
|
2
2
|
import { useAsyncEffect } from '@xylabs/react-async-effect'
|
|
3
3
|
import { Account } from '@xyo-network/account'
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { MemoryArchivist, MemoryArchivistConfigSchema } from '@xyo-network/archivist-memory'
|
|
5
|
+
import { ArchivistInsertQuerySchema, ArchivistInstance } from '@xyo-network/archivist-model'
|
|
6
6
|
import { QueryBoundWitnessBuilder } from '@xyo-network/boundwitness-builder'
|
|
7
7
|
import { MemoryNode } from '@xyo-network/node-memory'
|
|
8
8
|
import { useState } from 'react'
|