@tanstack/react-hotkeys-devtools 0.8.0 → 0.9.1

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.
@@ -1,10 +1,11 @@
1
- import { DevtoolsPanelProps } from "@tanstack/devtools-utils/react";
2
1
  import { JSX } from "react";
3
-
4
- //#region src/ReactHotkeysDevtools.d.ts
5
- interface HotkeysDevtoolsReactInit extends DevtoolsPanelProps {}
6
- type HotkeysDevtoolsPanelComponent = (props: HotkeysDevtoolsReactInit) => JSX.Element;
7
- declare const HotkeysDevtoolsPanel: HotkeysDevtoolsPanelComponent;
2
+ import { DevtoolsPanelProps } from "@tanstack/devtools-utils/react";
3
+ declare namespace ReactHotkeysDevtools_d_exports {
4
+ export { HotkeysDevtoolsPanel, HotkeysDevtoolsPanelNoOp, HotkeysDevtoolsReactInit };
5
+ }
6
+ export interface HotkeysDevtoolsReactInit extends Partial<DevtoolsPanelProps> {}
7
+ type HotkeysDevtoolsPanelComponent = (props?: HotkeysDevtoolsReactInit) => JSX.Element;
8
+ export declare const HotkeysDevtoolsPanel: HotkeysDevtoolsPanelComponent;
9
+ export declare const HotkeysDevtoolsPanelNoOp: HotkeysDevtoolsPanelComponent;
8
10
  //#endregion
9
- export { HotkeysDevtoolsPanel, HotkeysDevtoolsReactInit };
10
- //# sourceMappingURL=ReactHotkeysDevtools.d.ts.map
11
+ export { ReactHotkeysDevtools_d_exports };
@@ -1,11 +1,18 @@
1
+ import { createElement } from "react";
1
2
  import { createReactPanel } from "@tanstack/devtools-utils/react";
2
3
  import { HotkeysDevtoolsCore } from "@tanstack/hotkeys-devtools";
3
4
 
4
5
  //#region src/ReactHotkeysDevtools.tsx
5
6
  const panels = createReactPanel(HotkeysDevtoolsCore);
6
- const HotkeysDevtoolsPanel = panels[0];
7
- const HotkeysDevtoolsPanelNoOp = panels[1];
7
+ function withDefaults(Panel) {
8
+ return (props = {}) => createElement(Panel, {
9
+ ...props,
10
+ theme: props.theme ?? "dark",
11
+ devtoolsOpen: props.devtoolsOpen ?? true
12
+ });
13
+ }
14
+ const HotkeysDevtoolsPanel = withDefaults(panels[0]);
15
+ const HotkeysDevtoolsPanelNoOp = withDefaults(panels[1]);
8
16
 
9
17
  //#endregion
10
- export { HotkeysDevtoolsPanel, HotkeysDevtoolsPanelNoOp };
11
- //# sourceMappingURL=ReactHotkeysDevtools.js.map
18
+ export { HotkeysDevtoolsPanel, HotkeysDevtoolsPanelNoOp };
@@ -0,0 +1,18 @@
1
+ //#region \0rolldown/runtime.js
2
+ var __defProp = Object.defineProperty;
3
+ var __exportAll = (all, no_symbols) => {
4
+ let target = {};
5
+ for (var name in all) {
6
+ __defProp(target, name, {
7
+ get: all[name],
8
+ enumerable: true
9
+ });
10
+ }
11
+ if (!no_symbols) {
12
+ __defProp(target, Symbol.toStringTag, { value: "Module" });
13
+ }
14
+ return target;
15
+ };
16
+
17
+ //#endregion
18
+ export { __exportAll };
package/dist/index.d.ts CHANGED
@@ -1,9 +1,7 @@
1
- import { HotkeysDevtoolsPanel as HotkeysDevtoolsPanel$1, HotkeysDevtoolsReactInit } from "./ReactHotkeysDevtools.js";
2
- import { hotkeysDevtoolsPlugin as hotkeysDevtoolsPlugin$1 } from "./plugin.js";
3
-
1
+ import { HotkeysDevtoolsPanel as HotkeysDevtoolsPanel$1, HotkeysDevtoolsReactInit, ReactHotkeysDevtools_d_exports } from "./ReactHotkeysDevtools.js";
2
+ import { hotkeysDevtoolsPlugin as hotkeysDevtoolsPlugin$1, plugin_d_exports } from "./plugin.js";
4
3
  //#region src/index.d.ts
