@xyo-network/react-archivist 3.0.1 → 3.0.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.
Files changed (75) hide show
  1. package/dist/browser/components/Card/Card.d.ts +6 -0
  2. package/dist/browser/components/Card/Card.d.ts.map +1 -0
  3. package/dist/browser/components/Card/CardActions.d.ts +6 -0
  4. package/dist/browser/components/Card/CardActions.d.ts.map +1 -0
  5. package/dist/browser/components/Card/CardContent.d.ts +6 -0
  6. package/dist/browser/components/Card/CardContent.d.ts.map +1 -0
  7. package/dist/browser/components/Card/CardHeader.d.ts +6 -0
  8. package/dist/browser/components/Card/CardHeader.d.ts.map +1 -0
  9. package/dist/browser/components/Card/components/ArchivistParent.d.ts +7 -0
  10. package/dist/browser/components/Card/components/ArchivistParent.d.ts.map +1 -0
  11. package/dist/browser/components/Card/components/ArchivistParents.d.ts +8 -0
  12. package/dist/browser/components/Card/components/ArchivistParents.d.ts.map +1 -0
  13. package/dist/browser/components/Card/components/Stats/ArchivistStats.d.ts +10 -0
  14. package/dist/browser/components/Card/components/Stats/ArchivistStats.d.ts.map +1 -0
  15. package/dist/browser/components/Card/components/Stats/MemoryArchivistStats.d.ts +7 -0
  16. package/dist/browser/components/Card/components/Stats/MemoryArchivistStats.d.ts.map +1 -0
  17. package/dist/browser/components/Card/components/Stats/index.d.ts +3 -0
  18. package/dist/browser/components/Card/components/Stats/index.d.ts.map +1 -0
  19. package/dist/browser/components/Card/components/index.d.ts +4 -0
  20. package/dist/browser/components/Card/components/index.d.ts.map +1 -0
  21. package/dist/browser/components/Card/index.d.ts +4 -0
  22. package/dist/browser/components/Card/index.d.ts.map +1 -0
  23. package/dist/browser/components/Details/Details.d.ts +7 -0
  24. package/dist/browser/components/Details/Details.d.ts.map +1 -0
  25. package/dist/browser/components/Details/index.d.ts +2 -0
  26. package/dist/browser/components/Details/index.d.ts.map +1 -0
  27. package/dist/browser/components/index.d.ts +3 -0
  28. package/dist/browser/components/index.d.ts.map +1 -0
  29. package/dist/browser/hooks/index.d.ts +3 -0
  30. package/dist/browser/hooks/index.d.ts.map +1 -0
  31. package/dist/browser/hooks/node/index.d.ts +5 -0
  32. package/dist/browser/hooks/node/index.d.ts.map +1 -0
  33. package/dist/browser/hooks/node/useArchivistFromNode.d.ts +4 -0
  34. package/dist/browser/hooks/node/useArchivistFromNode.d.ts.map +1 -0
  35. package/dist/browser/hooks/node/useArchivistsFromNode.d.ts +5 -0
  36. package/dist/browser/hooks/node/useArchivistsFromNode.d.ts.map +1 -0
  37. package/dist/browser/hooks/node/useWeakArchivistFromNode.d.ts +4 -0
  38. package/dist/browser/hooks/node/useWeakArchivistFromNode.d.ts.map +1 -0
  39. package/dist/browser/hooks/node/useWeakArchivistsFromNode.d.ts +5 -0
  40. package/dist/browser/hooks/node/useWeakArchivistsFromNode.d.ts.map +1 -0
  41. package/dist/browser/hooks/queries/index.d.ts +5 -0
  42. package/dist/browser/hooks/queries/index.d.ts.map +1 -0
  43. package/dist/browser/hooks/queries/useArchivistAll.d.ts +5 -0
  44. package/dist/browser/hooks/queries/useArchivistAll.d.ts.map +1 -0
  45. package/dist/browser/hooks/queries/useArchivistGet.d.ts +8 -0
  46. package/dist/browser/hooks/queries/useArchivistGet.d.ts.map +1 -0
  47. package/dist/browser/hooks/queries/useWeakArchivistAll.d.ts +5 -0
  48. package/dist/browser/hooks/queries/useWeakArchivistAll.d.ts.map +1 -0
  49. package/dist/browser/hooks/queries/useWeakArchivistGet.d.ts +8 -0
  50. package/dist/browser/hooks/queries/useWeakArchivistGet.d.ts.map +1 -0
  51. package/dist/browser/index.d.ts +3 -49
  52. package/dist/browser/index.d.ts.map +1 -0
  53. package/dist/browser/index.mjs.map +1 -1
  54. package/package.json +68 -62
  55. package/src/components/Card/Card.stories.tsx +7 -8
  56. package/src/components/Card/Card.tsx +8 -4
  57. package/src/components/Card/CardActions.tsx +4 -3
  58. package/src/components/Card/CardContent.tsx +7 -4
  59. package/src/components/Card/CardHeader.tsx +7 -4
  60. package/src/components/Card/components/ArchivistParents.tsx +13 -5
  61. package/src/components/Card/components/Stats/ArchivistStats.stories.tsx +2 -6
  62. package/src/components/Card/components/Stats/ArchivistStats.tsx +7 -3
  63. package/src/components/Card/components/Stats/MemoryArchivistStats.stories.tsx +7 -8
  64. package/src/components/Card/components/Stats/MemoryArchivistStats.tsx +7 -4
  65. package/src/components/Details/Details.stories.tsx +6 -8
  66. package/src/components/Details/Details.tsx +3 -2
  67. package/src/hooks/node/useArchivistFromNode.tsx +4 -2
  68. package/src/hooks/node/useArchivistsFromNode.tsx +5 -3
  69. package/src/hooks/node/useWeakArchivistFromNode.tsx +4 -2
  70. package/src/hooks/node/useWeakArchivistsFromNode.tsx +5 -3
  71. package/src/hooks/queries/useArchivistAll.tsx +1 -1
  72. package/src/hooks/queries/useArchivistGet.tsx +5 -4
  73. package/src/hooks/queries/useWeakArchivistAll.tsx +1 -1
  74. package/src/hooks/queries/useWeakArchivistGet.tsx +5 -4
  75. package/xy.config.ts +2 -4
