@tanstack/solid-pacer-devtools 0.1.0 → 0.3.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.
@@ -1,3 +1,4 @@
1
1
  export interface PacerDevtoolsSolidInit {
2
+ theme?: 'light' | 'dark';
2
3
  }
3
- export declare const PacerDevtoolsPanel: (_props?: PacerDevtoolsSolidInit) => import("solid-js").JSX.Element;
4
+ export declare const PacerDevtoolsPanel: (props?: PacerDevtoolsSolidInit) => import("solid-js").JSX.Element;
@@ -2,12 +2,12 @@ import { template, use } from "solid-js/web";
2
2
  import { PacerDevtoolsCore } from "@tanstack/pacer-devtools";
3
3
  import { createSignal, onMount, onCleanup } from "solid-js";
4
4
  var _tmpl$ = /* @__PURE__ */ template(`<div>`);
5
- const PacerDevtoolsPanel = (_props) => {
5
+ const PacerDevtoolsPanel = (props) => {
6
6
  let devToolRef;
7
7
  const [devtools] = createSignal(new PacerDevtoolsCore({}));
8
8
  onMount(() => {
9
9
  if (devToolRef) {
10
- devtools().mount(devToolRef);
10
+ devtools().mount(devToolRef, props?.theme ?? "dark");
11
11
  onCleanup(() => {
12
12
  devtools().unmount();
13
13
  });
@@ -1 +1 @@
1
- {"version":3,"file":"SolidPacerDevtools.js","sources":["../../src/SolidPacerDevtools.tsx"],"sourcesContent":["import { PacerDevtoolsCore } from '@tanstack/pacer-devtools'\nimport { createSignal, onCleanup, onMount } from 'solid-js'\n\nexport interface PacerDevtoolsSolidInit {}\n\nexport const PacerDevtoolsPanel = (_props?: PacerDevtoolsSolidInit) => {\n let devToolRef: HTMLDivElement | undefined\n const [devtools] = createSignal(new PacerDevtoolsCore({}))\n onMount(() => {\n if (devToolRef) {\n devtools().mount(devToolRef)\n\n onCleanup(() => {\n devtools().unmount()\n })\n }\n })\n\n return <div style={{ height: '100%' }} ref={devToolRef} />\n}\n"],"names":["PacerDevtoolsPanel","_props","devToolRef","devtools","createSignal","PacerDevtoolsCore","onMount","mount","onCleanup","unmount","_el$","_tmpl$","_ref$","_$use","style","setProperty"],"mappings":";;;;AAKO,MAAMA,qBAAqBA,CAACC,WAAoC;AACrE,MAAIC;AACJ,QAAM,CAACC,QAAQ,IAAIC,aAAa,IAAIC,kBAAkB,CAAA,CAAE,CAAC;AACzDC,UAAQ,MAAM;AACZ,QAAIJ,YAAY;AACdC,eAAAA,EAAWI,MAAML,UAAU;AAE3BM,gBAAU,MAAM;AACdL,iBAAAA,EAAWM,QAAAA;AAAAA,MAAQ,CACpB;AAAA,IAAA;AAAA,EACH,CACD;AAED,UAAA,MAAA;AAAA,QAAAC,OAAAC,OAAAA;AAAA,QAAAC,QAA4CV;AAAU,WAAAU,UAAA,aAAAC,IAAAD,OAAAF,IAAA,IAAVR,aAAUQ;AAAAA,SAAAI,MAAAC,YAAA,UAAA,MAAA;AAAA,WAAAL;AAAAA,EAAAA,GAAA;AACxD;"}
1
+ {"version":3,"file":"SolidPacerDevtools.js","sources":["../../src/SolidPacerDevtools.tsx"],"sourcesContent":["import { PacerDevtoolsCore } from '@tanstack/pacer-devtools'\nimport { createSignal, onCleanup, onMount } from 'solid-js'\n\nexport interface PacerDevtoolsSolidInit {\n theme?: 'light' | 'dark'\n}\n\nexport const PacerDevtoolsPanel = (props?: PacerDevtoolsSolidInit) => {\n let devToolRef: HTMLDivElement | undefined\n const [devtools] = createSignal(new PacerDevtoolsCore({}))\n onMount(() => {\n if (devToolRef) {\n devtools().mount(devToolRef, props?.theme ?? 'dark')\n\n onCleanup(() => {\n devtools().unmount()\n })\n }\n })\n\n return <div style={{ height: '100%' }} ref={devToolRef} />\n}\n"],"names":["PacerDevtoolsPanel","props","devToolRef","devtools","createSignal","PacerDevtoolsCore","onMount","mount","theme","onCleanup","unmount","_el$","_tmpl$","_ref$","_$use","style","setProperty"],"mappings":";;;;AAOO,MAAMA,qBAAqBA,CAACC,UAAmC;AACpE,MAAIC;AACJ,QAAM,CAACC,QAAQ,IAAIC,aAAa,IAAIC,kBAAkB,CAAA,CAAE,CAAC;AACzDC,UAAQ,MAAM;AACZ,QAAIJ,YAAY;AACdC,eAAAA,EAAWI,MAAML,YAAYD,OAAOO,SAAS,MAAM;AAEnDC,gBAAU,MAAM;AACdN,iBAAAA,EAAWO,QAAAA;AAAAA,MAAQ,CACpB;AAAA,IAAA;AAAA,EACH,CACD;AAED,UAAA,MAAA;AAAA,QAAAC,OAAAC,OAAAA;AAAA,QAAAC,QAA4CX;AAAU,WAAAW,UAAA,aAAAC,IAAAD,OAAAF,IAAA,IAAVT,aAAUS;AAAAA,SAAAI,MAAAC,YAAA,UAAA,MAAA;AAAA,WAAAL;AAAAA,EAAAA,GAAA;AACxD;"}
@@ -1,3 +1,4 @@
1
1
  import * as Devtools from './SolidPacerDevtools.js';
2
2
  export declare const PacerDevtoolsPanel: (typeof Devtools)['PacerDevtoolsPanel'];
3
3
  export type { PacerDevtoolsSolidInit } from './SolidPacerDevtools.js';
4
+ export { pacerDevtoolsPlugin } from './plugin.js';
package/dist/esm/index.js CHANGED
@@ -1,9 +1,11 @@
1
1
  "use client";
2
2
  import { PacerDevtoolsPanel as PacerDevtoolsPanel$1 } from "./SolidPacerDevtools.js";
3
+ import { pacerDevtoolsPlugin } from "./plugin.js";
3
4
  const PacerDevtoolsPanel = process.env.NODE_ENV !== "development" ? function() {
4
5
  return null;
5
6
  } : PacerDevtoolsPanel$1;
6
7
  export {
7
- PacerDevtoolsPanel
8
+ PacerDevtoolsPanel,
9
+ pacerDevtoolsPlugin
8
10
  };
9
11
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../src/index.ts"],"sourcesContent":["'use client'\n\nimport * as Devtools from './SolidPacerDevtools'\n\nexport const PacerDevtoolsPanel: (typeof Devtools)['PacerDevtoolsPanel'] =\n process.env.NODE_ENV !== 'development'\n ? function () {\n return null\n }\n : Devtools.PacerDevtoolsPanel\n\nexport type { PacerDevtoolsSolidInit } from './SolidPacerDevtools'\n"],"names":[],"mappings":";;AAIO;AAGC;AACF;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../src/index.ts"],"sourcesContent":["'use client'\n\nimport * as Devtools from './SolidPacerDevtools'\n\nexport const PacerDevtoolsPanel: (typeof Devtools)['PacerDevtoolsPanel'] =\n process.env.NODE_ENV !== 'development'\n ? function () {\n return null\n }\n : Devtools.PacerDevtoolsPanel\n\nexport type { PacerDevtoolsSolidInit } from './SolidPacerDevtools'\n\nexport { pacerDevtoolsPlugin } from './plugin'\n"],"names":[],"mappings":";;;AAIO;AAGC;AACF;;;;;"}
@@ -0,0 +1,4 @@
1
+ export declare function pacerDevtoolsPlugin(): {
2
+ name: string;
3
+ render: (_el: HTMLElement, theme: "light" | "dark") => import("solid-js").JSX.Element;
4
+ };
@@ -0,0 +1,16 @@
1
+ import { createComponent } from "solid-js/web";
2
+ import { PacerDevtoolsPanel } from "./production.js";
3
+ function pacerDevtoolsPlugin() {
4
+ return {
5
+ name: "TanStack Pacer",
6
+ render: (_el, theme) => {
7
+ return createComponent(PacerDevtoolsPanel, {
8
+ theme
9
+ });
10
+ }
11
+ };
12
+ }
13
+ export {
14
+ pacerDevtoolsPlugin
15
+ };
16
+ //# sourceMappingURL=plugin-prod.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin-prod.js","sources":["../../src/plugin-prod.tsx"],"sourcesContent":["import { PacerDevtoolsPanel } from './production'\n\nexport function pacerDevtoolsPlugin() {\n return {\n name: 'TanStack Pacer',\n render: (_el: HTMLElement, theme: 'light' | 'dark') => {\n return <PacerDevtoolsPanel theme={theme} />\n },\n }\n}\n"],"names":["pacerDevtoolsPlugin","name","render","_el","theme","_$createComponent","PacerDevtoolsPanel"],"mappings":";;AAEO,SAASA,sBAAsB;AACpC,SAAO;AAAA,IACLC,MAAM;AAAA,IACNC,QAAQA,CAACC,KAAkBC,UAA4B;AACrD,aAAAC,gBAAQC,oBAAkB;AAAA,QAACF;AAAAA,MAAAA,CAAY;AAAA,IAAA;AAAA,EACzC;AAEJ;"}
@@ -0,0 +1,4 @@
1
+ export declare function pacerDevtoolsPlugin(): {
2
+ name: string;
3
+ render: (_el: HTMLElement, theme: "light" | "dark") => import("solid-js").JSX.Element;
4
+ };
@@ -0,0 +1,16 @@
1
+ import { createComponent } from "solid-js/web";
2
+ import { PacerDevtoolsPanel } from "./index.js";
3
+ function pacerDevtoolsPlugin() {
4
+ return {
5
+ name: "TanStack Pacer",
6
+ render: (_el, theme) => {
7
+ return createComponent(PacerDevtoolsPanel, {
8
+ theme
9
+ });
10
+ }
11
+ };
12
+ }
13
+ export {
14
+ pacerDevtoolsPlugin
15
+ };
16
+ //# sourceMappingURL=plugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.js","sources":["../../src/plugin.tsx"],"sourcesContent":["import { PacerDevtoolsPanel } from './index'\n\nexport function pacerDevtoolsPlugin() {\n return {\n name: 'TanStack Pacer',\n render: (_el: HTMLElement, theme: 'light' | 'dark') => {\n return <PacerDevtoolsPanel theme={theme} />\n },\n }\n}\n"],"names":["pacerDevtoolsPlugin","name","render","_el","theme","_$createComponent","PacerDevtoolsPanel"],"mappings":";;AAEO,SAASA,sBAAsB;AACpC,SAAO;AAAA,IACLC,MAAM;AAAA,IACNC,QAAQA,CAACC,KAAkBC,UAA4B;AACrD,aAAAC,gBAAQC,oBAAkB;AAAA,QAACF;AAAAA,MAAAA,CAAY;AAAA,IAAA;AAAA,EACzC;AAEJ;"}
@@ -1,3 +1,4 @@
1
1
  import * as Devtools from './SolidPacerDevtools.js';
2
- export declare const PacerDevtoolsPanel: (_props?: Devtools.PacerDevtoolsSolidInit) => import("solid-js").JSX.Element;
2
+ export declare const PacerDevtoolsPanel: (props?: Devtools.PacerDevtoolsSolidInit) => import("solid-js").JSX.Element;
3
3
  export type { PacerDevtoolsSolidInit } from './SolidPacerDevtools.js';
4
+ export { pacerDevtoolsPlugin } from './plugin-prod.js';
@@ -1,7 +1,9 @@
1
1
  "use client";
2
2
  import { PacerDevtoolsPanel as PacerDevtoolsPanel$1 } from "./SolidPacerDevtools.js";
3
+ import { pacerDevtoolsPlugin } from "./plugin-prod.js";
3
4
  const PacerDevtoolsPanel = PacerDevtoolsPanel$1;
4
5
  export {
5
- PacerDevtoolsPanel
6
+ PacerDevtoolsPanel,
7
+ pacerDevtoolsPlugin
6
8
  };
7
9
  //# sourceMappingURL=production.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"production.js","sources":["../../src/production.ts"],"sourcesContent":["'use client'\n\nimport * as Devtools from './SolidPacerDevtools'\n\nexport const PacerDevtoolsPanel = Devtools.PacerDevtoolsPanel\n\nexport type { PacerDevtoolsSolidInit } from './SolidPacerDevtools'\n"],"names":[],"mappings":";;AAIO;;;;"}
1
+ {"version":3,"file":"production.js","sources":["../../src/production.ts"],"sourcesContent":["'use client'\n\nimport * as Devtools from './SolidPacerDevtools'\n\nexport const PacerDevtoolsPanel = Devtools.PacerDevtoolsPanel\n\nexport type { PacerDevtoolsSolidInit } from './SolidPacerDevtools'\n\nexport { pacerDevtoolsPlugin } from './plugin-prod'\n"],"names":[],"mappings":";;;AAIO;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tanstack/solid-pacer-devtools",
3
- "version": "0.1.0",
3
+ "version": "0.3.0",
4
4
  "description": "Solid adapter for devtools for Pacer.",
5
5
  "author": "Tanner Linsley",
6
6
  "license": "MIT",
@@ -24,27 +24,18 @@
24
24
  ],
25
25
  "type": "module",
26
26
  "types": "dist/esm/index.d.ts",
27
- "main": "dist/cjs/index.cjs",
28
27
  "module": "dist/esm/index.js",
29
28
  "exports": {
30
29
  ".": {
31
30
  "import": {
32
31
  "types": "./dist/esm/index.d.ts",
33
32
  "default": "./dist/esm/index.js"
34
- },
35
- "require": {
36
- "types": "./dist/cjs/index.d.cts",
37
- "default": "./dist/cjs/index.cjs"
38
33
  }
39
34
  },
40
35
  "./production": {
41
36
  "import": {
42
37
  "types": "./dist/esm/production.d.ts",
43
38
  "default": "./dist/esm/production.js"
44
- },
45
- "require": {
46
- "types": "./dist/cjs/production.d.cts",
47
- "default": "./dist/cjs/production.cjs"
48
39
  }
49
40
  },
50
41
  "./package.json": "./package.json"
@@ -61,7 +52,7 @@
61
52
  "solid-js": ">=1.9.7"
62
53
  },
63
54
  "dependencies": {
64
- "@tanstack/pacer-devtools": "0.1.0"
55
+ "@tanstack/pacer-devtools": "0.3.0"
65
56
  },
66
57
  "devDependencies": {
67
58
  "vite-plugin-solid": "^2.11.8"
@@ -1,14 +1,16 @@
1
1
  import { PacerDevtoolsCore } from '@tanstack/pacer-devtools'
2
2
  import { createSignal, onCleanup, onMount } from 'solid-js'
3
3
 
4
- export interface PacerDevtoolsSolidInit {}
4
+ export interface PacerDevtoolsSolidInit {
5
+ theme?: 'light' | 'dark'
6
+ }
5
7
 
6
- export const PacerDevtoolsPanel = (_props?: PacerDevtoolsSolidInit) => {
8
+ export const PacerDevtoolsPanel = (props?: PacerDevtoolsSolidInit) => {
7
9
  let devToolRef: HTMLDivElement | undefined
8
10
  const [devtools] = createSignal(new PacerDevtoolsCore({}))
9
11
  onMount(() => {
10
12
  if (devToolRef) {
11
- devtools().mount(devToolRef)
13
+ devtools().mount(devToolRef, props?.theme ?? 'dark')
12
14
 
13
15
  onCleanup(() => {
14
16
  devtools().unmount()
package/src/index.ts CHANGED
@@ -10,3 +10,5 @@ export const PacerDevtoolsPanel: (typeof Devtools)['PacerDevtoolsPanel'] =
10
10
  : Devtools.PacerDevtoolsPanel
11
11
 
12
12
  export type { PacerDevtoolsSolidInit } from './SolidPacerDevtools'
13
+
14
+ export { pacerDevtoolsPlugin } from './plugin'
@@ -0,0 +1,10 @@
1
+ import { PacerDevtoolsPanel } from './production'
2
+
3
+ export function pacerDevtoolsPlugin() {
4
+ return {
5
+ name: 'TanStack Pacer',
6
+ render: (_el: HTMLElement, theme: 'light' | 'dark') => {
7
+ return <PacerDevtoolsPanel theme={theme} />
8
+ },
9
+ }
10
+ }
package/src/plugin.tsx ADDED
@@ -0,0 +1,10 @@
1
+ import { PacerDevtoolsPanel } from './index'
2
+
3
+ export function pacerDevtoolsPlugin() {
4
+ return {
5
+ name: 'TanStack Pacer',
6
+ render: (_el: HTMLElement, theme: 'light' | 'dark') => {
7
+ return <PacerDevtoolsPanel theme={theme} />
8
+ },
9
+ }
10
+ }
package/src/production.ts CHANGED
@@ -5,3 +5,5 @@ import * as Devtools from './SolidPacerDevtools'
5
5
  export const PacerDevtoolsPanel = Devtools.PacerDevtoolsPanel
6
6
 
7
7
  export type { PacerDevtoolsSolidInit } from './SolidPacerDevtools'
8
+
9
+ export { pacerDevtoolsPlugin } from './plugin-prod'
@@ -1,27 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const web = require("solid-js/web");
4
- const pacerDevtools = require("@tanstack/pacer-devtools");
5
- const solidJs = require("solid-js");
6
- var _tmpl$ = /* @__PURE__ */ web.template(`<div>`);
7
- const PacerDevtoolsPanel = (_props) => {
8
- let devToolRef;
9
- const [devtools] = solidJs.createSignal(new pacerDevtools.PacerDevtoolsCore({}));
10
- solidJs.onMount(() => {
11
- if (devToolRef) {
12
- devtools().mount(devToolRef);
13
- solidJs.onCleanup(() => {
14
- devtools().unmount();
15
- });
16
- }
17
- });
18
- return (() => {
19
- var _el$ = _tmpl$();
20
- var _ref$ = devToolRef;
21
- typeof _ref$ === "function" ? web.use(_ref$, _el$) : devToolRef = _el$;
22
- _el$.style.setProperty("height", "100%");
23
- return _el$;
24
- })();
25
- };
26
- exports.PacerDevtoolsPanel = PacerDevtoolsPanel;
27
- //# sourceMappingURL=SolidPacerDevtools.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SolidPacerDevtools.cjs","sources":["../../src/SolidPacerDevtools.tsx"],"sourcesContent":["import { PacerDevtoolsCore } from '@tanstack/pacer-devtools'\nimport { createSignal, onCleanup, onMount } from 'solid-js'\n\nexport interface PacerDevtoolsSolidInit {}\n\nexport const PacerDevtoolsPanel = (_props?: PacerDevtoolsSolidInit) => {\n let devToolRef: HTMLDivElement | undefined\n const [devtools] = createSignal(new PacerDevtoolsCore({}))\n onMount(() => {\n if (devToolRef) {\n devtools().mount(devToolRef)\n\n onCleanup(() => {\n devtools().unmount()\n })\n }\n })\n\n return <div style={{ height: '100%' }} ref={devToolRef} />\n}\n"],"names":["PacerDevtoolsPanel","_props","devToolRef","devtools","createSignal","PacerDevtoolsCore","onMount","mount","onCleanup","unmount","_el$","_tmpl$","_ref$","_$use","style","setProperty"],"mappings":";;;;;;AAKO,MAAMA,qBAAqBA,CAACC,WAAoC;AACrE,MAAIC;AACJ,QAAM,CAACC,QAAQ,IAAIC,QAAAA,aAAa,IAAIC,cAAAA,kBAAkB,CAAA,CAAE,CAAC;AACzDC,UAAAA,QAAQ,MAAM;AACZ,QAAIJ,YAAY;AACdC,eAAAA,EAAWI,MAAML,UAAU;AAE3BM,cAAAA,UAAU,MAAM;AACdL,iBAAAA,EAAWM,QAAAA;AAAAA,MAAQ,CACpB;AAAA,IAAA;AAAA,EACH,CACD;AAED,UAAA,MAAA;AAAA,QAAAC,OAAAC,OAAAA;AAAA,QAAAC,QAA4CV;AAAU,WAAAU,UAAA,aAAAC,IAAAA,IAAAD,OAAAF,IAAA,IAAVR,aAAUQ;AAAAA,SAAAI,MAAAC,YAAA,UAAA,MAAA;AAAA,WAAAL;AAAAA,EAAAA,GAAA;AACxD;;"}
@@ -1,3 +0,0 @@
1
- export interface PacerDevtoolsSolidInit {
2
- }
3
- export declare const PacerDevtoolsPanel: (_props?: PacerDevtoolsSolidInit) => import("solid-js").JSX.Element;
@@ -1,9 +0,0 @@
1
- "use client";
2
- "use strict";
3
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
- const SolidPacerDevtools = require("./SolidPacerDevtools.cjs");
5
- const PacerDevtoolsPanel = process.env.NODE_ENV !== "development" ? function() {
6
- return null;
7
- } : SolidPacerDevtools.PacerDevtoolsPanel;
8
- exports.PacerDevtoolsPanel = PacerDevtoolsPanel;
9
- //# sourceMappingURL=index.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.cjs","sources":["../../src/index.ts"],"sourcesContent":["'use client'\n\nimport * as Devtools from './SolidPacerDevtools'\n\nexport const PacerDevtoolsPanel: (typeof Devtools)['PacerDevtoolsPanel'] =\n process.env.NODE_ENV !== 'development'\n ? function () {\n return null\n }\n : Devtools.PacerDevtoolsPanel\n\nexport type { PacerDevtoolsSolidInit } from './SolidPacerDevtools'\n"],"names":[],"mappings":";;;;AAIO;AAGC;AACF;;"}
@@ -1,3 +0,0 @@
1
- import * as Devtools from './SolidPacerDevtools.cjs';
2
- export declare const PacerDevtoolsPanel: (typeof Devtools)['PacerDevtoolsPanel'];
3
- export type { PacerDevtoolsSolidInit } from './SolidPacerDevtools.cjs';
@@ -1,7 +0,0 @@
1
- "use client";
2
- "use strict";
3
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
- const SolidPacerDevtools = require("./SolidPacerDevtools.cjs");
5
- const PacerDevtoolsPanel = SolidPacerDevtools.PacerDevtoolsPanel;
6
- exports.PacerDevtoolsPanel = PacerDevtoolsPanel;
7
- //# sourceMappingURL=production.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"production.cjs","sources":["../../src/production.ts"],"sourcesContent":["'use client'\n\nimport * as Devtools from './SolidPacerDevtools'\n\nexport const PacerDevtoolsPanel = Devtools.PacerDevtoolsPanel\n\nexport type { PacerDevtoolsSolidInit } from './SolidPacerDevtools'\n"],"names":[],"mappings":";;;;AAIO;;"}
@@ -1,3 +0,0 @@
1
- import * as Devtools from './SolidPacerDevtools.cjs';
2
- export declare const PacerDevtoolsPanel: (_props?: Devtools.PacerDevtoolsSolidInit) => import("solid-js").JSX.Element;
3
- export type { PacerDevtoolsSolidInit } from './SolidPacerDevtools.cjs';