@tanstack/solid-devtools 0.0.0 → 0.1.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 +26 -0
- package/dist/cjs/devtools.cjs +25 -4
- package/dist/cjs/devtools.cjs.map +1 -1
- package/dist/cjs/devtools.d.cts +13 -2
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/index.d.cts +2 -1
- package/dist/esm/devtools.d.ts +13 -2
- package/dist/esm/devtools.js +27 -6
- package/dist/esm/devtools.js.map +1 -1
- package/dist/esm/index.d.ts +2 -1
- package/dist/esm/index.js +2 -2
- package/package.json +6 -11
- package/src/devtools.tsx +45 -5
- package/src/index.ts +2 -1
package/README.md
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# @tanstack/solid-devtools
|
|
2
|
+
|
|
3
|
+
This package is still under active development and might have breaking changes in the future. Please use it with caution.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import { TanstackDevtools } from '@tanstack/solid-devtools'
|
|
9
|
+
import { TanStackRouterDevtoolsPanel } from '@tanstack/solid-router-devtools'
|
|
10
|
+
|
|
11
|
+
function App() {
|
|
12
|
+
return (
|
|
13
|
+
<div>
|
|
14
|
+
<h1>My App</h1>
|
|
15
|
+
<TanstackDevtools
|
|
16
|
+
plugins={[
|
|
17
|
+
{
|
|
18
|
+
name: 'Tanstack Router',
|
|
19
|
+
render: <TanStackRouterDevtoolsPanel router={router} />,
|
|
20
|
+
},
|
|
21
|
+
]}
|
|
22
|
+
/>
|
|
23
|
+
</div>
|
|
24
|
+
)
|
|
25
|
+
}
|
|
26
|
+
```
|
package/dist/cjs/devtools.cjs
CHANGED
|
@@ -4,11 +4,32 @@ const web = require("solid-js/web");
|
|
|
4
4
|
const devtools = require("@tanstack/devtools");
|
|
5
5
|
const solidJs = require("solid-js");
|
|
6
6
|
var _tmpl$ = /* @__PURE__ */ web.template(`<div>`);
|
|
7
|
-
const
|
|
8
|
-
|
|
7
|
+
const convertRender = (el, Component) => web.createComponent(web.Portal, {
|
|
8
|
+
mount: el,
|
|
9
|
+
get children() {
|
|
10
|
+
return typeof Component === "function" ? web.createComponent(Component, {}) : Component;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
const TanstackDevtools = ({
|
|
14
|
+
config,
|
|
15
|
+
plugins
|
|
16
|
+
}) => {
|
|
17
|
+
const [devtools$1] = solidJs.createSignal(new devtools.TanStackDevtoolsCore({
|
|
18
|
+
config,
|
|
19
|
+
plugins: plugins?.map((plugin) => ({
|
|
20
|
+
...plugin,
|
|
21
|
+
name: typeof plugin.name === "string" ? plugin.name : (
|
|
22
|
+
// The check above confirms that `plugin.name` is of Render type
|
|
23
|
+
(el) => convertRender(el, plugin.name)
|
|
24
|
+
),
|
|
25
|
+
render: (el) => convertRender(el, plugin.render)
|
|
26
|
+
}))
|
|
27
|
+
}));
|
|
9
28
|
let devToolRef;
|
|
10
29
|
solidJs.createEffect(() => {
|
|
11
|
-
devtools$1().
|
|
30
|
+
devtools$1().setConfig({
|
|
31
|
+
config
|
|
32
|
+
});
|
|
12
33
|
});
|
|
13
34
|
solidJs.onMount(() => {
|
|
14
35
|
if (devToolRef) {
|
|
@@ -25,5 +46,5 @@ const Devtools = (opts) => {
|
|
|
25
46
|
return _el$;
|
|
26
47
|
})();
|
|
27
48
|
};
|
|
28
|
-
exports.
|
|
49
|
+
exports.TanstackDevtools = TanstackDevtools;
|
|
29
50
|
//# sourceMappingURL=devtools.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"devtools.cjs","sources":["../../src/devtools.tsx"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"devtools.cjs","sources":["../../src/devtools.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 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 render: SolidPluginRender\n name: string | SolidPluginRender\n}\ninterface TanstackDevtoolsInit {\n plugins?: Array<TanStackDevtoolsSolidPlugin>\n config?: TanStackDevtoolsConfig\n}\n\nexport const TanstackDevtools = ({ config, plugins }: TanstackDevtoolsInit) => {\n const [devtools] = createSignal(\n new TanStackDevtoolsCore({\n config,\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 ref={devToolRef} />\n}\n"],"names":["convertRender","el","Component","_$createComponent","Portal","mount","children","TanstackDevtools","config","plugins","devtools","createSignal","TanStackDevtoolsCore","map","plugin","name","render","devToolRef","createEffect","setConfig","onMount","onCleanup","unmount","_el$","_tmpl$","_ref$","_$use"],"mappings":";;;;;;AAUA,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;AAgBzD,MAAMK,mBAAmBA,CAAC;AAAA,EAAEC;AAAAA,EAAQC;AAA8B,MAAM;AAC7E,QAAM,CAACC,UAAQ,IAAIC,QAAAA,aACjB,IAAIC,SAAAA,qBAAqB;AAAA,IACvBJ;AAAAA,IACAC,SAASA,SAASI,IAAKC,CAAAA,YAAY;AAAA,MACjC,GAAGA;AAAAA,MACHC,MACE,OAAOD,OAAOC,SAAS,WACnBD,OAAOC;AAAAA;AAAAA,QAENd,CAAAA,OAAOD,cAAcC,IAAIa,OAAOC,IAAyB;AAAA;AAAA,MAChEC,QAAQA,CAACf,OAAuBD,cAAcC,IAAIa,OAAOE,MAAM;AAAA,IAAA,EAC/D;AAAA,EAAA,CACH,CACH;AACA,MAAIC;AACJC,UAAAA,aAAa,MAAM;AACjBR,eAAAA,EAAWS,UAAU;AAAA,MAAEX;AAAAA,IAAAA,CAAQ;AAAA,EACjC,CAAC;AACDY,UAAAA,QAAQ,MAAM;AACZ,QAAIH,YAAY;AACdP,iBAAAA,EAAWL,MAAMY,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,QAAiBR;AAAU,WAAAQ,UAAA,aAAAC,IAAAA,IAAAD,OAAAF,IAAA,IAAVN,aAAUM;AAAA,WAAAA;AAAAA,EAAA,GAAA;AAC7B;;"}
|
package/dist/cjs/devtools.d.cts
CHANGED
|
@@ -1,2 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { JSX } from 'solid-js';
|
|
2
|
+
import { TanStackDevtoolsConfig, TanStackDevtoolsPlugin } from '@tanstack/devtools';
|
|
3
|
+
type SolidPluginRender = JSX.Element | (() => JSX.Element);
|
|
4
|
+
export type TanStackDevtoolsSolidPlugin = Omit<TanStackDevtoolsPlugin, 'render' | 'name'> & {
|
|
5
|
+
render: SolidPluginRender;
|
|
6
|
+
name: string | SolidPluginRender;
|
|
7
|
+
};
|
|
8
|
+
interface TanstackDevtoolsInit {
|
|
9
|
+
plugins?: Array<TanStackDevtoolsSolidPlugin>;
|
|
10
|
+
config?: TanStackDevtoolsConfig;
|
|
11
|
+
}
|
|
12
|
+
export declare const TanstackDevtools: ({ config, plugins }: TanstackDevtoolsInit) => JSX.Element;
|
|
13
|
+
export {};
|
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,4 +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
|
+
export type { TanStackDevtoolsSolidPlugin } from './devtools.cjs';
|
package/dist/esm/devtools.d.ts
CHANGED
|
@@ -1,2 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { JSX } from 'solid-js';
|
|
2
|
+
import { TanStackDevtoolsConfig, TanStackDevtoolsPlugin } from '@tanstack/devtools';
|
|
3
|
+
type SolidPluginRender = JSX.Element | (() => JSX.Element);
|
|
4
|
+
export type TanStackDevtoolsSolidPlugin = Omit<TanStackDevtoolsPlugin, 'render' | 'name'> & {
|
|
5
|
+
render: SolidPluginRender;
|
|
6
|
+
name: string | SolidPluginRender;
|
|
7
|
+
};
|
|
8
|
+
interface TanstackDevtoolsInit {
|
|
9
|
+
plugins?: Array<TanStackDevtoolsSolidPlugin>;
|
|
10
|
+
config?: TanStackDevtoolsConfig;
|
|
11
|
+
}
|
|
12
|
+
export declare const TanstackDevtools: ({ config, plugins }: TanstackDevtoolsInit) => JSX.Element;
|
|
13
|
+
export {};
|
package/dist/esm/devtools.js
CHANGED
|
@@ -1,12 +1,33 @@
|
|
|
1
|
-
import { template, use } from "solid-js/web";
|
|
2
|
-
import {
|
|
1
|
+
import { createComponent, template, use, Portal } from "solid-js/web";
|
|
2
|
+
import { TanStackDevtoolsCore } from "@tanstack/devtools";
|
|
3
3
|
import { createSignal, createEffect, onMount, onCleanup } from "solid-js";
|
|
4
4
|
var _tmpl$ = /* @__PURE__ */ template(`<div>`);
|
|
5
|
-
const
|
|
6
|
-
|
|
5
|
+
const convertRender = (el, Component) => createComponent(Portal, {
|
|
6
|
+
mount: el,
|
|
7
|
+
get children() {
|
|
8
|
+
return typeof Component === "function" ? createComponent(Component, {}) : Component;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const TanstackDevtools = ({
|
|
12
|
+
config,
|
|
13
|
+
plugins
|
|
14
|
+
}) => {
|
|
15
|
+
const [devtools] = createSignal(new TanStackDevtoolsCore({
|
|
16
|
+
config,
|
|
17
|
+
plugins: plugins?.map((plugin) => ({
|
|
18
|
+
...plugin,
|
|
19
|
+
name: typeof plugin.name === "string" ? plugin.name : (
|
|
20
|
+
// The check above confirms that `plugin.name` is of Render type
|
|
21
|
+
(el) => convertRender(el, plugin.name)
|
|
22
|
+
),
|
|
23
|
+
render: (el) => convertRender(el, plugin.render)
|
|
24
|
+
}))
|
|
25
|
+
}));
|
|
7
26
|
let devToolRef;
|
|
8
27
|
createEffect(() => {
|
|
9
|
-
devtools().
|
|
28
|
+
devtools().setConfig({
|
|
29
|
+
config
|
|
30
|
+
});
|
|
10
31
|
});
|
|
11
32
|
onMount(() => {
|
|
12
33
|
if (devToolRef) {
|
|
@@ -24,6 +45,6 @@ const Devtools = (opts) => {
|
|
|
24
45
|
})();
|
|
25
46
|
};
|
|
26
47
|
export {
|
|
27
|
-
|
|
48
|
+
TanstackDevtools
|
|
28
49
|
};
|
|
29
50
|
//# 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 {
|
|
1
|
+
{"version":3,"file":"devtools.js","sources":["../../src/devtools.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 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 render: SolidPluginRender\n name: string | SolidPluginRender\n}\ninterface TanstackDevtoolsInit {\n plugins?: Array<TanStackDevtoolsSolidPlugin>\n config?: TanStackDevtoolsConfig\n}\n\nexport const TanstackDevtools = ({ config, plugins }: TanstackDevtoolsInit) => {\n const [devtools] = createSignal(\n new TanStackDevtoolsCore({\n config,\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 ref={devToolRef} />\n}\n"],"names":["convertRender","el","Component","_$createComponent","Portal","mount","children","TanstackDevtools","config","plugins","devtools","createSignal","TanStackDevtoolsCore","map","plugin","name","render","devToolRef","createEffect","setConfig","onMount","onCleanup","unmount","_el$","_tmpl$","_ref$","_$use"],"mappings":";;;;AAUA,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;AAgBzD,MAAMK,mBAAmBA,CAAC;AAAA,EAAEC;AAAAA,EAAQC;AAA8B,MAAM;AAC7E,QAAM,CAACC,QAAQ,IAAIC,aACjB,IAAIC,qBAAqB;AAAA,IACvBJ;AAAAA,IACAC,SAASA,SAASI,IAAKC,CAAAA,YAAY;AAAA,MACjC,GAAGA;AAAAA,MACHC,MACE,OAAOD,OAAOC,SAAS,WACnBD,OAAOC;AAAAA;AAAAA,QAENd,CAAAA,OAAOD,cAAcC,IAAIa,OAAOC,IAAyB;AAAA;AAAA,MAChEC,QAAQA,CAACf,OAAuBD,cAAcC,IAAIa,OAAOE,MAAM;AAAA,IAAA,EAC/D;AAAA,EAAA,CACH,CACH;AACA,MAAIC;AACJC,eAAa,MAAM;AACjBR,aAAAA,EAAWS,UAAU;AAAA,MAAEX;AAAAA,IAAAA,CAAQ;AAAA,EACjC,CAAC;AACDY,UAAQ,MAAM;AACZ,QAAIH,YAAY;AACdP,eAAAA,EAAWL,MAAMY,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,QAAiBR;AAAU,WAAAQ,UAAA,aAAAC,IAAAD,OAAAF,IAAA,IAAVN,aAAUM;AAAA,WAAAA;AAAAA,EAAA,GAAA;AAC7B;"}
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -2,4 +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
|
+
export type { TanStackDevtoolsSolidPlugin } from './devtools.js';
|
package/dist/esm/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tanstack/solid-devtools",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.1.0",
|
|
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",
|
|
7
7
|
"repository": {
|
|
@@ -16,12 +16,7 @@
|
|
|
16
16
|
},
|
|
17
17
|
"keywords": [
|
|
18
18
|
"solid",
|
|
19
|
-
"devtools"
|
|
20
|
-
"autocomplete",
|
|
21
|
-
"dropdown",
|
|
22
|
-
"menu",
|
|
23
|
-
"headless-ui",
|
|
24
|
-
"nested"
|
|
19
|
+
"devtools"
|
|
25
20
|
],
|
|
26
21
|
"type": "module",
|
|
27
22
|
"types": "dist/esm/index.d.ts",
|
|
@@ -49,14 +44,14 @@
|
|
|
49
44
|
"src"
|
|
50
45
|
],
|
|
51
46
|
"dependencies": {
|
|
52
|
-
"@tanstack/devtools": "0.
|
|
47
|
+
"@tanstack/devtools": "0.1.0"
|
|
53
48
|
},
|
|
54
49
|
"devDependencies": {
|
|
55
|
-
"solid-js": "^1.9.
|
|
50
|
+
"solid-js": "^1.9.7",
|
|
56
51
|
"vite-plugin-solid": "^2.11.6"
|
|
57
52
|
},
|
|
58
53
|
"peerDependencies": {
|
|
59
|
-
"solid-js": ">=1.9.
|
|
54
|
+
"solid-js": ">=1.9.7"
|
|
60
55
|
},
|
|
61
56
|
"scripts": {
|
|
62
57
|
"clean": "premove ./build ./dist",
|
package/src/devtools.tsx
CHANGED
|
@@ -1,12 +1,52 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TanStackDevtoolsCore } from '@tanstack/devtools'
|
|
2
2
|
import { createEffect, createSignal, onCleanup, onMount } from 'solid-js'
|
|
3
|
-
import
|
|
3
|
+
import { Portal } from 'solid-js/web'
|
|
4
|
+
import type { JSX } from 'solid-js'
|
|
5
|
+
import type {
|
|
6
|
+
TanStackDevtoolsConfig,
|
|
7
|
+
TanStackDevtoolsPlugin,
|
|
8
|
+
} from '@tanstack/devtools'
|
|
4
9
|
|
|
5
|
-
|
|
6
|
-
|
|
10
|
+
type SolidPluginRender = JSX.Element | (() => JSX.Element)
|
|
11
|
+
const convertRender = (
|
|
12
|
+
el: HTMLDivElement | HTMLHeadingElement,
|
|
13
|
+
Component: SolidPluginRender,
|
|
14
|
+
) => (
|
|
15
|
+
<Portal mount={el}>
|
|
16
|
+
{typeof Component === 'function' ? <Component /> : Component}
|
|
17
|
+
</Portal>
|
|
18
|
+
)
|
|
19
|
+
|
|
20
|
+
export type TanStackDevtoolsSolidPlugin = Omit<
|
|
21
|
+
TanStackDevtoolsPlugin,
|
|
22
|
+
'render' | 'name'
|
|
23
|
+
> & {
|
|
24
|
+
render: SolidPluginRender
|
|
25
|
+
name: string | SolidPluginRender
|
|
26
|
+
}
|
|
27
|
+
interface TanstackDevtoolsInit {
|
|
28
|
+
plugins?: Array<TanStackDevtoolsSolidPlugin>
|
|
29
|
+
config?: TanStackDevtoolsConfig
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export const TanstackDevtools = ({ config, plugins }: TanstackDevtoolsInit) => {
|
|
33
|
+
const [devtools] = createSignal(
|
|
34
|
+
new TanStackDevtoolsCore({
|
|
35
|
+
config,
|
|
36
|
+
plugins: plugins?.map((plugin) => ({
|
|
37
|
+
...plugin,
|
|
38
|
+
name:
|
|
39
|
+
typeof plugin.name === 'string'
|
|
40
|
+
? plugin.name
|
|
41
|
+
: // The check above confirms that `plugin.name` is of Render type
|
|
42
|
+
(el) => convertRender(el, plugin.name as SolidPluginRender),
|
|
43
|
+
render: (el: HTMLDivElement) => convertRender(el, plugin.render),
|
|
44
|
+
})),
|
|
45
|
+
}),
|
|
46
|
+
)
|
|
7
47
|
let devToolRef: HTMLDivElement | undefined
|
|
8
48
|
createEffect(() => {
|
|
9
|
-
devtools().
|
|
49
|
+
devtools().setConfig({ config })
|
|
10
50
|
})
|
|
11
51
|
onMount(() => {
|
|
12
52
|
if (devToolRef) {
|
package/src/index.ts
CHANGED