@tanstack/devtools 0.10.13 → 0.11.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/bin/intent.js ADDED
@@ -0,0 +1,20 @@
1
+ #!/usr/bin/env node
2
+ // Auto-generated by @tanstack/intent setup
3
+ // Exposes the intent end-user CLI for consumers of this library.
4
+ // Commit this file, then add to your package.json:
5
+ // "bin": { "intent": "./bin/intent.js" }
6
+ try {
7
+ await import('@tanstack/intent/intent-library')
8
+ } catch (e) {
9
+ if (e?.code === 'ERR_MODULE_NOT_FOUND' || e?.code === 'MODULE_NOT_FOUND') {
10
+ console.error('@tanstack/intent is not installed.')
11
+ console.error('')
12
+ console.error('Install it as a dev dependency:')
13
+ console.error(' npm add -D @tanstack/intent')
14
+ console.error('')
15
+ console.error('Or run directly:')
16
+ console.error(' npx @tanstack/intent@latest list')
17
+ process.exit(1)
18
+ }
19
+ throw e
20
+ }
package/dist/dev.js CHANGED
@@ -29,7 +29,7 @@ var TanStackDevtoolsCore = class {
29
29
  }
30
30
  this.#isMounting = true;
31
31
  this.#abortMount = false;
32
- import('./mount-impl/Z6LKUI5N.js').then(({ mountDevtools }) => {
32
+ import('./mount-impl/YYPMJI4G.js').then(({ mountDevtools }) => {
33
33
  if (this.#abortMount) {
34
34
  this.#isMounting = false;
35
35
  return;
@@ -979,7 +979,6 @@ var stylesFactory = (theme) => {
979
979
  pluginsTabContent: css2`
980
980
  width: 100%;
981
981
  height: 100%;
982
- overflow-y: auto;
983
982
 
984
983
  &:not(:last-child) {
985
984
  border-right: 5px solid ${t(colors.purple[200], colors.purple[800])};
@@ -2941,6 +2940,22 @@ var PLUGIN_REGISTRY = {
2941
2940
  // New plugin banner
2942
2941
  tags: ["TanStack"]
2943
2942
  },
2943
+ // TanStack A11y Devtools
2944
+ "@tanstack/devtools-a11y": {
2945
+ packageName: "@tanstack/devtools-a11y",
2946
+ title: "Accessibility Devtools",
2947
+ description: "Audit accessibility issues in real-time with axe-core. Supports WCAG 2.1/2.2, live monitoring, and visual overlays.",
2948
+ pluginImport: {
2949
+ importName: "createA11yPlugin",
2950
+ type: "function"
2951
+ },
2952
+ pluginId: "devtools-a11y",
2953
+ docsUrl: "https://tanstack.com/devtools/latest/docs/plugins/a11y",
2954
+ author: "TanStack",
2955
+ framework: "react",
2956
+ isNew: true,
2957
+ tags: ["TanStack", "a11y"]
2958
+ },
2944
2959
  // ==========================================
2945
2960
  // THIRD-PARTY PLUGINS - Examples
2946
2961
  // ==========================================
@@ -3441,7 +3456,7 @@ var PluginMarketplace = () => {
3441
3456
  var _tmpl$15 = /* @__PURE__ */ template(`<div><div><div><div></div><div><h3>Add More`);
3442
3457
  var _tmpl$27 = /* @__PURE__ */ template(`<div><h3>`);
3443
3458
  var _tmpl$34 = /* @__PURE__ */ template(`<div>`);
3444
- var PluginsTab = () => {
3459
+ var PluginsTab = (props) => {
3445
3460
  const {
3446
3461
  plugins,
3447
3462
  activePlugins,
@@ -3468,7 +3483,10 @@ var PluginsTab = () => {
3468
3483
  currentActivePlugins?.forEach((plugin) => {
3469
3484
  const ref = pluginRefs().get(plugin.id);
3470
3485
  if (ref) {
3471
- plugin.render(ref, theme());
3486
+ plugin.render(ref, {
3487
+ theme: theme(),
3488
+ devtoolsOpen: props.isOpen
3489
+ });
3472
3490
  }
3473
3491
  });
3474
3492
  });
@@ -3502,7 +3520,10 @@ var PluginsTab = () => {
3502
3520
  let pluginHeading;
3503
3521
  createEffect(() => {
3504
3522
  if (pluginHeading) {
3505
- typeof plugin.name === "string" ? pluginHeading.textContent = plugin.name : plugin.name(pluginHeading, theme());
3523
+ typeof plugin.name === "string" ? pluginHeading.textContent = plugin.name : plugin.name(pluginHeading, {
3524
+ theme: theme(),
3525
+ devtoolsOpen: props.isOpen
3526
+ });
3506
3527
  }
3507
3528
  });
3508
3529
  const isActive = createMemo(() => activePlugins().includes(plugin.id));
@@ -3928,7 +3949,7 @@ var SeoTab = () => {
3928
3949
  var tabs = [{
3929
3950
  name: "Plugins",
3930
3951
  id: "plugins",
3931
- component: () => createComponent(PluginsTab, {}),
3952
+ component: (props) => createComponent(PluginsTab, props),
3932
3953
  icon: () => createComponent(List, {})
3933
3954
  }, {
3934
3955
  name: "SEO",
@@ -4007,7 +4028,7 @@ var Tabs = (props) => {
4007
4028
  };
4008
4029
  delegateEvents(["click"]);
4009
4030
  var _tmpl$18 = /* @__PURE__ */ template(`<div>`);
4010
- var TabContent = () => {
4031
+ var TabContent = (props) => {
4011
4032
  const {
4012
4033
  state
4013
4034
  } = useDevtoolsState();
@@ -4015,7 +4036,9 @@ var TabContent = () => {
4015
4036
  const component = createMemo(() => tabs.find((t) => t.id === state().activeTab)?.component || null);
4016
4037
  return (() => {
4017
4038
  var _el$ = _tmpl$18();
4018
- insert(_el$, () => component()?.());
4039
+ insert(_el$, () => component()?.({
4040
+ isOpen: props.isOpen
4041
+ }));
4019
4042
  effect(() => className(_el$, styles().tabContent));
4020
4043
  return _el$;
4021
4044
  })();
@@ -4307,6 +4330,12 @@ function DevTools() {
4307
4330
  const {
4308
4331
  theme
4309
4332
  } = useTheme();
4333
+ createEffect(() => {
4334
+ if (typeof document === "undefined") {
4335
+ return;
4336
+ }
4337
+ document.documentElement.dataset.tanstackDevtoolsTheme = theme();
4338
+ });
4310
4339
  return createComponent(ThemeContextProvider, {
4311
4340
  get theme() {
4312
4341
  return theme();
@@ -4338,7 +4367,11 @@ function DevTools() {
4338
4367
  get children() {
4339
4368
  return [createComponent(Tabs, {
4340
4369
  toggleOpen
4341
- }), createComponent(TabContent, {})];
4370
+ }), createComponent(TabContent, {
4371
+ get isOpen() {
4372
+ return isOpen();
4373
+ }
4374
+ })];
4342
4375
  }
4343
4376
  });
4344
4377
  }
@@ -979,7 +979,6 @@ var stylesFactory = (theme) => {
979
979
  pluginsTabContent: css2`
980
980
  width: 100%;
981
981
  height: 100%;
982
- overflow-y: auto;
983
982
 
984
983
  &:not(:last-child) {
985
984
  border-right: 5px solid ${t(colors.purple[200], colors.purple[800])};
@@ -2613,6 +2612,22 @@ var PLUGIN_REGISTRY = {
2613
2612
  // New plugin banner
2614
2613
  tags: ["TanStack"]
2615
2614
  },
2615
+ // TanStack A11y Devtools
2616
+ "@tanstack/devtools-a11y": {
2617
+ packageName: "@tanstack/devtools-a11y",
2618
+ title: "Accessibility Devtools",
2619
+ description: "Audit accessibility issues in real-time with axe-core. Supports WCAG 2.1/2.2, live monitoring, and visual overlays.",
2620
+ pluginImport: {
2621
+ importName: "createA11yPlugin",
2622
+ type: "function"
2623
+ },
2624
+ pluginId: "devtools-a11y",
2625
+ docsUrl: "https://tanstack.com/devtools/latest/docs/plugins/a11y",
2626
+ author: "TanStack",
2627
+ framework: "react",
2628
+ isNew: true,
2629
+ tags: ["TanStack", "a11y"]
2630
+ },
2616
2631
  // ==========================================
2617
2632
  // THIRD-PARTY PLUGINS - Examples
2618
2633
  // ==========================================
@@ -3091,7 +3106,7 @@ var PluginMarketplace = () => {
3091
3106
  var _tmpl$17 = ["<div", "><div", "><div", "><div", ">", "</div><div", "><h3>Add More</h3></div></div></div>", "</div>"];
3092
3107
  var _tmpl$28 = ["<div", '><h3 id="', '"></h3></div>'];
3093
3108
  var _tmpl$35 = ['<div id="', '"', "></div>"];
3094
- var PluginsTab = () => {
3109
+ var PluginsTab = (props) => {
3095
3110
  const {
3096
3111
  plugins,
3097
3112
  activePlugins,
@@ -3118,7 +3133,10 @@ var PluginsTab = () => {
3118
3133
  currentActivePlugins?.forEach((plugin) => {
3119
3134
  const ref = pluginRefs().get(plugin.id);
3120
3135
  if (ref) {
3121
- plugin.render(ref, theme());
3136
+ plugin.render(ref, {
3137
+ theme: theme(),
3138
+ devtoolsOpen: props.isOpen
3139
+ });
3122
3140
  }
3123
3141
  });
3124
3142
  });
@@ -3437,7 +3455,7 @@ var SeoTab = () => {
3437
3455
  var tabs = [{
3438
3456
  name: "Plugins",
3439
3457
  id: "plugins",
3440
- component: () => createComponent(PluginsTab, {}),
3458
+ component: (props) => createComponent(PluginsTab, props),
3441
3459
  icon: () => createComponent(List, {})
3442
3460
  }, {
3443
3461
  name: "SEO",
@@ -3473,13 +3491,15 @@ var Tabs = (props) => {
3473
3491
  })), pipWindow().pipWindow !== null ? escape(null) : ssr(_tmpl$37, ssrStyleProperty("margin-top:", "auto") + ssrStyleProperty(";width:", "100%"), ssrAttribute("class", escape(clsx3(styles().tab, "detach"), true), false), escape(createComponent(PiP, {})), ssrAttribute("class", escape(clsx3(styles().tab, "close"), true), false), escape(createComponent(X, {}))));
3474
3492
  };
3475
3493
  var _tmpl$20 = ["<div", ">", "</div>"];
3476
- var TabContent = () => {
3494
+ var TabContent = (props) => {
3477
3495
  const {
3478
3496
  state
3479
3497
  } = useDevtoolsState();
3480
3498
  const styles = useStyles();
3481
3499
  const component = createMemo(() => tabs.find((t) => t.id === state().activeTab)?.component || null);
3482
- return ssr(_tmpl$20, ssrAttribute("class", escape(styles().tabContent, true), false), escape(component()?.()));
3500
+ return ssr(_tmpl$20, ssrAttribute("class", escape(styles().tabContent, true), false), escape(component()?.({
3501
+ isOpen: props.isOpen
3502
+ })));
3483
3503
  };
3484
3504
  var _tmpl$21 = ['<div style="', '">', "</div>"];
3485
3505
  var _tmpl$211 = ['<div style="', '"></div>'];
@@ -3732,6 +3752,12 @@ function DevTools() {
3732
3752
  const {
3733
3753
  theme
3734
3754
  } = useTheme();
3755
+ createEffect(() => {
3756
+ if (typeof document === "undefined") {
3757
+ return;
3758
+ }
3759
+ document.documentElement.dataset.tanstackDevtoolsTheme = theme();
3760
+ });
3735
3761
  return createComponent(ThemeContextProvider, {
3736
3762
  get theme() {
3737
3763
  return theme();
@@ -3759,7 +3785,11 @@ function DevTools() {
3759
3785
  get children() {
3760
3786
  return [createComponent(Tabs, {
3761
3787
  toggleOpen
3762
- }), createComponent(TabContent, {})];
3788
+ }), createComponent(TabContent, {
3789
+ get isOpen() {
3790
+ return isOpen();
3791
+ }
3792
+ })];
3763
3793
  }
3764
3794
  });
3765
3795
  }
package/dist/index.d.ts CHANGED
@@ -1,4 +1,6 @@
1
1
  import * as solid_js from 'solid-js';
2
+ import { TanStackDevtoolsTheme } from '@tanstack/devtools-ui';
3
+ export { TanStackDevtoolsTheme } from '@tanstack/devtools-ui';
2
4
  import { ClientEventBusConfig } from '@tanstack/devtools-event-bus/client';
3
5
  export { ClientEventBusConfig } from '@tanstack/devtools-event-bus/client';
4
6
 
@@ -8,7 +10,9 @@ declare const PLUGIN_TITLE_CONTAINER_ID = "plugin-title-container";
8
10
  declare const tabs: readonly [{
9
11
  readonly name: "Plugins";
10
12
  readonly id: "plugins";
11
- readonly component: () => solid_js.JSX.Element;
13
+ readonly component: (props: {
14
+ isOpen: boolean;
15
+ }) => solid_js.JSX.Element;
12
16
  readonly icon: () => solid_js.JSX.Element;
13
17
  }, {
14
18
  readonly name: "SEO";
@@ -28,7 +32,7 @@ type KeyboardKey = ModifierKey | (string & {});
28
32
 
29
33
  type TriggerPosition = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'middle-left' | 'middle-right';
30
34
  type TriggerProps = {
31
- theme: 'light' | 'dark';
35
+ theme: TanStackDevtoolsTheme;
32
36
  };
33
37
  type DevtoolsStore = {
34
38
  settings: {
@@ -76,7 +80,7 @@ type DevtoolsStore = {
76
80
  * The theme of the dev tools
77
81
  * @default "dark"
78
82
  */
79
- theme: 'light' | 'dark';
83
+ theme: TanStackDevtoolsTheme;
80
84
  /**
81
85
  * Whether the trigger should be completely hidden or not (you can still open with the hotkey)
82
86
  */
@@ -97,6 +101,10 @@ type DevtoolsStore = {
97
101
  plugins?: Array<TanStackDevtoolsPlugin>;
98
102
  };
99
103
 
104
+ interface TanStackDevtoolsPluginProps {
105
+ theme: TanStackDevtoolsTheme;
106
+ devtoolsOpen: boolean;
107
+ }
100
108
  interface TanStackDevtoolsPlugin {
101
109
  /**
102
110
  * Name to be displayed in the devtools UI.
@@ -124,7 +132,7 @@ interface TanStackDevtoolsPlugin {
124
132
  * }
125
133
  * ```
126
134
  */
127
- name: string | ((el: HTMLHeadingElement, theme: DevtoolsStore['settings']['theme']) => void);
135
+ name: string | ((el: HTMLHeadingElement, props: TanStackDevtoolsPluginProps) => void);
128
136
  /**
129
137
  * Unique identifier for the plugin.
130
138
  * If not provided, it will be generated based on the name.
@@ -149,7 +157,7 @@ interface TanStackDevtoolsPlugin {
149
157
  * }
150
158
  * ```
151
159
  */
152
- render: (el: HTMLDivElement, theme: DevtoolsStore['settings']['theme']) => void;
160
+ render: (el: HTMLDivElement, props: TanStackDevtoolsPluginProps) => void;
153
161
  destroy?: (pluginId: string) => void;
154
162
  }
155
163
  type TanStackDevtoolsConfig = DevtoolsStore['settings'];
@@ -191,4 +199,4 @@ declare class TanStackDevtoolsCore {
191
199
  setConfig(config: Partial<TanStackDevtoolsInit>): void;
192
200
  }
193
201
 
194
- export { PLUGIN_CONTAINER_ID, PLUGIN_TITLE_CONTAINER_ID, type TanStackDevtoolsConfig, TanStackDevtoolsCore, type TanStackDevtoolsInit, type TanStackDevtoolsPlugin };
202
+ export { PLUGIN_CONTAINER_ID, PLUGIN_TITLE_CONTAINER_ID, type TanStackDevtoolsConfig, TanStackDevtoolsCore, type TanStackDevtoolsInit, type TanStackDevtoolsPlugin, type TanStackDevtoolsPluginProps };
package/dist/index.js CHANGED
@@ -29,7 +29,7 @@ var TanStackDevtoolsCore = class {
29
29
  }
30
30
  this.#isMounting = true;
31
31
  this.#abortMount = false;
32
- import('./mount-impl/Z6LKUI5N.js').then(({ mountDevtools }) => {
32
+ import('./mount-impl/YYPMJI4G.js').then(({ mountDevtools }) => {
33
33
  if (this.#abortMount) {
34
34
  this.#isMounting = false;
35
35
  return;
@@ -14,7 +14,7 @@ function mountDevtools(options) {
14
14
  } = options;
15
15
  const eventBus = new ClientEventBus(eventBusConfig);
16
16
  eventBus.start();
17
- const Devtools = lazy(() => import('../devtools/7Z2ESJHO.js'));
17
+ const Devtools = lazy(() => import('../devtools/UZDPUP5E.js'));
18
18
  const dispose = render(() => createComponent(DevtoolsProvider, {
19
19
  plugins,
20
20
  config,
@@ -14,7 +14,7 @@ function mountDevtools(options) {
14
14
  } = options;
15
15
  const eventBus = new ClientEventBus(eventBusConfig);
16
16
  eventBus.start();
17
- const Devtools = lazy(() => import('../devtools/W6LG6674.js'));
17
+ const Devtools = lazy(() => import('../devtools/AKRRB3KC.js'));
18
18
  const dispose = render(() => createComponent(DevtoolsProvider, {
19
19
  plugins,
20
20
  config,
package/dist/server.js CHANGED
@@ -29,7 +29,7 @@ var TanStackDevtoolsCore = class {
29
29
  }
30
30
  this.#isMounting = true;
31
31
  this.#abortMount = false;
32
- import('./mount-impl/EMNOPRXX.js').then(({ mountDevtools }) => {
32
+ import('./mount-impl/IGHTIX6Y.js').then(({ mountDevtools }) => {
33
33
  if (this.#abortMount) {
34
34
  this.#isMounting = false;
35
35
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tanstack/devtools",
3
- "version": "0.10.13",
3
+ "version": "0.11.0",
4
4
  "description": "TanStack Devtools is a set of tools for building advanced devtools for your application.",
5
5
  "author": "Tanner Linsley",
6
6
  "license": "MIT",
@@ -40,13 +40,18 @@
40
40
  "types": "./dist/index.d.ts",
41
41
  "import": "./dist/index.js"
42
42
  },
43
+ "bin": {
44
+ "intent": "./bin/intent.js"
45
+ },
43
46
  "sideEffects": false,
44
47
  "engines": {
45
48
  "node": ">=18"
46
49
  },
47
50
  "files": [
48
51
  "dist/",
49
- "src"
52
+ "src",
53
+ "skills",
54
+ "bin"
50
55
  ],
51
56
  "dependencies": {
52
57
  "@solid-primitives/event-listener": "^2.4.3",
@@ -57,7 +62,7 @@
57
62
  "solid-js": "^1.9.9",
58
63
  "@tanstack/devtools-client": "0.0.6",
59
64
  "@tanstack/devtools-event-bus": "0.4.1",
60
- "@tanstack/devtools-ui": "0.5.0"
65
+ "@tanstack/devtools-ui": "0.5.1"
61
66
  },
62
67
  "peerDependencies": {
63
68
  "solid-js": ">=1.9.7"
@@ -65,7 +70,7 @@
65
70
  "devDependencies": {
66
71
  "tsup": "^8.5.0",
67
72
  "tsup-preset-solid": "^2.2.0",
68
- "vite-plugin-solid": "^2.11.8"
73
+ "vite-plugin-solid": "^2.11.11"
69
74
  },
70
75
  "scripts": {
71
76
  "clean": "premove ./build ./dist",