dev-inspector 1.0.4 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -1
- package/lib/init.d.ts +5 -2
- package/lib/init.js +5 -2
- package/lib/integrations/index.d.ts +2 -0
- package/lib/integrations/index.js +7 -0
- package/lib/integrations/jira/adf.d.ts +11 -0
- package/lib/integrations/jira/adf.js +17 -0
- package/lib/integrations/jira/client.d.ts +4 -0
- package/lib/integrations/jira/client.js +113 -0
- package/lib/integrations/jira/errors.d.ts +10 -0
- package/lib/integrations/jira/errors.js +13 -0
- package/lib/integrations/jira/index.d.ts +2 -0
- package/lib/integrations/jira/index.js +8 -0
- package/lib/integrations/types.d.ts +54 -0
- package/lib/integrations/types.js +2 -0
- package/lib/logger/networkLogger.js +41 -11
- package/lib/storage/localStorage.d.ts +30 -0
- package/lib/storage/localStorage.js +166 -0
- package/lib/ui/logList/createLogList.d.ts +2 -0
- package/lib/ui/logList/createLogList.js +67 -0
- package/lib/ui/logList/index.d.ts +2 -0
- package/lib/ui/logList/index.js +5 -0
- package/lib/ui/logList/networkDetails/copy.d.ts +2 -0
- package/lib/ui/logList/networkDetails/copy.js +101 -0
- package/lib/ui/logList/{networkDetails.d.ts → networkDetails/createNetworkDetails.d.ts} +1 -1
- package/lib/ui/logList/networkDetails/createNetworkDetails.js +61 -0
- package/lib/ui/logList/networkDetails/index.d.ts +1 -0
- package/lib/ui/logList/networkDetails/index.js +5 -0
- package/lib/ui/logList/networkDetails/renderValue.d.ts +2 -0
- package/lib/ui/logList/{networkDetails.js → networkDetails/renderValue.js} +32 -32
- package/lib/ui/logList/shared/consoleInspect.d.ts +1 -0
- package/lib/ui/logList/shared/consoleInspect.js +17 -0
- package/lib/ui/logList/shared/index.d.ts +3 -0
- package/lib/ui/logList/shared/index.js +11 -0
- package/lib/ui/logList/shared/time.d.ts +1 -0
- package/lib/ui/logList/shared/time.js +10 -0
- package/lib/ui/logList/shared/tone.d.ts +6 -0
- package/lib/ui/logList/shared/tone.js +36 -0
- package/lib/ui/logList/types.d.ts +6 -0
- package/lib/ui/logList/types.js +2 -0
- package/lib/ui/panel/behavior/setupPanelBehavior.d.ts +4 -1
- package/lib/ui/panel/behavior/setupPanelBehavior.js +48 -1
- package/lib/ui/panel/bindings/bindStorageToPanelView.d.ts +2 -0
- package/lib/ui/panel/bindings/bindStorageToPanelView.js +50 -6
- package/lib/ui/panel/bindings/matchesQuery.d.ts +2 -0
- package/lib/ui/panel/bindings/matchesQuery.js +54 -0
- package/lib/ui/panel/bindings/types.d.ts +2 -0
- package/lib/ui/panel/dom/buildPanelDOM.js +65 -6
- package/lib/ui/panel/dom/constants.d.ts +5 -1
- package/lib/ui/panel/dom/constants.js +35 -20
- package/lib/ui/panel/dom/types.d.ts +6 -0
- package/lib/ui/panel/index.d.ts +4 -0
- package/lib/ui/panel/index.js +8 -3
- package/lib/ui/panel/integrations/icons.d.ts +1 -0
- package/lib/ui/panel/integrations/icons.js +7 -0
- package/lib/ui/panel/integrations/index.d.ts +1 -0
- package/lib/ui/panel/integrations/index.js +5 -0
- package/lib/ui/panel/integrations/jiraDialog.d.ts +6 -0
- package/lib/ui/panel/integrations/jiraDialog.js +234 -0
- package/lib/ui/panel/integrations/screenshot.d.ts +4 -0
- package/lib/ui/panel/integrations/screenshot.js +51 -0
- package/lib/ui/panel/localStorage/createLocalStorageView.d.ts +4 -0
- package/lib/ui/panel/localStorage/createLocalStorageView.js +108 -0
- package/lib/ui/panel/localStorage/index.d.ts +3 -0
- package/lib/ui/panel/localStorage/index.js +7 -0
- package/lib/ui/panel/localStorage/setupLocalStorageSync.d.ts +9 -0
- package/lib/ui/panel/localStorage/setupLocalStorageSync.js +30 -0
- package/lib/ui/panel/localStorage/types.d.ts +6 -0
- package/lib/ui/panel/localStorage/types.js +2 -0
- package/lib/ui/panel/state/createPanelState.d.ts +2 -1
- package/lib/ui/panel/state/createPanelState.js +5 -1
- package/lib/ui/panel/state/types.d.ts +5 -0
- package/lib/ui/panel/theme/applyTheme.d.ts +2 -0
- package/lib/ui/panel/theme/applyTheme.js +6 -0
- package/lib/ui/panel/theme/index.d.ts +3 -0
- package/lib/ui/panel/theme/index.js +9 -0
- package/lib/ui/panel/theme/storage.d.ts +4 -0
- package/lib/ui/panel/theme/storage.js +45 -0
- package/lib/ui/panel/theme/types.d.ts +6 -0
- package/lib/ui/panel/theme/types.js +2 -0
- package/lib/ui/panelStyles.d.ts +1 -1
- package/lib/ui/panelStyles.js +557 -116
- package/lib/ui/shared/copy.d.ts +2 -0
- package/lib/ui/shared/copy.js +101 -0
- package/lib/utils/types.d.ts +3 -0
- package/package.json +1 -1
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.launchMiniConfetti = launchMiniConfetti;
|
|
4
|
+
exports.copyText = copyText;
|
|
5
|
+
function prefersReducedMotion() {
|
|
6
|
+
var _a, _b;
|
|
7
|
+
try {
|
|
8
|
+
const mm = globalThis;
|
|
9
|
+
return ((_b = (_a = mm.matchMedia) === null || _a === void 0 ? void 0 : _a.call(mm, "(prefers-reduced-motion: reduce)")) === null || _b === void 0 ? void 0 : _b.matches) === true;
|
|
10
|
+
}
|
|
11
|
+
catch (_c) {
|
|
12
|
+
return false;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
function rand(min, max) {
|
|
16
|
+
return min + Math.random() * (max - min);
|
|
17
|
+
}
|
|
18
|
+
function launchMiniConfetti(anchor) {
|
|
19
|
+
if (prefersReducedMotion())
|
|
20
|
+
return;
|
|
21
|
+
if (typeof document === "undefined")
|
|
22
|
+
return;
|
|
23
|
+
const rect = anchor.getBoundingClientRect();
|
|
24
|
+
const cx = rect.left + rect.width / 2;
|
|
25
|
+
const cy = rect.top + rect.height / 2;
|
|
26
|
+
const root = document.createElement("div");
|
|
27
|
+
root.style.position = "fixed";
|
|
28
|
+
root.style.left = "0";
|
|
29
|
+
root.style.top = "0";
|
|
30
|
+
root.style.width = "0";
|
|
31
|
+
root.style.height = "0";
|
|
32
|
+
root.style.pointerEvents = "none";
|
|
33
|
+
root.style.zIndex = "2147483647";
|
|
34
|
+
document.body.append(root);
|
|
35
|
+
const colors = ["#a7ff00", "#7c5cff", "#00c4ff", "#ff9030", "#ef4444"];
|
|
36
|
+
const n = 14;
|
|
37
|
+
const duration = 520;
|
|
38
|
+
for (let i = 0; i < n; i += 1) {
|
|
39
|
+
const p = document.createElement("span");
|
|
40
|
+
const size = Math.round(rand(3, 6));
|
|
41
|
+
p.style.position = "fixed";
|
|
42
|
+
p.style.left = `${cx}px`;
|
|
43
|
+
p.style.top = `${cy}px`;
|
|
44
|
+
p.style.width = `${size}px`;
|
|
45
|
+
p.style.height = `${size}px`;
|
|
46
|
+
p.style.borderRadius = Math.random() < 0.35 ? "999px" : "2px";
|
|
47
|
+
p.style.background = colors[i % colors.length];
|
|
48
|
+
p.style.opacity = "1";
|
|
49
|
+
p.style.willChange = "transform, opacity";
|
|
50
|
+
root.append(p);
|
|
51
|
+
const angle = rand(0, Math.PI * 2);
|
|
52
|
+
const dist = rand(18, 46);
|
|
53
|
+
const dx = Math.cos(angle) * dist;
|
|
54
|
+
const dy = Math.sin(angle) * dist + rand(8, 16);
|
|
55
|
+
const rot = rand(-220, 220);
|
|
56
|
+
const delay = Math.round(rand(0, 60));
|
|
57
|
+
try {
|
|
58
|
+
const anim = p.animate([
|
|
59
|
+
{ transform: `translate(-50%, -50%) translate(0px, 0px) rotate(0deg) scale(1)`, opacity: 1 },
|
|
60
|
+
{ transform: `translate(-50%, -50%) translate(${dx}px, ${dy}px) rotate(${rot}deg) scale(0.9)`, opacity: 0 },
|
|
61
|
+
], { duration, delay, easing: "cubic-bezier(0.2, 0.7, 0.2, 1)", fill: "forwards" });
|
|
62
|
+
anim.addEventListener("finish", () => p.remove());
|
|
63
|
+
}
|
|
64
|
+
catch (_a) {
|
|
65
|
+
globalThis.setTimeout(() => p.remove(), duration + delay + 50);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
globalThis.setTimeout(() => root.remove(), duration + 120);
|
|
69
|
+
}
|
|
70
|
+
async function copyText(text) {
|
|
71
|
+
var _a, _b;
|
|
72
|
+
try {
|
|
73
|
+
const nav = globalThis;
|
|
74
|
+
const fn = (_b = (_a = nav.navigator) === null || _a === void 0 ? void 0 : _a.clipboard) === null || _b === void 0 ? void 0 : _b.writeText;
|
|
75
|
+
if (typeof fn === "function") {
|
|
76
|
+
await fn(text);
|
|
77
|
+
return true;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
catch (_c) {
|
|
81
|
+
void 0;
|
|
82
|
+
}
|
|
83
|
+
try {
|
|
84
|
+
if (typeof document === "undefined")
|
|
85
|
+
return false;
|
|
86
|
+
const ta = document.createElement("textarea");
|
|
87
|
+
ta.value = text;
|
|
88
|
+
ta.setAttribute("readonly", "true");
|
|
89
|
+
ta.style.position = "fixed";
|
|
90
|
+
ta.style.left = "-9999px";
|
|
91
|
+
ta.style.top = "0";
|
|
92
|
+
document.body.append(ta);
|
|
93
|
+
ta.select();
|
|
94
|
+
const ok = document.execCommand("copy");
|
|
95
|
+
ta.remove();
|
|
96
|
+
return ok;
|
|
97
|
+
}
|
|
98
|
+
catch (_d) {
|
|
99
|
+
return false;
|
|
100
|
+
}
|
|
101
|
+
}
|
package/lib/utils/types.d.ts
CHANGED
|
@@ -17,7 +17,10 @@ export type NetworkLogEntry = {
|
|
|
17
17
|
status?: number;
|
|
18
18
|
durationMs?: number;
|
|
19
19
|
requestBody?: unknown;
|
|
20
|
+
requestBodyTruncated?: boolean;
|
|
20
21
|
responseBody?: unknown;
|
|
22
|
+
responseBodyTruncated?: boolean;
|
|
23
|
+
bodyMaxLength?: number;
|
|
21
24
|
message: string;
|
|
22
25
|
};
|
|
23
26
|
export type LogEntry = ConsoleLogEntry | NetworkLogEntry;
|