@xyo-network/react-archivist 3.0.0 → 3.0.2

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.
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/Card/Card.tsx","../../src/components/Card/CardContent.tsx","../../src/components/Card/components/ArchivistParent.tsx","../../src/components/Card/components/ArchivistParents.tsx","../../src/components/Card/components/Stats/ArchivistStats.tsx","../../src/components/Card/components/Stats/MemoryArchivistStats.tsx","../../src/components/Card/CardHeader.tsx","../../src/components/Details/Details.tsx","../../src/hooks/node/useArchivistFromNode.tsx","../../src/hooks/node/useArchivistsFromNode.tsx","../../src/hooks/node/useWeakArchivistFromNode.tsx","../../src/hooks/node/useWeakArchivistsFromNode.tsx","../../src/hooks/queries/useArchivistAll.tsx","../../src/hooks/queries/useArchivistGet.tsx","../../src/hooks/queries/useWeakArchivistAll.tsx","../../src/hooks/queries/useWeakArchivistGet.tsx"],"sourcesContent":["import { Card, CardProps } from '@mui/material'\nimport { ArchivistInstance } from '@xyo-network/archivist-model'\nimport { ModuleCardActions, ModuleRenderProps } from '@xyo-network/react-module'\nimport React from 'react'\n\nimport { ArchivistCardContent } from './CardContent.tsx'\nimport { ArchivistCardHeader } from './CardHeader.tsx'\n\nexport const ArchivistCard: React.FC<CardProps & ModuleRenderProps<ArchivistInstance>> = ({ children, mod, ...props }) => {\n return (\n <Card {...props}>\n <ArchivistCardHeader mod={mod} />\n <ArchivistCardContent mod={mod} />\n {children}\n <ModuleCardActions mod={mod} />\n </Card>\n )\n}\n","import { CardContentProps } from '@mui/material'\nimport { useAsyncEffect } from '@xylabs/react-async-effect'\nimport { FlexGrowRow } from '@xylabs/react-flexbox'\nimport { ArchivistConfig, ArchivistInstance } from '@xyo-network/archivist-model'\nimport { ModuleWrapper } from '@xyo-network/module-wrapper'\nimport { ModuleCardContent, ModuleRenderProps } from '@xyo-network/react-module'\nimport { useWallet } from '@xyo-network/react-wallet'\nimport React, { useState } from 'react'\n\nimport { ArchivistParents } from './components/index.ts'\n\nexport const ArchivistCardContent: React.FC<ModuleRenderProps<ArchivistInstance> & CardContentProps> = ({ children, mod, ...props }) => {\n const [config, setConfig] = useState<ArchivistConfig>()\n const [wallet] = useWallet()\n\n useAsyncEffect(\n async (mounted) => {\n if (wallet && mod) {\n const wrapper = ModuleWrapper.wrap(mod, wallet)\n const payloads = await wrapper?.state()\n if (mounted()) {\n setConfig(payloads?.[0] as ArchivistConfig)\n }\n } else {\n setConfig(undefined)\n }\n },\n [mod, wallet],\n )\n\n return (\n <ModuleCardContent mod={mod} {...props}>\n <FlexGrowRow flexWrap=\"wrap\" justifyContent=\"start\" gap={2}>\n {children}\n <ArchivistParents config={config} />\n </FlexGrowRow>\n </ModuleCardContent>\n )\n}\n","import { ListItem, Typography } from '@mui/material'\nimport React from 'react'\n\nexport interface ArchivistTypeProps {\n archivistType?: 'Commit' | 'Read' | 'Write'\n parentArchivists?: string[]\n}\n\nexport const ArchivistParent: React.FC<ArchivistTypeProps> = ({ archivistType, parentArchivists }) => (\n <>\n {parentArchivists?.map((address) => {\n return (\n <ListItem key={address}>\n <Typography variant=\"subtitle2\">\n {archivistType}\n :\n {' '}\n <Typography variant=\"caption\" sx={{ ml: 0.5 }}>\n {address}\n </Typography>\n </Typography>\n </ListItem>\n )\n })}\n </>\n)\n","import { ArrowRightRounded as ArrowRightRoundedIcon } from '@mui/icons-material'\nimport { Collapse, IconButton, List, Paper, Typography } from '@mui/material'\nimport { FlexBoxProps, FlexCol } from '@xylabs/react-flexbox'\nimport { ArchivistConfig } from '@xyo-network/archivist-model'\nimport React, { useState } from 'react'\n\nimport { ArchivistParent } from './ArchivistParent.tsx'\n\nexport interface ArchivistParentsProps extends FlexBoxProps {\n config?: ArchivistConfig\n}\n\nexport const ArchivistParents: React.FC<ArchivistParentsProps> = ({ config, ...props }) => {\n const [parentArchivistCollapse, setParentArchivistCollapse] = useState(false)\n\n const { commit, read, write } = config?.parents ?? {}\n\n return (\n <>\n {commit || read || write\n ? (\n <FlexCol alignItems=\"start\" {...props}>\n <span onClick={() => setParentArchivistCollapse(!parentArchivistCollapse)}>\n <Typography variant=\"subtitle2\" sx={{ cursor: 'pointer', display: 'inline-block' }}>\n Parents\n </Typography>\n <IconButton size=\"small\">\n <ArrowRightRoundedIcon sx={{ rotate: parentArchivistCollapse ? '90deg' : '0deg', transition: 'all .25s' }} />\n </IconButton>\n </span>\n <Collapse in={parentArchivistCollapse}>\n <Paper elevation={2}>\n <List>\n <ArchivistParent archivistType=\"Commit\" parentArchivists={commit} />\n <ArchivistParent archivistType=\"Read\" parentArchivists={read} />\n <ArchivistParent archivistType=\"Write\" parentArchivists={write} />\n </List>\n </Paper>\n </Collapse>\n </FlexCol>\n )\n : null}\n </>\n )\n}\n","import { Badge, Tooltip } from '@mui/material'\nimport { FlexRow } from '@xylabs/react-flexbox'\nimport { Payload } from '@xyo-network/payload-model'\nimport React from 'react'\n// eslint-disable-next-line import-x/no-internal-modules\nimport { BsFileEarmarkCode } from 'react-icons/bs'\n// eslint-disable-next-line import-x/no-internal-modules\nimport { VscOrganization, VscSymbolMethod, VscSymbolNamespace } from 'react-icons/vsc'\n\nexport interface ArchivistStatsProps {\n addresses?: Record<string, number>\n boundWitnesses?: Payload[] | null\n payloads?: Payload[] | null\n schemas?: Record<string, number>\n}\n\nexport const ArchivistStats: React.FC<ArchivistStatsProps> = ({ addresses, boundWitnesses, payloads, schemas }) => {\n return (\n <FlexRow gap={2} mr={0.5}>\n {payloads?.length\n ? (\n <Tooltip title=\"Payloads\">\n <Badge badgeContent={payloads?.length} color=\"primary\">\n <VscSymbolNamespace size={20} />\n </Badge>\n </Tooltip>\n )\n : null}\n {boundWitnesses?.length\n ? (\n <Tooltip title=\"Blocks\">\n <Badge badgeContent={boundWitnesses?.length} color=\"primary\">\n <VscSymbolMethod size={20} />\n </Badge>\n </Tooltip>\n )\n : null}\n {Object.entries(schemas ?? {}).length > 0\n ? (\n <Tooltip title=\"Schemas\">\n <Badge badgeContent={Object.entries(schemas ?? {}).length} color=\"primary\">\n <BsFileEarmarkCode size={20} />\n </Badge>\n </Tooltip>\n )\n : null}\n {Object.entries(addresses ?? {}).length > 0\n ? (\n <Tooltip title=\"Addresses\">\n <Badge badgeContent={Object.entries(addresses ?? {}).length} color=\"primary\">\n <VscOrganization size={20} />\n </Badge>\n </Tooltip>\n )\n : null}\n </FlexRow>\n )\n}\n","import { useAsyncEffect } from '@xylabs/react-async-effect'\nimport { ArchivistAllQuerySchema, ArchivistInstance } from '@xyo-network/archivist-model'\nimport { asBoundWitness, BoundWitnessSchema } from '@xyo-network/boundwitness-model'\nimport { EventUnsubscribeFunction } from '@xyo-network/module-events'\nimport { Payload } from '@xyo-network/payload-model'\nimport React, { useCallback, useEffect, useMemo, useState } from 'react'\n\nimport { ArchivistStats } from './ArchivistStats.tsx'\n\nexport interface MemoryArchivistStatsProps {\n archivist?: ArchivistInstance\n}\n\nexport const MemoryArchivistsStats: React.FC<MemoryArchivistStatsProps> = ({ archivist }) => {\n const [all, setAll] = useState<Payload[] | null>()\n\n const getAll = useCallback(async (archivist?: ArchivistInstance) => {\n const all = await archivist?.all?.()\n setAll(all)\n }, [])\n\n useEffect(() => {\n const listeners: EventUnsubscribeFunction[] = []\n\n if (archivist?.queries.includes(ArchivistAllQuerySchema)) {\n const insertListener = archivist.on('inserted', async () => {\n await getAll(archivist)\n })\n listeners.push(insertListener)\n\n const clearListener = archivist.on('cleared', async () => {\n await getAll(archivist)\n })\n listeners.push(clearListener)\n }\n\n return () => {\n for (const listener of listeners) listener?.()\n }\n }, [archivist, getAll])\n\n useAsyncEffect(\n async () => {\n if (archivist?.queries.includes(ArchivistAllQuerySchema)) {\n await getAll(archivist)\n } else {\n setAll(null)\n }\n },\n [archivist, getAll],\n )\n\n const payloads = useMemo(() => (all === null ? [] : all?.filter(payload => payload.schema !== BoundWitnessSchema)), [all])\n const boundWitnesses = useMemo(() => (all === null ? [] : all?.filter(payload => payload.schema === BoundWitnessSchema)), [all])\n const addresses = useMemo(\n () =>\n all?.reduce(\n (prev, payload) => {\n const w = asBoundWitness(payload)\n if (w?.addresses)\n for (const address of w?.addresses ?? []) {\n prev[address] = (prev[address] ?? 0) + 1\n }\n return prev\n },\n {} as Record<string, number>,\n ) ?? {},\n [all],\n )\n const schemas = useMemo(\n () =>\n all?.reduce(\n (prev, payload) => {\n prev[payload.schema] = (prev[payload.schema] ?? 0) + 1\n return prev\n },\n {} as Record<string, number>,\n ) ?? {},\n [all],\n )\n\n return <ArchivistStats addresses={addresses} boundWitnesses={boundWitnesses} payloads={payloads} schemas={schemas} />\n}\n","import { CardHeaderProps } from '@mui/material'\nimport { MemoryArchivistConfigSchema } from '@xyo-network/archivist-memory'\nimport { ArchivistInstance } from '@xyo-network/archivist-model'\nimport { ModuleCardHeader, ModuleRenderProps } from '@xyo-network/react-module'\nimport React, { useMemo } from 'react'\n\nimport { MemoryArchivistsStats } from './components/index.ts'\n\nconst ArchivistStats = (archivist?: ArchivistInstance) => {\n switch (archivist?.config.schema) {\n case MemoryArchivistConfigSchema: {\n return <MemoryArchivistsStats archivist={archivist} />\n }\n default: {\n return <></>\n }\n }\n}\n\nexport const ArchivistCardHeader: React.FC<ModuleRenderProps<ArchivistInstance> & CardHeaderProps> = ({ title, mod, ...props }) => {\n const Stats = useMemo(() => ArchivistStats(mod), [mod])\n return <ModuleCardHeader mod={mod} title={title ?? mod?.config.name ?? 'Archivist'} action={Stats} {...props} />\n}\n","import { ButtonGroup, Typography } from '@mui/material'\nimport { useAsyncEffect } from '@xylabs/react-async-effect'\nimport { ButtonEx } from '@xylabs/react-button'\nimport { FlexBoxProps, FlexCol } from '@xylabs/react-flexbox'\nimport { ArchivistClearQuerySchema, ArchivistCommitQuerySchema } from '@xyo-network/archivist-model'\nimport { QueryBoundWitnessBuilder } from '@xyo-network/boundwitness-builder'\nimport { Payload } from '@xyo-network/payload-model'\nimport React, { useState } from 'react'\n\nimport { useWeakArchivistFromNode } from '../../hooks/index.ts'\n\nconst testQueryCommit = { schema: ArchivistCommitQuerySchema }\nconst testQueryCommitBoundWitnessBuilder = new QueryBoundWitnessBuilder().query(testQueryCommit)\n\nconst testQueryClear = { schema: ArchivistClearQuerySchema }\nconst testQueryClearBoundWitnessBuilder = new QueryBoundWitnessBuilder().query(testQueryClear)\n\nexport interface ArchivistDetails extends FlexBoxProps {\n address?: string\n}\n\nexport const ArchivistDetails: React.FC<ArchivistDetails> = ({ address, ...props }) => {\n const [archivist] = useWeakArchivistFromNode(address)\n const [payloads, setPayloads] = useState<Payload[]>()\n const [refresh, setRefresh] = useState(0)\n const [queryableCommit, setQueryableCommit] = useState(false)\n const [queryableClear, setQueryableClear] = useState(false)\n\n useAsyncEffect(\n async () => {\n const instance = archivist?.deref()\n if (instance) {\n const [commitBW] = await (await testQueryCommitBoundWitnessBuilder).build()\n const [clearBW] = await (await testQueryClearBoundWitnessBuilder).build()\n setQueryableCommit(await instance?.queryable(commitBW, [testQueryCommit]))\n setQueryableClear(await instance?.queryable(clearBW, [testQueryClear]))\n }\n },\n [archivist],\n )\n\n useAsyncEffect(\n async (mounted) => {\n const payloads = await archivist?.deref()?.all?.()\n if (mounted()) {\n setPayloads(payloads)\n }\n },\n [archivist, refresh],\n )\n\n return (\n <FlexCol {...props}>\n <Typography>{`Payloads: ${payloads ? payloads.length : '-'}`}</Typography>\n <ButtonGroup>\n <ButtonEx disabled={payloads?.length === 0 || !archivist || !queryableCommit} onClick={() => archivist?.deref()?.commit?.()}>\n Commit\n </ButtonEx>\n <ButtonEx disabled={!archivist || !queryableClear} onClick={() => archivist?.deref()?.clear?.()}>\n Clear\n </ButtonEx>\n <ButtonEx\n disabled={!archivist}\n onClick={() => {\n setRefresh(refresh + 1)\n }}\n >\n Refresh\n </ButtonEx>\n </ButtonGroup>\n </FlexCol>\n )\n}\n","import { ArchivistInstance, asArchivistInstance } from '@xyo-network/archivist-model'\nimport { ModuleFromNodeConfig, useModuleFromNode } from '@xyo-network/react-node'\n\n/** @deprecated use useWeakArchivistFromNode */\nexport const useArchivistFromNode = (\n nameOrAddressOrInstance?: string | ArchivistInstance,\n config?: ModuleFromNodeConfig,\n): [ArchivistInstance | undefined, Error | undefined] => {\n const [mod, error] = useModuleFromNode(nameOrAddressOrInstance, config)\n const instance = asArchivistInstance(mod)\n if (mod && !instance) {\n const error = new Error(`Resolved module is not a ArchivistInstance [${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 { ArchivistInstance, isArchivistInstance } from '@xyo-network/archivist-model'\nimport { ModuleFilter } from '@xyo-network/module-model'\nimport { ModuleFromNodeConfig, useModulesFromNode } from '@xyo-network/react-node'\n\n/** @deprecated use useWeakArchivistsFromNode */\nexport const useArchivistsFromNode = (\n filter?: ModuleFilter,\n config?: ModuleFromNodeConfig,\n): [ArchivistInstance[] | null | undefined, Error | undefined] => {\n const [modules, error] = useModulesFromNode(filter, 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<ArchivistInstance[]>((prev, mod) => {\n if (isArchivistInstance(mod)) {\n prev.push(mod)\n }\n return prev\n }, []),\n undefined,\n ]\n : [modules, error]\n}\n","import { ArchivistInstance, isArchivistInstance } from '@xyo-network/archivist-model'\nimport { useWeakModuleFromNode, WeakModuleFromNodeConfig } from '@xyo-network/react-node'\n\nexport const useWeakArchivistFromNode = (\n nameOrAddressOrInstance?: string | ArchivistInstance,\n config?: WeakModuleFromNodeConfig,\n): [WeakRef<ArchivistInstance> | undefined, Error | undefined] => {\n return useWeakModuleFromNode<ArchivistInstance>(nameOrAddressOrInstance, { identity: isArchivistInstance, ...config })\n}\n","import { exists } from '@xylabs/exists'\nimport { ArchivistInstance, asArchivistInstance } from '@xyo-network/archivist-model'\nimport { ModuleFilter } from '@xyo-network/module-model'\nimport { ModuleFromNodeConfig, useWeakModulesFromNode } from '@xyo-network/react-node'\n\nexport const useWeakArchivistsFromNode = (\n filter?: ModuleFilter,\n config?: ModuleFromNodeConfig,\n): [WeakRef<ArchivistInstance>[] | null | undefined, Error | undefined] => {\n const [modules, error] = useWeakModulesFromNode(filter, config)\n if (error) {\n return [null, error]\n }\n return [\n modules\n ?.map((mod) => {\n const instance = asArchivistInstance(mod?.deref())\n if (instance) {\n return new WeakRef(instance)\n }\n })\n .filter(exists) ?? [],\n undefined,\n ]\n}\n","import { usePromise } from '@xylabs/react-promise'\nimport { ArchivistInstance } from '@xyo-network/archivist-model'\nimport { useRefresh } from '@xyo-network/react-module'\nimport { useState } from 'react'\n\nexport const useArchivistAll = (archivist: ArchivistInstance) => {\n const [error, setError] = useState<Error>()\n const [enabled, refresh] = useRefresh()\n\n const payloads = usePromise(async () => {\n try {\n if (enabled) {\n return await archivist?.all?.()\n }\n } catch (ex) {\n const error = ex as Error\n setError(error)\n }\n }, [archivist, enabled])\n\n return [payloads, error, refresh]\n}\n","import { Hash } from '@xylabs/hex'\nimport { usePromise } from '@xylabs/react-promise'\nimport { ArchivistInstance } from '@xyo-network/archivist-model'\nimport { Payload, WithMeta } from '@xyo-network/payload-model'\nimport { RefreshCallback, useRefresh } from '@xyo-network/react-module'\n\nexport const useArchivistGet = <T extends Payload = Payload>(\n archivist?: ArchivistInstance | null,\n hashes?: Hash[],\n): [T[] | undefined, Error | undefined, RefreshCallback] => {\n const [enabled, refresh] = useRefresh()\n\n const [payloads, error] = usePromise(async () => {\n if (enabled && archivist && hashes) {\n return (await archivist.get(hashes)) as WithMeta<T>[]\n }\n }, [archivist, hashes, enabled])\n\n return [payloads, error, refresh]\n}\n","import { usePromise } from '@xylabs/react-promise'\nimport { ArchivistInstance } from '@xyo-network/archivist-model'\nimport { useRefresh } from '@xyo-network/react-module'\nimport { useState } from 'react'\n\nexport const useWeakArchivistAll = (archivist: WeakRef<ArchivistInstance>) => {\n const [error, setError] = useState<Error>()\n const [enabled, refresh] = useRefresh()\n\n const payloads = usePromise(async () => {\n try {\n if (enabled) {\n return await archivist?.deref()?.all?.()\n }\n } catch (ex) {\n const error = ex as Error\n setError(error)\n }\n }, [archivist, enabled])\n\n return [payloads, error, refresh]\n}\n","import { Hash } from '@xylabs/hex'\nimport { usePromise } from '@xylabs/react-promise'\nimport { ArchivistInstance } from '@xyo-network/archivist-model'\nimport { Payload, WithMeta } from '@xyo-network/payload-model'\nimport { RefreshCallback, useRefresh } from '@xyo-network/react-module'\n\nexport const useWeakArchivistGet = <T extends Payload = Payload>(\n archivist?: WeakRef<ArchivistInstance> | null,\n hashes?: Hash[],\n): [T[] | undefined, Error | undefined, RefreshCallback] => {\n const [enabled, refresh] = useRefresh()\n\n const [payloads, error] = usePromise(async () => {\n const archivistInstance = archivist?.deref()\n if (enabled && archivistInstance && hashes) {\n return (await archivistInstance.get(hashes)) as WithMeta<T>[]\n }\n }, [archivist, hashes, enabled])\n\n return [payloads, error, refresh]\n}\n"],"mappings":";;;;AAAA,SAASA,YAAuB;AAEhC,SAASC,yBAA4C;AACrD,OAAOC,YAAW;;;ACFlB,SAASC,kBAAAA,uBAAsB;AAC/B,SAASC,mBAAmB;AAE5B,SAASC,qBAAqB;AAC9B,SAASC,yBAA4C;AACrD,SAASC,iBAAiB;AAC1B,OAAOC,UAASC,YAAAA,iBAAgB;;;ACPhC,SAASC,UAAUC,kBAAkB;AACrC,OAAOC,WAAW;AAOX,IAAMC,kBAAgD,wBAAC,EAAEC,eAAeC,iBAAgB,MAC7F,sBAAA,cAAA,MAAA,UAAA,MACGA,kBAAkBC,IAAI,CAACC,YAAAA;AACtB,SACE,sBAAA,cAACC,UAAAA;IAASC,KAAKF;KACb,sBAAA,cAACG,YAAAA;IAAWC,SAAQ;KACjBP,eAAc,KAEd,KACD,sBAAA,cAACM,YAAAA;IAAWC,SAAQ;IAAUC,IAAI;MAAEC,IAAI;IAAI;KACzCN,OAAAA,CAAAA,CAAAA;AAKX,CAAA,CAAA,GAfyD;;;ACR7D,SAASO,qBAAqBC,6BAA6B;AAC3D,SAASC,UAA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AC1B;OAAgB,CAAA;AACxEsB,wBAAkB,MAAME,UAAUK,UAAUD,SAAS;QAACtB;OAAe,CAAA;IACvE;EACF,GACA;IAACM;GAAU;AAGbW,EAAAA,gBACE,OAAOO,YAAAA;AACL,UAAMhB,YAAW,MAAMF,WAAWa,MAAAA,GAASM,MAAAA;AAC3C,QAAID,QAAAA,GAAW;AACbf,kBAAYD,SAAAA;IACd;EACF,GACA;IAACF;IAAWK;GAAQ;AAGtB,SACE,gBAAAe,OAAA,cAACC,UAAYtB,OACX,gBAAAqB,OAAA,cAACE,aAAAA,MAAY,aAAapB,WAAWA,SAASqB,SAAS,GAAA,EAAK,GAC5D,gBAAAH,OAAA,cAACI,aAAAA,MACC,gBAAAJ,OAAA,cAACK,UAAAA;IAASC,UAAUxB,UAAUqB,WAAW,KAAK,CAACvB,aAAa,CAACO;IAAiBoB,SAAS,6BAAM3B,WAAWa,MAAAA,GAASe,SAAAA,GAA1B;KAAsC,QAAA,GAG7H,gBAAAR,OAAA,cAACK,UAAAA;IAASC,UAAU,CAAC1B,aAAa,CAACS;IAAgBkB,SAAS,6BAAM3B,WAAWa,MAAAA,GAASgB,QAAAA,GAA1B;KAAqC,OAAA,GAGjG,gBAAAT,OAAA,cAACK,UAAAA;IACCC,UAAU,CAAC1B;IACX2B,SAAS,6BAAA;AACPrB,iBAAWD,UAAU,CAAA;IACvB,GAFS;KAGV,SAAA,CAAA,CAAA;AAMT,GAnD4D;","names":["Card","ModuleCardActions","React","useAsyncEffect","FlexGrowRow","ModuleWrapper","ModuleCardContent","useWallet","React","useState","ListItem","Typography","React","ArchivistParent","archivistType","parentArchivists","map","address","ListItem","key","Typography","variant","sx","ml","ArrowRightRounded","ArrowRightRoundedIcon","Collapse","IconButton","List","Paper","Typography","FlexCol","React","useState","ArchivistParents","config","props","parentArchivistCollapse","setParentArchivistCollapse","useState","commit","read","write","parents","React","FlexCol","alignItems","span","onClick","Typography","variant","sx","cursor","display","IconButton","size","ArrowRightRoundedIcon","rotate","transition","Collapse","in","Paper","elevation","List","ArchivistParent","archivistType","parentArchivists","Badge","Tooltip","FlexRow","React","BsFileEarmarkCode","VscOrganization","VscSymbolMethod","VscSymbolNamespace","ArchivistStats","addresses","boundWitnesses","payloads","schemas","React","FlexRow","gap","mr","length","Tooltip","title","Badge","badgeContent","color","VscSymbolNamespace","size","VscSymbolMethod","Object","entries","BsFileEarmarkCode","VscOrganization","useAsyncEffect","ArchivistAllQuerySchema","asBoundWitness","BoundWitnessSchema","React","useCallback","useEffect","useMemo","useState","MemoryArchivistsStats","archivist","all","setAll","useState","getAll","useCallback","useEffect","listeners","queries","includes","ArchivistAllQuerySchema","insertListener","on","push","clearListener","listener","useAsyncEffect","payloads","useMemo","filter","payload","schema","BoundWitnessSchema","boundWitnesses","addresses","reduce","prev","w","asBoundWitness","address","schemas","React","ArchivistStats","ArchivistCardContent","children","mod","props","config","setConfig","useState","wallet","useWallet","useAsyncEffect","mounted","wrapper","ModuleWrapper","wrap","payloads","state","undefined","React","ModuleCardContent","FlexGrowRow","flexWrap","justifyContent","gap","ArchivistParents","MemoryArchivistConfigSchema","ModuleCardHeader","React","useMemo","ArchivistStats","archivist","config","schema","MemoryArchivistConfigSchema","React","MemoryArchivistsStats","ArchivistCardHeader","title","mod","props","Stats","useMemo","ModuleCardHeader","name","action","ArchivistCard","children","mod","props","React","Card","ArchivistCardHeader","ArchivistCardContent","ModuleCardActions","ButtonGroup","Typography","useAsyncEffect","ButtonEx","FlexCol","ArchivistClearQuerySchema","ArchivistCommitQuerySchema","QueryBoundWitnessBuilder","React","useState","asArchivistInstance","useModuleFromNode","useArchivistFromNode","nameOrAddressOrInstance","config","mod","error","useModuleFromNode","instance","asArchivistInstance","Error","schema","name","address","console","message","undefined","isArchivistInstance","useModulesFromNode","useArchivistsFromNode","filter","config","modules","error","useModulesFromNode","reduce","prev","mod","isArchivistInstance","push","undefined","isArchivistInstance","useWeakModuleFromNode","useWeakArchivistFromNode","nameOrAddressOrInstance","config","useWeakModuleFromNode","identity","isArchivistInstance","exists","asArchivistInstance","useWeakModulesFromNode","useWeakArchivistsFromNode","filter","config","modules","error","useWeakModulesFromNode","map","mod","instance","asArchivistInstance","deref","WeakRef","exists","undefined","usePromise","useRefresh","useState","useArchivistAll","archivist","error","setError","useState","enabled","refresh","useRefresh","payloads","usePromise","all","ex","usePromise","useRefresh","useArchivistGet","archivist","hashes","enabled","refresh","useRefresh","payloads","error","usePromise","get","usePromise","useRefresh","useState","useWeakArchivistAll","archivist","error","setError","useState","enabled","refresh","useRefresh","payloads","usePromise","deref","all","ex","usePromise","useRefresh","useWeakArchivistGet","archivist","hashes","enabled","refresh","useRefresh","payloads","error","usePromise","archivistInstance","deref","get","testQueryCommit","schema","ArchivistCommitQuerySchema","testQueryCommitBoundWitnessBuilder","QueryBoundWitnessBuilder","query","testQueryClear","ArchivistClearQuerySchema","testQueryClearBoundWitnessBuilder","ArchivistDetails","address","props","archivist","useWeakArchivistFromNode","payloads","setPayloads","useState","refresh","setRefresh","queryableCommit","setQueryableCommit","queryableClear","setQueryableClear","useAsyncEffect","instance","deref","commitBW","build","clearBW","queryable","mounted","all","React","FlexCol","Typography","length","ButtonGroup","ButtonEx","disabled","onClick","commit","clear"]}
1
+ {"version":3,"sources":["../../src/components/Card/Card.tsx","../../src/components/Card/CardContent.tsx","../../src/components/Card/components/ArchivistParent.tsx","../../src/components/Card/components/ArchivistParents.tsx","../../src/components/Card/components/Stats/ArchivistStats.tsx","../../src/components/Card/components/Stats/MemoryArchivistStats.tsx","../../src/components/Card/CardHeader.tsx","../../src/components/Details/Details.tsx","../../src/hooks/node/useArchivistFromNode.tsx","../../src/hooks/node/useArchivistsFromNode.tsx","../../src/hooks/node/useWeakArchivistFromNode.tsx","../../src/hooks/node/useWeakArchivistsFromNode.tsx","../../src/hooks/queries/useArchivistAll.tsx","../../src/hooks/queries/useArchivistGet.tsx","../../src/hooks/queries/useWeakArchivistAll.tsx","../../src/hooks/queries/useWeakArchivistGet.tsx"],"sourcesContent":["import type { CardProps } from '@mui/material'\nimport { Card } from '@mui/material'\nimport type { ArchivistInstance } from '@xyo-network/archivist-model'\nimport type { ModuleRenderProps } from '@xyo-network/react-module'\nimport { ModuleCardActions } from '@xyo-network/react-module'\nimport React from 'react'\n\nimport { ArchivistCardContent } from './CardContent.tsx'\nimport { ArchivistCardHeader } from './CardHeader.tsx'\n\nexport const ArchivistCard: React.FC<CardProps & ModuleRenderProps<ArchivistInstance>> = ({ children, mod, ...props }) => {\n return (\n <Card {...props}>\n <ArchivistCardHeader mod={mod} />\n <ArchivistCardContent mod={mod} />\n {children}\n <ModuleCardActions mod={mod} />\n </Card>\n )\n}\n","import type { CardContentProps } from '@mui/material'\nimport { useAsyncEffect } from '@xylabs/react-async-effect'\nimport { FlexGrowRow } from '@xylabs/react-flexbox'\nimport type { ArchivistConfig, ArchivistInstance } from '@xyo-network/archivist-model'\nimport { ModuleWrapper } from '@xyo-network/module-wrapper'\nimport type { ModuleRenderProps } from '@xyo-network/react-module'\nimport { ModuleCardContent } from '@xyo-network/react-module'\nimport { useWallet } from '@xyo-network/react-wallet'\nimport React, { useState } from 'react'\n\nimport { ArchivistParents } from './components/index.ts'\n\nexport const ArchivistCardContent: React.FC<ModuleRenderProps<ArchivistInstance> & CardContentProps> = ({ children, mod, ...props }) => {\n const [config, setConfig] = useState<ArchivistConfig>()\n const [wallet] = useWallet()\n\n useAsyncEffect(\n async (mounted) => {\n if (wallet && mod) {\n const wrapper = ModuleWrapper.wrap(mod, wallet)\n const payloads = await wrapper?.state()\n if (mounted()) {\n setConfig(payloads?.[0] as ArchivistConfig)\n }\n } else {\n setConfig(undefined)\n }\n },\n [mod, wallet],\n )\n\n return (\n <ModuleCardContent mod={mod} {...props}>\n <FlexGrowRow flexWrap=\"wrap\" justifyContent=\"start\" gap={2}>\n {children}\n <ArchivistParents config={config} />\n </FlexGrowRow>\n </ModuleCardContent>\n )\n}\n","import { ListItem, Typography } from '@mui/material'\nimport React from 'react'\n\nexport interface ArchivistTypeProps {\n archivistType?: 'Commit' | 'Read' | 'Write'\n parentArchivists?: string[]\n}\n\nexport const ArchivistParent: React.FC<ArchivistTypeProps> = ({ archivistType, parentArchivists }) => (\n <>\n {parentArchivists?.map((address) => {\n return (\n <ListItem key={address}>\n <Typography variant=\"subtitle2\">\n {archivistType}\n :\n {' '}\n <Typography variant=\"caption\" sx={{ ml: 0.5 }}>\n {address}\n </Typography>\n </Typography>\n </ListItem>\n )\n })}\n </>\n)\n","import { ArrowRightRounded as ArrowRightRoundedIcon } from '@mui/icons-material'\nimport { Collapse, IconButton, List, Paper, Typography } from '@mui/material'\nimport type { FlexBoxProps } from '@xylabs/react-flexbox'\nimport { FlexCol } from '@xylabs/react-flexbox'\nimport type { ArchivistConfig } from '@xyo-network/archivist-model'\nimport React, { useState } from 'react'\n\nimport { ArchivistParent } from './ArchivistParent.tsx'\n\nexport interface ArchivistParentsProps extends FlexBoxProps {\n config?: ArchivistConfig\n}\n\nexport const ArchivistParents: React.FC<ArchivistParentsProps> = ({ config, ...props }) => {\n const [parentArchivistCollapse, setParentArchivistCollapse] = useState(false)\n\n const { commit, read, write } = config?.parents ?? {}\n\n return (\n <>\n {commit || read || write\n ? (\n <FlexCol alignItems=\"start\" {...props}>\n <span onClick={() => setParentArchivistCollapse(!parentArchivistCollapse)}>\n <Typography variant=\"subtitle2\" sx={{ cursor: 'pointer', display: 'inline-block' }}>\n Parents\n </Typography>\n <IconButton size=\"small\">\n <ArrowRightRoundedIcon sx={{ rotate: parentArchivistCollapse ? '90deg' : '0deg', transition: 'all .25s' }} />\n </IconButton>\n </span>\n <Collapse in={parentArchivistCollapse}>\n <Paper elevation={2}>\n <List>\n <ArchivistParent archivistType=\"Commit\" parentArchivists={commit} />\n <ArchivistParent archivistType=\"Read\" parentArchivists={read} />\n <ArchivistParent archivistType=\"Write\" parentArchivists={write} />\n </List>\n </Paper>\n </Collapse>\n </FlexCol>\n )\n : null}\n </>\n )\n}\n","import { Badge, Tooltip } from '@mui/material'\nimport { FlexRow } from '@xylabs/react-flexbox'\nimport type { Payload } from '@xyo-network/payload-model'\nimport React from 'react'\n// eslint-disable-next-line import-x/no-internal-modules\nimport { BsFileEarmarkCode } from 'react-icons/bs'\n// eslint-disable-next-line import-x/no-internal-modules\nimport { VscOrganization, VscSymbolMethod, VscSymbolNamespace } from 'react-icons/vsc'\n\nexport interface ArchivistStatsProps {\n addresses?: Record<string, number>\n boundWitnesses?: Payload[] | null\n payloads?: Payload[] | null\n schemas?: Record<string, number>\n}\n\nexport const ArchivistStats: React.FC<ArchivistStatsProps> = ({ addresses, boundWitnesses, payloads, schemas }) => {\n return (\n <FlexRow gap={2} mr={0.5}>\n {payloads?.length\n ? (\n <Tooltip title=\"Payloads\">\n <Badge badgeContent={payloads?.length} color=\"primary\">\n <VscSymbolNamespace size={20} />\n </Badge>\n </Tooltip>\n )\n : null}\n {boundWitnesses?.length\n ? (\n <Tooltip title=\"Blocks\">\n <Badge badgeContent={boundWitnesses?.length} color=\"primary\">\n <VscSymbolMethod size={20} />\n </Badge>\n </Tooltip>\n )\n : null}\n {Object.entries(schemas ?? {}).length > 0\n ? (\n <Tooltip title=\"Schemas\">\n <Badge badgeContent={Object.entries(schemas ?? {}).length} color=\"primary\">\n <BsFileEarmarkCode size={20} />\n </Badge>\n </Tooltip>\n )\n : null}\n {Object.entries(addresses ?? {}).length > 0\n ? (\n <Tooltip title=\"Addresses\">\n <Badge badgeContent={Object.entries(addresses ?? {}).length} color=\"primary\">\n <VscOrganization size={20} />\n </Badge>\n </Tooltip>\n )\n : null}\n </FlexRow>\n )\n}\n","import { useAsyncEffect } from '@xylabs/react-async-effect'\nimport type { ArchivistInstance } from '@xyo-network/archivist-model'\nimport { ArchivistAllQuerySchema } from '@xyo-network/archivist-model'\nimport { asBoundWitness, BoundWitnessSchema } from '@xyo-network/boundwitness-model'\nimport type { EventUnsubscribeFunction } from '@xyo-network/module-events'\nimport type { Payload } from '@xyo-network/payload-model'\nimport React, { useCallback, useEffect, useMemo, useState } from 'react'\n\nimport { ArchivistStats } from './ArchivistStats.tsx'\n\nexport interface MemoryArchivistStatsProps {\n archivist?: ArchivistInstance\n}\n\nexport const MemoryArchivistsStats: React.FC<MemoryArchivistStatsProps> = ({ archivist }) => {\n const [all, setAll] = useState<Payload[] | null>()\n\n const getAll = useCallback(async (archivist?: ArchivistInstance) => {\n const all = await archivist?.all?.()\n setAll(all)\n }, [])\n\n useEffect(() => {\n const listeners: EventUnsubscribeFunction[] = []\n\n if (archivist?.queries.includes(ArchivistAllQuerySchema)) {\n const insertListener = archivist.on('inserted', async () => {\n await getAll(archivist)\n })\n listeners.push(insertListener)\n\n const clearListener = archivist.on('cleared', async () => {\n await getAll(archivist)\n })\n listeners.push(clearListener)\n }\n\n return () => {\n for (const listener of listeners) listener?.()\n }\n }, [archivist, getAll])\n\n useAsyncEffect(\n async () => {\n if (archivist?.queries.includes(ArchivistAllQuerySchema)) {\n await getAll(archivist)\n } else {\n setAll(null)\n }\n },\n [archivist, getAll],\n )\n\n const payloads = useMemo(() => (all === null ? [] : all?.filter(payload => payload.schema !== BoundWitnessSchema)), [all])\n const boundWitnesses = useMemo(() => (all === null ? [] : all?.filter(payload => payload.schema === BoundWitnessSchema)), [all])\n const addresses = useMemo(\n () =>\n all?.reduce(\n (prev, payload) => {\n const w = asBoundWitness(payload)\n if (w?.addresses)\n for (const address of w?.addresses ?? []) {\n prev[address] = (prev[address] ?? 0) + 1\n }\n return prev\n },\n {} as Record<string, number>,\n ) ?? {},\n [all],\n )\n const schemas = useMemo(\n () =>\n all?.reduce(\n (prev, payload) => {\n prev[payload.schema] = (prev[payload.schema] ?? 0) + 1\n return prev\n },\n {} as Record<string, number>,\n ) ?? {},\n [all],\n )\n\n return <ArchivistStats addresses={addresses} boundWitnesses={boundWitnesses} payloads={payloads} schemas={schemas} />\n}\n","import type { CardHeaderProps } from '@mui/material'\nimport { MemoryArchivistConfigSchema } from '@xyo-network/archivist-memory'\nimport type { ArchivistInstance } from '@xyo-network/archivist-model'\nimport type { ModuleRenderProps } from '@xyo-network/react-module'\nimport { ModuleCardHeader } from '@xyo-network/react-module'\nimport React, { useMemo } from 'react'\n\nimport { MemoryArchivistsStats } from './components/index.ts'\n\nconst ArchivistStats = (archivist?: ArchivistInstance) => {\n switch (archivist?.config.schema) {\n case MemoryArchivistConfigSchema: {\n return <MemoryArchivistsStats archivist={archivist} />\n }\n default: {\n return <></>\n }\n }\n}\n\nexport const ArchivistCardHeader: React.FC<ModuleRenderProps<ArchivistInstance> & CardHeaderProps> = ({ title, mod, ...props }) => {\n const Stats = useMemo(() => ArchivistStats(mod), [mod])\n return <ModuleCardHeader mod={mod} title={title ?? mod?.config.name ?? 'Archivist'} action={Stats} {...props} />\n}\n","import { ButtonGroup, Typography } from '@mui/material'\nimport { useAsyncEffect } from '@xylabs/react-async-effect'\nimport { ButtonEx } from '@xylabs/react-button'\nimport type { FlexBoxProps } from '@xylabs/react-flexbox'\nimport { FlexCol } from '@xylabs/react-flexbox'\nimport { ArchivistClearQuerySchema, ArchivistCommitQuerySchema } from '@xyo-network/archivist-model'\nimport { QueryBoundWitnessBuilder } from '@xyo-network/boundwitness-builder'\nimport type { Payload } from '@xyo-network/payload-model'\nimport React, { useState } from 'react'\n\nimport { useWeakArchivistFromNode } from '../../hooks/index.ts'\n\nconst testQueryCommit = { schema: ArchivistCommitQuerySchema }\nconst testQueryCommitBoundWitnessBuilder = new QueryBoundWitnessBuilder().query(testQueryCommit)\n\nconst testQueryClear = { schema: ArchivistClearQuerySchema }\nconst testQueryClearBoundWitnessBuilder = new QueryBoundWitnessBuilder().query(testQueryClear)\n\nexport interface ArchivistDetails extends FlexBoxProps {\n address?: string\n}\n\nexport const ArchivistDetails: React.FC<ArchivistDetails> = ({ address, ...props }) => {\n const [archivist] = useWeakArchivistFromNode(address)\n const [payloads, setPayloads] = useState<Payload[]>()\n const [refresh, setRefresh] = useState(0)\n const [queryableCommit, setQueryableCommit] = useState(false)\n const [queryableClear, setQueryableClear] = useState(false)\n\n useAsyncEffect(\n async () => {\n const instance = archivist?.deref()\n if (instance) {\n const [commitBW] = await (await testQueryCommitBoundWitnessBuilder).build()\n const [clearBW] = await (await testQueryClearBoundWitnessBuilder).build()\n setQueryableCommit(await instance?.queryable(commitBW, [testQueryCommit]))\n setQueryableClear(await instance?.queryable(clearBW, [testQueryClear]))\n }\n },\n [archivist],\n )\n\n useAsyncEffect(\n async (mounted) => {\n const payloads = await archivist?.deref()?.all?.()\n if (mounted()) {\n setPayloads(payloads)\n }\n },\n [archivist, refresh],\n )\n\n return (\n <FlexCol {...props}>\n <Typography>{`Payloads: ${payloads ? payloads.length : '-'}`}</Typography>\n <ButtonGroup>\n <ButtonEx disabled={payloads?.length === 0 || !archivist || !queryableCommit} onClick={() => archivist?.deref()?.commit?.()}>\n Commit\n </ButtonEx>\n <ButtonEx disabled={!archivist || !queryableClear} onClick={() => archivist?.deref()?.clear?.()}>\n Clear\n </ButtonEx>\n <ButtonEx\n disabled={!archivist}\n onClick={() => {\n setRefresh(refresh + 1)\n }}\n >\n Refresh\n </ButtonEx>\n </ButtonGroup>\n </FlexCol>\n )\n}\n","import type { ArchivistInstance } from '@xyo-network/archivist-model'\nimport { asArchivistInstance } from '@xyo-network/archivist-model'\nimport type { ModuleFromNodeConfig } from '@xyo-network/react-node'\nimport { useModuleFromNode } from '@xyo-network/react-node'\n\n/** @deprecated use useWeakArchivistFromNode */\nexport const useArchivistFromNode = (\n nameOrAddressOrInstance?: string | ArchivistInstance,\n config?: ModuleFromNodeConfig,\n): [ArchivistInstance | undefined, Error | undefined] => {\n const [mod, error] = useModuleFromNode(nameOrAddressOrInstance, config)\n const instance = asArchivistInstance(mod)\n if (mod && !instance) {\n const error = new Error(`Resolved module is not a ArchivistInstance [${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 { ArchivistInstance } from '@xyo-network/archivist-model'\nimport { isArchivistInstance } from '@xyo-network/archivist-model'\nimport type { ModuleFilter } from '@xyo-network/module-model'\nimport type { ModuleFromNodeConfig } from '@xyo-network/react-node'\nimport { useModulesFromNode } from '@xyo-network/react-node'\n\n/** @deprecated use useWeakArchivistsFromNode */\nexport const useArchivistsFromNode = (\n filter?: ModuleFilter,\n config?: ModuleFromNodeConfig,\n): [ArchivistInstance[] | null | undefined, Error | undefined] => {\n const [modules, error] = useModulesFromNode(filter, 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<ArchivistInstance[]>((prev, mod) => {\n if (isArchivistInstance(mod)) {\n prev.push(mod)\n }\n return prev\n }, []),\n undefined,\n ]\n : [modules, error]\n}\n","import type { ArchivistInstance } from '@xyo-network/archivist-model'\nimport { isArchivistInstance } from '@xyo-network/archivist-model'\nimport type { WeakModuleFromNodeConfig } from '@xyo-network/react-node'\nimport { useWeakModuleFromNode } from '@xyo-network/react-node'\n\nexport const useWeakArchivistFromNode = (\n nameOrAddressOrInstance?: string | ArchivistInstance,\n config?: WeakModuleFromNodeConfig,\n): [WeakRef<ArchivistInstance> | undefined, Error | undefined] => {\n return useWeakModuleFromNode<ArchivistInstance>(nameOrAddressOrInstance, { identity: isArchivistInstance, ...config })\n}\n","import { exists } from '@xylabs/exists'\nimport type { ArchivistInstance } from '@xyo-network/archivist-model'\nimport { asArchivistInstance } from '@xyo-network/archivist-model'\nimport type { ModuleFilter } from '@xyo-network/module-model'\nimport type { ModuleFromNodeConfig } from '@xyo-network/react-node'\nimport { useWeakModulesFromNode } from '@xyo-network/react-node'\n\nexport const useWeakArchivistsFromNode = (\n filter?: ModuleFilter,\n config?: ModuleFromNodeConfig,\n): [WeakRef<ArchivistInstance>[] | null | undefined, Error | undefined] => {\n const [modules, error] = useWeakModulesFromNode(filter, config)\n if (error) {\n return [null, error]\n }\n return [\n modules\n ?.map((mod) => {\n const instance = asArchivistInstance(mod?.deref())\n if (instance) {\n return new WeakRef(instance)\n }\n })\n .filter(exists) ?? [],\n undefined,\n ]\n}\n","import { usePromise } from '@xylabs/react-promise'\nimport type { ArchivistInstance } from '@xyo-network/archivist-model'\nimport { useRefresh } from '@xyo-network/react-module'\nimport { useState } from 'react'\n\nexport const useArchivistAll = (archivist: ArchivistInstance) => {\n const [error, setError] = useState<Error>()\n const [enabled, refresh] = useRefresh()\n\n const payloads = usePromise(async () => {\n try {\n if (enabled) {\n return await archivist?.all?.()\n }\n } catch (ex) {\n const error = ex as Error\n setError(error)\n }\n }, [archivist, enabled])\n\n return [payloads, error, refresh]\n}\n","import type { Hash } from '@xylabs/hex'\nimport { usePromise } from '@xylabs/react-promise'\nimport type { ArchivistInstance } from '@xyo-network/archivist-model'\nimport type { Payload, WithMeta } from '@xyo-network/payload-model'\nimport type { RefreshCallback } from '@xyo-network/react-module'\nimport { useRefresh } from '@xyo-network/react-module'\n\nexport const useArchivistGet = <T extends Payload = Payload>(\n archivist?: ArchivistInstance | null,\n hashes?: Hash[],\n): [T[] | undefined, Error | undefined, RefreshCallback] => {\n const [enabled, refresh] = useRefresh()\n\n const [payloads, error] = usePromise(async () => {\n if (enabled && archivist && hashes) {\n return (await archivist.get(hashes)) as WithMeta<T>[]\n }\n }, [archivist, hashes, enabled])\n\n return [payloads, error, refresh]\n}\n","import { usePromise } from '@xylabs/react-promise'\nimport type { ArchivistInstance } from '@xyo-network/archivist-model'\nimport { useRefresh } from '@xyo-network/react-module'\nimport { useState } from 'react'\n\nexport const useWeakArchivistAll = (archivist: WeakRef<ArchivistInstance>) => {\n const [error, setError] = useState<Error>()\n const [enabled, refresh] = useRefresh()\n\n const payloads = usePromise(async () => {\n try {\n if (enabled) {\n return await archivist?.deref()?.all?.()\n }\n } catch (ex) {\n const error = ex as Error\n setError(error)\n }\n }, [archivist, enabled])\n\n return [payloads, error, refresh]\n}\n","import type { Hash } from '@xylabs/hex'\nimport { usePromise } from '@xylabs/react-promise'\nimport type { ArchivistInstance } from '@xyo-network/archivist-model'\nimport type { Payload, WithMeta } from '@xyo-network/payload-model'\nimport type { RefreshCallback } from '@xyo-network/react-module'\nimport { useRefresh } from '@xyo-network/react-module'\n\nexport const useWeakArchivistGet = <T extends Payload = Payload>(\n archivist?: WeakRef<ArchivistInstance> | null,\n hashes?: Hash[],\n): [T[] | undefined, Error | undefined, RefreshCallback] => {\n const [enabled, refresh] = useRefresh()\n\n const [payloads, error] = usePromise(async () => {\n const archivistInstance = archivist?.deref()\n if (enabled && archivistInstance && hashes) {\n return (await archivistInstance.get(hashes)) as WithMeta<T>[]\n }\n }, [archivist, hashes, enabled])\n\n return [payloads, error, refresh]\n}\n"],"mappings":";;;;AACA,SAASA,YAAY;AAGrB,SAASC,yBAAyB;AAClC,OAAOC,YAAW;;;ACJlB,SAASC,kBAAAA,uBAAsB;AAC/B,SAASC,mBAAmB;AAE5B,SAASC,qBAAqB;AAE9B,SAASC,yBAAyB;AAClC,SAASC,iBAAiB;AAC1B,OAAOC,UAASC,YAAAA,iBAAgB;;;ACRhC,SAASC,UAAUC,kBAAkB;AACrC,OAAOC,WAAW;AAOX,IAAMC,kBAAgD,wBAAC,EAAEC,eAAeC,iBAAgB,MAC7F,sBAAA,cAAA,MAAA,UAAA,MACGA,kBAAkBC,IAAI,CAACC,YAAAA;AACtB,SACE,sBAAA,cAACC,UAAAA;IAASC,KAAKF;KACb,sBAAA,cAACG,YAAAA;IAAWC,SAAQ;KACjBP,eAAc,KAEd,KACD,sBAAA,cAACM,YAAAA;IAAWC,SAAQ;IAAUC,IAAI;MAAEC,IAAI;IAAI;KACzCN,OAAAA,CAAAA,CAAAA;AAKX,CAAA,CAAA,GAfyD;;;ACR7D,SAASO,qBAAqBC,6BAA6B;AAC3D,SAASC,UAAUC,YAAYC,MAAMC,OAAOC,cAAAA,mBAAkB;AAE9D,SAASC,eAAe;AAExB,OAAOC,UAASC,gBAAgB;AAQzB,IAAMC,mBAAoD,wBAAC,EAAEC,QAAQ,GAAGC,MAAAA,MAAO;AACpF,QAAM,CAACC,yBAAyBC,0BA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,QAAID,QAAAA,GAAW;AACbf,kBAAYD,SAAAA;IACd;EACF,GACA;IAACF;IAAWK;GAAQ;AAGtB,SACE,gBAAAe,OAAA,cAACC,UAAYtB,OACX,gBAAAqB,OAAA,cAACE,aAAAA,MAAY,aAAapB,WAAWA,SAASqB,SAAS,GAAA,EAAK,GAC5D,gBAAAH,OAAA,cAACI,aAAAA,MACC,gBAAAJ,OAAA,cAACK,UAAAA;IAASC,UAAUxB,UAAUqB,WAAW,KAAK,CAACvB,aAAa,CAACO;IAAiBoB,SAAS,6BAAM3B,WAAWa,MAAAA,GAASe,SAAAA,GAA1B;KAAsC,QAAA,GAG7H,gBAAAR,OAAA,cAACK,UAAAA;IAASC,UAAU,CAAC1B,aAAa,CAACS;IAAgBkB,SAAS,6BAAM3B,WAAWa,MAAAA,GAASgB,QAAAA,GAA1B;KAAqC,OAAA,GAGjG,gBAAAT,OAAA,cAACK,UAAAA;IACCC,UAAU,CAAC1B;IACX2B,SAAS,6BAAA;AACPrB,iBAAWD,UAAU,CAAA;IACvB,GAFS;KAGV,SAAA,CAAA,CAAA;AAMT,GAnD4D;","names":["Card","ModuleCardActions","React","useAsyncEffect","FlexGrowRow","ModuleWrapper","ModuleCardContent","useWallet","React","useState","ListItem","Typography","React","ArchivistParent","archivistType","parentArchivists","map","address","ListItem","key","Typography","variant","sx","ml","ArrowRightRounded","ArrowRightRoundedIcon","Collapse","IconButton","List","Paper","Typography","FlexCol","React","useState","ArchivistParents","config","props","parentArchivistCollapse","setParentArchivistCollapse","useState","commit","read","write","parents","React","FlexCol","alignItems","span","onClick","Typography","variant","sx","cursor","display","IconButton","size","ArrowRightRoundedIcon","rotate","transition","Collapse","in","Paper","elevation","List","ArchivistParent","archivistType","parentArchivists","Badge","Tooltip","FlexRow","React","BsFileEarmarkCode","VscOrganization","VscSymbolMethod","VscSymbolNamespace","ArchivistStats","addresses","boundWitnesses","payloads","schemas","React","FlexRow","gap","mr","length","Tooltip","title","Badge","badgeContent","color","VscSymbolNamespace","size","VscSymbolMethod","Object","entries","BsFileEarmarkCode","VscOrganization","useAsyncEffect","ArchivistAllQuerySchema","asBoundWitness","BoundWitnessSchema","React","useCallback","useEffect","useMemo","useState","MemoryArchivistsStats","archivist","all","setAll","useState","getAll","useCallback","useEffect","listeners","queries","includes","ArchivistAllQuerySchema","insertListener","on","push","clearListener","listener","useAsyncEffect","payloads","useMemo","filter","payload","schema","BoundWitnessSchema","boundWitnesses","addresses","reduce","prev","w","asBoundWitness","address","schemas","React","ArchivistStats","ArchivistCardContent","children","mod","props","config","setConfig","useState","wallet","useWallet","useAsyncEffect","mounted","wrapper","ModuleWrapper","wrap","payloads","state","undefined","React","ModuleCardContent","FlexGrowRow","flexWrap","justifyContent","gap","ArchivistParents","MemoryArchivistConfigSchema","ModuleCardHeader","React","useMemo","ArchivistStats","archivist","config","schema","MemoryArchivistConfigSchema","React","MemoryArchivistsStats","ArchivistCardHeader","title","mod","props","Stats","useMemo","ModuleCardHeader","name","action","ArchivistCard","children","mod","props","React","Card","ArchivistCardHeader","ArchivistCardContent","ModuleCardActions","ButtonGroup","Typography","useAsyncEffect","ButtonEx","FlexCol","ArchivistClearQuerySchema","ArchivistCommitQuerySchema","QueryBoundWitnessBuilder","React","useState","asArchivistInstance","useModuleFromNode","useArchivistFromNode","nameOrAddressOrInstance","config","mod","error","useModuleFromNode","instance","asArchivistInstance","Error","schema","name","address","console","message","undefined","isArchivistInstance","useModulesFromNode","useArchivistsFromNode","filter","config","modules","error","useModulesFromNode","reduce","prev","mod","isArchivistInstance","push","undefined","isArchivistInstance","useWeakModuleFromNode","useWeakArchivistFromNode","nameOrAddressOrInstance","config","useWeakModuleFromNode","identity","isArchivistInstance","exists","asArchivistInstance","useWeakModulesFromNode","useWeakArchivistsFromNode","filter","config","modules","error","useWeakModulesFromNode","map","mod","instance","asArchivistInstance","deref","WeakRef","exists","undefined","usePromise","useRefresh","useState","useArchivistAll","archivist","error","setError","useState","enabled","refresh","useRefresh","payloads","usePromise","all","ex","usePromise","useRefresh","useArchivistGet","archivist","hashes","enabled","refresh","useRefresh","payloads","error","usePromise","get","usePromise","useRefresh","useState","useWeakArchivistAll","archivist","error","setError","useState","enabled","refresh","useRefresh","payloads","usePromise","deref","all","ex","usePromise","useRefresh","useWeakArchivistGet","archivist","hashes","enabled","refresh","useRefresh","payloads","error","usePromise","archivistInstance","deref","get","testQueryCommit","schema","ArchivistCommitQuerySchema","testQueryCommitBoundWitnessBuilder","QueryBoundWitnessBuilder","query","testQueryClear","ArchivistClearQuerySchema","testQueryClearBoundWitnessBuilder","ArchivistDetails","address","props","archivist","useWeakArchivistFromNode","payloads","setPayloads","useState","refresh","setRefresh","queryableCommit","setQueryableCommit","queryableClear","setQueryableClear","useAsyncEffect","instance","deref","commitBW","build","clearBW","queryable","mounted","all","React","FlexCol","Typography","length","ButtonGroup","ButtonEx","disabled","onClick","commit","clear"]}
package/package.json CHANGED
@@ -7,26 +7,26 @@
7
7
  },
