@kheopskit/react 0.0.1-alpha.0 → 0.0.1-alpha.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/CHANGELOG.md +9 -0
- package/dist/index.js +1 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/useKheopskit.ts +1 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @kheopskit/react
|
|
2
2
|
|
|
3
|
+
## 0.0.1-alpha.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`4f378f9`](https://github.com/0xKheops/kheopskit-alpha/commit/4f378f9b61e555b7b66ef3bfaf107ab8e6ac62b1) Thanks [@0xKheops](https://github.com/0xKheops)! - refactor property names
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`4f378f9`](https://github.com/0xKheops/kheopskit-alpha/commit/4f378f9b61e555b7b66ef3bfaf107ab8e6ac62b1)]:
|
|
10
|
+
- @kheopskit/core@0.0.1-alpha.1
|
|
11
|
+
|
|
3
12
|
## 0.0.1-alpha.0
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -72,11 +72,7 @@ var useWallets = () => {
|
|
|
72
72
|
const ctx = (0, import_react3.useContext)(KheopskitContext);
|
|
73
73
|
if (!ctx)
|
|
74
74
|
throw new Error("useWallets must be used within a KheopskitProvider");
|
|
75
|
-
|
|
76
|
-
return {
|
|
77
|
-
wallets: kheopskit.wallets,
|
|
78
|
-
accounts: kheopskit.accounts
|
|
79
|
-
};
|
|
75
|
+
return useKheopskit(ctx.config);
|
|
80
76
|
};
|
|
81
77
|
|
|
82
78
|
// src/KheopskitProvider.tsx
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts","../src/SuspenseMonitor.tsx","../src/useKheopskit.ts","../src/context.ts","../src/KheopskitProvider.tsx"],"sourcesContent":["export * from \"./SuspenseMonitor\";\nexport * from \"./useKheopskit\";\nexport * from \"./KheopskitProvider\";\n","import { type FC, useEffect, useRef } from \"react\";\n\nconst SHOULD_LOG = true; // TODO only DEV\n\nexport const SuspenseMonitorInner: FC<{ label: string }> = ({ label }) => {\n const refStart = useRef(performance.now());\n\n useEffect(() => {\n const timeout = setTimeout(() => {\n console.warn(`[Suspense] ${label} is hanging`);\n }, 500);\n\n return () => {\n console.debug(\n \"[Suspense] %s : %s ms\",\n label,\n (performance.now() - refStart.current).toFixed(2)\n );\n clearTimeout(timeout);\n };\n }, [label]);\n\n return null;\n};\n\nexport const SuspenseMonitor: FC<{ label: string }> = ({ label }) =>\n SHOULD_LOG ? <SuspenseMonitorInner label={label} /> : null;\n","import { getKheopskit$, type KheopskitConfig } from \"@kheopskit/core\";\nimport { bind } from \"@react-rxjs/core\";\nimport { useContext } from \"react\";\nimport { KheopskitContext } from \"./context\";\n\nconst DEFAULT_VALUE = {\n wallets: [],\n accounts: [],\n};\n\nconst [useKheopskit] = bind(\n (config: KheopskitConfig) => getKheopskit$(config),\n DEFAULT_VALUE\n);\n\nexport const useWallets = () => {\n const ctx = useContext(KheopskitContext);\n if (!ctx)\n throw new Error(\"useWallets must be used within a KheopskitProvider\");\n\n
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/SuspenseMonitor.tsx","../src/useKheopskit.ts","../src/context.ts","../src/KheopskitProvider.tsx"],"sourcesContent":["export * from \"./SuspenseMonitor\";\nexport * from \"./useKheopskit\";\nexport * from \"./KheopskitProvider\";\n","import { type FC, useEffect, useRef } from \"react\";\n\nconst SHOULD_LOG = true; // TODO only DEV\n\nexport const SuspenseMonitorInner: FC<{ label: string }> = ({ label }) => {\n const refStart = useRef(performance.now());\n\n useEffect(() => {\n const timeout = setTimeout(() => {\n console.warn(`[Suspense] ${label} is hanging`);\n }, 500);\n\n return () => {\n console.debug(\n \"[Suspense] %s : %s ms\",\n label,\n (performance.now() - refStart.current).toFixed(2)\n );\n clearTimeout(timeout);\n };\n }, [label]);\n\n return null;\n};\n\nexport const SuspenseMonitor: FC<{ label: string }> = ({ label }) =>\n SHOULD_LOG ? <SuspenseMonitorInner label={label} /> : null;\n","import { getKheopskit$, type KheopskitConfig } from \"@kheopskit/core\";\nimport { bind } from \"@react-rxjs/core\";\nimport { useContext } from \"react\";\nimport { KheopskitContext } from \"./context\";\n\nconst DEFAULT_VALUE = {\n wallets: [],\n accounts: [],\n};\n\nconst [useKheopskit] = bind(\n (config: KheopskitConfig) => getKheopskit$(config),\n DEFAULT_VALUE\n);\n\nexport const useWallets = () => {\n const ctx = useContext(KheopskitContext);\n if (!ctx)\n throw new Error(\"useWallets must be used within a KheopskitProvider\");\n\n return useKheopskit(ctx.config);\n};\n","import type { KheopskitConfig } from \"@kheopskit/core\";\nimport { createContext } from \"react\";\n\nexport const KheopskitContext = createContext<{\n config: KheopskitConfig;\n} | null>(null);\n","import type { KheopskitConfig } from \"@kheopskit/core\";\nimport { Subscribe } from \"@react-rxjs/core\";\nimport type { FC, PropsWithChildren } from \"react\";\nimport { KheopskitContext } from \"./context\";\nimport { SuspenseMonitor } from \"./SuspenseMonitor\";\n\nexport const KheopskitProvider: FC<\n PropsWithChildren & { config: KheopskitConfig }\n> = ({ children, config }) => {\n return (\n // TODO set source\n <KheopskitContext.Provider value={{ config }}>\n <Subscribe fallback={<SuspenseMonitor label=\"KheopskitProvider\" />}>\n {children}\n </Subscribe>\n </KheopskitContext.Provider>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,mBAA2C;AA0B5B;AAxBf,IAAM,aAAa;AAEZ,IAAM,uBAA8C,CAAC,EAAE,MAAM,MAAM;AACxE,QAAM,eAAW,qBAAO,YAAY,IAAI,CAAC;AAEzC,8BAAU,MAAM;AACd,UAAM,UAAU,WAAW,MAAM;AAC/B,cAAQ,KAAK,cAAc,KAAK,aAAa;AAAA,IAC/C,GAAG,GAAG;AAEN,WAAO,MAAM;AACX,cAAQ;AAAA,QACN;AAAA,QACA;AAAA,SACC,YAAY,IAAI,IAAI,SAAS,SAAS,QAAQ,CAAC;AAAA,MAClD;AACA,mBAAa,OAAO;AAAA,IACtB;AAAA,EACF,GAAG,CAAC,KAAK,CAAC;AAEV,SAAO;AACT;AAEO,IAAM,kBAAyC,CAAC,EAAE,MAAM,MAC7D,aAAa,4CAAC,wBAAqB,OAAc,IAAK;;;AC1BxD,kBAAoD;AACpD,IAAAA,eAAqB;AACrB,IAAAC,gBAA2B;;;ACD3B,IAAAC,gBAA8B;AAEvB,IAAM,uBAAmB,6BAEtB,IAAI;;;ADAd,IAAM,gBAAgB;AAAA,EACpB,SAAS,CAAC;AAAA,EACV,UAAU,CAAC;AACb;AAEA,IAAM,CAAC,YAAY,QAAI;AAAA,EACrB,CAAC,eAA4B,2BAAc,MAAM;AAAA,EACjD;AACF;AAEO,IAAM,aAAa,MAAM;AAC9B,QAAM,UAAM,0BAAW,gBAAgB;AACvC,MAAI,CAAC;AACH,UAAM,IAAI,MAAM,oDAAoD;AAEtE,SAAO,aAAa,IAAI,MAAM;AAChC;;;AEpBA,IAAAC,eAA0B;AAWC,IAAAC,sBAAA;AANpB,IAAM,oBAET,CAAC,EAAE,UAAU,OAAO,MAAM;AAC5B;AAAA;AAAA,IAEE,6CAAC,iBAAiB,UAAjB,EAA0B,OAAO,EAAE,OAAO,GACzC,uDAAC,0BAAU,UAAU,6CAAC,mBAAgB,OAAM,qBAAoB,GAC7D,UACH,GACF;AAAA;AAEJ;","names":["import_core","import_react","import_react","import_core","import_jsx_runtime"]}
|
package/dist/index.mjs
CHANGED
|
@@ -43,11 +43,7 @@ var useWallets = () => {
|
|
|
43
43
|
const ctx = useContext(KheopskitContext);
|
|
44
44
|
if (!ctx)
|
|
45
45
|
throw new Error("useWallets must be used within a KheopskitProvider");
|
|
46
|
-
|
|
47
|
-
return {
|
|
48
|
-
wallets: kheopskit.wallets,
|
|
49
|
-
accounts: kheopskit.accounts
|
|
50
|
-
};
|
|
46
|
+
return useKheopskit(ctx.config);
|
|
51
47
|
};
|
|
52
48
|
|
|
53
49
|
// src/KheopskitProvider.tsx
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/SuspenseMonitor.tsx","../src/useKheopskit.ts","../src/context.ts","../src/KheopskitProvider.tsx"],"sourcesContent":["import { type FC, useEffect, useRef } from \"react\";\n\nconst SHOULD_LOG = true; // TODO only DEV\n\nexport const SuspenseMonitorInner: FC<{ label: string }> = ({ label }) => {\n const refStart = useRef(performance.now());\n\n useEffect(() => {\n const timeout = setTimeout(() => {\n console.warn(`[Suspense] ${label} is hanging`);\n }, 500);\n\n return () => {\n console.debug(\n \"[Suspense] %s : %s ms\",\n label,\n (performance.now() - refStart.current).toFixed(2)\n );\n clearTimeout(timeout);\n };\n }, [label]);\n\n return null;\n};\n\nexport const SuspenseMonitor: FC<{ label: string }> = ({ label }) =>\n SHOULD_LOG ? <SuspenseMonitorInner label={label} /> : null;\n","import { getKheopskit$, type KheopskitConfig } from \"@kheopskit/core\";\nimport { bind } from \"@react-rxjs/core\";\nimport { useContext } from \"react\";\nimport { KheopskitContext } from \"./context\";\n\nconst DEFAULT_VALUE = {\n wallets: [],\n accounts: [],\n};\n\nconst [useKheopskit] = bind(\n (config: KheopskitConfig) => getKheopskit$(config),\n DEFAULT_VALUE\n);\n\nexport const useWallets = () => {\n const ctx = useContext(KheopskitContext);\n if (!ctx)\n throw new Error(\"useWallets must be used within a KheopskitProvider\");\n\n
|
|
1
|
+
{"version":3,"sources":["../src/SuspenseMonitor.tsx","../src/useKheopskit.ts","../src/context.ts","../src/KheopskitProvider.tsx"],"sourcesContent":["import { type FC, useEffect, useRef } from \"react\";\n\nconst SHOULD_LOG = true; // TODO only DEV\n\nexport const SuspenseMonitorInner: FC<{ label: string }> = ({ label }) => {\n const refStart = useRef(performance.now());\n\n useEffect(() => {\n const timeout = setTimeout(() => {\n console.warn(`[Suspense] ${label} is hanging`);\n }, 500);\n\n return () => {\n console.debug(\n \"[Suspense] %s : %s ms\",\n label,\n (performance.now() - refStart.current).toFixed(2)\n );\n clearTimeout(timeout);\n };\n }, [label]);\n\n return null;\n};\n\nexport const SuspenseMonitor: FC<{ label: string }> = ({ label }) =>\n SHOULD_LOG ? <SuspenseMonitorInner label={label} /> : null;\n","import { getKheopskit$, type KheopskitConfig } from \"@kheopskit/core\";\nimport { bind } from \"@react-rxjs/core\";\nimport { useContext } from \"react\";\nimport { KheopskitContext } from \"./context\";\n\nconst DEFAULT_VALUE = {\n wallets: [],\n accounts: [],\n};\n\nconst [useKheopskit] = bind(\n (config: KheopskitConfig) => getKheopskit$(config),\n DEFAULT_VALUE\n);\n\nexport const useWallets = () => {\n const ctx = useContext(KheopskitContext);\n if (!ctx)\n throw new Error(\"useWallets must be used within a KheopskitProvider\");\n\n return useKheopskit(ctx.config);\n};\n","import type { KheopskitConfig } from \"@kheopskit/core\";\nimport { createContext } from \"react\";\n\nexport const KheopskitContext = createContext<{\n config: KheopskitConfig;\n} | null>(null);\n","import type { KheopskitConfig } from \"@kheopskit/core\";\nimport { Subscribe } from \"@react-rxjs/core\";\nimport type { FC, PropsWithChildren } from \"react\";\nimport { KheopskitContext } from \"./context\";\nimport { SuspenseMonitor } from \"./SuspenseMonitor\";\n\nexport const KheopskitProvider: FC<\n PropsWithChildren & { config: KheopskitConfig }\n> = ({ children, config }) => {\n return (\n // TODO set source\n <KheopskitContext.Provider value={{ config }}>\n <Subscribe fallback={<SuspenseMonitor label=\"KheopskitProvider\" />}>\n {children}\n </Subscribe>\n </KheopskitContext.Provider>\n );\n};\n"],"mappings":";AAAA,SAAkB,WAAW,cAAc;AA0B5B;AAxBf,IAAM,aAAa;AAEZ,IAAM,uBAA8C,CAAC,EAAE,MAAM,MAAM;AACxE,QAAM,WAA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.0.1-alpha.
|
|
3
|
+
"version": "0.0.1-alpha.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@react-rxjs/core": "^0.10.8",
|
|
29
|
-
"@kheopskit/core": "0.0.1-alpha.
|
|
29
|
+
"@kheopskit/core": "0.0.1-alpha.1"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"react": "^19.0.0",
|
package/src/useKheopskit.ts
CHANGED
|
@@ -18,10 +18,5 @@ export const useWallets = () => {
|
|
|
18
18
|
if (!ctx)
|
|
19
19
|
throw new Error("useWallets must be used within a KheopskitProvider");
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
return {
|
|
24
|
-
wallets: kheopskit.wallets,
|
|
25
|
-
accounts: kheopskit.accounts,
|
|
26
|
-
};
|
|
21
|
+
return useKheopskit(ctx.config);
|
|
27
22
|
};
|