5
- declare const HotkeysDevtoolsPanel: typeof HotkeysDevtoolsPanel$1;
6
- declare const hotkeysDevtoolsPlugin: typeof hotkeysDevtoolsPlugin$1;
4
+ export declare const HotkeysDevtoolsPanel: typeof HotkeysDevtoolsPanel$1;
5
+ export declare const hotkeysDevtoolsPlugin: typeof hotkeysDevtoolsPlugin$1;
7
6
  //#endregion
8
- export { HotkeysDevtoolsPanel, type HotkeysDevtoolsReactInit, hotkeysDevtoolsPlugin };
9
- //# sourceMappingURL=index.d.ts.map
7
+ export type { HotkeysDevtoolsReactInit };
package/dist/index.js CHANGED
@@ -8,5 +8,4 @@ const HotkeysDevtoolsPanel = process.env.NODE_ENV !== "development" ? HotkeysDev
8
8
  const hotkeysDevtoolsPlugin = process.env.NODE_ENV !== "development" ? hotkeysDevtoolsNoOpPlugin : hotkeysDevtoolsPlugin$1;
9
9
 
10
10
  //#endregion
11
- export { HotkeysDevtoolsPanel, hotkeysDevtoolsPlugin };
12
- //# sourceMappingURL=index.js.map
11
+ export { HotkeysDevtoolsPanel, hotkeysDevtoolsPlugin };
package/dist/plugin.d.ts CHANGED
@@ -1,8 +1,9 @@
1
1
  import { createReactPlugin } from "@tanstack/devtools-utils/react";
2
-
3
- //#region src/plugin.d.ts
2
+ declare namespace plugin_d_exports {
3
+ export { hotkeysDevtoolsNoOpPlugin, hotkeysDevtoolsPlugin };
4
+ }
4
5
  type HotkeysDevtoolsPluginFactory = ReturnType<typeof createReactPlugin>[0];
5
- declare const hotkeysDevtoolsPlugin: HotkeysDevtoolsPluginFactory;
6
+ export declare const hotkeysDevtoolsPlugin: HotkeysDevtoolsPluginFactory;
7
+ export declare const hotkeysDevtoolsNoOpPlugin: HotkeysDevtoolsPluginFactory;
6
8
  //#endregion
7
- export { hotkeysDevtoolsPlugin };
8
- //# sourceMappingURL=plugin.d.ts.map
9
+ export { plugin_d_exports };
package/dist/plugin.js CHANGED
@@ -10,5 +10,4 @@ const hotkeysDevtoolsPlugin = plugins[0];
10
10
  const hotkeysDevtoolsNoOpPlugin = plugins[1];
11
11
 
12
12
  //#endregion
13
- export { hotkeysDevtoolsNoOpPlugin, hotkeysDevtoolsPlugin };
14
- //# sourceMappingURL=plugin.js.map
13
+ export { hotkeysDevtoolsNoOpPlugin, hotkeysDevtoolsPlugin };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tanstack/react-hotkeys-devtools",
3
- "version": "0.8.0",
3
+ "version": "0.9.1",
4
4
  "description": "React devtools for TanStack Hotkeys",
5
5
  "author": "Tanner Linsley",
6
6
  "license": "MIT",
@@ -31,11 +31,10 @@
31
31
  },
32
32
  "sideEffects": false,
33
33
  "engines": {
34
- "node": ">=18"
34
+ "node": ">=20"
35
35
  },
36
36
  "files": [
37
- "dist/",
38
- "src"
37
+ "dist"
39
38
  ],
40
39
  "peerDependencies": {
41
40
  "@types/react": ">=16.8",
@@ -44,16 +43,16 @@
44
43
  "react-dom": ">=16.8"
45
44
  },
