@octanejs/wagmi 0.0.23 → 0.0.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +4 -4
- package/src/internal.ts +3 -18
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@octanejs/wagmi",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.25",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -39,10 +39,10 @@
|
|
|
39
39
|
"@wagmi/connectors": "8.0.25",
|
|
40
40
|
"@wagmi/core": "3.6.4",
|
|
41
41
|
"viem": "2.55.10",
|
|
42
|
-
"@octanejs/tanstack-query": "0.1.
|
|
42
|
+
"@octanejs/tanstack-query": "0.1.44"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
|
-
"octane": "0.1.
|
|
45
|
+
"octane": "0.1.45"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@tanstack/react-query": "^5.101.3",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"react-dom": "^19.2.7",
|
|
53
53
|
"vitest": "^4.1.10",
|
|
54
54
|
"wagmi": "3.7.4",
|
|
55
|
-
"octane": "0.1.
|
|
55
|
+
"octane": "0.1.45"
|
|
56
56
|
},
|
|
57
57
|
"scripts": {
|
|
58
58
|
"test": "vitest run --root ../.. --project wagmi --project wagmi-differential"
|
package/src/internal.ts
CHANGED
|
@@ -1,21 +1,6 @@
|
|
|
1
|
-
import { createContext } from 'octane';
|
|
1
|
+
import { createContext, subSlot } from 'octane';
|
|
2
|
+
|
|
3
|
+
export { subSlot };
|
|
2
4
|
import type { ResolvedRegister } from '@wagmi/core';
|
|
3
5
|
|
|
4
6
|
export const WagmiContext = createContext<ResolvedRegister['config'] | undefined>(undefined);
|
|
5
|
-
|
|
6
|
-
const slots = new Map<symbol, Map<string, symbol>>();
|
|
7
|
-
|
|
8
|
-
export function subSlot(slot: symbol | undefined, tag: string): symbol | undefined {
|
|
9
|
-
if (!slot) return undefined;
|
|
10
|
-
let children = slots.get(slot);
|
|
11
|
-
if (!children) {
|
|
12
|
-
children = new Map();
|
|
13
|
-
slots.set(slot, children);
|
|
14
|
-
}
|
|
15
|
-
let child = children.get(tag);
|
|
16
|
-
if (!child) {
|
|
17
|
-
child = Symbol.for(`${slot.description ?? ''}:${tag}`);
|
|
18
|
-
children.set(tag, child);
|
|
19
|
-
}
|
|
20
|
-
return child;
|
|
21
|
-
}
|