@tanstack/pacer-devtools 1.3.0 → 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 CHANGED
@@ -1,5 +1,19 @@
1
1
  <div align="center">
2
- <img src="./media/header_pacer.png" >
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, useTheme } from "@tanstack/devtools-ui";
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";
@@ -416,6 +416,10 @@ const stylesFactory = (theme) => {
416
416
  const css = goober.css;
417
417
  const t = (light, dark) => theme === "light" ? light : dark;
418
418
  return {
419
+ /**
420
+ * Fills the devtools-utils portal div (height: 100%) and is a flex parent so MainPanel
421
+ * gets a real flex height budget (not just height: 100% without a flex chain).
422
+ */
419
423
  shellRoot: css`
420
424
  display: flex;
421
425
  flex-direction: column;
@@ -425,6 +429,7 @@ const stylesFactory = (theme) => {
425
429
  min-height: 0;
426
430
  overflow: hidden;
427
431
  `,
432
+ /** Overrides devtools-ui MainPanel overflow-y: auto so inner columns own scrolling */
428
433
  mainPanelShell: css`
429
434
  display: flex;
430
435
  flex-direction: column;
@@ -773,7 +778,7 @@ const stylesFactory = (theme) => {
773
778
  };
774
779
  };
775
780
  function useStyles() {
776
- const { theme } = useTheme();
781
+ const { theme } = createTheme();
777
782
  const [styles, setStyles] = createSignal(stylesFactory(theme()));
778
783
  createEffect(() => {
779
784
  setStyles(stylesFactory(theme()));
@@ -840,13 +845,15 @@ var _tmpl$$4 = [
840
845
  "<div",
841
846
  ">",
842
847
  "</div>"
843
- ], _tmpl$2$3 = [
848
+ ];
849
+ var _tmpl$2$3 = [
844
850
  "<div",
845
851
  "><div",
846
852
  ">",
847
853
  "</div>",
848
854
  "</div>"
849
- ], _tmpl$3$2 = [
855
+ ];
856
+ var _tmpl$3$2 = [
850
857
  "<div",
851
858
  "><div",
852
859
  ">",
@@ -895,7 +902,8 @@ function getPacerUtilStoreState(instance) {
895
902
  }
896
903
  //#endregion
897
904
  //#region src/components/ActionButtons.tsx
898
- var _tmpl$$3 = ["<div", ">No actions available for this util</div>"], _tmpl$2$2 = [
905
+ var _tmpl$$3 = ["<div", ">No actions available for this util</div>"];
906
+ var _tmpl$2$2 = [
899
907
  "<div",
900
908
  ">",
901
909
  "",
@@ -904,26 +912,31 @@ var _tmpl$$3 = ["<div", ">No actions available for this util</div>"], _tmpl$2$2
904
912
  "",
905
913
  "",
906
914
  "</div>"
907
- ], _tmpl$3$1 = [
915
+ ];
916
+ var _tmpl$3$1 = [
908
917
  "<button",
909
918
  "><span",
910
919
  "></span>",
911
920
  "</button>"
912
- ], _tmpl$4 = [
921
+ ];
922
+ var _tmpl$4 = [
913
923
  "<button",
914
924
  "",
915
925
  "><span",
916
926
  "></span>Flush</button>"
917
- ], _tmpl$5 = [
927
+ ];
928
+ var _tmpl$5 = [
918
929
  "<button",
919
930
  "",
920
931
  "><span",
921
932
  "></span>Cancel</button>"
922
- ], _tmpl$6 = [
933
+ ];
934
+ var _tmpl$6 = [
923
935
  "<button",
924
936
  "><span",
925
937
  "></span>Reset</button>"
926
- ], _tmpl$7 = [
938
+ ];
939
+ var _tmpl$7 = [
927
940
  "<button",
928
941
  "",
929
942
  "><span",
@@ -1068,7 +1081,9 @@ var _tmpl$$1 = [
1068
1081
  "<div",
1069
1082
  ">",
1070
1083
  "</div>"
1071
- ], _tmpl$2$1 = ["<div", ">Select a util from the left panel to view its state</div>"], _tmpl$3 = [
1084
+ ];
1085
+ var _tmpl$2$1 = ["<div", ">Select a util from the left panel to view its state</div>"];
1086
+ var _tmpl$3 = [
1072
1087
  "<div",
1073
1088
  "><div",
1074
1089
  "><div",
@@ -1122,7 +1137,8 @@ var _tmpl$ = [
1122
1137
  "\"><div",
1123
1138
  ">Details</div>",
1124
1139
  "</div></div>"
1125
- ], _tmpl$2 = [
1140
+ ];
1141
+ var _tmpl$2 = [
1126
1142
  "<div",
1127
1143
  " style=\"",
1128
1144
  "\">",
@@ -1166,7 +1182,8 @@ function Shell() {
1166
1182
  if (!isDragging()) return;
1167
1183
  e.preventDefault();
1168
1184
  const deltaX = e.clientX - dragStartX;
1169
- setLeftPanelWidth(Math.max(150, Math.min(800, dragStartWidth + deltaX)));
1185
+ const newWidth = Math.max(150, Math.min(800, dragStartWidth + deltaX));
1186
+ setLeftPanelWidth(newWidth);
1170
1187
  };
1171
1188
  const handleMouseUp = () => {
1172
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, useTheme } from "@tanstack/devtools-ui";
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";
@@ -417,6 +417,10 @@ const stylesFactory = (theme) => {
417
417
  const css = goober.css;
418
418
  const t = (light, dark) => theme === "light" ? light : dark;
419
419
  return {
420
+ /**
421
+ * Fills the devtools-utils portal div (height: 100%) and is a flex parent so MainPanel
422
+ * gets a real flex height budget (not just height: 100% without a flex chain).
423
+ */
420
424
  shellRoot: css`
421
425
  display: flex;
422
426
  flex-direction: column;
@@ -426,6 +430,7 @@ const stylesFactory = (theme) => {
426
430
  min-height: 0;
427
431
  overflow: hidden;
428
432
  `,
433
+ /** Overrides devtools-ui MainPanel overflow-y: auto so inner columns own scrolling */
429
434
  mainPanelShell: css`
430
435
  display: flex;
431
436
  flex-direction: column;
@@ -774,7 +779,7 @@ const stylesFactory = (theme) => {
774
779
  };
775
780
  };
776
781
  function useStyles() {
777
- const { theme } = useTheme();
782
+ const { theme } = createTheme();
778
783
  const [styles, setStyles] = createSignal(stylesFactory(theme()));
779
784
  createEffect(() => {
780
785
  setStyles(stylesFactory(theme()));
@@ -837,7 +842,9 @@ const UTIL_GROUPS = [
837
842
  ];
838
843
  //#endregion
839
844
  //#region src/components/UtilList.tsx
840
- var _tmpl$$4 = /* @__PURE__ */ template(`<div>`), _tmpl$2$3 = /* @__PURE__ */ template(`<div><div>`), _tmpl$3$2 = /* @__PURE__ */ template(`<div><div></div><div>`);
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>`);
841
848
  function UtilList(props) {
842
849
  const styles = useStyles();
843
850
  return (() => {
@@ -916,7 +923,13 @@ function getPacerUtilStoreState(instance) {
916
923
  }
917
924
  //#endregion
918
925
  //#region src/components/ActionButtons.tsx
919
- var _tmpl$$3 = /* @__PURE__ */ template(`<div>No actions available for this util`), _tmpl$2$2 = /* @__PURE__ */ template(`<div>`), _tmpl$3$1 = /* @__PURE__ */ template(`<button><span>`), _tmpl$4 = /* @__PURE__ */ template(`<button><span></span>Flush`), _tmpl$5 = /* @__PURE__ */ template(`<button><span></span>Cancel`), _tmpl$6 = /* @__PURE__ */ template(`<button><span></span>Reset`), _tmpl$7 = /* @__PURE__ */ template(`<button><span></span>Clear`);
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`);
920
933
  function ActionButtons(props) {
921
934
  const styles = useStyles();
922
935
  const utilInstance = props.instance;
@@ -1079,7 +1092,7 @@ function ActionButtons(props) {
1079
1092
  delegateEvents(["mousedown"]);
1080
1093
  //#endregion
1081
1094
  //#region src/components/StateHeader.tsx
1082
- 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`);
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`);
1083
1096
  dayjs.extend(relativeTime);
1084
1097
  function reductionFromState(entry, state) {
1085
1098
  if (!state) return 0;
@@ -1193,7 +1206,9 @@ function UtilStateJsonTree(props) {
1193
1206
  }
1194
1207
  //#endregion
1195
1208
  //#region src/components/DetailsPanel.tsx
1196
- var _tmpl$$1 = /* @__PURE__ */ template(`<div>`), _tmpl$2$1 = /* @__PURE__ */ template(`<div>Select a util from the left panel to view its state`), _tmpl$3 = /* @__PURE__ */ template(`<div><div><div>Actions</div></div><div><div>State</div><div></div></div><div><div>Options</div><div>`);
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>`);
1197
1212
  function DetailsPanel(props) {
1198
1213
  const styles = useStyles();
1199
1214
  return (() => {
@@ -1260,7 +1275,8 @@ function DetailsPanel(props) {
1260
1275
  }
1261
1276
  //#endregion
1262
1277
  //#region src/components/Shell.tsx
1263
- var _tmpl$ = /* @__PURE__ */ template(`<div><div style=min-width:150px;max-width:800px></div><div></div><div style=flex:1><div>Details`), _tmpl$2 = /* @__PURE__ */ template(`<div>`);
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>`);
1264
1280
  function readResizeObserverBlockSize(entry) {
1265
1281
  const [box] = entry.borderBoxSize;
1266
1282
  if (box !== void 0) return box.blockSize;
@@ -1308,7 +1324,8 @@ function Shell() {
1308
1324
  if (!isDragging()) return;
1309
1325
  e.preventDefault();
1310
1326
  const deltaX = e.clientX - dragStartX;
1311
- setLeftPanelWidth(Math.max(150, Math.min(800, dragStartWidth + deltaX)));
1327
+ const newWidth = Math.max(150, Math.min(800, dragStartWidth + deltaX));
1328
+ setLeftPanelWidth(newWidth);
1312
1329
  };
1313
1330
  const handleMouseUp = () => {
1314
1331
  setIsDragging(false);
package/dist/index.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { ClassType } from "@tanstack/devtools-utils/solid";
2
-
3
2
  //#region src/core.d.ts
4
3
  interface PacerDevtoolsInit {}
5
4
  declare const PacerDevtoolsCore$1: ClassType;
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-D9C86C9O.js"));
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
@@ -1,5 +1,4 @@
1
1
  import { ClassType } from "@tanstack/devtools-utils/solid";
2
-
3
2
  //#region src/core.d.ts
4
3
  interface PacerDevtoolsInit {}
5
4
  declare const PacerDevtoolsCore: ClassType;
@@ -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-D9C86C9O.js"));
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-BcUR7gcX.js"));
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-BcUR7gcX.js"));
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.0",
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.5.1",
75
- "@tanstack/devtools-utils": "^0.4.0",
76
- "@tanstack/solid-store": "^0.11.0",
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.20",
80
- "goober": "^2.1.18",
81
- "solid-js": "^1.9.12"
79
+ "dayjs": "^1.11.21",
80
+ "goober": "^2.1.19",
81
+ "solid-js": "^1.9.14"
82
82
  },
83
83
  "devDependencies": {
84
84
  "rolldown-plugin-solid": "^0.2.1",
85
- "tsdown": "^0.21.9",
86
- "vite-plugin-solid": "^2.11.12"
85
+ "tsdown": "^0.22.14",
86
+ "vite-plugin-solid": "^2.11.14"
87
87
  },
88
88
  "scripts": {
89
89
  "clean": "premove ./build ./dist",
@@ -1,6 +1,6 @@
1
1
  import * as goober from 'goober'
2
2
  import { createEffect, createSignal } from 'solid-js'
3
- import { useTheme } from '@tanstack/devtools-ui'
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 } = useTheme()
379
+ const { theme } = createTheme()
380
380
  const [styles, setStyles] = createSignal(stylesFactory(theme()))
381
381
  createEffect(() => {
382
382
  setStyles(stylesFactory(theme()))