@tanstack/solid-devtools 0.3.1 → 0.4.0
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/README.md +6 -6
- package/dist/cjs/core.cjs +1 -1
- package/dist/cjs/core.cjs.map +1 -1
- package/dist/cjs/core.d.cts +3 -3
- package/dist/cjs/devtools.cjs +2 -2
- package/dist/cjs/devtools.cjs.map +1 -1
- package/dist/cjs/devtools.d.cts +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/index.d.cts +1 -1
- package/dist/esm/core.d.ts +3 -3
- package/dist/esm/core.js +1 -1
- package/dist/esm/core.js.map +1 -1
- package/dist/esm/devtools.d.ts +1 -1
- package/dist/esm/devtools.js +2 -2
- package/dist/esm/devtools.js.map +1 -1
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +2 -2
- package/package.json +2 -2
- package/src/core.tsx +4 -4
- package/src/devtools.tsx +1 -1
- package/src/index.ts +1 -1
package/README.md
CHANGED
|
@@ -5,17 +5,17 @@ This package is still under active development and might have breaking changes i
|
|
|
5
5
|
## Usage
|
|
6
6
|
|
|
7
7
|
```tsx
|
|
8
|
-
import {
|
|
8
|
+
import { TanStackDevtools } from '@tanstack/solid-devtools'
|
|
9
9
|
import { TanStackRouterDevtoolsPanel } from '@tanstack/solid-router-devtools'
|
|
10
10
|
|
|
11
11
|
function App() {
|
|
12
12
|
return (
|
|
13
13
|
<div>
|
|
14
14
|
<h1>My App</h1>
|
|
15
|
-
<
|
|
15
|
+
<TanStackDevtools
|
|
16
16
|
plugins={[
|
|
17
17
|
{
|
|
18
|
-
name: '
|
|
18
|
+
name: 'TanStack Router',
|
|
19
19
|
render: <TanStackRouterDevtoolsPanel router={router} />,
|
|
20
20
|
},
|
|
21
21
|
]}
|
|
@@ -27,16 +27,16 @@ function App() {
|
|
|
27
27
|
|
|
28
28
|
## Creating plugins
|
|
29
29
|
|
|
30
|
-
In order to create a plugin for TanStack Devtools, you can use the `plugins` prop of the `
|
|
30
|
+
In order to create a plugin for TanStack Devtools, you can use the `plugins` prop of the `TanStackDevtools` component. Here's an example of how to create a simple plugin:
|
|
31
31
|
|
|
32
32
|
```tsx
|
|
33
|
-
import {
|
|
33
|
+
import { TanStackDevtools } from '@tanstack/solid-devtools'
|
|
34
34
|
|
|
35
35
|
function App() {
|
|
36
36
|
return (
|
|
37
37
|
<div>
|
|
38
38
|
<h1>My App</h1>
|
|
39
|
-
<
|
|
39
|
+
<TanStackDevtools
|
|
40
40
|
plugins={[
|
|
41
41
|
{
|
|
42
42
|
id: 'your-plugin-id',
|
package/dist/cjs/core.cjs
CHANGED
|
@@ -44,7 +44,7 @@ function SolidDevtoolsCore({
|
|
|
44
44
|
var _el$ = _tmpl$();
|
|
45
45
|
var _ref$ = devToolRef;
|
|
46
46
|
typeof _ref$ === "function" ? web.use(_ref$, _el$) : devToolRef = _el$;
|
|
47
|
-
_el$.style.setProperty("
|
|
47
|
+
_el$.style.setProperty("position", "absolute");
|
|
48
48
|
return _el$;
|
|
49
49
|
})();
|
|
50
50
|
}
|
package/dist/cjs/core.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core.cjs","sources":["../../src/core.tsx"],"sourcesContent":["import { TanStackDevtoolsCore } from '@tanstack/devtools'\nimport { createEffect, createSignal, onCleanup, onMount } from 'solid-js'\nimport { Portal } from 'solid-js/web'\nimport type { JSX } from 'solid-js'\nimport type {\n ClientEventBusConfig,\n TanStackDevtoolsConfig,\n TanStackDevtoolsPlugin,\n} from '@tanstack/devtools'\n\ntype SolidPluginRender = JSX.Element | (() => JSX.Element)\nconst convertRender = (\n el: HTMLDivElement | HTMLHeadingElement,\n Component: SolidPluginRender,\n) => (\n <Portal mount={el}>\n {typeof Component === 'function' ? <Component /> : Component}\n </Portal>\n)\n\nexport type TanStackDevtoolsSolidPlugin = Omit<\n TanStackDevtoolsPlugin,\n 'render' | 'name'\n> & {\n /**\n * The render function can be a SolidJS element or a function that returns a SolidJS element.\n * If it's a function, it will be called to render the plugin, otherwise it will be rendered directly.\n *\n * Example:\n * ```ts\n * {\n * render: () => <CustomPluginComponent />,\n * }\n * ```\n * or\n * ```ts\n * {\n * render: <CustomPluginComponent />,\n * }\n * ```\n */\n render: SolidPluginRender\n /**\n * Name to be displayed in the devtools UI.\n * If a string, it will be used as the plugin name.\n * If a function, it will be called with the mount element.\n *\n * Example:\n * ```ts\n * {\n * name: \"Your Plugin\",\n * render: () => <CustomPluginComponent />,\n * }\n * ```\n * or\n * ```ts\n * {\n * name: <h1>Your Plugin title</h1>,\n * render: () => <CustomPluginComponent />,\n * }\n * ```\n */\n name: string | SolidPluginRender\n}\nexport interface
|
|
1
|
+
{"version":3,"file":"core.cjs","sources":["../../src/core.tsx"],"sourcesContent":["import { TanStackDevtoolsCore } from '@tanstack/devtools'\nimport { createEffect, createSignal, onCleanup, onMount } from 'solid-js'\nimport { Portal } from 'solid-js/web'\nimport type { JSX } from 'solid-js'\nimport type {\n ClientEventBusConfig,\n TanStackDevtoolsConfig,\n TanStackDevtoolsPlugin,\n} from '@tanstack/devtools'\n\ntype SolidPluginRender = JSX.Element | (() => JSX.Element)\nconst convertRender = (\n el: HTMLDivElement | HTMLHeadingElement,\n Component: SolidPluginRender,\n) => (\n <Portal mount={el}>\n {typeof Component === 'function' ? <Component /> : Component}\n </Portal>\n)\n\nexport type TanStackDevtoolsSolidPlugin = Omit<\n TanStackDevtoolsPlugin,\n 'render' | 'name'\n> & {\n /**\n * The render function can be a SolidJS element or a function that returns a SolidJS element.\n * If it's a function, it will be called to render the plugin, otherwise it will be rendered directly.\n *\n * Example:\n * ```ts\n * {\n * render: () => <CustomPluginComponent />,\n * }\n * ```\n * or\n * ```ts\n * {\n * render: <CustomPluginComponent />,\n * }\n * ```\n */\n render: SolidPluginRender\n /**\n * Name to be displayed in the devtools UI.\n * If a string, it will be used as the plugin name.\n * If a function, it will be called with the mount element.\n *\n * Example:\n * ```ts\n * {\n * name: \"Your Plugin\",\n * render: () => <CustomPluginComponent />,\n * }\n * ```\n * or\n * ```ts\n * {\n * name: <h1>Your Plugin title</h1>,\n * render: () => <CustomPluginComponent />,\n * }\n * ```\n */\n name: string | SolidPluginRender\n}\nexport interface TanStackDevtoolsInit {\n /**\n * Array of plugins to be used in the devtools.\n * Each plugin should have a `render` function that returns a React element or a function\n *\n * Example:\n * ```jsx\n * <TanStackDevtools\n * plugins={[\n * {\n * id: \"your-plugin-id\",\n * name: \"Your Plugin\",\n * render: <CustomPluginComponent />,\n * }\n * ]}\n * />\n * ```\n */\n plugins?: Array<TanStackDevtoolsSolidPlugin>\n /**\n * Configuration for the devtools shell. These configuration options are used to set the\n * initial state of the devtools when it is started for the first time. Afterwards,\n * the settings are persisted in local storage and changed through the settings panel.\n */\n config?: Partial<TanStackDevtoolsConfig>\n /**\n * Configuration for the TanStack Devtools client event bus.\n */\n eventBusConfig?: ClientEventBusConfig\n}\n\nexport default function SolidDevtoolsCore({\n config,\n plugins,\n eventBusConfig,\n}: TanStackDevtoolsInit) {\n const [devtools] = createSignal(\n new TanStackDevtoolsCore({\n config,\n eventBusConfig,\n plugins: plugins?.map((plugin) => ({\n ...plugin,\n name:\n typeof plugin.name === 'string'\n ? plugin.name\n : // The check above confirms that `plugin.name` is of Render type\n (el) => convertRender(el, plugin.name as SolidPluginRender),\n render: (el: HTMLDivElement) => convertRender(el, plugin.render),\n })),\n }),\n )\n let devToolRef: HTMLDivElement | undefined\n createEffect(() => {\n devtools().setConfig({ config })\n })\n onMount(() => {\n if (devToolRef) {\n devtools().mount(devToolRef)\n\n onCleanup(() => {\n devtools().unmount()\n })\n }\n })\n return <div style={{ position: 'absolute' }} ref={devToolRef} />\n}\n"],"names":["convertRender","el","Component","_$createComponent","Portal","mount","children","SolidDevtoolsCore","config","plugins","eventBusConfig","devtools","createSignal","TanStackDevtoolsCore","map","plugin","name","render","devToolRef","createEffect","setConfig","onMount","onCleanup","unmount","_el$","_tmpl$","_ref$","_$use","style","setProperty"],"mappings":";;;;;AAWA,MAAMA,gBAAgBA,CACpBC,IACAC,cAA4BC,IAAAA,gBAE3BC,IAAAA,QAAM;AAAA,EAACC,OAAOJ;AAAAA,EAAE,IAAAK,WAAA;AAAA,WACd,OAAOJ,cAAc,aAAUC,IAAAA,gBAAID,WAAS,CAAA,CAAA,IAAMA;AAAAA,EAAS;AAAA,CAAA;AA+EhE,SAAwBK,kBAAkB;AAAA,EACxCC;AAAAA,EACAC;AAAAA,EACAC;AACoB,GAAG;AACvB,QAAM,CAACC,UAAQ,IAAIC,QAAAA,aACjB,IAAIC,SAAAA,qBAAqB;AAAA,IACvBL;AAAAA,IACAE;AAAAA,IACAD,SAASA,SAASK,IAAKC,CAAAA,YAAY;AAAA,MACjC,GAAGA;AAAAA,MACHC,MACE,OAAOD,OAAOC,SAAS,WACnBD,OAAOC;AAAAA;AAAAA,QAENf,CAAAA,OAAOD,cAAcC,IAAIc,OAAOC,IAAyB;AAAA;AAAA,MAChEC,QAAQA,CAAChB,OAAuBD,cAAcC,IAAIc,OAAOE,MAAM;AAAA,IAAA,EAC/D;AAAA,EAAA,CACH,CACH;AACA,MAAIC;AACJC,UAAAA,aAAa,MAAM;AACjBR,eAAAA,EAAWS,UAAU;AAAA,MAAEZ;AAAAA,IAAAA,CAAQ;AAAA,EACjC,CAAC;AACDa,UAAAA,QAAQ,MAAM;AACZ,QAAIH,YAAY;AACdP,iBAAAA,EAAWN,MAAMa,UAAU;AAE3BI,cAAAA,UAAU,MAAM;AACdX,mBAAAA,EAAWY,QAAAA;AAAAA,MACb,CAAC;AAAA,IACH;AAAA,EACF,CAAC;AACD,UAAA,MAAA;AAAA,QAAAC,OAAAC,OAAAA;AAAA,QAAAC,QAAkDR;AAAU,WAAAQ,UAAA,aAAAC,IAAAA,IAAAD,OAAAF,IAAA,IAAVN,aAAUM;AAAAA,SAAAI,MAAAC,YAAA,YAAA,UAAA;AAAA,WAAAL;AAAAA,EAAA,GAAA;AAC9D;;"}
|
package/dist/cjs/core.d.cts
CHANGED
|
@@ -42,14 +42,14 @@ export type TanStackDevtoolsSolidPlugin = Omit<TanStackDevtoolsPlugin, 'render'
|
|
|
42
42
|
*/
|
|
43
43
|
name: string | SolidPluginRender;
|
|
44
44
|
};
|
|
45
|
-
export interface
|
|
45
|
+
export interface TanStackDevtoolsInit {
|
|
46
46
|
/**
|
|
47
47
|
* Array of plugins to be used in the devtools.
|
|
48
48
|
* Each plugin should have a `render` function that returns a React element or a function
|
|
49
49
|
*
|
|
50
50
|
* Example:
|
|
51
51
|
* ```jsx
|
|
52
|
-
* <
|
|
52
|
+
* <TanStackDevtools
|
|
53
53
|
* plugins={[
|
|
54
54
|
* {
|
|
55
55
|
* id: "your-plugin-id",
|
|
@@ -72,5 +72,5 @@ export interface TanstackDevtoolsInit {
|
|
|
72
72
|
*/
|
|
73
73
|
eventBusConfig?: ClientEventBusConfig;
|
|
74
74
|
}
|
|
75
|
-
export default function SolidDevtoolsCore({ config, plugins, eventBusConfig, }:
|
|
75
|
+
export default function SolidDevtoolsCore({ config, plugins, eventBusConfig, }: TanStackDevtoolsInit): JSX.Element;
|
|
76
76
|
export {};
|
package/dist/cjs/devtools.cjs
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const clientOnly = require("./client-only.cjs");
|
|
4
4
|
const _interopNamespaceDefaultOnly = (e) => Object.freeze(Object.defineProperty({ __proto__: null, default: e }, Symbol.toStringTag, { value: "Module" }));
|
|
5
|
-
const
|
|
6
|
-
exports.
|
|
5
|
+
const TanStackDevtools = clientOnly(() => Promise.resolve().then(() => /* @__PURE__ */ _interopNamespaceDefaultOnly(require("./core.cjs"))).then((m) => m));
|
|
6
|
+
exports.TanStackDevtools = TanStackDevtools;
|
|
7
7
|
//# sourceMappingURL=devtools.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"devtools.cjs","sources":["../../src/devtools.tsx"],"sourcesContent":["import clientOnly from './client-only'\n\nexport const
|
|
1
|
+
{"version":3,"file":"devtools.cjs","sources":["../../src/devtools.tsx"],"sourcesContent":["import clientOnly from './client-only'\n\nexport const TanStackDevtools = clientOnly(() =>\n import('./core').then((m) => m),\n)\n"],"names":["TanStackDevtools","clientOnly","then","m"],"mappings":";;;;AAEO,MAAMA,mBAAmBC,WAAW,MACzC,QAAA,QAAA,EAAA,KAAA,MAAA,6CAAA,QAAO,YAAQ,CAAA,CAAA,EAAEC,KAAMC,CAAAA,MAAMA,CAAC,CAChC;;"}
|
package/dist/cjs/devtools.d.cts
CHANGED
package/dist/cjs/index.cjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const devtools$1 = require("@tanstack/devtools");
|
|
4
4
|
const devtools = require("./devtools.cjs");
|
|
5
|
-
exports.
|
|
5
|
+
exports.TanStackDevtools = devtools.TanStackDevtools;
|
|
6
6
|
Object.keys(devtools$1).forEach((k) => {
|
|
7
7
|
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
8
8
|
enumerable: true,
|
package/dist/cjs/index.d.cts
CHANGED
|
@@ -2,5 +2,5 @@ export * from '@tanstack/devtools';
|
|
|
2
2
|
/**
|
|
3
3
|
* Export every hook individually - DON'T export from barrel files
|
|
4
4
|
*/
|
|
5
|
-
export {
|
|
5
|
+
export { TanStackDevtools } from './devtools.cjs';
|
|
6
6
|
export type { TanStackDevtoolsSolidPlugin } from './core.cjs';
|
package/dist/esm/core.d.ts
CHANGED
|
@@ -42,14 +42,14 @@ export type TanStackDevtoolsSolidPlugin = Omit<TanStackDevtoolsPlugin, 'render'
|
|
|
42
42
|
*/
|
|
43
43
|
name: string | SolidPluginRender;
|
|
44
44
|
};
|
|
45
|
-
export interface
|
|
45
|
+
export interface TanStackDevtoolsInit {
|
|
46
46
|
/**
|
|
47
47
|
* Array of plugins to be used in the devtools.
|
|
48
48
|
* Each plugin should have a `render` function that returns a React element or a function
|
|
49
49
|
*
|
|
50
50
|
* Example:
|
|
51
51
|
* ```jsx
|
|
52
|
-
* <
|
|
52
|
+
* <TanStackDevtools
|
|
53
53
|
* plugins={[
|
|
54
54
|
* {
|
|
55
55
|
* id: "your-plugin-id",
|
|
@@ -72,5 +72,5 @@ export interface TanstackDevtoolsInit {
|
|
|
72
72
|
*/
|
|
73
73
|
eventBusConfig?: ClientEventBusConfig;
|
|
74
74
|
}
|
|
75
|
-
export default function SolidDevtoolsCore({ config, plugins, eventBusConfig, }:
|
|
75
|
+
export default function SolidDevtoolsCore({ config, plugins, eventBusConfig, }: TanStackDevtoolsInit): JSX.Element;
|
|
76
76
|
export {};
|
package/dist/esm/core.js
CHANGED
|
@@ -43,7 +43,7 @@ function SolidDevtoolsCore({
|
|
|
43
43
|
var _el$ = _tmpl$();
|
|
44
44
|
var _ref$ = devToolRef;
|
|
45
45
|
typeof _ref$ === "function" ? use(_ref$, _el$) : devToolRef = _el$;
|
|
46
|
-
_el$.style.setProperty("
|
|
46
|
+
_el$.style.setProperty("position", "absolute");
|
|
47
47
|
return _el$;
|
|
48
48
|
})();
|
|
49
49
|
}
|
package/dist/esm/core.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core.js","sources":["../../src/core.tsx"],"sourcesContent":["import { TanStackDevtoolsCore } from '@tanstack/devtools'\nimport { createEffect, createSignal, onCleanup, onMount } from 'solid-js'\nimport { Portal } from 'solid-js/web'\nimport type { JSX } from 'solid-js'\nimport type {\n ClientEventBusConfig,\n TanStackDevtoolsConfig,\n TanStackDevtoolsPlugin,\n} from '@tanstack/devtools'\n\ntype SolidPluginRender = JSX.Element | (() => JSX.Element)\nconst convertRender = (\n el: HTMLDivElement | HTMLHeadingElement,\n Component: SolidPluginRender,\n) => (\n <Portal mount={el}>\n {typeof Component === 'function' ? <Component /> : Component}\n </Portal>\n)\n\nexport type TanStackDevtoolsSolidPlugin = Omit<\n TanStackDevtoolsPlugin,\n 'render' | 'name'\n> & {\n /**\n * The render function can be a SolidJS element or a function that returns a SolidJS element.\n * If it's a function, it will be called to render the plugin, otherwise it will be rendered directly.\n *\n * Example:\n * ```ts\n * {\n * render: () => <CustomPluginComponent />,\n * }\n * ```\n * or\n * ```ts\n * {\n * render: <CustomPluginComponent />,\n * }\n * ```\n */\n render: SolidPluginRender\n /**\n * Name to be displayed in the devtools UI.\n * If a string, it will be used as the plugin name.\n * If a function, it will be called with the mount element.\n *\n * Example:\n * ```ts\n * {\n * name: \"Your Plugin\",\n * render: () => <CustomPluginComponent />,\n * }\n * ```\n * or\n * ```ts\n * {\n * name: <h1>Your Plugin title</h1>,\n * render: () => <CustomPluginComponent />,\n * }\n * ```\n */\n name: string | SolidPluginRender\n}\nexport interface
|
|
1
|
+
{"version":3,"file":"core.js","sources":["../../src/core.tsx"],"sourcesContent":["import { TanStackDevtoolsCore } from '@tanstack/devtools'\nimport { createEffect, createSignal, onCleanup, onMount } from 'solid-js'\nimport { Portal } from 'solid-js/web'\nimport type { JSX } from 'solid-js'\nimport type {\n ClientEventBusConfig,\n TanStackDevtoolsConfig,\n TanStackDevtoolsPlugin,\n} from '@tanstack/devtools'\n\ntype SolidPluginRender = JSX.Element | (() => JSX.Element)\nconst convertRender = (\n el: HTMLDivElement | HTMLHeadingElement,\n Component: SolidPluginRender,\n) => (\n <Portal mount={el}>\n {typeof Component === 'function' ? <Component /> : Component}\n </Portal>\n)\n\nexport type TanStackDevtoolsSolidPlugin = Omit<\n TanStackDevtoolsPlugin,\n 'render' | 'name'\n> & {\n /**\n * The render function can be a SolidJS element or a function that returns a SolidJS element.\n * If it's a function, it will be called to render the plugin, otherwise it will be rendered directly.\n *\n * Example:\n * ```ts\n * {\n * render: () => <CustomPluginComponent />,\n * }\n * ```\n * or\n * ```ts\n * {\n * render: <CustomPluginComponent />,\n * }\n * ```\n */\n render: SolidPluginRender\n /**\n * Name to be displayed in the devtools UI.\n * If a string, it will be used as the plugin name.\n * If a function, it will be called with the mount element.\n *\n * Example:\n * ```ts\n * {\n * name: \"Your Plugin\",\n * render: () => <CustomPluginComponent />,\n * }\n * ```\n * or\n * ```ts\n * {\n * name: <h1>Your Plugin title</h1>,\n * render: () => <CustomPluginComponent />,\n * }\n * ```\n */\n name: string | SolidPluginRender\n}\nexport interface TanStackDevtoolsInit {\n /**\n * Array of plugins to be used in the devtools.\n * Each plugin should have a `render` function that returns a React element or a function\n *\n * Example:\n * ```jsx\n * <TanStackDevtools\n * plugins={[\n * {\n * id: \"your-plugin-id\",\n * name: \"Your Plugin\",\n * render: <CustomPluginComponent />,\n * }\n * ]}\n * />\n * ```\n */\n plugins?: Array<TanStackDevtoolsSolidPlugin>\n /**\n * Configuration for the devtools shell. These configuration options are used to set the\n * initial state of the devtools when it is started for the first time. Afterwards,\n * the settings are persisted in local storage and changed through the settings panel.\n */\n config?: Partial<TanStackDevtoolsConfig>\n /**\n * Configuration for the TanStack Devtools client event bus.\n */\n eventBusConfig?: ClientEventBusConfig\n}\n\nexport default function SolidDevtoolsCore({\n config,\n plugins,\n eventBusConfig,\n}: TanStackDevtoolsInit) {\n const [devtools] = createSignal(\n new TanStackDevtoolsCore({\n config,\n eventBusConfig,\n plugins: plugins?.map((plugin) => ({\n ...plugin,\n name:\n typeof plugin.name === 'string'\n ? plugin.name\n : // The check above confirms that `plugin.name` is of Render type\n (el) => convertRender(el, plugin.name as SolidPluginRender),\n render: (el: HTMLDivElement) => convertRender(el, plugin.render),\n })),\n }),\n )\n let devToolRef: HTMLDivElement | undefined\n createEffect(() => {\n devtools().setConfig({ config })\n })\n onMount(() => {\n if (devToolRef) {\n devtools().mount(devToolRef)\n\n onCleanup(() => {\n devtools().unmount()\n })\n }\n })\n return <div style={{ position: 'absolute' }} ref={devToolRef} />\n}\n"],"names":["convertRender","el","Component","_$createComponent","Portal","mount","children","SolidDevtoolsCore","config","plugins","eventBusConfig","devtools","createSignal","TanStackDevtoolsCore","map","plugin","name","render","devToolRef","createEffect","setConfig","onMount","onCleanup","unmount","_el$","_tmpl$","_ref$","_$use","style","setProperty"],"mappings":";;;;AAWA,MAAMA,gBAAgBA,CACpBC,IACAC,cAA4BC,gBAE3BC,QAAM;AAAA,EAACC,OAAOJ;AAAAA,EAAE,IAAAK,WAAA;AAAA,WACd,OAAOJ,cAAc,aAAUC,gBAAID,WAAS,CAAA,CAAA,IAAMA;AAAAA,EAAS;AAAA,CAAA;AA+EhE,SAAwBK,kBAAkB;AAAA,EACxCC;AAAAA,EACAC;AAAAA,EACAC;AACoB,GAAG;AACvB,QAAM,CAACC,QAAQ,IAAIC,aACjB,IAAIC,qBAAqB;AAAA,IACvBL;AAAAA,IACAE;AAAAA,IACAD,SAASA,SAASK,IAAKC,CAAAA,YAAY;AAAA,MACjC,GAAGA;AAAAA,MACHC,MACE,OAAOD,OAAOC,SAAS,WACnBD,OAAOC;AAAAA;AAAAA,QAENf,CAAAA,OAAOD,cAAcC,IAAIc,OAAOC,IAAyB;AAAA;AAAA,MAChEC,QAAQA,CAAChB,OAAuBD,cAAcC,IAAIc,OAAOE,MAAM;AAAA,IAAA,EAC/D;AAAA,EAAA,CACH,CACH;AACA,MAAIC;AACJC,eAAa,MAAM;AACjBR,aAAAA,EAAWS,UAAU;AAAA,MAAEZ;AAAAA,IAAAA,CAAQ;AAAA,EACjC,CAAC;AACDa,UAAQ,MAAM;AACZ,QAAIH,YAAY;AACdP,eAAAA,EAAWN,MAAMa,UAAU;AAE3BI,gBAAU,MAAM;AACdX,iBAAAA,EAAWY,QAAAA;AAAAA,MACb,CAAC;AAAA,IACH;AAAA,EACF,CAAC;AACD,UAAA,MAAA;AAAA,QAAAC,OAAAC,OAAAA;AAAA,QAAAC,QAAkDR;AAAU,WAAAQ,UAAA,aAAAC,IAAAD,OAAAF,IAAA,IAAVN,aAAUM;AAAAA,SAAAI,MAAAC,YAAA,YAAA,UAAA;AAAA,WAAAL;AAAAA,EAAA,GAAA;AAC9D;"}
|
package/dist/esm/devtools.d.ts
CHANGED
package/dist/esm/devtools.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import clientOnly from "./client-only.js";
|
|
2
|
-
const
|
|
2
|
+
const TanStackDevtools = clientOnly(() => import("./core.js").then((m) => m));
|
|
3
3
|
export {
|
|
4
|
-
|
|
4
|
+
TanStackDevtools
|
|
5
5
|
};
|
|
6
6
|
//# sourceMappingURL=devtools.js.map
|
package/dist/esm/devtools.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"devtools.js","sources":["../../src/devtools.tsx"],"sourcesContent":["import clientOnly from './client-only'\n\nexport const
|
|
1
|
+
{"version":3,"file":"devtools.js","sources":["../../src/devtools.tsx"],"sourcesContent":["import clientOnly from './client-only'\n\nexport const TanStackDevtools = clientOnly(() =>\n import('./core').then((m) => m),\n)\n"],"names":["TanStackDevtools","clientOnly","then","m"],"mappings":";AAEO,MAAMA,mBAAmBC,WAAW,MACzC,OAAO,WAAQ,EAAEC,KAAMC,CAAAA,MAAMA,CAAC,CAChC;"}
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -2,5 +2,5 @@ export * from '@tanstack/devtools';
|
|
|
2
2
|
/**
|
|
3
3
|
* Export every hook individually - DON'T export from barrel files
|
|
4
4
|
*/
|
|
5
|
-
export {
|
|
5
|
+
export { TanStackDevtools } from './devtools.js';
|
|
6
6
|
export type { TanStackDevtoolsSolidPlugin } from './core.js';
|
package/dist/esm/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tanstack/solid-devtools",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "TanStack Devtools is a set of tools for building advanced devtools for your Solid application.",
|
|
5
5
|
"author": "Tanner Linsley",
|
|
6
6
|
"license": "MIT",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"src"
|
|
45
45
|
],
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@tanstack/devtools": "0.
|
|
47
|
+
"@tanstack/devtools": "0.4.0"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"solid-js": "^1.9.7",
|
package/src/core.tsx
CHANGED
|
@@ -62,14 +62,14 @@ export type TanStackDevtoolsSolidPlugin = Omit<
|
|
|
62
62
|
*/
|
|
63
63
|
name: string | SolidPluginRender
|
|
64
64
|
}
|
|
65
|
-
export interface
|
|
65
|
+
export interface TanStackDevtoolsInit {
|
|
66
66
|
/**
|
|
67
67
|
* Array of plugins to be used in the devtools.
|
|
68
68
|
* Each plugin should have a `render` function that returns a React element or a function
|
|
69
69
|
*
|
|
70
70
|
* Example:
|
|
71
71
|
* ```jsx
|
|
72
|
-
* <
|
|
72
|
+
* <TanStackDevtools
|
|
73
73
|
* plugins={[
|
|
74
74
|
* {
|
|
75
75
|
* id: "your-plugin-id",
|
|
@@ -97,7 +97,7 @@ export default function SolidDevtoolsCore({
|
|
|
97
97
|
config,
|
|
98
98
|
plugins,
|
|
99
99
|
eventBusConfig,
|
|
100
|
-
}:
|
|
100
|
+
}: TanStackDevtoolsInit) {
|
|
101
101
|
const [devtools] = createSignal(
|
|
102
102
|
new TanStackDevtoolsCore({
|
|
103
103
|
config,
|
|
@@ -126,5 +126,5 @@ export default function SolidDevtoolsCore({
|
|
|
126
126
|
})
|
|
127
127
|
}
|
|
128
128
|
})
|
|
129
|
-
return <div style={{
|
|
129
|
+
return <div style={{ position: 'absolute' }} ref={devToolRef} />
|
|
130
130
|
}
|
package/src/devtools.tsx
CHANGED
package/src/index.ts
CHANGED