@pubinfo-pr/devtools 0.220.3 → 0.220.4
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/client/assets/Navbar-D8ux538U.css +18 -0
- package/dist/client/assets/Navbar-DCdslOKs.js +219 -0
- package/dist/client/assets/PanelGrids-Bq_2z9g3.js +9 -0
- package/dist/client/assets/SelectTabs-Chnu7x16.js +171 -0
- package/dist/client/assets/_plugin-vue_export-helper-D8E0syuh.js +6 -0
- package/dist/client/assets/component-Qe9twpoz.js +468 -0
- package/dist/client/assets/{fetch-DxuBXEk3.js → fetch-CwAFBmMG.js} +121 -4
- package/dist/client/assets/import-DV9l8S2T.js +375 -0
- package/dist/client/assets/{index-DcEJJh1_.js → index-ByOJyids.js} +34 -11
- package/dist/client/assets/index-DNthkvua.css +443 -0
- package/dist/client/assets/issue-BHrGN1_d.css +10 -0
- package/dist/client/assets/issue-MdUzHAB3.js +130 -0
- package/dist/client/assets/pages-D4LiKgxN.js +285 -0
- package/dist/client/assets/pages-DQ8FtB9Y.css +17 -0
- package/dist/client/assets/{server-router-8PynUpe5.css → server-router-B1AB70as.css} +0 -18
- package/dist/client/assets/{server-router-Bu5965f8.js → server-router-DuEpkdvh.js} +14 -225
- package/dist/client/component.svg +1 -0
- package/dist/client/import.svg +1 -0
- package/dist/client/index.html +2 -2
- package/dist/client/issue.svg +1 -0
- package/dist/client/logo.svg +1 -0
- package/dist/index.d.mts +0 -14
- package/dist/index.mjs +1966 -50
- package/dist/panel/index.d.mts +1 -0
- package/dist/panel/index.mjs +97 -1
- package/package.json +7 -2
- package/dist/client/assets/index-D7UL6pHD.css +0 -443
- package/dist/client/assets/pages-CfWIiNIx.js +0 -20
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
|
|
2
|
+
details[data-v-deaf669f] {
|
|
3
|
+
border-style:none;
|
|
4
|
+
}
|
|
5
|
+
summary[data-v-deaf669f] {
|
|
6
|
+
border-style:none;
|
|
7
|
+
list-style: none;
|
|
8
|
+
}
|
|
9
|
+
details[open] summary[data-v-deaf669f] {
|
|
10
|
+
border-style:none;
|
|
11
|
+
}
|
|
12
|
+
details summary[data-v-deaf669f]::-webkit-details-marker {
|
|
13
|
+
display: none;
|
|
14
|
+
}
|
|
15
|
+
details[open] .chevron[data-v-deaf669f] {
|
|
16
|
+
transform: rotate(180deg);
|
|
17
|
+
opacity: 0.75;
|
|
18
|
+
}
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
import { B as withCtx, G as isRef, I as useModel, M as renderSlot, P as resolveDirective, S as h, T as mergeProps, V as withDirectives, a as vModelDynamic, b as defineComponent, g as createElementBlock, h as createCommentVNode, it as toDisplayString, k as openBlock, m as createBlock, n as RouterLink, nt as normalizeClass, p as createBaseVNode, tt as unref, u as Fragment, v as createTextVNode, w as mergeModels, y as createVNode } from "./index-ByOJyids.js";
|
|
2
|
+
import { f as useVModel } from "./fetch-CwAFBmMG.js";
|
|
3
|
+
import { t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper-D8E0syuh.js";
|
|
4
|
+
var _hoisted_1$3 = { class: "flex gap-3 items-center" };
|
|
5
|
+
var IconTitle_default = /* @__PURE__ */ defineComponent({
|
|
6
|
+
__name: "IconTitle",
|
|
7
|
+
props: {
|
|
8
|
+
icon: {},
|
|
9
|
+
text: {}
|
|
10
|
+
},
|
|
11
|
+
setup(__props) {
|
|
12
|
+
return (_ctx, _cache) => {
|
|
13
|
+
return openBlock(), createElementBlock("div", _hoisted_1$3, [__props.icon ? (openBlock(), createElementBlock("div", {
|
|
14
|
+
key: 0,
|
|
15
|
+
class: normalizeClass(__props.icon)
|
|
16
|
+
}, null, 2)) : createCommentVNode("", true), renderSlot(_ctx.$slots, "default", {}, () => [createBaseVNode("div", null, toDisplayString(__props.text), 1)])]);
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
var Icon_default = /* @__PURE__ */ defineComponent({
|
|
21
|
+
__name: "Icon",
|
|
22
|
+
props: { icon: {} },
|
|
23
|
+
setup(__props) {
|
|
24
|
+
return (_ctx, _cache) => {
|
|
25
|
+
return openBlock(), createElementBlock("div", { class: normalizeClass(["n-icon", __props.icon]) }, null, 2);
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
var _hoisted_1$2 = ["open"];
|
|
30
|
+
var _hoisted_2 = { "text-base": "" };
|
|
31
|
+
var _hoisted_3 = {
|
|
32
|
+
key: 0,
|
|
33
|
+
"text-sm": "",
|
|
34
|
+
op50: ""
|
|
35
|
+
};
|
|
36
|
+
var SectionBlock_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
37
|
+
__name: "SectionBlock",
|
|
38
|
+
props: {
|
|
39
|
+
icon: {},
|
|
40
|
+
text: {},
|
|
41
|
+
description: {},
|
|
42
|
+
containerClass: { default: "" },
|
|
43
|
+
headerClass: {},
|
|
44
|
+
collapse: {
|
|
45
|
+
type: Boolean,
|
|
46
|
+
default: true
|
|
47
|
+
},
|
|
48
|
+
open: {
|
|
49
|
+
type: Boolean,
|
|
50
|
+
default: true
|
|
51
|
+
},
|
|
52
|
+
padding: {
|
|
53
|
+
type: [Boolean, String],
|
|
54
|
+
default: true
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
setup(__props) {
|
|
58
|
+
const open = useVModel(__props, "open", void 0, { passive: true });
|
|
59
|
+
function onToggle(e) {
|
|
60
|
+
open.value = e.target.open;
|
|
61
|
+
}
|
|
62
|
+
return (_ctx, _cache) => {
|
|
63
|
+
const _component_Icon = Icon_default;
|
|
64
|
+
const _component_IconTitle = IconTitle_default;
|
|
65
|
+
const _directive_lazy_show = resolveDirective("lazy-show");
|
|
66
|
+
return openBlock(), createElementBlock(Fragment, null, [createBaseVNode("details", {
|
|
67
|
+
open: unref(open),
|
|
68
|
+
onToggle: _cache[0] || (_cache[0] = (...args) => onToggle && onToggle(...args))
|
|
69
|
+
}, [createBaseVNode("summary", { class: normalizeClass(["cursor-pointer select-none p4 hover:bg-active", __props.collapse ? "" : "pointer-events-none"]) }, [createVNode(_component_IconTitle, {
|
|
70
|
+
icon: __props.icon,
|
|
71
|
+
text: __props.text,
|
|
72
|
+
"text-xl": "",
|
|
73
|
+
transition: "",
|
|
74
|
+
class: normalizeClass([unref(open) ? "op100" : "op60", __props.headerClass])
|
|
75
|
+
}, {
|
|
76
|
+
default: withCtx(() => [
|
|
77
|
+
createBaseVNode("div", null, [createBaseVNode("div", _hoisted_2, [renderSlot(_ctx.$slots, "text", {}, () => [createTextVNode(toDisplayString(__props.text), 1)], true)]), __props.description || _ctx.$slots.description ? (openBlock(), createElementBlock("div", _hoisted_3, [renderSlot(_ctx.$slots, "description", {}, () => [createTextVNode(toDisplayString(__props.description), 1)], true)])) : createCommentVNode("", true)]),
|
|
78
|
+
_cache[1] || (_cache[1] = createBaseVNode("div", { class: "flex-auto" }, null, -1)),
|
|
79
|
+
renderSlot(_ctx.$slots, "actions", {}, void 0, true),
|
|
80
|
+
__props.collapse ? (openBlock(), createBlock(_component_Icon, {
|
|
81
|
+
key: 0,
|
|
82
|
+
icon: "i-ph-caret-down",
|
|
83
|
+
class: "chevron",
|
|
84
|
+
"cursor-pointer": "",
|
|
85
|
+
"place-self-start": "",
|
|
86
|
+
"text-base": "",
|
|
87
|
+
op75: "",
|
|
88
|
+
transition: "",
|
|
89
|
+
"duration-500": ""
|
|
90
|
+
})) : createCommentVNode("", true)
|
|
91
|
+
]),
|
|
92
|
+
_: 3
|
|
93
|
+
}, 8, [
|
|
94
|
+
"icon",
|
|
95
|
+
"text",
|
|
96
|
+
"class"
|
|
97
|
+
])], 2), withDirectives((openBlock(), createElementBlock("div", { class: normalizeClass(["flex flex-col flex-gap2 pb6 pt2", typeof __props.padding === "string" ? __props.padding : __props.padding ? "px4" : ""]) }, [
|
|
98
|
+
renderSlot(_ctx.$slots, "details", {}, void 0, true),
|
|
99
|
+
createBaseVNode("div", { class: normalizeClass([__props.containerClass, "mt1"]) }, [renderSlot(_ctx.$slots, "default", {}, void 0, true)], 2),
|
|
100
|
+
renderSlot(_ctx.$slots, "footer", {}, void 0, true)
|
|
101
|
+
], 2)), [[_directive_lazy_show, unref(open)]])], 40, _hoisted_1$2), _cache[2] || (_cache[2] = createBaseVNode("div", { class: "x-divider" }, null, -1))], 64);
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
}), [["__scopeId", "data-v-deaf669f"]]);
|
|
105
|
+
function isExternalLink(to) {
|
|
106
|
+
if (!to) return false;
|
|
107
|
+
return /^(https?:|mailto:|tel:)/.test(to);
|
|
108
|
+
}
|
|
109
|
+
var Button_default = defineComponent({
|
|
110
|
+
name: "Button",
|
|
111
|
+
props: {
|
|
112
|
+
to: String,
|
|
113
|
+
icon: String,
|
|
114
|
+
border: {
|
|
115
|
+
type: Boolean,
|
|
116
|
+
default: true
|
|
117
|
+
},
|
|
118
|
+
disabled: Boolean,
|
|
119
|
+
type: {
|
|
120
|
+
type: String,
|
|
121
|
+
default: "button"
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
setup(props, { attrs, slots }) {
|
|
125
|
+
return () => {
|
|
126
|
+
const external = isExternalLink(props.to);
|
|
127
|
+
let element;
|
|
128
|
+
let elementProps = {};
|
|
129
|
+
if (props.to) if (external) {
|
|
130
|
+
element = "a";
|
|
131
|
+
elementProps = {
|
|
132
|
+
href: props.to,
|
|
133
|
+
target: attrs.target || "_blank",
|
|
134
|
+
rel: "noopener noreferrer"
|
|
135
|
+
};
|
|
136
|
+
} else {
|
|
137
|
+
element = RouterLink;
|
|
138
|
+
elementProps = { to: props.to };
|
|
139
|
+
}
|
|
140
|
+
else {
|
|
141
|
+
element = "button";
|
|
142
|
+
elementProps = { type: props.type };
|
|
143
|
+
}
|
|
144
|
+
return h(element, {
|
|
145
|
+
...elementProps,
|
|
146
|
+
...attrs,
|
|
147
|
+
...props.disabled ? { disabled: true } : { tabindex: 0 },
|
|
148
|
+
class: [
|
|
149
|
+
props.border ? "n-button-base active:n-button-active focus-visible:n-focus-base hover:n-button-hover" : "",
|
|
150
|
+
slots.default ? "" : "n-icon-button",
|
|
151
|
+
"n-button n-transition n-disabled:n-disabled"
|
|
152
|
+
].join(" ")
|
|
153
|
+
}, { default: () => [renderSlot(slots, "icon", {}, () => props.icon ? [h(Icon_default, {
|
|
154
|
+
icon: props.icon,
|
|
155
|
+
class: slots.default ? "n-button-icon" : ""
|
|
156
|
+
})] : []), renderSlot(slots, "default")] });
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
var _hoisted_1$1 = { class: "flex items-center border n-border-base rounded n-bg-base py-1 pl-1 pr-2 focus-within:border-primary" };
|
|
161
|
+
var TextInput_default = /* @__PURE__ */ defineComponent({
|
|
162
|
+
__name: "TextInput",
|
|
163
|
+
props: {
|
|
164
|
+
modelValue: { default: "" },
|
|
165
|
+
icon: {},
|
|
166
|
+
placeholder: {},
|
|
167
|
+
disabled: { type: Boolean },
|
|
168
|
+
autofocus: { type: Boolean },
|
|
169
|
+
autocomplete: {},
|
|
170
|
+
readonly: { type: Boolean },
|
|
171
|
+
type: { default: "text" }
|
|
172
|
+
},
|
|
173
|
+
emits: [
|
|
174
|
+
"keydown",
|
|
175
|
+
"keyup",
|
|
176
|
+
"change"
|
|
177
|
+
],
|
|
178
|
+
setup(__props, { emit: __emit }) {
|
|
179
|
+
const input = useVModel(__props, "modelValue", __emit, { passive: true });
|
|
180
|
+
return (_ctx, _cache) => {
|
|
181
|
+
return openBlock(), createElementBlock("div", _hoisted_1$1, [renderSlot(_ctx.$slots, "icon", {}, () => [__props.icon ? (openBlock(), createBlock(Icon_default, {
|
|
182
|
+
key: 0,
|
|
183
|
+
icon: __props.icon,
|
|
184
|
+
class: "ml-0.3em mr-0.1em text-1.1em op50"
|
|
185
|
+
}, null, 8, ["icon"])) : createCommentVNode("", true)]), withDirectives(createBaseVNode("input", mergeProps({ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(input) ? input.value = $event : null) }, _ctx.$props, { class: "ml-0.4em w-full flex-auto n-bg-base outline-none!" }), null, 16), [[vModelDynamic, unref(input)]])]);
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
});
|
|
189
|
+
var _hoisted_1 = { class: "flex gap-4 flex-wrap items-center" };
|
|
190
|
+
var Navbar_default = /* @__PURE__ */ defineComponent({
|
|
191
|
+
name: "Navbar",
|
|
192
|
+
__name: "Navbar",
|
|
193
|
+
props: /* @__PURE__ */ mergeModels({
|
|
194
|
+
search: {},
|
|
195
|
+
noPadding: { type: Boolean }
|
|
196
|
+
}, {
|
|
197
|
+
"search": {},
|
|
198
|
+
"searchModifiers": {}
|
|
199
|
+
}),
|
|
200
|
+
emits: /* @__PURE__ */ mergeModels(["update:search"], ["update:search"]),
|
|
201
|
+
setup(__props, { emit: __emit }) {
|
|
202
|
+
const emit = __emit;
|
|
203
|
+
function update(event) {
|
|
204
|
+
emit("update:search", event.target.value);
|
|
205
|
+
}
|
|
206
|
+
const search = useModel(__props, "search");
|
|
207
|
+
return (_ctx, _cache) => {
|
|
208
|
+
return openBlock(), createElementBlock("div", { class: normalizeClass(["flex flex-col gap-2 flex-wrap border-b n-border-base flex-1", [{ p4: !__props.noPadding }]]) }, [createBaseVNode("div", _hoisted_1, [renderSlot(_ctx.$slots, "search", {}, () => [search.value !== void 0 ? (openBlock(), createBlock(TextInput_default, {
|
|
209
|
+
key: 0,
|
|
210
|
+
placeholder: "Search...",
|
|
211
|
+
icon: "i-carbon-search",
|
|
212
|
+
class: normalizeClass(["flex-auto", { "px-3 py-2": !__props.noPadding }]),
|
|
213
|
+
value: search.value,
|
|
214
|
+
onInput: update
|
|
215
|
+
}, null, 8, ["class", "value"])) : createCommentVNode("", true)]), renderSlot(_ctx.$slots, "actions")]), renderSlot(_ctx.$slots, "default")], 2);
|
|
216
|
+
};
|
|
217
|
+
}
|
|
218
|
+
});
|
|
219
|
+
export { Icon_default as a, SectionBlock_default as i, TextInput_default as n, Button_default as r, Navbar_default as t };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { M as renderSlot, g as createElementBlock, k as openBlock } from "./index-ByOJyids.js";
|
|
2
|
+
import { t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper-D8E0syuh.js";
|
|
3
|
+
var _sfc_main = {};
|
|
4
|
+
var _hoisted_1 = { class: "n-panel-grids-center" };
|
|
5
|
+
function _sfc_render(_ctx, _cache) {
|
|
6
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [renderSlot(_ctx.$slots, "default")]);
|
|
7
|
+
}
|
|
8
|
+
var PanelGrids_default = /* @__PURE__ */ _plugin_vue_export_helper_default(_sfc_main, [["render", _sfc_render]]);
|
|
9
|
+
export { PanelGrids_default as t };
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import { D as onBeforeUnmount, G as isRef, M as renderSlot, V as withDirectives, Y as ref, b as defineComponent, f as computed, g as createElementBlock, h as createCommentVNode, it as toDisplayString, j as renderList, k as openBlock, nt as normalizeClass, o as vModelRadio, p as createBaseVNode, tt as unref, u as Fragment } from "./index-ByOJyids.js";
|
|
2
|
+
import { f as useVModel, l as useClipboard } from "./fetch-CwAFBmMG.js";
|
|
3
|
+
var OPEN_IN_EDITOR_ENDPOINT = "/__open-in-editor";
|
|
4
|
+
function normalizeFilepath(file) {
|
|
5
|
+
return file.replace(/\\/g, "/");
|
|
6
|
+
}
|
|
7
|
+
function buildEditorRequestPath(file, line, column) {
|
|
8
|
+
const normalized = normalizeFilepath(file);
|
|
9
|
+
if (line == null) return normalized;
|
|
10
|
+
return `${normalized}:${Number.isFinite(line) ? Math.max(1, Math.round(line)) : 1}:${column != null && Number.isFinite(column) ? Math.max(1, Math.round(column)) : 1}`;
|
|
11
|
+
}
|
|
12
|
+
async function openInEditor(file, line, column) {
|
|
13
|
+
if (!file) return false;
|
|
14
|
+
const requestPath = buildEditorRequestPath(file, line, column);
|
|
15
|
+
const url = `${OPEN_IN_EDITOR_ENDPOINT}?file=${encodeURIComponent(requestPath)}`;
|
|
16
|
+
try {
|
|
17
|
+
const response = await fetch(url, {
|
|
18
|
+
method: "GET",
|
|
19
|
+
headers: { "Content-Type": "application/json" }
|
|
20
|
+
});
|
|
21
|
+
if (!response.ok) {
|
|
22
|
+
const errorText = await response.text().catch(() => "");
|
|
23
|
+
throw new Error(errorText || `Request failed with status ${response.status}`);
|
|
24
|
+
}
|
|
25
|
+
return true;
|
|
26
|
+
} catch (error) {
|
|
27
|
+
console.error("Failed to open file in editor:", error);
|
|
28
|
+
return false;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
var _hoisted_1$1 = { class: "flex gap-2 items-center group" };
|
|
32
|
+
var _hoisted_2$1 = ["title"];
|
|
33
|
+
var _hoisted_3$1 = {
|
|
34
|
+
key: 0,
|
|
35
|
+
class: "flex gap-1 pr-2 op-0 group-hover:op-100"
|
|
36
|
+
};
|
|
37
|
+
var _hoisted_4 = ["title"];
|
|
38
|
+
var _hoisted_5 = ["title"];
|
|
39
|
+
var FilepathItem_default = /* @__PURE__ */ defineComponent({
|
|
40
|
+
__name: "FilepathItem",
|
|
41
|
+
props: {
|
|
42
|
+
filepath: {},
|
|
43
|
+
lineBreak: { type: Boolean },
|
|
44
|
+
subpath: { type: Boolean },
|
|
45
|
+
override: {},
|
|
46
|
+
line: {},
|
|
47
|
+
column: {}
|
|
48
|
+
},
|
|
49
|
+
setup(__props) {
|
|
50
|
+
const props = __props;
|
|
51
|
+
const normalizedPath = computed(() => props.filepath?.replace(/\\/g, "/") ?? "");
|
|
52
|
+
const shortenedPath = computed(() => {
|
|
53
|
+
const path = normalizedPath.value;
|
|
54
|
+
if (!path) return "";
|
|
55
|
+
const markerIndex = path.indexOf("/src/");
|
|
56
|
+
if (markerIndex >= 0) return path.slice(markerIndex + 1);
|
|
57
|
+
const directSrcIndex = path.indexOf("src/");
|
|
58
|
+
if (directSrcIndex >= 0) return path.slice(directSrcIndex);
|
|
59
|
+
return path;
|
|
60
|
+
});
|
|
61
|
+
const displayValue = computed(() => props.override || shortenedPath.value);
|
|
62
|
+
const titleValue = computed(() => props.override || normalizedPath.value || "");
|
|
63
|
+
const { copy: copyToClipboard } = useClipboard({ legacy: true });
|
|
64
|
+
const copyState = ref("idle");
|
|
65
|
+
let resetHandle;
|
|
66
|
+
const copyTooltip = computed(() => {
|
|
67
|
+
if (copyState.value === "copied") return "Copied path";
|
|
68
|
+
if (copyState.value === "error") return "Failed to copy";
|
|
69
|
+
return "Copy path";
|
|
70
|
+
});
|
|
71
|
+
const openTooltip = computed(() => {
|
|
72
|
+
if (typeof props.line === "number" && props.line > 0) {
|
|
73
|
+
const column = typeof props.column === "number" && props.column > 0 ? props.column : 1;
|
|
74
|
+
return `Open in editor (${props.line}:${column})`;
|
|
75
|
+
}
|
|
76
|
+
return "Open in editor";
|
|
77
|
+
});
|
|
78
|
+
const copyIcon = computed(() => {
|
|
79
|
+
if (copyState.value === "copied") return "i-carbon-checkmark";
|
|
80
|
+
if (copyState.value === "error") return "i-carbon-warning-alt";
|
|
81
|
+
return "i-carbon-copy";
|
|
82
|
+
});
|
|
83
|
+
function scheduleReset() {
|
|
84
|
+
if (resetHandle) clearTimeout(resetHandle);
|
|
85
|
+
resetHandle = setTimeout(() => {
|
|
86
|
+
copyState.value = "idle";
|
|
87
|
+
resetHandle = void 0;
|
|
88
|
+
}, 2e3);
|
|
89
|
+
}
|
|
90
|
+
async function copyFilepath() {
|
|
91
|
+
if (!normalizedPath.value) return;
|
|
92
|
+
try {
|
|
93
|
+
await copyToClipboard(normalizedPath.value);
|
|
94
|
+
copyState.value = "copied";
|
|
95
|
+
} catch (error) {
|
|
96
|
+
console.error("Failed to copy file path:", error);
|
|
97
|
+
copyState.value = "error";
|
|
98
|
+
} finally {
|
|
99
|
+
scheduleReset();
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
async function handleOpenInEditor() {
|
|
103
|
+
if (!normalizedPath.value) return;
|
|
104
|
+
await openInEditor(normalizedPath.value, props.line, props.column);
|
|
105
|
+
}
|
|
106
|
+
onBeforeUnmount(() => {
|
|
107
|
+
if (resetHandle) clearTimeout(resetHandle);
|
|
108
|
+
});
|
|
109
|
+
return (_ctx, _cache) => {
|
|
110
|
+
return openBlock(), createElementBlock("span", _hoisted_1$1, [
|
|
111
|
+
createBaseVNode("span", {
|
|
112
|
+
class: normalizeClass([__props.lineBreak ? "" : "ws-nowrap of-hidden truncate"]),
|
|
113
|
+
"font-mono": "",
|
|
114
|
+
title: titleValue.value
|
|
115
|
+
}, toDisplayString(displayValue.value), 11, _hoisted_2$1),
|
|
116
|
+
renderSlot(_ctx.$slots, "default"),
|
|
117
|
+
__props.filepath ? (openBlock(), createElementBlock("div", _hoisted_3$1, [createBaseVNode("button", {
|
|
118
|
+
class: "text-sm op-40 hover:op-100 hover:text-primary",
|
|
119
|
+
type: "button",
|
|
120
|
+
title: openTooltip.value,
|
|
121
|
+
onClick: handleOpenInEditor
|
|
122
|
+
}, [..._cache[0] || (_cache[0] = [createBaseVNode("div", { class: "i-carbon-script-reference" }, null, -1)])], 8, _hoisted_4), createBaseVNode("button", {
|
|
123
|
+
class: "text-sm op-40 hover:op-100 hover:text-primary",
|
|
124
|
+
type: "button",
|
|
125
|
+
title: copyTooltip.value,
|
|
126
|
+
onClick: copyFilepath
|
|
127
|
+
}, [createBaseVNode("div", { class: normalizeClass(copyIcon.value) }, null, 2)], 8, _hoisted_5)])) : createCommentVNode("", true)
|
|
128
|
+
]);
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
var _hoisted_1 = { class: "flex flex-inline flex-wrap items-center border n-border-base rounded n-bg-base" };
|
|
133
|
+
var _hoisted_2 = ["disabled", "title"];
|
|
134
|
+
var _hoisted_3 = [
|
|
135
|
+
"disabled",
|
|
136
|
+
"value",
|
|
137
|
+
"title"
|
|
138
|
+
];
|
|
139
|
+
var SelectTabs_default = /* @__PURE__ */ defineComponent({
|
|
140
|
+
name: "SelectTabs",
|
|
141
|
+
__name: "SelectTabs",
|
|
142
|
+
props: {
|
|
143
|
+
modelValue: { default: void 0 },
|
|
144
|
+
disabled: {
|
|
145
|
+
type: Boolean,
|
|
146
|
+
default: false
|
|
147
|
+
},
|
|
148
|
+
options: {}
|
|
149
|
+
},
|
|
150
|
+
setup(__props, { emit: __emit }) {
|
|
151
|
+
const input = useVModel(__props, "modelValue", __emit, { passive: true });
|
|
152
|
+
return (_ctx, _cache) => {
|
|
153
|
+
return openBlock(), createElementBlock("fieldset", _hoisted_1, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.options, (i, idx) => {
|
|
154
|
+
return openBlock(), createElementBlock("label", {
|
|
155
|
+
key: i.label,
|
|
156
|
+
disabled: __props.disabled,
|
|
157
|
+
class: normalizeClass(["relative n-border-base px-0.5em py-0.1em hover:n-bg-active", [idx ? "border-l n-border-base ml--1px" : "", i.value === unref(input) ? "n-bg-active" : ""]]),
|
|
158
|
+
title: i.label
|
|
159
|
+
}, [createBaseVNode("div", { class: normalizeClass([i.value === unref(input) ? "" : "op35"]) }, toDisplayString(i.label), 3), withDirectives(createBaseVNode("input", {
|
|
160
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(input) ? input.value = $event : null),
|
|
161
|
+
type: "radio",
|
|
162
|
+
disabled: __props.disabled,
|
|
163
|
+
value: i.value,
|
|
164
|
+
title: i.label,
|
|
165
|
+
class: "absolute inset-0 op-0.1"
|
|
166
|
+
}, null, 8, _hoisted_3), [[vModelRadio, unref(input)]])], 10, _hoisted_2);
|
|
167
|
+
}), 128))]);
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
});
|
|
171
|
+
export { FilepathItem_default as n, SelectTabs_default as t };
|