8
8
  "bugs": {
9
9
  "email": "support@xyo.network",
10
- "url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/issues"
10
+ "url": "git+https://github.com/XYOracleNetwork/sdk-xyo-react-js/issues"
11
11
  },
12
12
  "dependencies": {
13
- "@xylabs/exists": "^4.0.0",
14
- "@xylabs/hex": "^4.0.0",
15
- "@xylabs/react-async-effect": "^4.0.0",
16
- "@xylabs/react-button": "^4.0.0",
17
- "@xylabs/react-flexbox": "^4.0.0",
18
- "@xylabs/react-promise": "^4.0.0",
19
- "@xyo-network/archivist-memory": "^3.0.1",
20
- "@xyo-network/archivist-model": "^3.0.1",
21
- "@xyo-network/boundwitness-builder": "^3.0.1",
22
- "@xyo-network/boundwitness-model": "^3.0.1",
23
- "@xyo-network/module-events": "^3.0.1",
24
- "@xyo-network/module-model": "^3.0.1",
25
- "@xyo-network/module-wrapper": "^3.0.1",
26
- "@xyo-network/payload-model": "^3.0.1",
27
- "@xyo-network/react-module": "^3.0.0",
28
- "@xyo-network/react-node": "^3.0.0",
29
- "@xyo-network/react-wallet": "^3.0.0",
13
+ "@xylabs/exists": "^4.0.2",
14
+ "@xylabs/hex": "^4.0.2",
15
+ "@xylabs/react-async-effect": "^4.0.3",
16
+ "@xylabs/react-button": "^4.0.3",
17
+ "@xylabs/react-flexbox": "^4.0.3",
18
+ "@xylabs/react-promise": "^4.0.3",
19
+ "@xyo-network/archivist-memory": "^3.0.3",
20
+ "@xyo-network/archivist-model": "^3.0.3",
21
+ "@xyo-network/boundwitness-builder": "^3.0.3",
22
+ "@xyo-network/boundwitness-model": "^3.0.3",
23
+ "@xyo-network/module-events": "^3.0.3",
24
+ "@xyo-network/module-model": "^3.0.3",
25
+ "@xyo-network/module-wrapper": "^3.0.3",
26
+ "@xyo-network/payload-model": "^3.0.3",
27
+ "@xyo-network/react-module": "^3.0.2",
28
+ "@xyo-network/react-node": "^3.0.2",
29
+ "@xyo-network/react-wallet": "^3.0.2",
30
30
  "react-icons": "^5.3.0"
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": "^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.1",
45
- "@xyo-network/node-memory": "^3.0.1",
42
+ "@xylabs/ts-scripts-yarn3": "^4.0.0-rc.20",
43
+ "@xylabs/tsconfig-react": "^4.0.0-rc.20",
44
+ "@xyo-network/account": "^3.0.3",
45
+ "@xyo-network/node-memory": "^3.0.3",
46
46
  "typescript": "^5.5.4"
47
47
  },
