@tanstack/preact-hotkeys-devtools 0.13.7 → 0.13.10
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/dist/PreactHotkeysDevtools.js +6 -6
- package/dist/plugin.d.ts +2 -7
- package/dist/plugin.js +2 -1
- package/package.json +3 -3
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { createPreactPanel } from "@tanstack/devtools-utils/preact";
|
|
2
|
-
import { HotkeysDevtoolsCore } from "@tanstack/hotkeys-devtools/production";
|
|
2
|
+
import { HOTKEYS_DEVTOOLS_DEFAULT_PROPS, HotkeysDevtoolsCore } from "@tanstack/hotkeys-devtools/production";
|
|
3
3
|
import { Component, h } from "preact";
|
|
4
4
|
|
|
5
5
|
// src/PreactHotkeysDevtools.tsx
|
|
6
6
|
const panels = createPreactPanel(HotkeysDevtoolsCore);
|
|
7
|
-
function
|
|
7
|
+
function withPanelDefaults(CorePanel) {
|
|
8
8
|
class Panel extends Component {
|
|
9
9
|
shouldComponentUpdate(next) {
|
|
10
10
|
return next.theme !== this.props.theme || next.devtoolsOpen !== this.props.devtoolsOpen;
|
|
@@ -15,11 +15,11 @@ function withDefaults(CorePanel) {
|
|
|
15
15
|
}
|
|
16
16
|
return (props = {}) => h(Panel, {
|
|
17
17
|
...props,
|
|
18
|
-
theme: props.theme ??
|
|
19
|
-
devtoolsOpen: props.devtoolsOpen ??
|
|
18
|
+
theme: props.theme ?? HOTKEYS_DEVTOOLS_DEFAULT_PROPS.theme,
|
|
19
|
+
devtoolsOpen: props.devtoolsOpen ?? HOTKEYS_DEVTOOLS_DEFAULT_PROPS.devtoolsOpen
|
|
20
20
|
});
|
|
21
21
|
}
|
|
22
|
-
const HotkeysDevtoolsPanel =
|
|
23
|
-
const HotkeysDevtoolsPanelNoOp =
|
|
22
|
+
const HotkeysDevtoolsPanel = withPanelDefaults(panels[0]);
|
|
23
|
+
const HotkeysDevtoolsPanelNoOp = withPanelDefaults(panels[1]);
|
|
24
24
|
|
|
25
25
|
export { HotkeysDevtoolsPanel, HotkeysDevtoolsPanelNoOp };
|
package/dist/plugin.d.ts
CHANGED
|
@@ -1,12 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { HotkeysDevtoolsRenderPlugin } from "@tanstack/hotkeys-devtools/production";
|
|
2
2
|
import { JSX } from "preact";
|
|
3
3
|
/** A plugin for `TanStackDevtools` from `@tanstack/preact-devtools`. */
|
|
4
|
-
export interface HotkeysDevtoolsPreactPlugin {
|
|
5
|
-
name: string;
|
|
6
|
-
id?: string;
|
|
7
|
-
defaultOpen?: boolean;
|
|
8
|
-
render: (el: HTMLElement, props: HotkeysDevtoolsPanelProps) => JSX.Element;
|
|
9
|
-
}
|
|
4
|
+
export interface HotkeysDevtoolsPreactPlugin extends HotkeysDevtoolsRenderPlugin<JSX.Element> {}
|
|
10
5
|
type HotkeysDevtoolsPluginFactory = () => HotkeysDevtoolsPreactPlugin;
|
|
11
6
|
export declare const hotkeysDevtoolsPlugin: HotkeysDevtoolsPluginFactory;
|
|
12
7
|
export {};
|
package/dist/plugin.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { HotkeysDevtoolsPanel } from "./PreactHotkeysDevtools.js";
|
|
2
2
|
import { createPreactPlugin } from "@tanstack/devtools-utils/preact";
|
|
3
|
+
import { HOTKEYS_DEVTOOLS_PLUGIN_NAME } from "@tanstack/hotkeys-devtools/production";
|
|
3
4
|
|
|
4
5
|
// src/plugin.tsx
|
|
5
6
|
const plugins = createPreactPlugin({
|
|
6
|
-
name:
|
|
7
|
+
name: HOTKEYS_DEVTOOLS_PLUGIN_NAME,
|
|
7
8
|
Component: HotkeysDevtoolsPanel
|
|
8
9
|
});
|
|
9
10
|
const hotkeysDevtoolsPlugin = plugins[0];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tanstack/preact-hotkeys-devtools",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.10",
|
|
4
4
|
"description": "Preact devtools for TanStack Hotkeys",
|
|
5
5
|
"author": "Tanner Linsley",
|
|
6
6
|
"license": "MIT",
|
|
@@ -47,13 +47,13 @@
|
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"@tanstack/devtools-utils": "^0.7.2",
|
|
50
|
-
"@tanstack/hotkeys-devtools": "1.
|
|
50
|
+
"@tanstack/hotkeys-devtools": "1.11.0"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@preact/preset-vite": "^2.10.6",
|
|
54
54
|
"@tanstack/hotkeys-test-utils": "0.0.0",
|
|
55
55
|
"@tanstack/preact-devtools": "0.10.15",
|
|
56
|
-
"@tanstack/preact-hotkeys": "0.
|
|
56
|
+
"@tanstack/preact-hotkeys": "0.23.1",
|
|
57
57
|
"preact": "^11.2.0"
|
|
58
58
|
},
|
|
59
59
|
"scripts": {
|