@xyo-network/react-payload-diviner 8.0.0 → 8.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/index.mjs +1 -1
- package/dist/browser/index.mjs.map +7 -1
- package/package.json +25 -25
package/dist/browser/index.mjs
CHANGED
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/contexts/DivinedPayload/Context.ts","../../src/contexts/DivinedPayload/Provider.tsx","../../src/contexts/PayloadDiviner/Context.ts","../../src/contexts/PayloadDiviner/Provider.tsx","../../src/contexts/PayloadDiviner/use.ts","../../src/contexts/DivinedPayload/use.ts"],"sourcesContent":["import { createContextEx } from '@xylabs/react-shared'\n\nimport type { DivinedPayloadState } from './State.ts'\n\nexport const DivinedPayloadContext = createContextEx<DivinedPayloadState>()\n","import { ErrorRender } from '@xylabs/react-error'\nimport { ModuleErrorSchema } from '@xyo-network/payload-model'\nimport { useBuildHuri } from '@xyo-network/react-payload-huri'\nimport type { PropsWithChildren } from 'react'\nimport React, { useMemo } from 'react'\nimport { useParams, useSearchParams } from 'react-router-dom'\n\nimport { useDivinePayload } from '../PayloadDiviner/index.ts'\nimport { DivinedPayloadContext } from './Context.ts'\nimport type { DivinedPayloadState } from './State.ts'\nimport { useDivinedPayload } from './use.ts'\n\nexport interface DivinedPayloadProviderProps extends PropsWithChildren {\n hash?: string\n}\n\nexport const DivinedPayloadProvider: React.FC<DivinedPayloadProviderProps> = ({ children, hash }) => {\n const { hash: hashParam } = useParams()\n\n const huriFromHashParam = useBuildHuri(hashParam)\n\n const [params] = useSearchParams()\n const huriSearchParameter = params.get('huri')\n const decodedHuriParam = decodeURIComponent(huriSearchParameter ?? '')\n const huriUri = hash ?? decodedHuriParam ?? huriFromHashParam\n\n const [payload, setPayload, payloadError] = useDivinePayload(huriUri)\n\n const value: DivinedPayloadState = useMemo(() => ({\n payload, payloadError, provided: true, setPayload,\n }), [payload, payloadError, setPayload])\n\n return (\n <DivinedPayloadContext value={value}>\n {children}\n </DivinedPayloadContext>\n )\n}\n\nexport const DivinedPayloadWithHandleInner: React.FC<PropsWithChildren> = ({ children }) => {\n const { payloadError } = useDivinedPayload()\n\n return (\n <ErrorRender\n error={payloadError\n ? {\n message: payloadError.message, schema: ModuleErrorSchema, sources: [],\n }\n : undefined}\n errorContext=\"Divined Payload Provider\"\n >\n {children}\n </ErrorRender>\n )\n}\n\nexport const DivinedPayloadWithHandleProvider: React.FC<DivinedPayloadProviderProps> = ({ children, ...props }) => {\n return (\n <DivinedPayloadProvider {...props}>\n <DivinedPayloadWithHandleInner>{children}</DivinedPayloadWithHandleInner>\n </DivinedPayloadProvider>\n )\n}\n","import { createContextEx } from '@xylabs/react-shared'\n\nimport type { PayloadDivinerState } from './State.ts'\n\nconst PayloadDivinerContext = createContextEx<PayloadDivinerState>()\n\nexport { PayloadDivinerContext }\n","import { useResetState } from '@xylabs/react-hooks'\nimport type { ContextExProviderProps } from '@xylabs/react-shared'\nimport type { PayloadDiviner } from '@xyo-network/diviner-payload-abstract'\nimport React, { useMemo } from 'react'\n\nimport { PayloadDivinerContext } from './Context.ts'\nimport type { PayloadDivinerState } from './State.ts'\n\nexport type PayloadDivinerProviderProps = ContextExProviderProps<{\n /** Required */\n diviner?: PayloadDiviner\n}>\n\nexport const PayloadDivinerProvider: React.FC<PayloadDivinerProviderProps> = ({\n diviner: divinerProp, required = false, children,\n}) => {\n const [diviner, setDiviner] = useResetState<PayloadDiviner | undefined>(divinerProp)\n\n const value: PayloadDivinerState = useMemo(() => ({\n diviner: diviner === divinerProp ? diviner : undefined, provided: true, setDiviner,\n }), [diviner, divinerProp, setDiviner])\n\n return (\n <PayloadDivinerContext\n value={value}\n >\n {diviner\n ? children\n : required\n ? null\n : children}\n </PayloadDivinerContext>\n )\n}\n","import { useAsyncEffect } from '@xylabs/react-async-effect'\nimport { useContextEx } from '@xylabs/react-shared'\nimport { exists } from '@xylabs/sdk-js'\nimport type { HuriPayload } from '@xyo-network/diviner-huri'\nimport { HuriSchema } from '@xyo-network/diviner-huri'\nimport type { Payload } from '@xyo-network/payload-model'\nimport type { Dispatch } from 'react'\nimport { useEffect, useState } from 'react'\n\nimport { PayloadDivinerContext } from './Context.ts'\n\nexport const usePayloadDiviner = (required = false) => {\n return useContextEx(PayloadDivinerContext, 'PayloadDiviner', required)\n}\n\nexport const useDivinePayload = <T extends Payload = Payload>(\n huri?: string,\n): [T | undefined | null, Dispatch<T | null | undefined>, Error | undefined] => {\n const { diviner } = usePayloadDiviner()\n const [payload, setPayload] = useState<T | null>()\n const [error, setError] = useState<Error>()\n\n useEffect(() => {\n // we do this to clear the payload when the diviner changes\n if (diviner) {\n // eslint-disable-next-line react-hooks/set-state-in-effect, react-x/set-state-in-effect\n setPayload(undefined)\n }\n }, [diviner])\n\n useAsyncEffect(\n async (mounted) => {\n if (huri && diviner && payload === undefined) {\n try {\n const huriPayload: HuriPayload = { huri: [huri], schema: HuriSchema }\n const [payload] = (await diviner?.divine([huriPayload])) ?? []\n if (mounted()) {\n setPayload((payload as T) || null)\n }\n } catch (ex) {\n if (mounted()) {\n setError(ex as Error)\n }\n }\n }\n },\n [diviner, huri, payload],\n )\n\n return [payload, setPayload, error]\n}\n\nexport const useDivinePayloads = <T extends Payload = Payload>(\n huriList: string[],\n): [(T | null)[] | undefined, Dispatch<(T | null)[] | undefined>, Error[] | undefined] => {\n const { diviner } = usePayloadDiviner()\n const [payloads, setPayloads] = useState<(T | null)[]>()\n const [errors, setErrors] = useState<Error[]>()\n\n useEffect(() => {\n if (diviner) {\n // clear payloads when diviner changes\n // eslint-disable-next-line react-hooks/set-state-in-effect, react-x/set-state-in-effect\n setPayloads(undefined)\n }\n }, [diviner])\n\n useAsyncEffect(\n async (mounted) => {\n console.log(`huriList: ${JSON.stringify(huriList, null, 2)}`)\n const payloads = await Promise.allSettled(\n huriList.map(async (huri) => {\n const huriPayload: HuriPayload = { huri: [huri], schema: HuriSchema }\n const [payload] = (await diviner?.divine([huriPayload])) ?? []\n return payload\n }),\n )\n if (mounted()) {\n setPayloads([...payloads.values()].map(value => (value.status === 'rejected' ? null : value.value)) as (T | null)[])\n setErrors(\n (\n [...payloads.values()].map(value => (value.status === 'rejected' ? new Error('divine failed', { cause: value.reason }) : undefined))\n ).filter(exists),\n )\n if (mounted()) {\n setPayloads([...payloads.values()].map(value => (value.status === 'rejected' ? null : value.value)) as (T | null)[])\n setErrors(\n (\n [...payloads.values()].map(value => (value.status === 'rejected' ? new Error('divine failed', { cause: value.reason }) : undefined))\n ).filter(exists),\n )\n }\n }\n },\n [diviner, huriList, payloads],\n )\n\n return [payloads, setPayloads, errors]\n}\n","import { useContextEx } from '@xylabs/react-shared'\n\nimport { DivinedPayloadContext } from './Context.ts'\n\nexport const useDivinedPayload = () => useContextEx(DivinedPayloadContext, 'DivinedPayload', true)\n"],"mappings":";AAAA,SAAS,uBAAuB;AAIzB,IAAM,wBAAwB,gBAAqC;;;ACJ1E,SAAS,mBAAmB;AAC5B,SAAS,yBAAyB;AAClC,SAAS,oBAAoB;AAE7B,SAAgB,WAAAA,gBAAe;AAC/B,SAAS,WAAW,uBAAuB;;;ACL3C,SAAS,mBAAAC,wBAAuB;AAIhC,IAAM,wBAAwBA,iBAAqC;;;ACJnE,SAAS,qBAAqB;AAG9B,SAAgB,eAAe;AAoB3B;AAVG,IAAM,yBAAgE,CAAC;AAAA,EAC5E,SAAS;AAAA,EAAa,WAAW;AAAA,EAAO;AAC1C,MAAM;AACJ,QAAM,CAAC,SAAS,UAAU,IAAI,cAA0C,WAAW;AAEnF,QAAM,QAA6B,QAAQ,OAAO;AAAA,IAChD,SAAS,YAAY,cAAc,UAAU;AAAA,IAAW,UAAU;AAAA,IAAM;AAAA,EAC1E,IAAI,CAAC,SAAS,aAAa,UAAU,CAAC;AAEtC,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MAEC,oBACG,WACA,WACE,OACA;AAAA;AAAA,EACR;AAEJ;;;ACjCA,SAAS,s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G,QAAM,EAAE,MAAM,UAAU,IAAI,UAAU;AAEtC,QAAM,oBAAoB,aAAa,SAAS;AAEhD,QAAM,CAAC,MAAM,IAAI,gBAAgB;AACjC,QAAM,sBAAsB,OAAO,IAAI,MAAM;AAC7C,QAAM,mBAAmB,mBAAmB,uBAAuB,EAAE;AACrE,QAAM,UAAU,QAAQ,oBAAoB;AAE5C,QAAM,CAAC,SAAS,YAAY,YAAY,IAAI,iBAAiB,OAAO;AAEpE,QAAM,QAA6BC,SAAQ,OAAO;AAAA,IAChD;AAAA,IAAS;AAAA,IAAc,UAAU;AAAA,IAAM;AAAA,EACzC,IAAI,CAAC,SAAS,cAAc,UAAU,CAAC;AAEvC,SACE,gBAAAD,KAAC,yBAAsB,OACpB,UACH;AAEJ;AAEO,IAAM,gCAA6D,CAAC,EAAE,SAAS,MAAM;AAC1F,QAAM,EAAE,aAAa,IAAI,kBAAkB;AAE3C,SACE,gBAAAA;AAAA,IAAC;AAAA;AAAA,MACC,OAAO,eACH;AAAA,QACE,SAAS,aAAa;AAAA,QAAS,QAAQ;AAAA,QAAmB,SAAS,CAAC;AAAA,MACtE,IACA;AAAA,MACJ,cAAa;AAAA,MAEZ;AAAA;AAAA,EACH;AAEJ;AAEO,IAAM,mCAA0E,CAAC,EAAE,UAAU,GAAG,MAAM,MAAM;AACjH,SACE,gBAAAA,KAAC,0BAAwB,GAAG,OAC1B,0BAAAA,KAAC,iCAA+B,UAAS,GAC3C;AAEJ;","names":["useMemo","createContextEx","payload","payloads","useContextEx","useContextEx","jsx","useMemo"]}
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/contexts/DivinedPayload/Context.ts", "../../src/contexts/DivinedPayload/Provider.tsx", "../../src/contexts/PayloadDiviner/Context.ts", "../../src/contexts/PayloadDiviner/Provider.tsx", "../../src/contexts/PayloadDiviner/use.ts", "../../src/contexts/DivinedPayload/use.ts"],
|
|
4
|
+
"sourcesContent": ["import { createContextEx } from '@xylabs/react-shared'\n\nimport type { DivinedPayloadState } from './State.ts'\n\nexport const DivinedPayloadContext = createContextEx<DivinedPayloadState>()\n", "import { ErrorRender } from '@xylabs/react-error'\nimport { ModuleErrorSchema } from '@xyo-network/payload-model'\nimport { useBuildHuri } from '@xyo-network/react-payload-huri'\nimport type { PropsWithChildren } from 'react'\nimport React, { useMemo } from 'react'\nimport { useParams, useSearchParams } from 'react-router-dom'\n\nimport { useDivinePayload } from '../PayloadDiviner/index.ts'\nimport { DivinedPayloadContext } from './Context.ts'\nimport type { DivinedPayloadState } from './State.ts'\nimport { useDivinedPayload } from './use.ts'\n\nexport interface DivinedPayloadProviderProps extends PropsWithChildren {\n hash?: string\n}\n\nexport const DivinedPayloadProvider: React.FC<DivinedPayloadProviderProps> = ({ children, hash }) => {\n const { hash: hashParam } = useParams()\n\n const huriFromHashParam = useBuildHuri(hashParam)\n\n const [params] = useSearchParams()\n const huriSearchParameter = params.get('huri')\n const decodedHuriParam = decodeURIComponent(huriSearchParameter ?? '')\n const huriUri = hash ?? decodedHuriParam ?? huriFromHashParam\n\n const [payload, setPayload, payloadError] = useDivinePayload(huriUri)\n\n const value: DivinedPayloadState = useMemo(() => ({\n payload, payloadError, provided: true, setPayload,\n }), [payload, payloadError, setPayload])\n\n return (\n <DivinedPayloadContext value={value}>\n {children}\n </DivinedPayloadContext>\n )\n}\n\nexport const DivinedPayloadWithHandleInner: React.FC<PropsWithChildren> = ({ children }) => {\n const { payloadError } = useDivinedPayload()\n\n return (\n <ErrorRender\n error={payloadError\n ? {\n message: payloadError.message, schema: ModuleErrorSchema, sources: [],\n }\n : undefined}\n errorContext=\"Divined Payload Provider\"\n >\n {children}\n </ErrorRender>\n )\n}\n\nexport const DivinedPayloadWithHandleProvider: React.FC<DivinedPayloadProviderProps> = ({ children, ...props }) => {\n return (\n <DivinedPayloadProvider {...props}>\n <DivinedPayloadWithHandleInner>{children}</DivinedPayloadWithHandleInner>\n </DivinedPayloadProvider>\n )\n}\n", "import { createContextEx } from '@xylabs/react-shared'\n\nimport type { PayloadDivinerState } from './State.ts'\n\nconst PayloadDivinerContext = createContextEx<PayloadDivinerState>()\n\nexport { PayloadDivinerContext }\n", "import { useResetState } from '@xylabs/react-hooks'\nimport type { ContextExProviderProps } from '@xylabs/react-shared'\nimport type { PayloadDiviner } from '@xyo-network/diviner-payload-abstract'\nimport React, { useMemo } from 'react'\n\nimport { PayloadDivinerContext } from './Context.ts'\nimport type { PayloadDivinerState } from './State.ts'\n\nexport type PayloadDivinerProviderProps = ContextExProviderProps<{\n /** Required */\n diviner?: PayloadDiviner\n}>\n\nexport const PayloadDivinerProvider: React.FC<PayloadDivinerProviderProps> = ({\n diviner: divinerProp, required = false, children,\n}) => {\n const [diviner, setDiviner] = useResetState<PayloadDiviner | undefined>(divinerProp)\n\n const value: PayloadDivinerState = useMemo(() => ({\n diviner: diviner === divinerProp ? diviner : undefined, provided: true, setDiviner,\n }), [diviner, divinerProp, setDiviner])\n\n return (\n <PayloadDivinerContext\n value={value}\n >\n {diviner\n ? children\n : required\n ? null\n : children}\n </PayloadDivinerContext>\n )\n}\n", "import { useAsyncEffect } from '@xylabs/react-async-effect'\nimport { useContextEx } from '@xylabs/react-shared'\nimport { exists } from '@xylabs/sdk-js'\nimport type { HuriPayload } from '@xyo-network/diviner-huri'\nimport { HuriSchema } from '@xyo-network/diviner-huri'\nimport type { Payload } from '@xyo-network/payload-model'\nimport type { Dispatch } from 'react'\nimport { useEffect, useState } from 'react'\n\nimport { PayloadDivinerContext } from './Context.ts'\n\nexport const usePayloadDiviner = (required = false) => {\n return useContextEx(PayloadDivinerContext, 'PayloadDiviner', required)\n}\n\nexport const useDivinePayload = <T extends Payload = Payload>(\n huri?: string,\n): [T | undefined | null, Dispatch<T | null | undefined>, Error | undefined] => {\n const { diviner } = usePayloadDiviner()\n const [payload, setPayload] = useState<T | null>()\n const [error, setError] = useState<Error>()\n\n useEffect(() => {\n // we do this to clear the payload when the diviner changes\n if (diviner) {\n // eslint-disable-next-line react-hooks/set-state-in-effect, react-x/set-state-in-effect\n setPayload(undefined)\n }\n }, [diviner])\n\n useAsyncEffect(\n async (mounted) => {\n if (huri && diviner && payload === undefined) {\n try {\n const huriPayload: HuriPayload = { huri: [huri], schema: HuriSchema }\n const [payload] = (await diviner?.divine([huriPayload])) ?? []\n if (mounted()) {\n setPayload((payload as T) || null)\n }\n } catch (ex) {\n if (mounted()) {\n setError(ex as Error)\n }\n }\n }\n },\n [diviner, huri, payload],\n )\n\n return [payload, setPayload, error]\n}\n\nexport const useDivinePayloads = <T extends Payload = Payload>(\n huriList: string[],\n): [(T | null)[] | undefined, Dispatch<(T | null)[] | undefined>, Error[] | undefined] => {\n const { diviner } = usePayloadDiviner()\n const [payloads, setPayloads] = useState<(T | null)[]>()\n const [errors, setErrors] = useState<Error[]>()\n\n useEffect(() => {\n if (diviner) {\n // clear payloads when diviner changes\n // eslint-disable-next-line react-hooks/set-state-in-effect, react-x/set-state-in-effect\n setPayloads(undefined)\n }\n }, [diviner])\n\n useAsyncEffect(\n async (mounted) => {\n console.log(`huriList: ${JSON.stringify(huriList, null, 2)}`)\n const payloads = await Promise.allSettled(\n huriList.map(async (huri) => {\n const huriPayload: HuriPayload = { huri: [huri], schema: HuriSchema }\n const [payload] = (await diviner?.divine([huriPayload])) ?? []\n return payload\n }),\n )\n if (mounted()) {\n setPayloads([...payloads.values()].map(value => (value.status === 'rejected' ? null : value.value)) as (T | null)[])\n setErrors(\n (\n [...payloads.values()].map(value => (value.status === 'rejected' ? new Error('divine failed', { cause: value.reason }) : undefined))\n ).filter(exists),\n )\n if (mounted()) {\n setPayloads([...payloads.values()].map(value => (value.status === 'rejected' ? null : value.value)) as (T | null)[])\n setErrors(\n (\n [...payloads.values()].map(value => (value.status === 'rejected' ? new Error('divine failed', { cause: value.reason }) : undefined))\n ).filter(exists),\n )\n }\n }\n },\n [diviner, huriList, payloads],\n )\n\n return [payloads, setPayloads, errors]\n}\n", "import { useContextEx } from '@xylabs/react-shared'\n\n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,SACE,gBAAAD,KAAC,yBAAsB,OACpB,UACH;AAEJ;AAEO,IAAM,gCAA6D,CAAC,EAAE,SAAS,MAAM;AAC1F,QAAM,EAAE,aAAa,IAAI,kBAAkB;AAE3C,SACE,gBAAAA;AAAA,IAAC;AAAA;AAAA,MACC,OAAO,eACH;AAAA,QACE,SAAS,aAAa;AAAA,QAAS,QAAQ;AAAA,QAAmB,SAAS,CAAC;AAAA,MACtE,IACA;AAAA,MACJ,cAAa;AAAA,MAEZ;AAAA;AAAA,EACH;AAEJ;AAEO,IAAM,mCAA0E,CAAC,EAAE,UAAU,GAAG,MAAM,MAAM;AACjH,SACE,gBAAAA,KAAC,0BAAwB,GAAG,OAC1B,0BAAAA,KAAC,iCAA+B,UAAS,GAC3C;AAEJ;",
|
|
6
|
+
"names": ["useMemo", "createContextEx", "payload", "payloads", "useContextEx", "useContextEx", "jsx", "useMemo"]
|
|
7
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/react-payload-diviner",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.1",
|
|
4
4
|
"description": "Common React library for all XYO projects that use React",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"xyo",
|
|
@@ -41,29 +41,29 @@
|
|
|
41
41
|
"README.md"
|
|
42
42
|
],
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@xyo-network/react-payload-huri": "~8.0.
|
|
44
|
+
"@xyo-network/react-payload-huri": "~8.0.1"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@bitauth/libauth": "~3.0.0",
|
|
48
|
-
"@mui/icons-material": "
|
|
49
|
-
"@mui/material": "
|
|
48
|
+
"@mui/icons-material": "^9.0.1",
|
|
49
|
+
"@mui/material": "^9.0.1",
|
|
50
50
|
"@opentelemetry/api": "^1.9.1",
|
|
51
51
|
"@opentelemetry/sdk-trace-base": "^2.7.1",
|
|
52
52
|
"@scure/base": "~2.2.0",
|
|
53
53
|
"@types/react": "^19.2.14",
|
|
54
|
-
"@xylabs/pixel": "~5.1.
|
|
55
|
-
"@xylabs/react-async-effect": "~8.0",
|
|
56
|
-
"@xylabs/react-error": "~8.0",
|
|
57
|
-
"@xylabs/react-hooks": "~8.0",
|
|
58
|
-
"@xylabs/react-promise": "~8.0",
|
|
59
|
-
"@xylabs/react-select": "~8.0",
|
|
60
|
-
"@xylabs/react-shared": "~8.0",
|
|
61
|
-
"@xylabs/sdk-js": "^5.1.
|
|
62
|
-
"@xylabs/threads": "~5.1.
|
|
63
|
-
"@xylabs/toolchain": "~
|
|
64
|
-
"@xylabs/tsconfig": "^
|
|
65
|
-
"@xylabs/tsconfig-dom": "^
|
|
66
|
-
"@xylabs/tsconfig-react": "~
|
|
54
|
+
"@xylabs/pixel": "~5.1.3",
|
|
55
|
+
"@xylabs/react-async-effect": "~8.0.3",
|
|
56
|
+
"@xylabs/react-error": "~8.0.3",
|
|
57
|
+
"@xylabs/react-hooks": "~8.0.3",
|
|
58
|
+
"@xylabs/react-promise": "~8.0.3",
|
|
59
|
+
"@xylabs/react-select": "~8.0.3",
|
|
60
|
+
"@xylabs/react-shared": "~8.0.3",
|
|
61
|
+
"@xylabs/sdk-js": "^5.1.3",
|
|
62
|
+
"@xylabs/threads": "~5.1.3",
|
|
63
|
+
"@xylabs/toolchain": "~8.0.6",
|
|
64
|
+
"@xylabs/tsconfig": "^8.0.6",
|
|
65
|
+
"@xylabs/tsconfig-dom": "^8.0.6",
|
|
66
|
+
"@xylabs/tsconfig-react": "~8.0.6",
|
|
67
67
|
"@xyo-network/account": "~5.6.2",
|
|
68
68
|
"@xyo-network/account-model": "^5.6.3",
|
|
69
69
|
"@xyo-network/boundwitness-builder": "^5.6.2",
|
|
@@ -86,28 +86,28 @@
|
|
|
86
86
|
"buffer": "^6.0.3",
|
|
87
87
|
"chalk": "^5.6.2",
|
|
88
88
|
"debug": "~4.4.3",
|
|
89
|
-
"eslint": "^10.
|
|
89
|
+
"eslint": "^10.4.0",
|
|
90
90
|
"ethers": "^6.16.0",
|
|
91
91
|
"fast-deep-equal": "~3.1.3",
|
|
92
92
|
"hash-wasm": "~4.12.0",
|
|
93
|
-
"js-cookie": "~3.0.
|
|
93
|
+
"js-cookie": "~3.0.6",
|
|
94
94
|
"lru-cache": "^11.3.6",
|
|
95
|
-
"mixpanel-browser": "~2.
|
|
95
|
+
"mixpanel-browser": "~2.79.0",
|
|
96
96
|
"observable-fns": "~0.6.1",
|
|
97
97
|
"pako": "^2.1.0",
|
|
98
98
|
"query-string": "~9.3.1",
|
|
99
99
|
"react": "^19.2.6",
|
|
100
100
|
"react-dom": "^19.2.6",
|
|
101
|
-
"react-router-dom": "^7.15.
|
|
101
|
+
"react-router-dom": "^7.15.1",
|
|
102
102
|
"spark-md5": "~3.0.2",
|
|
103
|
-
"typescript": "^
|
|
103
|
+
"typescript": "^6.0.3",
|
|
104
104
|
"wasm-feature-detect": "~1.8.0",
|
|
105
105
|
"zod": "^4.4.3"
|
|
106
106
|
},
|
|
107
107
|
"peerDependencies": {
|
|
108
108
|
"@bitauth/libauth": "~3.0",
|
|
109
|
-
"@mui/icons-material": "
|
|
110
|
-
"@mui/material": "
|
|
109
|
+
"@mui/icons-material": "^9.0",
|
|
110
|
+
"@mui/material": "^9.0",
|
|
111
111
|
"@opentelemetry/api": "^1.9",
|
|
112
112
|
"@opentelemetry/sdk-trace-base": "^2.7",
|
|
113
113
|
"@scure/base": "~2.2",
|
|
@@ -147,7 +147,7 @@
|
|
|
147
147
|
"hash-wasm": "~4.12",
|
|
148
148
|
"js-cookie": "~3.0",
|
|
149
149
|
"lru-cache": "^11.3",
|
|
150
|
-
"mixpanel-browser": "~2.
|
|
150
|
+
"mixpanel-browser": "~2.79",
|
|
151
151
|
"observable-fns": "~0.6",
|
|
152
152
|
"pako": "^2.1",
|
|
153
153
|
"query-string": "~9.3",
|