48
48
  "docs": "dist/docs.json",
@@ -71,7 +71,7 @@
71
71
  },
72
72
  "repository": {
73
73
  "type": "git",
74
- "url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js.git"
74
+ "url": "git+https://github.com/XYOracleNetwork/sdk-xyo-react-js.git"
75
75
  },
76
76
  "scripts": {
77
77
  "lint-pkg": "npmPkgJsonLint .",
@@ -79,6 +79,6 @@
79
79
  },
80
80
  "sideEffects": false,
81
81
  "types": "dist/browser/index.d.ts",
82
- "version": "3.0.0",
82
+ "version": "3.0.2",
83
83
  "type": "module"
84
84
  }
@@ -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'
@@ -1,6 +1,8 @@
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'
@@ -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,9 +1,10 @@
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
 
@@ -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'
@@ -1,7 +1,8 @@
1
1
  import { ArrowRightRounded as ArrowRightRoundedIcon } from '@mui/icons-material'
2
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'
3
+ import type { FlexBoxProps } from '@xylabs/react-flexbox'
4
+ import { FlexCol } from '@xylabs/react-flexbox'
5
+ import type { ArchivistConfig } from '@xyo-network/archivist-model'
5
6
  import React, { useState } from 'react'
6
7
 
7
8
  import { ArchivistParent } from './ArchivistParent.tsx'
@@ -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
 
@@ -1,6 +1,6 @@
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'
@@ -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'
@@ -1,8 +1,9 @@
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'
5
+ import type { EventUnsubscribeFunction } from '@xyo-network/module-events'
6
+ import type { Payload } from '@xyo-network/payload-model'
6
7
  import React, { useCallback, useEffect, useMemo, useState } from 'react'
7
8
 
8
9
  import { ArchivistStats } from './ArchivistStats.tsx'
@@ -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
 
@@ -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,4 +1,4 @@
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
4
  browser: {