@qwik.dev/devtools 2.0.0-beta.43 → 2.0.0-beta.47
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/kit/index.d.mts +6 -0
- package/dist/kit/index.mjs +4 -6
- package/dist/plugin/codegen.mjs +1 -1
- package/dist/plugin/{create-hook-runtime-ChnIePeB.mjs → create-hook-runtime-CAtQC5B3.mjs} +42 -22
- package/dist/plugin/index.mjs +15 -7
- package/dist/ui/{bundle-graph-CoI___e1.json → bundle-graph-DNRrO_5W.json} +1 -1
- package/dist/ui/entry.extension.qwik.mjs +3 -2
- package/dist/ui/lib-types/ui/src/features/HookTree/hookTreeHelpers.d.ts +1 -1
- package/dist/ui/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/handle/element.qwik.mjs +2 -2
- package/dist/ui/node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/index.qwik.mjs +1 -1
- package/dist/ui/node_modules/.pnpm/{property-information@7.1.0 → property-information@7.2.0}/node_modules/property-information/lib/html.qwik.mjs +11 -1
- package/dist/ui/node_modules/.pnpm/{property-information@7.1.0 → property-information@7.2.0}/node_modules/property-information/lib/svg.qwik.mjs +2 -0
- package/dist/ui/packages/devtools/kit/src/overlay-paths.qwik.mjs +4 -4
- package/dist/ui/packages/devtools/ui/src/components/DevtoolsButton/DevtoolsButton.qwik.mjs +21 -19
- package/dist/ui/packages/devtools/ui/src/components/DevtoolsContainer/DevtoolsContainer.qwik.mjs +4 -1
- package/dist/ui/packages/devtools/ui/src/components/DevtoolsPanel/DevtoolsPanel.qwik.mjs +91 -78
- package/dist/ui/packages/devtools/ui/src/components/IconButton/IconButton.qwik.mjs +3 -2
- package/dist/ui/packages/devtools/ui/src/components/Icons/Icons.qwik.mjs +178 -96
- package/dist/ui/packages/devtools/ui/src/components/InfoBanner/InfoBanner.qwik.mjs +4 -2
- package/dist/ui/packages/devtools/ui/src/components/Tab/Tab.qwik.mjs +5 -6
- package/dist/ui/packages/devtools/ui/src/components/TabContent/TabContent.qwik.mjs +1 -1
- package/dist/ui/packages/devtools/ui/src/components/TabTitle/TabTitle.qwik.mjs +1 -1
- package/dist/ui/packages/devtools/ui/src/components/ThemeToggle/QwikThemeToggle.qwik.mjs +4 -4
- package/dist/ui/packages/devtools/ui/src/components/ThemeToggle/theme-script.qwik.mjs +1 -1
- package/dist/ui/packages/devtools/ui/src/components/Tree/Tree.qwik.mjs +41 -24
- package/dist/ui/packages/devtools/ui/src/devtools/CommandPalette.qwik.mjs +49 -35
- package/dist/ui/packages/devtools/ui/src/devtools/CustomizeTabsPanel.qwik.mjs +46 -35
- package/dist/ui/packages/devtools/ui/src/devtools/DevtoolsContent.qwik.mjs +30 -45
- package/dist/ui/packages/devtools/ui/src/devtools/DevtoolsSidebar.qwik.mjs +28 -22
- package/dist/ui/packages/devtools/ui/src/devtools/QwikDevtools.qwik.mjs +10 -10
- package/dist/ui/packages/devtools/ui/src/devtools/QwikDevtoolsExtension.qwik.mjs +5 -4
- package/dist/ui/packages/devtools/ui/src/devtools/command-palette.qwik.mjs +24 -12
- package/dist/ui/packages/devtools/ui/src/devtools/page-data-source.qwik.mjs +4 -2
- package/dist/ui/packages/devtools/ui/src/devtools/rpc.qwik.mjs +6 -4
- package/dist/ui/packages/devtools/ui/src/devtools/sidebar-tabs.qwik.mjs +24 -13
- package/dist/ui/packages/devtools/ui/src/devtools/tabs.qwik.mjs +10 -10
- package/dist/ui/packages/devtools/ui/src/features/Assets/Assets.qwik.mjs +2 -2
- package/dist/ui/packages/devtools/ui/src/features/BuildAnalysis/BuildAnalysis.qwik.mjs +15 -13
- package/dist/ui/packages/devtools/ui/src/features/CodeBreak/CodeBreak.qwik.mjs +19 -21
- package/dist/ui/packages/devtools/ui/src/features/CodeBreak/HtmlParser.qwik.mjs +13 -11
- package/dist/ui/packages/devtools/ui/src/features/CodeBreak/StateParser.qwik.mjs +13 -11
- package/dist/ui/packages/devtools/ui/src/features/HookTree/HookTree.qwik.mjs +82 -71
- package/dist/ui/packages/devtools/ui/src/features/HookTree/hookTreeHelpers.qwik.mjs +7 -4
- package/dist/ui/packages/devtools/ui/src/features/Inspect/Inspect.qwik.mjs +12 -11
- package/dist/ui/packages/devtools/ui/src/features/Inspect/iframe-theme.qwik.mjs +2 -1
- package/dist/ui/packages/devtools/ui/src/features/Overview/Overview.qwik.mjs +20 -16
- package/dist/ui/packages/devtools/ui/src/features/Packages/Packages.qwik.mjs +37 -36
- package/dist/ui/packages/devtools/ui/src/features/Packages/components/DependencyCard/DependencyCard.qwik.mjs +38 -28
- package/dist/ui/packages/devtools/ui/src/features/Packages/components/DependencyOperationFeedback/DependencyOperationFeedback.qwik.mjs +4 -3
- package/dist/ui/packages/devtools/ui/src/features/Packages/components/DependencyToolbar/DependencyToolbar.qwik.mjs +19 -18
- package/dist/ui/packages/devtools/ui/src/features/Packages/components/InstalledDependencyList/InstalledDependencyList.qwik.mjs +4 -4
- package/dist/ui/packages/devtools/ui/src/features/Packages/components/PackageIcon/PackageIcon.qwik.mjs +4 -4
- package/dist/ui/packages/devtools/ui/src/features/Packages/components/PackageSearchResults/PackageSearchResults.qwik.mjs +6 -5
- package/dist/ui/packages/devtools/ui/src/features/Packages/components/SearchResultCard/SearchResultCard.qwik.mjs +25 -14
- package/dist/ui/packages/devtools/ui/src/features/Performance/Performance.qwik.mjs +24 -20
- package/dist/ui/packages/devtools/ui/src/features/Performance/components/ComponentCard.qwik.mjs +3 -1
- package/dist/ui/packages/devtools/ui/src/features/Performance/components/HookDetailsPanel.qwik.mjs +10 -6
- package/dist/ui/packages/devtools/ui/src/features/Performance/components/PerformanceOverview.qwik.mjs +11 -9
- package/dist/ui/packages/devtools/ui/src/features/Performance/components/StatCard.qwik.mjs +2 -2
- package/dist/ui/packages/devtools/ui/src/features/Performance/computePerfViewModel.qwik.mjs +4 -2
- package/dist/ui/packages/devtools/ui/src/features/Preloads/Preloads.qwik.mjs +94 -82
- package/dist/ui/packages/devtools/ui/src/features/RenderTree/RenderTree.qwik.mjs +36 -32
- package/dist/ui/packages/devtools/ui/src/features/RenderTree/components/HighlightedCodeList.qwik.mjs +2 -1
- package/dist/ui/packages/devtools/ui/src/features/RenderTree/components/HookFiltersCard.qwik.mjs +17 -18
- package/dist/ui/packages/devtools/ui/src/features/RenderTree/components/RenderTreeTabs.qwik.mjs +4 -2
- package/dist/ui/packages/devtools/ui/src/features/RenderTree/components/StateTreeNodeLabel.qwik.mjs +8 -7
- package/dist/ui/packages/devtools/ui/src/features/Routes/Routes.qwik.mjs +10 -6
- package/dist/ui/q-manifest.json +187 -187
- package/package.json +8 -8
- /package/dist/ui/node_modules/.pnpm/{debug@4.4.3_supports-color@10.2.2 → debug@4.4.3_supports-color@11.0.0}/node_modules/debug/src/browser.qwik.mjs +0 -0
- /package/dist/ui/node_modules/.pnpm/{debug@4.4.3_supports-color@10.2.2 → debug@4.4.3_supports-color@11.0.0}/node_modules/debug/src/common.qwik.mjs +0 -0
- /package/dist/ui/node_modules/.pnpm/{property-information@7.1.0 → property-information@7.2.0}/node_modules/property-information/index.qwik.mjs +0 -0
- /package/dist/ui/node_modules/.pnpm/{property-information@7.1.0 → property-information@7.2.0}/node_modules/property-information/lib/aria.qwik.mjs +0 -0
- /package/dist/ui/node_modules/.pnpm/{property-information@7.1.0 → property-information@7.2.0}/node_modules/property-information/lib/find.qwik.mjs +0 -0
- /package/dist/ui/node_modules/.pnpm/{property-information@7.1.0 → property-information@7.2.0}/node_modules/property-information/lib/normalize.qwik.mjs +0 -0
- /package/dist/ui/node_modules/.pnpm/{property-information@7.1.0 → property-information@7.2.0}/node_modules/property-information/lib/util/case-insensitive-transform.qwik.mjs +0 -0
- /package/dist/ui/node_modules/.pnpm/{property-information@7.1.0 → property-information@7.2.0}/node_modules/property-information/lib/util/case-sensitive-transform.qwik.mjs +0 -0
- /package/dist/ui/node_modules/.pnpm/{property-information@7.1.0 → property-information@7.2.0}/node_modules/property-information/lib/util/create.qwik.mjs +0 -0
- /package/dist/ui/node_modules/.pnpm/{property-information@7.1.0 → property-information@7.2.0}/node_modules/property-information/lib/util/defined-info.qwik.mjs +0 -0
- /package/dist/ui/node_modules/.pnpm/{property-information@7.1.0 → property-information@7.2.0}/node_modules/property-information/lib/util/info.qwik.mjs +0 -0
- /package/dist/ui/node_modules/.pnpm/{property-information@7.1.0 → property-information@7.2.0}/node_modules/property-information/lib/util/merge.qwik.mjs +0 -0
- /package/dist/ui/node_modules/.pnpm/{property-information@7.1.0 → property-information@7.2.0}/node_modules/property-information/lib/util/schema.qwik.mjs +0 -0
- /package/dist/ui/node_modules/.pnpm/{property-information@7.1.0 → property-information@7.2.0}/node_modules/property-information/lib/util/types.qwik.mjs +0 -0
- /package/dist/ui/node_modules/.pnpm/{property-information@7.1.0 → property-information@7.2.0}/node_modules/property-information/lib/xlink.qwik.mjs +0 -0
- /package/dist/ui/node_modules/.pnpm/{property-information@7.1.0 → property-information@7.2.0}/node_modules/property-information/lib/xml.qwik.mjs +0 -0
- /package/dist/ui/node_modules/.pnpm/{property-information@7.1.0 → property-information@7.2.0}/node_modules/property-information/lib/xmlns.qwik.mjs +0 -0
- /package/dist/ui/node_modules/.pnpm/{vite-hot-client@2.1.0_vite@8.2.1_@types_node@24.10.0_esbuild@0.28.2_jiti@2.6.1_terser@5.46.0_tsx@4.21.0_yaml@2.8.3_ → vite-hot-client@2.2.0_vite@8.2.1_@types_node@25.6.0_esbuild@0.28.2_jiti@2.7.0_terser@5.46.0_tsx@4.21.0_yaml@2.9.0_}/node_modules/vite-hot-client/dist/index.qwik.mjs +0 -0
|
@@ -1,23 +1,34 @@
|
|
|
1
1
|
import { IconChevronUpMini } from "../Icons/Icons.qwik.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { _capturesObj, _fnSignal, _jsxSorted, _wrapProp, componentQrl, inlinedQrl, useSignal, useVisibleTaskQrl } from "@qwik.dev/core";
|
|
3
3
|
import { Fragment } from "@qwik.dev/core/jsx-runtime";
|
|
4
4
|
var _hf0 = (p0) => p0.level + 1;
|
|
5
|
+
var _hf0_str = "p0.level+1";
|
|
5
6
|
var _hf1 = (p0, p1) => p0 ? {
|
|
6
7
|
boxShadow: "inset 2px 0 0 0 var(--color-primary)",
|
|
7
8
|
paddingLeft: `${p1.level * p1.gap}px`
|
|
8
9
|
} : { paddingLeft: `${p1.level * p1.gap}px` };
|
|
10
|
+
var _hf1_str = "p0?{boxShadow:\"inset 2px 0 0 0 var(--color-primary)\",paddingLeft:`${p1.level * p1.gap}px`}:{paddingLeft:`${p1.level * p1.gap}px`}";
|
|
9
11
|
var _hf2 = (p0) => p0.node.id;
|
|
12
|
+
var _hf2_str = "p0.node.id";
|
|
10
13
|
var _hf3 = (p0) => p0.node.name || p0.node.label || "";
|
|
14
|
+
var _hf3_str = "p0.node.name||p0.node.label||\"\"";
|
|
11
15
|
var _hf4 = (p0) => p0.node.label || p0.node.name;
|
|
16
|
+
var _hf4_str = "p0.node.label||p0.node.name";
|
|
12
17
|
var _hf5 = (p0) => p0.isHover !== false;
|
|
18
|
+
var _hf5_str = "p0.isHover!==false";
|
|
13
19
|
var _hf6 = (p0) => p0.gap ?? 20;
|
|
20
|
+
var _hf6_str = "p0.gap??20";
|
|
14
21
|
var _hf7 = (p0) => p0.expandLevel ?? 2;
|
|
22
|
+
var _hf7_str = "p0.expandLevel??2";
|
|
15
23
|
var _hf8 = (p0) => p0.animate ?? true;
|
|
16
|
-
|
|
24
|
+
var _hf8_str = "p0.animate??true";
|
|
25
|
+
/** Prop keys that should be rendered next to the element name in the tree. */
|
|
26
|
+
var DISPLAY_PROPS = ["q:id", "q:key"];
|
|
17
27
|
/**
|
|
18
28
|
* Build a compact attribute string from a node's props. Only displays the keys listed in
|
|
19
29
|
* `DISPLAY_PROPS`.
|
|
20
|
-
*/
|
|
30
|
+
*/
|
|
31
|
+
function formatDisplayProps(props) {
|
|
21
32
|
let result = "";
|
|
22
33
|
for (const key of DISPLAY_PROPS) {
|
|
23
34
|
const value = props[key];
|
|
@@ -25,7 +36,8 @@ var _hf8 = (p0) => p0.animate ?? true;
|
|
|
25
36
|
}
|
|
26
37
|
return result;
|
|
27
38
|
}
|
|
28
|
-
/** Collects the ids from the root down to the first node whose name or label matches. */
|
|
39
|
+
/** Collects the ids from the root down to the first node whose name or label matches. */
|
|
40
|
+
function findIdPathByName(nodes, name) {
|
|
29
41
|
for (const node of nodes) {
|
|
30
42
|
if (node.name === name || node.label === name) return [node.id];
|
|
31
43
|
const childPath = node.children?.length ? findIdPathByName(node.children, name) : null;
|
|
@@ -38,7 +50,7 @@ var TreeNodeComponent = /*#__PURE__*/ componentQrl(/*#__PURE__*/ inlinedQrl((pro
|
|
|
38
50
|
const override = props.expanded[props.node.id];
|
|
39
51
|
const childrenVisible = override !== void 0 ? override : props.level < props.expandLevel;
|
|
40
52
|
const handleNodeClick = /*#__PURE__*/ inlinedQrl(() => {
|
|
41
|
-
|
|
53
|
+
let childrenVisible = _capturesObj._[0], hasChildren = _capturesObj._[1], props = _capturesObj._[2];
|
|
42
54
|
props.onNodeClick(props.node);
|
|
43
55
|
if (hasChildren) props.onToggle(props.node.id, childrenVisible);
|
|
44
56
|
}, "TreeNodeComponent_component_handleNodeClick_hFhWIIdgPGE", [
|
|
@@ -53,7 +65,7 @@ var TreeNodeComponent = /*#__PURE__*/ componentQrl(/*#__PURE__*/ inlinedQrl((pro
|
|
|
53
65
|
isHover: _wrapProp(props, "isHover"),
|
|
54
66
|
gap: _wrapProp(props, "gap"),
|
|
55
67
|
expandLevel: _wrapProp(props, "expandLevel"),
|
|
56
|
-
level: _fnSignal(_hf0, [props]),
|
|
68
|
+
level: _fnSignal(_hf0, [props], _hf0_str),
|
|
57
69
|
activeNodeId: _wrapProp(props, "activeNodeId"),
|
|
58
70
|
expanded: _wrapProp(props, "expanded"),
|
|
59
71
|
onToggle: _wrapProp(props, "onToggle"),
|
|
@@ -64,25 +76,25 @@ var TreeNodeComponent = /*#__PURE__*/ componentQrl(/*#__PURE__*/ inlinedQrl((pro
|
|
|
64
76
|
}, null, 3, child.id));
|
|
65
77
|
return /*#__PURE__*/ _jsxSorted("div", null, { class: "w-full" }, [/*#__PURE__*/ _jsxSorted("div", {
|
|
66
78
|
class: ["flex w-full cursor-pointer items-center rounded-lg px-1 py-0.5 transition-colors duration-150", isActive ? "bg-primary/10 text-primary" : "hover:bg-card-item-hover-bg"],
|
|
67
|
-
"data-node-id": _fnSignal(_hf2, [props]),
|
|
68
|
-
"data-node-name": _fnSignal(_hf3, [props]),
|
|
69
|
-
style: _fnSignal(_hf1, [isActive, props])
|
|
70
|
-
}, { "q-e:click": handleNodeClick }, /*#__PURE__*/ _jsxSorted("div", null, { class: "inline-flex items-center px-2 py-1" }, [hasChildren ? /*#__PURE__*/ _jsxSorted(IconChevronUpMini, { class: `text-muted-foreground mr-2 h-4 w-4 shrink-0 transition-transform duration-200 ${childrenVisible ? "rotate-180" : "rotate-90"}` }, null, null, 3, "
|
|
79
|
+
"data-node-id": _fnSignal(_hf2, [props], _hf2_str),
|
|
80
|
+
"data-node-name": _fnSignal(_hf3, [props], _hf3_str),
|
|
81
|
+
style: _fnSignal(_hf1, [isActive, props], _hf1_str)
|
|
82
|
+
}, { "q-e:click": handleNodeClick }, /*#__PURE__*/ _jsxSorted("div", null, { class: "inline-flex items-center px-2 py-1" }, [hasChildren ? /*#__PURE__*/ _jsxSorted(IconChevronUpMini, { class: `text-muted-foreground mr-2 h-4 w-4 shrink-0 transition-transform duration-200 ${childrenVisible ? "rotate-180" : "rotate-90"}` }, null, null, 3, "aD_0") : /*#__PURE__*/ _jsxSorted("div", null, { class: "mr-2 w-4 shrink-0" }, null, 3, "aD_1"), /*#__PURE__*/ _jsxSorted("div", null, { class: "cursor-pointer font-mono text-sm whitespace-nowrap" }, props.renderNode ? /*#__PURE__*/ _jsxSorted(Fragment, null, null, props.renderNode(props.node), 1, "aD_2") : /*#__PURE__*/ _jsxSorted(Fragment, null, null, [
|
|
71
83
|
/*#__PURE__*/ _jsxSorted("span", null, { class: "text-foreground/50" }, "<", 3, null),
|
|
72
|
-
/*#__PURE__*/ _jsxSorted("span", null, { class: "text-primary/80" }, _fnSignal(_hf4, [props]), 1, null),
|
|
84
|
+
/*#__PURE__*/ _jsxSorted("span", null, { class: "text-primary/80" }, _fnSignal(_hf4, [props], _hf4_str), 1, null),
|
|
73
85
|
/*#__PURE__*/ _jsxSorted("span", null, { class: "text-muted-foreground" }, [` ${formatDisplayProps(props.node.props ?? {})}`, ">"], 1, null)
|
|
74
|
-
], 1, "
|
|
86
|
+
], 1, "aD_3"), 1, null)], 1, null), 1, null), hasChildren && (props.animate ? /*#__PURE__*/ _jsxSorted("div", { style: {
|
|
75
87
|
maxHeight: showChildren ? "1000px" : "0px",
|
|
76
88
|
opacity: showChildren ? "1" : "0",
|
|
77
89
|
transition: `max-height ${duration}ms ease-in-out, opacity ${duration}ms ease-in-out`
|
|
78
|
-
} }, { class: "overflow-hidden" }, renderChildren, 1, "
|
|
90
|
+
} }, { class: "overflow-hidden" }, renderChildren, 1, "aD_4") : showChildren && /*#__PURE__*/ _jsxSorted(Fragment, null, null, renderChildren, 1, "aD_5"))], 1, "aD_6");
|
|
79
91
|
}, "TreeNodeComponent_component_uTw0NGLeAGw"));
|
|
80
92
|
var Tree = /*#__PURE__*/ componentQrl(/*#__PURE__*/ inlinedQrl((props) => {
|
|
81
93
|
const ref = useSignal();
|
|
82
94
|
const activeNodeId = useSignal("");
|
|
83
95
|
const expanded = useSignal({});
|
|
84
96
|
const setActiveNode = /*#__PURE__*/ inlinedQrl((node) => {
|
|
85
|
-
|
|
97
|
+
let activeNodeId = _capturesObj._[0], props = _capturesObj._[1], ref = _capturesObj._[2];
|
|
86
98
|
if (ref.value) ref.value.scrollLeft = ref.value.scrollWidth;
|
|
87
99
|
activeNodeId.value = node.id;
|
|
88
100
|
props.onNodeClick?.(node);
|
|
@@ -92,14 +104,14 @@ var Tree = /*#__PURE__*/ componentQrl(/*#__PURE__*/ inlinedQrl((props) => {
|
|
|
92
104
|
ref
|
|
93
105
|
]);
|
|
94
106
|
const toggleNode = /*#__PURE__*/ inlinedQrl((id, childrenVisible) => {
|
|
95
|
-
|
|
107
|
+
let expanded = _capturesObj._[0];
|
|
96
108
|
expanded.value = {
|
|
97
109
|
...expanded.value,
|
|
98
110
|
[id]: !childrenVisible
|
|
99
111
|
};
|
|
100
112
|
}, "Tree_component_toggleNode_QxlcpIF5TKQ", [expanded]);
|
|
101
113
|
useVisibleTaskQrl(/*#__PURE__*/ inlinedQrl(({ track }) => {
|
|
102
|
-
|
|
114
|
+
let activeNodeId = _capturesObj._[0], expanded = _capturesObj._[1], props = _capturesObj._[2], ref = _capturesObj._[3];
|
|
103
115
|
const name = track(() => props.revealNode?.value);
|
|
104
116
|
const nodes = track(() => props.data.value);
|
|
105
117
|
if (!name) return;
|
|
@@ -127,18 +139,23 @@ var Tree = /*#__PURE__*/ componentQrl(/*#__PURE__*/ inlinedQrl((props) => {
|
|
|
127
139
|
props,
|
|
128
140
|
ref
|
|
129
141
|
]));
|
|
130
|
-
return /*#__PURE__*/ _jsxSorted("div",
|
|
131
|
-
|
|
132
|
-
|
|
142
|
+
return /*#__PURE__*/ _jsxSorted("div", null, {
|
|
143
|
+
class: "h-full w-full overflow-x-auto overflow-y-auto",
|
|
144
|
+
ref
|
|
145
|
+
}, props.data.value.map((rootNode) => /*#__PURE__*/ _jsxSorted(TreeNodeComponent, {
|
|
146
|
+
animate: _fnSignal(_hf8, [props], _hf8_str),
|
|
147
|
+
expandLevel: _fnSignal(_hf7, [props], _hf7_str),
|
|
148
|
+
gap: _fnSignal(_hf6, [props], _hf6_str),
|
|
149
|
+
isHover: _fnSignal(_hf5, [props], _hf5_str),
|
|
150
|
+
node: rootNode,
|
|
151
|
+
onNodeClick: setActiveNode,
|
|
152
|
+
onToggle: toggleNode
|
|
153
|
+
}, {
|
|
133
154
|
level: 0,
|
|
134
|
-
expandLevel: _fnSignal(_hf7, [props]),
|
|
135
155
|
activeNodeId: _wrapProp(activeNodeId),
|
|
136
156
|
expanded: _wrapProp(expanded),
|
|
137
|
-
onToggle: toggleNode,
|
|
138
|
-
onNodeClick: setActiveNode,
|
|
139
157
|
renderNode: _wrapProp(props, "renderNode"),
|
|
140
|
-
animate: _fnSignal(_hf8, [props]),
|
|
141
158
|
animationDuration: _wrapProp(props, "animationDuration")
|
|
142
|
-
}, null, 3, rootNode.id)), 1, "
|
|
159
|
+
}, null, 3, rootNode.id)), 1, "aD_7");
|
|
143
160
|
}, "Tree_component_mMuREZC0V3M"));
|
|
144
161
|
export { Tree };
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { IconMagnifyingGlass } from "../components/Icons/Icons.qwik.mjs";
|
|
2
2
|
import { getTheme, setTheme } from "../components/ThemeToggle/QwikThemeToggle.qwik.mjs";
|
|
3
3
|
import { addRecentId, buildPaletteSources, filterResults, getActionResults, groupResults, loadRecentIds, resolveRecents, saveRecentIds } from "./command-palette.qwik.mjs";
|
|
4
|
-
import {
|
|
4
|
+
import { _capturesObj, _fnSignal, _jsxSorted, _qrlSync, _wrapProp, componentQrl, inlinedQrl, useComputedQrl, useSignal, useVisibleTaskQrl } from "@qwik.dev/core";
|
|
5
5
|
var _hf0 = (p0) => p0.value >= 0 ? `palette-option-${p0.value}` : void 0;
|
|
6
|
+
var _hf0_str = "p0.value>=0?`palette-option-${p0.value}`:undefined";
|
|
7
|
+
var _hf1 = (p0, p1, p2) => p2.hint ?? p0[p1.category];
|
|
8
|
+
var _hf1_str = "p2.hint??p0[p1.category]";
|
|
6
9
|
var CATEGORY_HINT = {
|
|
7
10
|
Tabs: "Tab",
|
|
8
11
|
Components: "Component",
|
|
@@ -18,22 +21,23 @@ function cycleTheme() {
|
|
|
18
21
|
/**
|
|
19
22
|
* Cmd/Ctrl+K overlay to jump across tabs, components, routes, and packages, plus common actions.
|
|
20
23
|
* The empty state lists recent selections and actions; results are keyboard-navigable.
|
|
21
|
-
*/
|
|
24
|
+
*/
|
|
25
|
+
var CommandPalette = /*#__PURE__*/ componentQrl(/*#__PURE__*/ inlinedQrl((_rawProps) => {
|
|
22
26
|
const query = useSignal("");
|
|
23
27
|
const activeIndex = useSignal(-1);
|
|
24
28
|
const recentIds = useSignal([]);
|
|
25
29
|
const inputRef = useSignal();
|
|
26
30
|
useVisibleTaskQrl(/*#__PURE__*/ inlinedQrl(() => {
|
|
27
|
-
|
|
31
|
+
let inputRef = _capturesObj._[0], recentIds = _capturesObj._[1];
|
|
28
32
|
recentIds.value = loadRecentIds();
|
|
29
33
|
inputRef.value?.focus();
|
|
30
34
|
}, "CommandPalette_component_useVisibleTask_35PZ2o0kMqE", [inputRef, recentIds]));
|
|
31
35
|
const searchable = useComputedQrl(/*#__PURE__*/ inlinedQrl(() => {
|
|
32
|
-
|
|
36
|
+
let _rawProps = _capturesObj._[0];
|
|
33
37
|
return [...buildPaletteSources(_rawProps.state), ...getActionResults(_rawProps.state)];
|
|
34
38
|
}, "CommandPalette_component_searchable_useComputed_9iV5XwqJXZQ", [_rawProps]));
|
|
35
39
|
const groups = useComputedQrl(/*#__PURE__*/ inlinedQrl(() => {
|
|
36
|
-
|
|
40
|
+
let _rawProps = _capturesObj._[0], query = _capturesObj._[1], recentIds = _capturesObj._[2], searchable = _capturesObj._[3];
|
|
37
41
|
if (!query.value.trim()) {
|
|
38
42
|
const recents = resolveRecents(recentIds.value, _rawProps.state);
|
|
39
43
|
const emptyGroups = [];
|
|
@@ -55,15 +59,15 @@ function cycleTheme() {
|
|
|
55
59
|
searchable
|
|
56
60
|
]));
|
|
57
61
|
const flatResults = useComputedQrl(/*#__PURE__*/ inlinedQrl(() => {
|
|
58
|
-
return
|
|
62
|
+
return _capturesObj._[0].value.flatMap((group) => group.results);
|
|
59
63
|
}, "CommandPalette_component_flatResults_useComputed_cCauVUcEhYk", [groups]));
|
|
60
64
|
useVisibleTaskQrl(/*#__PURE__*/ inlinedQrl(({ track }) => {
|
|
61
|
-
|
|
65
|
+
let activeIndex = _capturesObj._[0];
|
|
62
66
|
const index = track(() => activeIndex.value);
|
|
63
67
|
document.getElementById(`palette-option-${index}`)?.scrollIntoView({ block: "nearest" });
|
|
64
68
|
}, "CommandPalette_component_useVisibleTask_1_fkiiKqJKwhQ", [activeIndex]));
|
|
65
69
|
const activate = /*#__PURE__*/ inlinedQrl((result) => {
|
|
66
|
-
|
|
70
|
+
let _rawProps = _capturesObj._[0], recentIds = _capturesObj._[1], runAction = _capturesObj._[2];
|
|
67
71
|
const target = result.target;
|
|
68
72
|
if (target.kind === "action" && target.action === "clearRecents") {
|
|
69
73
|
runAction("clearRecents");
|
|
@@ -94,7 +98,7 @@ function cycleTheme() {
|
|
|
94
98
|
_rawProps,
|
|
95
99
|
recentIds,
|
|
96
100
|
/* @__PURE__ */ inlinedQrl((action) => {
|
|
97
|
-
|
|
101
|
+
let _rawProps = _capturesObj._[0], recentIds = _capturesObj._[1];
|
|
98
102
|
switch (action) {
|
|
99
103
|
case "toggleTheme":
|
|
100
104
|
cycleTheme();
|
|
@@ -113,18 +117,29 @@ function cycleTheme() {
|
|
|
113
117
|
}, "CommandPalette_component_runAction_x9wZJ0Hrfic", [_rawProps, recentIds])
|
|
114
118
|
]);
|
|
115
119
|
let optionIndex = 0;
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
},
|
|
120
|
+
const CommandPalette_component_div_div_ul_li_ul_li_q_e_mouseenter_0qIEkwUcwUE = /*#__PURE__*/ inlinedQrl((_, _1, _2, index) => {
|
|
121
|
+
let activeIndex = _capturesObj._[0];
|
|
122
|
+
return activeIndex.value = index;
|
|
123
|
+
}, "CommandPalette_component_div_div_ul_li_ul_li_q_e_mouseenter_0qIEkwUcwUE", [activeIndex]).m();
|
|
124
|
+
const CommandPalette_component_div_div_ul_li_ul_li_q_e_click_jIvkGS4GrOM = /*#__PURE__*/ inlinedQrl((_, _1, result) => {
|
|
125
|
+
let activate = _capturesObj._[0];
|
|
126
|
+
return activate(result);
|
|
127
|
+
}, "CommandPalette_component_div_div_ul_li_ul_li_q_e_click_jIvkGS4GrOM", [activate]).m();
|
|
128
|
+
return /*#__PURE__*/ _jsxSorted("div", null, { class: "absolute inset-0 z-30 flex items-start justify-center p-4" }, [/*#__PURE__*/ _jsxSorted("div", null, {
|
|
129
|
+
class: "absolute inset-0 bg-black/40 backdrop-blur-sm transition-opacity",
|
|
130
|
+
"q-e:click": /*#__PURE__*/ inlinedQrl(() => {
|
|
131
|
+
let _rawProps = _capturesObj._[0];
|
|
132
|
+
return _rawProps.state.isPaletteOpen = false;
|
|
133
|
+
}, "CommandPalette_component_div_div_q_e_click_AC38AwghEZY", [_rawProps])
|
|
134
|
+
}, null, 3, null), /*#__PURE__*/ _jsxSorted("div", { "q-e:keydown": [_qrlSync((event) => {
|
|
120
135
|
if ([
|
|
121
136
|
"ArrowDown",
|
|
122
137
|
"ArrowUp",
|
|
123
138
|
"Enter",
|
|
124
139
|
"Tab"
|
|
125
140
|
].includes(event.key)) event.preventDefault();
|
|
126
|
-
}, "event=>{if([\"ArrowDown\",\"ArrowUp\",\"Enter\",\"Tab\"].includes(event.key)){event.preventDefault();}}"), /*#__PURE__*/ inlinedQrl((event) => {
|
|
127
|
-
|
|
141
|
+
}, "event=>{if([ \"ArrowDown\",\"ArrowUp\",\"Enter\",\"Tab\" ].includes(event.key)){event.preventDefault();}}"), /*#__PURE__*/ inlinedQrl((event) => {
|
|
142
|
+
let _rawProps = _capturesObj._[0], activate = _capturesObj._[1], activeIndex = _capturesObj._[2], flatResults = _capturesObj._[3], inputRef = _capturesObj._[4];
|
|
128
143
|
const count = flatResults.value.length;
|
|
129
144
|
if (event.key === "ArrowDown") activeIndex.value = count === 0 ? -1 : activeIndex.value < 0 ? 0 : (activeIndex.value + 1) % count;
|
|
130
145
|
else if (event.key === "ArrowUp") activeIndex.value = count === 0 ? -1 : activeIndex.value < 0 ? count - 1 : (activeIndex.value - 1 + count) % count;
|
|
@@ -145,50 +160,49 @@ function cycleTheme() {
|
|
|
145
160
|
"aria-label": "Command palette",
|
|
146
161
|
class: "glass-panel relative z-10 flex max-h-full w-[32rem] max-w-full flex-col overflow-hidden rounded-2xl"
|
|
147
162
|
}, [
|
|
148
|
-
/*#__PURE__*/ _jsxSorted("div", null, { class: "border-glass-border flex items-center gap-3 border-b px-4 py-3" }, [/*#__PURE__*/ _jsxSorted("span", null, { class: "text-muted-foreground" }, /*#__PURE__*/ _jsxSorted(IconMagnifyingGlass, null, { class: "h-5 w-5" }, null, 3, "
|
|
149
|
-
|
|
150
|
-
query.value = el.value;
|
|
151
|
-
activeIndex.value = el.value.trim() ? 0 : -1;
|
|
152
|
-
}, "CommandPalette_component_div_div_div_input_q_e_input_j9vHtbrHP4c").m(),
|
|
153
|
-
"q:ps": [activeIndex, query],
|
|
154
|
-
ref: inputRef
|
|
155
|
-
}, {
|
|
163
|
+
/*#__PURE__*/ _jsxSorted("div", null, { class: "border-glass-border flex items-center gap-3 border-b px-4 py-3" }, [/*#__PURE__*/ _jsxSorted("span", null, { class: "text-muted-foreground" }, /*#__PURE__*/ _jsxSorted(IconMagnifyingGlass, null, { class: "h-5 w-5" }, null, 3, "BH_0"), 1, null), /*#__PURE__*/ _jsxSorted("input", null, {
|
|
164
|
+
ref: inputRef,
|
|
156
165
|
type: "text",
|
|
157
166
|
autoFocus: true,
|
|
158
167
|
role: "combobox",
|
|
159
168
|
"aria-expanded": "true",
|
|
160
169
|
"aria-controls": "palette-listbox",
|
|
161
|
-
"aria-activedescendant": _fnSignal(_hf0, [activeIndex]),
|
|
170
|
+
"aria-activedescendant": _fnSignal(_hf0, [activeIndex], _hf0_str),
|
|
162
171
|
placeholder: "Search tabs, components, routes, packages...",
|
|
163
172
|
class: "text-foreground placeholder:text-muted-foreground/70 w-full bg-transparent text-sm outline-none",
|
|
164
|
-
value: _wrapProp(query)
|
|
165
|
-
|
|
173
|
+
value: _wrapProp(query),
|
|
174
|
+
"q-e:input": /*#__PURE__*/ inlinedQrl((_, el) => {
|
|
175
|
+
let activeIndex = _capturesObj._[0], query = _capturesObj._[1];
|
|
176
|
+
query.value = el.value;
|
|
177
|
+
activeIndex.value = el.value.trim() ? 0 : -1;
|
|
178
|
+
}, "CommandPalette_component_div_div_div_input_q_e_input_j9vHtbrHP4c", [activeIndex, query])
|
|
179
|
+
}, null, 3, null)], 1, null),
|
|
166
180
|
/*#__PURE__*/ _jsxSorted("ul", null, {
|
|
167
181
|
id: "palette-listbox",
|
|
168
182
|
role: "listbox",
|
|
169
183
|
"aria-label": "Results",
|
|
170
184
|
class: "custom-scrollbar max-h-80 overflow-y-auto p-2"
|
|
171
|
-
}, flatResults.value.length === 0 ? /*#__PURE__*/ _jsxSorted("li", null, { class: "text-muted-foreground px-2 py-6 text-center text-sm" }, "No results", 3, "
|
|
185
|
+
}, flatResults.value.length === 0 ? /*#__PURE__*/ _jsxSorted("li", null, { class: "text-muted-foreground px-2 py-6 text-center text-sm" }, "No results", 3, "BH_1") : groups.value.map((group) => /*#__PURE__*/ _jsxSorted("li", null, { role: "presentation" }, [/*#__PURE__*/ _jsxSorted("div", null, { class: "text-muted-foreground px-2 pb-1 pt-2 text-xs font-medium uppercase tracking-wide" }, _wrapProp(group, "category"), 1, null), /*#__PURE__*/ _jsxSorted("ul", null, { role: "presentation" }, group.results.map((result) => {
|
|
172
186
|
const index = optionIndex++;
|
|
173
187
|
const isActive = index === activeIndex.value;
|
|
174
|
-
const qrl_0 = /*#__PURE__*/ inlinedQrl((_, _1, _2, index) => {
|
|
175
|
-
const activeIndex = _captures[0];
|
|
176
|
-
return activeIndex.value = index;
|
|
177
|
-
}, "CommandPalette_component_div_div_ul_li_ul_li_q_e_mouseenter_0qIEkwUcwUE", [activeIndex]).m();
|
|
178
188
|
return /*#__PURE__*/ _jsxSorted("li", {
|
|
179
189
|
"aria-selected": isActive ? "true" : "false",
|
|
180
190
|
class: ["flex cursor-pointer items-center justify-between gap-3 rounded-lg px-2 py-1.5", isActive ? "bg-primary/15 text-primary" : "hover:bg-card-item-hover-bg"],
|
|
181
191
|
id: `palette-option-${index}`,
|
|
182
|
-
"q-e:click":
|
|
183
|
-
"q-e:mouseenter":
|
|
192
|
+
"q-e:click": CommandPalette_component_div_div_ul_li_ul_li_q_e_click_jIvkGS4GrOM,
|
|
193
|
+
"q-e:mouseenter": CommandPalette_component_div_div_ul_li_ul_li_q_e_mouseenter_0qIEkwUcwUE,
|
|
184
194
|
"q:ps": [result, index]
|
|
185
|
-
}, { role: "option" }, [/*#__PURE__*/ _jsxSorted("span", null, { class: "text-foreground truncate text-sm" }, _wrapProp(result, "label"), 1, null), /*#__PURE__*/ _jsxSorted("span", null, { class: "text-muted-foreground shrink-0 truncate text-xs" },
|
|
195
|
+
}, { role: "option" }, [/*#__PURE__*/ _jsxSorted("span", null, { class: "text-foreground truncate text-sm" }, _wrapProp(result, "label"), 1, null), /*#__PURE__*/ _jsxSorted("span", null, { class: "text-muted-foreground shrink-0 truncate text-xs" }, _fnSignal(_hf1, [
|
|
196
|
+
CATEGORY_HINT,
|
|
197
|
+
group,
|
|
198
|
+
result
|
|
199
|
+
], _hf1_str), 1, null)], 4, result.id);
|
|
186
200
|
}), 1, null)], 1, group.category)), 1, null),
|
|
187
201
|
/*#__PURE__*/ _jsxSorted("div", null, { class: "border-glass-border text-muted-foreground flex gap-4 border-t px-4 py-2 text-xs" }, [
|
|
188
202
|
/*#__PURE__*/ _jsxSorted("span", null, null, "↑↓ navigate", 3, null),
|
|
189
203
|
/*#__PURE__*/ _jsxSorted("span", null, null, "↵ select", 3, null),
|
|
190
204
|
/*#__PURE__*/ _jsxSorted("span", null, null, "esc close", 3, null)
|
|
191
205
|
], 3, null)
|
|
192
|
-
], 0, null)], 1, "
|
|
206
|
+
], 0, null)], 1, "BH_2");
|
|
193
207
|
}, "CommandPalette_component_0OIptX9h7QY"));
|
|
194
208
|
export { CommandPalette };
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { IconGripVertical, IconXMark } from "../components/Icons/Icons.qwik.mjs";
|
|
2
2
|
import { IconButton } from "../components/IconButton/IconButton.qwik.mjs";
|
|
3
3
|
import { getAvailableTabs, reorderVisibleTabs, resolveTabs, saveVisibleTabIds, setTabVisible } from "./sidebar-tabs.qwik.mjs";
|
|
4
|
-
import { Slot,
|
|
4
|
+
import { Slot, _capturesObj, _fnSignal, _jsxSorted, _qrlSync, _wrapProp, componentQrl, inlinedQrl, useSignal } from "@qwik.dev/core";
|
|
5
5
|
var _hf0 = (p0) => ["transition-opacity", p0.dragging ? "opacity-40" : ""];
|
|
6
|
+
var _hf0_str = "[\"transition-opacity\",p0.dragging?\"opacity-40\":\"\"]";
|
|
6
7
|
var _hf1 = (p0, p1) => p0.value === p1;
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
var _hf1_str = "p0.value===p1";
|
|
9
|
+
/** One selectable tab. The icon is passed as children so no non-serializable config crosses props. */
|
|
10
|
+
var TabRow = /*#__PURE__*/ componentQrl(/*#__PURE__*/ inlinedQrl((props) => /*#__PURE__*/ _jsxSorted("li", {
|
|
11
|
+
class: _fnSignal(_hf0, [props], _hf0_str),
|
|
9
12
|
draggable: _wrapProp(props, "draggable"),
|
|
10
13
|
"q-e:dragend": props.onDragEnd$,
|
|
11
14
|
"q-e:dragenter": props.onDragEnter$,
|
|
@@ -14,44 +17,48 @@ var _hf1 = (p0, p1) => p0.value === p1;
|
|
|
14
17
|
props.draggable && /*#__PURE__*/ _jsxSorted("span", null, {
|
|
15
18
|
class: "text-muted-foreground cursor-grab",
|
|
16
19
|
title: "Drag to reorder"
|
|
17
|
-
}, /*#__PURE__*/ _jsxSorted(IconGripVertical, null, { class: "h-4 w-4" }, null, 3, "
|
|
18
|
-
/*#__PURE__*/ _jsxSorted("input", {
|
|
19
|
-
checked: _wrapProp(props, "checked"),
|
|
20
|
-
"q-e:change": /*#__PURE__*/ inlinedQrl((_, el, props) => props.onToggle$(props.id, el.checked), "TabRow_component_li_label_input_q_e_change_34xiTR3EoWM").m(),
|
|
21
|
-
"q:p": props
|
|
22
|
-
}, {
|
|
20
|
+
}, /*#__PURE__*/ _jsxSorted(IconGripVertical, null, { class: "h-4 w-4" }, null, 3, "Ig_0"), 1, "Ig_1"),
|
|
21
|
+
/*#__PURE__*/ _jsxSorted("input", { checked: _wrapProp(props, "checked") }, {
|
|
23
22
|
type: "checkbox",
|
|
24
23
|
class: "h-3.5 w-3.5 rounded",
|
|
25
|
-
style: { accentColor: "var(--color-primary-active)" }
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
style: { accentColor: "var(--color-primary-active)" },
|
|
25
|
+
"q-e:change": /*#__PURE__*/ inlinedQrl((_, el) => {
|
|
26
|
+
let props = _capturesObj._[0];
|
|
27
|
+
return props.onToggle$(props.id, el.checked);
|
|
28
|
+
}, "TabRow_component_li_label_input_q_e_change_34xiTR3EoWM", [props])
|
|
29
|
+
}, null, 3, null),
|
|
30
|
+
/*#__PURE__*/ _jsxSorted("span", null, { class: "text-muted-foreground" }, /*#__PURE__*/ _jsxSorted(Slot, null, null, null, 3, "Ig_2"), 1, null),
|
|
28
31
|
/*#__PURE__*/ _jsxSorted("span", null, { class: "text-foreground text-sm" }, _wrapProp(props, "title"), 1, null)
|
|
29
|
-
], 1, null), 0, "
|
|
32
|
+
], 1, null), 0, "Ig_3"), "TabRow_component_OkPaM0aSuSk"));
|
|
30
33
|
/**
|
|
31
34
|
* Overlay for choosing which tools appear in the sidebar and in what order. Edits stay pending
|
|
32
35
|
* until "Apply", so closing or cancelling discards them. Relies on remounting when reopened to
|
|
33
36
|
* reset the pending list.
|
|
34
|
-
*/
|
|
37
|
+
*/
|
|
38
|
+
var CustomizeTabsPanel = /*#__PURE__*/ componentQrl(/*#__PURE__*/ inlinedQrl((_rawProps) => {
|
|
35
39
|
const pendingVisibleIds = useSignal([..._rawProps.state.visibleTabIds]);
|
|
36
40
|
const draggingId = useSignal(null);
|
|
37
41
|
const visibleTabs = resolveTabs(pendingVisibleIds.value);
|
|
38
42
|
const availableTabs = getAvailableTabs(pendingVisibleIds.value);
|
|
39
43
|
const toggle$ = /*#__PURE__*/ inlinedQrl((id, checked) => {
|
|
40
|
-
|
|
44
|
+
let pendingVisibleIds = _capturesObj._[0];
|
|
41
45
|
pendingVisibleIds.value = setTabVisible(pendingVisibleIds.value, id, checked);
|
|
42
46
|
}, "CustomizeTabsPanel_component_toggle_7ito2DKngBw", [pendingVisibleIds]);
|
|
43
47
|
const endDrag$ = /*#__PURE__*/ inlinedQrl(() => {
|
|
44
|
-
|
|
48
|
+
let draggingId = _capturesObj._[0];
|
|
45
49
|
return draggingId.value = null;
|
|
46
50
|
}, "CustomizeTabsPanel_component_endDrag_GuR2fyNtG9E", [draggingId]);
|
|
47
|
-
return /*#__PURE__*/ _jsxSorted("div", null, { class: "absolute inset-0 z-30 flex items-start justify-start p-4" }, [/*#__PURE__*/ _jsxSorted("div", {
|
|
48
|
-
|
|
49
|
-
"q:
|
|
50
|
-
|
|
51
|
+
return /*#__PURE__*/ _jsxSorted("div", null, { class: "absolute inset-0 z-30 flex items-start justify-start p-4" }, [/*#__PURE__*/ _jsxSorted("div", null, {
|
|
52
|
+
class: "absolute inset-0 bg-black/40 backdrop-blur-sm transition-opacity",
|
|
53
|
+
"q-e:click": /*#__PURE__*/ inlinedQrl(() => {
|
|
54
|
+
let _rawProps = _capturesObj._[0];
|
|
55
|
+
return _rawProps.state.isCustomizeOpen = false;
|
|
56
|
+
}, "CustomizeTabsPanel_component_div_div_q_e_click_l3t3UrZvZ6Y", [_rawProps])
|
|
57
|
+
}, null, 3, null), /*#__PURE__*/ _jsxSorted("div", null, { class: "glass-panel relative z-10 flex max-h-full w-80 flex-col overflow-hidden rounded-2xl" }, [
|
|
51
58
|
/*#__PURE__*/ _jsxSorted("div", null, { class: "flex items-start justify-between p-4 pb-3" }, [/*#__PURE__*/ _jsxSorted("div", null, null, [/*#__PURE__*/ _jsxSorted("h2", null, { class: "text-foreground text-base font-semibold" }, "Customize Tabs", 3, null), /*#__PURE__*/ _jsxSorted("p", null, { class: "text-muted-foreground text-xs" }, "Choose which tools appear in the sidebar.", 3, null)], 3, null), /*#__PURE__*/ _jsxSorted(IconButton, { onClick$: /*#__PURE__*/ inlinedQrl(() => {
|
|
52
|
-
|
|
59
|
+
let _rawProps = _capturesObj._[0];
|
|
53
60
|
return _rawProps.state.isCustomizeOpen = false;
|
|
54
|
-
}, "CustomizeTabsPanel_component_div_div_div_IconButton_onClick_BD1Lcw5n01g", [_rawProps]) }, { title: "Close" }, /*#__PURE__*/ _jsxSorted(IconXMark, null, { class: "h-5 w-5" }, null, 3, "
|
|
61
|
+
}, "CustomizeTabsPanel_component_div_div_div_IconButton_onClick_BD1Lcw5n01g", [_rawProps]) }, { title: "Close" }, /*#__PURE__*/ _jsxSorted(IconXMark, null, { class: "h-5 w-5" }, null, 3, "Ig_4"), 0, "Ig_5")], 1, null),
|
|
55
62
|
/*#__PURE__*/ _jsxSorted("div", null, { class: "custom-scrollbar flex flex-1 flex-col gap-4 overflow-y-auto px-4 pb-3" }, [/*#__PURE__*/ _jsxSorted("section", {
|
|
56
63
|
"q-e:dragover": _qrlSync((event) => event.preventDefault(), "event=>event.preventDefault()"),
|
|
57
64
|
"q-e:drop": _qrlSync((event) => event.preventDefault(), "event=>event.preventDefault()")
|
|
@@ -64,10 +71,10 @@ var _hf1 = (p0, p1) => p0.value === p1;
|
|
|
64
71
|
/*#__PURE__*/ _jsxSorted("ul", null, { class: "mt-2 flex flex-col gap-1" }, visibleTabs.map((tab) => {
|
|
65
72
|
const id = tab.id;
|
|
66
73
|
return /*#__PURE__*/ _jsxSorted(TabRow, {
|
|
67
|
-
dragging: _fnSignal(_hf1, [draggingId, id]),
|
|
74
|
+
dragging: _fnSignal(_hf1, [draggingId, id], _hf1_str),
|
|
68
75
|
id,
|
|
69
76
|
onDragEnter$: /*#__PURE__*/ inlinedQrl(() => {
|
|
70
|
-
|
|
77
|
+
let draggingId = _capturesObj._[0], id = _capturesObj._[1], pendingVisibleIds = _capturesObj._[2];
|
|
71
78
|
const dragged = draggingId.value;
|
|
72
79
|
if (dragged && dragged !== id) pendingVisibleIds.value = reorderVisibleTabs(pendingVisibleIds.value, dragged, id);
|
|
73
80
|
}, "CustomizeTabsPanel_component_div_div_div_section_ul_TabRow_onDragEnter_yYXv7uhV1nk", [
|
|
@@ -76,8 +83,8 @@ var _hf1 = (p0, p1) => p0.value === p1;
|
|
|
76
83
|
pendingVisibleIds
|
|
77
84
|
]),
|
|
78
85
|
onDragStart$: /*#__PURE__*/ inlinedQrl(() => {
|
|
79
|
-
|
|
80
|
-
return draggingId.value =
|
|
86
|
+
let draggingId = _capturesObj._[0];
|
|
87
|
+
return draggingId.value = _capturesObj._[1];
|
|
81
88
|
}, "CustomizeTabsPanel_component_div_div_div_section_ul_TabRow_onDragStart_j7We62qpm2E", [draggingId, id]),
|
|
82
89
|
title: _wrapProp(tab, "title")
|
|
83
90
|
}, {
|
|
@@ -98,17 +105,21 @@ var _hf1 = (p0, p1) => p0.value === p1;
|
|
|
98
105
|
onToggle$: toggle$
|
|
99
106
|
}, tab.renderIcon(), 1, tab.id)), 1, null)
|
|
100
107
|
], 1, null)], 1, null),
|
|
101
|
-
/*#__PURE__*/ _jsxSorted("div", null, { class: "border-glass-border flex justify-end gap-2 border-t p-4" }, [/*#__PURE__*/ _jsxSorted("button", {
|
|
102
|
-
"
|
|
103
|
-
"q:
|
|
104
|
-
|
|
105
|
-
|
|
108
|
+
/*#__PURE__*/ _jsxSorted("div", null, { class: "border-glass-border flex justify-end gap-2 border-t p-4" }, [/*#__PURE__*/ _jsxSorted("button", null, {
|
|
109
|
+
class: "text-muted-foreground hover:text-foreground rounded-lg px-4 py-1.5 text-sm font-medium transition-colors",
|
|
110
|
+
"q-e:click": /*#__PURE__*/ inlinedQrl(() => {
|
|
111
|
+
let _rawProps = _capturesObj._[0];
|
|
112
|
+
return _rawProps.state.isCustomizeOpen = false;
|
|
113
|
+
}, "CustomizeTabsPanel_component_div_div_div_button_q_e_click_bKi0Y3F44SM", [_rawProps])
|
|
114
|
+
}, "Cancel", 3, null), /*#__PURE__*/ _jsxSorted("button", null, {
|
|
115
|
+
class: "bg-primary rounded-lg px-4 py-1.5 text-sm font-medium text-white transition-opacity hover:opacity-90",
|
|
116
|
+
"q-e:click": /*#__PURE__*/ inlinedQrl(() => {
|
|
117
|
+
let _rawProps = _capturesObj._[0], pendingVisibleIds = _capturesObj._[1];
|
|
106
118
|
_rawProps.state.visibleTabIds = [...pendingVisibleIds.value];
|
|
107
119
|
saveVisibleTabIds(pendingVisibleIds.value);
|
|
108
120
|
_rawProps.state.isCustomizeOpen = false;
|
|
109
|
-
}, "CustomizeTabsPanel_component_div_div_div_button_q_e_click_1_QB9JB6Vwuyc")
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
], 1, null)], 1, "Mh_6");
|
|
121
|
+
}, "CustomizeTabsPanel_component_div_div_div_button_q_e_click_1_QB9JB6Vwuyc", [_rawProps, pendingVisibleIds])
|
|
122
|
+
}, "Apply", 3, null)], 3, null)
|
|
123
|
+
], 1, null)], 1, "Ig_6");
|
|
113
124
|
}, "CustomizeTabsPanel_component_sHmgDosprm8"));
|
|
114
125
|
export { CustomizeTabsPanel };
|
|
@@ -12,8 +12,7 @@ import { Performance } from "../features/Performance/Performance.qwik.mjs";
|
|
|
12
12
|
import { Preloads } from "../features/Preloads/Preloads.qwik.mjs";
|
|
13
13
|
import { RenderTree } from "../features/RenderTree/RenderTree.qwik.mjs";
|
|
14
14
|
import { Routes } from "../features/Routes/Routes.qwik.mjs";
|
|
15
|
-
import {
|
|
16
|
-
var _hf0 = (p0) => p0.state.isExtension ? "Component Tree" : "Render Tree";
|
|
15
|
+
import { _jsxSorted, _wrapProp, componentQrl, inlinedQrl } from "@qwik.dev/core";
|
|
17
16
|
function formatAssetSummary(assets) {
|
|
18
17
|
const totalSizeInKb = assets.reduce((totalSize, asset) => totalSize + asset.size, 0) / 1024;
|
|
19
18
|
return {
|
|
@@ -23,7 +22,7 @@ function formatAssetSummary(assets) {
|
|
|
23
22
|
}
|
|
24
23
|
var ViteOnlyPlaceholder = /*#__PURE__*/ componentQrl(/*#__PURE__*/ inlinedQrl((_rawProps) => {
|
|
25
24
|
return /*#__PURE__*/ _jsxSorted("div", null, { class: "flex h-full flex-col items-center justify-center gap-4 px-8 text-center" }, [
|
|
26
|
-
/*#__PURE__*/ _jsxSorted("div", null, { class: "text-muted-foreground/40 text-4xl" }, /*#__PURE__*/ _jsxSorted(IconMonitor, null, { class: "h-12 w-12" }, null, 3, "
|
|
25
|
+
/*#__PURE__*/ _jsxSorted("div", null, { class: "text-muted-foreground/40 text-4xl" }, /*#__PURE__*/ _jsxSorted(IconMonitor, null, { class: "h-12 w-12" }, null, 3, "L0_0"), 1, null),
|
|
27
26
|
/*#__PURE__*/ _jsxSorted("div", null, { class: "text-muted-foreground text-sm" }, [/*#__PURE__*/ _jsxSorted("span", null, { class: "font-semibold" }, _wrapProp(_rawProps, "feature"), 1, null), " is only available in the in-app overlay."], 1, null),
|
|
28
27
|
/*#__PURE__*/ _jsxSorted("div", null, { class: "text-muted-foreground/50 max-w-xs text-xs leading-relaxed" }, [
|
|
29
28
|
"This feature requires direct access to the Vite dev server. Add",
|
|
@@ -32,85 +31,71 @@ var ViteOnlyPlaceholder = /*#__PURE__*/ componentQrl(/*#__PURE__*/ inlinedQrl((_
|
|
|
32
31
|
" ",
|
|
33
32
|
"to your Vite config to use it in the overlay during development."
|
|
34
33
|
], 3, null)
|
|
35
|
-
], 1, "
|
|
34
|
+
], 1, "L0_1");
|
|
36
35
|
}, "ViteOnlyPlaceholder_component_AIuuVPTVfFw"));
|
|
37
|
-
var DevtoolsContent = /*#__PURE__*/ componentQrl(/*#__PURE__*/ inlinedQrl((
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
|
|
36
|
+
var DevtoolsContent = /*#__PURE__*/ componentQrl(/*#__PURE__*/ inlinedQrl(({ state }) => {
|
|
37
|
+
const isExtensionMode = state.isExtension;
|
|
38
|
+
const assetSummary = formatAssetSummary(state.assets);
|
|
39
|
+
switch (state.activeTab) {
|
|
40
|
+
case "overview": return /*#__PURE__*/ _jsxSorted(TabContent, null, null, [/*#__PURE__*/ _jsxSorted("div", null, {
|
|
41
|
+
class: "flex items-center gap-3",
|
|
42
|
+
"q:slot": "title"
|
|
43
|
+
}, [/*#__PURE__*/ _jsxSorted(QwikLogo, null, {
|
|
41
44
|
title: "Qwik Logo",
|
|
42
45
|
class: "h-8 w-8"
|
|
43
|
-
}, null, 3, "
|
|
44
|
-
state: _wrapProp(_rawProps, "state"),
|
|
45
|
-
"q:slot": "content"
|
|
46
|
-
}, null, 3, "lf_3")], 1, "lf_4");
|
|
46
|
+
}, null, 3, "L0_2"), /*#__PURE__*/ _jsxSorted("h1", null, { class: "text-2xl font-semibold" }, "Qwik DevTools", 3, null)], 1, null), /*#__PURE__*/ _jsxSorted(Overview, { state }, { "q:slot": "content" }, null, 3, "L0_3")], 1, "L0_4");
|
|
47
47
|
case "assets": return /*#__PURE__*/ _jsxSorted(TabContent, null, null, [/*#__PURE__*/ _jsxSorted(TabTitle, null, {
|
|
48
48
|
title: "Public Assets",
|
|
49
49
|
"q:slot": "title"
|
|
50
|
-
}, null, 3, "
|
|
50
|
+
}, null, 3, "L0_5"), isExtensionMode ? /*#__PURE__*/ _jsxSorted(ViteOnlyPlaceholder, null, {
|
|
51
51
|
feature: "Assets",
|
|
52
52
|
"q:slot": "content"
|
|
53
|
-
}, null, 3, "
|
|
53
|
+
}, null, 3, "L0_6") : /*#__PURE__*/ _jsxSorted("div", null, {
|
|
54
|
+
class: "flex flex-col gap-4",
|
|
55
|
+
"q:slot": "content"
|
|
56
|
+
}, [/*#__PURE__*/ _jsxSorted("div", null, { class: "text-muted-foreground flex gap-4 text-sm" }, [/*#__PURE__*/ _jsxSorted("span", null, null, [
|
|
54
57
|
"Total Size: ",
|
|
55
58
|
_wrapProp(assetSummary, "totalSizeInKb"),
|
|
56
59
|
" KB"
|
|
57
|
-
], 1, null), /*#__PURE__*/ _jsxSorted("span", null, null, ["Count: ", _wrapProp(assetSummary, "count")], 1, null)], 1, null), /*#__PURE__*/ _jsxSorted(Assets,
|
|
60
|
+
], 1, null), /*#__PURE__*/ _jsxSorted("span", null, null, ["Count: ", _wrapProp(assetSummary, "count")], 1, null)], 1, null), /*#__PURE__*/ _jsxSorted(Assets, { state }, null, null, 3, "L0_7")], 1, "L0_8")], 1, "L0_9");
|
|
58
61
|
case "packages": return /*#__PURE__*/ _jsxSorted(TabContent, null, null, [/*#__PURE__*/ _jsxSorted(TabTitle, null, {
|
|
59
62
|
title: "Project Dependencies",
|
|
60
63
|
"q:slot": "title"
|
|
61
|
-
}, null, 3, "
|
|
64
|
+
}, null, 3, "L0_10"), isExtensionMode ? /*#__PURE__*/ _jsxSorted(ViteOnlyPlaceholder, null, {
|
|
62
65
|
feature: "Packages",
|
|
63
66
|
"q:slot": "content"
|
|
64
|
-
}, null, 3, "
|
|
65
|
-
state: _wrapProp(_rawProps, "state"),
|
|
66
|
-
"q:slot": "content"
|
|
67
|
-
}, null, 3, "lf_12")], 1, "lf_13");
|
|
67
|
+
}, null, 3, "L0_11") : /*#__PURE__*/ _jsxSorted(Packages, { state }, { "q:slot": "content" }, null, 3, "L0_12")], 1, "L0_13");
|
|
68
68
|
case "routes": return /*#__PURE__*/ _jsxSorted(TabContent, null, null, [/*#__PURE__*/ _jsxSorted(TabTitle, null, {
|
|
69
69
|
title: "Application Routes",
|
|
70
70
|
"q:slot": "title"
|
|
71
|
-
}, null, 3, "
|
|
71
|
+
}, null, 3, "L0_14"), isExtensionMode ? /*#__PURE__*/ _jsxSorted(ViteOnlyPlaceholder, null, {
|
|
72
72
|
feature: "Routes",
|
|
73
73
|
"q:slot": "content"
|
|
74
|
-
}, null, 3, "
|
|
75
|
-
|
|
76
|
-
"q:slot": "content"
|
|
77
|
-
}, null, 3, "lf_16")], 1, "lf_17");
|
|
78
|
-
case "inspect": return /*#__PURE__*/ _jsxSorted(TabContent, null, null, _rawProps.state.isExtension ? /*#__PURE__*/ _jsxSorted(ViteOnlyPlaceholder, null, {
|
|
74
|
+
}, null, 3, "L0_15") : /*#__PURE__*/ _jsxSorted(Routes, { state }, { "q:slot": "content" }, null, 3, "L0_16")], 1, "L0_17");
|
|
75
|
+
case "inspect": return /*#__PURE__*/ _jsxSorted(TabContent, null, null, isExtensionMode ? /*#__PURE__*/ _jsxSorted(ViteOnlyPlaceholder, null, {
|
|
79
76
|
feature: "Inspect",
|
|
80
77
|
"q:slot": "content"
|
|
81
|
-
}, null, 3, "
|
|
82
|
-
case "renderTree": return /*#__PURE__*/ _jsxSorted(TabContent, null, null, [/*#__PURE__*/ _jsxSorted(TabTitle, null, {
|
|
83
|
-
title: _fnSignal(_hf0, [_rawProps]),
|
|
84
|
-
"q:slot": "title"
|
|
85
|
-
}, null, 3, "lf_21"), _rawProps.state.isExtension ? /*#__PURE__*/ _jsxSorted(HookTree, null, {
|
|
86
|
-
state: _wrapProp(_rawProps, "state"),
|
|
87
|
-
"q:slot": "content"
|
|
88
|
-
}, null, 3, "lf_22") : /*#__PURE__*/ _jsxSorted(RenderTree, null, {
|
|
89
|
-
state: _wrapProp(_rawProps, "state"),
|
|
90
|
-
"q:slot": "content"
|
|
91
|
-
}, null, 3, "lf_23")], 1, "lf_24");
|
|
78
|
+
}, null, 3, "L0_18") : /*#__PURE__*/ _jsxSorted(Inspect, null, { "q:slot": "content" }, null, 3, "L0_19"), 1, "L0_20");
|
|
79
|
+
case "renderTree": return /*#__PURE__*/ _jsxSorted(TabContent, null, null, [/*#__PURE__*/ _jsxSorted(TabTitle, { title: isExtensionMode ? "Component Tree" : "Render Tree" }, { "q:slot": "title" }, null, 3, "L0_21"), isExtensionMode ? /*#__PURE__*/ _jsxSorted(HookTree, { state }, { "q:slot": "content" }, null, 3, "L0_22") : /*#__PURE__*/ _jsxSorted(RenderTree, { state }, { "q:slot": "content" }, null, 3, "L0_23")], 1, "L0_24");
|
|
92
80
|
case "codeBreak": return /*#__PURE__*/ _jsxSorted(TabContent, null, null, [/*#__PURE__*/ _jsxSorted(TabTitle, null, {
|
|
93
81
|
title: "Code Break",
|
|
94
82
|
"q:slot": "title"
|
|
95
|
-
}, null, 3, "
|
|
83
|
+
}, null, 3, "L0_25"), /*#__PURE__*/ _jsxSorted(CodeBreak, null, { "q:slot": "content" }, null, 3, "L0_26")], 1, "L0_27");
|
|
96
84
|
case "performance": return /*#__PURE__*/ _jsxSorted(TabContent, null, null, [/*#__PURE__*/ _jsxSorted(TabTitle, null, {
|
|
97
85
|
title: "Performance",
|
|
98
86
|
"q:slot": "title"
|
|
99
|
-
}, null, 3, "
|
|
100
|
-
state: _wrapProp(_rawProps, "state"),
|
|
101
|
-
"q:slot": "content"
|
|
102
|
-
}, null, 3, "lf_29")], 1, "lf_30");
|
|
87
|
+
}, null, 3, "L0_28"), /*#__PURE__*/ _jsxSorted(Performance, { state }, { "q:slot": "content" }, null, 3, "L0_29")], 1, "L0_30");
|
|
103
88
|
case "preloads": return /*#__PURE__*/ _jsxSorted(TabContent, null, null, [/*#__PURE__*/ _jsxSorted(TabTitle, null, {
|
|
104
89
|
title: "Preloads",
|
|
105
90
|
"q:slot": "title"
|
|
106
|
-
}, null, 3, "
|
|
91
|
+
}, null, 3, "L0_31"), /*#__PURE__*/ _jsxSorted(Preloads, null, { "q:slot": "content" }, null, 3, "L0_32")], 1, "L0_33");
|
|
107
92
|
case "buildAnalysis": return /*#__PURE__*/ _jsxSorted(TabContent, null, null, [/*#__PURE__*/ _jsxSorted(TabTitle, null, {
|
|
108
93
|
title: "Build Analysis",
|
|
109
94
|
"q:slot": "title"
|
|
110
|
-
}, null, 3, "
|
|
95
|
+
}, null, 3, "L0_34"), isExtensionMode ? /*#__PURE__*/ _jsxSorted(ViteOnlyPlaceholder, null, {
|
|
111
96
|
feature: "Build Analysis",
|
|
112
97
|
"q:slot": "content"
|
|
113
|
-
}, null, 3, "
|
|
98
|
+
}, null, 3, "L0_35") : /*#__PURE__*/ _jsxSorted(BuildAnalysis, null, { "q:slot": "content" }, null, 3, "L0_36")], 1, "L0_37");
|
|
114
99
|
default: return null;
|
|
115
100
|
}
|
|
116
101
|
}, "DevtoolsContent_component_38oZRY07A7Y"));
|