@tanstack/preact-hotkeys-devtools 0.9.0 → 0.10.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/README.md CHANGED
@@ -67,6 +67,9 @@ Type-safe keyboard shortcuts for the web. Template-string bindings, parsed objec
67
67
  > [!NOTE]
68
68
  > You may know **TanStack Hotkeys** by our adapter names, too!
69
69
  >
70
+ > - [**Alpine Hotkeys**](https://tanstack.com/hotkeys/latest/docs/framework/alpine/quick-start)
71
+ > - [**Ember Hotkeys**](https://tanstack.com/hotkeys/latest/docs/framework/ember/quick-start)
72
+ > - [**Octane Hotkeys**](https://tanstack.com/hotkeys/latest/docs/framework/octane/quick-start)
70
73
  > - [**React Hotkeys**](https://tanstack.com/hotkeys/latest/docs/framework/react/react-hotkeys)
71
74
  > - [**Preact Hotkeys**](https://tanstack.com/hotkeys/latest/docs/framework/preact/preact-hotkeys)
72
75
  > - [**Solid Hotkeys**](https://tanstack.com/hotkeys/latest/docs/framework/solid/reference)
@@ -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: HotkeysDevtoolsPreactInit) => JSX.Element;
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
- const HotkeysDevtoolsPanel = panels[0];
7
- const HotkeysDevtoolsPanelNoOp = panels[1];
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.0",
3
+ "version": "0.10.0",
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.0"
43
+ "@tanstack/hotkeys-devtools": "1.2.0"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@preact/preset-vite": "^2.10.6",