react-reinspect 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +198 -26
- package/dist/lib/index.cjs +1 -1
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/index.js +284 -268
- package/dist/lib/injectStyles.d.ts +2 -0
- package/dist/lib/injectStyles.d.ts.map +1 -0
- package/dist/plugin/reinspectAutoDiscoverPlugin.d.ts +11 -0
- package/dist/plugin/reinspectAutoDiscoverPlugin.d.ts.map +1 -0
- package/dist/plugin/reinspectAutoDiscoverPlugin.js +306 -0
- package/package.json +16 -9
package/dist/lib/index.js
CHANGED
|
@@ -1,18 +1,31 @@
|
|
|
1
1
|
import { createContext as e, useCallback as t, useContext as n, useEffect as r, useId as i, useMemo as a, useRef as o, useState as s } from "react";
|
|
2
2
|
import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
3
3
|
import { createPortal as d } from "react-dom";
|
|
4
|
+
//#region src/reinspect/reinspect.css?inline
|
|
5
|
+
var f = ".reinspect-shell{border-radius:14px;transition:outline-color .12s;position:relative}.reinspect-shell[data-reinspect-active=true]{outline:2px dashed var(--reinspect-color);outline-offset:2px}.reinspect-content{border-radius:inherit}.reinspect-name-badge{z-index:calc(var(--reinspect-z-base) + 5);letter-spacing:.04em;color:#0f172a;background:color-mix(in srgb, var(--reinspect-color) 25%, white);border:1px solid color-mix(in srgb, var(--reinspect-color) 45%, white);pointer-events:none;white-space:nowrap;border-radius:999px;padding:5px 8px;font-size:11px;line-height:1;position:absolute;top:-14px;left:10px}.reinspect-menu{z-index:2147483647;background:#fff;border:1px solid #cbd5e1;border-radius:12px;width:min(300px,100vw - 24px);max-height:min(420px,70vh);padding:12px;position:fixed;overflow:auto;box-shadow:0 20px 25px -5px #0f172a33,0 8px 10px -6px #0f172a33}.reinspect-menu-title{color:#0f172a;margin:0 0 10px;font-size:13px;font-weight:600}.reinspect-menu-component-setting{color:#1e293b;grid-template-columns:1fr auto;align-items:center;gap:8px;margin-bottom:8px;font-size:12px;display:grid}.reinspect-menu-component-setting input[type=checkbox]{width:15px;height:15px}.reinspect-setting-note{color:#64748b;margin:0 0 10px;font-size:11px}.reinspect-submenu{grid-template-columns:1fr 1fr;gap:6px;margin-bottom:10px;display:grid}.reinspect-submenu button{color:#1e293b;cursor:pointer;background:#f8fafc;border:1px solid #cbd5e1;border-radius:8px;padding:6px 8px;font-size:12px}.reinspect-submenu button[data-state=active]{background:#e0f2fe;border-color:#0284c7}.reinspect-menu-grid{gap:9px;display:grid}.reinspect-menu-filter{margin-bottom:10px;position:relative}.reinspect-menu-filter-icon{color:#64748b;pointer-events:none;width:14px;height:14px;position:absolute;top:50%;left:9px;transform:translateY(-50%)}.reinspect-menu-filter-icon svg{width:100%;height:100%;display:block}.reinspect-menu-filter input{border:1px solid #cbd5e1;border-radius:8px;width:100%;padding:5px 7px 5px 30px;font-size:12px}.reinspect-menu-empty-state{color:#64748b;margin:8px 0 0;font-size:12px}.reinspect-field{gap:4px;display:grid}.reinspect-field label{color:#334155;font-size:12px}.reinspect-inline-controls{grid-template-columns:1fr auto;gap:6px;display:grid}.reinspect-inline-controls input,.reinspect-inline-controls button,.reinspect-inline-controls output{font-size:12px}.reinspect-inline-controls input[type=number],.reinspect-inline-controls input[type=text]{border:1px solid #cbd5e1;border-radius:8px;width:100%;padding:5px 7px}.reinspect-inline-controls button{color:#1e293b;cursor:pointer;background:#f8fafc;border:1px solid #cbd5e1;border-radius:8px;padding:5px 7px}.reinspect-inline-controls button:disabled{opacity:.45;cursor:default}.reinspect-opacity-controls{grid-template-columns:1fr auto auto;align-items:center}.reinspect-opacity-controls output{color:#475569;text-align:right;min-width:36px}.reinspect-props-panel{gap:8px;display:grid}.reinspect-props-submenu{grid-template-columns:1fr 1fr;gap:6px;display:grid}.reinspect-props-submenu button{color:#1e293b;cursor:pointer;background:#f8fafc;border:1px solid #cbd5e1;border-radius:8px;padding:6px 8px;font-size:12px}.reinspect-props-submenu button[data-state=active]{background:#e0f2fe;border-color:#0284c7}.reinspect-props-panel label{color:#334155;font-size:12px}.reinspect-props-table{gap:6px;display:grid}.reinspect-props-header{color:#475569;text-transform:uppercase;letter-spacing:.04em;grid-template-columns:.85fr 1.15fr;gap:8px;font-size:11px;display:grid}.reinspect-props-row{border:1px solid #e2e8f0;border-radius:8px;grid-template-columns:.85fr 1.15fr;align-items:start;gap:8px;padding:6px;display:grid}.reinspect-prop-key{color:#0f172a;word-break:break-word;font-size:12px}.reinspect-prop-cell{min-width:0}.reinspect-prop-cell code{color:#0f172a;word-break:break-word;font-size:11px}.reinspect-prop-missing{color:#94a3b8;font-size:11px}.reinspect-prop-scalar{gap:4px;display:grid}.reinspect-prop-actions{flex-wrap:wrap;gap:6px;margin-top:6px;display:flex}.reinspect-prop-scalar button,.reinspect-prop-function button,.reinspect-prop-tree summary button{color:#1e293b;cursor:pointer;background:#f8fafc;border:1px solid #cbd5e1;border-radius:7px;justify-self:start;padding:3px 6px;font-size:11px}.reinspect-prop-actions button,.reinspect-prop-json-preview button{color:#1e293b;cursor:pointer;background:#f8fafc;border:1px solid #cbd5e1;border-radius:7px;padding:3px 6px;font-size:11px}.reinspect-prop-tree{background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px;padding:5px}.reinspect-prop-tree summary{cursor:pointer;color:#1e293b;justify-content:space-between;align-items:center;gap:8px;font-size:11px;display:flex}.reinspect-prop-tree-children{gap:6px;margin-top:6px;display:grid}.reinspect-prop-tree-row{grid-template-columns:.8fr 1.2fr;align-items:start;gap:6px;display:grid}.reinspect-prop-tree-row>code{color:#334155;word-break:break-word;font-size:10px}.reinspect-prop-function{gap:4px;display:grid}.reinspect-prop-function pre{white-space:pre-wrap;word-break:break-word;background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px;margin:0;padding:6px;font-size:11px;line-height:1.3}.reinspect-prop-json-preview{gap:6px;margin-top:6px;display:grid}.reinspect-prop-json-preview pre{white-space:pre-wrap;word-break:break-word;background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px;max-height:180px;margin:0;padding:6px;font-size:11px;line-height:1.3;overflow:auto}.reinspect-modal-backdrop{z-index:2147483647;background:#0f172a73;place-items:center;padding:20px;display:grid;position:fixed;inset:0}.reinspect-modal{background:#fff;border:1px solid #cbd5e1;border-radius:12px;gap:8px;width:min(560px,100%);padding:12px;display:grid;box-shadow:0 24px 28px -12px #0f172a40,0 10px 16px -10px #0f172a38}.reinspect-modal textarea,.reinspect-props-panel textarea{resize:vertical;border:1px solid #cbd5e1;border-radius:8px;width:100%;padding:8px;font-family:IBM Plex Mono,SFMono-Regular,monospace;font-size:12px}.reinspect-error{color:#b91c1c;margin:0;font-size:12px}.reinspect-floating-toggle{z-index:2147483647;color:#f8fafc;letter-spacing:.03em;cursor:pointer;background:linear-gradient(120deg,#0f172a,#334155);border:none;border-radius:999px;padding:10px 15px;font-size:13px;font-weight:600;position:fixed;bottom:18px;right:18px;box-shadow:0 10px 18px #0f172a47}.reinspect-floating-root{z-index:2147483645;position:fixed;bottom:18px;right:18px}.reinspect-floating-root .reinspect-floating-toggle{position:static}.reinspect-settings-menu{background:#fff;border:1px solid #cbd5e1;border-radius:12px;gap:10px;width:min(360px,100vw - 24px);max-height:min(540px,75vh);padding:12px;display:grid;position:absolute;bottom:calc(100% + 10px);right:0;overflow:auto;box-shadow:0 24px 28px -12px #0f172a40,0 10px 16px -10px #0f172a38}.reinspect-settings-title{color:#0f172a;margin:0;font-size:13px;font-weight:700}.reinspect-settings-toggle-row{color:#1e293b;grid-template-columns:1fr auto;align-items:center;gap:8px;font-size:12px;display:grid}.reinspect-settings-select-row{gap:6px;font-size:12px;display:grid}.reinspect-settings-select-row select{color:#0f172a;background:#fff;border:1px solid #cbd5e1;border-radius:8px;width:100%;padding:6px 8px;font-size:12px}.reinspect-settings-toggle-label{line-height:1.35}.reinspect-settings-toggle-row input[type=checkbox]{width:16px;height:16px}.reinspect-settings-divider{background:#e2e8f0;height:1px}.reinspect-setting-block{gap:8px;display:grid}.reinspect-apply-button{color:#f8fafc;cursor:pointer;background:#0f172a;border:1px solid #0f172a;border-radius:8px;padding:6px 8px;font-size:12px;font-weight:600}.reinspect-apply-button:disabled{opacity:.4;cursor:default}.reinspect-setting-header{grid-template-columns:1fr auto;align-items:start;gap:8px;display:grid}.reinspect-setting-name{color:#0f172a;letter-spacing:.02em;margin:0;font-size:12px;font-weight:700}.reinspect-setting-short-description{color:#475569;margin:3px 0 0;font-size:12px;line-height:1.35}.reinspect-tooltip-host{display:inline-flex;position:relative}.reinspect-tooltip-trigger{color:#334155;cursor:help;background:#f8fafc;border:1px solid #cbd5e1;border-radius:999px;justify-content:center;align-items:center;width:20px;height:20px;padding:0;font-size:12px;font-weight:700;display:inline-flex}.reinspect-tooltip-content{color:#f8fafc;opacity:0;pointer-events:none;background:#0f172a;border:1px solid #cbd5e1;border-radius:8px;width:240px;padding:8px;font-size:11px;line-height:1.4;transition:opacity .12s;position:absolute;top:calc(100% + 6px);right:0}.reinspect-tooltip-host:hover .reinspect-tooltip-content,.reinspect-tooltip-host:focus-within .reinspect-tooltip-content{opacity:1;pointer-events:auto}.reinspect-setting-subheading{color:#334155;margin:2px 0 0;font-size:12px;font-weight:600}.reinspect-setting-empty-state{color:#64748b;margin:0;font-size:12px}.reinspect-component-settings-list{gap:6px;display:grid}.reinspect-component-setting-row{color:#1e293b;background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px;grid-template-columns:1fr auto;align-items:center;gap:8px;padding:6px 8px;font-size:12px;display:grid}.reinspect-component-setting-row input[type=checkbox]{width:15px;height:15px}", p = "reinspect-runtime-styles";
|
|
6
|
+
function m() {
|
|
7
|
+
return typeof document > "u" ? null : document;
|
|
8
|
+
}
|
|
9
|
+
function h(e) {
|
|
10
|
+
if (!e) return;
|
|
11
|
+
let t = m();
|
|
12
|
+
if (!t || t.getElementById(p)) return;
|
|
13
|
+
let n = t.createElement("style");
|
|
14
|
+
n.id = p, n.textContent = e, (t.head ?? t.documentElement).appendChild(n);
|
|
15
|
+
}
|
|
16
|
+
//#endregion
|
|
4
17
|
//#region src/reinspect/store.ts
|
|
5
|
-
var
|
|
18
|
+
var g = e(null);
|
|
6
19
|
//#endregion
|
|
7
20
|
//#region src/reinspect/useReinspect.ts
|
|
8
|
-
function
|
|
9
|
-
let e = n(
|
|
21
|
+
function _() {
|
|
22
|
+
let e = n(g);
|
|
10
23
|
if (!e) throw Error("useReinspect must be used within ReinspectProvider");
|
|
11
24
|
return e;
|
|
12
25
|
}
|
|
13
26
|
//#endregion
|
|
14
27
|
//#region src/reinspect/constants.ts
|
|
15
|
-
var
|
|
28
|
+
var v = [
|
|
16
29
|
"backgroundColor",
|
|
17
30
|
"color",
|
|
18
31
|
"fontSize",
|
|
@@ -25,18 +38,18 @@ var m = [
|
|
|
25
38
|
"width",
|
|
26
39
|
"height",
|
|
27
40
|
"gap"
|
|
28
|
-
],
|
|
41
|
+
], y = [
|
|
29
42
|
"#f97316",
|
|
30
43
|
"#2563eb",
|
|
31
44
|
"#16a34a",
|
|
32
45
|
"#db2777",
|
|
33
46
|
"#ca8a04",
|
|
34
47
|
"#0f766e"
|
|
35
|
-
],
|
|
48
|
+
], b = new Set([
|
|
36
49
|
"backgroundColor",
|
|
37
50
|
"color",
|
|
38
51
|
"borderColor"
|
|
39
|
-
]),
|
|
52
|
+
]), ee = new Set([
|
|
40
53
|
"fontSize",
|
|
41
54
|
"padding",
|
|
42
55
|
"margin",
|
|
@@ -45,69 +58,69 @@ var m = [
|
|
|
45
58
|
"width",
|
|
46
59
|
"height",
|
|
47
60
|
"gap"
|
|
48
|
-
]),
|
|
61
|
+
]), x = 2147483e3, S = "reinspect.inspectMode", C = [
|
|
49
62
|
"wrapped",
|
|
50
63
|
"first-party",
|
|
51
64
|
"all"
|
|
52
|
-
],
|
|
65
|
+
], w = [
|
|
53
66
|
"attempts",
|
|
54
67
|
"commits",
|
|
55
68
|
"both"
|
|
56
69
|
];
|
|
57
|
-
function
|
|
70
|
+
function T() {
|
|
58
71
|
return !1;
|
|
59
72
|
}
|
|
60
|
-
function
|
|
61
|
-
return typeof e == "string" &&
|
|
73
|
+
function E(e) {
|
|
74
|
+
return typeof e == "string" && C.includes(e);
|
|
62
75
|
}
|
|
63
|
-
function
|
|
64
|
-
return typeof e == "string" &&
|
|
76
|
+
function D(e) {
|
|
77
|
+
return typeof e == "string" && w.includes(e);
|
|
65
78
|
}
|
|
66
|
-
function
|
|
79
|
+
function O() {
|
|
67
80
|
if (!(typeof window > "u")) try {
|
|
68
|
-
let e = window.sessionStorage.getItem(
|
|
69
|
-
return
|
|
81
|
+
let e = window.sessionStorage.getItem(S);
|
|
82
|
+
return E(e) ? e : void 0;
|
|
70
83
|
} catch {
|
|
71
84
|
return;
|
|
72
85
|
}
|
|
73
86
|
}
|
|
74
|
-
function
|
|
75
|
-
return
|
|
87
|
+
function te(e) {
|
|
88
|
+
return O() || (E(e) ? e : "wrapped");
|
|
76
89
|
}
|
|
77
|
-
function
|
|
90
|
+
function k(e) {
|
|
78
91
|
if (!(typeof window > "u")) try {
|
|
79
|
-
window.sessionStorage.setItem(
|
|
92
|
+
window.sessionStorage.setItem(S, e);
|
|
80
93
|
} catch {}
|
|
81
94
|
}
|
|
82
|
-
function
|
|
95
|
+
function ne() {
|
|
83
96
|
if (!(typeof window > "u")) try {
|
|
84
97
|
window.location.reload();
|
|
85
98
|
} catch {}
|
|
86
99
|
}
|
|
87
|
-
function
|
|
88
|
-
let t = e.enabled ??
|
|
100
|
+
function A(e = {}) {
|
|
101
|
+
let t = e.enabled ?? T(), n = e.editableProps && e.editableProps.length > 0 ? e.editableProps : v, r = e.palette && e.palette.length > 0 ? e.palette : y;
|
|
89
102
|
return {
|
|
90
103
|
enabled: t,
|
|
91
104
|
startActive: e.startActive ?? !0,
|
|
92
105
|
showFloatingToggle: e.showFloatingToggle ?? t,
|
|
93
|
-
inspectMode:
|
|
106
|
+
inspectMode: te(e.inspectMode),
|
|
94
107
|
editableProps: n,
|
|
95
108
|
palette: r,
|
|
96
|
-
zIndexBase: e.zIndexBase ??
|
|
109
|
+
zIndexBase: e.zIndexBase ?? x,
|
|
97
110
|
shouldCountRenders: e.shouldCountRenders ?? !1,
|
|
98
111
|
countRendersForComponents: e.countRendersForComponents ?? [],
|
|
99
|
-
renderCaptureMode:
|
|
112
|
+
renderCaptureMode: D(e.renderCaptureMode) ? e.renderCaptureMode : "attempts"
|
|
100
113
|
};
|
|
101
114
|
}
|
|
102
|
-
function
|
|
115
|
+
function j(e) {
|
|
103
116
|
let t = 0;
|
|
104
117
|
for (let n = 0; n < e.length; n += 1) t = (t << 5) - t + e.charCodeAt(n), t |= 0;
|
|
105
118
|
return Math.abs(t);
|
|
106
119
|
}
|
|
107
|
-
function
|
|
108
|
-
return t.length === 0 ?
|
|
120
|
+
function M(e, t) {
|
|
121
|
+
return t.length === 0 ? y[0] : t[j(e) % t.length];
|
|
109
122
|
}
|
|
110
|
-
function
|
|
123
|
+
function re(e, t) {
|
|
111
124
|
if (!e) return {};
|
|
112
125
|
let n = {};
|
|
113
126
|
for (let r of t) {
|
|
@@ -116,7 +129,7 @@ function te(e, t) {
|
|
|
116
129
|
}
|
|
117
130
|
return n;
|
|
118
131
|
}
|
|
119
|
-
function
|
|
132
|
+
function ie(e) {
|
|
120
133
|
if (!e) return "#1f2937";
|
|
121
134
|
if (/^#[0-9a-fA-F]{6}$/.test(e)) return e;
|
|
122
135
|
if (/^#[0-9a-fA-F]{3}$/.test(e)) {
|
|
@@ -125,21 +138,21 @@ function ne(e) {
|
|
|
125
138
|
}
|
|
126
139
|
return "#1f2937";
|
|
127
140
|
}
|
|
128
|
-
function
|
|
141
|
+
function ae(e) {
|
|
129
142
|
let t = Number(e);
|
|
130
143
|
if (Number.isFinite(t)) return t;
|
|
131
144
|
}
|
|
132
145
|
//#endregion
|
|
133
146
|
//#region src/reinspect/context.tsx
|
|
134
|
-
var
|
|
135
|
-
function
|
|
147
|
+
var N = "Capture rerenders and show totals next to component badges.", oe = "Tracks every rerender after initial mount for wrapped components. Use this toggle to capture for all components, or enable a specific component from its right-click inspector menu.", se = "Choose whether to count render attempts, committed renders, or both.", ce = "Render attempts track render-phase executions (includes Strict Mode extra passes). Committed renders track completed DOM commits. Both shows both counters together.", le = "Controls which components are automatically discoverable by Reinspect.", P = "Only wrapped components uses explicit withReinspect wrappers only. All 1st-party components auto-discovers components under your source tree. All components also attempts dependency components (with safety skips).";
|
|
148
|
+
function F(e) {
|
|
136
149
|
let t = {};
|
|
137
150
|
for (let n of e) t[n] = !0;
|
|
138
151
|
return t;
|
|
139
152
|
}
|
|
140
|
-
function
|
|
141
|
-
let r = a(() =>
|
|
142
|
-
|
|
153
|
+
function I({ children: e, config: n }) {
|
|
154
|
+
let r = a(() => A(n), [n]), [i, o] = s(r.startActive), [c] = s(r.inspectMode), [d, f] = s(r.inspectMode), [p, m] = s(r.shouldCountRenders), [h, _] = s(r.renderCaptureMode), [v, y] = s(() => F(r.countRendersForComponents)), [b, ee] = s({}), x = t((e, t, n) => {
|
|
155
|
+
ee((r) => {
|
|
143
156
|
let i = { ...r[e] ?? {} };
|
|
144
157
|
if (n == null || n === "" ? delete i[t] : i[t] = n, Object.keys(i).length === 0) {
|
|
145
158
|
let t = { ...r };
|
|
@@ -150,7 +163,7 @@ function se({ children: e, config: n }) {
|
|
|
150
163
|
[e]: i
|
|
151
164
|
};
|
|
152
165
|
});
|
|
153
|
-
}, []),
|
|
166
|
+
}, []), S = t((e, t) => {
|
|
154
167
|
y((n) => {
|
|
155
168
|
if (t) return {
|
|
156
169
|
...n,
|
|
@@ -160,51 +173,51 @@ function se({ children: e, config: n }) {
|
|
|
160
173
|
let r = { ...n };
|
|
161
174
|
return delete r[e], r;
|
|
162
175
|
});
|
|
163
|
-
}, []),
|
|
164
|
-
|
|
165
|
-
}, [
|
|
176
|
+
}, []), C = t((e) => p || !!v[e], [p, v]), w = d !== c, T = t(() => {
|
|
177
|
+
w && (k(d), ne());
|
|
178
|
+
}, [w, d]), E = t((e) => M(e, r.palette), [r.palette]), D = a(() => ({
|
|
166
179
|
config: r,
|
|
167
180
|
isActive: r.enabled && i,
|
|
168
181
|
setIsActive: o,
|
|
169
182
|
inspectMode: c,
|
|
170
183
|
pendingInspectMode: d,
|
|
171
|
-
setPendingInspectMode:
|
|
172
|
-
hasPendingInspectModeChange:
|
|
173
|
-
applyInspectMode:
|
|
174
|
-
shouldCountRenders:
|
|
175
|
-
setShouldCountRenders:
|
|
176
|
-
renderCaptureMode:
|
|
184
|
+
setPendingInspectMode: f,
|
|
185
|
+
hasPendingInspectModeChange: w,
|
|
186
|
+
applyInspectMode: T,
|
|
187
|
+
shouldCountRenders: p,
|
|
188
|
+
setShouldCountRenders: m,
|
|
189
|
+
renderCaptureMode: h,
|
|
177
190
|
setRenderCaptureMode: _,
|
|
178
191
|
renderCountComponents: v,
|
|
179
|
-
setRenderCountingForComponent:
|
|
180
|
-
isRenderCountingEnabledFor:
|
|
192
|
+
setRenderCountingForComponent: S,
|
|
193
|
+
isRenderCountingEnabledFor: C,
|
|
181
194
|
overrides: b,
|
|
182
|
-
updateOverride:
|
|
183
|
-
getBorderColor:
|
|
195
|
+
updateOverride: x,
|
|
196
|
+
getBorderColor: E
|
|
184
197
|
}), [
|
|
185
198
|
r,
|
|
186
199
|
i,
|
|
187
200
|
c,
|
|
188
201
|
d,
|
|
189
|
-
|
|
202
|
+
f,
|
|
203
|
+
w,
|
|
190
204
|
T,
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
g,
|
|
205
|
+
p,
|
|
206
|
+
h,
|
|
194
207
|
v,
|
|
208
|
+
S,
|
|
195
209
|
C,
|
|
196
|
-
w,
|
|
197
210
|
b,
|
|
198
|
-
|
|
199
|
-
|
|
211
|
+
x,
|
|
212
|
+
E
|
|
200
213
|
]);
|
|
201
|
-
return /* @__PURE__ */ u(
|
|
202
|
-
value:
|
|
203
|
-
children: [e, r.enabled && r.showFloatingToggle ? /* @__PURE__ */ l(
|
|
214
|
+
return /* @__PURE__ */ u(g.Provider, {
|
|
215
|
+
value: D,
|
|
216
|
+
children: [e, r.enabled && r.showFloatingToggle ? /* @__PURE__ */ l(L, {}) : null]
|
|
204
217
|
});
|
|
205
218
|
}
|
|
206
|
-
function
|
|
207
|
-
let { config: e, isActive: t, setIsActive: n, inspectMode: i, pendingInspectMode: a, setPendingInspectMode: c, hasPendingInspectModeChange: d, applyInspectMode: f, shouldCountRenders:
|
|
219
|
+
function L() {
|
|
220
|
+
let { config: e, isActive: t, setIsActive: n, inspectMode: i, pendingInspectMode: a, setPendingInspectMode: c, hasPendingInspectModeChange: d, applyInspectMode: f, shouldCountRenders: p, setShouldCountRenders: m, renderCaptureMode: h, setRenderCaptureMode: g } = _(), [v, y] = s(!1), b = o(null);
|
|
208
221
|
return r(() => {
|
|
209
222
|
if (!v) return;
|
|
210
223
|
let e = (e) => {
|
|
@@ -261,7 +274,7 @@ function F() {
|
|
|
261
274
|
children: "INSPECT_MODE"
|
|
262
275
|
}), /* @__PURE__ */ l("p", {
|
|
263
276
|
className: "reinspect-setting-short-description",
|
|
264
|
-
children:
|
|
277
|
+
children: le
|
|
265
278
|
})] }), /* @__PURE__ */ u("span", {
|
|
266
279
|
className: "reinspect-tooltip-host",
|
|
267
280
|
children: [/* @__PURE__ */ l("button", {
|
|
@@ -272,7 +285,7 @@ function F() {
|
|
|
272
285
|
}), /* @__PURE__ */ l("span", {
|
|
273
286
|
className: "reinspect-tooltip-content",
|
|
274
287
|
role: "tooltip",
|
|
275
|
-
children:
|
|
288
|
+
children: P
|
|
276
289
|
})]
|
|
277
290
|
})]
|
|
278
291
|
}),
|
|
@@ -286,7 +299,7 @@ function F() {
|
|
|
286
299
|
value: a,
|
|
287
300
|
onChange: (e) => {
|
|
288
301
|
let t = e.currentTarget.value;
|
|
289
|
-
|
|
302
|
+
E(t) && c(t);
|
|
290
303
|
},
|
|
291
304
|
children: [
|
|
292
305
|
/* @__PURE__ */ l("option", {
|
|
@@ -333,7 +346,7 @@ function F() {
|
|
|
333
346
|
children: "SHOULD_COUNT_RENDERS"
|
|
334
347
|
}), /* @__PURE__ */ l("p", {
|
|
335
348
|
className: "reinspect-setting-short-description",
|
|
336
|
-
children:
|
|
349
|
+
children: N
|
|
337
350
|
})] }), /* @__PURE__ */ u("span", {
|
|
338
351
|
className: "reinspect-tooltip-host",
|
|
339
352
|
children: [/* @__PURE__ */ l("button", {
|
|
@@ -344,7 +357,7 @@ function F() {
|
|
|
344
357
|
}), /* @__PURE__ */ l("span", {
|
|
345
358
|
className: "reinspect-tooltip-content",
|
|
346
359
|
role: "tooltip",
|
|
347
|
-
children:
|
|
360
|
+
children: oe
|
|
348
361
|
})]
|
|
349
362
|
})]
|
|
350
363
|
}),
|
|
@@ -356,8 +369,8 @@ function F() {
|
|
|
356
369
|
}), /* @__PURE__ */ l("input", {
|
|
357
370
|
"data-testid": "reinspect-setting-should-count-renders",
|
|
358
371
|
type: "checkbox",
|
|
359
|
-
checked:
|
|
360
|
-
onChange: (e) =>
|
|
372
|
+
checked: p,
|
|
373
|
+
onChange: (e) => m(e.currentTarget.checked)
|
|
361
374
|
})]
|
|
362
375
|
}),
|
|
363
376
|
/* @__PURE__ */ u("header", {
|
|
@@ -367,7 +380,7 @@ function F() {
|
|
|
367
380
|
children: "RENDER_CAPTURE_MODE"
|
|
368
381
|
}), /* @__PURE__ */ l("p", {
|
|
369
382
|
className: "reinspect-setting-short-description",
|
|
370
|
-
children:
|
|
383
|
+
children: se
|
|
371
384
|
})] }), /* @__PURE__ */ u("span", {
|
|
372
385
|
className: "reinspect-tooltip-host",
|
|
373
386
|
children: [/* @__PURE__ */ l("button", {
|
|
@@ -378,7 +391,7 @@ function F() {
|
|
|
378
391
|
}), /* @__PURE__ */ l("span", {
|
|
379
392
|
className: "reinspect-tooltip-content",
|
|
380
393
|
role: "tooltip",
|
|
381
|
-
children:
|
|
394
|
+
children: ce
|
|
382
395
|
})]
|
|
383
396
|
})]
|
|
384
397
|
}),
|
|
@@ -389,10 +402,10 @@ function F() {
|
|
|
389
402
|
children: "Capture mode"
|
|
390
403
|
}), /* @__PURE__ */ u("select", {
|
|
391
404
|
"data-testid": "reinspect-setting-render-capture-mode",
|
|
392
|
-
value:
|
|
405
|
+
value: h,
|
|
393
406
|
onChange: (e) => {
|
|
394
407
|
let t = e.currentTarget.value;
|
|
395
|
-
|
|
408
|
+
D(t) && g(t);
|
|
396
409
|
},
|
|
397
410
|
children: [
|
|
398
411
|
/* @__PURE__ */ l("option", {
|
|
@@ -418,25 +431,25 @@ function F() {
|
|
|
418
431
|
}
|
|
419
432
|
//#endregion
|
|
420
433
|
//#region src/reinspect/propsInspector.ts
|
|
421
|
-
var
|
|
422
|
-
function
|
|
434
|
+
var R = 4, z = 40, B = 40, V = "__reinspect_placeholder__";
|
|
435
|
+
function H(e, t) {
|
|
423
436
|
return {
|
|
424
|
-
[
|
|
437
|
+
[V]: e,
|
|
425
438
|
display: t
|
|
426
439
|
};
|
|
427
440
|
}
|
|
428
|
-
function
|
|
441
|
+
function U(e) {
|
|
429
442
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
430
443
|
}
|
|
431
|
-
function
|
|
432
|
-
if (!
|
|
444
|
+
function ue(e) {
|
|
445
|
+
if (!U(e)) return !1;
|
|
433
446
|
let t = Object.getPrototypeOf(e);
|
|
434
447
|
return t === Object.prototype || t === null;
|
|
435
448
|
}
|
|
436
|
-
function
|
|
437
|
-
return
|
|
449
|
+
function de(e) {
|
|
450
|
+
return U(e) && typeof e.__reinspect_placeholder__ == "string" && typeof e.display == "string";
|
|
438
451
|
}
|
|
439
|
-
function
|
|
452
|
+
function fe(e) {
|
|
440
453
|
try {
|
|
441
454
|
return JSON.stringify(e, null, 2);
|
|
442
455
|
} catch {
|
|
@@ -451,40 +464,40 @@ function W(e) {
|
|
|
451
464
|
return "[Function source unavailable]";
|
|
452
465
|
}
|
|
453
466
|
}
|
|
454
|
-
function
|
|
467
|
+
function pe(e) {
|
|
455
468
|
let t = e.replace(/\s+/g, " ").trim();
|
|
456
469
|
return t.length <= 120 ? t : `${t.slice(0, 117)}...`;
|
|
457
470
|
}
|
|
458
471
|
function G(e, t, n) {
|
|
459
|
-
if (n >
|
|
472
|
+
if (n > R) return H("truncated", "[Max depth reached]");
|
|
460
473
|
if (e === null) return null;
|
|
461
474
|
let r = typeof e;
|
|
462
475
|
if (r === "string" || r === "boolean") return e;
|
|
463
|
-
if (r === "number") return Number.isFinite(e) ? e :
|
|
464
|
-
if (r === "undefined") return
|
|
465
|
-
if (r === "bigint") return
|
|
466
|
-
if (r === "symbol") return
|
|
467
|
-
if (r === "function") return
|
|
468
|
-
if (e instanceof Date) return
|
|
469
|
-
if (e instanceof RegExp) return
|
|
476
|
+
if (r === "number") return Number.isFinite(e) ? e : H("non-finite-number", String(e));
|
|
477
|
+
if (r === "undefined") return H("undefined", "undefined");
|
|
478
|
+
if (r === "bigint") return H("bigint", `${String(e)}n`);
|
|
479
|
+
if (r === "symbol") return H("symbol", String(e));
|
|
480
|
+
if (r === "function") return H("function", `[Function ${e.name || "anonymous"}]`);
|
|
481
|
+
if (e instanceof Date) return H("date", Number.isNaN(e.getTime()) ? "Invalid Date" : e.toISOString());
|
|
482
|
+
if (e instanceof RegExp) return H("regexp", e.toString());
|
|
470
483
|
if (r === "object") {
|
|
471
484
|
let r = e;
|
|
472
|
-
if (t.has(r)) return
|
|
485
|
+
if (t.has(r)) return H("circular", "[Circular]");
|
|
473
486
|
if (t.add(r), Array.isArray(e)) {
|
|
474
|
-
let i = [], a = Math.min(e.length,
|
|
487
|
+
let i = [], a = Math.min(e.length, B);
|
|
475
488
|
for (let r = 0; r < a; r += 1) i.push(G(e[r], t, n + 1));
|
|
476
|
-
return e.length >
|
|
489
|
+
return e.length > B && i.push(H("truncated", `${e.length - B} more items`)), t.delete(r), i;
|
|
477
490
|
}
|
|
478
|
-
let i = {}, a = Object.entries(e), o = Math.min(a.length,
|
|
491
|
+
let i = {}, a = Object.entries(e), o = Math.min(a.length, z);
|
|
479
492
|
for (let e = 0; e < o; e += 1) {
|
|
480
493
|
let [r, o] = a[e];
|
|
481
494
|
i[r] = G(o, t, n + 1);
|
|
482
495
|
}
|
|
483
|
-
return a.length >
|
|
496
|
+
return a.length > z && (i.__reinspect_truncated__ = H("truncated", `${a.length - z} more keys`)), t.delete(r), i;
|
|
484
497
|
}
|
|
485
|
-
return
|
|
498
|
+
return H("unsupported", "[Unsupported value]");
|
|
486
499
|
}
|
|
487
|
-
function
|
|
500
|
+
function K(e) {
|
|
488
501
|
if (e === null) return {
|
|
489
502
|
kind: "null",
|
|
490
503
|
summary: "null",
|
|
@@ -533,7 +546,7 @@ function ue(e) {
|
|
|
533
546
|
functionMeta: {
|
|
534
547
|
name: r,
|
|
535
548
|
arity: t.length,
|
|
536
|
-
preview:
|
|
549
|
+
preview: pe(n),
|
|
537
550
|
source: n
|
|
538
551
|
}
|
|
539
552
|
};
|
|
@@ -557,7 +570,7 @@ function ue(e) {
|
|
|
557
570
|
return Array.isArray(e) ? {
|
|
558
571
|
kind: "array",
|
|
559
572
|
summary: `Array(${e.length})`
|
|
560
|
-
} :
|
|
573
|
+
} : U(e) ? {
|
|
561
574
|
kind: "object",
|
|
562
575
|
summary: `Object(${Object.keys(e).length})`
|
|
563
576
|
} : {
|
|
@@ -565,21 +578,21 @@ function ue(e) {
|
|
|
565
578
|
summary: String(e)
|
|
566
579
|
};
|
|
567
580
|
}
|
|
568
|
-
function
|
|
569
|
-
if (!
|
|
581
|
+
function q(e) {
|
|
582
|
+
if (!de(e)) {
|
|
570
583
|
if (Array.isArray(e)) {
|
|
571
584
|
let t = [];
|
|
572
585
|
for (let n of e) {
|
|
573
|
-
let e =
|
|
586
|
+
let e = q(n);
|
|
574
587
|
if (e === void 0) return;
|
|
575
588
|
t.push(e);
|
|
576
589
|
}
|
|
577
590
|
return t;
|
|
578
591
|
}
|
|
579
|
-
if (
|
|
592
|
+
if (U(e)) {
|
|
580
593
|
let t = {};
|
|
581
594
|
for (let [n, r] of Object.entries(e)) {
|
|
582
|
-
let e =
|
|
595
|
+
let e = q(r);
|
|
583
596
|
e !== void 0 && (t[n] = e);
|
|
584
597
|
}
|
|
585
598
|
return t;
|
|
@@ -587,32 +600,32 @@ function K(e) {
|
|
|
587
600
|
return e;
|
|
588
601
|
}
|
|
589
602
|
}
|
|
590
|
-
function
|
|
603
|
+
function me(e) {
|
|
591
604
|
return Object.keys(e).map((t) => ({
|
|
592
605
|
key: t,
|
|
593
|
-
value:
|
|
606
|
+
value: K(e[t])
|
|
594
607
|
}));
|
|
595
608
|
}
|
|
596
|
-
function
|
|
597
|
-
return
|
|
609
|
+
function he(e) {
|
|
610
|
+
return fe(G(e, /* @__PURE__ */ new WeakSet(), 0)) ?? "{}";
|
|
598
611
|
}
|
|
599
|
-
function
|
|
600
|
-
return
|
|
612
|
+
function ge(e) {
|
|
613
|
+
return fe(G(e, /* @__PURE__ */ new WeakSet(), 0));
|
|
601
614
|
}
|
|
602
|
-
function
|
|
615
|
+
function _e(e) {
|
|
603
616
|
if (e === null) return !0;
|
|
604
617
|
let t = typeof e;
|
|
605
|
-
return t === "string" || t === "number" || t === "boolean" || Array.isArray(e) ? !0 :
|
|
618
|
+
return t === "string" || t === "number" || t === "boolean" || Array.isArray(e) ? !0 : ue(e);
|
|
606
619
|
}
|
|
607
|
-
function
|
|
620
|
+
function ve(e) {
|
|
608
621
|
let t = e.trim();
|
|
609
622
|
if (t.length === 0) return {
|
|
610
623
|
parsed: null,
|
|
611
624
|
error: "Value JSON cannot be empty."
|
|
612
625
|
};
|
|
613
626
|
try {
|
|
614
|
-
let e =
|
|
615
|
-
return e === void 0 || !
|
|
627
|
+
let e = q(JSON.parse(t));
|
|
628
|
+
return e === void 0 || !_e(e) ? {
|
|
616
629
|
parsed: null,
|
|
617
630
|
error: "Only objects, arrays, and primitive JSON values are editable."
|
|
618
631
|
} : {
|
|
@@ -626,7 +639,7 @@ function he(e) {
|
|
|
626
639
|
};
|
|
627
640
|
}
|
|
628
641
|
}
|
|
629
|
-
function
|
|
642
|
+
function ye(e) {
|
|
630
643
|
let t = e.trim();
|
|
631
644
|
if (t.length === 0) return {
|
|
632
645
|
parsed: {},
|
|
@@ -640,7 +653,7 @@ function ge(e) {
|
|
|
640
653
|
};
|
|
641
654
|
let n = {};
|
|
642
655
|
for (let [t, r] of Object.entries(e)) {
|
|
643
|
-
let e =
|
|
656
|
+
let e = q(r);
|
|
644
657
|
e !== void 0 && (n[t] = e);
|
|
645
658
|
}
|
|
646
659
|
return {
|
|
@@ -656,13 +669,13 @@ function ge(e) {
|
|
|
656
669
|
}
|
|
657
670
|
//#endregion
|
|
658
671
|
//#region src/reinspect/wrapMarker.ts
|
|
659
|
-
var
|
|
660
|
-
function
|
|
661
|
-
return e[
|
|
672
|
+
var be = Symbol.for("reinspect.wrapped");
|
|
673
|
+
function xe(e) {
|
|
674
|
+
return e[be];
|
|
662
675
|
}
|
|
663
676
|
//#endregion
|
|
664
677
|
//#region src/reinspect/withReinspect.tsx
|
|
665
|
-
var
|
|
678
|
+
var Se = {
|
|
666
679
|
enabled: !1,
|
|
667
680
|
startActive: !1,
|
|
668
681
|
showFloatingToggle: !1,
|
|
@@ -673,9 +686,9 @@ var ye = {
|
|
|
673
686
|
shouldCountRenders: !1,
|
|
674
687
|
countRendersForComponents: [],
|
|
675
688
|
renderCaptureMode: "attempts"
|
|
676
|
-
},
|
|
677
|
-
function
|
|
678
|
-
let t =
|
|
689
|
+
}, Ce = /* @__PURE__ */ new Map();
|
|
690
|
+
function J(e) {
|
|
691
|
+
let t = Ce.get(e);
|
|
679
692
|
if (t) return t;
|
|
680
693
|
let n = {
|
|
681
694
|
attempts: 0,
|
|
@@ -684,10 +697,10 @@ function q(e) {
|
|
|
684
697
|
wasCountingEnabled: !1,
|
|
685
698
|
shouldCountCommit: !1
|
|
686
699
|
};
|
|
687
|
-
return
|
|
700
|
+
return Ce.set(e, n), n;
|
|
688
701
|
}
|
|
689
|
-
function
|
|
690
|
-
let n =
|
|
702
|
+
function we(e, t) {
|
|
703
|
+
let n = J(e);
|
|
691
704
|
if (!t) return n.wasCountingEnabled = !1, n.shouldCountCommit = !1, {
|
|
692
705
|
attempts: n.attempts,
|
|
693
706
|
commits: n.commits
|
|
@@ -698,27 +711,27 @@ function xe(e, t) {
|
|
|
698
711
|
commits: n.commits + +!!r
|
|
699
712
|
};
|
|
700
713
|
}
|
|
701
|
-
function
|
|
702
|
-
let t =
|
|
714
|
+
function Te(e) {
|
|
715
|
+
let t = J(e);
|
|
703
716
|
t.hasCommitted && t.shouldCountCommit && (t.commits += 1), t.hasCommitted = !0, t.shouldCountCommit = !1;
|
|
704
717
|
}
|
|
705
|
-
function
|
|
718
|
+
function Ee(e, t) {
|
|
706
719
|
return t === "commits" ? `${e.commits} commits` : t === "both" ? `${e.attempts} attempts | ${e.commits} commits` : `${e.attempts} attempts`;
|
|
707
720
|
}
|
|
708
|
-
function
|
|
721
|
+
function De(e) {
|
|
709
722
|
let t = e.replace(/([A-Z])/g, " $1").trim();
|
|
710
723
|
return t.length > 0 ? t[0].toUpperCase() + t.slice(1) : e;
|
|
711
724
|
}
|
|
712
|
-
function
|
|
725
|
+
function Oe(e) {
|
|
713
726
|
return e.trim().toLowerCase().replace(/[\s_-]+/g, "");
|
|
714
727
|
}
|
|
715
|
-
function
|
|
728
|
+
function Y(e) {
|
|
716
729
|
return e != null && e !== "";
|
|
717
730
|
}
|
|
718
|
-
function
|
|
731
|
+
function ke(e) {
|
|
719
732
|
return e.replace(/[^a-zA-Z0-9_-]/g, "-");
|
|
720
733
|
}
|
|
721
|
-
async function
|
|
734
|
+
async function Ae(e) {
|
|
722
735
|
if (typeof navigator > "u" || !navigator.clipboard?.writeText) return !1;
|
|
723
736
|
try {
|
|
724
737
|
return await navigator.clipboard.writeText(e), !0;
|
|
@@ -726,7 +739,7 @@ async function De(e) {
|
|
|
726
739
|
return !1;
|
|
727
740
|
}
|
|
728
741
|
}
|
|
729
|
-
function
|
|
742
|
+
function je({ value: e, onCopy: t }) {
|
|
730
743
|
if (e.kind === "function" && e.functionMeta) {
|
|
731
744
|
let n = e.functionMeta;
|
|
732
745
|
return /* @__PURE__ */ u("div", {
|
|
@@ -752,137 +765,137 @@ function Oe({ value: e, onCopy: t }) {
|
|
|
752
765
|
}) : null]
|
|
753
766
|
});
|
|
754
767
|
}
|
|
755
|
-
function
|
|
768
|
+
function Me(e, t) {
|
|
756
769
|
return t?.name?.trim() || e.displayName?.trim() || e.name?.trim() || t?.fallbackName?.trim() || "Component";
|
|
757
770
|
}
|
|
758
|
-
function
|
|
771
|
+
function Ne(e, t, n) {
|
|
759
772
|
return e === "manual" || n === "all" || n === "first-party" && t === "first-party";
|
|
760
773
|
}
|
|
761
|
-
function
|
|
762
|
-
let a = t?.source ?? "manual",
|
|
763
|
-
if (
|
|
764
|
-
let
|
|
765
|
-
function
|
|
766
|
-
let t = i(),
|
|
774
|
+
function X(e, t) {
|
|
775
|
+
let a = t?.source ?? "manual", f = t?.scope ?? "first-party", p = xe(e);
|
|
776
|
+
if (p && a === "auto") return e;
|
|
777
|
+
let m = p && a === "manual" ? p.original : e, h = Me(m, t);
|
|
778
|
+
function _(e) {
|
|
779
|
+
let t = i(), p = o(null), _ = o(null), [v, y] = s(null), [x, S] = s("css"), [C, w] = s("detected"), [T, E] = s(""), [D, O] = s({}), [te, k] = s("{}"), [ne, A] = s(null), [j, M] = s(null), [N, oe] = s({}), [se, ce] = s({}), [le, P] = s({}), [F, I] = s(null), [L, R] = s(""), [z, B] = s(null), V = n(g), H = !!V, U = V?.config ?? Se, ue = V?.getBorderColor ?? (() => "#f97316"), de = V?.isActive ?? !1, fe = V?.inspectMode ?? "wrapped", W = V?.shouldCountRenders ?? !1, pe = V?.renderCaptureMode ?? Se.renderCaptureMode, G = V?.overrides ?? {}, K = V?.updateOverride ?? (() => void 0), q = V?.renderCountComponents ?? {}, be = V?.setRenderCountingForComponent ?? (() => void 0), xe = V?.isRenderCountingEnabledFor ?? (() => !1), J = `${h}-${t}`, Me = ue(h), X = Ne(a, f, fe), Z = U.enabled && de && X, Pe = X && xe(h), Fe = !!q[h], Ie = we(J, Pe), Le = G[J], Re = Z ? re(Le, U.editableProps) : {}, Q = {
|
|
767
780
|
...e,
|
|
768
|
-
...
|
|
769
|
-
}, ze = Q, $ = Z &&
|
|
770
|
-
r(() => (
|
|
771
|
-
|
|
772
|
-
}), [
|
|
781
|
+
...D
|
|
782
|
+
}, ze = Q, $ = Z && v !== null, Be = Oe(T), Ve = Be.length === 0 ? U.editableProps : U.editableProps.filter((e) => Oe(e).includes(Be)), He = $ && x === "props" && C === "detected" ? me(ze) : [];
|
|
783
|
+
r(() => (Te(J), () => {
|
|
784
|
+
Ce.delete(J);
|
|
785
|
+
}), [J]), r(() => {
|
|
773
786
|
if (!$) return;
|
|
774
787
|
let e = (e) => {
|
|
775
788
|
let t = e.target;
|
|
776
|
-
|
|
789
|
+
p.current?.contains(t) || _.current?.contains(t) || (y(null), I(null), R(""), B(null));
|
|
777
790
|
}, t = (e) => {
|
|
778
791
|
if (e.key === "Escape") {
|
|
779
|
-
if (
|
|
780
|
-
|
|
792
|
+
if (F) {
|
|
793
|
+
I(null), R(""), B(null);
|
|
781
794
|
return;
|
|
782
795
|
}
|
|
783
|
-
|
|
796
|
+
y(null);
|
|
784
797
|
}
|
|
785
798
|
};
|
|
786
799
|
return document.addEventListener("mousedown", e), document.addEventListener("keydown", t), () => {
|
|
787
800
|
document.removeEventListener("mousedown", e), document.removeEventListener("keydown", t);
|
|
788
801
|
};
|
|
789
|
-
}, [
|
|
790
|
-
if (!
|
|
802
|
+
}, [F, $]), r(() => {
|
|
803
|
+
if (!j) return;
|
|
791
804
|
let e = globalThis.setTimeout(() => {
|
|
792
|
-
|
|
805
|
+
M(null);
|
|
793
806
|
}, 1400);
|
|
794
807
|
return () => {
|
|
795
808
|
globalThis.clearTimeout(e);
|
|
796
809
|
};
|
|
797
|
-
}, [
|
|
810
|
+
}, [j]);
|
|
798
811
|
let Ue = {
|
|
799
812
|
"--reinspect-color": Me,
|
|
800
|
-
"--reinspect-z-base":
|
|
813
|
+
"--reinspect-z-base": U.zIndexBase
|
|
801
814
|
}, We = (e) => {
|
|
802
|
-
Z && (e.preventDefault(),
|
|
815
|
+
Z && (e.preventDefault(), S("css"), w("detected"), E(""), A(null), M(null), oe({}), ce({}), P({}), I(null), R(""), B(null), k("{}"), y({
|
|
803
816
|
x: e.clientX,
|
|
804
817
|
y: e.clientY
|
|
805
818
|
}));
|
|
806
819
|
}, Ge = () => {
|
|
807
|
-
let { parsed: e, error: t } =
|
|
820
|
+
let { parsed: e, error: t } = ye(te);
|
|
808
821
|
if (t || !e) {
|
|
809
|
-
|
|
822
|
+
A(t);
|
|
810
823
|
return;
|
|
811
824
|
}
|
|
812
|
-
O(e),
|
|
825
|
+
O(e), A(null);
|
|
813
826
|
}, Ke = () => {
|
|
814
|
-
O({}),
|
|
827
|
+
O({}), C === "raw" && k(he(e)), A(null);
|
|
815
828
|
}, qe = (e, t) => {
|
|
816
|
-
|
|
817
|
-
|
|
829
|
+
Ae(e).then((e) => {
|
|
830
|
+
M(e ? `${t} copied.` : "Clipboard access is unavailable.");
|
|
818
831
|
});
|
|
819
832
|
}, Je = (e, t) => {
|
|
820
|
-
if (
|
|
821
|
-
|
|
833
|
+
if (le[e]) {
|
|
834
|
+
P((t) => ({
|
|
822
835
|
...t,
|
|
823
836
|
[e]: !1
|
|
824
837
|
}));
|
|
825
838
|
return;
|
|
826
839
|
}
|
|
827
|
-
if (!(e in
|
|
828
|
-
let n =
|
|
829
|
-
n === null ?
|
|
840
|
+
if (!(e in N) && !(e in se)) {
|
|
841
|
+
let n = ge(t);
|
|
842
|
+
n === null ? ce((t) => ({
|
|
830
843
|
...t,
|
|
831
844
|
[e]: "JSON preview is unavailable for this value."
|
|
832
|
-
})) :
|
|
845
|
+
})) : oe((t) => ({
|
|
833
846
|
...t,
|
|
834
847
|
[e]: n
|
|
835
848
|
}));
|
|
836
849
|
}
|
|
837
|
-
|
|
850
|
+
P((t) => ({
|
|
838
851
|
...t,
|
|
839
852
|
[e]: !0
|
|
840
853
|
}));
|
|
841
854
|
}, Ye = (e, t) => {
|
|
842
|
-
if (!
|
|
843
|
-
let n =
|
|
855
|
+
if (!_e(t)) return;
|
|
856
|
+
let n = ge(t);
|
|
844
857
|
if (n === null) {
|
|
845
|
-
|
|
858
|
+
M("Unable to open editor for this value.");
|
|
846
859
|
return;
|
|
847
860
|
}
|
|
848
|
-
|
|
861
|
+
I(e), R(n), B(null);
|
|
849
862
|
}, Xe = () => {
|
|
850
|
-
if (!
|
|
851
|
-
let { parsed: e, error: t } =
|
|
863
|
+
if (!F) return;
|
|
864
|
+
let { parsed: e, error: t } = ve(L);
|
|
852
865
|
if (t || e === null) {
|
|
853
|
-
|
|
866
|
+
B(t);
|
|
854
867
|
return;
|
|
855
868
|
}
|
|
856
869
|
O((t) => ({
|
|
857
870
|
...t,
|
|
858
|
-
[
|
|
859
|
-
})),
|
|
871
|
+
[F]: e
|
|
872
|
+
})), I(null), R(""), B(null);
|
|
860
873
|
}, Ze = $ ? /* @__PURE__ */ u("div", {
|
|
861
|
-
ref:
|
|
874
|
+
ref: p,
|
|
862
875
|
className: "reinspect-menu",
|
|
863
876
|
role: "dialog",
|
|
864
|
-
"aria-label": `${
|
|
877
|
+
"aria-label": `${h} inspector controls`,
|
|
865
878
|
style: {
|
|
866
|
-
top: `${
|
|
867
|
-
left: `${
|
|
879
|
+
top: `${v.y}px`,
|
|
880
|
+
left: `${v.x}px`
|
|
868
881
|
},
|
|
869
882
|
children: [
|
|
870
883
|
/* @__PURE__ */ u("p", {
|
|
871
884
|
className: "reinspect-menu-title",
|
|
872
|
-
children: [
|
|
885
|
+
children: [h, " inspector"]
|
|
873
886
|
}),
|
|
874
887
|
/* @__PURE__ */ u("label", {
|
|
875
888
|
className: "reinspect-menu-component-setting",
|
|
876
889
|
children: [/* @__PURE__ */ l("span", { children: "Capture renders for this component" }), /* @__PURE__ */ l("input", {
|
|
877
890
|
type: "checkbox",
|
|
878
|
-
checked:
|
|
879
|
-
onChange: (e) =>
|
|
880
|
-
disabled:
|
|
881
|
-
"aria-label": `Capture renders for ${
|
|
882
|
-
"data-testid": `reinspect-component-render-toggle-${
|
|
891
|
+
checked: W ? !0 : Fe,
|
|
892
|
+
onChange: (e) => be(h, e.currentTarget.checked),
|
|
893
|
+
disabled: W,
|
|
894
|
+
"aria-label": `Capture renders for ${h}`,
|
|
895
|
+
"data-testid": `reinspect-component-render-toggle-${h}`
|
|
883
896
|
})]
|
|
884
897
|
}),
|
|
885
|
-
|
|
898
|
+
W ? /* @__PURE__ */ l("p", {
|
|
886
899
|
className: "reinspect-setting-note",
|
|
887
900
|
children: "Global capture is enabled from Reinspect settings."
|
|
888
901
|
}) : null,
|
|
@@ -890,17 +903,17 @@ function Y(e, t) {
|
|
|
890
903
|
className: "reinspect-submenu",
|
|
891
904
|
children: [/* @__PURE__ */ l("button", {
|
|
892
905
|
type: "button",
|
|
893
|
-
"data-state":
|
|
894
|
-
onClick: () =>
|
|
906
|
+
"data-state": x === "css" ? "active" : "idle",
|
|
907
|
+
onClick: () => S("css"),
|
|
895
908
|
children: "CSS"
|
|
896
909
|
}), /* @__PURE__ */ l("button", {
|
|
897
910
|
type: "button",
|
|
898
|
-
"data-state":
|
|
899
|
-
onClick: () =>
|
|
911
|
+
"data-state": x === "props" ? "active" : "idle",
|
|
912
|
+
onClick: () => S("props"),
|
|
900
913
|
children: "Props"
|
|
901
914
|
})]
|
|
902
915
|
}),
|
|
903
|
-
|
|
916
|
+
x === "css" ? /* @__PURE__ */ u(c, { children: [
|
|
904
917
|
/* @__PURE__ */ u("div", {
|
|
905
918
|
className: "reinspect-menu-filter",
|
|
906
919
|
children: [/* @__PURE__ */ l("span", {
|
|
@@ -915,37 +928,37 @@ function Y(e, t) {
|
|
|
915
928
|
})
|
|
916
929
|
})
|
|
917
930
|
}), /* @__PURE__ */ l("input", {
|
|
918
|
-
id: `${
|
|
931
|
+
id: `${J}-css-filter`,
|
|
919
932
|
"data-testid": "reinspect-css-filter-input",
|
|
920
933
|
type: "search",
|
|
921
|
-
value:
|
|
934
|
+
value: T,
|
|
922
935
|
placeholder: "Filter",
|
|
923
936
|
"aria-label": "Filter CSS properties",
|
|
924
|
-
onChange: (e) =>
|
|
937
|
+
onChange: (e) => E(e.currentTarget.value)
|
|
925
938
|
})]
|
|
926
939
|
}),
|
|
927
940
|
/* @__PURE__ */ l("div", {
|
|
928
941
|
className: "reinspect-menu-grid",
|
|
929
942
|
children: Ve.map((e) => {
|
|
930
|
-
let t = Le?.[e], n = `${
|
|
931
|
-
if (
|
|
932
|
-
let r = typeof t == "string" ?
|
|
943
|
+
let t = Le?.[e], n = `${J}-${e}`;
|
|
944
|
+
if (b.has(e)) {
|
|
945
|
+
let r = typeof t == "string" ? ie(t) : "#1f2937";
|
|
933
946
|
return /* @__PURE__ */ u("div", {
|
|
934
947
|
className: "reinspect-field",
|
|
935
948
|
children: [/* @__PURE__ */ l("label", {
|
|
936
949
|
htmlFor: n,
|
|
937
|
-
children:
|
|
950
|
+
children: De(e)
|
|
938
951
|
}), /* @__PURE__ */ u("div", {
|
|
939
952
|
className: "reinspect-inline-controls",
|
|
940
953
|
children: [/* @__PURE__ */ l("input", {
|
|
941
954
|
id: n,
|
|
942
955
|
type: "color",
|
|
943
956
|
value: r,
|
|
944
|
-
onChange: (t) =>
|
|
957
|
+
onChange: (t) => K(J, e, t.currentTarget.value)
|
|
945
958
|
}), /* @__PURE__ */ l("button", {
|
|
946
959
|
type: "button",
|
|
947
|
-
onClick: () =>
|
|
948
|
-
disabled: !
|
|
960
|
+
onClick: () => K(J, e, void 0),
|
|
961
|
+
disabled: !Y(t),
|
|
949
962
|
children: "reset"
|
|
950
963
|
})]
|
|
951
964
|
})]
|
|
@@ -969,28 +982,28 @@ function Y(e, t) {
|
|
|
969
982
|
step: "0.05",
|
|
970
983
|
value: r,
|
|
971
984
|
onChange: (t) => {
|
|
972
|
-
let n =
|
|
973
|
-
n !== void 0 &&
|
|
985
|
+
let n = ae(t.currentTarget.value);
|
|
986
|
+
n !== void 0 && K(J, e, n);
|
|
974
987
|
}
|
|
975
988
|
}),
|
|
976
989
|
/* @__PURE__ */ l("output", { children: r.toFixed(2) }),
|
|
977
990
|
/* @__PURE__ */ l("button", {
|
|
978
991
|
type: "button",
|
|
979
|
-
onClick: () =>
|
|
980
|
-
disabled: !
|
|
992
|
+
onClick: () => K(J, e, void 0),
|
|
993
|
+
disabled: !Y(t),
|
|
981
994
|
children: "reset"
|
|
982
995
|
})
|
|
983
996
|
]
|
|
984
997
|
})]
|
|
985
998
|
}, e);
|
|
986
999
|
}
|
|
987
|
-
if (
|
|
1000
|
+
if (ee.has(e)) {
|
|
988
1001
|
let r = typeof t == "number" ? t : "";
|
|
989
1002
|
return /* @__PURE__ */ u("div", {
|
|
990
1003
|
className: "reinspect-field",
|
|
991
1004
|
children: [/* @__PURE__ */ u("label", {
|
|
992
1005
|
htmlFor: n,
|
|
993
|
-
children: [
|
|
1006
|
+
children: [De(e), " (px)"]
|
|
994
1007
|
}), /* @__PURE__ */ u("div", {
|
|
995
1008
|
className: "reinspect-inline-controls",
|
|
996
1009
|
children: [/* @__PURE__ */ l("input", {
|
|
@@ -1000,16 +1013,16 @@ function Y(e, t) {
|
|
|
1000
1013
|
value: r,
|
|
1001
1014
|
onChange: (t) => {
|
|
1002
1015
|
if (t.currentTarget.value === "") {
|
|
1003
|
-
|
|
1016
|
+
K(J, e, void 0);
|
|
1004
1017
|
return;
|
|
1005
1018
|
}
|
|
1006
|
-
let n =
|
|
1007
|
-
n !== void 0 &&
|
|
1019
|
+
let n = ae(t.currentTarget.value);
|
|
1020
|
+
n !== void 0 && K(J, e, n);
|
|
1008
1021
|
}
|
|
1009
1022
|
}), /* @__PURE__ */ l("button", {
|
|
1010
1023
|
type: "button",
|
|
1011
|
-
onClick: () =>
|
|
1012
|
-
disabled: !
|
|
1024
|
+
onClick: () => K(J, e, void 0),
|
|
1025
|
+
disabled: !Y(t),
|
|
1013
1026
|
children: "reset"
|
|
1014
1027
|
})]
|
|
1015
1028
|
})]
|
|
@@ -1019,18 +1032,18 @@ function Y(e, t) {
|
|
|
1019
1032
|
className: "reinspect-field",
|
|
1020
1033
|
children: [/* @__PURE__ */ l("label", {
|
|
1021
1034
|
htmlFor: n,
|
|
1022
|
-
children:
|
|
1035
|
+
children: De(e)
|
|
1023
1036
|
}), /* @__PURE__ */ u("div", {
|
|
1024
1037
|
className: "reinspect-inline-controls",
|
|
1025
1038
|
children: [/* @__PURE__ */ l("input", {
|
|
1026
1039
|
id: n,
|
|
1027
1040
|
type: "text",
|
|
1028
1041
|
value: typeof t == "string" ? t : "",
|
|
1029
|
-
onChange: (t) =>
|
|
1042
|
+
onChange: (t) => K(J, e, t.currentTarget.value || void 0)
|
|
1030
1043
|
}), /* @__PURE__ */ l("button", {
|
|
1031
1044
|
type: "button",
|
|
1032
|
-
onClick: () =>
|
|
1033
|
-
disabled: !
|
|
1045
|
+
onClick: () => K(J, e, void 0),
|
|
1046
|
+
disabled: !Y(t),
|
|
1034
1047
|
children: "reset"
|
|
1035
1048
|
})]
|
|
1036
1049
|
})]
|
|
@@ -1041,7 +1054,7 @@ function Y(e, t) {
|
|
|
1041
1054
|
className: "reinspect-menu-empty-state",
|
|
1042
1055
|
children: [
|
|
1043
1056
|
"No CSS properties match \"",
|
|
1044
|
-
|
|
1057
|
+
T.trim(),
|
|
1045
1058
|
"\"."
|
|
1046
1059
|
]
|
|
1047
1060
|
}) : null
|
|
@@ -1052,25 +1065,25 @@ function Y(e, t) {
|
|
|
1052
1065
|
className: "reinspect-props-submenu",
|
|
1053
1066
|
children: [/* @__PURE__ */ l("button", {
|
|
1054
1067
|
type: "button",
|
|
1055
|
-
"data-state":
|
|
1056
|
-
onClick: () =>
|
|
1068
|
+
"data-state": C === "detected" ? "active" : "idle",
|
|
1069
|
+
onClick: () => w("detected"),
|
|
1057
1070
|
children: "Detected"
|
|
1058
1071
|
}), /* @__PURE__ */ l("button", {
|
|
1059
1072
|
type: "button",
|
|
1060
|
-
"data-state":
|
|
1073
|
+
"data-state": C === "raw" ? "active" : "idle",
|
|
1061
1074
|
onClick: () => {
|
|
1062
|
-
|
|
1075
|
+
w("raw"), A(null), k(he(ze));
|
|
1063
1076
|
},
|
|
1064
1077
|
children: "Raw"
|
|
1065
1078
|
})]
|
|
1066
1079
|
}),
|
|
1067
|
-
|
|
1080
|
+
C === "detected" ? He.length > 0 ? /* @__PURE__ */ u("div", {
|
|
1068
1081
|
className: "reinspect-props-table",
|
|
1069
1082
|
children: [/* @__PURE__ */ u("div", {
|
|
1070
1083
|
className: "reinspect-props-header",
|
|
1071
1084
|
children: [/* @__PURE__ */ l("span", { children: "Key" }), /* @__PURE__ */ l("span", { children: "Value" })]
|
|
1072
1085
|
}), He.map((e) => {
|
|
1073
|
-
let t =
|
|
1086
|
+
let t = ke(e.key), n = ze[e.key], r = e.value.kind === "object" || e.value.kind === "array", i = !!le[e.key], a = N[e.key], o = se[e.key], s = _e(n);
|
|
1074
1087
|
return /* @__PURE__ */ u("div", {
|
|
1075
1088
|
className: "reinspect-props-row",
|
|
1076
1089
|
"data-testid": `reinspect-prop-row-${t}`,
|
|
@@ -1081,7 +1094,7 @@ function Y(e, t) {
|
|
|
1081
1094
|
className: "reinspect-prop-cell",
|
|
1082
1095
|
"data-testid": `reinspect-prop-value-${t}`,
|
|
1083
1096
|
children: [
|
|
1084
|
-
|
|
1097
|
+
je({
|
|
1085
1098
|
value: e.value,
|
|
1086
1099
|
onCopy: qe
|
|
1087
1100
|
}),
|
|
@@ -1121,20 +1134,20 @@ function Y(e, t) {
|
|
|
1121
1134
|
children: "No props detected."
|
|
1122
1135
|
}) : /* @__PURE__ */ u(c, { children: [
|
|
1123
1136
|
/* @__PURE__ */ l("label", {
|
|
1124
|
-
htmlFor: `${
|
|
1137
|
+
htmlFor: `${J}-props-json`,
|
|
1125
1138
|
children: "Props JSON"
|
|
1126
1139
|
}),
|
|
1127
1140
|
/* @__PURE__ */ l("textarea", {
|
|
1128
|
-
id: `${
|
|
1129
|
-
value:
|
|
1141
|
+
id: `${J}-props-json`,
|
|
1142
|
+
value: te,
|
|
1130
1143
|
onChange: (e) => {
|
|
1131
|
-
|
|
1144
|
+
k(e.currentTarget.value), A(null);
|
|
1132
1145
|
},
|
|
1133
1146
|
rows: 9
|
|
1134
1147
|
}),
|
|
1135
|
-
|
|
1148
|
+
ne ? /* @__PURE__ */ l("p", {
|
|
1136
1149
|
className: "reinspect-error",
|
|
1137
|
-
children:
|
|
1150
|
+
children: ne
|
|
1138
1151
|
}) : null,
|
|
1139
1152
|
/* @__PURE__ */ u("div", {
|
|
1140
1153
|
className: "reinspect-inline-controls",
|
|
@@ -1149,45 +1162,45 @@ function Y(e, t) {
|
|
|
1149
1162
|
})]
|
|
1150
1163
|
})
|
|
1151
1164
|
] }),
|
|
1152
|
-
|
|
1165
|
+
j ? /* @__PURE__ */ l("p", {
|
|
1153
1166
|
className: "reinspect-setting-note",
|
|
1154
1167
|
"data-testid": "reinspect-props-copy-status",
|
|
1155
|
-
children:
|
|
1168
|
+
children: j
|
|
1156
1169
|
}) : null
|
|
1157
1170
|
]
|
|
1158
1171
|
})
|
|
1159
1172
|
]
|
|
1160
|
-
}) : null, Qe =
|
|
1173
|
+
}) : null, Qe = F ? d(/* @__PURE__ */ l("div", {
|
|
1161
1174
|
className: "reinspect-modal-backdrop",
|
|
1162
1175
|
role: "dialog",
|
|
1163
1176
|
"aria-modal": "true",
|
|
1164
|
-
"aria-label": `Edit ${
|
|
1177
|
+
"aria-label": `Edit ${F} prop`,
|
|
1165
1178
|
"data-testid": "reinspect-prop-edit-modal",
|
|
1166
1179
|
children: /* @__PURE__ */ u("div", {
|
|
1167
1180
|
className: "reinspect-modal",
|
|
1168
|
-
ref:
|
|
1181
|
+
ref: _,
|
|
1169
1182
|
children: [
|
|
1170
1183
|
/* @__PURE__ */ u("p", {
|
|
1171
1184
|
className: "reinspect-menu-title",
|
|
1172
|
-
children: ["Edit prop: ",
|
|
1185
|
+
children: ["Edit prop: ", F]
|
|
1173
1186
|
}),
|
|
1174
1187
|
/* @__PURE__ */ l("label", {
|
|
1175
|
-
htmlFor: `${
|
|
1188
|
+
htmlFor: `${J}-prop-edit-json`,
|
|
1176
1189
|
children: "JSON value"
|
|
1177
1190
|
}),
|
|
1178
1191
|
/* @__PURE__ */ l("textarea", {
|
|
1179
|
-
id: `${
|
|
1192
|
+
id: `${J}-prop-edit-json`,
|
|
1180
1193
|
"data-testid": "reinspect-prop-edit-textarea",
|
|
1181
|
-
value:
|
|
1194
|
+
value: L,
|
|
1182
1195
|
onChange: (e) => {
|
|
1183
|
-
|
|
1196
|
+
R(e.currentTarget.value), B(null);
|
|
1184
1197
|
},
|
|
1185
1198
|
rows: 10
|
|
1186
1199
|
}),
|
|
1187
|
-
|
|
1200
|
+
z ? /* @__PURE__ */ l("p", {
|
|
1188
1201
|
className: "reinspect-error",
|
|
1189
1202
|
"data-testid": "reinspect-prop-edit-error",
|
|
1190
|
-
children:
|
|
1203
|
+
children: z
|
|
1191
1204
|
}) : null,
|
|
1192
1205
|
/* @__PURE__ */ u("div", {
|
|
1193
1206
|
className: "reinspect-inline-controls",
|
|
@@ -1198,7 +1211,7 @@ function Y(e, t) {
|
|
|
1198
1211
|
}), /* @__PURE__ */ l("button", {
|
|
1199
1212
|
type: "button",
|
|
1200
1213
|
onClick: () => {
|
|
1201
|
-
|
|
1214
|
+
I(null), R(""), B(null);
|
|
1202
1215
|
},
|
|
1203
1216
|
children: "cancel"
|
|
1204
1217
|
})]
|
|
@@ -1206,21 +1219,21 @@ function Y(e, t) {
|
|
|
1206
1219
|
]
|
|
1207
1220
|
})
|
|
1208
1221
|
}), document.body) : null;
|
|
1209
|
-
if (!
|
|
1222
|
+
if (!H) {
|
|
1210
1223
|
if (a === "manual") throw Error("useReinspect must be used within ReinspectProvider");
|
|
1211
|
-
return /* @__PURE__ */ l(
|
|
1224
|
+
return /* @__PURE__ */ l(m, { ...Q });
|
|
1212
1225
|
}
|
|
1213
|
-
return a === "auto" && !
|
|
1226
|
+
return a === "auto" && !X ? /* @__PURE__ */ l(m, { ...Q }) : /* @__PURE__ */ u("div", {
|
|
1214
1227
|
className: "reinspect-shell",
|
|
1215
|
-
"data-reinspect-component":
|
|
1228
|
+
"data-reinspect-component": h,
|
|
1216
1229
|
"data-reinspect-active": Z,
|
|
1217
|
-
"data-testid": `reinspect-shell-${
|
|
1230
|
+
"data-testid": `reinspect-shell-${h}`,
|
|
1218
1231
|
style: Ue,
|
|
1219
1232
|
onContextMenu: We,
|
|
1220
1233
|
children: [
|
|
1221
1234
|
Z ? /* @__PURE__ */ u("span", {
|
|
1222
1235
|
className: "reinspect-name-badge",
|
|
1223
|
-
children: [
|
|
1236
|
+
children: [h, Pe ? ` | ${Ee(Ie, pe)}` : ""]
|
|
1224
1237
|
}) : null,
|
|
1225
1238
|
Ze ? d(Ze, document.body) : null,
|
|
1226
1239
|
Qe,
|
|
@@ -1228,21 +1241,21 @@ function Y(e, t) {
|
|
|
1228
1241
|
className: "reinspect-content",
|
|
1229
1242
|
"data-reinspect-content": "true",
|
|
1230
1243
|
style: Re,
|
|
1231
|
-
children: /* @__PURE__ */ l(
|
|
1244
|
+
children: /* @__PURE__ */ l(m, { ...Q })
|
|
1232
1245
|
})
|
|
1233
1246
|
]
|
|
1234
1247
|
});
|
|
1235
1248
|
}
|
|
1236
|
-
return
|
|
1249
|
+
return _.displayName = `withReinspect(${h})`, _[be] = {
|
|
1237
1250
|
source: a,
|
|
1238
|
-
scope:
|
|
1239
|
-
original:
|
|
1240
|
-
},
|
|
1251
|
+
scope: f,
|
|
1252
|
+
original: m
|
|
1253
|
+
}, _;
|
|
1241
1254
|
}
|
|
1242
1255
|
//#endregion
|
|
1243
1256
|
//#region src/reinspect/autoWrap.ts
|
|
1244
|
-
function
|
|
1245
|
-
return
|
|
1257
|
+
function Z(e, t) {
|
|
1258
|
+
return xe(e)?.source === "manual" ? e : X(e, {
|
|
1246
1259
|
source: "auto",
|
|
1247
1260
|
scope: t.scope,
|
|
1248
1261
|
name: t.componentName,
|
|
@@ -1251,13 +1264,16 @@ function je(e, t) {
|
|
|
1251
1264
|
}
|
|
1252
1265
|
//#endregion
|
|
1253
1266
|
//#region src/reinspect/wrapInspectableMap.ts
|
|
1254
|
-
function
|
|
1267
|
+
function Pe(e, t) {
|
|
1255
1268
|
let n = {};
|
|
1256
1269
|
for (let r of Object.keys(e)) {
|
|
1257
1270
|
let i = e[r];
|
|
1258
|
-
n[r] =
|
|
1271
|
+
n[r] = X(i, typeof t == "function" ? t(r, i) : t?.[r]);
|
|
1259
1272
|
}
|
|
1260
1273
|
return n;
|
|
1261
1274
|
}
|
|
1262
1275
|
//#endregion
|
|
1263
|
-
|
|
1276
|
+
//#region src/reinspect/index.ts
|
|
1277
|
+
h(f);
|
|
1278
|
+
//#endregion
|
|
1279
|
+
export { v as DEFAULT_EDITABLE_PROPS, y as DEFAULT_PALETTE, L as ReinspectFloatingToggle, I as ReinspectProvider, Z as autoWrapInspectable, _ as useReinspect, X as withReinspect, Pe as wrapInspectableMap };
|