@qwik.dev/devtools 0.2.1 → 0.2.2
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/plugin/index.d.ts +4 -1
- package/dist/plugin/index.js +1914 -463
- package/dist/ui/_virtual/browser.qwik.mjs +8 -0
- package/dist/ui/_virtual/browser.qwik2.mjs +4 -0
- package/dist/ui/components/DevtoolsButton/DevtoolsButton.qwik.mjs +1 -1
- package/dist/ui/components/DevtoolsPanel/DevtoolsPanel.qwik.mjs +1 -1
- package/dist/ui/components/Tab/Tab.qwik.mjs +1 -1
- package/dist/ui/components/TabContent/TabContent.qwik.mjs +1 -1
- package/dist/ui/components/ThemeToggle/QwikThemeToggle.qwik.mjs +1 -1
- package/dist/ui/components/Tree/Tree.qwik.mjs +1 -1
- package/dist/ui/devtools.qwik.mjs +31 -9
- package/dist/ui/features/Assets/Assets.qwik.mjs +3 -3
- package/dist/ui/features/CodeBreack/CodeBreack.qwik.mjs +4 -4
- package/dist/ui/features/CodeBreack/HtmlParser.qwik.mjs +13 -20
- package/dist/ui/features/CodeBreack/StateParser.qwik.mjs +13 -20
- package/dist/ui/features/Overview/Overview.qwik.mjs +17 -17
- package/dist/ui/features/Packages/Packages.qwik.mjs +4 -4
- package/dist/ui/features/Packages/components/DependencyCard/DependencyCard.qwik.mjs +9 -9
- package/dist/ui/features/Packages/components/PackageIcon/PackageIcon.qwik.mjs +1 -1
- package/dist/ui/features/Performance/Performance.qwik.mjs +307 -0
- package/dist/ui/features/Performance/computePerfViewModel.qwik.mjs +101 -0
- package/dist/ui/features/Performance/transformPerformanceData.qwik.mjs +34 -0
- package/dist/ui/features/RenderTree/RenderTree.qwik.mjs +38 -45
- package/dist/ui/features/RenderTree/TreeBuilder.qwik.mjs +181 -0
- package/dist/ui/features/RenderTree/data.qwik.mjs +30 -16
- package/dist/ui/features/RenderTree/formatTreeData.qwik.mjs +205 -230
- package/dist/ui/features/RenderTree/types.qwik.mjs +50 -0
- package/dist/ui/features/Routes/Routes.qwik.mjs +3 -3
- package/dist/ui/features/inspect/Inspect.qwik.mjs +1 -1
- package/dist/ui/global.css.qwik.mjs +1 -1
- package/dist/ui/lib-types/kit/src/globals.d.ts +56 -5
- package/dist/ui/lib-types/kit/src/index.d.ts +1 -0
- package/dist/ui/lib-types/ui/src/features/Performance/Performance.d.ts +1 -0
- package/dist/ui/lib-types/ui/src/features/Performance/computePerfViewModel.d.ts +33 -0
- package/dist/ui/lib-types/ui/src/features/Performance/computePerfViewModel.test.d.ts +1 -0
- package/dist/ui/lib-types/ui/src/features/Performance/transformPerformanceData.d.ts +22 -0
- package/dist/ui/lib-types/ui/src/features/Performance/transformPerformanceData.test.d.ts +1 -0
- package/dist/ui/lib-types/ui/src/features/RenderTree/TreeBuilder.d.ts +60 -0
- package/dist/ui/lib-types/ui/src/features/RenderTree/data.d.ts +34 -8
- package/dist/ui/lib-types/ui/src/features/RenderTree/formatTreeData.d.ts +79 -148
- package/dist/ui/lib-types/ui/src/features/RenderTree/index.d.ts +6 -0
- package/dist/ui/lib-types/ui/src/features/RenderTree/types.d.ts +116 -0
- package/dist/ui/lib-types/ui/src/types/state.d.ts +1 -1
- package/dist/ui/lib-types/ui/src/utils/shiki.d.ts +2 -0
- package/dist/ui/node_modules/.pnpm/@qwikest_icons@0.0.13_@builder.io_qwik@1.11.0_vite@7.1.3_@types_node@20.14.11_jiti@2.6._02d306fcbd9f637dd624291702bff9c0/node_modules/@qwikest/icons/lib/hi.qwik.qwik.mjs +19 -0
- package/dist/ui/node_modules/.pnpm/debug@4.4.3_supports-color@5.5.0/node_modules/debug/src/browser.qwik.mjs +177 -0
- package/dist/ui/node_modules/.pnpm/debug@4.4.3_supports-color@5.5.0/node_modules/debug/src/common.qwik.mjs +182 -0
- package/dist/ui/node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.qwik.mjs +120 -0
- package/dist/ui/packages/kit/src/constants.qwik.mjs +0 -2
- package/dist/ui/packages/kit/src/context.qwik.mjs +5 -4
- package/dist/ui/utils/shiki.qwik.mjs +23 -0
- package/package.json +3 -3
- package/dist/ui/features/RenderTree/transfromqseq.qwik.mjs +0 -91
- package/dist/ui/lib-types/ui/src/features/RenderTree/transfromqseq.d.ts +0 -7
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { getDefaultExportFromCjs } from "./_commonjsHelpers.qwik.mjs";
|
|
2
|
+
import { __require as requireBrowser } from "../node_modules/.pnpm/debug@4.4.3_supports-color@5.5.0/node_modules/debug/src/browser.qwik.mjs";
|
|
3
|
+
var browserExports = requireBrowser();
|
|
4
|
+
const debug = /* @__PURE__ */ getDefaultExportFromCjs(browserExports);
|
|
5
|
+
export {
|
|
6
|
+
browserExports as b,
|
|
7
|
+
debug as default
|
|
8
|
+
};
|
|
@@ -76,7 +76,7 @@ const DevtoolsButton = component$(({ state }) => {
|
|
|
76
76
|
return /* @__PURE__ */ jsx("div", {
|
|
77
77
|
ref: elementRef,
|
|
78
78
|
class: {
|
|
79
|
-
"fixed flex h-9 w-9 origin-center select-none items-center justify-center rounded-lg border
|
|
79
|
+
"border-border bg-background fixed flex h-9 w-9 origin-center select-none items-center justify-center rounded-lg border backdrop-blur-md": true,
|
|
80
80
|
"border-accent/50 bg-background/95 shadow-accent/35 rotate-90 shadow-lg": state.isOpen.value && !isDragging.value,
|
|
81
81
|
"cursor-grab": !isDragging.value,
|
|
82
82
|
"cursor-grabbing": isDragging.value,
|
|
@@ -26,7 +26,7 @@ const DevtoolsPanel = component$(({ state }) => {
|
|
|
26
26
|
});
|
|
27
27
|
return /* @__PURE__ */ jsx("div", {
|
|
28
28
|
ref: panelRef,
|
|
29
|
-
class: "fixed bottom-6 right-6 flex h-[calc(100vh-3rem)] w-[calc(100vw-3rem)] translate-y-0 transform overflow-hidden rounded-lg border-2
|
|
29
|
+
class: "border-border bg-background text-foreground fixed bottom-6 right-6 flex h-[calc(100vh-3rem)] w-[calc(100vw-3rem)] translate-y-0 transform overflow-hidden rounded-lg border-2 backdrop-blur-lg transition-transform duration-300 ease-in-out",
|
|
30
30
|
children: /* @__PURE__ */ jsx(Slot, {})
|
|
31
31
|
});
|
|
32
32
|
});
|
|
@@ -6,7 +6,7 @@ const Tab = component$(({ state, id, title }) => {
|
|
|
6
6
|
title,
|
|
7
7
|
class: {
|
|
8
8
|
"flex h-10 w-10 items-center justify-center rounded-lg p-2.5 transition-all duration-200": true,
|
|
9
|
-
"
|
|
9
|
+
"hover:bg-foreground/5 text-muted-foreground hover:text-foreground bg-transparent": state.activeTab !== id,
|
|
10
10
|
"shadow-accent/35 bg-accent text-white shadow-lg": state.activeTab === id
|
|
11
11
|
},
|
|
12
12
|
children: /* @__PURE__ */ jsx(Slot, {})
|
|
@@ -5,7 +5,7 @@ const TabContent = component$(() => {
|
|
|
5
5
|
class: "flex h-full w-full flex-col space-y-6",
|
|
6
6
|
children: [
|
|
7
7
|
/* @__PURE__ */ jsx("div", {
|
|
8
|
-
class: "flex items-center justify-between border-b
|
|
8
|
+
class: "border-border flex items-center justify-between border-b pb-4",
|
|
9
9
|
children: /* @__PURE__ */ jsx(Slot, {
|
|
10
10
|
name: "title"
|
|
11
11
|
})
|
|
@@ -39,7 +39,7 @@ const QwikThemeToggle = component$(() => {
|
|
|
39
39
|
return /* @__PURE__ */ jsx(Fragment, {
|
|
40
40
|
children: /* @__PURE__ */ jsx("button", {
|
|
41
41
|
onClick$,
|
|
42
|
-
class: "group relative flex h-8 w-8 items-center justify-center rounded-md
|
|
42
|
+
class: "bg-background text-foreground group relative flex h-8 w-8 items-center justify-center rounded-md hover:opacity-60",
|
|
43
43
|
children: /* @__PURE__ */ jsxs("div", {
|
|
44
44
|
class: "absolute inset-0 grid place-items-center transition-transform duration-200 ease-out group-hover:scale-110 group-active:scale-75",
|
|
45
45
|
children: [
|
|
@@ -50,7 +50,7 @@ const TreeNodeComponent = component$((props) => {
|
|
|
50
50
|
class: `inline-flex items-center rounded-md px-2 py-1`,
|
|
51
51
|
children: [
|
|
52
52
|
hasChildren ? /* @__PURE__ */ jsx(HiChevronUpMini, {
|
|
53
|
-
class: `mr-2 h-4 w-4 flex-shrink-0
|
|
53
|
+
class: `text-muted-foreground mr-2 h-4 w-4 flex-shrink-0 transition-transform duration-200 ${isExpanded.value ? "rotate-90" : "rotate-180"}`
|
|
54
54
|
}) : /* @__PURE__ */ jsx("div", {
|
|
55
55
|
class: "mr-2 w-4 flex-shrink-0"
|
|
56
56
|
}),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs, Fragment, jsx } from "@qwik.dev/core/jsx-runtime";
|
|
2
2
|
import { component$, useStyles$, useStore, useSignal, useVisibleTask$, noSerialize } from "@qwik.dev/core";
|
|
3
3
|
import { tryCreateHotContext } from "./node_modules/.pnpm/vite-hot-client@2.0.4_vite@7.1.3_@types_node@20.14.11_jiti@2.6.1_lightningcss@1.30.1_tsx@4.19.2_yaml@2.8.1_/node_modules/vite-hot-client/dist/index.qwik.mjs";
|
|
4
|
-
import { HiBoltOutline, HiCubeOutline, HiPhotoOutline, HiMegaphoneMini, HiCodeBracketSolid } from "./node_modules/.pnpm/@qwikest_icons@0.0.13_@builder.io_qwik@1.11.0_vite@7.1.3_@types_node@20.14.11_jiti@2.6._02d306fcbd9f637dd624291702bff9c0/node_modules/@qwikest/icons/lib/hi.qwik.qwik.mjs";
|
|
4
|
+
import { HiBoltOutline, HiCubeOutline, HiPhotoOutline, HiMegaphoneMini, HiCodeBracketSolid, HiClockOutline } from "./node_modules/.pnpm/@qwikest_icons@0.0.13_@builder.io_qwik@1.11.0_vite@7.1.3_@types_node@20.14.11_jiti@2.6._02d306fcbd9f637dd624291702bff9c0/node_modules/@qwikest/icons/lib/hi.qwik.qwik.mjs";
|
|
5
5
|
import { BsDiagram3 } from "./node_modules/.pnpm/@qwikest_icons@0.0.13_@builder.io_qwik@1.11.0_vite@7.1.3_@types_node@20.14.11_jiti@2.6._02d306fcbd9f637dd624291702bff9c0/node_modules/@qwikest/icons/lib/bs.qwik.qwik.mjs";
|
|
6
6
|
import { LuFolderTree } from "./node_modules/.pnpm/@qwikest_icons@0.0.13_@builder.io_qwik@1.11.0_vite@7.1.3_@types_node@20.14.11_jiti@2.6._02d306fcbd9f637dd624291702bff9c0/node_modules/@qwikest/icons/lib/lu.qwik.qwik.mjs";
|
|
7
7
|
import { createClientRpc } from "./packages/kit/src/client.qwik.mjs";
|
|
@@ -24,6 +24,9 @@ import { Inspect } from "./features/inspect/Inspect.qwik.mjs";
|
|
|
24
24
|
import { QwikThemeToggle } from "./components/ThemeToggle/QwikThemeToggle.qwik.mjs";
|
|
25
25
|
import { ThemeScript } from "./components/ThemeToggle/theme-script.qwik.mjs";
|
|
26
26
|
import { CodeBreack } from "./features/CodeBreack/CodeBreack.qwik.mjs";
|
|
27
|
+
import { Performance } from "./features/Performance/Performance.qwik.mjs";
|
|
28
|
+
import { b as browserExports } from "./_virtual/browser.qwik.mjs";
|
|
29
|
+
const log = browserExports.debug("qwik:devtools:devtools");
|
|
27
30
|
function getClientRpcFunctions() {
|
|
28
31
|
return {
|
|
29
32
|
healthCheck: () => true
|
|
@@ -61,7 +64,7 @@ const QwikDevtools = component$(() => {
|
|
|
61
64
|
const assets = await rpc.getAssetsFromPublicDir();
|
|
62
65
|
state.assets = assets;
|
|
63
66
|
} catch (error) {
|
|
64
|
-
|
|
67
|
+
log("Failed to load assets:", error);
|
|
65
68
|
}
|
|
66
69
|
});
|
|
67
70
|
useVisibleTask$(async ({ track }) => {
|
|
@@ -72,7 +75,7 @@ const QwikDevtools = component$(() => {
|
|
|
72
75
|
const components = await rpc.getComponents();
|
|
73
76
|
state.components = components;
|
|
74
77
|
} catch (error) {
|
|
75
|
-
|
|
78
|
+
log("Failed to load components:", error);
|
|
76
79
|
}
|
|
77
80
|
});
|
|
78
81
|
useVisibleTask$(async ({ track }) => {
|
|
@@ -96,7 +99,7 @@ const QwikDevtools = component$(() => {
|
|
|
96
99
|
];
|
|
97
100
|
state.routes = noSerialize(values);
|
|
98
101
|
} catch (error) {
|
|
99
|
-
|
|
102
|
+
log("Failed to load routes:", error);
|
|
100
103
|
}
|
|
101
104
|
});
|
|
102
105
|
useVisibleTask$(async ({ track }) => {
|
|
@@ -107,7 +110,7 @@ const QwikDevtools = component$(() => {
|
|
|
107
110
|
const qwikPackages = await rpc.getQwikPackages();
|
|
108
111
|
state.npmPackages = qwikPackages;
|
|
109
112
|
} catch (error) {
|
|
110
|
-
|
|
113
|
+
log("Failed to load Qwik packages:", error);
|
|
111
114
|
}
|
|
112
115
|
});
|
|
113
116
|
useVisibleTask$(async ({ track }) => {
|
|
@@ -119,7 +122,7 @@ const QwikDevtools = component$(() => {
|
|
|
119
122
|
const allDeps = await rpc.getAllDependencies();
|
|
120
123
|
state.allDependencies = allDeps;
|
|
121
124
|
} catch (error) {
|
|
122
|
-
|
|
125
|
+
log("Failed to load all dependencies:", error);
|
|
123
126
|
} finally {
|
|
124
127
|
state.isLoadingDependencies = false;
|
|
125
128
|
}
|
|
@@ -136,7 +139,7 @@ const QwikDevtools = component$(() => {
|
|
|
136
139
|
state,
|
|
137
140
|
children: [
|
|
138
141
|
/* @__PURE__ */ jsxs("div", {
|
|
139
|
-
class: "bg-background/95 flex flex-col gap-2 border-r
|
|
142
|
+
class: "bg-background/95 border-border flex flex-col gap-2 border-r p-3",
|
|
140
143
|
children: [
|
|
141
144
|
/* @__PURE__ */ jsx(Tab, {
|
|
142
145
|
state,
|
|
@@ -189,11 +192,19 @@ const QwikDevtools = component$(() => {
|
|
|
189
192
|
/* @__PURE__ */ jsx(Tab, {
|
|
190
193
|
state,
|
|
191
194
|
id: "codeBreack",
|
|
192
|
-
title: "
|
|
195
|
+
title: "CodeBreack",
|
|
193
196
|
children: /* @__PURE__ */ jsx(HiCodeBracketSolid, {
|
|
194
197
|
class: "h-5 w-5"
|
|
195
198
|
})
|
|
196
199
|
}),
|
|
200
|
+
/* @__PURE__ */ jsx(Tab, {
|
|
201
|
+
state,
|
|
202
|
+
id: "performance",
|
|
203
|
+
title: "Performance",
|
|
204
|
+
children: /* @__PURE__ */ jsx(HiClockOutline, {
|
|
205
|
+
class: "h-5 w-5"
|
|
206
|
+
})
|
|
207
|
+
}),
|
|
197
208
|
/* @__PURE__ */ jsx("div", {
|
|
198
209
|
class: "mt-auto",
|
|
199
210
|
children: /* @__PURE__ */ jsx(QwikThemeToggle, {})
|
|
@@ -235,7 +246,7 @@ const QwikDevtools = component$(() => {
|
|
|
235
246
|
"q:slot": "title"
|
|
236
247
|
}),
|
|
237
248
|
/* @__PURE__ */ jsxs("div", {
|
|
238
|
-
class: "flex gap-4 text-sm
|
|
249
|
+
class: "text-muted-foreground flex gap-4 text-sm",
|
|
239
250
|
children: [
|
|
240
251
|
/* @__PURE__ */ jsxs("span", {
|
|
241
252
|
children: [
|
|
@@ -310,6 +321,17 @@ const QwikDevtools = component$(() => {
|
|
|
310
321
|
"q:slot": "content"
|
|
311
322
|
})
|
|
312
323
|
]
|
|
324
|
+
}),
|
|
325
|
+
state.activeTab === "performance" && /* @__PURE__ */ jsxs(TabContent, {
|
|
326
|
+
children: [
|
|
327
|
+
/* @__PURE__ */ jsx(TabTitle, {
|
|
328
|
+
title: "performance",
|
|
329
|
+
"q:slot": "title"
|
|
330
|
+
}),
|
|
331
|
+
/* @__PURE__ */ jsx(Performance, {
|
|
332
|
+
"q:slot": "content"
|
|
333
|
+
})
|
|
334
|
+
]
|
|
313
335
|
})
|
|
314
336
|
]
|
|
315
337
|
})
|
|
@@ -7,7 +7,7 @@ const Assets = component$(({ state }) => {
|
|
|
7
7
|
const isImage = asset.path.match(/\.(jpg|jpeg|png|gif|svg|webp)$/i);
|
|
8
8
|
const fileExt = asset.path.split(".").pop()?.toUpperCase();
|
|
9
9
|
return /* @__PURE__ */ jsxs("div", {
|
|
10
|
-
class: "
|
|
10
|
+
class: "border-border bg-card-item-bg hover:bg-card-item-hover-bg overflow-hidden rounded-xl border transition-all duration-200",
|
|
11
11
|
children: [
|
|
12
12
|
isImage ? /* @__PURE__ */ jsx("div", {
|
|
13
13
|
class: "aspect-square overflow-hidden bg-black/20",
|
|
@@ -21,7 +21,7 @@ const Assets = component$(({ state }) => {
|
|
|
21
21
|
}) : /* @__PURE__ */ jsx("div", {
|
|
22
22
|
class: "flex aspect-square items-center justify-center bg-black/20",
|
|
23
23
|
children: /* @__PURE__ */ jsx("span", {
|
|
24
|
-
class: "font-mono text-2xl
|
|
24
|
+
class: "text-muted-foreground font-mono text-2xl",
|
|
25
25
|
children: fileExt
|
|
26
26
|
})
|
|
27
27
|
}),
|
|
@@ -34,7 +34,7 @@ const Assets = component$(({ state }) => {
|
|
|
34
34
|
children: asset.path.split("/").pop()
|
|
35
35
|
}),
|
|
36
36
|
/* @__PURE__ */ jsxs("div", {
|
|
37
|
-
class: "flex items-center justify-between text-xs
|
|
37
|
+
class: "text-muted-foreground flex items-center justify-between text-xs",
|
|
38
38
|
children: [
|
|
39
39
|
/* @__PURE__ */ jsxs("span", {
|
|
40
40
|
children: [
|
|
@@ -19,17 +19,17 @@ const CodeBreack = component$(() => {
|
|
|
19
19
|
`);
|
|
20
20
|
const currentTab = useSignal("state");
|
|
21
21
|
return /* @__PURE__ */ jsxs("div", {
|
|
22
|
-
class: "space-y-6
|
|
22
|
+
class: "h-full space-y-6 overflow-hidden",
|
|
23
23
|
children: [
|
|
24
24
|
/* @__PURE__ */ jsx("div", {
|
|
25
25
|
class: "flex justify-center",
|
|
26
26
|
children: /* @__PURE__ */ jsxs("div", {
|
|
27
|
-
class: "inline-flex rounded-xl border
|
|
27
|
+
class: "border-border bg-background inline-flex rounded-xl border p-0.5",
|
|
28
28
|
children: [
|
|
29
29
|
/* @__PURE__ */ jsx("button", {
|
|
30
30
|
onClick$: () => currentTab.value = "state",
|
|
31
31
|
class: {
|
|
32
|
-
"
|
|
32
|
+
"rounded-lg px-3 py-2 text-sm font-medium transition-colors md:px-4": true,
|
|
33
33
|
"bg-accent text-white shadow": currentTab.value === "state",
|
|
34
34
|
"text-muted-foreground hover:bg-foreground/5": currentTab.value !== "state"
|
|
35
35
|
},
|
|
@@ -38,7 +38,7 @@ const CodeBreack = component$(() => {
|
|
|
38
38
|
/* @__PURE__ */ jsx("button", {
|
|
39
39
|
onClick$: () => currentTab.value = "html",
|
|
40
40
|
class: {
|
|
41
|
-
"
|
|
41
|
+
"rounded-lg px-3 py-2 text-sm font-medium transition-colors md:px-4": true,
|
|
42
42
|
"bg-accent text-white shadow": currentTab.value === "html",
|
|
43
43
|
"text-muted-foreground hover:bg-foreground/5": currentTab.value !== "html"
|
|
44
44
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs, jsx } from "@qwik.dev/core/jsx-runtime";
|
|
2
2
|
import { component$, useStyles$, useSignal, $, useVisibleTask$ } from "@qwik.dev/core";
|
|
3
3
|
import { _getDomContainer, _vnode_toString } from "@qwik.dev/core/internal";
|
|
4
|
-
import {
|
|
4
|
+
import { getHighlighter } from "../../utils/shiki.qwik.mjs";
|
|
5
5
|
const HtmlParser = component$(() => {
|
|
6
6
|
useStyles$(`
|
|
7
7
|
pre.shiki { overflow: auto; padding: 10px; height: 100%; }
|
|
@@ -62,14 +62,7 @@ ${inputHtml.value}`;
|
|
|
62
62
|
return;
|
|
63
63
|
}
|
|
64
64
|
if (!shikiRef.value) {
|
|
65
|
-
shikiRef.value = await
|
|
66
|
-
themes: [
|
|
67
|
-
"nord"
|
|
68
|
-
],
|
|
69
|
-
langs: [
|
|
70
|
-
"html"
|
|
71
|
-
]
|
|
72
|
-
});
|
|
65
|
+
shikiRef.value = await getHighlighter();
|
|
73
66
|
}
|
|
74
67
|
highlightedHtml.value = shikiRef.value.codeToHtml(htmlResult.value, {
|
|
75
68
|
lang: "html",
|
|
@@ -80,17 +73,17 @@ ${inputHtml.value}`;
|
|
|
80
73
|
class: "grid grid-cols-1 gap-4 md:grid-cols-2",
|
|
81
74
|
children: [
|
|
82
75
|
/* @__PURE__ */ jsxs("div", {
|
|
83
|
-
class: "
|
|
76
|
+
class: "border-border bg-card-item-bg flex h-[60vh] min-h-0 flex-col rounded-xl border",
|
|
84
77
|
children: [
|
|
85
78
|
/* @__PURE__ */ jsxs("div", {
|
|
86
|
-
class: "flex items-center justify-between border-b
|
|
79
|
+
class: "border-border flex items-center justify-between border-b p-3",
|
|
87
80
|
children: [
|
|
88
81
|
/* @__PURE__ */ jsx("div", {
|
|
89
82
|
class: "text-sm font-medium",
|
|
90
83
|
children: "Input HTML"
|
|
91
84
|
}),
|
|
92
85
|
parsingTime.value !== null && /* @__PURE__ */ jsxs("span", {
|
|
93
|
-
class: "rounded-full border
|
|
86
|
+
class: "border-border text-muted-foreground rounded-full border px-2 py-0.5 text-xs",
|
|
94
87
|
children: [
|
|
95
88
|
parsingTime.value,
|
|
96
89
|
"ms"
|
|
@@ -99,19 +92,19 @@ ${inputHtml.value}`;
|
|
|
99
92
|
]
|
|
100
93
|
}),
|
|
101
94
|
/* @__PURE__ */ jsxs("div", {
|
|
102
|
-
class: "
|
|
95
|
+
class: "min-h-0 flex-1 flex-col space-y-3 p-3",
|
|
103
96
|
children: [
|
|
104
97
|
/* @__PURE__ */ jsx("textarea", {
|
|
105
98
|
value: inputHtml.value,
|
|
106
99
|
onInput$: (e, t) => inputHtml.value = t.value,
|
|
107
100
|
placeholder: "Paste HTML and click to parse/format.",
|
|
108
|
-
class: "h-full min-h-0 w-full flex-1 resize-none rounded-md border
|
|
101
|
+
class: "border-border bg-background h-full min-h-0 w-full flex-1 resize-none rounded-md border p-3 font-mono text-sm"
|
|
109
102
|
}),
|
|
110
103
|
/* @__PURE__ */ jsx("div", {
|
|
111
104
|
class: "flex items-center gap-3",
|
|
112
105
|
children: /* @__PURE__ */ jsx("button", {
|
|
113
106
|
onClick$: onParseHtml$,
|
|
114
|
-
class: "bg-accent
|
|
107
|
+
class: "bg-accent rounded-md px-3 py-1.5 text-sm text-white hover:opacity-90",
|
|
115
108
|
children: "Parse HTML"
|
|
116
109
|
})
|
|
117
110
|
})
|
|
@@ -120,17 +113,17 @@ ${inputHtml.value}`;
|
|
|
120
113
|
]
|
|
121
114
|
}),
|
|
122
115
|
/* @__PURE__ */ jsxs("div", {
|
|
123
|
-
class: "
|
|
116
|
+
class: "border-border bg-card-item-bg flex h-[60vh] min-h-0 flex-col overflow-hidden rounded-xl border",
|
|
124
117
|
children: [
|
|
125
118
|
/* @__PURE__ */ jsxs("div", {
|
|
126
|
-
class: "flex items-center justify-between border-b
|
|
119
|
+
class: "border-border flex items-center justify-between border-b p-3",
|
|
127
120
|
children: [
|
|
128
121
|
/* @__PURE__ */ jsx("div", {
|
|
129
122
|
class: "text-sm font-medium",
|
|
130
123
|
children: "VNode Tree"
|
|
131
124
|
}),
|
|
132
125
|
parsingTime.value !== null && /* @__PURE__ */ jsxs("span", {
|
|
133
|
-
class: "rounded-full border
|
|
126
|
+
class: "border-border text-muted-foreground rounded-full border px-2 py-0.5 text-xs",
|
|
134
127
|
children: [
|
|
135
128
|
parsingTime.value,
|
|
136
129
|
"ms"
|
|
@@ -139,9 +132,9 @@ ${inputHtml.value}`;
|
|
|
139
132
|
]
|
|
140
133
|
}),
|
|
141
134
|
/* @__PURE__ */ jsx("div", {
|
|
142
|
-
class: "
|
|
135
|
+
class: "h-full min-h-0 flex-1",
|
|
143
136
|
children: /* @__PURE__ */ jsx("pre", {
|
|
144
|
-
class: "overflow-auto
|
|
137
|
+
class: "h-full overflow-auto",
|
|
145
138
|
dangerouslySetInnerHTML: highlightedHtml.value || ""
|
|
146
139
|
})
|
|
147
140
|
})
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs, jsx } from "@qwik.dev/core/jsx-runtime";
|
|
2
2
|
import { component$, useStyles$, useSignal, $, useVisibleTask$ } from "@qwik.dev/core";
|
|
3
3
|
import { _preprocessState, _dumpState } from "@qwik.dev/core/internal";
|
|
4
|
-
import {
|
|
4
|
+
import { getHighlighter } from "../../utils/shiki.qwik.mjs";
|
|
5
5
|
const StateParser = component$(() => {
|
|
6
6
|
useStyles$(`
|
|
7
7
|
pre.shiki { overflow: auto; padding: 10px; height: 100%; }
|
|
@@ -75,14 +75,7 @@ ${inputState.value}`;
|
|
|
75
75
|
return;
|
|
76
76
|
}
|
|
77
77
|
if (!shikiRef.value) {
|
|
78
|
-
shikiRef.value = await
|
|
79
|
-
themes: [
|
|
80
|
-
"nord"
|
|
81
|
-
],
|
|
82
|
-
langs: [
|
|
83
|
-
"json"
|
|
84
|
-
]
|
|
85
|
-
});
|
|
78
|
+
shikiRef.value = await getHighlighter();
|
|
86
79
|
}
|
|
87
80
|
highlightedState.value = shikiRef.value.codeToHtml(stateResult.value, {
|
|
88
81
|
lang: "json",
|
|
@@ -93,17 +86,17 @@ ${inputState.value}`;
|
|
|
93
86
|
class: "grid grid-cols-1 gap-4 md:grid-cols-2",
|
|
94
87
|
children: [
|
|
95
88
|
/* @__PURE__ */ jsxs("div", {
|
|
96
|
-
class: "
|
|
89
|
+
class: "border-border bg-card-item-bg flex h-[60vh] min-h-0 flex-col rounded-xl border",
|
|
97
90
|
children: [
|
|
98
91
|
/* @__PURE__ */ jsxs("div", {
|
|
99
|
-
class: "flex items-center justify-between border-b
|
|
92
|
+
class: "border-border flex items-center justify-between border-b p-3",
|
|
100
93
|
children: [
|
|
101
94
|
/* @__PURE__ */ jsx("div", {
|
|
102
95
|
class: "text-sm font-medium",
|
|
103
96
|
children: "Input State"
|
|
104
97
|
}),
|
|
105
98
|
parsingTime.value !== null && /* @__PURE__ */ jsxs("span", {
|
|
106
|
-
class: "rounded-full border
|
|
99
|
+
class: "border-border text-muted-foreground rounded-full border px-2 py-0.5 text-xs",
|
|
107
100
|
children: [
|
|
108
101
|
parsingTime.value,
|
|
109
102
|
"ms"
|
|
@@ -112,19 +105,19 @@ ${inputState.value}`;
|
|
|
112
105
|
]
|
|
113
106
|
}),
|
|
114
107
|
/* @__PURE__ */ jsxs("div", {
|
|
115
|
-
class: "
|
|
108
|
+
class: "min-h-0 flex-1 flex-col space-y-3 p-3",
|
|
116
109
|
children: [
|
|
117
110
|
/* @__PURE__ */ jsx("textarea", {
|
|
118
111
|
value: inputState.value,
|
|
119
112
|
onInput$: (e, t) => inputState.value = t.value,
|
|
120
113
|
placeholder: "Paste Qwik state and click to parse/format.",
|
|
121
|
-
class: "h-full min-h-0 w-full flex-1 resize-none rounded-md border
|
|
114
|
+
class: "border-border bg-background h-full min-h-0 w-full flex-1 resize-none rounded-md border p-3 font-mono text-sm"
|
|
122
115
|
}),
|
|
123
116
|
/* @__PURE__ */ jsx("div", {
|
|
124
117
|
class: "flex items-center gap-3",
|
|
125
118
|
children: /* @__PURE__ */ jsx("button", {
|
|
126
119
|
onClick$: onParseState$,
|
|
127
|
-
class: "bg-accent
|
|
120
|
+
class: "bg-accent rounded-md px-3 py-1.5 text-sm text-white hover:opacity-90",
|
|
128
121
|
children: "Parse State"
|
|
129
122
|
})
|
|
130
123
|
})
|
|
@@ -133,17 +126,17 @@ ${inputState.value}`;
|
|
|
133
126
|
]
|
|
134
127
|
}),
|
|
135
128
|
/* @__PURE__ */ jsxs("div", {
|
|
136
|
-
class: "
|
|
129
|
+
class: "border-border bg-card-item-bg flex h-[60vh] min-h-0 flex-col overflow-hidden rounded-xl border",
|
|
137
130
|
children: [
|
|
138
131
|
/* @__PURE__ */ jsxs("div", {
|
|
139
|
-
class: "flex items-center justify-between border-b
|
|
132
|
+
class: "border-border flex items-center justify-between border-b p-3",
|
|
140
133
|
children: [
|
|
141
134
|
/* @__PURE__ */ jsx("div", {
|
|
142
135
|
class: "text-sm font-medium",
|
|
143
136
|
children: "Parsed State"
|
|
144
137
|
}),
|
|
145
138
|
parsingTime.value !== null && /* @__PURE__ */ jsxs("span", {
|
|
146
|
-
class: "rounded-full border
|
|
139
|
+
class: "border-border text-muted-foreground rounded-full border px-2 py-0.5 text-xs",
|
|
147
140
|
children: [
|
|
148
141
|
parsingTime.value,
|
|
149
142
|
"ms"
|
|
@@ -152,9 +145,9 @@ ${inputState.value}`;
|
|
|
152
145
|
]
|
|
153
146
|
}),
|
|
154
147
|
/* @__PURE__ */ jsx("div", {
|
|
155
|
-
class: "
|
|
148
|
+
class: "h-full min-h-0 flex-1",
|
|
156
149
|
children: /* @__PURE__ */ jsx("pre", {
|
|
157
|
-
class: "overflow-auto
|
|
150
|
+
class: "h-full overflow-auto",
|
|
158
151
|
dangerouslySetInnerHTML: highlightedState.value || ""
|
|
159
152
|
})
|
|
160
153
|
})
|
|
@@ -19,12 +19,12 @@ const Overview = component$(({ state }) => {
|
|
|
19
19
|
$(() => pageJump("routes")),
|
|
20
20
|
stopPropagation
|
|
21
21
|
],
|
|
22
|
-
class: "flex cursor-pointer items-center gap-5 rounded-xl border
|
|
22
|
+
class: "border-border bg-card-item-bg hover:bg-card-item-hover-bg flex cursor-pointer items-center gap-5 rounded-xl border p-5 transition-all duration-200 hover:-translate-y-0.5",
|
|
23
23
|
children: [
|
|
24
24
|
/* @__PURE__ */ jsx("div", {
|
|
25
|
-
class: "bg-foreground/5 rounded-lg border
|
|
25
|
+
class: "bg-foreground/5 border-border rounded-lg border p-3.5",
|
|
26
26
|
children: /* @__PURE__ */ jsx(LuFolderTree, {
|
|
27
|
-
class: "h-6 w-6
|
|
27
|
+
class: "text-accent h-6 w-6"
|
|
28
28
|
})
|
|
29
29
|
}),
|
|
30
30
|
/* @__PURE__ */ jsxs("div", {
|
|
@@ -34,7 +34,7 @@ const Overview = component$(({ state }) => {
|
|
|
34
34
|
children: state.routes?.length
|
|
35
35
|
}),
|
|
36
36
|
/* @__PURE__ */ jsx("div", {
|
|
37
|
-
class: "text-
|
|
37
|
+
class: "text-muted-foreground text-sm",
|
|
38
38
|
children: "pages"
|
|
39
39
|
})
|
|
40
40
|
]
|
|
@@ -46,12 +46,12 @@ const Overview = component$(({ state }) => {
|
|
|
46
46
|
$(() => pageJump("components")),
|
|
47
47
|
stopPropagation
|
|
48
48
|
],
|
|
49
|
-
class: "flex cursor-pointer items-center gap-5 rounded-xl border
|
|
49
|
+
class: "border-border bg-card-item-bg hover:bg-card-item-hover-bg flex cursor-pointer items-center gap-5 rounded-xl border p-5 transition-all duration-200 hover:-translate-y-0.5",
|
|
50
50
|
children: [
|
|
51
51
|
/* @__PURE__ */ jsx("div", {
|
|
52
|
-
class: "bg-foreground/5 rounded-lg border
|
|
52
|
+
class: "bg-foreground/5 border-border rounded-lg border p-3.5",
|
|
53
53
|
children: /* @__PURE__ */ jsx(HiCubeOutline, {
|
|
54
|
-
class: "h-6 w-6
|
|
54
|
+
class: "text-accent h-6 w-6"
|
|
55
55
|
})
|
|
56
56
|
}),
|
|
57
57
|
/* @__PURE__ */ jsxs("div", {
|
|
@@ -61,7 +61,7 @@ const Overview = component$(({ state }) => {
|
|
|
61
61
|
children: state.components.length
|
|
62
62
|
}),
|
|
63
63
|
/* @__PURE__ */ jsx("div", {
|
|
64
|
-
class: "text-
|
|
64
|
+
class: "text-muted-foreground text-sm",
|
|
65
65
|
children: "components"
|
|
66
66
|
})
|
|
67
67
|
]
|
|
@@ -73,12 +73,12 @@ const Overview = component$(({ state }) => {
|
|
|
73
73
|
$(() => pageJump("assets")),
|
|
74
74
|
stopPropagation
|
|
75
75
|
],
|
|
76
|
-
class: "flex cursor-pointer items-center gap-5 rounded-xl border
|
|
76
|
+
class: "border-border bg-card-item-bg hover:bg-card-item-hover-bg flex cursor-pointer items-center gap-5 rounded-xl border p-5 transition-all duration-200 hover:-translate-y-0.5",
|
|
77
77
|
children: [
|
|
78
78
|
/* @__PURE__ */ jsx("div", {
|
|
79
|
-
class: "bg-foreground/5 rounded-lg border
|
|
79
|
+
class: "bg-foreground/5 border-border rounded-lg border p-3.5",
|
|
80
80
|
children: /* @__PURE__ */ jsx(HiPhotoOutline, {
|
|
81
|
-
class: "h-6 w-6
|
|
81
|
+
class: "text-accent h-6 w-6"
|
|
82
82
|
})
|
|
83
83
|
}),
|
|
84
84
|
/* @__PURE__ */ jsxs("div", {
|
|
@@ -88,7 +88,7 @@ const Overview = component$(({ state }) => {
|
|
|
88
88
|
children: state.assets.length || 0
|
|
89
89
|
}),
|
|
90
90
|
/* @__PURE__ */ jsx("div", {
|
|
91
|
-
class: "text-
|
|
91
|
+
class: "text-muted-foreground text-sm",
|
|
92
92
|
children: "assets"
|
|
93
93
|
})
|
|
94
94
|
]
|
|
@@ -102,7 +102,7 @@ const Overview = component$(({ state }) => {
|
|
|
102
102
|
$(() => pageJump("packages")),
|
|
103
103
|
stopPropagation
|
|
104
104
|
],
|
|
105
|
-
class: "cursor-pointer space-y-4 rounded-xl border
|
|
105
|
+
class: "border-border bg-card-item-bg hover:bg-card-item-hover-bg mt-6 cursor-pointer space-y-4 rounded-xl border p-5 hover:-translate-y-0.5 md:mt-6",
|
|
106
106
|
children: [
|
|
107
107
|
/* @__PURE__ */ jsx("h3", {
|
|
108
108
|
class: "text-lg font-semibold",
|
|
@@ -118,7 +118,7 @@ const Overview = component$(({ state }) => {
|
|
|
118
118
|
children: name
|
|
119
119
|
}),
|
|
120
120
|
/* @__PURE__ */ jsx("div", {
|
|
121
|
-
class: "bg-foreground/5 rounded-full border
|
|
121
|
+
class: "bg-foreground/5 border-border text-muted-foreground rounded-full border px-2 py-1 text-xs",
|
|
122
122
|
children: version
|
|
123
123
|
})
|
|
124
124
|
]
|
|
@@ -127,7 +127,7 @@ const Overview = component$(({ state }) => {
|
|
|
127
127
|
]
|
|
128
128
|
}),
|
|
129
129
|
/* @__PURE__ */ jsxs("div", {
|
|
130
|
-
class: "space-y-4 rounded-xl border
|
|
130
|
+
class: "border-border bg-card-item-bg mt-6 space-y-4 rounded-xl border p-5 md:mt-6",
|
|
131
131
|
children: [
|
|
132
132
|
/* @__PURE__ */ jsx("h3", {
|
|
133
133
|
class: "text-lg font-semibold",
|
|
@@ -137,7 +137,7 @@ const Overview = component$(({ state }) => {
|
|
|
137
137
|
class: "space-y-3",
|
|
138
138
|
children: [
|
|
139
139
|
/* @__PURE__ */ jsxs("div", {
|
|
140
|
-
class: "flex justify-between border-b
|
|
140
|
+
class: "border-border flex justify-between border-b py-2",
|
|
141
141
|
children: [
|
|
142
142
|
/* @__PURE__ */ jsx("span", {
|
|
143
143
|
class: "text-muted-foreground",
|
|
@@ -150,7 +150,7 @@ const Overview = component$(({ state }) => {
|
|
|
150
150
|
]
|
|
151
151
|
}),
|
|
152
152
|
/* @__PURE__ */ jsxs("div", {
|
|
153
|
-
class: "flex justify-between border-b
|
|
153
|
+
class: "border-border flex justify-between border-b py-2",
|
|
154
154
|
children: [
|
|
155
155
|
/* @__PURE__ */ jsx("span", {
|
|
156
156
|
class: "text-muted-foreground",
|
|
@@ -14,16 +14,16 @@ const Packages = component$(({ state }) => {
|
|
|
14
14
|
class: "flex items-center gap-2",
|
|
15
15
|
children: [
|
|
16
16
|
/* @__PURE__ */ jsx("div", {
|
|
17
|
-
class: "border-t-foreground/40
|
|
17
|
+
class: "border-t-foreground/40 border-border h-5 w-5 animate-spin rounded-full border-2"
|
|
18
18
|
}),
|
|
19
19
|
/* @__PURE__ */ jsx("span", {
|
|
20
|
-
class: "text-
|
|
20
|
+
class: "text-muted-foreground text-sm",
|
|
21
21
|
children: "Loading dependencies..."
|
|
22
22
|
})
|
|
23
23
|
]
|
|
24
24
|
}),
|
|
25
25
|
/* @__PURE__ */ jsxs("div", {
|
|
26
|
-
class: "text-
|
|
26
|
+
class: "text-muted-foreground text-center text-xs",
|
|
27
27
|
children: [
|
|
28
28
|
"Dependencies are being preloaded in the background...",
|
|
29
29
|
/* @__PURE__ */ jsx("br", {}),
|
|
@@ -38,7 +38,7 @@ const Packages = component$(({ state }) => {
|
|
|
38
38
|
return /* @__PURE__ */ jsx("div", {
|
|
39
39
|
class: "py-8 text-center",
|
|
40
40
|
children: /* @__PURE__ */ jsx("div", {
|
|
41
|
-
class: "text-
|
|
41
|
+
class: "text-muted-foreground text-sm",
|
|
42
42
|
children: "No dependencies found in package.json"
|
|
43
43
|
})
|
|
44
44
|
});
|