vite-plugin-vue-devtools 1.0.0-rc.7 → 7.0.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 +8 -172
- package/dist/client/assets/css-a-KJtBLB.js +505 -0
- package/dist/client/assets/diff--l9-nN5b.js +1 -0
- package/dist/client/assets/html-5-AIf93y.js +74 -0
- package/dist/client/assets/index-NNrCE7Vx.css +1 -0
- package/dist/client/assets/index-U-H6nGkn.js +1080 -0
- package/dist/client/assets/javascript-Of8SnKfU.js +699 -0
- package/dist/client/assets/json-t1qiHl76.js +25 -0
- package/dist/client/assets/onig-mBJmD8D5.js +1 -0
- package/dist/client/assets/shellscript-h1L64xId.js +4 -0
- package/dist/client/assets/typescript-b1Nw_bQe.js +666 -0
- package/dist/client/assets/unocss-runtime-kftsoZPE.js +2 -0
- package/dist/client/assets/vitesse-dark-5VceXvs6.js +1 -0
- package/dist/client/assets/vitesse-light-HOMMxGxw.js +1 -0
- package/dist/client/assets/vue-apis-Nh9IahXf.js +1 -0
- package/dist/client/assets/vue-html-eJ6eRCYJ.js +1 -0
- package/dist/client/assets/vue-nOwTje1i.js +2002 -0
- package/dist/client/assets/yaml-FtfhlYqU.js +200 -0
- package/dist/client/color-scheme.js +6 -0
- package/dist/client/css-hXHVOlj5.js +511 -0
- package/dist/client/devtools-panel.css +1 -0
- package/dist/client/devtools-panel.js +77722 -0
- package/dist/client/diff-nydZCsp5.js +7 -0
- package/dist/client/html-r4dic7N6.js +84 -0
- package/dist/client/index.html +13 -21
- package/dist/client/javascript-iu2g-HpL.js +705 -0
- package/dist/client/json-6ED1Ntns.js +31 -0
- package/dist/client/onig-NuJRzyUz.js +4 -0
- package/dist/client/shellscript-lFevXvOp.js +10 -0
- package/dist/client/typescript-SzFP_hYV.js +672 -0
- package/dist/client/unocss-runtime-c8-Zzj4C.js +1974 -0
- package/dist/client/vitesse-dark-Q3b2Vb5y.js +683 -0
- package/dist/client/vitesse-light-T_UJmsth.js +681 -0
- package/dist/client/vue-apis-j7ljdRbm.js +1127 -0
- package/dist/client/vue-html-IdJrwrVJ.js +16 -0
- package/dist/client/vue-vFbCUJfs.js +2118 -0
- package/dist/client/yaml-n_HyS7lr.js +206 -0
- package/dist/vite.cjs +116 -13794
- package/dist/vite.d.cts +6 -9
- package/dist/vite.d.mts +6 -9
- package/dist/vite.d.ts +6 -9
- package/dist/vite.mjs +113 -13774
- package/package.json +18 -19
- package/src/overlay/devtools-overlay.css +1 -0
- package/src/overlay/devtools-overlay.js +4 -0
- package/src/overlay.js +77 -0
- package/README.zh-CN.md +0 -186
- package/client.d.ts +0 -63
- package/dist/client/assets/DrawerRight.vue_vue_type_script_setup_true_lang-d7a700af.js +0 -81
- package/dist/client/assets/IconButton.vue_vue_type_script_setup_true_lang-68ea38ae.js +0 -26
- package/dist/client/assets/IconTitle.vue_vue_type_script_setup_true_lang-2d6fc9fc.js +0 -30
- package/dist/client/assets/IframeView.vue_vue_type_script_setup_true_lang-5622761a.js +0 -96
- package/dist/client/assets/PanelGrids-ffc0170f.js +0 -15
- package/dist/client/assets/SectionBlock-0024395a.css +0 -18
- package/dist/client/assets/SectionBlock-90af9bd1.js +0 -109
- package/dist/client/assets/StateFields.vue_vue_type_script_setup_true_lang-9c2bccf7.js +0 -381
- package/dist/client/assets/Switch.vue_vue_type_script_setup_true_lang-2f0bd7d3.js +0 -87
- package/dist/client/assets/TextInput.vue_vue_type_script_setup_true_lang-3d5cce68.js +0 -38
- package/dist/client/assets/__eyedropper-a70b4bf1.js +0 -149
- package/dist/client/assets/_commonjsHelpers-7e83dbf2.js +0 -34
- package/dist/client/assets/assets-db2b2e23.js +0 -1597
- package/dist/client/assets/component-docs-12ec703a.js +0 -195
- package/dist/client/assets/components-a4ae8bec.js +0 -790
- package/dist/client/assets/data-5bcd0de2.js +0 -399
- package/dist/client/assets/dayjs.min-f03ccd82.js +0 -13
- package/dist/client/assets/documentations-87ef4bbe.js +0 -276
- package/dist/client/assets/fuse.esm-c317b696.js +0 -1782
- package/dist/client/assets/graph-e80ad5ff.js +0 -52092
- package/dist/client/assets/index-36a8f2c8.js +0 -18551
- package/dist/client/assets/index-b5475fe0.css +0 -482
- package/dist/client/assets/inspect-2dd6a256.js +0 -20
- package/dist/client/assets/jse-theme-dark-2b1853c1.js +0 -1565
- package/dist/client/assets/jse-theme-dark-351d62d5.css +0 -114
- package/dist/client/assets/npm-832f3f2c.css +0 -209
- package/dist/client/assets/npm-be49d241.js +0 -550
- package/dist/client/assets/overview-a871ef56.js +0 -303
- package/dist/client/assets/pages-039ef724.js +0 -561
- package/dist/client/assets/pinia-7ed2c830.svg +0 -1
- package/dist/client/assets/pinia-d2307c92.js +0 -108
- package/dist/client/assets/rerender-trace-3afd48a1.css +0 -14
- package/dist/client/assets/rerender-trace-df5d6ca3.js +0 -436
- package/dist/client/assets/routes-419d52e1.js +0 -132
- package/dist/client/assets/settings-42304886.js +0 -9652
- package/dist/client/assets/settings-7bce89ae.css +0 -11
- package/dist/client/assets/splitpanes.es-025c37b2.js +0 -343
- package/dist/client/assets/timeline-947c186e.js +0 -1480
- package/dist/client/assets/timeline-b315b2e0.css +0 -1
- package/dist/client/assets/vue-5d4e674c.svg +0 -1
- package/dist/client/assets/vueuse-995374f6.svg +0 -1
- package/src/app.js +0 -4
- package/src/views/ComponentInspector.vue +0 -68
- package/src/views/FrameBox.vue +0 -231
- package/src/views/Main.vue +0 -435
- package/src/views/RerenderIndicator.vue +0 -37
- package/src/views/composables.ts +0 -630
- package/src/views/utils.ts +0 -241
|
@@ -1,381 +0,0 @@
|
|
|
1
|
-
import { v as defineComponent, o as openBlock, c as createBlock, q as normalizeClass, bJ as _sfc_main$3, cz as isComputed, aC as isRef, bd as toRaw, cA as isArray, cB as isMap, cC as isSet, cD as isRegExp, cE as toRawType, cF as isPlainObject, cG as escape, a1 as computed, cH as useCopy, r as resolveComponent, e as createElementBlock, i as renderList, z as unref, cI as nanoid, x as createBaseVNode, y as toDisplayString, g as createCommentVNode, F as Fragment, a$ as ref, cJ as useNotification, u as createVNode, bG as withModifiers, d as withDirectives, bv as vShow } from './index-36a8f2c8.js';
|
|
2
|
-
import { _ as _sfc_main$4 } from './IconButton.vue_vue_type_script_setup_true_lang-68ea38ae.js';
|
|
3
|
-
|
|
4
|
-
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
5
|
-
__name: "ExpandIcon",
|
|
6
|
-
props: {
|
|
7
|
-
value: { type: Boolean }
|
|
8
|
-
},
|
|
9
|
-
setup(__props) {
|
|
10
|
-
return (_ctx, _cache) => {
|
|
11
|
-
const _component_VDIcon = _sfc_main$3;
|
|
12
|
-
return openBlock(), createBlock(_component_VDIcon, {
|
|
13
|
-
class: normalizeClass(["material-symbols:arrow-right", {
|
|
14
|
-
"transform rotate-90": _ctx.value
|
|
15
|
-
}]),
|
|
16
|
-
"text-5": "",
|
|
17
|
-
"op-50": "",
|
|
18
|
-
"n-transition": ""
|
|
19
|
-
}, null, 8, ["class"]);
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
/* Injected with object hook! */
|
|
25
|
-
|
|
26
|
-
function getFunctionDetails(func) {
|
|
27
|
-
let string = "";
|
|
28
|
-
let matches = null;
|
|
29
|
-
try {
|
|
30
|
-
string = Function.prototype.toString.call(func);
|
|
31
|
-
matches = String.prototype.match.call(string, /\([\s\S]*?\)/);
|
|
32
|
-
} catch (e) {
|
|
33
|
-
}
|
|
34
|
-
const match = matches && matches[0];
|
|
35
|
-
const args = typeof match === "string" ? match : "(?)";
|
|
36
|
-
const name = typeof func.name === "string" ? func.name : "";
|
|
37
|
-
return `<span style="opacity:.5;">function</span> ${escape(name)}${args}`;
|
|
38
|
-
}
|
|
39
|
-
function formatWithExtraType(value, type) {
|
|
40
|
-
return `${value} <span style="color:#6b7280;padding:'0 5px';">(${type})</span>`;
|
|
41
|
-
}
|
|
42
|
-
function formatStateType(value) {
|
|
43
|
-
if (isComputed(value)) {
|
|
44
|
-
const state = formatStateType(value.value);
|
|
45
|
-
return {
|
|
46
|
-
...state,
|
|
47
|
-
...state.recursive ? { rawDisplay: formatWithExtraType(state.rawDisplay, "Computed") } : { value: formatWithExtraType(state.value, "Computed") }
|
|
48
|
-
};
|
|
49
|
-
} else if (isRef(value)) {
|
|
50
|
-
const state = formatStateType(toRaw(value.value));
|
|
51
|
-
return {
|
|
52
|
-
...state,
|
|
53
|
-
...state.recursive ? { rawDisplay: formatWithExtraType(state.rawDisplay, "Ref") } : { value: formatWithExtraType(state.value, "Ref") }
|
|
54
|
-
};
|
|
55
|
-
} else if (isArray(value)) {
|
|
56
|
-
return {
|
|
57
|
-
rawType: "object",
|
|
58
|
-
rawDisplay: `Array[${value.length}]`,
|
|
59
|
-
recursive: true,
|
|
60
|
-
value
|
|
61
|
-
};
|
|
62
|
-
} else if (typeof value === "function") {
|
|
63
|
-
return {
|
|
64
|
-
rawType: "function",
|
|
65
|
-
recursive: false,
|
|
66
|
-
value: getFunctionDetails(value)
|
|
67
|
-
};
|
|
68
|
-
} else if (typeof value === "bigint") {
|
|
69
|
-
const stringifiedBigInt = BigInt.prototype.toString.call(value);
|
|
70
|
-
return {
|
|
71
|
-
rawType: "string",
|
|
72
|
-
rawDisplay: `BigInt(${stringifiedBigInt})`,
|
|
73
|
-
recursive: false,
|
|
74
|
-
value: stringifiedBigInt
|
|
75
|
-
};
|
|
76
|
-
} else if (Number.isNaN(value)) {
|
|
77
|
-
return {
|
|
78
|
-
rawType: "literal",
|
|
79
|
-
recursive: false,
|
|
80
|
-
value: "NaN"
|
|
81
|
-
};
|
|
82
|
-
} else if (value === Number.POSITIVE_INFINITY) {
|
|
83
|
-
return {
|
|
84
|
-
rawType: "literal",
|
|
85
|
-
recursive: false,
|
|
86
|
-
value: "Infinity"
|
|
87
|
-
};
|
|
88
|
-
} else if (value === Number.NEGATIVE_INFINITY) {
|
|
89
|
-
return {
|
|
90
|
-
rawType: "literal",
|
|
91
|
-
recursive: false,
|
|
92
|
-
value: "-Infinity"
|
|
93
|
-
};
|
|
94
|
-
} else if (typeof value === "symbol") {
|
|
95
|
-
return {
|
|
96
|
-
rawType: "literal",
|
|
97
|
-
recursive: false,
|
|
98
|
-
value: Symbol.prototype.toString.call(value)
|
|
99
|
-
};
|
|
100
|
-
} else if (value === null) {
|
|
101
|
-
return {
|
|
102
|
-
rawType: "null",
|
|
103
|
-
recursive: false,
|
|
104
|
-
value: "null"
|
|
105
|
-
};
|
|
106
|
-
} else if (typeof value === "undefined") {
|
|
107
|
-
return {
|
|
108
|
-
rawType: "null",
|
|
109
|
-
recursive: false,
|
|
110
|
-
value: "undefined"
|
|
111
|
-
};
|
|
112
|
-
} else if (typeof value === "string") {
|
|
113
|
-
return {
|
|
114
|
-
rawType: "string",
|
|
115
|
-
recursive: false,
|
|
116
|
-
value: `"${value}"`
|
|
117
|
-
};
|
|
118
|
-
} else if (value !== "null" && typeof value === "object") {
|
|
119
|
-
if (isMap(value)) {
|
|
120
|
-
return {
|
|
121
|
-
rawType: "object",
|
|
122
|
-
rawDisplay: "Map",
|
|
123
|
-
recursive: true,
|
|
124
|
-
value: Array.from(value.entries()).map(([key, value2]) => ({ key, value: value2 }))
|
|
125
|
-
};
|
|
126
|
-
} else if (isSet(value)) {
|
|
127
|
-
const list = Array.from(value);
|
|
128
|
-
return {
|
|
129
|
-
rawType: "object",
|
|
130
|
-
rawDisplay: `Set[${list.length}]`,
|
|
131
|
-
recursive: true,
|
|
132
|
-
value: list
|
|
133
|
-
};
|
|
134
|
-
} else if (isRegExp(value)) {
|
|
135
|
-
return {
|
|
136
|
-
rawType: "string",
|
|
137
|
-
recursive: false,
|
|
138
|
-
value: RegExp.prototype.toString.call(value)
|
|
139
|
-
};
|
|
140
|
-
} else if (toRawType(value) === "Error") {
|
|
141
|
-
return {
|
|
142
|
-
rawType: "string",
|
|
143
|
-
recursive: false,
|
|
144
|
-
// @ts-expect-error skip
|
|
145
|
-
value: `${value?.message}: ${value?.stack}`
|
|
146
|
-
};
|
|
147
|
-
} else if (value?.state && value._vm || value.constructor?.name === "Store" && value._wrappedGetters) {
|
|
148
|
-
return {
|
|
149
|
-
rawType: "string",
|
|
150
|
-
recursive: false,
|
|
151
|
-
value: '"[object Store]"'
|
|
152
|
-
};
|
|
153
|
-
} else if (value.constructor && value.constructor.name === "VueRouter" || value.currentRoute) {
|
|
154
|
-
return {
|
|
155
|
-
rawType: "string",
|
|
156
|
-
recursive: false,
|
|
157
|
-
value: '"[object Router]"'
|
|
158
|
-
};
|
|
159
|
-
} else if (typeof value.render === "function") {
|
|
160
|
-
return {
|
|
161
|
-
rawType: "object",
|
|
162
|
-
recursive: false,
|
|
163
|
-
// @ts-expect-error skip
|
|
164
|
-
value: formatWithExtraType(value.__name, "Component") ?? "Vue Component"
|
|
165
|
-
};
|
|
166
|
-
} else if (isPlainObject(value)) {
|
|
167
|
-
return {
|
|
168
|
-
rawType: "object",
|
|
169
|
-
rawDisplay: "Object",
|
|
170
|
-
recursive: true,
|
|
171
|
-
value
|
|
172
|
-
};
|
|
173
|
-
} else {
|
|
174
|
-
return {
|
|
175
|
-
rawType: "string",
|
|
176
|
-
recursive: false,
|
|
177
|
-
value: `"${toRawType(value)}"`
|
|
178
|
-
};
|
|
179
|
-
}
|
|
180
|
-
} else {
|
|
181
|
-
return {
|
|
182
|
-
rawType: "literal",
|
|
183
|
-
recursive: false,
|
|
184
|
-
value
|
|
185
|
-
};
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
/* Injected with object hook! */
|
|
190
|
-
|
|
191
|
-
const _hoisted_1$1 = {
|
|
192
|
-
key: 1,
|
|
193
|
-
"inline-block": "",
|
|
194
|
-
"h-6": "",
|
|
195
|
-
"w-6": ""
|
|
196
|
-
};
|
|
197
|
-
const _hoisted_2$1 = ["onDblclick"];
|
|
198
|
-
const _hoisted_3 = /* @__PURE__ */ createBaseVNode("span", {
|
|
199
|
-
"px-1": "",
|
|
200
|
-
"op-60": ""
|
|
201
|
-
}, ":", -1);
|
|
202
|
-
const _hoisted_4 = ["onClick", "innerHTML"];
|
|
203
|
-
const _hoisted_5 = ["onClick", "innerHTML"];
|
|
204
|
-
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
205
|
-
__name: "StateFieldsTree",
|
|
206
|
-
props: {
|
|
207
|
-
id: {},
|
|
208
|
-
data: {},
|
|
209
|
-
depth: { default: 0 },
|
|
210
|
-
expandedId: {}
|
|
211
|
-
},
|
|
212
|
-
emits: ["updateExpanded"],
|
|
213
|
-
setup(__props, { emit: emits }) {
|
|
214
|
-
const props = __props;
|
|
215
|
-
const rawTypeStyles = { literal: "raw-literal", string: "raw-string", object: "raw-object", function: "raw-function", null: "raw-null" };
|
|
216
|
-
const list = computed(() => {
|
|
217
|
-
if (Array.isArray(props.data)) {
|
|
218
|
-
return props.data.map((item) => {
|
|
219
|
-
return formatStateType(item);
|
|
220
|
-
});
|
|
221
|
-
} else if (typeof props.data === "object" && props.data !== null) {
|
|
222
|
-
const o = {};
|
|
223
|
-
for (const k in props.data) {
|
|
224
|
-
const key = k;
|
|
225
|
-
o[key] = formatStateType(props.data[k]);
|
|
226
|
-
}
|
|
227
|
-
const sorted = {};
|
|
228
|
-
Object.keys(o).sort().forEach((key) => {
|
|
229
|
-
sorted[key] = o[key];
|
|
230
|
-
});
|
|
231
|
-
return sorted;
|
|
232
|
-
} else {
|
|
233
|
-
return formatStateType("");
|
|
234
|
-
}
|
|
235
|
-
});
|
|
236
|
-
function toggleExpand(id) {
|
|
237
|
-
emits("updateExpanded", id);
|
|
238
|
-
}
|
|
239
|
-
const copy = useCopy();
|
|
240
|
-
return (_ctx, _cache) => {
|
|
241
|
-
const _component_VDExpandIcon = _sfc_main$2;
|
|
242
|
-
const _component_StateFieldsTree = resolveComponent("StateFieldsTree", true);
|
|
243
|
-
return openBlock(true), createElementBlock(Fragment, null, renderList(unref(list), (item, index) => {
|
|
244
|
-
return openBlock(), createElementBlock("code", {
|
|
245
|
-
key: unref(nanoid)(),
|
|
246
|
-
block: "",
|
|
247
|
-
"select-none": "",
|
|
248
|
-
"pl-2": "",
|
|
249
|
-
"text-sm": ""
|
|
250
|
-
}, [
|
|
251
|
-
createBaseVNode("p", {
|
|
252
|
-
flex: "",
|
|
253
|
-
"items-center": "",
|
|
254
|
-
class: normalizeClass([item?.recursive && "cursor-pointer"])
|
|
255
|
-
}, [
|
|
256
|
-
item?.recursive ? (openBlock(), createBlock(_component_VDExpandIcon, {
|
|
257
|
-
key: 0,
|
|
258
|
-
value: _ctx.expandedId.includes(`${_ctx.id}-${_ctx.depth}-${index}`),
|
|
259
|
-
onClick: ($event) => item?.recursive && toggleExpand(`${_ctx.id}-${_ctx.depth}-${index}`)
|
|
260
|
-
}, null, 8, ["value", "onClick"])) : (openBlock(), createElementBlock("i", _hoisted_1$1)),
|
|
261
|
-
createBaseVNode("span", {
|
|
262
|
-
"select-text": "",
|
|
263
|
-
"text-purple-700": "",
|
|
264
|
-
"dark:text-purple-300": "",
|
|
265
|
-
onDblclick: ($event) => unref(copy)(String(index))
|
|
266
|
-
}, toDisplayString(index), 41, _hoisted_2$1),
|
|
267
|
-
_hoisted_3,
|
|
268
|
-
item?.recursive ? (openBlock(), createElementBlock("span", {
|
|
269
|
-
key: 2,
|
|
270
|
-
class: normalizeClass(rawTypeStyles[item.rawType]),
|
|
271
|
-
"max-w": "[75%]",
|
|
272
|
-
truncate: "",
|
|
273
|
-
onClick: ($event) => item?.recursive && toggleExpand(`${_ctx.id}-${_ctx.depth}-${index}`),
|
|
274
|
-
innerHTML: item?.rawDisplay
|
|
275
|
-
}, null, 10, _hoisted_4)) : (openBlock(), createElementBlock("span", {
|
|
276
|
-
key: 3,
|
|
277
|
-
class: normalizeClass(rawTypeStyles[item.rawType]),
|
|
278
|
-
"max-w": "[75%]",
|
|
279
|
-
truncate: "",
|
|
280
|
-
hover: "underline underline-offset-3 cursor-pointer",
|
|
281
|
-
onClick: ($event) => unref(copy)(String(item?.value)),
|
|
282
|
-
innerHTML: item?.value
|
|
283
|
-
}, null, 10, _hoisted_5))
|
|
284
|
-
], 2),
|
|
285
|
-
_ctx.expandedId.includes(`${_ctx.id}-${_ctx.depth}-${index}`) && item?.recursive ? (openBlock(), createBlock(_component_StateFieldsTree, {
|
|
286
|
-
key: 0,
|
|
287
|
-
id: _ctx.id,
|
|
288
|
-
data: item?.value,
|
|
289
|
-
depth: _ctx.depth + 1,
|
|
290
|
-
"expanded-id": _ctx.expandedId,
|
|
291
|
-
onUpdateExpanded: toggleExpand
|
|
292
|
-
}, null, 8, ["id", "data", "depth", "expanded-id"])) : createCommentVNode("", true)
|
|
293
|
-
]);
|
|
294
|
-
}), 128);
|
|
295
|
-
};
|
|
296
|
-
}
|
|
297
|
-
});
|
|
298
|
-
|
|
299
|
-
/* Injected with object hook! */
|
|
300
|
-
|
|
301
|
-
const _hoisted_1 = { "text-primary": "" };
|
|
302
|
-
const _hoisted_2 = { "pl-3": "" };
|
|
303
|
-
const expandedIdCache = ref([]);
|
|
304
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
305
|
-
__name: "StateFields",
|
|
306
|
-
props: {
|
|
307
|
-
data: {},
|
|
308
|
-
id: { default: 0 }
|
|
309
|
-
},
|
|
310
|
-
setup(__props) {
|
|
311
|
-
const isExpanded = ref(true);
|
|
312
|
-
const copy = useCopy();
|
|
313
|
-
const showNotification = useNotification();
|
|
314
|
-
function toggleExpanded() {
|
|
315
|
-
isExpanded.value = !isExpanded.value;
|
|
316
|
-
}
|
|
317
|
-
function updateExpandedIdCache(id) {
|
|
318
|
-
if (expandedIdCache.value.includes(id))
|
|
319
|
-
expandedIdCache.value = expandedIdCache.value.filter((i) => i !== id);
|
|
320
|
-
else
|
|
321
|
-
expandedIdCache.value.push(id);
|
|
322
|
-
}
|
|
323
|
-
function copyContent(value) {
|
|
324
|
-
try {
|
|
325
|
-
copy(JSON.stringify(value));
|
|
326
|
-
} catch (e) {
|
|
327
|
-
showNotification(
|
|
328
|
-
{
|
|
329
|
-
text: e.message,
|
|
330
|
-
type: "error",
|
|
331
|
-
icon: "carbon-close-outline",
|
|
332
|
-
duration: 5e3
|
|
333
|
-
}
|
|
334
|
-
);
|
|
335
|
-
}
|
|
336
|
-
}
|
|
337
|
-
return (_ctx, _cache) => {
|
|
338
|
-
const _component_VDExpandIcon = _sfc_main$2;
|
|
339
|
-
const _component_VDIconButton = _sfc_main$4;
|
|
340
|
-
const _component_StateFieldsTree = _sfc_main$1;
|
|
341
|
-
return openBlock(), createElementBlock("div", null, [
|
|
342
|
-
createBaseVNode("h3", {
|
|
343
|
-
flex: "",
|
|
344
|
-
"cursor-pointer": "",
|
|
345
|
-
"items-center": "",
|
|
346
|
-
"justify-between": "",
|
|
347
|
-
rounded: "",
|
|
348
|
-
"py-1": "",
|
|
349
|
-
class: "hover:bg-[#c2e9d7] hover:dark:bg-[#2c3e50]",
|
|
350
|
-
onClick: toggleExpanded
|
|
351
|
-
}, [
|
|
352
|
-
createBaseVNode("div", null, [
|
|
353
|
-
createVNode(_component_VDExpandIcon, { value: unref(isExpanded) }, null, 8, ["value"]),
|
|
354
|
-
createBaseVNode("span", _hoisted_1, toDisplayString(_ctx.data.key), 1)
|
|
355
|
-
]),
|
|
356
|
-
createVNode(_component_VDIconButton, {
|
|
357
|
-
mr2: "",
|
|
358
|
-
"flex-none": "",
|
|
359
|
-
title: `Copy ${_ctx.data.key} to clipboard`,
|
|
360
|
-
icon: "carbon-copy",
|
|
361
|
-
onClick: _cache[0] || (_cache[0] = withModifiers(($event) => copyContent(_ctx.data.value), ["stop"]))
|
|
362
|
-
}, null, 8, ["title"])
|
|
363
|
-
]),
|
|
364
|
-
withDirectives(createBaseVNode("div", _hoisted_2, [
|
|
365
|
-
createVNode(_component_StateFieldsTree, {
|
|
366
|
-
id: _ctx.id,
|
|
367
|
-
data: _ctx.data.value,
|
|
368
|
-
"expanded-id": unref(expandedIdCache),
|
|
369
|
-
onUpdateExpanded: updateExpandedIdCache
|
|
370
|
-
}, null, 8, ["id", "data", "expanded-id"])
|
|
371
|
-
], 512), [
|
|
372
|
-
[vShow, unref(isExpanded)]
|
|
373
|
-
])
|
|
374
|
-
]);
|
|
375
|
-
};
|
|
376
|
-
}
|
|
377
|
-
});
|
|
378
|
-
|
|
379
|
-
/* Injected with object hook! */
|
|
380
|
-
|
|
381
|
-
export { _sfc_main as _, _sfc_main$2 as a };
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import { v as defineComponent, bL as useVModel, o as openBlock, e as createElementBlock, f as renderSlot, d as withDirectives, bt as vModelSelect, z as unref, x as createBaseVNode, y as toDisplayString, g as createCommentVNode, aC as isRef, c as createBlock, bJ as _sfc_main$2, bq as vModelCheckbox, bE as withKeys } from './index-36a8f2c8.js';
|
|
2
|
-
|
|
3
|
-
const _hoisted_1$1 = { class: "n-text-input flex flex items-center border n-border-base rounded px-2 py-1 focus-within:n-focus-base focus-within:border-context n-bg-base" };
|
|
4
|
-
const _hoisted_2$1 = ["disabled"];
|
|
5
|
-
const _hoisted_3$1 = {
|
|
6
|
-
key: 0,
|
|
7
|
-
value: "",
|
|
8
|
-
disabled: "",
|
|
9
|
-
hidden: ""
|
|
10
|
-
};
|
|
11
|
-
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
12
|
-
__name: "Select",
|
|
13
|
-
props: {
|
|
14
|
-
modelValue: { default: void 0 },
|
|
15
|
-
placeholder: { default: "" },
|
|
16
|
-
icon: { default: "" },
|
|
17
|
-
disabled: { type: Boolean, default: false }
|
|
18
|
-
},
|
|
19
|
-
setup(__props, { emit }) {
|
|
20
|
-
const props = __props;
|
|
21
|
-
const input = useVModel(props, "modelValue", emit, { passive: true });
|
|
22
|
-
return (_ctx, _cache) => {
|
|
23
|
-
const _component_VDIcon = _sfc_main$2;
|
|
24
|
-
return openBlock(), createElementBlock("div", _hoisted_1$1, [
|
|
25
|
-
renderSlot(_ctx.$slots, "icon", {}, () => [
|
|
26
|
-
_ctx.icon ? (openBlock(), createBlock(_component_VDIcon, {
|
|
27
|
-
key: 0,
|
|
28
|
-
icon: _ctx.icon,
|
|
29
|
-
class: "mr-0.4em text-1.1em op50"
|
|
30
|
-
}, null, 8, ["icon"])) : createCommentVNode("", true)
|
|
31
|
-
]),
|
|
32
|
-
withDirectives(createBaseVNode("select", {
|
|
33
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(input) ? input.value = $event : null),
|
|
34
|
-
disabled: _ctx.disabled,
|
|
35
|
-
class: "w-full flex-auto n-bg-base !outline-none"
|
|
36
|
-
}, [
|
|
37
|
-
_ctx.placeholder ? (openBlock(), createElementBlock("option", _hoisted_3$1, toDisplayString(_ctx.placeholder), 1)) : createCommentVNode("", true),
|
|
38
|
-
renderSlot(_ctx.$slots, "default")
|
|
39
|
-
], 8, _hoisted_2$1), [
|
|
40
|
-
[vModelSelect, unref(input)]
|
|
41
|
-
])
|
|
42
|
-
]);
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
|
|
47
|
-
/* Injected with object hook! */
|
|
48
|
-
|
|
49
|
-
const _hoisted_1 = ["checked", "disabled"];
|
|
50
|
-
const _hoisted_2 = ["disabled"];
|
|
51
|
-
const _hoisted_3 = /* @__PURE__ */ createBaseVNode("div", { class: "n-switch-slider n-checked:n-switch-slider-checked peer-active:n-active-base peer-focus-visible:n-focus-base n-transition" }, [
|
|
52
|
-
/* @__PURE__ */ createBaseVNode("div", { class: "n-checked:n-switch-thumb-checked n-switch-thumb n-transition" })
|
|
53
|
-
], -1);
|
|
54
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
55
|
-
__name: "Switch",
|
|
56
|
-
props: {
|
|
57
|
-
modelValue: { type: Boolean, default: false },
|
|
58
|
-
disabled: { type: Boolean, default: false }
|
|
59
|
-
},
|
|
60
|
-
setup(__props, { emit }) {
|
|
61
|
-
const props = __props;
|
|
62
|
-
const checked = useVModel(props, "modelValue", emit, { passive: true });
|
|
63
|
-
return (_ctx, _cache) => {
|
|
64
|
-
return openBlock(), createElementBlock("label", {
|
|
65
|
-
class: "n-switch n-switch-base cursor-pointer n-disabled:n-disabled",
|
|
66
|
-
checked: unref(checked) || null,
|
|
67
|
-
disabled: _ctx.disabled || null
|
|
68
|
-
}, [
|
|
69
|
-
withDirectives(createBaseVNode("input", {
|
|
70
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(checked) ? checked.value = $event : null),
|
|
71
|
-
type: "checkbox",
|
|
72
|
-
class: "peer absolute op0",
|
|
73
|
-
disabled: _ctx.disabled,
|
|
74
|
-
onKeypress: _cache[1] || (_cache[1] = withKeys(($event) => checked.value = !unref(checked), ["enter"]))
|
|
75
|
-
}, null, 40, _hoisted_2), [
|
|
76
|
-
[vModelCheckbox, unref(checked)]
|
|
77
|
-
]),
|
|
78
|
-
_hoisted_3,
|
|
79
|
-
renderSlot(_ctx.$slots, "default")
|
|
80
|
-
], 8, _hoisted_1);
|
|
81
|
-
};
|
|
82
|
-
}
|
|
83
|
-
});
|
|
84
|
-
|
|
85
|
-
/* Injected with object hook! */
|
|
86
|
-
|
|
87
|
-
export { _sfc_main as _, _sfc_main$1 as a };
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { v as defineComponent, bL as useVModel, o as openBlock, e as createElementBlock, f as renderSlot, d as withDirectives, br as vModelDynamic, z as unref, x as createBaseVNode, k as mergeProps, aC as isRef, c as createBlock, g as createCommentVNode, bJ as _sfc_main$1 } from './index-36a8f2c8.js';
|
|
2
|
-
|
|
3
|
-
const _hoisted_1 = { class: "n-text-input flex flex items-center border n-border-base rounded py-1 pl-1 pr-2 focus-within:n-focus-base focus-within:border-context n-bg-base" };
|
|
4
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
|
-
__name: "TextInput",
|
|
6
|
-
props: {
|
|
7
|
-
modelValue: { default: "" },
|
|
8
|
-
icon: {},
|
|
9
|
-
placeholder: {},
|
|
10
|
-
disabled: { type: Boolean },
|
|
11
|
-
type: { default: "text" }
|
|
12
|
-
},
|
|
13
|
-
setup(__props, { emit }) {
|
|
14
|
-
const props = __props;
|
|
15
|
-
const input = useVModel(props, "modelValue", emit, { passive: true });
|
|
16
|
-
return (_ctx, _cache) => {
|
|
17
|
-
const _component_VDIcon = _sfc_main$1;
|
|
18
|
-
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
19
|
-
renderSlot(_ctx.$slots, "icon", {}, () => [
|
|
20
|
-
_ctx.icon ? (openBlock(), createBlock(_component_VDIcon, {
|
|
21
|
-
key: 0,
|
|
22
|
-
icon: _ctx.icon,
|
|
23
|
-
class: "ml-0.3em mr-0.1em text-1.1em op50"
|
|
24
|
-
}, null, 8, ["icon"])) : createCommentVNode("", true)
|
|
25
|
-
]),
|
|
26
|
-
withDirectives(createBaseVNode("input", mergeProps({
|
|
27
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(input) ? input.value = $event : null)
|
|
28
|
-
}, _ctx.$props, { class: "ml-0.4em w-full flex-auto n-bg-base !outline-none" }), null, 16), [
|
|
29
|
-
[vModelDynamic, unref(input)]
|
|
30
|
-
])
|
|
31
|
-
]);
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
/* Injected with object hook! */
|
|
37
|
-
|
|
38
|
-
export { _sfc_main as _ };
|
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
import { _ as __unplugin_components_0 } from './PanelGrids-ffc0170f.js';
|
|
2
|
-
import { v as defineComponent, cQ as useRouter, a$ as ref, a1 as computed, cH as useCopy, cm as useEventListener, aP as onMounted, o as openBlock, c as createBlock, h as withCtx, x as createBaseVNode, z as unref, e as createElementBlock, l as normalizeStyle, a9 as createTextVNode, y as toDisplayString, c6 as useDevToolsClient, bY as useFrameState, u as createVNode, cR as checkIsSecurityContext } from './index-36a8f2c8.js';
|
|
3
|
-
|
|
4
|
-
const _hoisted_1 = {
|
|
5
|
-
key: 0
|
|
6
|
-
};
|
|
7
|
-
const _hoisted_2 = {
|
|
8
|
-
key: 0
|
|
9
|
-
};
|
|
10
|
-
const _hoisted_3 = {
|
|
11
|
-
key: 1,
|
|
12
|
-
flex: "",
|
|
13
|
-
"items-center": ""
|
|
14
|
-
};
|
|
15
|
-
const _hoisted_4 = {
|
|
16
|
-
flex: "",
|
|
17
|
-
"items-center": ""
|
|
18
|
-
};
|
|
19
|
-
const _hoisted_5 = /*#__PURE__*/createBaseVNode("i", {
|
|
20
|
-
class: "i-mdi:eyedropper",
|
|
21
|
-
"text-3": ""
|
|
22
|
-
}, null, -1);
|
|
23
|
-
const _hoisted_6 = [_hoisted_5];
|
|
24
|
-
const _sfc_main = /*#__PURE__*/defineComponent({
|
|
25
|
-
__name: '__eyedropper',
|
|
26
|
-
setup(__props) {
|
|
27
|
-
const client = useDevToolsClient();
|
|
28
|
-
const frameState = useFrameState();
|
|
29
|
-
const router = useRouter();
|
|
30
|
-
const hexColor = ref('');
|
|
31
|
-
const showHex = ref(true);
|
|
32
|
-
const color = computed(() => showHex.value ? hexColor.value : hexToRgb(hexColor.value));
|
|
33
|
-
const copy = useCopy();
|
|
34
|
-
function getDecimal(hex, start, end) {
|
|
35
|
-
return Number.parseInt(hex.slice(start, end), 16);
|
|
36
|
-
}
|
|
37
|
-
function hexToRgb(hex) {
|
|
38
|
-
return hex ? `rgb(${getDecimal(hex, 1, 3)},${getDecimal(hex, 3, 5)},${getDecimal(hex, 5, 7)})` : '';
|
|
39
|
-
}
|
|
40
|
-
useEventListener('keydown', e => {
|
|
41
|
-
if (e.key === 'Escape') close();
|
|
42
|
-
});
|
|
43
|
-
function close() {
|
|
44
|
-
client.value?.panel?.toggleViewMode();
|
|
45
|
-
router.replace(frameState.route.value);
|
|
46
|
-
}
|
|
47
|
-
const inSecurityContext = checkIsSecurityContext();
|
|
48
|
-
// @ts-expect-error missing types
|
|
49
|
-
const supportEyeDropper = !!window.EyeDropper;
|
|
50
|
-
const isSupported = inSecurityContext && supportEyeDropper;
|
|
51
|
-
async function open() {
|
|
52
|
-
if (!isSupported) return {};
|
|
53
|
-
// @ts-expect-error missing types?
|
|
54
|
-
const eyeDropper = new EyeDropper();
|
|
55
|
-
return eyeDropper.open();
|
|
56
|
-
}
|
|
57
|
-
async function restart() {
|
|
58
|
-
hexColor.value = '';
|
|
59
|
-
open().then(res => {
|
|
60
|
-
hexColor.value = res.sRGBHex;
|
|
61
|
-
}).catch(() => {
|
|
62
|
-
close();
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
onMounted(() => {
|
|
66
|
-
open().then(res => {
|
|
67
|
-
hexColor.value = res.sRGBHex;
|
|
68
|
-
}).catch(() => {
|
|
69
|
-
close();
|
|
70
|
-
});
|
|
71
|
-
});
|
|
72
|
-
function ErrorBoundary() {
|
|
73
|
-
let content = createVNode("div", null, null);
|
|
74
|
-
if (!inSecurityContext) {
|
|
75
|
-
content = createVNode("p", null, [createTextVNode("EyeDropper is not available due to "), createVNode("a", {
|
|
76
|
-
"class": "text-primary transition-colors hover:text-primary/80",
|
|
77
|
-
"href": "https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts",
|
|
78
|
-
"target": "_blank"
|
|
79
|
-
}, [createTextVNode("secure context")]), createTextVNode(" restrict.")]);
|
|
80
|
-
} else if (!supportEyeDropper) {
|
|
81
|
-
content = createVNode("p", null, [createTextVNode("Your browser doesn't support\xA0"), createVNode("a", {
|
|
82
|
-
"class": "text-primary transition-colors hover:text-primary/80",
|
|
83
|
-
"href": "https://developer.mozilla.org/en-US/docs/Web/API/EyeDropper#browser_compatibility",
|
|
84
|
-
"target": "_blank"
|
|
85
|
-
}, [createTextVNode("EyeDropper")]), createTextVNode(".")]);
|
|
86
|
-
}
|
|
87
|
-
return createVNode("div", {
|
|
88
|
-
"class": "flex items-center justify-center text-12px"
|
|
89
|
-
}, [content]);
|
|
90
|
-
}
|
|
91
|
-
return (_ctx, _cache) => {
|
|
92
|
-
const _component_VDPanelGrids = __unplugin_components_0;
|
|
93
|
-
return openBlock(), createBlock(_component_VDPanelGrids, {
|
|
94
|
-
"h-screen": "",
|
|
95
|
-
"w-screen": "",
|
|
96
|
-
px5: ""
|
|
97
|
-
}, {
|
|
98
|
-
default: withCtx(() => [createBaseVNode("div", {
|
|
99
|
-
absolute: "",
|
|
100
|
-
"right-0": "",
|
|
101
|
-
"top-0": "",
|
|
102
|
-
p2: ""
|
|
103
|
-
}, [createBaseVNode("button", {
|
|
104
|
-
"carbon-close": "",
|
|
105
|
-
ma: "",
|
|
106
|
-
"text-xl": "",
|
|
107
|
-
op50: "",
|
|
108
|
-
"hover:op100": "",
|
|
109
|
-
onClick: close
|
|
110
|
-
})]), unref(isSupported) ? (openBlock(), createElementBlock("div", _hoisted_1, [!unref(color) ? (openBlock(), createElementBlock("div", _hoisted_2, " Launching EyeDropper ")) : (openBlock(), createElementBlock("div", _hoisted_3, [createBaseVNode("span", _hoisted_4, [createBaseVNode("em", {
|
|
111
|
-
"mr-2": "",
|
|
112
|
-
"inline-block": "",
|
|
113
|
-
"h-5": "",
|
|
114
|
-
"w-5": "",
|
|
115
|
-
border: "",
|
|
116
|
-
"border-base": "",
|
|
117
|
-
rounded: "",
|
|
118
|
-
hover: "cursor-pointer border-primary",
|
|
119
|
-
style: normalizeStyle({
|
|
120
|
-
backgroundColor: unref(color)
|
|
121
|
-
}),
|
|
122
|
-
onClick: _cache[0] || (_cache[0] = $event => showHex.value = !unref(showHex))
|
|
123
|
-
}, null, 4), createTextVNode(" : "), createBaseVNode("span", {
|
|
124
|
-
hover: "underline underline-offset-3 cursor-pointer",
|
|
125
|
-
onClick: _cache[1] || (_cache[1] = $event => unref(copy)(unref(color)))
|
|
126
|
-
}, toDisplayString(unref(color)), 1)]), createBaseVNode("span", {
|
|
127
|
-
"ml-2": "",
|
|
128
|
-
flex: "",
|
|
129
|
-
"cursor-pointer": "",
|
|
130
|
-
"items-center": "",
|
|
131
|
-
border: "",
|
|
132
|
-
"border-base": "",
|
|
133
|
-
"rounded-10": "",
|
|
134
|
-
"p-2": "",
|
|
135
|
-
hover: "bg-active",
|
|
136
|
-
onClick: restart
|
|
137
|
-
}, _hoisted_6)]))])) : (openBlock(), createBlock(ErrorBoundary, {
|
|
138
|
-
key: 1
|
|
139
|
-
}))]),
|
|
140
|
-
_: 1
|
|
141
|
-
});
|
|
142
|
-
};
|
|
143
|
-
}
|
|
144
|
-
});
|
|
145
|
-
/* Injected with object hook! */
|
|
146
|
-
|
|
147
|
-
/* Injected with object hook! */
|
|
148
|
-
|
|
149
|
-
export { _sfc_main as default };
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
2
|
-
|
|
3
|
-
function getDefaultExportFromCjs (x) {
|
|
4
|
-
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
function getAugmentedNamespace(n) {
|
|
8
|
-
if (n.__esModule) return n;
|
|
9
|
-
var f = n.default;
|
|
10
|
-
if (typeof f == "function") {
|
|
11
|
-
var a = function a () {
|
|
12
|
-
if (this instanceof a) {
|
|
13
|
-
return Reflect.construct(f, arguments, this.constructor);
|
|
14
|
-
}
|
|
15
|
-
return f.apply(this, arguments);
|
|
16
|
-
};
|
|
17
|
-
a.prototype = f.prototype;
|
|
18
|
-
} else a = {};
|
|
19
|
-
Object.defineProperty(a, '__esModule', {value: true});
|
|
20
|
-
Object.keys(n).forEach(function (k) {
|
|
21
|
-
var d = Object.getOwnPropertyDescriptor(n, k);
|
|
22
|
-
Object.defineProperty(a, k, d.get ? d : {
|
|
23
|
-
enumerable: true,
|
|
24
|
-
get: function () {
|
|
25
|
-
return n[k];
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
});
|
|
29
|
-
return a;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
/* Injected with object hook! */
|
|
33
|
-
|
|
34
|
-
export { getDefaultExportFromCjs as a, commonjsGlobal as c, getAugmentedNamespace as g };
|