package/package.json CHANGED
@@ -1,51 +1,30 @@
1
1
  {
2
2
  "name": "@xyo-network/react-archivist",
3
- "author": {
4
- "email": "support@xyo.network",
5
- "name": "XYO Development Team",
6
- "url": "https://xyo.network"
7
- },
3
+ "version": "3.0.3",
4
+ "description": "Common React library for all XYO projects that use React",
5
+ "keywords": [
6
+ "xyo",
7
+ "utility",
8
+ "typescript",
9
+ "react"
10
+ ],
11
+ "homepage": "https://xyo.network",
8
12
  "bugs": {
9
- "email": "support@xyo.network",
10
- "url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/issues"
11
- },
12
- "dependencies": {
13
- "@xylabs/exists": "^4.0.1",
14
- "@xylabs/hex": "^4.0.1",
15
- "@xylabs/react-async-effect": "^4.0.1",
16
- "@xylabs/react-button": "^4.0.1",
17
- "@xylabs/react-flexbox": "^4.0.1",
18
- "@xylabs/react-promise": "^4.0.1",
19
- "@xyo-network/archivist-memory": "^3.0.2",
20
- "@xyo-network/archivist-model": "^3.0.2",
21
- "@xyo-network/boundwitness-builder": "^3.0.2",
22
- "@xyo-network/boundwitness-model": "^3.0.2",
23
- "@xyo-network/module-events": "^3.0.2",
24
- "@xyo-network/module-model": "^3.0.2",
25
- "@xyo-network/module-wrapper": "^3.0.2",
26
- "@xyo-network/payload-model": "^3.0.2",
27
- "@xyo-network/react-module": "^3.0.1",
28
- "@xyo-network/react-node": "^3.0.1",
29
- "@xyo-network/react-wallet": "^3.0.1",
30
- "react-icons": "^5.3.0"
13
+ "url": "git+https://github.com/XYOracleNetwork/sdk-xyo-react-js/issues",
14
+ "email": "support@xyo.network"
31
15
  },
32
- "peerDependencies": {
33
- "@mui/icons-material": "^5",
34
- "@mui/material": "^5",
35
- "@mui/styles": "^5",
36
- "react": "^18",
37
- "react-dom": "^18"
16
+ "repository": {
17
+ "type": "git",
18
+ "url": "git+https://github.com/XYOracleNetwork/sdk-xyo-react-js.git"
38
19
  },
39
- "description": "Common React library for all XYO projects that use React",
40
- "devDependencies": {
41
- "@storybook/react": "^8.2.9",
42
- "@xylabs/ts-scripts-yarn3": "^4.0.0-rc.15",
43
- "@xylabs/tsconfig-react": "^4.0.0-rc.15",
44
- "@xyo-network/account": "^3.0.2",
45
- "@xyo-network/node-memory": "^3.0.2",
46
- "typescript": "^5.5.4"
20
+ "license": "LGPL-3.0-only",
21
+ "author": {
22
+ "name": "XYO Development Team",
23
+ "email": "support@xyo.network",
24
+ "url": "https://xyo.network"
47
25
  },
48
- "docs": "dist/docs.json",
26
+ "sideEffects": false,
27
+ "type": "module",
49
28
  "exports": {
50
29
  ".": {
51
30
  "import": {
@@ -58,27 +37,54 @@
58
37
  "./package.json": "./package.json"
59
38
  },
60
39
  "module": "dist/browser/index.mjs",
61
- "homepage": "https://xyo.network",
62
- "keywords": [
63
- "xyo",
64
- "utility",
65
- "typescript",
66
- "react"
67
- ],
68
- "license": "LGPL-3.0-only",
69
- "publishConfig": {
70
- "access": "public"
40
+ "types": "dist/browser/index.d.ts",
41
+ "scripts": {
42
+ "license": "yarn license-checker --exclude \"MIT, ISC, Apache-2.0, BSD, BSD-2-Clause, CC-BY-4.0, Unlicense, CC-BY-3.0, CC0-1.0\"",
43
+ "lint-pkg": "npmPkgJsonLint ."
71
44
  },
72
- "repository": {
73
- "type": "git",
74
- "url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js.git"
45
+ "dependencies": {
46
+ "@xylabs/exists": "^4.0.5",
47
+ "@xylabs/hex": "^4.0.5",
48
+ "@xylabs/react-async-effect": "^4.0.3",
49
+ "@xylabs/react-button": "^4.0.3",
50
+ "@xylabs/react-flexbox": "^4.0.3",
51
+ "@xylabs/react-promise": "^4.0.3",
52
+ "@xyo-network/archivist-memory": "^3.0.15",
53
+ "@xyo-network/archivist-model": "^3.0.15",
54
+ "@xyo-network/boundwitness-builder": "^3.0.15",
55
+ "@xyo-network/boundwitness-model": "^3.0.15",
56
+ "@xyo-network/module-events": "^3.0.15",
57
+ "@xyo-network/module-model": "^3.0.15",
58
+ "@xyo-network/module-wrapper": "^3.0.15",
59
+ "@xyo-network/payload-model": "^3.0.15",
60
+ "@xyo-network/react-module": "^3.0.3",
61
+ "@xyo-network/react-node": "^3.0.3",
62
+ "@xyo-network/react-wallet": "^3.0.3",
63
+ "react-icons": "^5.3.0"
75
64
  },
76
- "scripts": {
77
- "lint-pkg": "npmPkgJsonLint .",
78
- "license": "yarn license-checker --exclude \"MIT, ISC, Apache-2.0, BSD, BSD-2-Clause, CC-BY-4.0, Unlicense, CC-BY-3.0, CC0-1.0\""
65
+ "devDependencies": {
66
+ "@mui/icons-material": "^5.16.7",
67
+ "@mui/material": "^5.16.7",
68
+ "@mui/styles": "^5.16.7",
69
+ "@storybook/react": "^8.2.9",
70
+ "@xylabs/ts-scripts-yarn3": "^4.0.7",
71
+ "@xylabs/tsconfig-react": "^4.0.7",
72
+ "@xyo-network/account": "^3.0.15",
73
+ "@xyo-network/node-memory": "^3.0.15",
74
+ "react": "^18.3.1",
75
+ "react-dom": "^18.3.1",
76
+ "storybook": "^8.2.9",
77
+ "typescript": "^5.5.4"
79
78
  },
80
- "sideEffects": false,
81
- "types": "dist/browser/index.d.ts",
82
- "version": "3.0.1",
83
- "type": "module"
79
+ "peerDependencies": {
80
+ "@mui/icons-material": "^5",
81
+ "@mui/material": "^5",
82
+ "@mui/styles": "^5",
83
+ "react": "^18",
84
+ "react-dom": "^18"
85
+ },
86
+ "publishConfig": {
87
+ "access": "public"
88
+ },
89
+ "docs": "dist/docs.json"
84
90
  }
@@ -1,10 +1,11 @@
1
1
  import { Button } from '@mui/material'
2
- import { Meta, StoryFn } from '@storybook/react'
2
+ import type { 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
6
  import { MemoryArchivist, MemoryArchivistConfigSchema } from '@xyo-network/archivist-memory'
7
- import { ArchivistInsertQuerySchema, ArchivistInstance } from '@xyo-network/archivist-model'
7
+ import type { ArchivistInstance } from '@xyo-network/archivist-model'
8
+ import { ArchivistInsertQuerySchema } from '@xyo-network/archivist-model'
8
9
  import { QueryBoundWitnessBuilder } from '@xyo-network/boundwitness-builder'
9
10
  import { MemoryNode } from '@xyo-network/node-memory'
10
11
  import React from 'react'
@@ -13,11 +14,7 @@ import { ArchivistCard } from './Card.tsx'
13
14
 
14
15
  const StorybookEntry = {
15
16
  component: ArchivistCard,
16
- parameters: {
17
- docs: {
18
- page: null,
19
- },
20
- },
17
+ parameters: { docs: { page: null } },
21
18
  title: 'modules/archivist/ArchivistCard',
22
19
  } as Meta<typeof ArchivistCard>
23
20
 
@@ -50,7 +47,9 @@ const Template: StoryFn<typeof ArchivistCard> = () => {
50
47
  const newModule = await MemoryArchivist.create({
51
48
  config: {
52
49
  name: 'MemoryArchivist',
53
- parents: { commit: [newParentModule.address], read: [newParentModule.address], write: [newParentModule.address] },
50
+ parents: {
51
+ commit: [newParentModule.address], read: [newParentModule.address], write: [newParentModule.address],
52
+ },
54
53
  schema: MemoryArchivistConfigSchema,
55
54
  },
56
55
  })
@@ -1,12 +1,16 @@
1
- import { Card, CardProps } from '@mui/material'
2
- import { ArchivistInstance } from '@xyo-network/archivist-model'
3
- import { ModuleCardActions, ModuleRenderProps } from '@xyo-network/react-module'
1
+ import type { CardProps } from '@mui/material'
2
+ import { Card } from '@mui/material'
3
+ import type { ArchivistInstance } from '@xyo-network/archivist-model'
4
+ import type { ModuleRenderProps } from '@xyo-network/react-module'
5
+ import { ModuleCardActions } from '@xyo-network/react-module'
4
6
  import React from 'react'
5
7
 
6
8
  import { ArchivistCardContent } from './CardContent.tsx'
7
9
  import { ArchivistCardHeader } from './CardHeader.tsx'
8
10
 
9
- export const ArchivistCard: React.FC<CardProps & ModuleRenderProps<ArchivistInstance>> = ({ children, mod, ...props }) => {
11
+ export const ArchivistCard: React.FC<CardProps & ModuleRenderProps<ArchivistInstance>> = ({
12
+ children, mod, ...props
13
+ }) => {
10
14
  return (
11
15
  <Card {...props}>
12
16
  <ArchivistCardHeader mod={mod} />
@@ -1,6 +1,7 @@
1
- import { CardActionsProps } from '@mui/material'
2
- import { ArchivistInstance } from '@xyo-network/archivist-model'
3
- import { ModuleCardActions, ModuleRenderProps } from '@xyo-network/react-module'
1
+ import type { CardActionsProps } from '@mui/material'
2
+ import type { ArchivistInstance } from '@xyo-network/archivist-model'
3
+ import type { ModuleRenderProps } from '@xyo-network/react-module'
4
+ import { ModuleCardActions } from '@xyo-network/react-module'
4
5
  import React from 'react'
5
6
 
6
7
  export const ArchivistCardActions: React.FC<ModuleRenderProps<ArchivistInstance> & CardActionsProps> = (props) => {
@@ -1,15 +1,18 @@
1
- import { CardContentProps } from '@mui/material'
1
+ import type { CardContentProps } from '@mui/material'
2
2
  import { useAsyncEffect } from '@xylabs/react-async-effect'
3
3
  import { FlexGrowRow } from '@xylabs/react-flexbox'
4
- import { ArchivistConfig, ArchivistInstance } from '@xyo-network/archivist-model'
4
+ import type { ArchivistConfig, ArchivistInstance } from '@xyo-network/archivist-model'
5
5
  import { ModuleWrapper } from '@xyo-network/module-wrapper'
6
- import { ModuleCardContent, ModuleRenderProps } from '@xyo-network/react-module'
6
+ import type { ModuleRenderProps } from '@xyo-network/react-module'
7
+ import { ModuleCardContent } from '@xyo-network/react-module'
7
8
  import { useWallet } from '@xyo-network/react-wallet'
8
9
  import React, { useState } from 'react'
9
10
 
10
11
  import { ArchivistParents } from './components/index.ts'
11
12
 
12
- export const ArchivistCardContent: React.FC<ModuleRenderProps<ArchivistInstance> & CardContentProps> = ({ children, mod, ...props }) => {
13
+ export const ArchivistCardContent: React.FC<ModuleRenderProps<ArchivistInstance> & CardContentProps> = ({
14
+ children, mod, ...props
15
+ }) => {
13
16
  const [config, setConfig] = useState<ArchivistConfig>()
14
17
  const [wallet] = useWallet()
15
18
 
@@ -1,7 +1,8 @@
1
- import { CardHeaderProps } from '@mui/material'
1
+ import type { CardHeaderProps } from '@mui/material'
2
2
  import { MemoryArchivistConfigSchema } from '@xyo-network/archivist-memory'
3
- import { ArchivistInstance } from '@xyo-network/archivist-model'
4
- import { ModuleCardHeader, ModuleRenderProps } from '@xyo-network/react-module'
3
+ import type { ArchivistInstance } from '@xyo-network/archivist-model'
4
+ import type { ModuleRenderProps } from '@xyo-network/react-module'
5
+ import { ModuleCardHeader } from '@xyo-network/react-module'
5
6
  import React, { useMemo } from 'react'
6
7
 
7
8
  import { MemoryArchivistsStats } from './components/index.ts'
@@ -17,7 +18,9 @@ const ArchivistStats = (archivist?: ArchivistInstance) => {
17
18
  }
18
19
  }
19
20
 
20
- export const ArchivistCardHeader: React.FC<ModuleRenderProps<ArchivistInstance> & CardHeaderProps> = ({ title, mod, ...props }) => {
21
+ export const ArchivistCardHeader: React.FC<ModuleRenderProps<ArchivistInstance> & CardHeaderProps> = ({
22
+ title, mod, ...props
23
+ }) => {
21
24
  const Stats = useMemo(() => ArchivistStats(mod), [mod])
22
25
  return <ModuleCardHeader mod={mod} title={title ?? mod?.config.name ?? 'Archivist'} action={Stats} {...props} />
23
26
  }
@@ -1,7 +1,10 @@
1
1
  import { ArrowRightRounded as ArrowRightRoundedIcon } from '@mui/icons-material'
2
- import { Collapse, IconButton, List, Paper, Typography } from '@mui/material'
3
- import { FlexBoxProps, FlexCol } from '@xylabs/react-flexbox'
4
- import { ArchivistConfig } from '@xyo-network/archivist-model'
2
+ import {
3
+ Collapse, IconButton, List, Paper, Typography,
4
+ } from '@mui/material'
5
+ import type { FlexBoxProps } from '@xylabs/react-flexbox'
6
+ import { FlexCol } from '@xylabs/react-flexbox'
7
+ import type { ArchivistConfig } from '@xyo-network/archivist-model'
5
8
  import React, { useState } from 'react'
6
9
 
7
10
  import { ArchivistParent } from './ArchivistParent.tsx'
@@ -13,7 +16,9 @@ export interface ArchivistParentsProps extends FlexBoxProps {
13
16
  export const ArchivistParents: React.FC<ArchivistParentsProps> = ({ config, ...props }) => {
14
17
  const [parentArchivistCollapse, setParentArchivistCollapse] = useState(false)
15
18
 
16
- const { commit, read, write } = config?.parents ?? {}
19
+ const {
20
+ commit, read, write,
21
+ } = config?.parents ?? {}
17
22
 
18
23
  return (
19
24
  <>
@@ -21,7 +26,10 @@ export const ArchivistParents: React.FC<ArchivistParentsProps> = ({ config, ...p
21
26
  ? (
22
27
  <FlexCol alignItems="start" {...props}>
23
28
  <span onClick={() => setParentArchivistCollapse(!parentArchivistCollapse)}>
24
- <Typography variant="subtitle2" sx={{ cursor: 'pointer', display: 'inline-block' }}>
29
+ <Typography
30
+ variant="subtitle2"
31
+ sx={{ cursor: 'pointer', display: 'inline-block' }}
32
+ >
25
33
  Parents
26
34
  </Typography>
27
35
  <IconButton size="small">
@@ -1,4 +1,4 @@
1
- import { Meta, StoryFn } from '@storybook/react'
1
+ import type { Meta, StoryFn } from '@storybook/react'
2
2
  import { usePromise } from '@xylabs/react-promise'
3
3
  import React from 'react'
4
4
 
@@ -13,11 +13,7 @@ import { ArchivistStats } from './ArchivistStats.tsx'
13
13
 
14
14
  const StorybookEntry = {
15
15
  component: ArchivistStats,
16
- parameters: {
17
- docs: {
18
- page: null,
19
- },
20
- },
16
+ parameters: { docs: { page: null } },
21
17
  title: 'modules/archivist/ArchivistStats',
22
18
  } as Meta<typeof ArchivistStats>
23
19
 
@@ -1,11 +1,13 @@
1
1
  import { Badge, Tooltip } from '@mui/material'
2
2
  import { FlexRow } from '@xylabs/react-flexbox'
3
- import { Payload } from '@xyo-network/payload-model'
3
+ import type { Payload } from '@xyo-network/payload-model'
4
4
  import React from 'react'
5
5
  // eslint-disable-next-line import-x/no-internal-modules
6
6
  import { BsFileEarmarkCode } from 'react-icons/bs'
7
+ import {
8
+ VscOrganization, VscSymbolMethod, VscSymbolNamespace,
7
9
  // eslint-disable-next-line import-x/no-internal-modules
8
- import { VscOrganization, VscSymbolMethod, VscSymbolNamespace } from 'react-icons/vsc'
10
+ } from 'react-icons/vsc'
9
11
 
10
12
  export interface ArchivistStatsProps {
11
13
  addresses?: Record<string, number>
@@ -14,7 +16,9 @@ export interface ArchivistStatsProps {
14
16
  schemas?: Record<string, number>
15
17
  }
16
18
 
17
- export const ArchivistStats: React.FC<ArchivistStatsProps> = ({ addresses, boundWitnesses, payloads, schemas }) => {
19
+ export const ArchivistStats: React.FC<ArchivistStatsProps> = ({
20
+ addresses, boundWitnesses, payloads, schemas,
21
+ }) => {
18
22
  return (
19
23
  <FlexRow gap={2} mr={0.5}>
20
24
  {payloads?.length
@@ -1,8 +1,9 @@
1
- import { Meta, StoryFn } from '@storybook/react'
1
+ import type { Meta, StoryFn } from '@storybook/react'
2
2
  import { useAsyncEffect } from '@xylabs/react-async-effect'
3
3
  import { Account } from '@xyo-network/account'
4
4
  import { MemoryArchivist, MemoryArchivistConfigSchema } from '@xyo-network/archivist-memory'
5
- import { ArchivistInsertQuerySchema, ArchivistInstance } from '@xyo-network/archivist-model'
5
+ import type { ArchivistInstance } from '@xyo-network/archivist-model'
6
+ import { ArchivistInsertQuerySchema } from '@xyo-network/archivist-model'
6
7
  import { QueryBoundWitnessBuilder } from '@xyo-network/boundwitness-builder'
7
8
  import { MemoryNode } from '@xyo-network/node-memory'
8
9
  import React, { useState } from 'react'
@@ -11,11 +12,7 @@ import { MemoryArchivistsStats } from './MemoryArchivistStats.tsx'
11
12
 
12
13
  const StorybookEntry = {
13
14
  component: MemoryArchivistsStats,
14
- parameters: {
15
- docs: {
16
- page: null,
17
- },
18
- },
15
+ parameters: { docs: { page: null } },
19
16
  title: 'modules/archivist/MemoryArchivistsStats',
20
17
  } as Meta<typeof MemoryArchivistsStats>
21
18
 
@@ -30,7 +27,9 @@ const Template: StoryFn<typeof MemoryArchivistsStats> = () => {
30
27
  const newModule = await MemoryArchivist.create({
31
28
  config: {
32
29
  name: 'MemoryArchivist',
33
- parents: { commit: [newParentModule.address], read: [newParentModule.address], write: [newParentModule.address] },
30
+ parents: {
31
+ commit: [newParentModule.address], read: [newParentModule.address], write: [newParentModule.address],
32
+ },
34
33
  schema: MemoryArchivistConfigSchema,
35
34
  },
36
35
  })
@@ -1,9 +1,12 @@
1
1
  import { useAsyncEffect } from '@xylabs/react-async-effect'
2
- import { ArchivistAllQuerySchema, ArchivistInstance } from '@xyo-network/archivist-model'
2
+ import type { ArchivistInstance } from '@xyo-network/archivist-model'
3
+ import { ArchivistAllQuerySchema } from '@xyo-network/archivist-model'
3
4
  import { asBoundWitness, BoundWitnessSchema } from '@xyo-network/boundwitness-model'
4
- import { EventUnsubscribeFunction } from '@xyo-network/module-events'
5
- import { Payload } from '@xyo-network/payload-model'
6
- import React, { useCallback, useEffect, useMemo, useState } from 'react'
5
+ import type { EventUnsubscribeFunction } from '@xyo-network/module-events'
6
+ import type { Payload } from '@xyo-network/payload-model'
7
+ import React, {
8
+ useCallback, useEffect, useMemo, useState,
9
+ } from 'react'
7
10
 
8
11
  import { ArchivistStats } from './ArchivistStats.tsx'
9
12
 
@@ -1,6 +1,6 @@
1
- import { Meta, StoryFn } from '@storybook/react'
1
+ import type { Meta, StoryFn } from '@storybook/react'
2
2
  import { useAsyncEffect } from '@xylabs/react-async-effect'
3
- import { ArchivistModule } from '@xyo-network/archivist-model'
3
+ import type { ArchivistModule } from '@xyo-network/archivist-model'
4
4
  import { NodeProvider } from '@xyo-network/react-node'
5
5
  import React, { useState } from 'react'
6
6
 
@@ -10,11 +10,7 @@ import { ArchivistDetails } from './Details.tsx'
10
10
  const StorybookEntry = {
11
11
  argTypes: {},
12
12
  component: ArchivistDetails,
13
- parameters: {
14
- docs: {
15
- page: null,
16
- },
17
- },
13
+ parameters: { docs: { page: null } },
18
14
  title: 'modules/archivist/Details',
19
15
  } as Meta<typeof ArchivistDetails>
20
16
 
@@ -64,6 +60,8 @@ TemplateWithNoData.args = {}
64
60
  const WithData = TemplateWithData.bind({})
65
61
  TemplateWithData.args = {}
66
62
 
67
- export { WithData, WithNoArchivist, WithNoData }
63
+ export {
64
+ WithData, WithNoArchivist, WithNoData,
65
+ }
68
66
 
69
67
  export default StorybookEntry
@@ -1,10 +1,11 @@
1
1
  import { ButtonGroup, Typography } from '@mui/material'
2
2
  import { useAsyncEffect } from '@xylabs/react-async-effect'
3
3
  import { ButtonEx } from '@xylabs/react-button'
4
- import { FlexBoxProps, FlexCol } from '@xylabs/react-flexbox'
4
+ import type { FlexBoxProps } from '@xylabs/react-flexbox'
5
+ import { FlexCol } from '@xylabs/react-flexbox'
5
6
  import { ArchivistClearQuerySchema, ArchivistCommitQuerySchema } from '@xyo-network/archivist-model'
6
7
  import { QueryBoundWitnessBuilder } from '@xyo-network/boundwitness-builder'
7
- import { Payload } from '@xyo-network/payload-model'
8
+ import type { Payload } from '@xyo-network/payload-model'
8
9
  import React, { useState } from 'react'
9
10
 
10
11
  import { useWeakArchivistFromNode } from '../../hooks/index.ts'
@@ -1,5 +1,7 @@
1
- import { ArchivistInstance, asArchivistInstance } from '@xyo-network/archivist-model'
2
- import { ModuleFromNodeConfig, useModuleFromNode } from '@xyo-network/react-node'
1
+ import type { ArchivistInstance } from '@xyo-network/archivist-model'
2
+ import { asArchivistInstance } from '@xyo-network/archivist-model'
3
+ import type { ModuleFromNodeConfig } from '@xyo-network/react-node'
4
+ import { useModuleFromNode } from '@xyo-network/react-node'
3
5
 
4
6
  /** @deprecated use useWeakArchivistFromNode */
5
7
  export const useArchivistFromNode = (
@@ -1,6 +1,8 @@
1
- import { ArchivistInstance, isArchivistInstance } from '@xyo-network/archivist-model'
2
- import { ModuleFilter } from '@xyo-network/module-model'
3
- import { ModuleFromNodeConfig, useModulesFromNode } from '@xyo-network/react-node'
1
+ import type { ArchivistInstance } from '@xyo-network/archivist-model'
2
+ import { isArchivistInstance } from '@xyo-network/archivist-model'
3
+ import type { ModuleFilter } from '@xyo-network/module-model'
4
+ import type { ModuleFromNodeConfig } from '@xyo-network/react-node'
5
+ import { useModulesFromNode } from '@xyo-network/react-node'
4
6
 
5
7
  /** @deprecated use useWeakArchivistsFromNode */
6
8
  export const useArchivistsFromNode = (
@@ -1,5 +1,7 @@
1
- import { ArchivistInstance, isArchivistInstance } from '@xyo-network/archivist-model'
2
- import { useWeakModuleFromNode, WeakModuleFromNodeConfig } from '@xyo-network/react-node'
1
+ import type { ArchivistInstance } from '@xyo-network/archivist-model'
2
+ import { isArchivistInstance } from '@xyo-network/archivist-model'
3
+ import type { WeakModuleFromNodeConfig } from '@xyo-network/react-node'
4
+ import { useWeakModuleFromNode } from '@xyo-network/react-node'
3
5
 
4
6
  export const useWeakArchivistFromNode = (
5
7
  nameOrAddressOrInstance?: string | ArchivistInstance,
@@ -1,7 +1,9 @@
1
1
  import { exists } from '@xylabs/exists'
2
- import { ArchivistInstance, asArchivistInstance } from '@xyo-network/archivist-model'
3
- import { ModuleFilter } from '@xyo-network/module-model'
4
- import { ModuleFromNodeConfig, useWeakModulesFromNode } from '@xyo-network/react-node'
2
+ import type { ArchivistInstance } from '@xyo-network/archivist-model'
3
+ import { asArchivistInstance } from '@xyo-network/archivist-model'
4
+ import type { ModuleFilter } from '@xyo-network/module-model'
5
+ import type { ModuleFromNodeConfig } from '@xyo-network/react-node'
6
+ import { useWeakModulesFromNode } from '@xyo-network/react-node'
5
7
 
6
8
  export const useWeakArchivistsFromNode = (
7
9
  filter?: ModuleFilter,
@@ -1,5 +1,5 @@
1
1
  import { usePromise } from '@xylabs/react-promise'
2
- import { ArchivistInstance } from '@xyo-network/archivist-model'
2
+ import type { ArchivistInstance } from '@xyo-network/archivist-model'
3
3
  import { useRefresh } from '@xyo-network/react-module'
4
4
  import { useState } from 'react'
5
5
 
@@ -1,8 +1,9 @@
1
- import { Hash } from '@xylabs/hex'
1
+ import type { Hash } from '@xylabs/hex'
2
2
  import { usePromise } from '@xylabs/react-promise'
3
- import { ArchivistInstance } from '@xyo-network/archivist-model'
4
- import { Payload, WithMeta } from '@xyo-network/payload-model'
5
- import { RefreshCallback, useRefresh } from '@xyo-network/react-module'
3
+ import type { ArchivistInstance } from '@xyo-network/archivist-model'
4
+ import type { Payload, WithMeta } from '@xyo-network/payload-model'
5
+ import type { RefreshCallback } from '@xyo-network/react-module'
6
+ import { useRefresh } from '@xyo-network/react-module'
6
7
 
7
8
  export const useArchivistGet = <T extends Payload = Payload>(
8
9
  archivist?: ArchivistInstance | null,
@@ -1,5 +1,5 @@
1
1
  import { usePromise } from '@xylabs/react-promise'
2
- import { ArchivistInstance } from '@xyo-network/archivist-model'
2
+ import type { ArchivistInstance } from '@xyo-network/archivist-model'
3
3
  import { useRefresh } from '@xyo-network/react-module'
4
4
  import { useState } from 'react'
5
5
 
@@ -1,8 +1,9 @@
1
- import { Hash } from '@xylabs/hex'
1
+ import type { Hash } from '@xylabs/hex'
2
2
  import { usePromise } from '@xylabs/react-promise'
3
- import { ArchivistInstance } from '@xyo-network/archivist-model'
4
- import { Payload, WithMeta } from '@xyo-network/payload-model'
5
- import { RefreshCallback, useRefresh } from '@xyo-network/react-module'
3
+ import type { ArchivistInstance } from '@xyo-network/archivist-model'
4
+ import type { Payload, WithMeta } from '@xyo-network/payload-model'
5
+ import type { RefreshCallback } from '@xyo-network/react-module'
6
+ import { useRefresh } from '@xyo-network/react-module'
6
7
 
7
8
  export const useWeakArchivistGet = <T extends Payload = Payload>(
8
9
  archivist?: WeakRef<ArchivistInstance> | null,
package/xy.config.ts CHANGED
@@ -1,9 +1,7 @@
1
- import { XyTsupConfig } from '@xylabs/ts-scripts-yarn3'
1
+ import type { XyTsupConfig } from '@xylabs/ts-scripts-yarn3'
2
2
  const config: XyTsupConfig = {
3
3
  compile: {
4
- browser: {
5
- src: true,
6
- },
4
+ browser: { src: true },
7
5
  node: {},
8
6
  neutral: {},
9
7
  },