46
45
  "dependencies": {
47
- "@tanstack/devtools-utils": "^0.4.0",
48
- "@tanstack/hotkeys-devtools": "1.0.0"
46
+ "@tanstack/devtools-utils": "^0.7.0",
47
+ "@tanstack/hotkeys-devtools": "1.1.1"
49
48
  },
50
49
  "devDependencies": {
51
50
  "@eslint-react/eslint-plugin": "^4.2.3",
52
- "@types/react": "^19.2.14",
53
- "@vitejs/plugin-react": "^6.0.1",
51
+ "@types/react": "^19.3.0",
52
+ "@vitejs/plugin-react": "^6.1.1",
54
53
  "eslint-plugin-react-compiler": "19.1.0-rc.2",
55
54
  "eslint-plugin-react-hooks": "^7.1.1",
56
- "react": "^19.2.5"
55
+ "react": "^19.3.0"
57
56
  },
58
57
  "scripts": {
59
58
  "clean": "premove ./build ./dist",
@@ -63,6 +62,7 @@
63
62
  "test:lib": "vitest --passWithNoTests",
64
63
  "test:lib:dev": "pnpm test:lib --watch",
65
64
  "test:types": "tsc",
66
- "build": "tsdown"
65
+ "build": "tsdown",
66
+ "test:build": "publint --strict && node ../../scripts/verify-package.ts"
67
67
  }
68
68
  }
