@octanejs/tanstack-devtools 0.0.58 → 0.0.60
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/devtools.tsrx +21 -26
- package/src/index.ts +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@octanejs/tanstack-devtools",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.60",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -34,17 +34,17 @@
|
|
|
34
34
|
"@tanstack/devtools": "0.14.2"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
|
-
"octane": "^0.
|
|
37
|
+
"octane": "^0.13.0"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@octanejs/testing-library": "0.1.
|
|
40
|
+
"@octanejs/testing-library": "0.1.63",
|
|
41
41
|
"@tanstack/react-devtools": "0.10.12",
|
|
42
42
|
"@testing-library/jest-dom": "^6.9.1",
|
|
43
43
|
"@tsrx/react": "^0.4.5",
|
|
44
44
|
"@types/react": "19.2.17",
|
|
45
45
|
"@types/react-dom": "19.2.3",
|
|
46
46
|
"esbuild": "^0.28.1",
|
|
47
|
-
"octane": "0.
|
|
47
|
+
"octane": "0.13.6",
|
|
48
48
|
"react": "19.2.7",
|
|
49
49
|
"react-dom": "19.2.7",
|
|
50
50
|
"vitest": "^4.1.10"
|
package/src/devtools.tsrx
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
'use strong';
|
|
2
|
+
|
|
1
3
|
// Ported from @tanstack/react-devtools 0.10.7
|
|
2
4
|
// (https://github.com/TanStack/devtools/tree/main/packages/react-devtools/src/devtools.tsx).
|
|
3
5
|
//
|
|
@@ -138,7 +140,7 @@ export const TanStackDevtools = ({
|
|
|
138
140
|
plugins,
|
|
139
141
|
config,
|
|
140
142
|
eventBusConfig,
|
|
141
|
-
}: TanStackDevtoolsOctaneInit): Renderable => {
|
|
143
|
+
}: TanStackDevtoolsOctaneInit): Renderable => @{
|
|
142
144
|
const devToolRef = useRef<HTMLDivElement | null>(null);
|
|
143
145
|
|
|
144
146
|
const [pluginContainers, setPluginContainers] = useState<Record<string, HTMLElement>>({});
|
|
@@ -190,7 +192,6 @@ export const TanStackDevtools = ({
|
|
|
190
192
|
},
|
|
191
193
|
};
|
|
192
194
|
}) ?? [],
|
|
193
|
-
[plugins],
|
|
194
195
|
);
|
|
195
196
|
|
|
196
197
|
const [devtools] = useState(() => {
|
|
@@ -214,7 +215,7 @@ export const TanStackDevtools = ({
|
|
|
214
215
|
devtools.setConfig({
|
|
215
216
|
plugins: pluginsMap,
|
|
216
217
|
});
|
|
217
|
-
}
|
|
218
|
+
});
|
|
218
219
|
|
|
219
220
|
useEffect(() => {
|
|
220
221
|
if (devToolRef.current) {
|
|
@@ -222,36 +223,30 @@ export const TanStackDevtools = ({
|
|
|
222
223
|
}
|
|
223
224
|
|
|
224
225
|
return () => devtools.unmount();
|
|
225
|
-
}
|
|
226
|
+
});
|
|
226
227
|
|
|
227
228
|
const hasPlugins =
|
|
228
229
|
Object.values(pluginContainers).length > 0 && Object.values(PluginComponents).length > 0;
|
|
229
230
|
const hasTitles =
|
|
230
231
|
Object.values(titleContainers).length > 0 && Object.values(TitleComponents).length > 0;
|
|
231
232
|
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
<div style={{ position: 'absolute' }} ref={devToolRef} />
|
|
233
|
+
<>
|
|
234
|
+
<div style={{ position: 'absolute' }} ref={devToolRef} />
|
|
235
235
|
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
})
|
|
242
|
-
: null}
|
|
236
|
+
@if (hasPlugins) {
|
|
237
|
+
@for (const [key, pluginContainer] of Object.entries(pluginContainers); key key) {
|
|
238
|
+
<DevtoolsPortal target={pluginContainer} content={PluginComponents[key]} />
|
|
239
|
+
}
|
|
240
|
+
}
|
|
243
241
|
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
})
|
|
250
|
-
: null}
|
|
242
|
+
@if (hasTitles) {
|
|
243
|
+
@for (const [key, titleContainer] of Object.entries(titleContainers); key key) {
|
|
244
|
+
<DevtoolsPortal target={titleContainer} content={TitleComponents[key]} />
|
|
245
|
+
}
|
|
246
|
+
}
|
|
251
247
|
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
);
|
|
248
|
+
@if (triggerContainer && TriggerComponent) {
|
|
249
|
+
<DevtoolsPortal target={triggerContainer} content={TriggerComponent} />
|
|
250
|
+
}
|
|
251
|
+
</>
|
|
257
252
|
};
|