@tanstack/devtools 0.6.5 → 0.6.7

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.
@@ -13,7 +13,7 @@ const initialState = {
13
13
  openHotkey: ["Shift", "A"],
14
14
  requireUrlFlag: false,
15
15
  urlFlag: "tanstack-devtools",
16
- theme: window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"
16
+ theme: typeof window !== "undefined" && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"
17
17
  },
18
18
  state: {
19
19
  activeTab: "plugins",
@@ -1 +1 @@
1
- {"version":3,"file":"devtools-store.js","sources":["../../../src/context/devtools-store.ts"],"sourcesContent":["import type { TabName } from '../tabs'\nimport type { TanStackDevtoolsPlugin } from './devtools-context'\n\ntype ModifierKey = 'Alt' | 'Control' | 'Meta' | 'Shift'\ntype KeyboardKey = ModifierKey | (string & {})\nexport const keyboardModifiers: Array<ModifierKey> = [\n 'Alt',\n 'Control',\n 'Meta',\n 'Shift',\n]\n\ntype TriggerPosition =\n | 'top-left'\n | 'top-right'\n | 'bottom-left'\n | 'bottom-right'\n | 'middle-left'\n | 'middle-right'\n\nexport type DevtoolsStore = {\n settings: {\n /**\n * Whether the dev tools should be open by default\n * @default false\n */\n defaultOpen: boolean\n /**\n * Whether the dev tools trigger should be hidden until the user hovers over it\n * @default false\n */\n hideUntilHover: boolean\n /**\n * The position of the trigger button\n * @default \"bottom-right\"\n */\n position: TriggerPosition\n\n /**\n * The location of the panel once it is open\n * @default \"bottom\"\n */\n panelLocation: 'top' | 'bottom'\n /**\n * The hotkey to open the dev tools\n * @default \"shift+a\"\n */\n openHotkey: Array<KeyboardKey>\n /**\n * Whether to require the URL flag to open the dev tools\n * @default false\n */\n requireUrlFlag: boolean\n /**\n * The URL flag to open the dev tools, used in conjunction with requireUrlFlag (if set to true)\n * @default \"tanstack-devtools\"\n */\n urlFlag: string\n /**\n * The theme of the dev tools\n * @default \"dark\"\n */\n theme: 'light' | 'dark'\n }\n state: {\n activeTab: TabName\n height: number\n activePlugin?: string | undefined\n persistOpen: boolean\n }\n plugins?: Array<TanStackDevtoolsPlugin>\n}\n\nexport const initialState: DevtoolsStore = {\n settings: {\n defaultOpen: false,\n hideUntilHover: false,\n position: 'bottom-right',\n panelLocation: 'bottom',\n openHotkey: ['Shift', 'A'],\n requireUrlFlag: false,\n urlFlag: 'tanstack-devtools',\n theme: window.matchMedia('(prefers-color-scheme: dark)').matches\n ? 'dark'\n : 'light',\n },\n state: {\n activeTab: 'plugins',\n height: 400,\n activePlugin: undefined,\n persistOpen: false,\n },\n}\n"],"names":[],"mappings":"AAKO,MAAM,oBAAwC;AAAA,EACnD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AA+DO,MAAM,eAA8B;AAAA,EACzC,UAAU;AAAA,IACR,aAAa;AAAA,IACb,gBAAgB;AAAA,IAChB,UAAU;AAAA,IACV,eAAe;AAAA,IACf,YAAY,CAAC,SAAS,GAAG;AAAA,IACzB,gBAAgB;AAAA,IAChB,SAAS;AAAA,IACT,OAAO,OAAO,WAAW,8BAA8B,EAAE,UACrD,SACA;AAAA,EAAA;AAAA,EAEN,OAAO;AAAA,IACL,WAAW;AAAA,IACX,QAAQ;AAAA,IACR,cAAc;AAAA,IACd,aAAa;AAAA,EAAA;AAEjB;"}
1
+ {"version":3,"file":"devtools-store.js","sources":["../../../src/context/devtools-store.ts"],"sourcesContent":["import type { TabName } from '../tabs'\nimport type { TanStackDevtoolsPlugin } from './devtools-context'\n\ntype ModifierKey = 'Alt' | 'Control' | 'Meta' | 'Shift'\ntype KeyboardKey = ModifierKey | (string & {})\nexport const keyboardModifiers: Array<ModifierKey> = [\n 'Alt',\n 'Control',\n 'Meta',\n 'Shift',\n]\n\ntype TriggerPosition =\n | 'top-left'\n | 'top-right'\n | 'bottom-left'\n | 'bottom-right'\n | 'middle-left'\n | 'middle-right'\n\nexport type DevtoolsStore = {\n settings: {\n /**\n * Whether the dev tools should be open by default\n * @default false\n */\n defaultOpen: boolean\n /**\n * Whether the dev tools trigger should be hidden until the user hovers over it\n * @default false\n */\n hideUntilHover: boolean\n /**\n * The position of the trigger button\n * @default \"bottom-right\"\n */\n position: TriggerPosition\n\n /**\n * The location of the panel once it is open\n * @default \"bottom\"\n */\n panelLocation: 'top' | 'bottom'\n /**\n * The hotkey to open the dev tools\n * @default \"shift+a\"\n */\n openHotkey: Array<KeyboardKey>\n /**\n * Whether to require the URL flag to open the dev tools\n * @default false\n */\n requireUrlFlag: boolean\n /**\n * The URL flag to open the dev tools, used in conjunction with requireUrlFlag (if set to true)\n * @default \"tanstack-devtools\"\n */\n urlFlag: string\n /**\n * The theme of the dev tools\n * @default \"dark\"\n */\n theme: 'light' | 'dark'\n }\n state: {\n activeTab: TabName\n height: number\n activePlugin?: string | undefined\n persistOpen: boolean\n }\n plugins?: Array<TanStackDevtoolsPlugin>\n}\n\nexport const initialState: DevtoolsStore = {\n settings: {\n defaultOpen: false,\n hideUntilHover: false,\n position: 'bottom-right',\n panelLocation: 'bottom',\n openHotkey: ['Shift', 'A'],\n requireUrlFlag: false,\n urlFlag: 'tanstack-devtools',\n theme:\n typeof window !== 'undefined' &&\n window.matchMedia('(prefers-color-scheme: dark)').matches\n ? 'dark'\n : 'light',\n },\n state: {\n activeTab: 'plugins',\n height: 400,\n activePlugin: undefined,\n persistOpen: false,\n },\n}\n"],"names":[],"mappings":"AAKO,MAAM,oBAAwC;AAAA,EACnD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AA+DO,MAAM,eAA8B;AAAA,EACzC,UAAU;AAAA,IACR,aAAa;AAAA,IACb,gBAAgB;AAAA,IAChB,UAAU;AAAA,IACV,eAAe;AAAA,IACf,YAAY,CAAC,SAAS,GAAG;AAAA,IACzB,gBAAgB;AAAA,IAChB,SAAS;AAAA,IACT,OACE,OAAO,WAAW,eAClB,OAAO,WAAW,8BAA8B,EAAE,UAC9C,SACA;AAAA,EAAA;AAAA,EAER,OAAO;AAAA,IACL,WAAW;AAAA,IACX,QAAQ;AAAA,IACR,cAAc;AAAA,IACd,aAAa;AAAA,EAAA;AAEjB;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tanstack/devtools",
3
- "version": "0.6.5",
3
+ "version": "0.6.7",
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",
@@ -42,11 +42,12 @@
42
42
  "clsx": "^2.1.1",
43
43
  "goober": "^2.1.16",
44
44
  "solid-js": "^1.9.7",
45
- "@tanstack/devtools-event-bus": "0.3.1",
45
+ "@tanstack/devtools-event-bus": "0.3.2",
46
46
  "@tanstack/devtools-ui": "0.3.4"
47
47
  },
48
48
  "peerDependencies": {
49
- "solid-js": ">=1.9.7"
49
+ "solid-js": ">=1.9.7",
50
+ "@tanstack/devtools-ui": "0.3.4"
50
51
  },
51
52
  "devDependencies": {
52
53
  "vite-plugin-solid": "^2.11.6"
@@ -80,9 +80,11 @@ export const initialState: DevtoolsStore = {
80
80
  openHotkey: ['Shift', 'A'],
81
81
  requireUrlFlag: false,
82
82
  urlFlag: 'tanstack-devtools',
83
- theme: window.matchMedia('(prefers-color-scheme: dark)').matches
84
- ? 'dark'
85
- : 'light',
83
+ theme:
84
+ typeof window !== 'undefined' &&
85
+ window.matchMedia('(prefers-color-scheme: dark)').matches
86
+ ? 'dark'
87
+ : 'light',
86
88
  },
87
89
  state: {
88
90
  activeTab: 'plugins',