@@ -1 +0,0 @@
1
- {"version":3,"file":"ReactHotkeysDevtools.js","names":[],"sources":["../src/ReactHotkeysDevtools.tsx"],"sourcesContent":["import { createReactPanel } from '@tanstack/devtools-utils/react'\nimport { HotkeysDevtoolsCore } from '@tanstack/hotkeys-devtools'\nimport type { DevtoolsPanelProps } from '@tanstack/devtools-utils/react'\nimport type { JSX } from 'react'\n\nexport interface HotkeysDevtoolsReactInit extends DevtoolsPanelProps {}\n\ntype HotkeysDevtoolsPanelComponent = (\n props: HotkeysDevtoolsReactInit,\n) => JSX.Element\n\nconst panels = createReactPanel(HotkeysDevtoolsCore)\n\nexport const HotkeysDevtoolsPanel: HotkeysDevtoolsPanelComponent = panels[0]\nexport const HotkeysDevtoolsPanelNoOp: HotkeysDevtoolsPanelComponent = panels[1]\n"],"mappings":";;;;AAWA,MAAM,SAAS,iBAAiB,oBAAoB;AAEpD,MAAa,uBAAsD,OAAO;AAC1E,MAAa,2BAA0D,OAAO"}
package/dist/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","names":["Devtools.HotkeysDevtoolsPanelNoOp","Devtools.HotkeysDevtoolsPanel","plugin.hotkeysDevtoolsNoOpPlugin","plugin.hotkeysDevtoolsPlugin"],"sources":["../src/index.ts"],"sourcesContent":["'use client'\n\nimport * as Devtools from './ReactHotkeysDevtools'\nimport * as plugin from './plugin'\n\nexport const HotkeysDevtoolsPanel: typeof Devtools.HotkeysDevtoolsPanel =\n process.env.NODE_ENV !== 'development'\n ? Devtools.HotkeysDevtoolsPanelNoOp\n : Devtools.HotkeysDevtoolsPanel\n\nexport const hotkeysDevtoolsPlugin: typeof plugin.hotkeysDevtoolsPlugin =\n process.env.NODE_ENV !== 'development'\n ? plugin.hotkeysDevtoolsNoOpPlugin\n : plugin.hotkeysDevtoolsPlugin\n\nexport type { HotkeysDevtoolsReactInit } from './ReactHotkeysDevtools'\n"],"mappings":";;;;;;AAKA,MAAa,uBACX,QAAQ,IAAI,aAAa,gBACrBA,2BACAC;AAEN,MAAa,wBACX,QAAQ,IAAI,aAAa,gBACrBC,4BACAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"plugin.js","names":[],"sources":["../src/plugin.tsx"],"sourcesContent":["import { createReactPlugin } from '@tanstack/devtools-utils/react'\nimport { HotkeysDevtoolsPanel } from './ReactHotkeysDevtools'\n\ntype HotkeysDevtoolsPluginFactory = ReturnType<typeof createReactPlugin>[0]\n\nconst plugins = createReactPlugin({\n name: 'TanStack Hotkeys',\n Component: HotkeysDevtoolsPanel,\n})\n\nexport const hotkeysDevtoolsPlugin: HotkeysDevtoolsPluginFactory = plugins[0]\nexport const hotkeysDevtoolsNoOpPlugin: HotkeysDevtoolsPluginFactory =\n plugins[1]\n"],"mappings":";;;;AAKA,MAAM,UAAU,kBAAkB;CAChC,MAAM;CACN,WAAW;CACZ,CAAC;AAEF,MAAa,wBAAsD,QAAQ;AAC3E,MAAa,4BACX,QAAQ"}
@@ -1,15 +0,0 @@
1
- import { createReactPanel } from '@tanstack/devtools-utils/react'
2
- import { HotkeysDevtoolsCore } from '@tanstack/hotkeys-devtools'
3
- import type { DevtoolsPanelProps } from '@tanstack/devtools-utils/react'
4
- import type { JSX } from 'react'
5
-
6
- export interface HotkeysDevtoolsReactInit extends DevtoolsPanelProps {}
7
-
8
- type HotkeysDevtoolsPanelComponent = (
9
- props: HotkeysDevtoolsReactInit,
10
- ) => JSX.Element
11
-
12
- const panels = createReactPanel(HotkeysDevtoolsCore)
13
-
14
- export const HotkeysDevtoolsPanel: HotkeysDevtoolsPanelComponent = panels[0]
15
- export const HotkeysDevtoolsPanelNoOp: HotkeysDevtoolsPanelComponent = panels[1]
package/src/index.ts DELETED
@@ -1,16 +0,0 @@
1
- 'use client'
2
-
3
- import * as Devtools from './ReactHotkeysDevtools'
4
- import * as plugin from './plugin'
5
-
6
- export const HotkeysDevtoolsPanel: typeof Devtools.HotkeysDevtoolsPanel =
7
- process.env.NODE_ENV !== 'development'
8
- ? Devtools.HotkeysDevtoolsPanelNoOp
9
- : Devtools.HotkeysDevtoolsPanel
10
-
11
- export const hotkeysDevtoolsPlugin: typeof plugin.hotkeysDevtoolsPlugin =
12
- process.env.NODE_ENV !== 'development'
13
- ? plugin.hotkeysDevtoolsNoOpPlugin
14
- : plugin.hotkeysDevtoolsPlugin
15
-
16
- export type { HotkeysDevtoolsReactInit } from './ReactHotkeysDevtools'
package/src/plugin.tsx DELETED
@@ -1,13 +0,0 @@
1
- import { createReactPlugin } from '@tanstack/devtools-utils/react'
2
- import { HotkeysDevtoolsPanel } from './ReactHotkeysDevtools'
3
-
4
- type HotkeysDevtoolsPluginFactory = ReturnType<typeof createReactPlugin>[0]
5
-
6
- const plugins = createReactPlugin({
7
- name: 'TanStack Hotkeys',
8
- Component: HotkeysDevtoolsPanel,
9
- })
10
-
11
- export const hotkeysDevtoolsPlugin: HotkeysDevtoolsPluginFactory = plugins[0]
12
- export const hotkeysDevtoolsNoOpPlugin: HotkeysDevtoolsPluginFactory =
13
- plugins[1]
package/src/production.ts DELETED
@@ -1,7 +0,0 @@
1
- 'use client'
2
-
3
- export { HotkeysDevtoolsPanel } from './ReactHotkeysDevtools'
4
-
5
- export type { HotkeysDevtoolsReactInit } from './ReactHotkeysDevtools'
6
-
7
- export { hotkeysDevtoolsPlugin } from './plugin'