@vezham/devtools 26.0.0-alpha.5 → 26.0.0-alpha.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.
- package/README.md +2 -0
- package/dist/index.css +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/lib/devtools-panel.d.ts +8 -0
- package/dist/lib/devtools-panel.d.ts.map +1 -0
- package/dist/lib/devtools-panel.js +27 -0
- package/dist/lib/index.d.ts +4 -0
- package/dist/lib/index.d.ts.map +1 -0
- package/dist/lib/index.js +28 -0
- package/dist/lib/types.d.ts +16 -0
- package/dist/lib/types.d.ts.map +1 -0
- package/package.json +10 -2
package/README.md
CHANGED
package/dist/index.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@source './**/*.js';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from './lib';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { DevtoolsApp } from './types';
|
|
2
|
+
interface Props {
|
|
3
|
+
app: DevtoolsApp;
|
|
4
|
+
theme: 'dark' | 'light';
|
|
5
|
+
}
|
|
6
|
+
export declare const DevtoolsPanel: ({ app, theme }: Props) => import("react").JSX.Element;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=devtools-panel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"devtools-panel.d.ts","sourceRoot":"","sources":["../../src/lib/devtools-panel.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAE1C,UAAU,KAAK;IACb,GAAG,EAAE,WAAW,CAAA;IAChB,KAAK,EAAE,MAAM,GAAG,OAAO,CAAA;CACxB;AAED,eAAO,MAAM,aAAa,GAAI,gBAAgB,KAAK,gCA6BlD,CAAA"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Fragment } from "react";
|
|
2
|
+
import { Card, Typography } from "@vezham/react-v3";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
//#region src/lib/devtools-panel.tsx
|
|
5
|
+
var DevtoolsPanel = ({ app, theme }) => /* @__PURE__ */ jsxs(Card, {
|
|
6
|
+
className: "m-4",
|
|
7
|
+
"data-theme": theme,
|
|
8
|
+
children: [/* @__PURE__ */ jsxs(Card.Header, { children: [/* @__PURE__ */ jsx(Card.Title, { children: "Application" }), /* @__PURE__ */ jsx(Card.Description, { children: "Runtime metadata" })] }), /* @__PURE__ */ jsx(Card.Content, { children: /* @__PURE__ */ jsx("dl", {
|
|
9
|
+
className: "grid grid-cols-[7rem_1fr] gap-x-3 gap-y-3",
|
|
10
|
+
children: [
|
|
11
|
+
["🆔 Identity", app.id],
|
|
12
|
+
["🏷️ Name", app.name],
|
|
13
|
+
["🔖 Version", app.version],
|
|
14
|
+
["🌍 Environment", app.environment],
|
|
15
|
+
["⚙️ Runtime", app.runtime]
|
|
16
|
+
].map(([label, value]) => /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("dt", { children: /* @__PURE__ */ jsx(Typography, {
|
|
17
|
+
color: "muted",
|
|
18
|
+
type: "body-sm",
|
|
19
|
+
children: label
|
|
20
|
+
}) }), /* @__PURE__ */ jsx("dd", { children: /* @__PURE__ */ jsx(Typography, {
|
|
21
|
+
type: "code",
|
|
22
|
+
children: value
|
|
23
|
+
}) })] }, label))
|
|
24
|
+
}) })]
|
|
25
|
+
});
|
|
26
|
+
//#endregion
|
|
27
|
+
export { DevtoolsPanel };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lib/index.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAEpC,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAE7D,eAAO,MAAM,QAAQ,GAAI,6BAKtB,KAAK,uCA+BP,CAAA"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { DevtoolsPanel } from "./devtools-panel.js";
|
|
2
|
+
import { TanStackDevtools } from "@tanstack/react-devtools";
|
|
3
|
+
import { hotkeysDevtoolsPlugin } from "@tanstack/react-hotkeys-devtools";
|
|
4
|
+
import { ReactQueryDevtoolsPanel } from "@tanstack/react-query-devtools";
|
|
5
|
+
import { TanStackRouterDevtoolsPanel } from "@tanstack/react-router-devtools";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
//#region src/lib/index.tsx
|
|
8
|
+
var Devtools = ({ app, env = true, router = true, query = true }) => {
|
|
9
|
+
if (!env) return null;
|
|
10
|
+
const plugins = [{
|
|
11
|
+
name: "Vezham Devtools",
|
|
12
|
+
render: (_element, { theme }) => /* @__PURE__ */ jsx(DevtoolsPanel, {
|
|
13
|
+
app,
|
|
14
|
+
theme
|
|
15
|
+
})
|
|
16
|
+
}, hotkeysDevtoolsPlugin()];
|
|
17
|
+
if (query) plugins.push({
|
|
18
|
+
name: "TanStack Query",
|
|
19
|
+
render: /* @__PURE__ */ jsx(ReactQueryDevtoolsPanel, {})
|
|
20
|
+
});
|
|
21
|
+
if (router) plugins.push({
|
|
22
|
+
name: "TanStack Router",
|
|
23
|
+
render: /* @__PURE__ */ jsx(TanStackRouterDevtoolsPanel, {})
|
|
24
|
+
});
|
|
25
|
+
return /* @__PURE__ */ jsx(TanStackDevtools, { plugins });
|
|
26
|
+
};
|
|
27
|
+
//#endregion
|
|
28
|
+
export { Devtools };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
type AppRuntime = 'next' | 'tanstack' | 'tanstack-docs' | 'vite';
|
|
2
|
+
type DevtoolsApp = {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
version: string;
|
|
6
|
+
environment: string;
|
|
7
|
+
runtime: AppRuntime;
|
|
8
|
+
};
|
|
9
|
+
interface Props {
|
|
10
|
+
app: DevtoolsApp;
|
|
11
|
+
env: boolean;
|
|
12
|
+
router?: boolean;
|
|
13
|
+
query?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export type { AppRuntime, DevtoolsApp, Props };
|
|
16
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/lib/types.ts"],"names":[],"mappings":"AAAA,KAAK,UAAU,GAAG,MAAM,GAAG,UAAU,GAAG,eAAe,GAAG,MAAM,CAAA;AAEhE,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,WAAW,EAAE,MAAM,CAAA;IACnB,OAAO,EAAE,UAAU,CAAA;CACpB,CAAA;AAED,UAAU,KAAK;IACb,GAAG,EAAE,WAAW,CAAA;IAChB,GAAG,EAAE,OAAO,CAAA;IACZ,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB;AAED,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,KAAK,EAAE,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vezham/devtools",
|
|
3
|
-
"version": "26.0.0-alpha.
|
|
3
|
+
"version": "26.0.0-alpha.7",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/vezham/vx-fe-pkgs.git",
|
|
7
7
|
"directory": "packages/devtools"
|
|
8
8
|
},
|
|
9
|
+
"sideEffects": [
|
|
10
|
+
"**/*.css"
|
|
11
|
+
],
|
|
9
12
|
"type": "module",
|
|
10
13
|
"exports": {
|
|
11
14
|
".": {
|
|
15
|
+
"style": "./dist/index.css",
|
|
12
16
|
"@vx/fe-kit": "./src/index.ts",
|
|
13
17
|
"types": "./dist/index.d.ts",
|
|
14
18
|
"import": "./dist/index.js",
|
|
@@ -19,9 +23,13 @@
|
|
|
19
23
|
"main": "./dist/index.js",
|
|
20
24
|
"module": "./dist/index.js",
|
|
21
25
|
"types": "./dist/index.d.ts",
|
|
26
|
+
"style": "./dist/index.css",
|
|
22
27
|
"files": [
|
|
23
28
|
"!**/*.tsbuildinfo",
|
|
24
29
|
"dist",
|
|
25
30
|
"LICENSE"
|
|
26
|
-
]
|
|
31
|
+
],
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"@tanstack/react-hotkeys-devtools": "^0.7.0"
|
|
34
|
+
}
|
|
27
35
|
}
|