@pubinfo-pr/devtools 0.220.2 → 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.
@@ -0,0 +1,130 @@
1
+ import { B as withCtx, G as isRef, V as withDirectives, Y as ref, b as defineComponent, c as vModelText, f as computed, g as createElementBlock, h as createCommentVNode, it as toDisplayString, k as openBlock, m as createBlock, nt as normalizeClass, p as createBaseVNode, r as Transition, tt as unref, v as createTextVNode, y as createVNode } from "./index-ByOJyids.js";
2
+ import { t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper-D8E0syuh.js";
3
+ import { t as PanelGrids_default } from "./PanelGrids-Bq_2z9g3.js";
4
+ var _hoisted_1 = { class: "flex flex-col gap-4 m-auto h-full max-w-400 w-full p-5 px-5 md:px-20 of-auto" };
5
+ var _hoisted_2 = { class: "flex flex-col gap-4" };
6
+ var _hoisted_3 = { class: "flex flex-col gap-1" };
7
+ var _hoisted_4 = { class: "flex flex-col gap-1" };
8
+ var _hoisted_5 = { class: "flex flex-col gap-1" };
9
+ var _hoisted_6 = { class: "flex flex-col gap-1" };
10
+ var _hoisted_7 = { class: "flex flex-col gap-1" };
11
+ var _hoisted_8 = { class: "flex items-center justify-end gap-3 mt-2 mb-6" };
12
+ var _hoisted_9 = ["disabled"];
13
+ var _hoisted_10 = { class: "flex items-center gap-1.5" };
14
+ var API_ROOT = "/__pubinfo_devtools_api";
15
+ var issue_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
16
+ name: "IssuePage",
17
+ __name: "issue",
18
+ setup(__props) {
19
+ const title = ref("");
20
+ const description = ref("");
21
+ const steps = ref("");
22
+ const expected = ref("");
23
+ const actual = ref("");
24
+ const submitting = ref(false);
25
+ const toastVisible = ref(false);
26
+ const toastMessage = ref("");
27
+ const toastType = ref("success");
28
+ let toastTimer = null;
29
+ function showToast(message, type = "success") {
30
+ if (toastTimer) clearTimeout(toastTimer);
31
+ toastMessage.value = message;
32
+ toastType.value = type;
33
+ toastVisible.value = true;
34
+ toastTimer = setTimeout(() => {
35
+ toastVisible.value = false;
36
+ }, 3e3);
37
+ }
38
+ async function submitIssue() {
39
+ submitting.value = true;
40
+ try {
41
+ const payload = {
42
+ title: title.value,
43
+ description: description.value,
44
+ steps: steps.value,
45
+ expected: expected.value,
46
+ actual: actual.value
47
+ };
48
+ const res = await fetch(`${API_ROOT}/issue`, {
49
+ method: "POST",
50
+ headers: { "Content-Type": "application/json" },
51
+ body: JSON.stringify(payload)
52
+ });
53
+ if (!res.ok) throw new Error(`HTTP ${res.status}`);
54
+ if ((await res.json()).success) showToast(`提交成功!`, "success");
55
+ else showToast("提交成功!感谢你的反馈。", "success");
56
+ resetForm();
57
+ } catch {
58
+ showToast("提交失败,请稍后重试。", "error");
59
+ } finally {
60
+ submitting.value = false;
61
+ }
62
+ }
63
+ function resetForm() {
64
+ title.value = "";
65
+ description.value = "";
66
+ steps.value = "";
67
+ expected.value = "";
68
+ actual.value = "";
69
+ }
70
+ const isFormValid = computed(() => title.value.trim().length > 0);
71
+ return (_ctx, _cache) => {
72
+ const _component_PanelGrids = PanelGrids_default;
73
+ return openBlock(), createBlock(_component_PanelGrids, { class: "h-screen w-full" }, {
74
+ default: withCtx(() => [createBaseVNode("div", _hoisted_1, [
75
+ _cache[10] || (_cache[10] = createBaseVNode("div", { class: "flex items-center gap-3 mt-6" }, [createBaseVNode("div", { class: "i-carbon-debug text-3xl text-orange" }), createBaseVNode("h1", { class: "text-2xl font-bold" }, " 提交 Bug Report ")], -1)),
76
+ _cache[11] || (_cache[11] = createBaseVNode("p", { class: "text-sm op50" }, " 在此填写 Bug 信息并提交。 ", -1)),
77
+ createVNode(Transition, { name: "toast" }, {
78
+ default: withCtx(() => [unref(toastVisible) ? (openBlock(), createElementBlock("div", {
79
+ key: 0,
80
+ class: normalizeClass(["fixed right-5 top-5 z-100 flex items-center gap-2 rounded-lg px-4 py-3 text-sm text-white shadow-lg", unref(toastType) === "success" ? "bg-green-6" : "bg-red-6"])
81
+ }, [createBaseVNode("div", { class: normalizeClass(unref(toastType) === "success" ? "i-carbon-checkmark-filled" : "i-carbon-warning-filled") }, null, 2), createTextVNode(" " + toDisplayString(unref(toastMessage)), 1)], 2)) : createCommentVNode("", true)]),
82
+ _: 1
83
+ }),
84
+ createBaseVNode("div", _hoisted_2, [
85
+ createBaseVNode("div", _hoisted_3, [_cache[5] || (_cache[5] = createBaseVNode("label", { class: "text-sm font-medium" }, [createTextVNode(" 标题 "), createBaseVNode("span", { class: "text-red" }, "*")], -1)), withDirectives(createBaseVNode("input", {
86
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(title) ? title.value = $event : null),
87
+ type: "text",
88
+ placeholder: "简要描述你遇到的问题",
89
+ class: "w-full rounded-lg border n-border-base n-bg-base px-3 py-2 text-sm outline-none transition focus:border-primary"
90
+ }, null, 512), [[vModelText, unref(title)]])]),
91
+ createBaseVNode("div", _hoisted_4, [_cache[6] || (_cache[6] = createBaseVNode("label", { class: "text-sm font-medium" }, "问题描述", -1)), withDirectives(createBaseVNode("textarea", {
92
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => isRef(description) ? description.value = $event : null),
93
+ rows: "6",
94
+ placeholder: "详细描述你遇到的问题...",
95
+ class: "w-full rounded-lg border n-border-base n-bg-base px-3 py-2 text-sm outline-none transition resize-y focus:border-primary"
96
+ }, null, 512), [[vModelText, unref(description)]])]),
97
+ createBaseVNode("div", _hoisted_5, [_cache[7] || (_cache[7] = createBaseVNode("label", { class: "text-sm font-medium" }, "复现步骤", -1)), withDirectives(createBaseVNode("textarea", {
98
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => isRef(steps) ? steps.value = $event : null),
99
+ rows: "6",
100
+ placeholder: "1. 打开页面\n2. 点击按钮\n3. ...",
101
+ class: "w-full rounded-lg border n-border-base n-bg-base px-3 py-2 text-sm outline-none transition resize-y focus:border-primary"
102
+ }, null, 512), [[vModelText, unref(steps)]])]),
103
+ createBaseVNode("div", _hoisted_6, [_cache[8] || (_cache[8] = createBaseVNode("label", { class: "text-sm font-medium" }, "期望行为", -1)), withDirectives(createBaseVNode("textarea", {
104
+ "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => isRef(expected) ? expected.value = $event : null),
105
+ rows: "4",
106
+ placeholder: "你期望发生什么...",
107
+ class: "w-full rounded-lg border n-border-base n-bg-base px-3 py-2 text-sm outline-none transition resize-y focus:border-primary"
108
+ }, null, 512), [[vModelText, unref(expected)]])]),
109
+ createBaseVNode("div", _hoisted_7, [_cache[9] || (_cache[9] = createBaseVNode("label", { class: "text-sm font-medium" }, "实际行为", -1)), withDirectives(createBaseVNode("textarea", {
110
+ "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => isRef(actual) ? actual.value = $event : null),
111
+ rows: "4",
112
+ placeholder: "实际上发生了什么...",
113
+ class: "w-full rounded-lg border n-border-base n-bg-base px-3 py-2 text-sm outline-none transition resize-y focus:border-primary"
114
+ }, null, 512), [[vModelText, unref(actual)]])])
115
+ ]),
116
+ createBaseVNode("div", _hoisted_8, [createBaseVNode("button", {
117
+ disabled: !unref(isFormValid) || unref(submitting),
118
+ class: "rounded-lg bg-orange px-4 py-2 text-sm text-white font-medium transition hover:bg-orange-6 disabled:cursor-not-allowed disabled:op50",
119
+ onClick: submitIssue
120
+ }, [createBaseVNode("span", _hoisted_10, [createBaseVNode("div", { class: normalizeClass(unref(submitting) ? "i-carbon-circle-dash animate-spin" : "i-carbon-send-alt") }, null, 2), createTextVNode(" " + toDisplayString(unref(submitting) ? "提交中..." : "提交"), 1)])], 8, _hoisted_9), createBaseVNode("button", {
121
+ class: "rounded-lg border n-border-base px-4 py-2 text-sm transition hover:bg-active",
122
+ onClick: resetForm
123
+ }, " 重置 ")])
124
+ ])]),
125
+ _: 1
126
+ });
127
+ };
128
+ }
129
+ }), [["__scopeId", "data-v-20b6063c"]]);
130
+ export { issue_default as default };
@@ -0,0 +1,285 @@
1
+ import { B as withCtx, J as readonly, M as renderSlot, R as watch, Y as ref, _ as createStaticVNode, b as defineComponent, f as computed, g as createElementBlock, h as createCommentVNode, it as toDisplayString, k as openBlock, m as createBlock, p as createBaseVNode, q as reactive, t as __vitePreload, tt as unref, u as Fragment, v as createTextVNode, y as createVNode } from "./index-ByOJyids.js";
2
+ import { a as usePackageVersion$1, i as overviewFetch, o as Badge_default, p as createEventHook } from "./fetch-CwAFBmMG.js";
3
+ import { t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper-D8E0syuh.js";
4
+ import { t as PanelGrids_default } from "./PanelGrids-Bq_2z9g3.js";
5
+ function usePackageVersion(packageName) {
6
+ const info = ref(null);
7
+ const isLoading = ref(false);
8
+ const error = ref(null);
9
+ const current = computed(() => info.value?.currentVersion || null);
10
+ const latest = computed(() => info.value?.latestVersion || null);
11
+ const needsUpdate = computed(() => info.value?.isOutdated || false);
12
+ async function fetch() {
13
+ if (!packageName?.trim()) {
14
+ info.value = null;
15
+ return;
16
+ }
17
+ isLoading.value = true;
18
+ error.value = null;
19
+ try {
20
+ const { data, execute } = usePackageVersion$1(packageName.trim());
21
+ await execute();
22
+ if (data.value) {
23
+ info.value = data.value;
24
+ error.value = data.value.error || null;
25
+ }
26
+ } catch (err) {
27
+ console.error("Failed to fetch package version:", err);
28
+ error.value = err instanceof Error ? err.message : String(err);
29
+ info.value = null;
30
+ } finally {
31
+ isLoading.value = false;
32
+ }
33
+ }
34
+ watch(() => packageName, () => {
35
+ fetch();
36
+ }, { immediate: true });
37
+ return {
38
+ info: computed(() => ({
39
+ current: current.value,
40
+ latest: latest.value,
41
+ needsUpdate: needsUpdate.value,
42
+ packageName: info.value?.packageName || packageName
43
+ })),
44
+ isLoading,
45
+ error,
46
+ fetch
47
+ };
48
+ }
49
+ var _hoisted_1$2 = { key: 0 };
50
+ var _hoisted_2$1 = { key: 0 };
51
+ var NpmVersionCheck_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
52
+ __name: "NpmVersionCheck",
53
+ props: {
54
+ packageName: {},
55
+ showVersion: {
56
+ type: Boolean,
57
+ default: true
58
+ }
59
+ },
60
+ setup(__props) {
61
+ const { info, isLoading, error } = usePackageVersion(__props.packageName);
62
+ return (_ctx, _cache) => {
63
+ const _component_Badge = Badge_default;
64
+ return renderSlot(_ctx.$slots, "default", {
65
+ info: unref(info),
66
+ isLoading: unref(isLoading),
67
+ error: unref(error)
68
+ }, () => [unref(info) && __props.showVersion ? (openBlock(), createElementBlock("code", _hoisted_1$2, toDisplayString(unref(info).current ? `v${unref(info).current}` : ""), 1)) : createCommentVNode("", true), unref(info)?.latest ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [unref(info).needsUpdate ? (openBlock(), createElementBlock("button", _hoisted_2$1, [createVNode(_component_Badge, {
69
+ n: "green",
70
+ title: "updates available"
71
+ }, {
72
+ default: withCtx(() => [..._cache[0] || (_cache[0] = [createTextVNode(" updates available ", -1)])]),
73
+ _: 1
74
+ })])) : (openBlock(), createBlock(_component_Badge, {
75
+ key: 1,
76
+ n: "gray",
77
+ title: "latest"
78
+ }, {
79
+ default: withCtx(() => [..._cache[1] || (_cache[1] = [createTextVNode(" latest ", -1)])]),
80
+ _: 1
81
+ }))], 64)) : createCommentVNode("", true)], true);
82
+ };
83
+ }
84
+ }), [["__scopeId", "data-v-61e1d4e4"]]);
85
+ const version = "2.1.10-beta.2";
86
+ var _hoisted_1$1 = ["width", "height"];
87
+ var Logo_default = /* @__PURE__ */ defineComponent({
88
+ name: "Logo",
89
+ __name: "Logo",
90
+ props: { size: {} },
91
+ setup(__props) {
92
+ return (_ctx, _cache) => {
93
+ return openBlock(), createElementBlock("svg", {
94
+ xmlns: "http://www.w3.org/2000/svg",
95
+ width: __props.size,
96
+ height: __props.size,
97
+ fill: "none",
98
+ viewBox: "0 0 144 125",
99
+ preserveAspectRatio: "xMidYMid meet"
100
+ }, [..._cache[0] || (_cache[0] = [createStaticVNode("<path fill=\"url(#a)\" stroke=\"url(#b)\" d=\"M142.858 58.054c0 1.922-.524 3.845-1.572 5.418l-14.68 23.068-16.078 25.165c-1.398 2.097-3.67 3.496-6.292 3.496h-65.71L55.13 86.54h34.952l14.855-25.515c.699-1.398-.175-2.97-1.748-2.97H71.731l16.602-28.661h34.428c2.272 0 4.369 1.223 5.592 3.145l12.758 20.098c1.223 1.572 1.747 3.495 1.747 5.417Z\"></path><path fill=\"url(#c)\" stroke=\"url(#d)\" d=\"M38.702 54.909c-.7 1.398.174 2.97 1.747 2.97h31.457L55.304 86.54H20.876c-2.272 0-4.369-1.223-5.592-3.146L2.352 63.473C1.303 61.724.779 59.977.779 58.054s.524-3.844 1.573-5.417l14.68-23.068 16.077-25.34C34.507 2.13 36.954.732 39.401.732h65.535l-16.603 28.66H53.382z\"></path><path fill=\"url(#e)\" d=\"M142.858 57.88v9.087c0 1.922-.524 3.844-1.572 5.417l-30.758 48.409c-1.398 2.097-3.845 3.495-6.292 3.495h-65.71V115.2h65.536c2.621 0 4.893-1.398 6.291-3.495l16.253-25.34 14.68-23.068c1.048-1.748 1.572-3.67 1.572-5.418\" opacity=\".8\"></path><path fill=\"url(#f)\" d=\"m104.935 61.025-3.495 6.117H71.731l-11.36 19.573H55.13l16.602-28.66h31.457c1.573 0 2.621 1.572 1.747 2.97\" opacity=\".8\"></path><path fill=\"url(#g)\" d=\"m101.44 67.142 3.495-6.117c.874-1.398-.174-2.97-1.747-2.97H71.731v9.087z\" opacity=\".8\"></path><path fill=\"url(#h)\" d=\"M104.936.733v9.088l-11.36 19.573h-5.242z\" opacity=\".8\"></path><path fill=\"url(#i)\" d=\"m88.508 29.394-5.243 9.087h-29.71L42.197 58.054H40.45c-1.573 0-2.622-1.748-1.748-2.97l14.855-25.516h34.951z\" opacity=\".8\"></path><path fill=\"url(#j)\" d=\"m55.13 86.54-5.244 9.087h-29.01c-2.272 0-4.369-1.223-5.592-3.145L2.352 72.559C1.303 70.986.779 69.064.779 67.142v-9.088c0 1.923.524 3.845 1.573 5.418l12.757 20.097c1.223 1.922 3.32 3.146 5.592 3.146H55.13z\" opacity=\".8\"></path><defs><linearGradient id=\"a\" x1=\"90.693\" x2=\"90.693\" y1=\"29.394\" y2=\"115.201\" gradientUnits=\"userSpaceOnUse\"><stop stop-color=\"#AEFFD3\"></stop><stop offset=\"1\" stop-color=\"#13C966\"></stop></linearGradient><linearGradient id=\"b\" x1=\"132.493\" x2=\"90.803\" y1=\"35.066\" y2=\"115.258\" gradientUnits=\"userSpaceOnUse\"><stop stop-color=\"#fff\" stop-opacity=\"0\"></stop><stop offset=\"1\" stop-color=\"#fff\" stop-opacity=\".82\"></stop></linearGradient><linearGradient id=\"c\" x1=\"52.857\" x2=\"52.857\" y1=\".733\" y2=\"86.54\" gradientUnits=\"userSpaceOnUse\"><stop stop-color=\"#A3C6FF\"></stop><stop offset=\"1\" stop-color=\"#2275FF\"></stop></linearGradient><linearGradient id=\"d\" x1=\"94.587\" x2=\"52.857\" y1=\"6.405\" y2=\"86.54\" gradientUnits=\"userSpaceOnUse\"><stop stop-color=\"#fff\" stop-opacity=\"0\"></stop><stop offset=\"1\" stop-color=\"#fff\" stop-opacity=\".55\"></stop></linearGradient><linearGradient id=\"e\" x1=\"90.693\" x2=\"90.693\" y1=\"57.879\" y2=\"124.288\" gradientUnits=\"userSpaceOnUse\"><stop stop-color=\"#AEFFD3\"></stop><stop offset=\"1\" stop-color=\"#0FE270\"></stop></linearGradient><linearGradient id=\"f\" x1=\"80.191\" x2=\"80.191\" y1=\"58.054\" y2=\"86.715\" gradientUnits=\"userSpaceOnUse\"><stop stop-color=\"#A3C6FF\"></stop><stop offset=\"1\" stop-color=\"#2275FF\"></stop></linearGradient><linearGradient id=\"g\" x1=\"72.889\" x2=\"100.968\" y1=\"67.142\" y2=\"67.142\" gradientUnits=\"userSpaceOnUse\"><stop stop-color=\"#AEFFD3\"></stop><stop offset=\"1\" stop-color=\"#0FE270\"></stop></linearGradient><linearGradient id=\"h\" x1=\"105.825\" x2=\"89.13\" y1=\".733\" y2=\"27.995\" gradientUnits=\"userSpaceOnUse\"><stop stop-color=\"#A3C6FF\"></stop><stop offset=\"1\" stop-color=\"#2275FF\"></stop></linearGradient><linearGradient id=\"i\" x1=\"63.446\" x2=\"63.446\" y1=\"29.394\" y2=\"58.054\" gradientUnits=\"userSpaceOnUse\"><stop stop-color=\"#A3C6FF\"></stop><stop offset=\"1\" stop-color=\"#2275FF\"></stop></linearGradient><linearGradient id=\"j\" x1=\"27.954\" x2=\"27.954\" y1=\"58.054\" y2=\"95.627\" gradientUnits=\"userSpaceOnUse\"><stop stop-color=\"#A3C6FF\"></stop><stop offset=\"1\" stop-color=\"#2275FF\"></stop></linearGradient></defs>", 9)])], 8, _hoisted_1$1);
101
+ };
102
+ }
103
+ });
104
+ var MODULE_PATH = "/@vite/client";
105
+ var _onModuleUpdated = createEventHook();
106
+ var _onConfigChanged = createEventHook();
107
+ var _onHmrBeforeUpdate = createEventHook();
108
+ var _onHmrAfterUpdate = createEventHook();
109
+ _onModuleUpdated.on;
110
+ _onConfigChanged.on;
111
+ const onHmrBeforeUpdate = _onHmrBeforeUpdate.on;
112
+ const onHmrAfterUpdate = _onHmrAfterUpdate.on;
113
+ __vitePreload(() => import(
114
+ /* @vite-ignore */
115
+ MODULE_PATH
116
+ ), [], import.meta.url).then((c) => {
117
+ const hmr = c.createHotContext("/");
118
+ hmr.on("vite:beforeUpdate", (update) => {
119
+ _onHmrBeforeUpdate.trigger();
120
+ update.updates.forEach((u) => {
121
+ _onModuleUpdated.trigger(u);
122
+ });
123
+ });
124
+ hmr.on("vite:afterUpdate", () => {
125
+ _onHmrAfterUpdate.trigger();
126
+ });
127
+ hmr.on("pubinfo-pr:config-changed", () => {
128
+ _onConfigChanged.trigger();
129
+ });
130
+ }).catch((e) => {
131
+ console.error("failed to connect to client vite server, you might need to do manual refresh to see the updates");
132
+ console.error(e);
133
+ });
134
+ var timingsState = reactive({
135
+ fullLoad: null,
136
+ pageLoad: null,
137
+ navigation: null,
138
+ hmr: null
139
+ });
140
+ var hmrStartAt = ref(null);
141
+ var navigationCollected = false;
142
+ function sanitizeDuration(value) {
143
+ if (typeof value !== "number" || Number.isNaN(value) || value <= 0) return null;
144
+ return value;
145
+ }
146
+ function collectFromNavigationEntry(entry) {
147
+ timingsState.fullLoad = sanitizeDuration(entry.loadEventEnd);
148
+ timingsState.pageLoad = sanitizeDuration(entry.domContentLoadedEventEnd);
149
+ timingsState.navigation = sanitizeDuration(Math.max(entry.responseEnd - entry.requestStart, 0));
150
+ }
151
+ function collectFromLegacyTiming(timing) {
152
+ const navigationStart = timing.navigationStart ?? 0;
153
+ timingsState.fullLoad = sanitizeDuration(timing.loadEventEnd - navigationStart);
154
+ timingsState.pageLoad = sanitizeDuration(timing.domContentLoadedEventEnd - navigationStart);
155
+ timingsState.navigation = sanitizeDuration(Math.max(timing.responseEnd - timing.requestStart, 0));
156
+ }
157
+ function collectNavigationMetrics(force = false) {
158
+ if (!force && navigationCollected) return;
159
+ if (typeof performance === "undefined") return;
160
+ const entries = performance.getEntriesByType?.("navigation");
161
+ if (entries && entries.length > 0) {
162
+ const entry = entries[entries.length - 1];
163
+ collectFromNavigationEntry(entry);
164
+ navigationCollected = timingsState.fullLoad !== null;
165
+ return;
166
+ }
167
+ const timing = performance.timing;
168
+ if (timing && timing.loadEventEnd > 0) {
169
+ collectFromLegacyTiming(timing);
170
+ navigationCollected = true;
171
+ }
172
+ }
173
+ function setupNavigationCollection() {
174
+ if (typeof window === "undefined") return;
175
+ collectNavigationMetrics();
176
+ window.addEventListener("load", () => {
177
+ requestAnimationFrame(() => {
178
+ collectNavigationMetrics(true);
179
+ });
180
+ }, { once: true });
181
+ }
182
+ function setupHmrTracking() {
183
+ onHmrBeforeUpdate(() => {
184
+ if (typeof performance === "undefined") return;
185
+ hmrStartAt.value = performance.now();
186
+ });
187
+ onHmrAfterUpdate(() => {
188
+ if (typeof performance === "undefined" || hmrStartAt.value == null) return;
189
+ timingsState.hmr = sanitizeDuration(performance.now() - hmrStartAt.value);
190
+ hmrStartAt.value = null;
191
+ });
192
+ }
193
+ setupNavigationCollection();
194
+ setupHmrTracking();
195
+ function formatDuration(duration) {
196
+ if (duration == null) return "--";
197
+ if (duration >= 1e3) return `${(duration / 1e3).toFixed(2)}s`;
198
+ return `${Math.round(duration)}ms`;
199
+ }
200
+ function useDevtoolsPerformance() {
201
+ return {
202
+ timings: readonly(timingsState),
203
+ formatDuration,
204
+ refreshNavigationMetrics: () => collectNavigationMetrics(true)
205
+ };
206
+ }
207
+ function pluralizeByCount(count, singular, plural = `${singular}s`) {
208
+ return `${count} ${count <= 1 ? singular : plural}`;
209
+ }
210
+ var _hoisted_1 = { class: "flex flex-col gap2 m-auto h-full max-w-250 w-full p-5 px-5 md:px-20" };
211
+ var _hoisted_2 = { class: "flex flex-col mt-5 items-center md:mt-20" };
212
+ var _hoisted_3 = { class: "flex mt--10 items-center justify-center" };
213
+ var _hoisted_4 = { class: "mb-6 mt-3 text-center text-sm flex gap-1 flex-wrap cursor-default" };
214
+ var _hoisted_5 = { class: "op40" };
215
+ var _hoisted_6 = { class: "flex gap-2 flex-wrap" };
216
+ var _hoisted_7 = { class: "theme-card-green p-4 flex flex-col flex-auto" };
217
+ var _hoisted_8 = { class: "theme-card-rose p-4 flex flex-col flex-auto" };
218
+ var _hoisted_9 = { class: "min-w-40 theme-card-lime p4 flex flex-col flex-auto" };
219
+ var _hoisted_10 = { class: "min-w-40 theme-card-yellow p4 flex flex-col flex-auto" };
220
+ var _hoisted_11 = { class: "min-w-40 theme-card-purple p4 flex flex-col flex-auto" };
221
+ var _hoisted_12 = { class: "pointer-events-none min-w-40 theme-card-lime p4 flex flex-auto gap-6" };
222
+ var _hoisted_13 = { grid: "~ cols-[auto_auto] gap-x-5 items-center" };
223
+ var _hoisted_14 = { "text-right": "" };
224
+ var _hoisted_15 = { "text-right": "" };
225
+ var _hoisted_16 = { "text-right": "" };
226
+ var _hoisted_17 = { "text-right": "" };
227
+ var pages_default = /* @__PURE__ */ defineComponent({
228
+ name: "OverviewPage",
229
+ __name: "index",
230
+ setup(__props) {
231
+ const { execute, data } = overviewFetch;
232
+ execute();
233
+ const components = computed(() => {
234
+ let result = 0;
235
+ data.value?.components.forEach((comp) => {
236
+ result += comp.count;
237
+ });
238
+ return result;
239
+ });
240
+ const autoImports = computed(() => {
241
+ let result = 0;
242
+ data.value?.functions.forEach((fn) => {
243
+ result += fn.count;
244
+ });
245
+ return result;
246
+ });
247
+ const apiCount = computed(() => data.value?.apiMethodCount || 0);
248
+ const moduleCount = computed(() => data.value?.moduleCount || 0);
249
+ const { timings, formatDuration } = useDevtoolsPerformance();
250
+ return (_ctx, _cache) => {
251
+ const _component_NpmVersionCheck = NpmVersionCheck_default;
252
+ return openBlock(), createBlock(PanelGrids_default, { class: "h-screen w-full flex *:select-none" }, {
253
+ default: withCtx(() => [createBaseVNode("div", _hoisted_1, [
254
+ _cache[12] || (_cache[12] = createBaseVNode("div", { class: "flex-auto" }, null, -1)),
255
+ createBaseVNode("div", _hoisted_2, [createBaseVNode("a", _hoisted_3, [
256
+ createVNode(Logo_default, { size: "64" }),
257
+ _cache[0] || (_cache[0] = createBaseVNode("span", { class: "text-48px font-black mx-2" }, "Dev", -1)),
258
+ _cache[1] || (_cache[1] = createBaseVNode("span", { class: "text-48px font-black text-[#00DC82]" }, "Tools", -1))
259
+ ]), createBaseVNode("button", _hoisted_4, [_cache[2] || (_cache[2] = createBaseVNode("span", { class: "op40" }, " Pubinfo DevTools ", -1)), createBaseVNode("code", _hoisted_5, "v" + toDisplayString(unref(version)), 1)])]),
260
+ createBaseVNode("div", _hoisted_6, [
261
+ createBaseVNode("a", _hoisted_7, [createVNode(Logo_default, { size: "32" }), createVNode(_component_NpmVersionCheck, { "package-name": "pubinfo-pr" })]),
262
+ createBaseVNode("a", _hoisted_8, [_cache[3] || (_cache[3] = createBaseVNode("div", { class: "i-carbon-cloud text-3xl" }, null, -1)), createBaseVNode("div", null, toDisplayString(unref(pluralizeByCount)(unref(apiCount), "api")), 1)]),
263
+ createBaseVNode("a", _hoisted_9, [_cache[4] || (_cache[4] = createBaseVNode("div", { class: "i-carbon-assembly-cluster text-3xl" }, null, -1)), createBaseVNode("div", null, toDisplayString(unref(pluralizeByCount)(unref(components), "component")), 1)]),
264
+ createBaseVNode("a", _hoisted_10, [_cache[5] || (_cache[5] = createBaseVNode("div", { class: "i-carbon-function text-3xl" }, null, -1)), createBaseVNode("div", null, toDisplayString(unref(pluralizeByCount)(unref(autoImports), "import")), 1)]),
265
+ createBaseVNode("a", _hoisted_11, [_cache[6] || (_cache[6] = createBaseVNode("div", { class: "i-carbon-3d-mpr-toggle text-3xl" }, null, -1)), createBaseVNode("div", null, toDisplayString(unref(pluralizeByCount)(unref(moduleCount), "module")), 1)]),
266
+ createBaseVNode("div", _hoisted_12, [_cache[11] || (_cache[11] = createBaseVNode("div", { class: "i-carbon-time-plot flex-none text-3xl" }, null, -1)), createBaseVNode("div", _hoisted_13, [
267
+ _cache[7] || (_cache[7] = createBaseVNode("div", { "text-sm": "" }, " Full load ", -1)),
268
+ createBaseVNode("div", _hoisted_14, toDisplayString(unref(formatDuration)(unref(timings).fullLoad)), 1),
269
+ _cache[8] || (_cache[8] = createBaseVNode("div", { "text-sm": "" }, " Page load ", -1)),
270
+ createBaseVNode("div", _hoisted_15, toDisplayString(unref(formatDuration)(unref(timings).pageLoad)), 1),
271
+ _cache[9] || (_cache[9] = createBaseVNode("div", { "text-sm": "" }, " Navigation ", -1)),
272
+ createBaseVNode("div", _hoisted_16, toDisplayString(unref(formatDuration)(unref(timings).navigation)), 1),
273
+ _cache[10] || (_cache[10] = createBaseVNode("div", { "text-sm": "" }, " HMR ", -1)),
274
+ createBaseVNode("div", _hoisted_17, toDisplayString(unref(formatDuration)(unref(timings).hmr)), 1)
275
+ ])])
276
+ ]),
277
+ _cache[13] || (_cache[13] = createBaseVNode("div", { class: "flex flex-wrap gap-6 mt-5 items-center justify-center" }, null, -1)),
278
+ _cache[14] || (_cache[14] = createBaseVNode("div", { "flex-auto": "" }, null, -1))
279
+ ])]),
280
+ _: 1
281
+ });
282
+ };
283
+ }
284
+ });
285
+ export { pages_default as default };
@@ -0,0 +1,17 @@
1
+
2
+ .update-badge[data-v-61e1d4e4] {
3
+ display: inline-block;
4
+ padding: 0.125rem 0.5rem;
5
+ font-size: 0.75rem;
6
+ border-radius: 0.25rem;
7
+ background-color: rgba(34, 197, 94, 0.1);
8
+ color: rgb(34, 197, 94);
9
+ }
10
+ .latest-badge[data-v-61e1d4e4] {
11
+ display: inline-block;
12
+ padding: 0.125rem 0.5rem;
13
+ font-size: 0.75rem;
14
+ border-radius: 0.25rem;
15
+ background-color: rgba(156, 163, 175, 0.1);
16
+ color: rgb(156, 163, 175);
17
+ }
@@ -1,21 +1,3 @@
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
- }
19
1
  .splitpanes{display:flex;width:100%;height:100%}.splitpanes--vertical{flex-direction:row}.splitpanes--horizontal{flex-direction:column}.splitpanes--dragging .splitpanes__pane,*:has(.splitpanes--dragging){-webkit-user-select:none;user-select:none;pointer-events:none}.splitpanes__pane{width:100%;height:100%;overflow:hidden}.splitpanes--vertical .splitpanes__pane{transition:width .2s ease-out;will-change:width}.splitpanes--horizontal .splitpanes__pane{transition:height .2s ease-out;will-change:height}.splitpanes--dragging .splitpanes__pane{transition:none}.splitpanes__splitter{touch-action:none}.splitpanes--vertical>.splitpanes__splitter{min-width:1px;cursor:col-resize}.splitpanes--horizontal>.splitpanes__splitter{min-height:1px;cursor:row-resize}.default-theme.splitpanes .splitpanes__pane{background-color:#f2f2f2}.default-theme.splitpanes .splitpanes__splitter{background-color:#fff;box-sizing:border-box;position:relative;flex-shrink:0}.default-theme.splitpanes .splitpanes__splitter:before,.default-theme.splitpanes .splitpanes__splitter:after{content:"";position:absolute;top:50%;left:50%;background-color:#00000026;transition:background-color .3s}.default-theme.splitpanes .splitpanes__splitter:hover:before,.default-theme.splitpanes .splitpanes__splitter:hover:after{background-color:#00000040}.default-theme.splitpanes .splitpanes__splitter:first-child{cursor:auto}.default-theme.splitpanes .splitpanes .splitpanes__splitter{z-index:1}.default-theme.splitpanes--vertical>.splitpanes__splitter,.default-theme .splitpanes--vertical>.splitpanes__splitter{width:7px;border-left:1px solid #eee;margin-left:-1px}.default-theme.splitpanes--vertical>.splitpanes__splitter:before,.default-theme.splitpanes--vertical>.splitpanes__splitter:after,.default-theme .splitpanes--vertical>.splitpanes__splitter:before,.default-theme .splitpanes--vertical>.splitpanes__splitter:after{transform:translateY(-50%);width:1px;height:30px}.default-theme.splitpanes--vertical>.splitpanes__splitter:before,.default-theme .splitpanes--vertical>.splitpanes__splitter:before{margin-left:-2px}.default-theme.splitpanes--vertical>.splitpanes__splitter:after,.default-theme .splitpanes--vertical>.splitpanes__splitter:after{margin-left:1px}.default-theme.splitpanes--horizontal>.splitpanes__splitter,.default-theme .splitpanes--horizontal>.splitpanes__splitter{height:7px;border-top:1px solid #eee;margin-top:-1px}.default-theme.splitpanes--horizontal>.splitpanes__splitter:before,.default-theme.splitpanes--horizontal>.splitpanes__splitter:after,.default-theme .splitpanes--horizontal>.splitpanes__splitter:before,.default-theme .splitpanes--horizontal>.splitpanes__splitter:after{transform:translate(-50%);width:30px;height:1px}.default-theme.splitpanes--horizontal>.splitpanes__splitter:before,.default-theme .splitpanes--horizontal>.splitpanes__splitter:before{margin-top:-2px}.default-theme.splitpanes--horizontal>.splitpanes__splitter:after,.default-theme .splitpanes--horizontal>.splitpanes__splitter:after{margin-top:1px}
20
2
 
21
3
  .splitpanes__splitter {