@tanstack/preact-hotkeys-devtools 0.9.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,10 @@
|
|
|
1
|
-
import { DevtoolsPanelProps } from "@tanstack/devtools-utils/preact";
|
|
2
1
|
import { JSX } from "preact";
|
|
2
|
+
import { DevtoolsPanelProps } from "@tanstack/devtools-utils/preact";
|
|
3
3
|
declare namespace PreactHotkeysDevtools_d_exports {
|
|
4
4
|
export { HotkeysDevtoolsPanel, HotkeysDevtoolsPanelNoOp, HotkeysDevtoolsPreactInit };
|
|
5
5
|
}
|
|
6
|
-
export interface HotkeysDevtoolsPreactInit extends DevtoolsPanelProps {}
|
|
7
|
-
type HotkeysDevtoolsPanelComponent = (props
|
|
6
|
+
export interface HotkeysDevtoolsPreactInit extends Partial<DevtoolsPanelProps> {}
|
|
7
|
+
type HotkeysDevtoolsPanelComponent = (props?: HotkeysDevtoolsPreactInit) => JSX.Element;
|
|
8
8
|
export declare const HotkeysDevtoolsPanel: HotkeysDevtoolsPanelComponent;
|
|
9
9
|
export declare const HotkeysDevtoolsPanelNoOp: HotkeysDevtoolsPanelComponent;
|
|
10
10
|
//#endregion
|
|
@@ -1,10 +1,18 @@
|
|
|
1
|
+
import { h } from "preact";
|
|
1
2
|
import { createPreactPanel } from "@tanstack/devtools-utils/preact";
|
|
2
3
|
import { HotkeysDevtoolsCore } from "@tanstack/hotkeys-devtools";
|
|
3
4
|
|
|
4
5
|
//#region src/PreactHotkeysDevtools.tsx
|
|
5
6
|
const panels = createPreactPanel(HotkeysDevtoolsCore);
|
|
6
|
-
|
|
7
|
-
|
|
7
|
+
function withDefaults(Panel) {
|
|
8
|
+
return (props = {}) => h(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
18
|
export { HotkeysDevtoolsPanel, HotkeysDevtoolsPanelNoOp };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tanstack/preact-hotkeys-devtools",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.1",
|
|
4
4
|
"description": "Preact devtools for TanStack Hotkeys",
|
|
5
5
|
"author": "Tanner Linsley",
|
|
6
6
|
"license": "MIT",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@tanstack/devtools-utils": "^0.7.0",
|
|
43
|
-
"@tanstack/hotkeys-devtools": "1.1.
|
|
43
|
+
"@tanstack/hotkeys-devtools": "1.1.1"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@preact/preset-vite": "^2.10.6",
|