@tanstack/pacer-devtools 1.3.1 → 1.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 +17 -2
- package/dist/{components-DZv7GBzY.js → components-BXAd-LGS.js} +25 -13
- package/dist/{components-hqYwCNDx.js → components-BwHXH_1Y.js} +20 -8
- package/dist/index.d.ts +0 -1
- package/dist/index.js +1 -1
- package/dist/production/index.d.ts +0 -1
- package/dist/production/index.js +1 -1
- package/dist/production/server.js +1 -1
- package/dist/server.js +1 -1
- package/package.json +8 -8
- package/src/styles/use-styles.ts +2 -2
package/README.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
<div align="center">
|
|
2
|
-
<
|
|
2
|
+
<picture>
|
|
3
|
+
<source
|
|
4
|
+
media="(prefers-color-scheme: dark)"
|
|
5
|
+
srcset="https://tanstack.com/api/readme/pacer.png?theme=dark"
|
|
6
|
+
/>
|
|
7
|
+
<source
|
|
8
|
+
media="(prefers-color-scheme: light)"
|
|
9
|
+
srcset="https://tanstack.com/api/readme/pacer.png"
|
|
10
|
+
/>
|
|
11
|
+
<img
|
|
12
|
+
src="https://tanstack.com/api/readme/pacer.png"
|
|
13
|
+
alt="TanStack Pacer"
|
|
14
|
+
width="900"
|
|
15
|
+
/>
|
|
16
|
+
</picture>
|
|
3
17
|
</div>
|
|
4
18
|
|
|
5
19
|
<br />
|
|
@@ -29,8 +43,9 @@
|
|
|
29
43
|
</div>
|
|
30
44
|
|
|
31
45
|
<div align="center">
|
|
32
|
-
|
|
46
|
+
|
|
33
47
|
### [Become a Sponsor!](https://github.com/sponsors/tannerlinsley/)
|
|
48
|
+
|
|
34
49
|
</div>
|
|
35
50
|
|
|
36
51
|
# TanStack Pacer
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createComponent, escape, ssr, ssrAttribute, ssrStyle, ssrStyleProperty } from "solid-js/web";
|
|
2
|
-
import { Header, HeaderLogo, JsonTree, MainPanel, ThemeContextProvider,
|
|
2
|
+
import { Header, HeaderLogo, JsonTree, MainPanel, ThemeContextProvider, createTheme } from "@tanstack/devtools-ui";
|
|
3
3
|
import { createStore, produce } from "solid-js/store";
|
|
4
4
|
import { For, Show, createContext, createEffect, createMemo, createSignal, onCleanup, onMount, useContext } from "solid-js";
|
|
5
5
|
import { getPacerDevtoolsInstance, pacerEventClient } from "@tanstack/pacer/event-client";
|
|
@@ -778,7 +778,7 @@ const stylesFactory = (theme) => {
|
|
|
778
778
|
};
|
|
779
779
|
};
|
|
780
780
|
function useStyles() {
|
|
781
|
-
const { theme } =
|
|
781
|
+
const { theme } = createTheme();
|
|
782
782
|
const [styles, setStyles] = createSignal(stylesFactory(theme()));
|
|
783
783
|
createEffect(() => {
|
|
784
784
|
setStyles(stylesFactory(theme()));
|
|
@@ -845,13 +845,15 @@ var _tmpl$$4 = [
|
|
|
845
845
|
"<div",
|
|
846
846
|
">",
|
|
847
847
|
"</div>"
|
|
848
|
-
]
|
|
848
|
+
];
|
|
849
|
+
var _tmpl$2$3 = [
|
|
849
850
|
"<div",
|
|
850
851
|
"><div",
|
|
851
852
|
">",
|
|
852
853
|
"</div>",
|
|
853
854
|
"</div>"
|
|
854
|
-
]
|
|
855
|
+
];
|
|
856
|
+
var _tmpl$3$2 = [
|
|
855
857
|
"<div",
|
|
856
858
|
"><div",
|
|
857
859
|
">",
|
|
@@ -900,7 +902,8 @@ function getPacerUtilStoreState(instance) {
|
|
|
900
902
|
}
|
|
901
903
|
//#endregion
|
|
902
904
|
//#region src/components/ActionButtons.tsx
|
|
903
|
-
var _tmpl$$3 = ["<div", ">No actions available for this util</div>"]
|
|
905
|
+
var _tmpl$$3 = ["<div", ">No actions available for this util</div>"];
|
|
906
|
+
var _tmpl$2$2 = [
|
|
904
907
|
"<div",
|
|
905
908
|
">",
|
|
906
909
|
"",
|
|
@@ -909,26 +912,31 @@ var _tmpl$$3 = ["<div", ">No actions available for this util</div>"], _tmpl$2$2
|
|
|
909
912
|
"",
|
|
910
913
|
"",
|
|
911
914
|
"</div>"
|
|
912
|
-
]
|
|
915
|
+
];
|
|
916
|
+
var _tmpl$3$1 = [
|
|
913
917
|
"<button",
|
|
914
918
|
"><span",
|
|
915
919
|
"></span>",
|
|
916
920
|
"</button>"
|
|
917
|
-
]
|
|
921
|
+
];
|
|
922
|
+
var _tmpl$4 = [
|
|
918
923
|
"<button",
|
|
919
924
|
"",
|
|
920
925
|
"><span",
|
|
921
926
|
"></span>Flush</button>"
|
|
922
|
-
]
|
|
927
|
+
];
|
|
928
|
+
var _tmpl$5 = [
|
|
923
929
|
"<button",
|
|
924
930
|
"",
|
|
925
931
|
"><span",
|
|
926
932
|
"></span>Cancel</button>"
|
|
927
|
-
]
|
|
933
|
+
];
|
|
934
|
+
var _tmpl$6 = [
|
|
928
935
|
"<button",
|
|
929
936
|
"><span",
|
|
930
937
|
"></span>Reset</button>"
|
|
931
|
-
]
|
|
938
|
+
];
|
|
939
|
+
var _tmpl$7 = [
|
|
932
940
|
"<button",
|
|
933
941
|
"",
|
|
934
942
|
"><span",
|
|
@@ -1073,7 +1081,9 @@ var _tmpl$$1 = [
|
|
|
1073
1081
|
"<div",
|
|
1074
1082
|
">",
|
|
1075
1083
|
"</div>"
|
|
1076
|
-
]
|
|
1084
|
+
];
|
|
1085
|
+
var _tmpl$2$1 = ["<div", ">Select a util from the left panel to view its state</div>"];
|
|
1086
|
+
var _tmpl$3 = [
|
|
1077
1087
|
"<div",
|
|
1078
1088
|
"><div",
|
|
1079
1089
|
"><div",
|
|
@@ -1127,7 +1137,8 @@ var _tmpl$ = [
|
|
|
1127
1137
|
"\"><div",
|
|
1128
1138
|
">Details</div>",
|
|
1129
1139
|
"</div></div>"
|
|
1130
|
-
]
|
|
1140
|
+
];
|
|
1141
|
+
var _tmpl$2 = [
|
|
1131
1142
|
"<div",
|
|
1132
1143
|
" style=\"",
|
|
1133
1144
|
"\">",
|
|
@@ -1171,7 +1182,8 @@ function Shell() {
|
|
|
1171
1182
|
if (!isDragging()) return;
|
|
1172
1183
|
e.preventDefault();
|
|
1173
1184
|
const deltaX = e.clientX - dragStartX;
|
|
1174
|
-
|
|
1185
|
+
const newWidth = Math.max(150, Math.min(800, dragStartWidth + deltaX));
|
|
1186
|
+
setLeftPanelWidth(newWidth);
|
|
1175
1187
|
};
|
|
1176
1188
|
const handleMouseUp = () => {
|
|
1177
1189
|
setIsDragging(false);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { className, createComponent, delegateEvents, effect, insert, memo, setStyleProperty, style, template, use } from "solid-js/web";
|
|
2
|
-
import { Header, HeaderLogo, JsonTree, MainPanel, ThemeContextProvider,
|
|
2
|
+
import { Header, HeaderLogo, JsonTree, MainPanel, ThemeContextProvider, createTheme } from "@tanstack/devtools-ui";
|
|
3
3
|
import { createStore, produce } from "solid-js/store";
|
|
4
4
|
import { For, Show, createContext, createEffect, createMemo, createSignal, onCleanup, onMount, useContext } from "solid-js";
|
|
5
5
|
import { getPacerDevtoolsInstance, pacerEventClient } from "@tanstack/pacer/event-client";
|
|
@@ -779,7 +779,7 @@ const stylesFactory = (theme) => {
|
|
|
779
779
|
};
|
|
780
780
|
};
|
|
781
781
|
function useStyles() {
|
|
782
|
-
const { theme } =
|
|
782
|
+
const { theme } = createTheme();
|
|
783
783
|
const [styles, setStyles] = createSignal(stylesFactory(theme()));
|
|
784
784
|
createEffect(() => {
|
|
785
785
|
setStyles(stylesFactory(theme()));
|
|
@@ -842,7 +842,9 @@ const UTIL_GROUPS = [
|
|
|
842
842
|
];
|
|
843
843
|
//#endregion
|
|
844
844
|
//#region src/components/UtilList.tsx
|
|
845
|
-
var _tmpl$$4 =
|
|
845
|
+
var _tmpl$$4 = /*#__PURE__*/ template(`<div>`);
|
|
846
|
+
var _tmpl$2$3 = /*#__PURE__*/ template(`<div><div>`);
|
|
847
|
+
var _tmpl$3$2 = /*#__PURE__*/ template(`<div><div></div><div>`);
|
|
846
848
|
function UtilList(props) {
|
|
847
849
|
const styles = useStyles();
|
|
848
850
|
return (() => {
|
|
@@ -921,7 +923,13 @@ function getPacerUtilStoreState(instance) {
|
|
|
921
923
|
}
|
|
922
924
|
//#endregion
|
|
923
925
|
//#region src/components/ActionButtons.tsx
|
|
924
|
-
var _tmpl$$3 =
|
|
926
|
+
var _tmpl$$3 = /*#__PURE__*/ template(`<div>No actions available for this util`);
|
|
927
|
+
var _tmpl$2$2 = /*#__PURE__*/ template(`<div>`);
|
|
928
|
+
var _tmpl$3$1 = /*#__PURE__*/ template(`<button><span>`);
|
|
929
|
+
var _tmpl$4 = /*#__PURE__*/ template(`<button><span></span>Flush`);
|
|
930
|
+
var _tmpl$5 = /*#__PURE__*/ template(`<button><span></span>Cancel`);
|
|
931
|
+
var _tmpl$6 = /*#__PURE__*/ template(`<button><span></span>Reset`);
|
|
932
|
+
var _tmpl$7 = /*#__PURE__*/ template(`<button><span></span>Clear`);
|
|
925
933
|
function ActionButtons(props) {
|
|
926
934
|
const styles = useStyles();
|
|
927
935
|
const utilInstance = props.instance;
|
|
@@ -1084,7 +1092,7 @@ function ActionButtons(props) {
|
|
|
1084
1092
|
delegateEvents(["mousedown"]);
|
|
1085
1093
|
//#endregion
|
|
1086
1094
|
//#region src/components/StateHeader.tsx
|
|
1087
|
-
var _tmpl$$2 =
|
|
1095
|
+
var _tmpl$$2 = /*#__PURE__*/ template(`<div><div></div><div style=display:flex;align-items:center;gap:16px><div><div>Key</div><div></div><div>Last Updated</div><div> (<!>)</div></div><div style=margin-left:auto;font-weight:bold>% reduction`);
|
|
1088
1096
|
dayjs.extend(relativeTime);
|
|
1089
1097
|
function reductionFromState(entry, state) {
|
|
1090
1098
|
if (!state) return 0;
|
|
@@ -1198,7 +1206,9 @@ function UtilStateJsonTree(props) {
|
|
|
1198
1206
|
}
|
|
1199
1207
|
//#endregion
|
|
1200
1208
|
//#region src/components/DetailsPanel.tsx
|
|
1201
|
-
var _tmpl$$1 =
|
|
1209
|
+
var _tmpl$$1 = /*#__PURE__*/ template(`<div>`);
|
|
1210
|
+
var _tmpl$2$1 = /*#__PURE__*/ template(`<div>Select a util from the left panel to view its state`);
|
|
1211
|
+
var _tmpl$3 = /*#__PURE__*/ template(`<div><div><div>Actions</div></div><div><div>State</div><div></div></div><div><div>Options</div><div>`);
|
|
1202
1212
|
function DetailsPanel(props) {
|
|
1203
1213
|
const styles = useStyles();
|
|
1204
1214
|
return (() => {
|
|
@@ -1265,7 +1275,8 @@ function DetailsPanel(props) {
|
|
|
1265
1275
|
}
|
|
1266
1276
|
//#endregion
|
|
1267
1277
|
//#region src/components/Shell.tsx
|
|
1268
|
-
var _tmpl$ =
|
|
1278
|
+
var _tmpl$ = /*#__PURE__*/ template(`<div><div style=min-width:150px;max-width:800px></div><div></div><div style=flex:1><div>Details`);
|
|
1279
|
+
var _tmpl$2 = /*#__PURE__*/ template(`<div>`);
|
|
1269
1280
|
function readResizeObserverBlockSize(entry) {
|
|
1270
1281
|
const [box] = entry.borderBoxSize;
|
|
1271
1282
|
if (box !== void 0) return box.blockSize;
|
|
@@ -1313,7 +1324,8 @@ function Shell() {
|
|
|
1313
1324
|
if (!isDragging()) return;
|
|
1314
1325
|
e.preventDefault();
|
|
1315
1326
|
const deltaX = e.clientX - dragStartX;
|
|
1316
|
-
|
|
1327
|
+
const newWidth = Math.max(150, Math.min(800, dragStartWidth + deltaX));
|
|
1328
|
+
setLeftPanelWidth(newWidth);
|
|
1317
1329
|
};
|
|
1318
1330
|
const handleMouseUp = () => {
|
|
1319
1331
|
setIsDragging(false);
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { constructCoreClass } from "@tanstack/devtools-utils/solid";
|
|
3
3
|
//#region src/core.tsx
|
|
4
|
-
const coreClasses = constructCoreClass(() => import("./components-
|
|
4
|
+
const coreClasses = constructCoreClass(() => import("./components-BwHXH_1Y.js"));
|
|
5
5
|
const PacerDevtoolsCore$1 = coreClasses[0];
|
|
6
6
|
const PacerDevtoolsCoreNoOp = coreClasses[1];
|
|
7
7
|
//#endregion
|
package/dist/production/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { constructCoreClass } from "@tanstack/devtools-utils/solid";
|
|
3
3
|
//#region src/core.tsx
|
|
4
|
-
const coreClasses = constructCoreClass(() => import("../components-
|
|
4
|
+
const coreClasses = constructCoreClass(() => import("../components-BwHXH_1Y.js"));
|
|
5
5
|
const PacerDevtoolsCore = coreClasses[0];
|
|
6
6
|
coreClasses[1];
|
|
7
7
|
//#endregion
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { constructCoreClass } from "@tanstack/devtools-utils/solid";
|
|
3
3
|
//#region src/core.tsx
|
|
4
|
-
const coreClasses = constructCoreClass(() => import("../components-
|
|
4
|
+
const coreClasses = constructCoreClass(() => import("../components-BXAd-LGS.js"));
|
|
5
5
|
const PacerDevtoolsCore = coreClasses[0];
|
|
6
6
|
coreClasses[1];
|
|
7
7
|
//#endregion
|
package/dist/server.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { constructCoreClass } from "@tanstack/devtools-utils/solid";
|
|
3
3
|
//#region src/core.tsx
|
|
4
|
-
const coreClasses = constructCoreClass(() => import("./components-
|
|
4
|
+
const coreClasses = constructCoreClass(() => import("./components-BXAd-LGS.js"));
|
|
5
5
|
const PacerDevtoolsCore$1 = coreClasses[0];
|
|
6
6
|
const PacerDevtoolsCoreNoOp = coreClasses[1];
|
|
7
7
|
//#endregion
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tanstack/pacer-devtools",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "Devtools for Pacer.",
|
|
5
5
|
"author": "Tanner Linsley",
|
|
6
6
|
"license": "MIT",
|
|
@@ -71,19 +71,19 @@
|
|
|
71
71
|
"@tanstack/pacer": ">=0.16.4"
|
|
72
72
|
},
|
|
73
73
|
"dependencies": {
|
|
74
|
-
"@tanstack/devtools-ui": "0.
|
|
75
|
-
"@tanstack/devtools-utils": "^0.
|
|
76
|
-
"@tanstack/solid-store": "^0.11.
|
|
74
|
+
"@tanstack/devtools-ui": "0.6.0",
|
|
75
|
+
"@tanstack/devtools-utils": "^0.6.0",
|
|
76
|
+
"@tanstack/solid-store": "^0.11.1",
|
|
77
77
|
"clsx": "^2.1.1",
|
|
78
78
|
"csstype": "^3.2.3",
|
|
79
|
-
"dayjs": "^1.11.
|
|
79
|
+
"dayjs": "^1.11.21",
|
|
80
80
|
"goober": "^2.1.19",
|
|
81
|
-
"solid-js": "^1.9.
|
|
81
|
+
"solid-js": "^1.9.14"
|
|
82
82
|
},
|
|
83
83
|
"devDependencies": {
|
|
84
84
|
"rolldown-plugin-solid": "^0.2.1",
|
|
85
|
-
"tsdown": "^0.22.
|
|
86
|
-
"vite-plugin-solid": "^2.11.
|
|
85
|
+
"tsdown": "^0.22.14",
|
|
86
|
+
"vite-plugin-solid": "^2.11.14"
|
|
87
87
|
},
|
|
88
88
|
"scripts": {
|
|
89
89
|
"clean": "premove ./build ./dist",
|
package/src/styles/use-styles.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as goober from 'goober'
|
|
2
2
|
import { createEffect, createSignal } from 'solid-js'
|
|
3
|
-
import {
|
|
3
|
+
import { createTheme } from '@tanstack/devtools-ui'
|
|
4
4
|
import { tokens } from './tokens'
|
|
5
5
|
|
|
6
6
|
const stylesFactory = (theme: 'light' | 'dark') => {
|
|
@@ -376,7 +376,7 @@ const stylesFactory = (theme: 'light' | 'dark') => {
|
|
|
376
376
|
}
|
|
377
377
|
|
|
378
378
|
export function useStyles() {
|
|
379
|
-
const { theme } =
|
|
379
|
+
const { theme } = createTheme()
|
|
380
380
|
const [styles, setStyles] = createSignal(stylesFactory(theme()))
|
|
381
381
|
createEffect(() => {
|
|
382
382
|
setStyles(stylesFactory(theme()))
|