@tanstack/solid-pacer-devtools 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/LICENSE +21 -0
- package/dist/cjs/SolidPacerDevtools.cjs +27 -0
- package/dist/cjs/SolidPacerDevtools.cjs.map +1 -0
- package/dist/cjs/SolidPacerDevtools.d.cts +3 -0
- package/dist/cjs/index.cjs +9 -0
- package/dist/cjs/index.cjs.map +1 -0
- package/dist/cjs/index.d.cts +3 -0
- package/dist/cjs/production.cjs +7 -0
- package/dist/cjs/production.cjs.map +1 -0
- package/dist/cjs/production.d.cts +3 -0
- package/dist/esm/SolidPacerDevtools.d.ts +3 -0
- package/dist/esm/SolidPacerDevtools.js +27 -0
- package/dist/esm/SolidPacerDevtools.js.map +1 -0
- package/dist/esm/index.d.ts +3 -0
- package/dist/esm/index.js +9 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/production.d.ts +3 -0
- package/dist/esm/production.js +7 -0
- package/dist/esm/production.js.map +1 -0
- package/package.json +79 -0
- package/src/SolidPacerDevtools.tsx +20 -0
- package/src/index.ts +12 -0
- package/src/production.ts +7 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Tanner Linsley
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,27 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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;;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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;;"}
|
|
@@ -0,0 +1,7 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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;;"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { template, use } from "solid-js/web";
|
|
2
|
+
import { PacerDevtoolsCore } from "@tanstack/pacer-devtools";
|
|
3
|
+
import { createSignal, onMount, onCleanup } from "solid-js";
|
|
4
|
+
var _tmpl$ = /* @__PURE__ */ template(`<div>`);
|
|
5
|
+
const PacerDevtoolsPanel = (_props) => {
|
|
6
|
+
let devToolRef;
|
|
7
|
+
const [devtools] = createSignal(new PacerDevtoolsCore({}));
|
|
8
|
+
onMount(() => {
|
|
9
|
+
if (devToolRef) {
|
|
10
|
+
devtools().mount(devToolRef);
|
|
11
|
+
onCleanup(() => {
|
|
12
|
+
devtools().unmount();
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
return (() => {
|
|
17
|
+
var _el$ = _tmpl$();
|
|
18
|
+
var _ref$ = devToolRef;
|
|
19
|
+
typeof _ref$ === "function" ? use(_ref$, _el$) : devToolRef = _el$;
|
|
20
|
+
_el$.style.setProperty("height", "100%");
|
|
21
|
+
return _el$;
|
|
22
|
+
})();
|
|
23
|
+
};
|
|
24
|
+
export {
|
|
25
|
+
PacerDevtoolsPanel
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=SolidPacerDevtools.js.map
|
|
@@ -0,0 +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;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { PacerDevtoolsPanel as PacerDevtoolsPanel$1 } from "./SolidPacerDevtools.js";
|
|
3
|
+
const PacerDevtoolsPanel = process.env.NODE_ENV !== "development" ? function() {
|
|
4
|
+
return null;
|
|
5
|
+
} : PacerDevtoolsPanel$1;
|
|
6
|
+
export {
|
|
7
|
+
PacerDevtoolsPanel
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +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;;;;"}
|
|
@@ -0,0 +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;;;;"}
|
package/package.json
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@tanstack/solid-pacer-devtools",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Solid adapter for devtools for Pacer.",
|
|
5
|
+
"author": "Tanner Linsley",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/TanStack/pacer.git",
|
|
10
|
+
"directory": "packages/pacer"
|
|
11
|
+
},
|
|
12
|
+
"homepage": "https://tanstack.com/pacer",
|
|
13
|
+
"funding": {
|
|
14
|
+
"type": "github",
|
|
15
|
+
"url": "https://github.com/sponsors/tannerlinsley"
|
|
16
|
+
},
|
|
17
|
+
"keywords": [
|
|
18
|
+
"debounce",
|
|
19
|
+
"throttle",
|
|
20
|
+
"rate-limit",
|
|
21
|
+
"queuer",
|
|
22
|
+
"queue",
|
|
23
|
+
"pacer"
|
|
24
|
+
],
|
|
25
|
+
"type": "module",
|
|
26
|
+
"types": "dist/esm/index.d.ts",
|
|
27
|
+
"main": "dist/cjs/index.cjs",
|
|
28
|
+
"module": "dist/esm/index.js",
|
|
29
|
+
"exports": {
|
|
30
|
+
".": {
|
|
31
|
+
"import": {
|
|
32
|
+
"types": "./dist/esm/index.d.ts",
|
|
33
|
+
"default": "./dist/esm/index.js"
|
|
34
|
+
},
|
|
35
|
+
"require": {
|
|
36
|
+
"types": "./dist/cjs/index.d.cts",
|
|
37
|
+
"default": "./dist/cjs/index.cjs"
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"./production": {
|
|
41
|
+
"import": {
|
|
42
|
+
"types": "./dist/esm/production.d.ts",
|
|
43
|
+
"default": "./dist/esm/production.js"
|
|
44
|
+
},
|
|
45
|
+
"require": {
|
|
46
|
+
"types": "./dist/cjs/production.d.cts",
|
|
47
|
+
"default": "./dist/cjs/production.cjs"
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"./package.json": "./package.json"
|
|
51
|
+
},
|
|
52
|
+
"sideEffects": false,
|
|
53
|
+
"engines": {
|
|
54
|
+
"node": ">=18"
|
|
55
|
+
},
|
|
56
|
+
"files": [
|
|
57
|
+
"dist/",
|
|
58
|
+
"src"
|
|
59
|
+
],
|
|
60
|
+
"peerDependencies": {
|
|
61
|
+
"solid-js": ">=1.9.7"
|
|
62
|
+
},
|
|
63
|
+
"dependencies": {
|
|
64
|
+
"@tanstack/pacer-devtools": "0.1.0"
|
|
65
|
+
},
|
|
66
|
+
"devDependencies": {
|
|
67
|
+
"vite-plugin-solid": "^2.11.8"
|
|
68
|
+
},
|
|
69
|
+
"scripts": {
|
|
70
|
+
"clean": "premove ./build ./dist",
|
|
71
|
+
"lint:fix": "eslint ./src --fix",
|
|
72
|
+
"test:eslint": "eslint ./src",
|
|
73
|
+
"test:lib": "vitest",
|
|
74
|
+
"test:lib:dev": "pnpm test:lib --watch",
|
|
75
|
+
"test:types": "tsc",
|
|
76
|
+
"test:build": "publint --strict",
|
|
77
|
+
"build": "vite build"
|
|
78
|
+
}
|
|
79
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { PacerDevtoolsCore } from '@tanstack/pacer-devtools'
|
|
2
|
+
import { createSignal, onCleanup, onMount } from 'solid-js'
|
|
3
|
+
|
|
4
|
+
export interface PacerDevtoolsSolidInit {}
|
|
5
|
+
|
|
6
|
+
export const PacerDevtoolsPanel = (_props?: PacerDevtoolsSolidInit) => {
|
|
7
|
+
let devToolRef: HTMLDivElement | undefined
|
|
8
|
+
const [devtools] = createSignal(new PacerDevtoolsCore({}))
|
|
9
|
+
onMount(() => {
|
|
10
|
+
if (devToolRef) {
|
|
11
|
+
devtools().mount(devToolRef)
|
|
12
|
+
|
|
13
|
+
onCleanup(() => {
|
|
14
|
+
devtools().unmount()
|
|
15
|
+
})
|
|
16
|
+
}
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
return <div style={{ height: '100%' }} ref={devToolRef} />
|
|
20
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
|
|
3
|
+
import * as Devtools from './SolidPacerDevtools'
|
|
4
|
+
|
|
5
|
+
export const PacerDevtoolsPanel: (typeof Devtools)['PacerDevtoolsPanel'] =
|
|
6
|
+
process.env.NODE_ENV !== 'development'
|
|
7
|
+
? function () {
|
|
8
|
+
return null
|
|
9
|
+
}
|
|
10
|
+
: Devtools.PacerDevtoolsPanel
|
|
11
|
+
|
|
12
|
+
export type { PacerDevtoolsSolidInit } from './SolidPacerDevtools'
|