@tanstack/devtools-utils 0.0.5 → 0.0.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.
@@ -6,17 +6,13 @@ export declare function createReactPlugin({ Component, ...config }: {
6
6
  defaultOpen?: boolean;
7
7
  Component: (props: DevtoolsPanelProps) => JSX.Element;
8
8
  }): readonly [() => {
9
- config: {
10
- name: string;
11
- id?: string;
12
- defaultOpen?: boolean;
13
- };
14
9
  render: (_el: HTMLElement, theme: "light" | "dark") => import("react/jsx-runtime").JSX.Element;
10
+ name: string;
11
+ id?: string;
12
+ defaultOpen?: boolean;
15
13
  }, () => {
16
- config: {
17
- name: string;
18
- id?: string;
19
- defaultOpen?: boolean;
20
- };
21
14
  render: (_el: HTMLElement, _theme: "light" | "dark") => import("react/jsx-runtime").JSX.Element;
15
+ name: string;
16
+ id?: string;
17
+ defaultOpen?: boolean;
22
18
  }];
@@ -5,13 +5,13 @@ function createReactPlugin({
5
5
  }) {
6
6
  function Plugin() {
7
7
  return {
8
- config,
8
+ ...config,
9
9
  render: (_el, theme) => /* @__PURE__ */ jsx(Component, { theme })
10
10
  };
11
11
  }
12
12
  function NoOpPlugin() {
13
13
  return {
14
- config,
14
+ ...config,
15
15
  render: (_el, _theme) => /* @__PURE__ */ jsx(Fragment, {})
16
16
  };
17
17
  }
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.js","sources":["../../../src/react/plugin.tsx"],"sourcesContent":["import type { JSX } from 'react'\nimport type { DevtoolsPanelProps } from './panel'\n\nexport function createReactPlugin({\n Component,\n ...config\n}: {\n name: string\n id?: string\n defaultOpen?: boolean\n Component: (props: DevtoolsPanelProps) => JSX.Element\n}) {\n function Plugin() {\n return {\n config,\n render: (_el: HTMLElement, theme: 'light' | 'dark') => (\n <Component theme={theme} />\n ),\n }\n }\n function NoOpPlugin() {\n return {\n config,\n render: (_el: HTMLElement, _theme: 'light' | 'dark') => <></>,\n }\n }\n return [Plugin, NoOpPlugin] as const\n}\n"],"names":[],"mappings":";AAGO,SAAS,kBAAkB;AAAA,EAChC;AAAA,EACA,GAAG;AACL,GAKG;AACD,WAAS,SAAS;AAChB,WAAO;AAAA,MACL;AAAA,MACA,QAAQ,CAAC,KAAkB,UACzB,oBAAC,aAAU,MAAA,CAAc;AAAA,IAAA;AAAA,EAG/B;AACA,WAAS,aAAa;AACpB,WAAO;AAAA,MACL;AAAA,MACA,QAAQ,CAAC,KAAkB,WAA6B,oBAAA,UAAA,CAAA,CAAE;AAAA,IAAA;AAAA,EAE9D;AACA,SAAO,CAAC,QAAQ,UAAU;AAC5B;"}
1
+ {"version":3,"file":"plugin.js","sources":["../../../src/react/plugin.tsx"],"sourcesContent":["import type { JSX } from 'react'\nimport type { DevtoolsPanelProps } from './panel'\n\nexport function createReactPlugin({\n Component,\n ...config\n}: {\n name: string\n id?: string\n defaultOpen?: boolean\n Component: (props: DevtoolsPanelProps) => JSX.Element\n}) {\n function Plugin() {\n return {\n ...config,\n render: (_el: HTMLElement, theme: 'light' | 'dark') => (\n <Component theme={theme} />\n ),\n }\n }\n function NoOpPlugin() {\n return {\n ...config,\n render: (_el: HTMLElement, _theme: 'light' | 'dark') => <></>,\n }\n }\n return [Plugin, NoOpPlugin] as const\n}\n"],"names":[],"mappings":";AAGO,SAAS,kBAAkB;AAAA,EAChC;AAAA,EACA,GAAG;AACL,GAKG;AACD,WAAS,SAAS;AAChB,WAAO;AAAA,MACL,GAAG;AAAA,MACH,QAAQ,CAAC,KAAkB,UACzB,oBAAC,aAAU,MAAA,CAAc;AAAA,IAAA;AAAA,EAG/B;AACA,WAAS,aAAa;AACpB,WAAO;AAAA,MACL,GAAG;AAAA,MACH,QAAQ,CAAC,KAAkB,WAA6B,oBAAA,UAAA,CAAA,CAAE;AAAA,IAAA;AAAA,EAE9D;AACA,SAAO,CAAC,QAAQ,UAAU;AAC5B;"}
@@ -14,10 +14,10 @@ import { JSX } from 'solid-js';
14
14
  */
15
15
  declare function constructCoreClass(Component: () => JSX.Element): readonly [{
16
16
  new (): {
17
- #isMounted: boolean;
18
- #dispose?: () => void;
19
- #Component: any;
20
- #ThemeProvider: any;
17
+ "__#private@#isMounted": boolean;
18
+ "__#private@#dispose"?: () => void;
19
+ "__#private@#Component": any;
20
+ "__#private@#ThemeProvider": any;
21
21
  mount<T extends HTMLElement>(el: T, theme: "light" | "dark"): Promise<void>;
22
22
  unmount(): void;
23
23
  };
@@ -25,10 +25,10 @@ declare function constructCoreClass(Component: () => JSX.Element): readonly [{
25
25
  new (): {
26
26
  mount<T extends HTMLElement>(_el: T, _theme: "light" | "dark"): Promise<void>;
27
27
  unmount(): void;
28
- #isMounted: boolean;
29
- #dispose?: () => void;
30
- #Component: any;
31
- #ThemeProvider: any;
28
+ "__#private@#isMounted": boolean;
29
+ "__#private@#dispose"?: () => void;
30
+ "__#private@#Component": any;
31
+ "__#private@#ThemeProvider": any;
32
32
  };
33
33
  }];
34
34
  type ClassType = ReturnType<typeof constructCoreClass>[0];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tanstack/devtools-utils",
3
- "version": "0.0.5",
3
+ "version": "0.0.7",
4
4
  "description": "TanStack Devtools utilities for creating your own devtools.",
5
5
  "author": "Tanner Linsley",
6
6
  "license": "MIT",
@@ -12,7 +12,7 @@ export function createReactPlugin({
12
12
  }) {
13
13
  function Plugin() {
14
14
  return {
15
- config,
15
+ ...config,
16
16
  render: (_el: HTMLElement, theme: 'light' | 'dark') => (
17
17
  <Component theme={theme} />
18
18
  ),
@@ -20,7 +20,7 @@ export function createReactPlugin({
20
20
  }
21
21
  function NoOpPlugin() {
22
22
  return {
23
- config,
23
+ ...config,
24
24
  render: (_el: HTMLElement, _theme: 'light' | 'dark') => <></>,
25
25
  }
26
26
  }