@vscode/component-explorer 0.1.1-19 → 0.1.1-20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/component-explorer.css +1 -1
- package/dist/components/FixturePreviewItem.d.ts.map +1 -1
- package/dist/core/CliRuntime.d.ts +1 -1
- package/dist/core/CliRuntime.d.ts.map +1 -1
- package/dist/core/ComponentRenderer.d.ts +14 -0
- package/dist/core/ComponentRenderer.d.ts.map +1 -0
- package/dist/lib/fixtureFocusTrap.d.ts +1 -1
- package/dist/lib/fixtureFocusTrap.d.ts.map +1 -1
- package/dist/viewer.js +860 -872
- package/dist/viewer.js.map +1 -1
- package/package.json +1 -1
package/dist/viewer.js
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { f as
|
|
5
|
-
import { b as
|
|
6
|
-
import { createRoot as
|
|
7
|
-
import { createContext as
|
|
8
|
-
import { jsx as a, jsxs as
|
|
9
|
-
import { unstable_batchedUpdates as
|
|
1
|
+
var Vt = Object.defineProperty;
|
|
2
|
+
var Mt = (r, e, t) => e in r ? Vt(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
|
|
3
|
+
var l = (r, e, t) => Mt(r, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { f as Re, a as Te, s as ke } from "./index-BsQr630j.js";
|
|
5
|
+
import { b as as, d as ds, c as cs, e as ls, g as hs } from "./index-BsQr630j.js";
|
|
6
|
+
import { createRoot as Ft } from "react-dom/client";
|
|
7
|
+
import { createContext as Ye, useReducer as Et, useState as Dt, useContext as Bt, useEffect as Ie, createElement as At } from "react";
|
|
8
|
+
import { jsx as a, jsxs as g, Fragment as me } from "react/jsx-runtime";
|
|
9
|
+
import { unstable_batchedUpdates as et } from "react-dom";
|
|
10
|
+
function ve(r) {
|
|
11
|
+
return typeof r == "object" && r !== null && ke in r && r[ke] === !0 && "_options" in r && typeof r._options == "object";
|
|
12
|
+
}
|
|
10
13
|
function be(r) {
|
|
11
|
-
return typeof r == "object" && r !== null &&
|
|
14
|
+
return typeof r == "object" && r !== null && Re in r && r[Re] === !0 && "_entries" in r && typeof r._entries == "object";
|
|
12
15
|
}
|
|
13
16
|
function _e(r) {
|
|
14
|
-
return typeof r == "object" && r !== null && Te in r && r[Te] === !0 && "
|
|
15
|
-
}
|
|
16
|
-
function ye(r) {
|
|
17
|
-
return typeof r == "object" && r !== null && ke in r && r[ke] === !0 && "_variants" in r && typeof r._variants == "object";
|
|
18
|
-
}
|
|
19
|
-
function Zn(r) {
|
|
20
|
-
return be(r) ? { success: !0, data: r } : _e(r) ? { success: !0, data: r } : ye(r) ? { success: !0, data: r } : { success: !1, error: "Value is not a valid fixture export (missing brand symbol or _options/_entries/_variants)" };
|
|
17
|
+
return typeof r == "object" && r !== null && Te in r && r[Te] === !0 && "_variants" in r && typeof r._variants == "object";
|
|
21
18
|
}
|
|
22
19
|
function Xn(r) {
|
|
23
|
-
return be(r) ? { success: !0, data: r } : { success: !1, error: "Value is not a
|
|
20
|
+
return ve(r) ? { success: !0, data: r } : be(r) ? { success: !0, data: r } : _e(r) ? { success: !0, data: r } : { success: !1, error: "Value is not a valid fixture export (missing brand symbol or _options/_entries/_variants)" };
|
|
24
21
|
}
|
|
25
22
|
function Yn(r) {
|
|
26
|
-
return
|
|
23
|
+
return ve(r) ? { success: !0, data: r } : { success: !1, error: "Value is not a SingleFixtureExport" };
|
|
27
24
|
}
|
|
28
25
|
function es(r) {
|
|
29
|
-
return
|
|
26
|
+
return be(r) ? { success: !0, data: r } : { success: !1, error: "Value is not a FixtureGroupExport" };
|
|
27
|
+
}
|
|
28
|
+
function ts(r) {
|
|
29
|
+
return _e(r) ? { success: !0, data: r } : { success: !1, error: "Value is not a FixtureVariantsExport" };
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function Oe(r, e, t) {
|
|
32
32
|
const n = r._options;
|
|
33
33
|
return {
|
|
34
34
|
id: e,
|
|
@@ -43,24 +43,24 @@ function Ne(r, e, t) {
|
|
|
43
43
|
render: n.render
|
|
44
44
|
};
|
|
45
45
|
}
|
|
46
|
-
function
|
|
46
|
+
function rs(r) {
|
|
47
47
|
return typeof r == "object" && r !== null && "render" in r && typeof r.render == "function" && "id" in r && "name" in r;
|
|
48
48
|
}
|
|
49
|
-
const
|
|
49
|
+
const $t = {
|
|
50
50
|
mobile: { width: 390, height: 844 },
|
|
51
51
|
tablet: { width: 768, height: 1024 },
|
|
52
52
|
desktop: { width: 1440, height: 900 }
|
|
53
53
|
};
|
|
54
|
-
function $t(r) {
|
|
55
|
-
return typeof r == "string" ? { name: r, ...At[r] } : r;
|
|
56
|
-
}
|
|
57
54
|
function zt(r) {
|
|
55
|
+
return typeof r == "string" ? { name: r, ...$t[r] } : r;
|
|
56
|
+
}
|
|
57
|
+
function Lt(r) {
|
|
58
58
|
const e = {};
|
|
59
59
|
for (const t of r)
|
|
60
60
|
e[t.name] = t.defaultValue;
|
|
61
61
|
return e;
|
|
62
62
|
}
|
|
63
|
-
function
|
|
63
|
+
function Ne(r) {
|
|
64
64
|
if (r.startsWith("/"))
|
|
65
65
|
throw new Error(`Fixture path cannot start with '/': ${r}`);
|
|
66
66
|
if (r.includes("//"))
|
|
@@ -68,19 +68,19 @@ function Ve(r) {
|
|
|
68
68
|
if (r === "")
|
|
69
69
|
throw new Error("Fixture path cannot be empty (use undefined for default)");
|
|
70
70
|
}
|
|
71
|
-
function
|
|
72
|
-
const t =
|
|
71
|
+
function Ht(r, e) {
|
|
72
|
+
const t = jt(r);
|
|
73
73
|
if (e === void 0)
|
|
74
74
|
return [t];
|
|
75
75
|
if (e.endsWith("/")) {
|
|
76
76
|
const n = e.slice(0, -1);
|
|
77
77
|
if (n)
|
|
78
|
-
return
|
|
78
|
+
return Ne(n), [...n.split("/"), t];
|
|
79
79
|
throw new Error(`Fixture path cannot be just '/': ${e}`);
|
|
80
80
|
} else
|
|
81
|
-
return
|
|
81
|
+
return Ne(e), e.split("/");
|
|
82
82
|
}
|
|
83
|
-
function
|
|
83
|
+
function ie(r) {
|
|
84
84
|
const e = {
|
|
85
85
|
id: "",
|
|
86
86
|
name: "Components",
|
|
@@ -89,80 +89,80 @@ function ae(r) {
|
|
|
89
89
|
labels: []
|
|
90
90
|
};
|
|
91
91
|
for (const [t, n] of r) {
|
|
92
|
-
const s = "_path" in n ? n._path : void 0, o =
|
|
93
|
-
|
|
92
|
+
const s = "_path" in n ? n._path : void 0, o = Ht(t, s);
|
|
93
|
+
tt(e, o, n);
|
|
94
94
|
}
|
|
95
95
|
return e;
|
|
96
96
|
}
|
|
97
|
-
function
|
|
97
|
+
function jt(r) {
|
|
98
98
|
return (r.split("/").pop() ?? r).replace(/\.fixture\.(tsx?|jsx?)$/, "");
|
|
99
99
|
}
|
|
100
|
-
function
|
|
101
|
-
var
|
|
100
|
+
function tt(r, e, t, n = []) {
|
|
101
|
+
var c, u;
|
|
102
102
|
let s = r;
|
|
103
103
|
const o = [...n];
|
|
104
|
-
for (let
|
|
105
|
-
const
|
|
106
|
-
o.push(
|
|
107
|
-
const
|
|
108
|
-
let
|
|
109
|
-
(
|
|
104
|
+
for (let h = 0; h < e.length - 1; h++) {
|
|
105
|
+
const p = e[h];
|
|
106
|
+
o.push(p);
|
|
107
|
+
const m = o.join("/");
|
|
108
|
+
let b = (c = s.children) == null ? void 0 : c.find(
|
|
109
|
+
(S) => S.type === "folder" && S.name === p
|
|
110
110
|
);
|
|
111
|
-
|
|
112
|
-
id:
|
|
113
|
-
name:
|
|
111
|
+
b || (b = {
|
|
112
|
+
id: m,
|
|
113
|
+
name: p,
|
|
114
114
|
type: "folder",
|
|
115
115
|
children: [],
|
|
116
116
|
labels: []
|
|
117
|
-
}, s.children || (s.children = []), s.children.push(
|
|
117
|
+
}, s.children || (s.children = []), s.children.push(b)), s = b;
|
|
118
118
|
}
|
|
119
119
|
const i = e[e.length - 1];
|
|
120
120
|
o.push(i);
|
|
121
121
|
const d = o.join("/");
|
|
122
|
-
if (
|
|
123
|
-
const
|
|
122
|
+
if (ve(t)) {
|
|
123
|
+
const h = Oe(t, d, i), p = {
|
|
124
124
|
id: d,
|
|
125
125
|
name: i,
|
|
126
126
|
type: "component",
|
|
127
|
-
component:
|
|
128
|
-
labels: [...
|
|
127
|
+
component: h,
|
|
128
|
+
labels: [...h.labels]
|
|
129
129
|
};
|
|
130
|
-
s.children || (s.children = []), s.children.push(
|
|
131
|
-
} else if (
|
|
132
|
-
let
|
|
133
|
-
(
|
|
130
|
+
s.children || (s.children = []), s.children.push(p);
|
|
131
|
+
} else if (be(t)) {
|
|
132
|
+
let h = (u = s.children) == null ? void 0 : u.find(
|
|
133
|
+
(p) => p.type === "folder" && p.name === i
|
|
134
134
|
);
|
|
135
|
-
|
|
135
|
+
h || (h = {
|
|
136
136
|
id: d,
|
|
137
137
|
name: i,
|
|
138
138
|
type: "folder",
|
|
139
139
|
children: [],
|
|
140
140
|
labels: [...t._labels ?? []]
|
|
141
|
-
}, s.children || (s.children = []), s.children.push(
|
|
142
|
-
for (const [
|
|
143
|
-
|
|
144
|
-
} else if (
|
|
145
|
-
const
|
|
141
|
+
}, s.children || (s.children = []), s.children.push(h));
|
|
142
|
+
for (const [p, m] of Object.entries(t._entries))
|
|
143
|
+
tt(h, [p], m, o);
|
|
144
|
+
} else if (_e(t)) {
|
|
145
|
+
const h = {
|
|
146
146
|
id: d,
|
|
147
147
|
name: i,
|
|
148
148
|
type: "variants",
|
|
149
149
|
children: [],
|
|
150
150
|
labels: [...t._labels ?? []]
|
|
151
151
|
};
|
|
152
|
-
s.children || (s.children = []), s.children.push(
|
|
153
|
-
for (const [
|
|
154
|
-
const
|
|
155
|
-
id:
|
|
156
|
-
name:
|
|
152
|
+
s.children || (s.children = []), s.children.push(h);
|
|
153
|
+
for (const [p, m] of Object.entries(t._variants)) {
|
|
154
|
+
const b = [...o, p].join("/"), S = {
|
|
155
|
+
id: b,
|
|
156
|
+
name: p,
|
|
157
157
|
type: "component",
|
|
158
|
-
component:
|
|
159
|
-
labels: [...
|
|
158
|
+
component: Oe(m, b, p),
|
|
159
|
+
labels: [...m._options.labels ?? []]
|
|
160
160
|
};
|
|
161
|
-
|
|
161
|
+
h.children.push(S);
|
|
162
162
|
}
|
|
163
163
|
}
|
|
164
164
|
}
|
|
165
|
-
function
|
|
165
|
+
function Ve(r, e) {
|
|
166
166
|
if (e.length === 0)
|
|
167
167
|
return r;
|
|
168
168
|
let t = r;
|
|
@@ -173,29 +173,29 @@ function Me(r, e) {
|
|
|
173
173
|
}
|
|
174
174
|
return t;
|
|
175
175
|
}
|
|
176
|
-
function
|
|
176
|
+
function Ut(r) {
|
|
177
177
|
if (r.type === "component" && r.component)
|
|
178
178
|
return [r.component];
|
|
179
179
|
const e = [];
|
|
180
180
|
for (const t of r.children ?? [])
|
|
181
|
-
e.push(...
|
|
181
|
+
e.push(...Ut(t));
|
|
182
182
|
return e;
|
|
183
183
|
}
|
|
184
184
|
let L;
|
|
185
|
-
function
|
|
186
|
-
L ? L instanceof
|
|
185
|
+
function Pt(r) {
|
|
186
|
+
L ? L instanceof Me ? L.loggers.push(r) : L = new Me([L, r]) : L = r;
|
|
187
187
|
}
|
|
188
|
-
function
|
|
188
|
+
function y() {
|
|
189
189
|
return L;
|
|
190
190
|
}
|
|
191
|
-
let
|
|
192
|
-
function Ut(r) {
|
|
193
|
-
de = r;
|
|
194
|
-
}
|
|
191
|
+
let ae;
|
|
195
192
|
function Wt(r) {
|
|
196
|
-
|
|
193
|
+
ae = r;
|
|
194
|
+
}
|
|
195
|
+
function Gt(r) {
|
|
196
|
+
ae && ae(r);
|
|
197
197
|
}
|
|
198
|
-
class
|
|
198
|
+
class Me {
|
|
199
199
|
constructor(e) {
|
|
200
200
|
this.loggers = e;
|
|
201
201
|
}
|
|
@@ -248,7 +248,7 @@ class Fe {
|
|
|
248
248
|
t.handleEndTransaction(e);
|
|
249
249
|
}
|
|
250
250
|
}
|
|
251
|
-
var
|
|
251
|
+
var V;
|
|
252
252
|
(function(r) {
|
|
253
253
|
let e = !1;
|
|
254
254
|
function t() {
|
|
@@ -264,23 +264,23 @@ var F;
|
|
|
264
264
|
return;
|
|
265
265
|
const i = Error, d = i.stackTraceLimit;
|
|
266
266
|
i.stackTraceLimit = 3;
|
|
267
|
-
const
|
|
268
|
-
return i.stackTraceLimit = d,
|
|
267
|
+
const c = new Error().stack;
|
|
268
|
+
return i.stackTraceLimit = d, ye.fromStack(c, o + 1);
|
|
269
269
|
}
|
|
270
270
|
r.ofNthCaller = s;
|
|
271
|
-
})(
|
|
272
|
-
class
|
|
271
|
+
})(V || (V = {}));
|
|
272
|
+
class ye {
|
|
273
273
|
static fromStack(e, t) {
|
|
274
274
|
const n = e.split(`
|
|
275
|
-
`), s =
|
|
275
|
+
`), s = qt(n[t + 1]);
|
|
276
276
|
if (s)
|
|
277
|
-
return new
|
|
277
|
+
return new ye(s.fileName, s.line, s.column, s.id);
|
|
278
278
|
}
|
|
279
279
|
constructor(e, t, n, s) {
|
|
280
280
|
this.fileName = e, this.line = t, this.column = n, this.id = s;
|
|
281
281
|
}
|
|
282
282
|
}
|
|
283
|
-
function
|
|
283
|
+
function qt(r) {
|
|
284
284
|
if (!r)
|
|
285
285
|
return;
|
|
286
286
|
const e = r.match(/\((.*):(\d+):(\d+)\)/);
|
|
@@ -300,32 +300,32 @@ function Gt(r) {
|
|
|
300
300
|
id: r
|
|
301
301
|
};
|
|
302
302
|
}
|
|
303
|
-
class
|
|
303
|
+
class D {
|
|
304
304
|
constructor(e, t, n) {
|
|
305
305
|
this.owner = e, this.debugNameSource = t, this.referenceFn = n;
|
|
306
306
|
}
|
|
307
307
|
getDebugName(e) {
|
|
308
|
-
return
|
|
308
|
+
return Kt(e, this);
|
|
309
309
|
}
|
|
310
310
|
}
|
|
311
|
-
const
|
|
312
|
-
function
|
|
313
|
-
const t =
|
|
311
|
+
const Fe = /* @__PURE__ */ new Map(), de = /* @__PURE__ */ new WeakMap();
|
|
312
|
+
function Kt(r, e) {
|
|
313
|
+
const t = de.get(r);
|
|
314
314
|
if (t)
|
|
315
315
|
return t;
|
|
316
|
-
const n =
|
|
316
|
+
const n = Jt(r, e);
|
|
317
317
|
if (n) {
|
|
318
|
-
let s =
|
|
319
|
-
s++,
|
|
318
|
+
let s = Fe.get(n) ?? 0;
|
|
319
|
+
s++, Fe.set(n, s);
|
|
320
320
|
const o = s === 1 ? n : `${n}#${s}`;
|
|
321
|
-
return
|
|
321
|
+
return de.set(r, o), o;
|
|
322
322
|
}
|
|
323
323
|
}
|
|
324
|
-
function
|
|
325
|
-
const t =
|
|
324
|
+
function Jt(r, e) {
|
|
325
|
+
const t = de.get(r);
|
|
326
326
|
if (t)
|
|
327
327
|
return t;
|
|
328
|
-
const n = e.owner ?
|
|
328
|
+
const n = e.owner ? Zt(e.owner) + "." : "";
|
|
329
329
|
let s;
|
|
330
330
|
const o = e.debugNameSource;
|
|
331
331
|
if (o !== void 0)
|
|
@@ -335,56 +335,56 @@ function Kt(r, e) {
|
|
|
335
335
|
} else
|
|
336
336
|
return n + o;
|
|
337
337
|
const i = e.referenceFn;
|
|
338
|
-
if (i !== void 0 && (s =
|
|
338
|
+
if (i !== void 0 && (s = xe(i), s !== void 0))
|
|
339
339
|
return n + s;
|
|
340
340
|
if (e.owner !== void 0) {
|
|
341
|
-
const d =
|
|
341
|
+
const d = Qt(e.owner, r);
|
|
342
342
|
if (d !== void 0)
|
|
343
343
|
return n + d;
|
|
344
344
|
}
|
|
345
345
|
}
|
|
346
|
-
function
|
|
346
|
+
function Qt(r, e) {
|
|
347
347
|
for (const t in r)
|
|
348
348
|
if (r[t] === e)
|
|
349
349
|
return t;
|
|
350
350
|
}
|
|
351
|
-
const Ee = /* @__PURE__ */ new Map(),
|
|
352
|
-
function
|
|
353
|
-
const e =
|
|
351
|
+
const Ee = /* @__PURE__ */ new Map(), De = /* @__PURE__ */ new WeakMap();
|
|
352
|
+
function Zt(r) {
|
|
353
|
+
const e = De.get(r);
|
|
354
354
|
if (e)
|
|
355
355
|
return e;
|
|
356
|
-
const t =
|
|
356
|
+
const t = rt(r) ?? "Object";
|
|
357
357
|
let n = Ee.get(t) ?? 0;
|
|
358
358
|
n++, Ee.set(t, n);
|
|
359
359
|
const s = n === 1 ? t : `${t}#${n}`;
|
|
360
|
-
return
|
|
360
|
+
return De.set(r, s), s;
|
|
361
361
|
}
|
|
362
|
-
function
|
|
362
|
+
function rt(r) {
|
|
363
363
|
const e = r.constructor;
|
|
364
364
|
if (e)
|
|
365
365
|
return e.name === "Object" ? void 0 : e.name;
|
|
366
366
|
}
|
|
367
|
-
function
|
|
367
|
+
function xe(r) {
|
|
368
368
|
const e = r.toString(), n = /\/\*\*\s*@description\s*([^*]*)\*\//.exec(e), s = n ? n[1] : void 0;
|
|
369
369
|
return s == null ? void 0 : s.trim();
|
|
370
370
|
}
|
|
371
371
|
let ce;
|
|
372
|
-
function
|
|
372
|
+
function Xt(r) {
|
|
373
373
|
ce = r;
|
|
374
374
|
}
|
|
375
|
+
let nt;
|
|
376
|
+
function Yt(r) {
|
|
377
|
+
nt = r;
|
|
378
|
+
}
|
|
375
379
|
let st;
|
|
376
|
-
function
|
|
380
|
+
function er(r) {
|
|
377
381
|
st = r;
|
|
378
382
|
}
|
|
379
383
|
let ot;
|
|
380
|
-
function
|
|
384
|
+
function tr(r) {
|
|
381
385
|
ot = r;
|
|
382
386
|
}
|
|
383
|
-
|
|
384
|
-
function er(r) {
|
|
385
|
-
it = r;
|
|
386
|
-
}
|
|
387
|
-
class tr {
|
|
387
|
+
class rr {
|
|
388
388
|
get TChange() {
|
|
389
389
|
return null;
|
|
390
390
|
}
|
|
@@ -395,17 +395,17 @@ class tr {
|
|
|
395
395
|
read(e) {
|
|
396
396
|
return e ? e.readObservable(this) : this.get();
|
|
397
397
|
}
|
|
398
|
-
map(e, t, n =
|
|
398
|
+
map(e, t, n = V.ofCaller()) {
|
|
399
399
|
const s = t === void 0 ? void 0 : e, o = t === void 0 ? e : t;
|
|
400
400
|
return ce({
|
|
401
401
|
owner: s,
|
|
402
402
|
debugName: () => {
|
|
403
|
-
const i =
|
|
403
|
+
const i = xe(o);
|
|
404
404
|
if (i !== void 0)
|
|
405
405
|
return i;
|
|
406
|
-
const
|
|
407
|
-
if (
|
|
408
|
-
return `${this.debugName}.${
|
|
406
|
+
const c = /^\s*\(?\s*([a-zA-Z_$][a-zA-Z_$0-9]*)\s*\)?\s*=>\s*\1(?:\??)\.([a-zA-Z_$][a-zA-Z_$0-9]*)\s*$/.exec(o.toString());
|
|
407
|
+
if (c)
|
|
408
|
+
return `${this.debugName}.${c[2]}`;
|
|
409
409
|
if (!s)
|
|
410
410
|
return `${this.debugName} (mapped)`;
|
|
411
411
|
},
|
|
@@ -423,7 +423,7 @@ class tr {
|
|
|
423
423
|
}, (e) => this.read(e).read(e));
|
|
424
424
|
}
|
|
425
425
|
recomputeInitiallyAndOnChange(e, t) {
|
|
426
|
-
return e.add(
|
|
426
|
+
return e.add(nt(this, t)), this;
|
|
427
427
|
}
|
|
428
428
|
/**
|
|
429
429
|
* Ensures that this observable is observed. This keeps the cache alive.
|
|
@@ -431,29 +431,29 @@ class tr {
|
|
|
431
431
|
* Use `recomputeInitiallyAndOnChange` for eager evaluation.
|
|
432
432
|
*/
|
|
433
433
|
keepObserved(e) {
|
|
434
|
-
return e.add(
|
|
434
|
+
return e.add(st(this)), this;
|
|
435
435
|
}
|
|
436
436
|
get debugValue() {
|
|
437
437
|
return this.get();
|
|
438
438
|
}
|
|
439
439
|
debugGetDependencyGraph() {
|
|
440
|
-
return
|
|
440
|
+
return ot(this);
|
|
441
441
|
}
|
|
442
442
|
}
|
|
443
|
-
class
|
|
443
|
+
class Se extends rr {
|
|
444
444
|
constructor(e) {
|
|
445
445
|
var t;
|
|
446
|
-
super(), this._observers = /* @__PURE__ */ new Set(), (t =
|
|
446
|
+
super(), this._observers = /* @__PURE__ */ new Set(), (t = y()) == null || t.handleObservableCreated(this, e);
|
|
447
447
|
}
|
|
448
448
|
addObserver(e) {
|
|
449
449
|
var n;
|
|
450
450
|
const t = this._observers.size;
|
|
451
|
-
this._observers.add(e), t === 0 && this.onFirstObserverAdded(), t !== this._observers.size && ((n =
|
|
451
|
+
this._observers.add(e), t === 0 && this.onFirstObserverAdded(), t !== this._observers.size && ((n = y()) == null || n.handleOnListenerCountChanged(this, this._observers.size));
|
|
452
452
|
}
|
|
453
453
|
removeObserver(e) {
|
|
454
454
|
var n;
|
|
455
455
|
const t = this._observers.delete(e);
|
|
456
|
-
t && this._observers.size === 0 && this.onLastObserverRemoved(), t && ((n =
|
|
456
|
+
t && this._observers.size === 0 && this.onLastObserverRemoved(), t && ((n = y()) == null || n.handleOnListenerCountChanged(this, this._observers.size));
|
|
457
457
|
}
|
|
458
458
|
onFirstObserverAdded() {
|
|
459
459
|
}
|
|
@@ -461,27 +461,27 @@ class we extends tr {
|
|
|
461
461
|
}
|
|
462
462
|
log() {
|
|
463
463
|
var t;
|
|
464
|
-
const e = !!
|
|
465
|
-
return
|
|
464
|
+
const e = !!y();
|
|
465
|
+
return Gt(this), e || (t = y()) == null || t.handleObservableCreated(this, V.ofCaller()), this;
|
|
466
466
|
}
|
|
467
467
|
debugGetObservers() {
|
|
468
468
|
return this._observers;
|
|
469
469
|
}
|
|
470
470
|
}
|
|
471
|
-
function
|
|
471
|
+
function it(r) {
|
|
472
472
|
return {
|
|
473
473
|
dispose: r
|
|
474
474
|
};
|
|
475
475
|
}
|
|
476
|
-
class
|
|
476
|
+
class j extends Error {
|
|
477
477
|
constructor(e) {
|
|
478
|
-
super(e || "An unexpected bug occurred."), Object.setPrototypeOf(this,
|
|
478
|
+
super(e || "An unexpected bug occurred."), Object.setPrototypeOf(this, j.prototype);
|
|
479
479
|
}
|
|
480
480
|
}
|
|
481
|
-
function
|
|
481
|
+
function re(r) {
|
|
482
482
|
throw r;
|
|
483
483
|
}
|
|
484
|
-
function
|
|
484
|
+
function nr(r) {
|
|
485
485
|
console.error("Unexpected error:", r);
|
|
486
486
|
}
|
|
487
487
|
const X = (r, e) => r === e;
|
|
@@ -513,7 +513,7 @@ class Y {
|
|
|
513
513
|
this.disposables = [];
|
|
514
514
|
}
|
|
515
515
|
}
|
|
516
|
-
function
|
|
516
|
+
function sr(r) {
|
|
517
517
|
switch (r) {
|
|
518
518
|
case 0:
|
|
519
519
|
return "initial";
|
|
@@ -527,7 +527,7 @@ function nr(r) {
|
|
|
527
527
|
return "<unknown>";
|
|
528
528
|
}
|
|
529
529
|
}
|
|
530
|
-
class
|
|
530
|
+
class U extends Se {
|
|
531
531
|
get debugName() {
|
|
532
532
|
return this._debugNameData.getDebugName(this) ?? "(anonymous)";
|
|
533
533
|
}
|
|
@@ -537,7 +537,7 @@ class j extends we {
|
|
|
537
537
|
}
|
|
538
538
|
onLastObserverRemoved() {
|
|
539
539
|
var e, t;
|
|
540
|
-
this._state = 0, this._value = void 0, (e =
|
|
540
|
+
this._state = 0, this._value = void 0, (e = y()) == null || e.handleDerivedCleared(this);
|
|
541
541
|
for (const n of this._dependencies)
|
|
542
542
|
n.removeObserver(this);
|
|
543
543
|
this._dependencies.clear(), this._store !== void 0 && (this._store.dispose(), this._store = void 0), this._delayedStore !== void 0 && (this._delayedStore.dispose(), this._delayedStore = void 0), (t = this._handleLastObserverRemoved) == null || t.call(this);
|
|
@@ -575,27 +575,27 @@ class j extends we {
|
|
|
575
575
|
try {
|
|
576
576
|
const d = this._changeSummary;
|
|
577
577
|
this._isReaderValid = !0, this._changeTracker && (this._isInBeforeUpdate = !0, (s = (n = this._changeTracker).beforeUpdate) == null || s.call(n, this, d), this._isInBeforeUpdate = !1, this._changeSummary = (o = this._changeTracker) == null ? void 0 : o.createChangeSummary(d));
|
|
578
|
-
const
|
|
578
|
+
const c = this._state !== 0, u = this._value;
|
|
579
579
|
this._state = 3;
|
|
580
|
-
const
|
|
581
|
-
|
|
580
|
+
const h = this._delayedStore;
|
|
581
|
+
h !== void 0 && (this._delayedStore = void 0);
|
|
582
582
|
try {
|
|
583
583
|
this._store !== void 0 && (this._store.dispose(), this._store = void 0), this._value = this._computeFn(this, d);
|
|
584
584
|
} finally {
|
|
585
585
|
this._isReaderValid = !1;
|
|
586
|
-
for (const
|
|
587
|
-
|
|
588
|
-
this._dependenciesToBeRemoved.clear(),
|
|
586
|
+
for (const p of this._dependenciesToBeRemoved)
|
|
587
|
+
p.removeObserver(this);
|
|
588
|
+
this._dependenciesToBeRemoved.clear(), h !== void 0 && h.dispose();
|
|
589
589
|
}
|
|
590
|
-
e = this._didReportChange ||
|
|
591
|
-
oldValue:
|
|
590
|
+
e = this._didReportChange || c && !this._equalityComparator(u, this._value), (i = y()) == null || i.handleObservableUpdated(this, {
|
|
591
|
+
oldValue: u,
|
|
592
592
|
newValue: this._value,
|
|
593
593
|
change: void 0,
|
|
594
594
|
didChange: e,
|
|
595
|
-
hadValue:
|
|
595
|
+
hadValue: c
|
|
596
596
|
});
|
|
597
597
|
} catch (d) {
|
|
598
|
-
|
|
598
|
+
re(d);
|
|
599
599
|
}
|
|
600
600
|
if (this._isComputing = !1, !this._didReportChange && e)
|
|
601
601
|
for (const d of this._observers)
|
|
@@ -609,7 +609,7 @@ class j extends we {
|
|
|
609
609
|
// IObserver Implementation
|
|
610
610
|
beginUpdate(e) {
|
|
611
611
|
if (this._isUpdating)
|
|
612
|
-
throw new
|
|
612
|
+
throw new j("Cyclic deriveds are not supported yet!");
|
|
613
613
|
this._updateCount++, this._isUpdating = !0;
|
|
614
614
|
try {
|
|
615
615
|
const t = this._updateCount === 1;
|
|
@@ -646,7 +646,7 @@ class j extends we {
|
|
|
646
646
|
handleChange(e, t) {
|
|
647
647
|
var n;
|
|
648
648
|
if (this._dependencies.has(e) && !this._dependenciesToBeRemoved.has(e) || this._isInBeforeUpdate) {
|
|
649
|
-
(n =
|
|
649
|
+
(n = y()) == null || n.handleDerivedDependencyChanged(this, e, t);
|
|
650
650
|
let s = !1;
|
|
651
651
|
try {
|
|
652
652
|
s = this._changeTracker ? this._changeTracker.handleChange({
|
|
@@ -655,7 +655,7 @@ class j extends we {
|
|
|
655
655
|
didChange: (i) => i === e
|
|
656
656
|
}, this._changeSummary) : !0;
|
|
657
657
|
} catch (i) {
|
|
658
|
-
|
|
658
|
+
re(i);
|
|
659
659
|
}
|
|
660
660
|
const o = this._state === 3;
|
|
661
661
|
if (s && (this._state === 1 || o) && (this._state = 2, o))
|
|
@@ -666,7 +666,7 @@ class j extends we {
|
|
|
666
666
|
// IReader Implementation
|
|
667
667
|
_ensureReaderValid() {
|
|
668
668
|
if (!this._isReaderValid)
|
|
669
|
-
throw new
|
|
669
|
+
throw new j("The reader object cannot be used outside its compute function!");
|
|
670
670
|
}
|
|
671
671
|
readObservable(e) {
|
|
672
672
|
this._ensureReaderValid(), e.addObserver(this);
|
|
@@ -694,7 +694,7 @@ class j extends we {
|
|
|
694
694
|
debugGetState() {
|
|
695
695
|
return {
|
|
696
696
|
state: this._state,
|
|
697
|
-
stateStr:
|
|
697
|
+
stateStr: sr(this._state),
|
|
698
698
|
updateCount: this._updateCount,
|
|
699
699
|
isComputing: this._isComputing,
|
|
700
700
|
dependencies: this._dependencies,
|
|
@@ -715,18 +715,18 @@ class j extends we {
|
|
|
715
715
|
o.handleChange(this, n);
|
|
716
716
|
}
|
|
717
717
|
}
|
|
718
|
-
function
|
|
719
|
-
return e !== void 0 ? new
|
|
718
|
+
function O(r, e, t = V.ofCaller()) {
|
|
719
|
+
return e !== void 0 ? new U(new D(r, void 0, e), e, void 0, void 0, X, t) : new U(new D(void 0, void 0, r), r, void 0, void 0, X, t);
|
|
720
720
|
}
|
|
721
|
-
function
|
|
722
|
-
return new
|
|
721
|
+
function or(r, e, t = V.ofCaller()) {
|
|
722
|
+
return new U(new D(r.owner, r.debugName, r.debugReferenceFn), e, void 0, r.onLastObserverRemoved, r.equalsFn ?? X, t);
|
|
723
723
|
}
|
|
724
|
-
|
|
725
|
-
function
|
|
724
|
+
Xt(or);
|
|
725
|
+
function ir(r, e, t = V.ofCaller()) {
|
|
726
726
|
let n, s;
|
|
727
727
|
n = r, s = void 0;
|
|
728
728
|
let o;
|
|
729
|
-
return new
|
|
729
|
+
return new U(new D(s, void 0, n), (i) => {
|
|
730
730
|
o ? o.clear() : o = new Y();
|
|
731
731
|
const d = n(i);
|
|
732
732
|
return d && o.add(d), d;
|
|
@@ -734,7 +734,7 @@ function or(r, e, t = F.ofCaller()) {
|
|
|
734
734
|
o && (o.dispose(), o = void 0);
|
|
735
735
|
}, X, t);
|
|
736
736
|
}
|
|
737
|
-
function
|
|
737
|
+
function ar(r) {
|
|
738
738
|
switch (r) {
|
|
739
739
|
case 1:
|
|
740
740
|
return "dependenciesMightHaveChanged";
|
|
@@ -746,13 +746,13 @@ function ir(r) {
|
|
|
746
746
|
return "<unknown>";
|
|
747
747
|
}
|
|
748
748
|
}
|
|
749
|
-
class
|
|
749
|
+
class at {
|
|
750
750
|
get debugName() {
|
|
751
751
|
return this._debugNameData.getDebugName(this) ?? "(anonymous)";
|
|
752
752
|
}
|
|
753
753
|
constructor(e, t, n, s) {
|
|
754
754
|
var o, i;
|
|
755
|
-
this._debugNameData = e, this._runFn = t, this._changeTracker = n, this._state = 2, this._updateCount = 0, this._disposed = !1, this._dependencies = /* @__PURE__ */ new Set(), this._dependenciesToBeRemoved = /* @__PURE__ */ new Set(), this._isRunning = !1, this._store = void 0, this._delayedStore = void 0, this._changeSummary = (o = this._changeTracker) == null ? void 0 : o.createChangeSummary(void 0), (i =
|
|
755
|
+
this._debugNameData = e, this._runFn = t, this._changeTracker = n, this._state = 2, this._updateCount = 0, this._disposed = !1, this._dependencies = /* @__PURE__ */ new Set(), this._dependenciesToBeRemoved = /* @__PURE__ */ new Set(), this._isRunning = !1, this._store = void 0, this._delayedStore = void 0, this._changeSummary = (o = this._changeTracker) == null ? void 0 : o.createChangeSummary(void 0), (i = y()) == null || i.handleAutorunCreated(this, s), this._run();
|
|
756
756
|
}
|
|
757
757
|
dispose() {
|
|
758
758
|
var e;
|
|
@@ -760,7 +760,7 @@ class dt {
|
|
|
760
760
|
this._disposed = !0;
|
|
761
761
|
for (const t of this._dependencies)
|
|
762
762
|
t.removeObserver(this);
|
|
763
|
-
this._dependencies.clear(), this._store !== void 0 && this._store.dispose(), this._delayedStore !== void 0 && this._delayedStore.dispose(), (e =
|
|
763
|
+
this._dependencies.clear(), this._store !== void 0 && this._store.dispose(), this._delayedStore !== void 0 && this._delayedStore.dispose(), (e = y()) == null || e.handleAutorunDisposed(this);
|
|
764
764
|
}
|
|
765
765
|
}
|
|
766
766
|
_run() {
|
|
@@ -769,19 +769,19 @@ class dt {
|
|
|
769
769
|
this._dependenciesToBeRemoved = this._dependencies, this._dependencies = e, this._state = 3;
|
|
770
770
|
try {
|
|
771
771
|
if (!this._disposed) {
|
|
772
|
-
(t =
|
|
772
|
+
(t = y()) == null || t.handleAutorunStarted(this);
|
|
773
773
|
const i = this._changeSummary, d = this._delayedStore;
|
|
774
774
|
d !== void 0 && (this._delayedStore = void 0);
|
|
775
775
|
try {
|
|
776
776
|
this._isRunning = !0, this._changeTracker && ((s = (n = this._changeTracker).beforeUpdate) == null || s.call(n, this, i), this._changeSummary = this._changeTracker.createChangeSummary(i)), this._store !== void 0 && (this._store.dispose(), this._store = void 0), this._runFn(this, i);
|
|
777
|
-
} catch (
|
|
778
|
-
|
|
777
|
+
} catch (c) {
|
|
778
|
+
re(c);
|
|
779
779
|
} finally {
|
|
780
780
|
this._isRunning = !1, d !== void 0 && d.dispose();
|
|
781
781
|
}
|
|
782
782
|
}
|
|
783
783
|
} finally {
|
|
784
|
-
this._disposed || (o =
|
|
784
|
+
this._disposed || (o = y()) == null || o.handleAutorunFinished(this);
|
|
785
785
|
for (const i of this._dependenciesToBeRemoved)
|
|
786
786
|
i.removeObserver(this);
|
|
787
787
|
this._dependenciesToBeRemoved.clear();
|
|
@@ -816,7 +816,7 @@ class dt {
|
|
|
816
816
|
handleChange(e, t) {
|
|
817
817
|
var n;
|
|
818
818
|
if (this._isDependency(e)) {
|
|
819
|
-
(n =
|
|
819
|
+
(n = y()) == null || n.handleAutorunDependencyChanged(this, e, t);
|
|
820
820
|
try {
|
|
821
821
|
(this._changeTracker ? this._changeTracker.handleChange({
|
|
822
822
|
changedObservable: e,
|
|
@@ -824,7 +824,7 @@ class dt {
|
|
|
824
824
|
didChange: (o) => o === e
|
|
825
825
|
}, this._changeSummary) : !0) && (this._state = 2);
|
|
826
826
|
} catch (s) {
|
|
827
|
-
|
|
827
|
+
re(s);
|
|
828
828
|
}
|
|
829
829
|
}
|
|
830
830
|
}
|
|
@@ -834,7 +834,7 @@ class dt {
|
|
|
834
834
|
// IReader implementation
|
|
835
835
|
_ensureNoRunning() {
|
|
836
836
|
if (!this._isRunning)
|
|
837
|
-
throw new
|
|
837
|
+
throw new j("The reader object cannot be used outside its compute function!");
|
|
838
838
|
}
|
|
839
839
|
readObservable(e) {
|
|
840
840
|
if (this._ensureNoRunning(), this._disposed)
|
|
@@ -845,12 +845,12 @@ class dt {
|
|
|
845
845
|
}
|
|
846
846
|
get store() {
|
|
847
847
|
if (this._ensureNoRunning(), this._disposed)
|
|
848
|
-
throw new
|
|
848
|
+
throw new j("Cannot access store after dispose");
|
|
849
849
|
return this._store === void 0 && (this._store = new Y()), this._store;
|
|
850
850
|
}
|
|
851
851
|
get delayedStore() {
|
|
852
852
|
if (this._ensureNoRunning(), this._disposed)
|
|
853
|
-
throw new
|
|
853
|
+
throw new j("Cannot access store after dispose");
|
|
854
854
|
return this._delayedStore === void 0 && (this._delayedStore = new Y()), this._delayedStore;
|
|
855
855
|
}
|
|
856
856
|
debugGetState() {
|
|
@@ -859,42 +859,42 @@ class dt {
|
|
|
859
859
|
updateCount: this._updateCount,
|
|
860
860
|
dependencies: this._dependencies,
|
|
861
861
|
state: this._state,
|
|
862
|
-
stateStr:
|
|
862
|
+
stateStr: ar(this._state)
|
|
863
863
|
};
|
|
864
864
|
}
|
|
865
865
|
debugRerun() {
|
|
866
866
|
this._isRunning ? this._state = 2 : this._run();
|
|
867
867
|
}
|
|
868
868
|
}
|
|
869
|
-
function
|
|
870
|
-
return new
|
|
869
|
+
function dt(r, e = V.ofCaller()) {
|
|
870
|
+
return new at(new D(void 0, void 0, r), r, void 0, e);
|
|
871
871
|
}
|
|
872
|
-
function
|
|
872
|
+
function Be(r) {
|
|
873
873
|
const e = new Error("BugIndicatingErrorRecovery: " + r);
|
|
874
|
-
|
|
874
|
+
nr(e), console.error("recovered from an error that indicates a bug", e);
|
|
875
875
|
}
|
|
876
876
|
function ct(r, e) {
|
|
877
|
-
const t = new
|
|
877
|
+
const t = new lt(r, e);
|
|
878
878
|
try {
|
|
879
879
|
r(t);
|
|
880
880
|
} finally {
|
|
881
881
|
t.finish();
|
|
882
882
|
}
|
|
883
883
|
}
|
|
884
|
-
function
|
|
884
|
+
function dr(r, e, t) {
|
|
885
885
|
r ? e(r) : ct(e, t);
|
|
886
886
|
}
|
|
887
|
-
class
|
|
887
|
+
class lt {
|
|
888
888
|
constructor(e, t) {
|
|
889
889
|
var n;
|
|
890
|
-
this._fn = e, this._getDebugName = t, this._updatingObservers = [], (n =
|
|
890
|
+
this._fn = e, this._getDebugName = t, this._updatingObservers = [], (n = y()) == null || n.handleBeginTransaction(this);
|
|
891
891
|
}
|
|
892
892
|
getDebugName() {
|
|
893
|
-
return this._getDebugName ? this._getDebugName() :
|
|
893
|
+
return this._getDebugName ? this._getDebugName() : xe(this._fn);
|
|
894
894
|
}
|
|
895
895
|
updateObserver(e, t) {
|
|
896
896
|
if (!this._updatingObservers) {
|
|
897
|
-
|
|
897
|
+
Be("Transaction already finished!"), ct((n) => {
|
|
898
898
|
n.updateObserver(e, t);
|
|
899
899
|
});
|
|
900
900
|
return;
|
|
@@ -905,30 +905,30 @@ class ht {
|
|
|
905
905
|
var t;
|
|
906
906
|
const e = this._updatingObservers;
|
|
907
907
|
if (!e) {
|
|
908
|
-
|
|
908
|
+
Be("transaction.finish() has already been called!");
|
|
909
909
|
return;
|
|
910
910
|
}
|
|
911
911
|
for (let n = 0; n < e.length; n++) {
|
|
912
912
|
const { observer: s, observable: o } = e[n];
|
|
913
913
|
s.endUpdate(o);
|
|
914
914
|
}
|
|
915
|
-
this._updatingObservers = null, (t =
|
|
915
|
+
this._updatingObservers = null, (t = y()) == null || t.handleEndTransaction(this);
|
|
916
916
|
}
|
|
917
917
|
debugGetUpdatingObservers() {
|
|
918
918
|
return this._updatingObservers;
|
|
919
919
|
}
|
|
920
920
|
}
|
|
921
|
-
function
|
|
921
|
+
function x(r, e, t = V.ofCaller()) {
|
|
922
922
|
let n;
|
|
923
|
-
return typeof r == "string" ? n = new
|
|
923
|
+
return typeof r == "string" ? n = new D(void 0, r, void 0) : n = new D(r, void 0, void 0), new ht(n, e, X, t);
|
|
924
924
|
}
|
|
925
|
-
class
|
|
925
|
+
class ht extends Se {
|
|
926
926
|
get debugName() {
|
|
927
927
|
return this._debugNameData.getDebugName(this) ?? "ObservableValue";
|
|
928
928
|
}
|
|
929
929
|
constructor(e, t, n, s) {
|
|
930
930
|
var o;
|
|
931
|
-
super(s), this._debugNameData = e, this._equalityComparator = n, this._value = t, (o =
|
|
931
|
+
super(s), this._debugNameData = e, this._equalityComparator = n, this._value = t, (o = y()) == null || o.handleObservableUpdated(this, { hadValue: !1, newValue: t, change: void 0, didChange: !0, oldValue: void 0 });
|
|
932
932
|
}
|
|
933
933
|
get() {
|
|
934
934
|
return this._value;
|
|
@@ -938,11 +938,11 @@ class ut extends we {
|
|
|
938
938
|
if (n === void 0 && this._equalityComparator(this._value, e))
|
|
939
939
|
return;
|
|
940
940
|
let s;
|
|
941
|
-
t || (t = s = new
|
|
941
|
+
t || (t = s = new lt(() => {
|
|
942
942
|
}, () => `Setting ${this.debugName}`));
|
|
943
943
|
try {
|
|
944
944
|
const i = this._value;
|
|
945
|
-
this._setValue(e), (o =
|
|
945
|
+
this._setValue(e), (o = y()) == null || o.handleObservableUpdated(this, { oldValue: i, newValue: e, change: n, didChange: !0, hadValue: !0 });
|
|
946
946
|
for (const d of this._observers)
|
|
947
947
|
t.updateObserver(d, this), d.handleChange(this, n);
|
|
948
948
|
} finally {
|
|
@@ -964,25 +964,25 @@ class ut extends we {
|
|
|
964
964
|
this._value = e;
|
|
965
965
|
}
|
|
966
966
|
}
|
|
967
|
-
function
|
|
967
|
+
function Ae(...r) {
|
|
968
968
|
let e, t, n, s;
|
|
969
|
-
return r.length === 2 ? [t, n] = r : [e, t, n, s] = r, new H(new
|
|
969
|
+
return r.length === 2 ? [t, n] = r : [e, t, n, s] = r, new H(new D(e, void 0, n), t, n, () => H.globalTransaction, X, s ?? V.ofCaller());
|
|
970
970
|
}
|
|
971
|
-
class H extends
|
|
971
|
+
class H extends Se {
|
|
972
972
|
constructor(e, t, n, s, o, i) {
|
|
973
973
|
super(i), this._debugNameData = e, this.event = t, this._getValue = n, this._getTransaction = s, this._equalityComparator = o, this._hasValue = !1, this.handleEvent = (d) => {
|
|
974
|
-
var
|
|
975
|
-
const
|
|
976
|
-
let
|
|
977
|
-
|
|
978
|
-
var
|
|
979
|
-
(
|
|
980
|
-
for (const
|
|
981
|
-
|
|
974
|
+
var m;
|
|
975
|
+
const c = this._getValue(d), u = this._value, h = !this._hasValue || !this._equalityComparator(u, c);
|
|
976
|
+
let p = !1;
|
|
977
|
+
h && (this._value = c, this._hasValue && (p = !0, dr(this._getTransaction(), (b) => {
|
|
978
|
+
var S;
|
|
979
|
+
(S = y()) == null || S.handleObservableUpdated(this, { oldValue: u, newValue: c, change: void 0, didChange: h, hadValue: this._hasValue });
|
|
980
|
+
for (const C of this._observers)
|
|
981
|
+
b.updateObserver(C, this), C.handleChange(this, void 0);
|
|
982
982
|
}, () => {
|
|
983
|
-
const
|
|
984
|
-
return "Event fired" + (
|
|
985
|
-
})), this._hasValue = !0),
|
|
983
|
+
const b = this.getDebugName();
|
|
984
|
+
return "Event fired" + (b ? `: ${b}` : "");
|
|
985
|
+
})), this._hasValue = !0), p || (m = y()) == null || m.handleObservableUpdated(this, { oldValue: u, newValue: c, change: void 0, didChange: h, hadValue: this._hasValue });
|
|
986
986
|
};
|
|
987
987
|
}
|
|
988
988
|
getDebugName() {
|
|
@@ -1020,28 +1020,28 @@ class H extends we {
|
|
|
1020
1020
|
}
|
|
1021
1021
|
}
|
|
1022
1022
|
r.batchEventsGlobally = e;
|
|
1023
|
-
})(
|
|
1024
|
-
function
|
|
1025
|
-
const e = new
|
|
1026
|
-
return r.addObserver(e),
|
|
1023
|
+
})(Ae || (Ae = {}));
|
|
1024
|
+
function cr(r) {
|
|
1025
|
+
const e = new ut(!1, void 0);
|
|
1026
|
+
return r.addObserver(e), it(() => {
|
|
1027
1027
|
r.removeObserver(e);
|
|
1028
1028
|
});
|
|
1029
1029
|
}
|
|
1030
|
-
|
|
1030
|
+
er(cr);
|
|
1031
1031
|
function lr(r, e) {
|
|
1032
|
-
const t = new
|
|
1032
|
+
const t = new ut(!0, e);
|
|
1033
1033
|
r.addObserver(t);
|
|
1034
1034
|
try {
|
|
1035
1035
|
t.beginUpdate(r);
|
|
1036
1036
|
} finally {
|
|
1037
1037
|
t.endUpdate(r);
|
|
1038
1038
|
}
|
|
1039
|
-
return
|
|
1039
|
+
return it(() => {
|
|
1040
1040
|
r.removeObserver(t);
|
|
1041
1041
|
});
|
|
1042
1042
|
}
|
|
1043
|
-
|
|
1044
|
-
class
|
|
1043
|
+
Yt(lr);
|
|
1044
|
+
class ut {
|
|
1045
1045
|
constructor(e, t) {
|
|
1046
1046
|
this._forceRecompute = e, this._handleValue = t, this._counter = 0;
|
|
1047
1047
|
}
|
|
@@ -1056,11 +1056,11 @@ class pt {
|
|
|
1056
1056
|
handleChange(e, t) {
|
|
1057
1057
|
}
|
|
1058
1058
|
}
|
|
1059
|
-
let
|
|
1060
|
-
function
|
|
1061
|
-
|
|
1059
|
+
let ee;
|
|
1060
|
+
function hr(r) {
|
|
1061
|
+
ee || (ee = new ur(), Pt(ee)), ee.addFilteredObj(r);
|
|
1062
1062
|
}
|
|
1063
|
-
class
|
|
1063
|
+
class ur {
|
|
1064
1064
|
constructor() {
|
|
1065
1065
|
this.indentation = 0, this.changedObservablesSets = /* @__PURE__ */ new WeakMap();
|
|
1066
1066
|
}
|
|
@@ -1072,32 +1072,32 @@ class hr {
|
|
|
1072
1072
|
return ((t = this._filteredObjects) == null ? void 0 : t.has(e)) ?? !0;
|
|
1073
1073
|
}
|
|
1074
1074
|
textToConsoleArgs(e) {
|
|
1075
|
-
return
|
|
1076
|
-
|
|
1075
|
+
return pr([
|
|
1076
|
+
P(vr("| ", this.indentation)),
|
|
1077
1077
|
e
|
|
1078
1078
|
]);
|
|
1079
1079
|
}
|
|
1080
1080
|
formatInfo(e) {
|
|
1081
1081
|
return e.hadValue ? e.didChange ? [
|
|
1082
|
-
|
|
1083
|
-
|
|
1082
|
+
P(" "),
|
|
1083
|
+
T(Z(e.oldValue, 70), {
|
|
1084
1084
|
color: "red",
|
|
1085
1085
|
strikeThrough: !0
|
|
1086
1086
|
}),
|
|
1087
|
-
|
|
1088
|
-
|
|
1087
|
+
P(" "),
|
|
1088
|
+
T(Z(e.newValue, 60), {
|
|
1089
1089
|
color: "green"
|
|
1090
1090
|
})
|
|
1091
|
-
] : [
|
|
1092
|
-
|
|
1093
|
-
|
|
1091
|
+
] : [P(" (unchanged)")] : [
|
|
1092
|
+
P(" "),
|
|
1093
|
+
T(Z(e.newValue, 60), {
|
|
1094
1094
|
color: "green"
|
|
1095
1095
|
}),
|
|
1096
|
-
|
|
1096
|
+
P(" (initial)")
|
|
1097
1097
|
];
|
|
1098
1098
|
}
|
|
1099
1099
|
handleObservableCreated(e) {
|
|
1100
|
-
if (e instanceof
|
|
1100
|
+
if (e instanceof U) {
|
|
1101
1101
|
const t = e;
|
|
1102
1102
|
this.changedObservablesSets.set(t, /* @__PURE__ */ new Set());
|
|
1103
1103
|
}
|
|
@@ -1106,20 +1106,20 @@ class hr {
|
|
|
1106
1106
|
}
|
|
1107
1107
|
handleObservableUpdated(e, t) {
|
|
1108
1108
|
if (this._isIncluded(e)) {
|
|
1109
|
-
if (e instanceof
|
|
1109
|
+
if (e instanceof U) {
|
|
1110
1110
|
this._handleDerivedRecomputed(e, t);
|
|
1111
1111
|
return;
|
|
1112
1112
|
}
|
|
1113
1113
|
console.log(...this.textToConsoleArgs([
|
|
1114
1114
|
W("observable value changed"),
|
|
1115
|
-
|
|
1115
|
+
T(e.debugName, { color: "BlueViolet" }),
|
|
1116
1116
|
...this.formatInfo(t)
|
|
1117
1117
|
]));
|
|
1118
1118
|
}
|
|
1119
1119
|
}
|
|
1120
1120
|
formatChanges(e) {
|
|
1121
1121
|
if (e.size !== 0)
|
|
1122
|
-
return
|
|
1122
|
+
return T(" (changed deps: " + [...e].map((t) => t.debugName).join(", ") + ")", { color: "gray" });
|
|
1123
1123
|
}
|
|
1124
1124
|
handleDerivedDependencyChanged(e, t, n) {
|
|
1125
1125
|
var s;
|
|
@@ -1131,7 +1131,7 @@ class hr {
|
|
|
1131
1131
|
const n = this.changedObservablesSets.get(e);
|
|
1132
1132
|
n && (console.log(...this.textToConsoleArgs([
|
|
1133
1133
|
W("derived recomputed"),
|
|
1134
|
-
|
|
1134
|
+
T(e.debugName, { color: "BlueViolet" }),
|
|
1135
1135
|
...this.formatInfo(t),
|
|
1136
1136
|
this.formatChanges(n),
|
|
1137
1137
|
{ data: [{ fn: e._debugNameData.referenceFn ?? e._computeFn }] }
|
|
@@ -1140,13 +1140,13 @@ class hr {
|
|
|
1140
1140
|
handleDerivedCleared(e) {
|
|
1141
1141
|
this._isIncluded(e) && console.log(...this.textToConsoleArgs([
|
|
1142
1142
|
W("derived cleared"),
|
|
1143
|
-
|
|
1143
|
+
T(e.debugName, { color: "BlueViolet" })
|
|
1144
1144
|
]));
|
|
1145
1145
|
}
|
|
1146
1146
|
handleFromEventObservableTriggered(e, t) {
|
|
1147
1147
|
this._isIncluded(e) && console.log(...this.textToConsoleArgs([
|
|
1148
1148
|
W("observable from event triggered"),
|
|
1149
|
-
|
|
1149
|
+
T(e.debugName, { color: "BlueViolet" }),
|
|
1150
1150
|
...this.formatInfo(t),
|
|
1151
1151
|
{ data: [{ fn: e._getValue }] }
|
|
1152
1152
|
]));
|
|
@@ -1163,7 +1163,7 @@ class hr {
|
|
|
1163
1163
|
const t = this.changedObservablesSets.get(e);
|
|
1164
1164
|
t && (this._isIncluded(e) && console.log(...this.textToConsoleArgs([
|
|
1165
1165
|
W("autorun"),
|
|
1166
|
-
|
|
1166
|
+
T(e.debugName, { color: "BlueViolet" }),
|
|
1167
1167
|
this.formatChanges(t),
|
|
1168
1168
|
{ data: [{ fn: e._debugNameData.referenceFn ?? e._runFn }] }
|
|
1169
1169
|
])), t.clear(), this.indentation++);
|
|
@@ -1175,7 +1175,7 @@ class hr {
|
|
|
1175
1175
|
let t = e.getDebugName();
|
|
1176
1176
|
t === void 0 && (t = ""), this._isIncluded(e) && console.log(...this.textToConsoleArgs([
|
|
1177
1177
|
W("transaction"),
|
|
1178
|
-
|
|
1178
|
+
T(t, { color: "BlueViolet" }),
|
|
1179
1179
|
{ data: [{ fn: e._fn }] }
|
|
1180
1180
|
])), this.indentation++;
|
|
1181
1181
|
}
|
|
@@ -1183,7 +1183,7 @@ class hr {
|
|
|
1183
1183
|
this.indentation--;
|
|
1184
1184
|
}
|
|
1185
1185
|
}
|
|
1186
|
-
function
|
|
1186
|
+
function pr(r) {
|
|
1187
1187
|
const e = new Array(), t = [];
|
|
1188
1188
|
let n = "";
|
|
1189
1189
|
function s(i) {
|
|
@@ -1196,13 +1196,13 @@ function ur(r) {
|
|
|
1196
1196
|
const o = [n, ...e];
|
|
1197
1197
|
return o.push(...t), o;
|
|
1198
1198
|
}
|
|
1199
|
-
function
|
|
1200
|
-
return
|
|
1199
|
+
function P(r) {
|
|
1200
|
+
return T(r, { color: "black" });
|
|
1201
1201
|
}
|
|
1202
1202
|
function W(r) {
|
|
1203
|
-
return
|
|
1203
|
+
return T(br(`${r}: `, 10), { color: "black", bold: !0 });
|
|
1204
1204
|
}
|
|
1205
|
-
function
|
|
1205
|
+
function T(r, e = {
|
|
1206
1206
|
color: "black"
|
|
1207
1207
|
}) {
|
|
1208
1208
|
function t(s) {
|
|
@@ -1218,12 +1218,12 @@ function I(r, e = {
|
|
|
1218
1218
|
}
|
|
1219
1219
|
function Z(r, e) {
|
|
1220
1220
|
try {
|
|
1221
|
-
return
|
|
1221
|
+
return fr(r, e);
|
|
1222
1222
|
} catch {
|
|
1223
1223
|
return "[[???]]";
|
|
1224
1224
|
}
|
|
1225
1225
|
}
|
|
1226
|
-
function
|
|
1226
|
+
function fr(r, e) {
|
|
1227
1227
|
switch (typeof r) {
|
|
1228
1228
|
case "number":
|
|
1229
1229
|
return "" + r;
|
|
@@ -1234,7 +1234,7 @@ function pr(r, e) {
|
|
|
1234
1234
|
case "undefined":
|
|
1235
1235
|
return "undefined";
|
|
1236
1236
|
case "object":
|
|
1237
|
-
return r === null ? "null" : Array.isArray(r) ?
|
|
1237
|
+
return r === null ? "null" : Array.isArray(r) ? gr(r, e) : mr(r, e);
|
|
1238
1238
|
case "symbol":
|
|
1239
1239
|
return r.toString();
|
|
1240
1240
|
case "function":
|
|
@@ -1243,7 +1243,7 @@ function pr(r, e) {
|
|
|
1243
1243
|
return "" + r;
|
|
1244
1244
|
}
|
|
1245
1245
|
}
|
|
1246
|
-
function
|
|
1246
|
+
function gr(r, e) {
|
|
1247
1247
|
let t = "[ ", n = !0;
|
|
1248
1248
|
for (const s of r) {
|
|
1249
1249
|
if (n || (t += ", "), t.length - 5 > e) {
|
|
@@ -1254,7 +1254,7 @@ function fr(r, e) {
|
|
|
1254
1254
|
}
|
|
1255
1255
|
return t += " ]", t;
|
|
1256
1256
|
}
|
|
1257
|
-
function
|
|
1257
|
+
function mr(r, e) {
|
|
1258
1258
|
try {
|
|
1259
1259
|
if (typeof r.toString == "function" && r.toString !== Object.prototype.toString) {
|
|
1260
1260
|
const i = r.toString();
|
|
@@ -1263,7 +1263,7 @@ function gr(r, e) {
|
|
|
1263
1263
|
} catch {
|
|
1264
1264
|
return "[[Object]]";
|
|
1265
1265
|
}
|
|
1266
|
-
const t =
|
|
1266
|
+
const t = rt(r);
|
|
1267
1267
|
let n = t ? t + "(" : "{ ", s = !0, o;
|
|
1268
1268
|
try {
|
|
1269
1269
|
o = Object.entries(r);
|
|
@@ -1279,22 +1279,22 @@ function gr(r, e) {
|
|
|
1279
1279
|
}
|
|
1280
1280
|
return n += t ? ")" : " }", n;
|
|
1281
1281
|
}
|
|
1282
|
-
function
|
|
1282
|
+
function vr(r, e) {
|
|
1283
1283
|
let t = "";
|
|
1284
1284
|
for (let n = 1; n <= e; n++)
|
|
1285
1285
|
t += r;
|
|
1286
1286
|
return t;
|
|
1287
1287
|
}
|
|
1288
|
-
function
|
|
1288
|
+
function br(r, e) {
|
|
1289
1289
|
for (; r.length < e; )
|
|
1290
1290
|
r += " ";
|
|
1291
1291
|
return r;
|
|
1292
1292
|
}
|
|
1293
|
-
function
|
|
1294
|
-
const t = (e == null ? void 0 : e.debugNamePostProcessor) ?? ((o) => o), n =
|
|
1295
|
-
return n ?
|
|
1293
|
+
function _r(r, e) {
|
|
1294
|
+
const t = (e == null ? void 0 : e.debugNamePostProcessor) ?? ((o) => o), n = I.from(r, t);
|
|
1295
|
+
return n ? pt(n, 0, /* @__PURE__ */ new Set()).trim() : "";
|
|
1296
1296
|
}
|
|
1297
|
-
function
|
|
1297
|
+
function pt(r, e, t) {
|
|
1298
1298
|
const n = " ".repeat(e), s = [];
|
|
1299
1299
|
if (t.has(r.sourceObj))
|
|
1300
1300
|
return s.push(`${n}* ${r.type} ${r.name} (already listed)`), s.join(`
|
|
@@ -1302,43 +1302,43 @@ function ft(r, e, t) {
|
|
|
1302
1302
|
if (t.add(r.sourceObj), s.push(`${n}* ${r.type} ${r.name}:`), s.push(`${n} value: ${Z(r.value, 50)}`), s.push(`${n} state: ${r.state}`), r.dependencies.length > 0) {
|
|
1303
1303
|
s.push(`${n} dependencies:`);
|
|
1304
1304
|
for (const i of r.dependencies)
|
|
1305
|
-
s.push(
|
|
1305
|
+
s.push(pt(i, e + 1, t));
|
|
1306
1306
|
}
|
|
1307
1307
|
return s.join(`
|
|
1308
1308
|
`);
|
|
1309
1309
|
}
|
|
1310
|
-
class
|
|
1310
|
+
class I {
|
|
1311
1311
|
static from(e, t) {
|
|
1312
|
-
if (e instanceof
|
|
1312
|
+
if (e instanceof at) {
|
|
1313
1313
|
const n = e.debugGetState();
|
|
1314
|
-
return new
|
|
1315
|
-
} else if (e instanceof
|
|
1314
|
+
return new I(e, t(e.debugName), "autorun", void 0, n.stateStr, Array.from(n.dependencies).map((s) => I.from(s, t) || I.unknown(s)));
|
|
1315
|
+
} else if (e instanceof U) {
|
|
1316
1316
|
const n = e.debugGetState();
|
|
1317
|
-
return new
|
|
1318
|
-
} else if (e instanceof
|
|
1317
|
+
return new I(e, t(e.debugName), "derived", n.value, n.stateStr, Array.from(n.dependencies).map((s) => I.from(s, t) || I.unknown(s)));
|
|
1318
|
+
} else if (e instanceof ht) {
|
|
1319
1319
|
const n = e.debugGetState();
|
|
1320
|
-
return new
|
|
1320
|
+
return new I(e, t(e.debugName), "observableValue", n.value, "upToDate", []);
|
|
1321
1321
|
} else if (e instanceof H) {
|
|
1322
1322
|
const n = e.debugGetState();
|
|
1323
|
-
return new
|
|
1323
|
+
return new I(e, t(e.debugName), "fromEvent", n.value, n.hasValue ? "upToDate" : "initial", []);
|
|
1324
1324
|
}
|
|
1325
1325
|
}
|
|
1326
1326
|
static unknown(e) {
|
|
1327
|
-
return new
|
|
1327
|
+
return new I(e, "(unknown)", "unknown", void 0, "unknown", []);
|
|
1328
1328
|
}
|
|
1329
1329
|
constructor(e, t, n, s, o, i) {
|
|
1330
1330
|
this.sourceObj = e, this.name = t, this.type = n, this.value = s, this.state = o, this.dependencies = i;
|
|
1331
1331
|
}
|
|
1332
1332
|
}
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
class
|
|
1333
|
+
tr(_r);
|
|
1334
|
+
Wt(hr);
|
|
1335
|
+
class yr {
|
|
1336
1336
|
constructor() {
|
|
1337
|
-
|
|
1337
|
+
l(this, "_fixtures", x(this, /* @__PURE__ */ new Map()));
|
|
1338
1338
|
/** Observable root of the fixture tree */
|
|
1339
|
-
|
|
1339
|
+
l(this, "root", O(this, (e) => {
|
|
1340
1340
|
const t = this._fixtures.read(e);
|
|
1341
|
-
return
|
|
1341
|
+
return ie(t);
|
|
1342
1342
|
}));
|
|
1343
1343
|
}
|
|
1344
1344
|
/**
|
|
@@ -1369,25 +1369,73 @@ class _r {
|
|
|
1369
1369
|
*/
|
|
1370
1370
|
getNode(e, t) {
|
|
1371
1371
|
const n = this.root.read(e);
|
|
1372
|
-
return
|
|
1372
|
+
return Ve(n, t);
|
|
1373
1373
|
}
|
|
1374
1374
|
/**
|
|
1375
1375
|
* Gets a component by path (non-reactive, for use in preview iframe).
|
|
1376
1376
|
* @param path Array of path segments (e.g., ['Button', 'Primary'])
|
|
1377
1377
|
*/
|
|
1378
1378
|
getComponentByPath(e) {
|
|
1379
|
-
const t = this._fixtures.get(), n =
|
|
1379
|
+
const t = this._fixtures.get(), n = ie(t), s = Ve(n, e);
|
|
1380
1380
|
return s == null ? void 0 : s.component;
|
|
1381
1381
|
}
|
|
1382
1382
|
}
|
|
1383
|
-
class
|
|
1383
|
+
class ft {
|
|
1384
1384
|
constructor(e, t) {
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1385
|
+
l(this, "renderTarget");
|
|
1386
|
+
l(this, "shadowRoot");
|
|
1387
|
+
l(this, "_abortController", new AbortController());
|
|
1388
|
+
l(this, "_rawResult");
|
|
1389
|
+
l(this, "_resolvedResult");
|
|
1390
|
+
if (this.component = t, t.isolation === "shadow-dom") {
|
|
1391
|
+
let s;
|
|
1392
|
+
if (e.shadowRoot) {
|
|
1393
|
+
for (s = e.shadowRoot; s.firstChild; )
|
|
1394
|
+
s.removeChild(s.firstChild);
|
|
1395
|
+
s.adoptedStyleSheets = [];
|
|
1396
|
+
} else
|
|
1397
|
+
s = e.attachShadow({ mode: "open" });
|
|
1398
|
+
if (t.styles)
|
|
1399
|
+
for (const o of t.styles)
|
|
1400
|
+
if (o.type === "css") {
|
|
1401
|
+
const i = document.createElement("style");
|
|
1402
|
+
i.textContent = o.content, s.appendChild(i);
|
|
1403
|
+
} else if (o.type === "url") {
|
|
1404
|
+
const i = document.createElement("link");
|
|
1405
|
+
i.rel = "stylesheet", i.href = o.href, s.appendChild(i);
|
|
1406
|
+
} else o.type === "adopted" && (s.adoptedStyleSheets = [
|
|
1407
|
+
...s.adoptedStyleSheets,
|
|
1408
|
+
o.sheet
|
|
1409
|
+
]);
|
|
1410
|
+
this.renderTarget = document.createElement("div"), s.appendChild(this.renderTarget), this.shadowRoot = s;
|
|
1411
|
+
} else
|
|
1412
|
+
this.renderTarget = document.createElement("div"), e.appendChild(this.renderTarget), this.shadowRoot = null;
|
|
1413
|
+
const n = Lt(t.properties);
|
|
1414
|
+
this._rawResult = t.render(this.renderTarget, {
|
|
1415
|
+
props: n,
|
|
1416
|
+
signal: this._abortController.signal
|
|
1417
|
+
}), this._rawResult instanceof Promise ? this._rawResult.then((s) => {
|
|
1418
|
+
var o;
|
|
1419
|
+
this._abortController.signal.aborted ? (o = s == null ? void 0 : s.dispose) == null || o.call(s) : this._resolvedResult = s ?? void 0;
|
|
1420
|
+
}).catch(() => {
|
|
1421
|
+
}) : this._resolvedResult = this._rawResult ?? void 0;
|
|
1422
|
+
}
|
|
1423
|
+
get result() {
|
|
1424
|
+
return this._rawResult;
|
|
1425
|
+
}
|
|
1426
|
+
dispose() {
|
|
1427
|
+
var e, t;
|
|
1428
|
+
this._abortController.abort(), (t = (e = this._resolvedResult) == null ? void 0 : e.dispose) == null || t.call(e), this._resolvedResult = void 0;
|
|
1429
|
+
}
|
|
1430
|
+
}
|
|
1431
|
+
class ns {
|
|
1432
|
+
constructor(e, t) {
|
|
1433
|
+
l(this, "sessionId", Math.random().toString(36).slice(2));
|
|
1434
|
+
l(this, "_updateVersion", 0);
|
|
1435
|
+
l(this, "_root");
|
|
1436
|
+
l(this, "_fixtureModules");
|
|
1437
|
+
l(this, "_currentRendering");
|
|
1438
|
+
l(this, "_currentContainer");
|
|
1391
1439
|
this._containerElement = e, this._fixtureModules = t, this._root = this._buildRegistry(), this._installGlobalApi();
|
|
1392
1440
|
const n = this._flattenFixtures(this._root).length;
|
|
1393
1441
|
console.log("[cli] CLI entry initialized, sessionId:", this.sessionId, "version:", this._updateVersion, "fixtures:", n);
|
|
@@ -1407,58 +1455,48 @@ class rs {
|
|
|
1407
1455
|
return this._flattenFixtures(this._root);
|
|
1408
1456
|
}
|
|
1409
1457
|
async renderFixture(e) {
|
|
1410
|
-
var b;
|
|
1411
1458
|
const t = this._findFixtureNode(this._root, e);
|
|
1412
1459
|
if (!t || !t.component)
|
|
1413
1460
|
throw new Error("Fixture not found: " + e);
|
|
1414
|
-
|
|
1461
|
+
this._currentRendering && (this._currentRendering.dispose(), this._currentRendering = void 0), this._currentContainer && (this._currentContainer.remove(), this._currentContainer = void 0);
|
|
1415
1462
|
const n = document.createElement("div");
|
|
1416
1463
|
n.style.display = "inline-block", this._containerElement.appendChild(n), this._currentContainer = n;
|
|
1417
|
-
const s = t.component, o =
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
}
|
|
1423
|
-
const d = [], l = console.error, h = console.warn;
|
|
1424
|
-
console.error = (...p) => {
|
|
1425
|
-
d.push({ kind: "console", level: "error", message: p.map(String).join(" ") }), l.apply(console, p);
|
|
1426
|
-
}, console.warn = (...p) => {
|
|
1427
|
-
d.push({ kind: "console", level: "warn", message: p.map(String).join(" ") }), h.apply(console, p);
|
|
1464
|
+
const s = t.component, o = [], i = console.error, d = console.warn;
|
|
1465
|
+
console.error = (...h) => {
|
|
1466
|
+
o.push({ kind: "console", level: "error", message: h.map(String).join(" ") }), i.apply(console, h);
|
|
1467
|
+
}, console.warn = (...h) => {
|
|
1468
|
+
o.push({ kind: "console", level: "warn", message: h.map(String).join(" ") }), d.apply(console, h);
|
|
1428
1469
|
};
|
|
1429
|
-
const
|
|
1430
|
-
var
|
|
1431
|
-
|
|
1432
|
-
},
|
|
1433
|
-
const
|
|
1434
|
-
|
|
1470
|
+
const c = (h) => {
|
|
1471
|
+
var p;
|
|
1472
|
+
o.push({ kind: "exception", message: h.message, stack: (p = h.error) == null ? void 0 : p.stack });
|
|
1473
|
+
}, u = (h) => {
|
|
1474
|
+
const p = h.reason, m = p instanceof Error ? p.message : String(p), b = p instanceof Error ? p.stack : void 0;
|
|
1475
|
+
o.push({ kind: "exception", message: m, stack: b });
|
|
1435
1476
|
};
|
|
1436
|
-
window.addEventListener("error",
|
|
1477
|
+
window.addEventListener("error", c), window.addEventListener("unhandledrejection", u);
|
|
1437
1478
|
try {
|
|
1438
|
-
const
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
if (
|
|
1444
|
-
const
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
if (this._currentDisposable = x ?? void 0, x != null && x.ready) {
|
|
1452
|
-
const y = new Promise((S) => setTimeout(() => S("timeout"), _));
|
|
1453
|
-
await Promise.race([x.ready.then(() => "done"), y]) === "timeout" && (p.abort(), d.push({ kind: "exception", message: `Fixture ready promise timed out after ${_}ms` }));
|
|
1479
|
+
const h = new ft(n, s);
|
|
1480
|
+
this._currentRendering = h;
|
|
1481
|
+
const p = 3e3;
|
|
1482
|
+
let m;
|
|
1483
|
+
const b = h.result;
|
|
1484
|
+
if (b instanceof Promise) {
|
|
1485
|
+
const S = new Promise((_) => setTimeout(() => _("timeout"), p)), C = await Promise.race([b.then((_) => ({ resolved: _ })), S]);
|
|
1486
|
+
C === "timeout" ? (h.dispose(), o.push({ kind: "exception", message: `Fixture render() timed out after ${p}ms` })) : m = C.resolved ?? void 0;
|
|
1487
|
+
} else
|
|
1488
|
+
m = b ?? void 0;
|
|
1489
|
+
if (m != null && m.ready) {
|
|
1490
|
+
const S = new Promise((_) => setTimeout(() => _("timeout"), p));
|
|
1491
|
+
await Promise.race([m.ready.then(() => "done"), S]) === "timeout" && (h.dispose(), o.push({ kind: "exception", message: `Fixture ready promise timed out after ${p}ms` }));
|
|
1454
1492
|
}
|
|
1455
|
-
} catch (
|
|
1456
|
-
const
|
|
1457
|
-
|
|
1493
|
+
} catch (h) {
|
|
1494
|
+
const p = h instanceof Error ? h : new Error(String(h));
|
|
1495
|
+
o.push({ kind: "exception", message: p.message, stack: p.stack });
|
|
1458
1496
|
} finally {
|
|
1459
|
-
console.error =
|
|
1497
|
+
console.error = i, console.warn = d;
|
|
1460
1498
|
}
|
|
1461
|
-
return await new Promise((
|
|
1499
|
+
return await new Promise((h) => requestAnimationFrame(() => requestAnimationFrame(() => h()))), window.removeEventListener("error", c), window.removeEventListener("unhandledrejection", u), { errors: o };
|
|
1462
1500
|
}
|
|
1463
1501
|
_buildRegistry() {
|
|
1464
1502
|
const e = /* @__PURE__ */ new Map();
|
|
@@ -1466,15 +1504,15 @@ class rs {
|
|
|
1466
1504
|
const s = n.default;
|
|
1467
1505
|
s && typeof s == "object" && e.set(t, s);
|
|
1468
1506
|
}
|
|
1469
|
-
return
|
|
1507
|
+
return ie(e);
|
|
1470
1508
|
}
|
|
1471
1509
|
_flattenFixtures(e, t = [], n = []) {
|
|
1472
1510
|
var i;
|
|
1473
1511
|
const s = n.length > 0 && e.labels.length > 0 ? [.../* @__PURE__ */ new Set([...n, ...e.labels])] : e.labels.length > 0 ? [...e.labels] : [...n], o = [];
|
|
1474
1512
|
e.type === "component" && o.push({ fixtureId: e.id, fixtureName: e.name, groupPath: t, background: ((i = e.component) == null ? void 0 : i.background) ?? "light", labels: s });
|
|
1475
1513
|
for (const d of e.children ?? []) {
|
|
1476
|
-
const
|
|
1477
|
-
o.push(...this._flattenFixtures(d,
|
|
1514
|
+
const c = e.id ? [...t, e.name] : t;
|
|
1515
|
+
o.push(...this._flattenFixtures(d, c, s));
|
|
1478
1516
|
}
|
|
1479
1517
|
return o;
|
|
1480
1518
|
}
|
|
@@ -1498,7 +1536,7 @@ class rs {
|
|
|
1498
1536
|
});
|
|
1499
1537
|
}
|
|
1500
1538
|
}
|
|
1501
|
-
class
|
|
1539
|
+
class xr {
|
|
1502
1540
|
constructor(e) {
|
|
1503
1541
|
this._run = e, this._changes = [], this._map = /* @__PURE__ */ new Map(), this._updateCounter = 0;
|
|
1504
1542
|
}
|
|
@@ -1525,48 +1563,48 @@ class yr {
|
|
|
1525
1563
|
}
|
|
1526
1564
|
}
|
|
1527
1565
|
function f() {
|
|
1566
|
+
return le.instance;
|
|
1567
|
+
}
|
|
1568
|
+
function Sr() {
|
|
1528
1569
|
return he.instance;
|
|
1529
1570
|
}
|
|
1530
|
-
function
|
|
1571
|
+
function wr() {
|
|
1531
1572
|
return ue.instance;
|
|
1532
1573
|
}
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
f.const = xr;
|
|
1537
|
-
f.obs = Sr;
|
|
1538
|
-
class he {
|
|
1574
|
+
f.const = Sr;
|
|
1575
|
+
f.obs = wr;
|
|
1576
|
+
class le {
|
|
1539
1577
|
create(e) {
|
|
1540
|
-
const t =
|
|
1578
|
+
const t = O((n) => e(n));
|
|
1541
1579
|
return { read: (n) => t };
|
|
1542
1580
|
}
|
|
1543
1581
|
}
|
|
1544
|
-
|
|
1545
|
-
class
|
|
1582
|
+
le.instance = new le();
|
|
1583
|
+
class he {
|
|
1546
1584
|
create(e) {
|
|
1547
|
-
const t =
|
|
1585
|
+
const t = O((n) => e(n));
|
|
1548
1586
|
return { read: (n) => t.read(n) };
|
|
1549
1587
|
}
|
|
1550
1588
|
}
|
|
1551
|
-
|
|
1552
|
-
class
|
|
1589
|
+
he.instance = new he();
|
|
1590
|
+
class ue {
|
|
1553
1591
|
create(e) {
|
|
1554
|
-
const t =
|
|
1592
|
+
const t = O((n) => {
|
|
1555
1593
|
const s = e(n);
|
|
1556
|
-
return
|
|
1594
|
+
return Cr(s) ? s.read(n) : s;
|
|
1557
1595
|
});
|
|
1558
1596
|
return { read: (n) => t };
|
|
1559
1597
|
}
|
|
1560
1598
|
}
|
|
1561
|
-
|
|
1562
|
-
function
|
|
1599
|
+
ue.instance = new ue();
|
|
1600
|
+
function Cr(r) {
|
|
1563
1601
|
return typeof r == "object" && r !== null && "read" in r;
|
|
1564
1602
|
}
|
|
1565
1603
|
function J(r, e) {
|
|
1566
1604
|
return Object.fromEntries(Object.entries(r).map(([t, n]) => [t, e(n, t)]));
|
|
1567
1605
|
}
|
|
1568
|
-
const
|
|
1569
|
-
class
|
|
1606
|
+
const se = Symbol("ViewModelContext");
|
|
1607
|
+
class Rr {
|
|
1570
1608
|
constructor(e) {
|
|
1571
1609
|
this._store = new Y(), this.props = e;
|
|
1572
1610
|
}
|
|
@@ -1574,35 +1612,35 @@ class Cr {
|
|
|
1574
1612
|
this._store.dispose();
|
|
1575
1613
|
}
|
|
1576
1614
|
}
|
|
1577
|
-
function
|
|
1578
|
-
return r[
|
|
1615
|
+
function Tr(r) {
|
|
1616
|
+
return r[se] || (r[se] = Ye(void 0)), r[se];
|
|
1579
1617
|
}
|
|
1580
1618
|
function B(r = {}) {
|
|
1581
1619
|
var e;
|
|
1582
|
-
return e = class extends
|
|
1620
|
+
return e = class extends Rr {
|
|
1583
1621
|
}, e._props = r, e;
|
|
1584
1622
|
}
|
|
1585
|
-
let
|
|
1586
|
-
const
|
|
1623
|
+
let pe = 0;
|
|
1624
|
+
const kr = new xr((r) => {
|
|
1587
1625
|
for (const e of r)
|
|
1588
1626
|
e.rendered = !1;
|
|
1589
|
-
if (
|
|
1627
|
+
if (pe > 0) {
|
|
1590
1628
|
const e = r.find((t) => t.isRendering);
|
|
1591
1629
|
e.itemsToRender = r;
|
|
1592
1630
|
} else
|
|
1593
|
-
|
|
1631
|
+
et(() => {
|
|
1594
1632
|
for (const e of r)
|
|
1595
1633
|
e.rendered || e.forceUpdate();
|
|
1596
1634
|
});
|
|
1597
1635
|
});
|
|
1598
|
-
let
|
|
1599
|
-
class
|
|
1636
|
+
let Ir = 0;
|
|
1637
|
+
class Or {
|
|
1600
1638
|
constructor(e, t) {
|
|
1601
1639
|
this.debugName = e, this.renderFactory = t, this._obsProps = void 0, this.forceUpdate = void 0, this._render = void 0, this._disposable = void 0, this.contextValues = /* @__PURE__ */ new Map(), this.cleanupEffect = () => () => {
|
|
1602
1640
|
var n;
|
|
1603
1641
|
(n = this._disposable) == null || n.dispose();
|
|
1604
1642
|
}, this.itemsToRender = [], this.handleAfterRender = () => {
|
|
1605
|
-
|
|
1643
|
+
et(() => {
|
|
1606
1644
|
for (const n of this.itemsToRender)
|
|
1607
1645
|
n.rendered || n.forceUpdate();
|
|
1608
1646
|
}), this.itemsToRender = [];
|
|
@@ -1612,30 +1650,30 @@ class Ir {
|
|
|
1612
1650
|
return this.debugName;
|
|
1613
1651
|
}
|
|
1614
1652
|
updateProps(e) {
|
|
1615
|
-
this._obsProps ? this._obsProps.set(e, void 0) : (this._obsProps =
|
|
1653
|
+
this._obsProps ? this._obsProps.set(e, void 0) : (this._obsProps = x(this, e), this._render = this.renderFactory(this._obsProps, () => this.contextValues), this.rendering = O(this, this._render), this._disposable = kr.addDependency(this.rendering, this));
|
|
1616
1654
|
}
|
|
1617
1655
|
}
|
|
1618
|
-
function
|
|
1619
|
-
const n = (i) => i + 1, s = () => new
|
|
1620
|
-
const d =
|
|
1621
|
-
for (const
|
|
1622
|
-
|
|
1623
|
-
if (
|
|
1656
|
+
function we(r, e, t) {
|
|
1657
|
+
const n = (i) => i + 1, s = () => new Or(r + ++Ir, e), o = function(i) {
|
|
1658
|
+
const d = Et(n, 0)[1], c = Dt(s)[0];
|
|
1659
|
+
for (const u of t ?? [])
|
|
1660
|
+
c.contextValues.set(u, Bt(u));
|
|
1661
|
+
if (Ie(c.cleanupEffect, []), Ie(c.handleAfterRender), c.isRendering)
|
|
1624
1662
|
throw new Error("Component is already rendering");
|
|
1625
|
-
|
|
1663
|
+
c.isRendering = !0, pe++;
|
|
1626
1664
|
try {
|
|
1627
|
-
|
|
1628
|
-
const
|
|
1629
|
-
return
|
|
1665
|
+
c.forceUpdate = d, c.updateProps(i);
|
|
1666
|
+
const u = c.rendering.get();
|
|
1667
|
+
return c.rendered = !0, u;
|
|
1630
1668
|
} finally {
|
|
1631
|
-
|
|
1669
|
+
c.isRendering = !1, pe--;
|
|
1632
1670
|
}
|
|
1633
1671
|
};
|
|
1634
1672
|
return o.displayName = r, o;
|
|
1635
1673
|
}
|
|
1636
|
-
|
|
1637
|
-
function
|
|
1638
|
-
return
|
|
1674
|
+
we("ObsView", (r) => (e) => r.read(e).children(e));
|
|
1675
|
+
function k(r, e) {
|
|
1676
|
+
return we("view", (t) => {
|
|
1639
1677
|
const n = J(r, (s, o) => s.create((i) => t.read(i)[o], void 0));
|
|
1640
1678
|
return (s) => {
|
|
1641
1679
|
const o = J(n, (i) => i.read(s));
|
|
@@ -1643,7 +1681,7 @@ function O(r, e) {
|
|
|
1643
1681
|
};
|
|
1644
1682
|
});
|
|
1645
1683
|
}
|
|
1646
|
-
function
|
|
1684
|
+
function Nr(r) {
|
|
1647
1685
|
const e = [];
|
|
1648
1686
|
for (const t of Object.values(r)) {
|
|
1649
1687
|
const n = t._requiredContext;
|
|
@@ -1652,21 +1690,21 @@ function Or(r) {
|
|
|
1652
1690
|
return e;
|
|
1653
1691
|
}
|
|
1654
1692
|
function A(r, e, t) {
|
|
1655
|
-
const n = typeof e == "function" ? {} : e, s = typeof e == "function" ? e : t, o = "_props" in r ? r._props : {}, i =
|
|
1656
|
-
return
|
|
1657
|
-
const
|
|
1658
|
-
} } :
|
|
1659
|
-
const
|
|
1660
|
-
return new r(
|
|
1661
|
-
}),
|
|
1662
|
-
return (
|
|
1663
|
-
const
|
|
1664
|
-
return s(
|
|
1693
|
+
const n = typeof e == "function" ? {} : e, s = typeof e == "function" ? e : t, o = "_props" in r ? r._props : {}, i = Nr({ ...o, ...n }), d = Tr(r), c = [...i, d];
|
|
1694
|
+
return we("viewWithModel", (u, h) => {
|
|
1695
|
+
const p = h(), m = p.get(d), b = "_props" in r ? J(r._props, (_, M) => _.create((F) => u.read(F)[M], p.get(_._requiredContext))) : {}, S = m ? { read: () => m, dispose: () => {
|
|
1696
|
+
} } : ir((_) => {
|
|
1697
|
+
const M = J(b, (F) => F.read(_));
|
|
1698
|
+
return new r(M);
|
|
1699
|
+
}), C = J(n, (_, M) => _.create((F) => u.read(F)[M], p.get(_._requiredContext)));
|
|
1700
|
+
return (_) => {
|
|
1701
|
+
const M = S.read(_), F = J(C, (Nt) => Nt.read(_));
|
|
1702
|
+
return s(_, M, F);
|
|
1665
1703
|
};
|
|
1666
|
-
},
|
|
1704
|
+
}, c.length > 0 ? c : void 0);
|
|
1667
1705
|
}
|
|
1668
|
-
|
|
1669
|
-
|
|
1706
|
+
k({ value: f.obs() }, (r, e) => e.value.read(r));
|
|
1707
|
+
Ye(null);
|
|
1670
1708
|
function gt(r) {
|
|
1671
1709
|
var e;
|
|
1672
1710
|
return {
|
|
@@ -1678,19 +1716,19 @@ function gt(r) {
|
|
|
1678
1716
|
labels: r.labels
|
|
1679
1717
|
};
|
|
1680
1718
|
}
|
|
1681
|
-
function
|
|
1719
|
+
function Vr(r, e) {
|
|
1682
1720
|
if (r.name.toLowerCase().includes(e)) return !0;
|
|
1683
1721
|
for (const t of r.labels)
|
|
1684
1722
|
if (t.toLowerCase().includes(e)) return !0;
|
|
1685
1723
|
return !1;
|
|
1686
1724
|
}
|
|
1687
|
-
function
|
|
1725
|
+
function Mr(r, e) {
|
|
1688
1726
|
if (!e) return r;
|
|
1689
1727
|
const t = e.toLowerCase();
|
|
1690
1728
|
return mt(r, t);
|
|
1691
1729
|
}
|
|
1692
1730
|
function mt(r, e) {
|
|
1693
|
-
const t =
|
|
1731
|
+
const t = Vr(r, e);
|
|
1694
1732
|
if (!r.children || r.children.length === 0)
|
|
1695
1733
|
return t ? r : void 0;
|
|
1696
1734
|
if (t) return r;
|
|
@@ -1705,7 +1743,7 @@ function mt(r, e) {
|
|
|
1705
1743
|
children: n
|
|
1706
1744
|
};
|
|
1707
1745
|
}
|
|
1708
|
-
function
|
|
1746
|
+
function te(r, e) {
|
|
1709
1747
|
const {
|
|
1710
1748
|
storageKey: t,
|
|
1711
1749
|
defaultValue: n,
|
|
@@ -1714,108 +1752,108 @@ function re(r, e) {
|
|
|
1714
1752
|
} = e;
|
|
1715
1753
|
let i = n;
|
|
1716
1754
|
try {
|
|
1717
|
-
const
|
|
1718
|
-
|
|
1755
|
+
const u = localStorage.getItem(t);
|
|
1756
|
+
u !== null && (i = o(u));
|
|
1719
1757
|
} catch {
|
|
1720
1758
|
}
|
|
1721
|
-
const d =
|
|
1722
|
-
return d.set = (
|
|
1759
|
+
const d = x(r, i), c = d.set.bind(d);
|
|
1760
|
+
return d.set = (u, h) => {
|
|
1723
1761
|
try {
|
|
1724
|
-
localStorage.setItem(t, s(
|
|
1762
|
+
localStorage.setItem(t, s(u));
|
|
1725
1763
|
} catch {
|
|
1726
1764
|
}
|
|
1727
|
-
|
|
1765
|
+
c(u, h);
|
|
1728
1766
|
}, d;
|
|
1729
1767
|
}
|
|
1730
|
-
function
|
|
1731
|
-
const n = new URLSearchParams(location.search).get(e) || void 0, s =
|
|
1768
|
+
function $e(r, e) {
|
|
1769
|
+
const n = new URLSearchParams(location.search).get(e) || void 0, s = x(r, n);
|
|
1732
1770
|
window.addEventListener("popstate", () => {
|
|
1733
1771
|
const i = new URLSearchParams(location.search);
|
|
1734
1772
|
s.set(i.get(e) || void 0, void 0);
|
|
1735
1773
|
});
|
|
1736
1774
|
const o = s.set.bind(s);
|
|
1737
1775
|
return s.set = (i, d) => {
|
|
1738
|
-
const
|
|
1739
|
-
i ?
|
|
1740
|
-
const
|
|
1741
|
-
history.replaceState(history.state, "",
|
|
1776
|
+
const c = new URLSearchParams(location.search);
|
|
1777
|
+
i ? c.set(e, i) : c.delete(e);
|
|
1778
|
+
const u = c.toString(), h = location.pathname + (u ? "?" + u : "") + location.hash;
|
|
1779
|
+
history.replaceState(history.state, "", h), o(i, d);
|
|
1742
1780
|
}, s;
|
|
1743
1781
|
}
|
|
1744
1782
|
function vt(r, e) {
|
|
1745
1783
|
const t = new URLSearchParams(location.search);
|
|
1746
1784
|
return t.set(r, e), location.pathname + "?" + t.toString();
|
|
1747
1785
|
}
|
|
1748
|
-
class
|
|
1786
|
+
class Fr extends B({
|
|
1749
1787
|
registry: f.const(),
|
|
1750
1788
|
daemonModel: f.const(),
|
|
1751
1789
|
reportModel: f.const()
|
|
1752
1790
|
}) {
|
|
1753
1791
|
constructor() {
|
|
1754
1792
|
super(...arguments);
|
|
1755
|
-
|
|
1793
|
+
l(this, "leftSidebarVisible", te(this, {
|
|
1756
1794
|
storageKey: "component-explorer:leftSidebarVisible",
|
|
1757
1795
|
defaultValue: !0
|
|
1758
1796
|
}));
|
|
1759
|
-
|
|
1797
|
+
l(this, "rightSidebarVisible", te(this, {
|
|
1760
1798
|
storageKey: "component-explorer:rightSidebarVisible",
|
|
1761
1799
|
defaultValue: !1
|
|
1762
1800
|
}));
|
|
1763
|
-
|
|
1801
|
+
l(this, "isDarkTheme", te(this, {
|
|
1764
1802
|
storageKey: "component-explorer:isDarkTheme",
|
|
1765
1803
|
defaultValue: !0
|
|
1766
1804
|
}));
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1805
|
+
l(this, "selectedNodeId", $e(this, "component"));
|
|
1806
|
+
l(this, "expandedNodeIds", x(this, this._initialExpandedNodes()));
|
|
1807
|
+
l(this, "viewMode", te(this, {
|
|
1770
1808
|
storageKey: "component-explorer:viewMode",
|
|
1771
1809
|
defaultValue: "session"
|
|
1772
1810
|
}));
|
|
1773
|
-
|
|
1811
|
+
l(this, "searchQuery", $e(this, "search"));
|
|
1774
1812
|
/** The explorer's tree derived from the registry or report */
|
|
1775
|
-
|
|
1813
|
+
l(this, "tree", O(this, (t) => {
|
|
1776
1814
|
const n = this.props.reportModel;
|
|
1777
1815
|
if (n)
|
|
1778
1816
|
return n.buildTree(t);
|
|
1779
1817
|
const s = this.props.registry.root.read(t);
|
|
1780
1818
|
return gt(s);
|
|
1781
1819
|
}));
|
|
1782
|
-
|
|
1820
|
+
l(this, "filteredTree", O(this, (t) => {
|
|
1783
1821
|
const n = this.tree.read(t), s = this.searchQuery.read(t);
|
|
1784
|
-
return
|
|
1822
|
+
return Mr(n, s) ?? { ...n, children: [] };
|
|
1785
1823
|
}));
|
|
1786
|
-
|
|
1824
|
+
l(this, "selectedNode", O(this, (t) => {
|
|
1787
1825
|
const n = this.selectedNodeId.read(t);
|
|
1788
1826
|
if (n === void 0) return;
|
|
1789
1827
|
const s = this.filteredTree.read(t);
|
|
1790
1828
|
return s.id === n ? s : this._findNode(s.children ?? [], n);
|
|
1791
1829
|
}));
|
|
1792
1830
|
/** List of preview rows to render based on current selection and view mode */
|
|
1793
|
-
|
|
1831
|
+
l(this, "selectedFixtures", O(this, (t) => {
|
|
1794
1832
|
const n = this.selectedNode.read(t);
|
|
1795
1833
|
return n ? this.isReportMode ? (this.props.reportModel.state.read(t), this._collectReportRows(n, n.name)) : this.viewMode.read(t) === "diff" && this.daemonAvailable && this.daemon.sessions.read(t).length > 1 ? this._collectDiffRows(n, n.name) : this._collectPreviewRows(n, n.name) : [];
|
|
1796
1834
|
}));
|
|
1797
|
-
|
|
1835
|
+
l(this, "setViewMode", (t) => {
|
|
1798
1836
|
this.viewMode.set(t, void 0);
|
|
1799
1837
|
});
|
|
1800
|
-
|
|
1838
|
+
l(this, "navigateToSession", (t) => {
|
|
1801
1839
|
const n = this.props.daemonModel;
|
|
1802
1840
|
if (!n) return;
|
|
1803
1841
|
const s = n.getSessionExplorerUrl(t);
|
|
1804
1842
|
s && (window.location.href = s);
|
|
1805
1843
|
});
|
|
1806
|
-
|
|
1844
|
+
l(this, "toggleLeftSidebar", () => {
|
|
1807
1845
|
this.leftSidebarVisible.set(!this.leftSidebarVisible.get(), void 0);
|
|
1808
1846
|
});
|
|
1809
|
-
|
|
1847
|
+
l(this, "toggleRightSidebar", () => {
|
|
1810
1848
|
this.rightSidebarVisible.set(!this.rightSidebarVisible.get(), void 0);
|
|
1811
1849
|
});
|
|
1812
|
-
|
|
1850
|
+
l(this, "toggleTheme", () => {
|
|
1813
1851
|
this.isDarkTheme.set(!this.isDarkTheme.get(), void 0);
|
|
1814
1852
|
});
|
|
1815
|
-
|
|
1853
|
+
l(this, "selectNode", (t) => {
|
|
1816
1854
|
this.selectedNodeId.set(t, void 0);
|
|
1817
1855
|
});
|
|
1818
|
-
|
|
1856
|
+
l(this, "toggleNodeExpanded", (t) => {
|
|
1819
1857
|
const n = this.expandedNodeIds.get(), s = new Set(n);
|
|
1820
1858
|
s.has(t) ? s.delete(t) : s.add(t), this.expandedNodeIds.set(s, void 0);
|
|
1821
1859
|
});
|
|
@@ -1948,8 +1986,8 @@ class Mr extends B({
|
|
|
1948
1986
|
}
|
|
1949
1987
|
const i = [];
|
|
1950
1988
|
for (const d of t.children ?? []) {
|
|
1951
|
-
const
|
|
1952
|
-
i.push(...this._collectReportRows(d,
|
|
1989
|
+
const c = n ? `${n} / ${d.name}` : d.name;
|
|
1990
|
+
i.push(...this._collectReportRows(d, c));
|
|
1953
1991
|
}
|
|
1954
1992
|
return i;
|
|
1955
1993
|
}
|
|
@@ -2143,16 +2181,16 @@ const v = {
|
|
|
2143
2181
|
cursor: "pointer"
|
|
2144
2182
|
}
|
|
2145
2183
|
};
|
|
2146
|
-
function
|
|
2184
|
+
function Ce(...r) {
|
|
2147
2185
|
return Object.assign({}, ...r.filter(Boolean));
|
|
2148
2186
|
}
|
|
2149
|
-
class
|
|
2187
|
+
class Er extends B({
|
|
2150
2188
|
active: f()
|
|
2151
2189
|
}) {
|
|
2152
2190
|
constructor() {
|
|
2153
2191
|
super(...arguments);
|
|
2154
|
-
|
|
2155
|
-
|
|
2192
|
+
l(this, "isHovered", x(this, !1));
|
|
2193
|
+
l(this, "setHovered", (t) => {
|
|
2156
2194
|
this.isHovered.set(t, void 0);
|
|
2157
2195
|
});
|
|
2158
2196
|
}
|
|
@@ -2160,15 +2198,15 @@ class Fr extends B({
|
|
|
2160
2198
|
return this.props.active;
|
|
2161
2199
|
}
|
|
2162
2200
|
}
|
|
2163
|
-
const
|
|
2164
|
-
|
|
2201
|
+
const oe = A(
|
|
2202
|
+
Er,
|
|
2165
2203
|
{
|
|
2166
2204
|
onClick: f.const(),
|
|
2167
2205
|
title: f.const(),
|
|
2168
2206
|
children: f.const()
|
|
2169
2207
|
},
|
|
2170
2208
|
(r, e, t) => {
|
|
2171
|
-
const n = e.isHovered.read(r), s = e.active.read(r), o =
|
|
2209
|
+
const n = e.isHovered.read(r), s = e.active.read(r), o = Ce(
|
|
2172
2210
|
v.titleBarButton,
|
|
2173
2211
|
n && !s && v.titleBarButtonHover,
|
|
2174
2212
|
s && v.titleBarButtonActive
|
|
@@ -2185,33 +2223,33 @@ const ie = A(
|
|
|
2185
2223
|
}
|
|
2186
2224
|
);
|
|
2187
2225
|
}
|
|
2188
|
-
), Dr = ({ style: r }) => /* @__PURE__ */ a("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "currentColor", style: r, children: /* @__PURE__ */ a("path", { d: "M5.7 13.7L5 13l4.6-4.6L5 3.7l.7-.7 5.3 5.4-5.3 5.3z" }) }),
|
|
2226
|
+
), Dr = ({ style: r }) => /* @__PURE__ */ a("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "currentColor", style: r, children: /* @__PURE__ */ a("path", { d: "M5.7 13.7L5 13l4.6-4.6L5 3.7l.7-.7 5.3 5.4-5.3 5.3z" }) }), Br = ({ style: r }) => /* @__PURE__ */ a("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "currentColor", style: r, children: /* @__PURE__ */ a("path", { d: "M11 5.5L6 10.5L5.3 9.8L9.6 5.5L5.3 1.2L6 0.5L11 5.5z", transform: "rotate(90 8 5.5)" }) }), Ar = ({ style: r }) => /* @__PURE__ */ a("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "currentColor", style: r, children: /* @__PURE__ */ a("path", { d: "M14.5 2H9l-.35.15-.65.64-.65-.64L7 2H1.5l-.5.5v10l.5.5H7l.35-.15.65-.64.65.64.35.15h5.5l.5-.5v-10l-.5-.5zm-7 10H2V3h5v.86L5.85 5l1.15 1.14V10l-1.15-1.14L7 7.72V12zm6 0H8V7.72l1.15 1.14L8 10V6.14L9.15 5 8 3.86V3h5v9z" }) }), $r = ({ style: r }) => /* @__PURE__ */ a("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "currentColor", style: r, children: /* @__PURE__ */ a("path", { d: "M14.5 3H7.71l-.85-.85L6.5 2h-5l-.5.5v11l.5.5h13l.5-.5v-10l-.5-.5zm-.5 10H2V6h12v7zm0-8H2V3h4.29l.85.85.36.15H14v1z" }) }), zr = () => /* @__PURE__ */ a("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "currentColor", children: /* @__PURE__ */ a("path", { d: "M2 2v12h12V2H2zm11 11H6V3h7v10zM3 3h2v10H3V3z" }) }), Lr = () => /* @__PURE__ */ a("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "currentColor", children: /* @__PURE__ */ a("path", { d: "M2 2v12h12V2H2zm6 11V3h5v10H8zM3 3h4v10H3V3z" }) }), Hr = () => /* @__PURE__ */ a("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "currentColor", children: /* @__PURE__ */ a("path", { d: "M8 11a3 3 0 1 1 0-6 3 3 0 0 1 0 6zm0 1a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM8 0a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 0zm0 13a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 13zm8-5a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2a.5.5 0 0 1 .5.5zM3 8a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2A.5.5 0 0 1 3 8zm10.657-5.657a.5.5 0 0 1 0 .707l-1.414 1.415a.5.5 0 1 1-.707-.708l1.414-1.414a.5.5 0 0 1 .707 0zm-9.193 9.193a.5.5 0 0 1 0 .707L3.05 13.657a.5.5 0 0 1-.707-.707l1.414-1.414a.5.5 0 0 1 .707 0zm9.193 2.121a.5.5 0 0 1-.707 0l-1.414-1.414a.5.5 0 0 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .707zM4.464 4.465a.5.5 0 0 1-.707 0L2.343 3.05a.5.5 0 1 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .708z" }) }), jr = () => /* @__PURE__ */ a("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "currentColor", children: /* @__PURE__ */ a("path", { d: "M6 .278a.768.768 0 0 1 .08.858 7.208 7.208 0 0 0-.878 3.46c0 4.021 3.278 7.277 7.318 7.277.527 0 1.04-.055 1.533-.16a.787.787 0 0 1 .81.316.733.733 0 0 1-.031.893A8.349 8.349 0 0 1 8.344 16C3.734 16 0 12.286 0 7.71 0 4.266 2.114 1.312 5.124.06A.752.752 0 0 1 6 .278z" }) }), Ur = k(
|
|
2189
2227
|
{ model: f.const() },
|
|
2190
2228
|
(r, e) => {
|
|
2191
|
-
var d,
|
|
2192
|
-
const t = e.model, n = t.viewMode.read(r), s = ((d = t.daemon) == null ? void 0 : d.sessions.read(r)) ?? [], o = (
|
|
2193
|
-
return s.length <= 1 ? null : /* @__PURE__ */
|
|
2194
|
-
/* @__PURE__ */
|
|
2195
|
-
/* @__PURE__ */ a(
|
|
2196
|
-
/* @__PURE__ */ a(
|
|
2229
|
+
var d, c;
|
|
2230
|
+
const t = e.model, n = t.viewMode.read(r), s = ((d = t.daemon) == null ? void 0 : d.sessions.read(r)) ?? [], o = (c = t.daemon) == null ? void 0 : c.sessionName, i = s.filter((u) => u.name !== o);
|
|
2231
|
+
return s.length <= 1 ? null : /* @__PURE__ */ g("div", { style: Q.container, children: [
|
|
2232
|
+
/* @__PURE__ */ g("div", { style: Q.segmentedControl, children: [
|
|
2233
|
+
/* @__PURE__ */ a(ze, { label: "Live", mode: "session", active: n === "session", onClick: () => t.setViewMode("session") }),
|
|
2234
|
+
/* @__PURE__ */ a(ze, { label: "Diff", mode: "diff", active: n === "diff", onClick: () => t.setViewMode("diff") })
|
|
2197
2235
|
] }),
|
|
2198
|
-
i.length > 0 && /* @__PURE__ */ a("div", { style: Q.sessionLinks, children: i.map((
|
|
2236
|
+
i.length > 0 && /* @__PURE__ */ a("div", { style: Q.sessionLinks, children: i.map((u) => /* @__PURE__ */ g(
|
|
2199
2237
|
"button",
|
|
2200
2238
|
{
|
|
2201
2239
|
style: Q.sessionLink,
|
|
2202
|
-
onClick: () => t.navigateToSession(
|
|
2203
|
-
title: `Switch to ${
|
|
2240
|
+
onClick: () => t.navigateToSession(u.name),
|
|
2241
|
+
title: `Switch to ${u.name} session`,
|
|
2204
2242
|
children: [
|
|
2205
2243
|
"→ ",
|
|
2206
|
-
|
|
2244
|
+
u.name
|
|
2207
2245
|
]
|
|
2208
2246
|
},
|
|
2209
|
-
|
|
2247
|
+
u.name
|
|
2210
2248
|
)) })
|
|
2211
2249
|
] });
|
|
2212
2250
|
}
|
|
2213
2251
|
);
|
|
2214
|
-
function
|
|
2252
|
+
function ze({ label: r, mode: e, active: t, onClick: n }) {
|
|
2215
2253
|
return /* @__PURE__ */ a(
|
|
2216
2254
|
"button",
|
|
2217
2255
|
{
|
|
@@ -2221,47 +2259,47 @@ function Le({ label: r, mode: e, active: t, onClick: n }) {
|
|
|
2221
2259
|
}
|
|
2222
2260
|
);
|
|
2223
2261
|
}
|
|
2224
|
-
const
|
|
2262
|
+
const Pr = k(
|
|
2225
2263
|
{
|
|
2226
2264
|
model: f.const()
|
|
2227
2265
|
},
|
|
2228
2266
|
(r, e) => {
|
|
2229
2267
|
const t = e.model, n = t.leftSidebarVisible.read(r), s = t.rightSidebarVisible.read(r), o = t.isDarkTheme.read(r), i = t.selectedNode.read(r);
|
|
2230
|
-
return /* @__PURE__ */
|
|
2268
|
+
return /* @__PURE__ */ g("div", { style: v.titleBar, children: [
|
|
2231
2269
|
/* @__PURE__ */ a("div", { style: v.titleBarSection, children: /* @__PURE__ */ a(
|
|
2232
|
-
|
|
2270
|
+
oe,
|
|
2233
2271
|
{
|
|
2234
2272
|
active: n,
|
|
2235
2273
|
onClick: t.toggleLeftSidebar,
|
|
2236
2274
|
title: "Toggle left sidebar",
|
|
2237
|
-
children: /* @__PURE__ */ a(
|
|
2275
|
+
children: /* @__PURE__ */ a(zr, {})
|
|
2238
2276
|
}
|
|
2239
2277
|
) }),
|
|
2240
|
-
/* @__PURE__ */
|
|
2241
|
-
t.isReportMode ? /* @__PURE__ */ a("span", { style: { fontSize: 12, color: "var(--vscode-descriptionForeground)" }, children: "Screenshot Report" }) : t.daemonAvailable ? /* @__PURE__ */ a(
|
|
2242
|
-
i ? /* @__PURE__ */
|
|
2278
|
+
/* @__PURE__ */ g("div", { style: v.titleBarCenter, children: [
|
|
2279
|
+
t.isReportMode ? /* @__PURE__ */ a("span", { style: { fontSize: 12, color: "var(--vscode-descriptionForeground)" }, children: "Screenshot Report" }) : t.daemonAvailable ? /* @__PURE__ */ a(Ur, { model: t }) : null,
|
|
2280
|
+
i ? /* @__PURE__ */ g(me, { children: [
|
|
2243
2281
|
/* @__PURE__ */ a("span", { style: { color: "var(--vscode-textLink-foreground)" }, children: "<" }),
|
|
2244
2282
|
/* @__PURE__ */ a("span", { children: i.name }),
|
|
2245
2283
|
/* @__PURE__ */ a("span", { style: { color: "var(--vscode-textLink-foreground)" }, children: "/>" })
|
|
2246
2284
|
] }) : /* @__PURE__ */ a("span", { style: { color: "var(--vscode-descriptionForeground)" }, children: "No component selected" })
|
|
2247
2285
|
] }),
|
|
2248
|
-
/* @__PURE__ */
|
|
2286
|
+
/* @__PURE__ */ g("div", { style: v.titleBarSection, children: [
|
|
2249
2287
|
/* @__PURE__ */ a(
|
|
2250
|
-
|
|
2288
|
+
oe,
|
|
2251
2289
|
{
|
|
2252
2290
|
active: !1,
|
|
2253
2291
|
onClick: t.toggleTheme,
|
|
2254
2292
|
title: o ? "Switch to light theme" : "Switch to dark theme",
|
|
2255
|
-
children: o ? /* @__PURE__ */ a(
|
|
2293
|
+
children: o ? /* @__PURE__ */ a(Hr, {}) : /* @__PURE__ */ a(jr, {})
|
|
2256
2294
|
}
|
|
2257
2295
|
),
|
|
2258
2296
|
/* @__PURE__ */ a(
|
|
2259
|
-
|
|
2297
|
+
oe,
|
|
2260
2298
|
{
|
|
2261
2299
|
active: s,
|
|
2262
2300
|
onClick: t.toggleRightSidebar,
|
|
2263
2301
|
title: "Toggle right sidebar",
|
|
2264
|
-
children: /* @__PURE__ */ a(
|
|
2302
|
+
children: /* @__PURE__ */ a(Lr, {})
|
|
2265
2303
|
}
|
|
2266
2304
|
)
|
|
2267
2305
|
] })
|
|
@@ -2311,14 +2349,14 @@ const jr = O(
|
|
|
2311
2349
|
color: "var(--vscode-textLink-foreground)",
|
|
2312
2350
|
cursor: "pointer"
|
|
2313
2351
|
}
|
|
2314
|
-
},
|
|
2352
|
+
}, Wr = {
|
|
2315
2353
|
display: "flex",
|
|
2316
2354
|
gap: "3px",
|
|
2317
2355
|
marginLeft: "6px",
|
|
2318
2356
|
overflow: "hidden",
|
|
2319
2357
|
flexShrink: 1,
|
|
2320
2358
|
minWidth: 0
|
|
2321
|
-
},
|
|
2359
|
+
}, Gr = {
|
|
2322
2360
|
fontSize: "10px",
|
|
2323
2361
|
lineHeight: "14px",
|
|
2324
2362
|
padding: "0 4px",
|
|
@@ -2330,32 +2368,32 @@ const jr = O(
|
|
|
2330
2368
|
textOverflow: "ellipsis",
|
|
2331
2369
|
maxWidth: "60px",
|
|
2332
2370
|
cursor: "pointer"
|
|
2333
|
-
}, bt =
|
|
2371
|
+
}, bt = k(
|
|
2334
2372
|
{
|
|
2335
2373
|
model: f.const(),
|
|
2336
2374
|
nodes: f.const(),
|
|
2337
2375
|
depth: f.const()
|
|
2338
2376
|
},
|
|
2339
|
-
(r, e) => /* @__PURE__ */ a(
|
|
2377
|
+
(r, e) => /* @__PURE__ */ a(me, { children: e.nodes.map((t) => /* @__PURE__ */ a(Kr, { model: e.model, node: t, depth: e.depth }, t.id)) })
|
|
2340
2378
|
);
|
|
2341
|
-
class
|
|
2379
|
+
class qr extends B({
|
|
2342
2380
|
model: f.const(),
|
|
2343
2381
|
node: f.const(),
|
|
2344
2382
|
depth: f.const()
|
|
2345
2383
|
}) {
|
|
2346
2384
|
constructor() {
|
|
2347
2385
|
super(...arguments);
|
|
2348
|
-
|
|
2349
|
-
|
|
2386
|
+
l(this, "isHovered", x(this, !1));
|
|
2387
|
+
l(this, "setHovered", (t) => {
|
|
2350
2388
|
this.isHovered.set(t, void 0);
|
|
2351
2389
|
});
|
|
2352
|
-
|
|
2390
|
+
l(this, "handleClick", () => {
|
|
2353
2391
|
this.props.model.selectNode(this.props.node.id);
|
|
2354
2392
|
});
|
|
2355
|
-
|
|
2393
|
+
l(this, "handleDoubleClick", () => {
|
|
2356
2394
|
this._hasChildren && this.props.model.toggleNodeExpanded(this.props.node.id);
|
|
2357
2395
|
});
|
|
2358
|
-
|
|
2396
|
+
l(this, "handleChevronClick", (t) => {
|
|
2359
2397
|
t.stopPropagation(), this.props.model.toggleNodeExpanded(this.props.node.id);
|
|
2360
2398
|
});
|
|
2361
2399
|
}
|
|
@@ -2373,37 +2411,37 @@ class Gr extends B({
|
|
|
2373
2411
|
return !!(this.props.node.children && this.props.node.children.length > 0);
|
|
2374
2412
|
}
|
|
2375
2413
|
}
|
|
2376
|
-
const
|
|
2377
|
-
const t = e.explorerModel, n = e.treeNode, s = e.treeDepth, o = !!(n.children && n.children.length > 0), i = o ? t.isNodeExpanded(n.id, r) : !1,
|
|
2414
|
+
const Kr = A(qr, {}, (r, e) => {
|
|
2415
|
+
const t = e.explorerModel, n = e.treeNode, s = e.treeDepth, o = !!(n.children && n.children.length > 0), i = o ? t.isNodeExpanded(n.id, r) : !1, c = t.selectedNodeId.read(r) === n.id, u = e.isHovered.read(r), h = Ce(
|
|
2378
2416
|
v.treeItem,
|
|
2379
2417
|
{ paddingLeft: `${8 + s * 12}px` },
|
|
2380
|
-
|
|
2381
|
-
!
|
|
2418
|
+
c && v.treeItemSelected,
|
|
2419
|
+
!c && u && v.treeItemHover
|
|
2382
2420
|
);
|
|
2383
|
-
return /* @__PURE__ */
|
|
2384
|
-
/* @__PURE__ */
|
|
2421
|
+
return /* @__PURE__ */ g(me, { children: [
|
|
2422
|
+
/* @__PURE__ */ g(
|
|
2385
2423
|
"div",
|
|
2386
2424
|
{
|
|
2387
|
-
style:
|
|
2425
|
+
style: h,
|
|
2388
2426
|
onClick: e.handleClick,
|
|
2389
2427
|
onDoubleClick: e.handleDoubleClick,
|
|
2390
2428
|
onMouseEnter: () => e.setHovered(!0),
|
|
2391
2429
|
onMouseLeave: () => e.setHovered(!1),
|
|
2392
2430
|
children: [
|
|
2393
|
-
o ? /* @__PURE__ */ a("div", { style: v.treeItemChevron, onClick: e.handleChevronClick, children: i ? /* @__PURE__ */ a(
|
|
2394
|
-
/* @__PURE__ */ a("div", { style: v.treeItemIcon, children: n.type === "folder" ? /* @__PURE__ */ a(
|
|
2431
|
+
o ? /* @__PURE__ */ a("div", { style: v.treeItemChevron, onClick: e.handleChevronClick, children: i ? /* @__PURE__ */ a(Br, {}) : /* @__PURE__ */ a(Dr, {}) }) : /* @__PURE__ */ a("div", { style: v.treeItemChevronPlaceholder }),
|
|
2432
|
+
/* @__PURE__ */ a("div", { style: v.treeItemIcon, children: n.type === "folder" ? /* @__PURE__ */ a($r, { style: { color: "var(--vscode-symbolIcon-folderForeground)" } }) : /* @__PURE__ */ a(Ar, { style: { color: "#deb45b" } }) }),
|
|
2395
2433
|
/* @__PURE__ */ a("span", { style: v.treeItemLabel, children: n.name }),
|
|
2396
|
-
n.labels.some((
|
|
2434
|
+
n.labels.some((p) => !p.startsWith(".")) && /* @__PURE__ */ a("span", { style: Wr, children: n.labels.filter((p) => !p.startsWith(".")).map((p) => /* @__PURE__ */ a(
|
|
2397
2435
|
"span",
|
|
2398
2436
|
{
|
|
2399
|
-
style:
|
|
2400
|
-
onClick: (
|
|
2401
|
-
|
|
2437
|
+
style: Gr,
|
|
2438
|
+
onClick: (m) => {
|
|
2439
|
+
m.stopPropagation(), t.searchQuery.set(p, void 0);
|
|
2402
2440
|
},
|
|
2403
|
-
title:
|
|
2404
|
-
children:
|
|
2441
|
+
title: p,
|
|
2442
|
+
children: p
|
|
2405
2443
|
},
|
|
2406
|
-
|
|
2444
|
+
p
|
|
2407
2445
|
)) }),
|
|
2408
2446
|
o && /* @__PURE__ */ a("span", { style: v.treeItemCount, children: n.children.length })
|
|
2409
2447
|
]
|
|
@@ -2411,10 +2449,10 @@ const qr = A(Gr, {}, (r, e) => {
|
|
|
2411
2449
|
),
|
|
2412
2450
|
o && i && /* @__PURE__ */ a(bt, { model: t, nodes: n.children, depth: s + 1 })
|
|
2413
2451
|
] });
|
|
2414
|
-
}),
|
|
2452
|
+
}), Jr = {
|
|
2415
2453
|
padding: "4px 8px",
|
|
2416
2454
|
borderBottom: "1px solid var(--vscode-panel-border)"
|
|
2417
|
-
},
|
|
2455
|
+
}, Qr = {
|
|
2418
2456
|
width: "100%",
|
|
2419
2457
|
height: "24px",
|
|
2420
2458
|
padding: "0 22px 0 6px",
|
|
@@ -2425,9 +2463,9 @@ const qr = A(Gr, {}, (r, e) => {
|
|
|
2425
2463
|
borderRadius: "2px",
|
|
2426
2464
|
outline: "none",
|
|
2427
2465
|
boxSizing: "border-box"
|
|
2428
|
-
}, Qr = {
|
|
2429
|
-
position: "relative"
|
|
2430
2466
|
}, Zr = {
|
|
2467
|
+
position: "relative"
|
|
2468
|
+
}, Xr = {
|
|
2431
2469
|
position: "absolute",
|
|
2432
2470
|
right: "2px",
|
|
2433
2471
|
top: "50%",
|
|
@@ -2444,19 +2482,19 @@ const qr = A(Gr, {}, (r, e) => {
|
|
|
2444
2482
|
borderRadius: "2px",
|
|
2445
2483
|
fontSize: "14px",
|
|
2446
2484
|
opacity: 0.7
|
|
2447
|
-
},
|
|
2485
|
+
}, Yr = k(
|
|
2448
2486
|
{
|
|
2449
2487
|
model: f.const()
|
|
2450
2488
|
},
|
|
2451
2489
|
(r, e) => {
|
|
2452
2490
|
const t = e.model.searchQuery.read(r);
|
|
2453
|
-
return /* @__PURE__ */ a("div", { style:
|
|
2491
|
+
return /* @__PURE__ */ a("div", { style: Jr, children: /* @__PURE__ */ g("div", { style: Zr, children: [
|
|
2454
2492
|
/* @__PURE__ */ a(
|
|
2455
2493
|
"input",
|
|
2456
2494
|
{
|
|
2457
2495
|
type: "text",
|
|
2458
2496
|
placeholder: "Filter (name or label)",
|
|
2459
|
-
style:
|
|
2497
|
+
style: Qr,
|
|
2460
2498
|
value: t ?? "",
|
|
2461
2499
|
onChange: (n) => e.model.searchQuery.set(n.target.value || void 0, void 0),
|
|
2462
2500
|
onFocus: (n) => n.target.style.borderColor = "var(--vscode-focusBorder)",
|
|
@@ -2466,7 +2504,7 @@ const qr = A(Gr, {}, (r, e) => {
|
|
|
2466
2504
|
t && /* @__PURE__ */ a(
|
|
2467
2505
|
"button",
|
|
2468
2506
|
{
|
|
2469
|
-
style:
|
|
2507
|
+
style: Xr,
|
|
2470
2508
|
onClick: () => e.model.searchQuery.set(void 0, void 0),
|
|
2471
2509
|
title: "Clear filter",
|
|
2472
2510
|
children: "×"
|
|
@@ -2474,29 +2512,29 @@ const qr = A(Gr, {}, (r, e) => {
|
|
|
2474
2512
|
)
|
|
2475
2513
|
] }) });
|
|
2476
2514
|
}
|
|
2477
|
-
),
|
|
2515
|
+
), en = k(
|
|
2478
2516
|
{
|
|
2479
2517
|
model: f.const()
|
|
2480
2518
|
},
|
|
2481
2519
|
(r, e) => {
|
|
2482
2520
|
const t = e.model.filteredTree.read(r);
|
|
2483
|
-
return /* @__PURE__ */
|
|
2521
|
+
return /* @__PURE__ */ g("div", { style: v.sidebar, children: [
|
|
2484
2522
|
/* @__PURE__ */ a("div", { style: v.sidebarHeader, children: "Explorer" }),
|
|
2485
|
-
/* @__PURE__ */ a(
|
|
2523
|
+
/* @__PURE__ */ a(Yr, { model: e.model }),
|
|
2486
2524
|
/* @__PURE__ */ a("div", { style: v.sidebarContent, children: /* @__PURE__ */ a(bt, { model: e.model, nodes: [t], depth: 0 }) })
|
|
2487
2525
|
] });
|
|
2488
2526
|
}
|
|
2489
2527
|
);
|
|
2490
|
-
class
|
|
2528
|
+
class tn extends B({}) {
|
|
2491
2529
|
constructor() {
|
|
2492
2530
|
super(...arguments);
|
|
2493
|
-
|
|
2494
|
-
|
|
2531
|
+
l(this, "checked", x(this, !1));
|
|
2532
|
+
l(this, "toggle", () => {
|
|
2495
2533
|
this.checked.set(!this.checked.get(), void 0);
|
|
2496
2534
|
});
|
|
2497
2535
|
}
|
|
2498
2536
|
}
|
|
2499
|
-
const
|
|
2537
|
+
const rn = A(tn, {}, (r, e) => {
|
|
2500
2538
|
const t = e.checked.read(r), n = {
|
|
2501
2539
|
position: "relative",
|
|
2502
2540
|
width: "36px",
|
|
@@ -2517,13 +2555,13 @@ const tn = A(en, {}, (r, e) => {
|
|
|
2517
2555
|
transition: "left 0.2s"
|
|
2518
2556
|
};
|
|
2519
2557
|
return /* @__PURE__ */ a("div", { style: n, onClick: e.toggle, children: /* @__PURE__ */ a("div", { style: s }) });
|
|
2520
|
-
}),
|
|
2558
|
+
}), nn = k(
|
|
2521
2559
|
{
|
|
2522
2560
|
node: f.const()
|
|
2523
2561
|
},
|
|
2524
|
-
(r, e) => e.node.type !== "component" ? /* @__PURE__ */ a("div", { style: { padding: "12px", color: "var(--vscode-descriptionForeground)", fontSize: "12px" }, children: "Select a component (not a folder) to view its properties" }) : /* @__PURE__ */
|
|
2525
|
-
/* @__PURE__ */
|
|
2526
|
-
/* @__PURE__ */
|
|
2562
|
+
(r, e) => e.node.type !== "component" ? /* @__PURE__ */ a("div", { style: { padding: "12px", color: "var(--vscode-descriptionForeground)", fontSize: "12px" }, children: "Select a component (not a folder) to view its properties" }) : /* @__PURE__ */ g("div", { style: v.propertiesPanel, children: [
|
|
2563
|
+
/* @__PURE__ */ g("div", { style: v.propertyRow, children: [
|
|
2564
|
+
/* @__PURE__ */ g("div", { style: v.propertyLabel, children: [
|
|
2527
2565
|
"children",
|
|
2528
2566
|
/* @__PURE__ */ a("span", { style: { color: "var(--vscode-descriptionForeground)" }, children: " : string" })
|
|
2529
2567
|
] }),
|
|
@@ -2538,12 +2576,12 @@ const tn = A(en, {}, (r, e) => {
|
|
|
2538
2576
|
),
|
|
2539
2577
|
/* @__PURE__ */ a("div", { style: v.propertyDescription, children: "Button text content" })
|
|
2540
2578
|
] }),
|
|
2541
|
-
/* @__PURE__ */
|
|
2542
|
-
/* @__PURE__ */
|
|
2579
|
+
/* @__PURE__ */ g("div", { style: v.propertyRow, children: [
|
|
2580
|
+
/* @__PURE__ */ g("div", { style: v.propertyLabel, children: [
|
|
2543
2581
|
"variant",
|
|
2544
2582
|
/* @__PURE__ */ a("span", { style: { color: "var(--vscode-descriptionForeground)" }, children: " : select" })
|
|
2545
2583
|
] }),
|
|
2546
|
-
/* @__PURE__ */
|
|
2584
|
+
/* @__PURE__ */ g("select", { style: v.propertySelect, defaultValue: "default", children: [
|
|
2547
2585
|
/* @__PURE__ */ a("option", { value: "default", children: "default" }),
|
|
2548
2586
|
/* @__PURE__ */ a("option", { value: "primary", children: "primary" }),
|
|
2549
2587
|
/* @__PURE__ */ a("option", { value: "secondary", children: "secondary" }),
|
|
@@ -2551,70 +2589,67 @@ const tn = A(en, {}, (r, e) => {
|
|
|
2551
2589
|
] }),
|
|
2552
2590
|
/* @__PURE__ */ a("div", { style: v.propertyDescription, children: "Visual style variant" })
|
|
2553
2591
|
] }),
|
|
2554
|
-
/* @__PURE__ */
|
|
2555
|
-
/* @__PURE__ */
|
|
2592
|
+
/* @__PURE__ */ g("div", { style: v.propertyRow, children: [
|
|
2593
|
+
/* @__PURE__ */ g("div", { style: v.propertyLabel, children: [
|
|
2556
2594
|
"size",
|
|
2557
2595
|
/* @__PURE__ */ a("span", { style: { color: "var(--vscode-descriptionForeground)" }, children: " : select" })
|
|
2558
2596
|
] }),
|
|
2559
|
-
/* @__PURE__ */
|
|
2597
|
+
/* @__PURE__ */ g("select", { style: v.propertySelect, defaultValue: "default", children: [
|
|
2560
2598
|
/* @__PURE__ */ a("option", { value: "sm", children: "sm" }),
|
|
2561
2599
|
/* @__PURE__ */ a("option", { value: "default", children: "default" }),
|
|
2562
2600
|
/* @__PURE__ */ a("option", { value: "lg", children: "lg" })
|
|
2563
2601
|
] }),
|
|
2564
2602
|
/* @__PURE__ */ a("div", { style: v.propertyDescription, children: "Button size" })
|
|
2565
2603
|
] }),
|
|
2566
|
-
/* @__PURE__ */
|
|
2567
|
-
/* @__PURE__ */
|
|
2604
|
+
/* @__PURE__ */ g("div", { style: v.propertyRow, children: [
|
|
2605
|
+
/* @__PURE__ */ g("div", { style: v.propertyLabel, children: [
|
|
2568
2606
|
"disabled",
|
|
2569
2607
|
/* @__PURE__ */ a("span", { style: { color: "var(--vscode-descriptionForeground)" }, children: " : boolean" })
|
|
2570
2608
|
] }),
|
|
2571
|
-
/* @__PURE__ */ a(
|
|
2609
|
+
/* @__PURE__ */ a(rn, {}),
|
|
2572
2610
|
/* @__PURE__ */ a("div", { style: v.propertyDescription, children: "Disable the button" })
|
|
2573
2611
|
] })
|
|
2574
2612
|
] })
|
|
2575
|
-
),
|
|
2613
|
+
), sn = k(
|
|
2576
2614
|
{
|
|
2577
2615
|
selectedNode: f.const()
|
|
2578
2616
|
},
|
|
2579
|
-
(r, e) => /* @__PURE__ */
|
|
2580
|
-
/* @__PURE__ */
|
|
2617
|
+
(r, e) => /* @__PURE__ */ g("div", { style: Ce(v.sidebar, v.sidebarRight), children: [
|
|
2618
|
+
/* @__PURE__ */ g("div", { style: v.sidebarHeader, children: [
|
|
2581
2619
|
/* @__PURE__ */ a("span", { style: { marginRight: "6px", color: "var(--vscode-textLink-foreground)" }, children: "</>" }),
|
|
2582
2620
|
"Props"
|
|
2583
2621
|
] }),
|
|
2584
|
-
/* @__PURE__ */ a("div", { style: v.sidebarContent, children: e.selectedNode ? /* @__PURE__ */ a(
|
|
2622
|
+
/* @__PURE__ */ a("div", { style: v.sidebarContent, children: e.selectedNode ? /* @__PURE__ */ a(nn, { node: e.selectedNode }) : /* @__PURE__ */ a("div", { style: { padding: "12px", color: "var(--vscode-descriptionForeground)", fontSize: "12px" }, children: "Select a component to view its properties" }) })
|
|
2585
2623
|
] })
|
|
2586
|
-
), _t = /* @__PURE__ */ new WeakSet(),
|
|
2624
|
+
), _t = /* @__PURE__ */ new WeakSet(), Le = HTMLElement.prototype.focus;
|
|
2587
2625
|
HTMLElement.prototype.focus = function(r) {
|
|
2588
2626
|
const e = this.getRootNode();
|
|
2589
|
-
e instanceof ShadowRoot && _t.has(e) && !(r != null && r.preventScroll) ?
|
|
2627
|
+
e instanceof ShadowRoot && _t.has(e) && !(r != null && r.preventScroll) ? Le.call(this, { ...r, preventScroll: !0 }) : Le.call(this, r);
|
|
2590
2628
|
};
|
|
2591
|
-
function
|
|
2629
|
+
function on(r) {
|
|
2592
2630
|
_t.add(r);
|
|
2593
2631
|
}
|
|
2594
|
-
class
|
|
2632
|
+
class an extends B({
|
|
2595
2633
|
fixture: f.const(),
|
|
2596
2634
|
compact: f.const(),
|
|
2597
2635
|
onSelect: f.const()
|
|
2598
2636
|
}) {
|
|
2599
2637
|
constructor() {
|
|
2600
2638
|
super(...arguments);
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
c(this, "measuredWidth", C(this, void 0));
|
|
2608
|
-
c(this, "measuredHeight", C(this, void 0));
|
|
2609
|
-
c(this, "setContainerRef", (t) => {
|
|
2639
|
+
l(this, "_containerRef", null);
|
|
2640
|
+
l(this, "_rendering", null);
|
|
2641
|
+
l(this, "_resizeObserver", null);
|
|
2642
|
+
l(this, "measuredWidth", x(this, void 0));
|
|
2643
|
+
l(this, "measuredHeight", x(this, void 0));
|
|
2644
|
+
l(this, "setContainerRef", (t) => {
|
|
2610
2645
|
if (t === this._containerRef || (this._cleanup(), this._containerRef = t, !t)) return;
|
|
2611
|
-
const n = this.fixture.component;
|
|
2612
|
-
|
|
2613
|
-
const s =
|
|
2646
|
+
const n = new ft(t, this.fixture.component);
|
|
2647
|
+
this._rendering = n, n.shadowRoot && on(n.shadowRoot);
|
|
2648
|
+
const s = n.renderTarget;
|
|
2614
2649
|
this._resizeObserver = new ResizeObserver((o) => {
|
|
2615
2650
|
for (const i of o) {
|
|
2616
|
-
const { width: d, height:
|
|
2617
|
-
|
|
2651
|
+
const { width: d, height: c } = i.contentRect;
|
|
2652
|
+
c > 0 && (this.measuredWidth.set(Math.round(d), void 0), this.measuredHeight.set(Math.round(c), void 0));
|
|
2618
2653
|
}
|
|
2619
2654
|
}), this._resizeObserver.observe(s);
|
|
2620
2655
|
});
|
|
@@ -2628,95 +2663,48 @@ class on extends B({
|
|
|
2628
2663
|
get onSelect() {
|
|
2629
2664
|
return this.props.onSelect;
|
|
2630
2665
|
}
|
|
2631
|
-
_renderInShadowDom(t, n) {
|
|
2632
|
-
if (t.shadowRoot) {
|
|
2633
|
-
for (this._shadowRoot = t.shadowRoot; this._shadowRoot.firstChild; )
|
|
2634
|
-
this._shadowRoot.removeChild(this._shadowRoot.firstChild);
|
|
2635
|
-
this._shadowRoot.adoptedStyleSheets = [];
|
|
2636
|
-
} else
|
|
2637
|
-
this._shadowRoot = t.attachShadow({ mode: "open" });
|
|
2638
|
-
if (sn(this._shadowRoot), n.styles)
|
|
2639
|
-
for (const i of n.styles)
|
|
2640
|
-
if (i.type === "css") {
|
|
2641
|
-
const d = document.createElement("style");
|
|
2642
|
-
d.textContent = i.content, this._shadowRoot.appendChild(d);
|
|
2643
|
-
} else if (i.type === "url") {
|
|
2644
|
-
const d = document.createElement("link");
|
|
2645
|
-
d.rel = "stylesheet", d.href = i.href, this._shadowRoot.appendChild(d);
|
|
2646
|
-
} else i.type === "adopted" && (this._shadowRoot.adoptedStyleSheets = [
|
|
2647
|
-
...this._shadowRoot.adoptedStyleSheets,
|
|
2648
|
-
i.sheet
|
|
2649
|
-
]);
|
|
2650
|
-
const s = document.createElement("div");
|
|
2651
|
-
s.style.display = "inline-block", this._renderContainer = s, this._shadowRoot.appendChild(s);
|
|
2652
|
-
const o = this._getDefaultProps(n);
|
|
2653
|
-
this._abortController = new AbortController(), this._handleRenderReturn(n.render(s, {
|
|
2654
|
-
props: o,
|
|
2655
|
-
signal: this._abortController.signal
|
|
2656
|
-
}));
|
|
2657
|
-
}
|
|
2658
|
-
_renderDirect(t, n) {
|
|
2659
|
-
this._renderContainer = t;
|
|
2660
|
-
const s = this._getDefaultProps(n);
|
|
2661
|
-
this._abortController = new AbortController(), this._handleRenderReturn(n.render(t, {
|
|
2662
|
-
props: s,
|
|
2663
|
-
signal: this._abortController.signal
|
|
2664
|
-
}));
|
|
2665
|
-
}
|
|
2666
|
-
_handleRenderReturn(t) {
|
|
2667
|
-
t instanceof Promise ? t.then((n) => {
|
|
2668
|
-
this._abortController && !this._abortController.signal.aborted && (this._renderResult = n ?? void 0);
|
|
2669
|
-
}).catch(() => {
|
|
2670
|
-
}) : this._renderResult = t ?? void 0;
|
|
2671
|
-
}
|
|
2672
|
-
_getDefaultProps(t) {
|
|
2673
|
-
const n = {};
|
|
2674
|
-
for (const s of t.properties)
|
|
2675
|
-
n[s.name] = s.defaultValue;
|
|
2676
|
-
return n;
|
|
2677
|
-
}
|
|
2678
2666
|
_cleanup() {
|
|
2679
2667
|
var t, n;
|
|
2680
|
-
|
|
2668
|
+
(t = this._rendering) == null || t.dispose(), this._rendering = null, (n = this._resizeObserver) == null || n.disconnect(), this._resizeObserver = null;
|
|
2681
2669
|
}
|
|
2682
2670
|
dispose() {
|
|
2683
2671
|
this._cleanup();
|
|
2684
2672
|
}
|
|
2685
2673
|
}
|
|
2686
2674
|
const yt = A(
|
|
2687
|
-
|
|
2675
|
+
an,
|
|
2688
2676
|
{},
|
|
2689
2677
|
(r, e) => {
|
|
2690
2678
|
const t = e.fixture, n = t.component, s = n.displayMode, o = e.measuredWidth.read(r), i = e.measuredHeight.read(r), d = e.compact;
|
|
2691
|
-
let
|
|
2679
|
+
let c;
|
|
2692
2680
|
if (s.type === "page") {
|
|
2693
|
-
const
|
|
2694
|
-
|
|
2695
|
-
width:
|
|
2696
|
-
height:
|
|
2681
|
+
const m = s.viewports[0], b = zt(m);
|
|
2682
|
+
c = {
|
|
2683
|
+
width: b.width,
|
|
2684
|
+
height: b.height,
|
|
2697
2685
|
overflow: "auto"
|
|
2698
2686
|
};
|
|
2699
2687
|
} else
|
|
2700
|
-
|
|
2688
|
+
c = {
|
|
2701
2689
|
display: "inline-block"
|
|
2702
2690
|
};
|
|
2703
|
-
const
|
|
2704
|
-
return /* @__PURE__ */
|
|
2705
|
-
/* @__PURE__ */
|
|
2691
|
+
const u = o && i ? `${o} × ${i}` : "", h = d ? q.wrapperCompact : q.wrapper, p = d ? q.nameCompact : q.name;
|
|
2692
|
+
return /* @__PURE__ */ g("div", { style: h, children: [
|
|
2693
|
+
/* @__PURE__ */ g("div", { style: q.labelRow, children: [
|
|
2706
2694
|
d && /* @__PURE__ */ a(
|
|
2707
2695
|
"a",
|
|
2708
2696
|
{
|
|
2709
2697
|
href: vt("component", t.id),
|
|
2710
|
-
style: { ...
|
|
2711
|
-
onClick: (
|
|
2712
|
-
e.onSelect && (
|
|
2698
|
+
style: { ...p, textDecoration: "none", color: "inherit" },
|
|
2699
|
+
onClick: (m) => {
|
|
2700
|
+
e.onSelect && (m.preventDefault(), e.onSelect(t.id));
|
|
2713
2701
|
},
|
|
2714
2702
|
children: t.name
|
|
2715
2703
|
}
|
|
2716
2704
|
),
|
|
2717
|
-
!d &&
|
|
2705
|
+
!d && u && /* @__PURE__ */ a("span", { style: q.dimensions, children: u })
|
|
2718
2706
|
] }),
|
|
2719
|
-
/* @__PURE__ */ a("div", { style:
|
|
2707
|
+
/* @__PURE__ */ a("div", { style: hn(n.background), children: /* @__PURE__ */ a("div", { ref: e.setContainerRef, style: c }) })
|
|
2720
2708
|
] });
|
|
2721
2709
|
}
|
|
2722
2710
|
), G = 8;
|
|
@@ -2728,10 +2716,10 @@ function xt(r, e) {
|
|
|
2728
2716
|
linear-gradient(-45deg, transparent 75%, ${e} 75%)
|
|
2729
2717
|
`;
|
|
2730
2718
|
}
|
|
2731
|
-
const
|
|
2719
|
+
const dn = {
|
|
2732
2720
|
backgroundColor: "#ffffff",
|
|
2733
2721
|
backgroundImage: xt("#ffffff", "#e5e5e5")
|
|
2734
|
-
},
|
|
2722
|
+
}, cn = {
|
|
2735
2723
|
backgroundColor: "#1e1e1e",
|
|
2736
2724
|
backgroundImage: xt("#1e1e1e", "#2d2d2d")
|
|
2737
2725
|
}, ln = {
|
|
@@ -2744,8 +2732,8 @@ const an = {
|
|
|
2744
2732
|
overflow: "hidden",
|
|
2745
2733
|
position: "relative"
|
|
2746
2734
|
};
|
|
2747
|
-
function
|
|
2748
|
-
const e = r === "dark" ?
|
|
2735
|
+
function hn(r) {
|
|
2736
|
+
const e = r === "dark" ? cn : dn;
|
|
2749
2737
|
return {
|
|
2750
2738
|
...ln,
|
|
2751
2739
|
backgroundColor: e.backgroundColor,
|
|
@@ -2781,16 +2769,16 @@ const q = {
|
|
|
2781
2769
|
fontFamily: "var(--vscode-editor-font-family, monospace)"
|
|
2782
2770
|
}
|
|
2783
2771
|
};
|
|
2784
|
-
class
|
|
2772
|
+
class un extends B({
|
|
2785
2773
|
fixtureId: f.const(),
|
|
2786
2774
|
sessionName: f.const(),
|
|
2787
2775
|
daemon: f.const()
|
|
2788
2776
|
}) {
|
|
2789
2777
|
constructor(t) {
|
|
2790
2778
|
super(t);
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
this._store.add(
|
|
2779
|
+
l(this, "screenshot", x(this, { status: "idle" }));
|
|
2780
|
+
l(this, "_fetchVersion", 0);
|
|
2781
|
+
this._store.add(dt((n) => {
|
|
2794
2782
|
this.props.daemon.sourceTreeIds.read(n).get(this.props.sessionName) && this._fetchScreenshot();
|
|
2795
2783
|
}));
|
|
2796
2784
|
}
|
|
@@ -2808,8 +2796,8 @@ class hn extends B({
|
|
|
2808
2796
|
}
|
|
2809
2797
|
}
|
|
2810
2798
|
}
|
|
2811
|
-
const
|
|
2812
|
-
|
|
2799
|
+
const He = A(
|
|
2800
|
+
un,
|
|
2813
2801
|
{},
|
|
2814
2802
|
(r, e) => {
|
|
2815
2803
|
const t = e.screenshot.read(r);
|
|
@@ -2870,7 +2858,7 @@ const Pe = A(
|
|
|
2870
2858
|
border: "1px solid var(--vscode-panel-border)"
|
|
2871
2859
|
}
|
|
2872
2860
|
};
|
|
2873
|
-
class
|
|
2861
|
+
class pn extends B({
|
|
2874
2862
|
fixtureId: f.const(),
|
|
2875
2863
|
daemon: f.const(),
|
|
2876
2864
|
baselineSession: f.const(),
|
|
@@ -2878,8 +2866,8 @@ class un extends B({
|
|
|
2878
2866
|
}) {
|
|
2879
2867
|
constructor(t) {
|
|
2880
2868
|
super(t);
|
|
2881
|
-
|
|
2882
|
-
this._store.add(
|
|
2869
|
+
l(this, "comparisonStatus", x(this, { status: "loading" }));
|
|
2870
|
+
this._store.add(dt((n) => {
|
|
2883
2871
|
const s = this.props.daemon.sourceTreeIds.read(n), o = s.get(this.props.baselineSession), i = s.get(this.props.currentSession);
|
|
2884
2872
|
o && i && this._fetchComparison();
|
|
2885
2873
|
}));
|
|
@@ -2910,21 +2898,21 @@ class un extends B({
|
|
|
2910
2898
|
}
|
|
2911
2899
|
}
|
|
2912
2900
|
}
|
|
2913
|
-
const
|
|
2914
|
-
|
|
2901
|
+
const fn = A(
|
|
2902
|
+
pn,
|
|
2915
2903
|
{},
|
|
2916
2904
|
(r, e) => {
|
|
2917
|
-
const t = e.comparisonStatus.read(r), n = t.status === "loading" ? /* @__PURE__ */ a("span", { style:
|
|
2918
|
-
return /* @__PURE__ */
|
|
2919
|
-
/* @__PURE__ */
|
|
2920
|
-
/* @__PURE__ */ a("span", { style:
|
|
2905
|
+
const t = e.comparisonStatus.read(r), n = t.status === "loading" ? /* @__PURE__ */ a("span", { style: R.badgeLoading, children: "comparing..." }) : t.status === "error" ? /* @__PURE__ */ a("span", { style: R.badgeError, children: "error" }) : t.match ? /* @__PURE__ */ a("span", { style: R.badgeMatch, children: "✓ match" }) : /* @__PURE__ */ a("span", { style: R.badgeChanged, children: "● changed" });
|
|
2906
|
+
return /* @__PURE__ */ g("div", { style: R.fixtureRow, children: [
|
|
2907
|
+
/* @__PURE__ */ g("div", { style: R.fixtureLabel, children: [
|
|
2908
|
+
/* @__PURE__ */ a("span", { style: R.fixtureName, children: e.fixtureId }),
|
|
2921
2909
|
n
|
|
2922
2910
|
] }),
|
|
2923
|
-
/* @__PURE__ */
|
|
2924
|
-
/* @__PURE__ */
|
|
2925
|
-
/* @__PURE__ */ a("span", { style:
|
|
2911
|
+
/* @__PURE__ */ g("div", { style: R.sideBySide, children: [
|
|
2912
|
+
/* @__PURE__ */ g("div", { style: R.screenshotColumn, children: [
|
|
2913
|
+
/* @__PURE__ */ a("span", { style: R.columnLabel, children: "Current" }),
|
|
2926
2914
|
/* @__PURE__ */ a(
|
|
2927
|
-
|
|
2915
|
+
He,
|
|
2928
2916
|
{
|
|
2929
2917
|
fixtureId: e.fixtureId,
|
|
2930
2918
|
sessionName: e.currentSession,
|
|
@@ -2932,10 +2920,10 @@ const pn = A(
|
|
|
2932
2920
|
}
|
|
2933
2921
|
)
|
|
2934
2922
|
] }),
|
|
2935
|
-
/* @__PURE__ */
|
|
2936
|
-
/* @__PURE__ */ a("span", { style:
|
|
2923
|
+
/* @__PURE__ */ g("div", { style: R.screenshotColumn, children: [
|
|
2924
|
+
/* @__PURE__ */ a("span", { style: R.columnLabel, children: "Baseline" }),
|
|
2937
2925
|
/* @__PURE__ */ a(
|
|
2938
|
-
|
|
2926
|
+
He,
|
|
2939
2927
|
{
|
|
2940
2928
|
fixtureId: e.fixtureId,
|
|
2941
2929
|
sessionName: e.baselineSession,
|
|
@@ -2946,7 +2934,7 @@ const pn = A(
|
|
|
2946
2934
|
] })
|
|
2947
2935
|
] });
|
|
2948
2936
|
}
|
|
2949
|
-
),
|
|
2937
|
+
), gn = k(
|
|
2950
2938
|
{
|
|
2951
2939
|
name: f.const(),
|
|
2952
2940
|
path: f.const(),
|
|
@@ -2955,8 +2943,8 @@ const pn = A(
|
|
|
2955
2943
|
baselineSession: f.const(),
|
|
2956
2944
|
currentSession: f.const()
|
|
2957
2945
|
},
|
|
2958
|
-
(r, e) => /* @__PURE__ */ a("div", { style:
|
|
2959
|
-
|
|
2946
|
+
(r, e) => /* @__PURE__ */ a("div", { style: R.groupContent, children: e.items.map((t) => /* @__PURE__ */ a(
|
|
2947
|
+
fn,
|
|
2960
2948
|
{
|
|
2961
2949
|
fixtureId: t.fixtureId,
|
|
2962
2950
|
daemon: e.daemon,
|
|
@@ -2965,7 +2953,7 @@ const pn = A(
|
|
|
2965
2953
|
},
|
|
2966
2954
|
t.fixtureId
|
|
2967
2955
|
)) })
|
|
2968
|
-
),
|
|
2956
|
+
), R = {
|
|
2969
2957
|
groupContent: {
|
|
2970
2958
|
display: "flex",
|
|
2971
2959
|
flexDirection: "column",
|
|
@@ -3034,13 +3022,13 @@ function St(r, e) {
|
|
|
3034
3022
|
linear-gradient(-45deg, transparent 75%, ${e} 75%)
|
|
3035
3023
|
`;
|
|
3036
3024
|
}
|
|
3037
|
-
const
|
|
3025
|
+
const mn = {
|
|
3038
3026
|
backgroundColor: "#ffffff",
|
|
3039
3027
|
backgroundImage: St("#ffffff", "#e5e5e5")
|
|
3040
|
-
},
|
|
3028
|
+
}, vn = {
|
|
3041
3029
|
backgroundColor: "#1e1e1e",
|
|
3042
3030
|
backgroundImage: St("#1e1e1e", "#2d2d2d")
|
|
3043
|
-
},
|
|
3031
|
+
}, bn = {
|
|
3044
3032
|
display: "inline-block",
|
|
3045
3033
|
padding: "12px",
|
|
3046
3034
|
borderRadius: "4px",
|
|
@@ -3048,32 +3036,32 @@ const gn = {
|
|
|
3048
3036
|
backgroundPosition: `0 0, 0 ${K}px, ${K}px -${K}px, -${K}px 0`,
|
|
3049
3037
|
boxShadow: "0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.08)"
|
|
3050
3038
|
};
|
|
3051
|
-
function
|
|
3052
|
-
const e = r === "dark" ?
|
|
3039
|
+
function _n(r) {
|
|
3040
|
+
const e = r === "dark" ? vn : mn;
|
|
3053
3041
|
return {
|
|
3054
|
-
...
|
|
3042
|
+
...bn,
|
|
3055
3043
|
backgroundColor: e.backgroundColor,
|
|
3056
3044
|
backgroundImage: e.backgroundImage
|
|
3057
3045
|
};
|
|
3058
3046
|
}
|
|
3059
3047
|
function je({ src: r, alt: e, background: t }) {
|
|
3060
|
-
return /* @__PURE__ */ a("div", { style:
|
|
3048
|
+
return /* @__PURE__ */ a("div", { style: _n(t), children: /* @__PURE__ */ a("img", { src: r, alt: e, style: w.image }) });
|
|
3061
3049
|
}
|
|
3062
|
-
const
|
|
3050
|
+
const yn = k(
|
|
3063
3051
|
{
|
|
3064
3052
|
item: f.const(),
|
|
3065
3053
|
reportModel: f.const()
|
|
3066
3054
|
},
|
|
3067
3055
|
(r, e) => {
|
|
3068
|
-
const { item: t, reportModel: n } = e, { entry: s } = t, o = s.background ?? "light", i = s.status === "unchanged" ? /* @__PURE__ */ a("span", { style:
|
|
3069
|
-
return /* @__PURE__ */
|
|
3070
|
-
/* @__PURE__ */
|
|
3071
|
-
/* @__PURE__ */ a("span", { style:
|
|
3056
|
+
const { item: t, reportModel: n } = e, { entry: s } = t, o = s.background ?? "light", i = s.status === "unchanged" ? /* @__PURE__ */ a("span", { style: w.badgeMatch, children: "✓ match" }) : s.status === "changed" ? /* @__PURE__ */ a("span", { style: w.badgeChanged, children: "● changed" }) : /* @__PURE__ */ a("span", { style: w.badgeAdded, children: "+ added" }), d = s.baselineScreenshot || s.currentScreenshot;
|
|
3057
|
+
return /* @__PURE__ */ g("div", { style: w.fixtureRow, children: [
|
|
3058
|
+
/* @__PURE__ */ g("div", { style: w.fixtureLabel, children: [
|
|
3059
|
+
/* @__PURE__ */ a("span", { style: w.fixtureName, children: t.fixtureId }),
|
|
3072
3060
|
i
|
|
3073
3061
|
] }),
|
|
3074
|
-
d && /* @__PURE__ */
|
|
3075
|
-
s.baselineScreenshot && /* @__PURE__ */
|
|
3076
|
-
/* @__PURE__ */ a("span", { style:
|
|
3062
|
+
d && /* @__PURE__ */ g("div", { style: w.sideBySide, children: [
|
|
3063
|
+
s.baselineScreenshot && /* @__PURE__ */ g("div", { style: w.screenshotColumn, children: [
|
|
3064
|
+
/* @__PURE__ */ a("span", { style: w.columnLabel, children: "Baseline" }),
|
|
3077
3065
|
/* @__PURE__ */ a(
|
|
3078
3066
|
je,
|
|
3079
3067
|
{
|
|
@@ -3083,8 +3071,8 @@ const _n = O(
|
|
|
3083
3071
|
}
|
|
3084
3072
|
)
|
|
3085
3073
|
] }),
|
|
3086
|
-
s.currentScreenshot && /* @__PURE__ */
|
|
3087
|
-
/* @__PURE__ */ a("span", { style:
|
|
3074
|
+
s.currentScreenshot && /* @__PURE__ */ g("div", { style: w.screenshotColumn, children: [
|
|
3075
|
+
/* @__PURE__ */ a("span", { style: w.columnLabel, children: "Current" }),
|
|
3088
3076
|
/* @__PURE__ */ a(
|
|
3089
3077
|
je,
|
|
3090
3078
|
{
|
|
@@ -3095,28 +3083,28 @@ const _n = O(
|
|
|
3095
3083
|
)
|
|
3096
3084
|
] })
|
|
3097
3085
|
] }),
|
|
3098
|
-
!d && s.status === "unchanged" && /* @__PURE__ */ a("div", { style:
|
|
3086
|
+
!d && s.status === "unchanged" && /* @__PURE__ */ a("div", { style: w.hashRow, children: /* @__PURE__ */ g("span", { style: w.hashText, children: [
|
|
3099
3087
|
"hash: ",
|
|
3100
3088
|
s.targetHash
|
|
3101
3089
|
] }) })
|
|
3102
3090
|
] });
|
|
3103
3091
|
}
|
|
3104
|
-
),
|
|
3092
|
+
), xn = k(
|
|
3105
3093
|
{
|
|
3106
3094
|
name: f.const(),
|
|
3107
3095
|
path: f.const(),
|
|
3108
3096
|
items: f.const(),
|
|
3109
3097
|
reportModel: f.const()
|
|
3110
3098
|
},
|
|
3111
|
-
(r, e) => /* @__PURE__ */ a("div", { style:
|
|
3112
|
-
|
|
3099
|
+
(r, e) => /* @__PURE__ */ a("div", { style: w.groupContent, children: e.items.map((t) => /* @__PURE__ */ a(
|
|
3100
|
+
yn,
|
|
3113
3101
|
{
|
|
3114
3102
|
item: t,
|
|
3115
3103
|
reportModel: e.reportModel
|
|
3116
3104
|
},
|
|
3117
3105
|
t.fixtureId
|
|
3118
3106
|
)) })
|
|
3119
|
-
),
|
|
3107
|
+
), w = {
|
|
3120
3108
|
groupContent: {
|
|
3121
3109
|
display: "flex",
|
|
3122
3110
|
flexDirection: "column",
|
|
@@ -3181,33 +3169,33 @@ const _n = O(
|
|
|
3181
3169
|
fontWeight: 500
|
|
3182
3170
|
}
|
|
3183
3171
|
}, wt = "component-explorer:fixtureHeights", Ue = 500;
|
|
3184
|
-
let
|
|
3172
|
+
let N = null;
|
|
3185
3173
|
function Ct() {
|
|
3186
|
-
if (
|
|
3174
|
+
if (N !== null) return N;
|
|
3187
3175
|
try {
|
|
3188
3176
|
const r = localStorage.getItem(wt);
|
|
3189
3177
|
if (r)
|
|
3190
|
-
return
|
|
3178
|
+
return N = JSON.parse(r), N;
|
|
3191
3179
|
} catch {
|
|
3192
3180
|
}
|
|
3193
|
-
return
|
|
3181
|
+
return N = {}, N;
|
|
3194
3182
|
}
|
|
3195
|
-
function
|
|
3196
|
-
if (
|
|
3183
|
+
function Sn() {
|
|
3184
|
+
if (N !== null)
|
|
3197
3185
|
try {
|
|
3198
|
-
const r = Object.entries(
|
|
3199
|
-
r.length > Ue && (
|
|
3186
|
+
const r = Object.entries(N);
|
|
3187
|
+
r.length > Ue && (N = Object.fromEntries(r.slice(-Ue))), localStorage.setItem(wt, JSON.stringify(N));
|
|
3200
3188
|
} catch {
|
|
3201
3189
|
}
|
|
3202
3190
|
}
|
|
3203
|
-
function
|
|
3191
|
+
function wn(r, e) {
|
|
3204
3192
|
const t = Ct();
|
|
3205
|
-
t[r] = e,
|
|
3193
|
+
t[r] = e, Sn();
|
|
3206
3194
|
}
|
|
3207
|
-
function
|
|
3195
|
+
function Cn() {
|
|
3208
3196
|
return new Map(Object.entries(Ct()));
|
|
3209
3197
|
}
|
|
3210
|
-
const
|
|
3198
|
+
const Rn = 280, Tn = 32, ne = 32, Pe = 400;
|
|
3211
3199
|
let Rt = 0;
|
|
3212
3200
|
function z(r, e) {
|
|
3213
3201
|
const t = ++Rt, n = performance.now().toFixed(1);
|
|
@@ -3217,14 +3205,14 @@ function z(r, e) {
|
|
|
3217
3205
|
e
|
|
3218
3206
|
);
|
|
3219
3207
|
}
|
|
3220
|
-
function
|
|
3208
|
+
function We(r, e) {
|
|
3221
3209
|
const t = ++Rt, n = performance.now().toFixed(1);
|
|
3222
3210
|
console.warn(
|
|
3223
3211
|
`[scroll #${t} @${n}ms] ${r}`,
|
|
3224
3212
|
e
|
|
3225
3213
|
);
|
|
3226
3214
|
}
|
|
3227
|
-
const Tt = "component-explorer:scrollAnchors",
|
|
3215
|
+
const Tt = "component-explorer:scrollAnchors", Ge = 100;
|
|
3228
3216
|
function kt() {
|
|
3229
3217
|
try {
|
|
3230
3218
|
const r = localStorage.getItem(Tt);
|
|
@@ -3233,34 +3221,34 @@ function kt() {
|
|
|
3233
3221
|
}
|
|
3234
3222
|
return {};
|
|
3235
3223
|
}
|
|
3236
|
-
function
|
|
3224
|
+
function kn(r, e) {
|
|
3237
3225
|
try {
|
|
3238
3226
|
const t = kt();
|
|
3239
3227
|
t[r] = e;
|
|
3240
|
-
const n = Object.entries(t), s = n.length >
|
|
3228
|
+
const n = Object.entries(t), s = n.length > Ge ? Object.fromEntries(n.slice(-Ge)) : t;
|
|
3241
3229
|
localStorage.setItem(Tt, JSON.stringify(s));
|
|
3242
3230
|
} catch {
|
|
3243
3231
|
}
|
|
3244
3232
|
}
|
|
3245
|
-
function
|
|
3233
|
+
function In(r) {
|
|
3246
3234
|
return kt()[r];
|
|
3247
3235
|
}
|
|
3248
3236
|
function It(r) {
|
|
3249
3237
|
return r.type === "single" ? r.fixture.id : r.id;
|
|
3250
3238
|
}
|
|
3251
|
-
function
|
|
3239
|
+
function On(r, e) {
|
|
3252
3240
|
const t = new Array(r.length);
|
|
3253
|
-
let n =
|
|
3241
|
+
let n = ne;
|
|
3254
3242
|
for (let s = 0; s < r.length; s++) {
|
|
3255
|
-
const o = e.get(It(r[s])) ??
|
|
3256
|
-
t[s] = { top: n, height: o }, n += o +
|
|
3243
|
+
const o = e.get(It(r[s])) ?? Rn;
|
|
3244
|
+
t[s] = { top: n, height: o }, n += o + Tn;
|
|
3257
3245
|
}
|
|
3258
3246
|
return t;
|
|
3259
3247
|
}
|
|
3260
|
-
function
|
|
3248
|
+
function fe(r) {
|
|
3261
3249
|
if (r.length === 0) return 0;
|
|
3262
3250
|
const e = r[r.length - 1];
|
|
3263
|
-
return e.top + e.height +
|
|
3251
|
+
return e.top + e.height + ne;
|
|
3264
3252
|
}
|
|
3265
3253
|
function Ot(r, e) {
|
|
3266
3254
|
let t = 0, n = r.length;
|
|
@@ -3270,16 +3258,16 @@ function Ot(r, e) {
|
|
|
3270
3258
|
}
|
|
3271
3259
|
return t;
|
|
3272
3260
|
}
|
|
3273
|
-
function
|
|
3261
|
+
function Nn(r, e, t) {
|
|
3274
3262
|
if (r.length === 0) return { start: 0, end: 0 };
|
|
3275
|
-
const n = Ot(r, e -
|
|
3263
|
+
const n = Ot(r, e - Pe);
|
|
3276
3264
|
let s = n;
|
|
3277
|
-
const o = e + t +
|
|
3265
|
+
const o = e + t + Pe;
|
|
3278
3266
|
for (; s < r.length && r[s].top < o; )
|
|
3279
3267
|
s++;
|
|
3280
3268
|
return { start: n, end: s };
|
|
3281
3269
|
}
|
|
3282
|
-
function
|
|
3270
|
+
function qe(r, e) {
|
|
3283
3271
|
if (r.length === 0) return;
|
|
3284
3272
|
const t = Ot(r, e), n = Math.min(t, r.length - 1);
|
|
3285
3273
|
return {
|
|
@@ -3287,16 +3275,16 @@ function Ke(r, e) {
|
|
|
3287
3275
|
offsetFromViewport: r[n].top - e
|
|
3288
3276
|
};
|
|
3289
3277
|
}
|
|
3290
|
-
function
|
|
3278
|
+
function Ke(r, e) {
|
|
3291
3279
|
return e.rowIndex >= r.length ? 0 : r[e.rowIndex].top - e.offsetFromViewport;
|
|
3292
3280
|
}
|
|
3293
|
-
function
|
|
3281
|
+
function Je(r) {
|
|
3294
3282
|
return r.type === "single" ? r.fixture.path : r.path;
|
|
3295
3283
|
}
|
|
3296
|
-
function
|
|
3284
|
+
function Qe(r) {
|
|
3297
3285
|
return r.split(" / ").slice(1);
|
|
3298
3286
|
}
|
|
3299
|
-
function
|
|
3287
|
+
function Vn(r, e, t) {
|
|
3300
3288
|
const n = t.split("/"), s = n.length - r.length;
|
|
3301
3289
|
for (let o = 0; o < r.length; o++)
|
|
3302
3290
|
if (!e || o >= e.length || r[o] !== e[o])
|
|
@@ -3307,14 +3295,14 @@ function Nn(r, e, t) {
|
|
|
3307
3295
|
}));
|
|
3308
3296
|
return [];
|
|
3309
3297
|
}
|
|
3310
|
-
const
|
|
3311
|
-
function Vn(r) {
|
|
3312
|
-
return Xe[Math.min(r, Xe.length - 1)];
|
|
3313
|
-
}
|
|
3314
|
-
const Ye = ["22px", "15px", "13px", "12px"];
|
|
3298
|
+
const Ze = ["h1", "h2", "h3", "h4"];
|
|
3315
3299
|
function Mn(r) {
|
|
3300
|
+
return Ze[Math.min(r, Ze.length - 1)];
|
|
3301
|
+
}
|
|
3302
|
+
const Xe = ["22px", "15px", "13px", "12px"];
|
|
3303
|
+
function Fn(r) {
|
|
3316
3304
|
return {
|
|
3317
|
-
fontSize:
|
|
3305
|
+
fontSize: Xe[Math.min(r, Xe.length - 1)],
|
|
3318
3306
|
fontWeight: r <= 1 ? 600 : 500,
|
|
3319
3307
|
color: "var(--vscode-foreground)",
|
|
3320
3308
|
margin: 0,
|
|
@@ -3323,39 +3311,39 @@ function Mn(r) {
|
|
|
3323
3311
|
borderBottom: r === 0 ? "1px solid var(--vscode-widget-border, var(--vscode-panel-border, rgba(128,128,128,0.35)))" : void 0
|
|
3324
3312
|
};
|
|
3325
3313
|
}
|
|
3326
|
-
class
|
|
3314
|
+
class En extends B({
|
|
3327
3315
|
model: f.const()
|
|
3328
3316
|
}) {
|
|
3329
3317
|
constructor() {
|
|
3330
3318
|
super(...arguments);
|
|
3331
|
-
|
|
3332
|
-
|
|
3333
|
-
|
|
3334
|
-
|
|
3335
|
-
|
|
3336
|
-
|
|
3337
|
-
|
|
3338
|
-
|
|
3339
|
-
|
|
3340
|
-
|
|
3319
|
+
l(this, "_rowHeights", x(this, Cn()));
|
|
3320
|
+
l(this, "_scrollTop", x(this, 0));
|
|
3321
|
+
l(this, "_viewportHeight", x(this, 0));
|
|
3322
|
+
l(this, "_scrollContainerRef", null);
|
|
3323
|
+
l(this, "_resizeObserver", null);
|
|
3324
|
+
l(this, "_viewportResizeObserver", null);
|
|
3325
|
+
l(this, "_currentNodeId");
|
|
3326
|
+
l(this, "_scrollSaveTimeout", null);
|
|
3327
|
+
l(this, "_suppressScrollHandler", !1);
|
|
3328
|
+
l(this, "layout", O(this, (t) => {
|
|
3341
3329
|
const n = this.explorerModel.selectedFixtures.read(t), s = this._rowHeights.read(t);
|
|
3342
|
-
return
|
|
3330
|
+
return On(n, s);
|
|
3343
3331
|
}));
|
|
3344
|
-
|
|
3332
|
+
l(this, "visibleRowRange", O(this, (t) => {
|
|
3345
3333
|
const n = this.layout.read(t), s = this._scrollTop.read(t), o = this._viewportHeight.read(t);
|
|
3346
|
-
return
|
|
3334
|
+
return Nn(n, s, o);
|
|
3347
3335
|
}));
|
|
3348
|
-
|
|
3336
|
+
l(this, "setScrollContainerRef", (t) => {
|
|
3349
3337
|
var n;
|
|
3350
3338
|
this._scrollContainerRef && this._scrollContainerRef.removeEventListener("scroll", this._handleScroll), (n = this._viewportResizeObserver) == null || n.disconnect(), this._scrollContainerRef = t, t && (t.addEventListener("scroll", this._handleScroll, { passive: !0 }), this._viewportHeight.set(t.clientHeight, void 0), z("setScrollContainerRef", { clientHeight: t.clientHeight, scrollTop: t.scrollTop }), this._viewportResizeObserver = new ResizeObserver(([s]) => {
|
|
3351
3339
|
const o = Math.round(s.contentRect.height), i = this._viewportHeight.get();
|
|
3352
3340
|
o !== i && z("viewportResize", { prev: i, new: o }), this._viewportHeight.set(o, void 0);
|
|
3353
3341
|
}), this._viewportResizeObserver.observe(t), this._restoreScrollPosition());
|
|
3354
3342
|
});
|
|
3355
|
-
|
|
3343
|
+
l(this, "_handleScroll", () => {
|
|
3356
3344
|
if (!this._scrollContainerRef) return;
|
|
3357
3345
|
const t = this._scrollTop.get(), n = this._scrollContainerRef.scrollTop, s = n - t;
|
|
3358
|
-
if (this._scrollTop.set(n, void 0), Math.abs(s) > 200 &&
|
|
3346
|
+
if (this._scrollTop.set(n, void 0), Math.abs(s) > 200 && We("handleScroll:LARGE_JUMP", {
|
|
3359
3347
|
prevObsScrollTop: t,
|
|
3360
3348
|
newScrollTop: n,
|
|
3361
3349
|
delta: s,
|
|
@@ -3367,42 +3355,42 @@ class Fn extends B({
|
|
|
3367
3355
|
}
|
|
3368
3356
|
this._scrollSaveTimeout && clearTimeout(this._scrollSaveTimeout), this._scrollSaveTimeout = setTimeout(() => {
|
|
3369
3357
|
if (!this._currentNodeId) return;
|
|
3370
|
-
const o = this.layout.get(), i =
|
|
3371
|
-
i &&
|
|
3358
|
+
const o = this.layout.get(), i = qe(o, this._scrollTop.get());
|
|
3359
|
+
i && kn(this._currentNodeId, i);
|
|
3372
3360
|
}, 150);
|
|
3373
3361
|
});
|
|
3374
|
-
|
|
3362
|
+
l(this, "observeRowElement", (t, n) => {
|
|
3375
3363
|
t && (this._resizeObserver || (this._resizeObserver = new ResizeObserver((s) => {
|
|
3376
3364
|
const o = this._rowHeights.get();
|
|
3377
3365
|
let i;
|
|
3378
3366
|
const d = [];
|
|
3379
|
-
for (const
|
|
3380
|
-
const
|
|
3381
|
-
if (!
|
|
3382
|
-
const
|
|
3383
|
-
|
|
3367
|
+
for (const c of s) {
|
|
3368
|
+
const u = c.target.getAttribute("data-row-id");
|
|
3369
|
+
if (!u) continue;
|
|
3370
|
+
const h = Math.round(c.contentRect.height);
|
|
3371
|
+
h > 0 && o.get(u) !== h && (d.push({ rid: u, oldH: o.get(u), newH: h }), i || (i = new Map(o)), i.set(u, h), wn(u, h));
|
|
3384
3372
|
}
|
|
3385
3373
|
if (i) {
|
|
3386
|
-
const
|
|
3374
|
+
const c = this.layout.get(), u = this._scrollTop.get(), h = qe(c, u);
|
|
3387
3375
|
this._rowHeights.set(i, void 0);
|
|
3388
|
-
const
|
|
3389
|
-
if (
|
|
3390
|
-
const
|
|
3391
|
-
Math.abs(
|
|
3376
|
+
const p = this.layout.get();
|
|
3377
|
+
if (h && this._scrollContainerRef) {
|
|
3378
|
+
const m = Ke(p, h), b = m - u;
|
|
3379
|
+
Math.abs(b) > 2 && z("resizeObserver:reAnchor", {
|
|
3392
3380
|
changedRows: d,
|
|
3393
|
-
anchor:
|
|
3394
|
-
scrollTopBefore:
|
|
3395
|
-
newScrollTop:
|
|
3396
|
-
delta:
|
|
3397
|
-
oldTotalHeight:
|
|
3398
|
-
newTotalHeight:
|
|
3399
|
-
}), Math.abs(
|
|
3381
|
+
anchor: h,
|
|
3382
|
+
scrollTopBefore: u,
|
|
3383
|
+
newScrollTop: m,
|
|
3384
|
+
delta: b,
|
|
3385
|
+
oldTotalHeight: fe(c),
|
|
3386
|
+
newTotalHeight: fe(p)
|
|
3387
|
+
}), Math.abs(b) > 200 && We("resizeObserver:LARGE_REANCHOR", {
|
|
3400
3388
|
changedRows: d,
|
|
3401
|
-
anchor:
|
|
3402
|
-
scrollTopBefore:
|
|
3403
|
-
newScrollTop:
|
|
3404
|
-
delta:
|
|
3405
|
-
}), this._suppressScrollHandler = !0, this._scrollContainerRef.scrollTop =
|
|
3389
|
+
anchor: h,
|
|
3390
|
+
scrollTopBefore: u,
|
|
3391
|
+
newScrollTop: m,
|
|
3392
|
+
delta: b
|
|
3393
|
+
}), this._suppressScrollHandler = !0, this._scrollContainerRef.scrollTop = m, this._scrollTop.set(m, void 0), requestAnimationFrame(() => {
|
|
3406
3394
|
this._suppressScrollHandler = !1;
|
|
3407
3395
|
});
|
|
3408
3396
|
}
|
|
@@ -3432,12 +3420,12 @@ class Fn extends B({
|
|
|
3432
3420
|
}
|
|
3433
3421
|
_restoreScrollPosition() {
|
|
3434
3422
|
if (!this._scrollContainerRef || !this._currentNodeId) return;
|
|
3435
|
-
const t =
|
|
3423
|
+
const t = In(this._currentNodeId);
|
|
3436
3424
|
if (!t) {
|
|
3437
3425
|
z("restoreScroll:noAnchor", { nodeId: this._currentNodeId });
|
|
3438
3426
|
return;
|
|
3439
3427
|
}
|
|
3440
|
-
const n = this.layout.get(), s =
|
|
3428
|
+
const n = this.layout.get(), s = Ke(n, t), o = this._scrollContainerRef.scrollTop;
|
|
3441
3429
|
z("restoreScroll", {
|
|
3442
3430
|
nodeId: this._currentNodeId,
|
|
3443
3431
|
anchor: t,
|
|
@@ -3455,82 +3443,82 @@ class Fn extends B({
|
|
|
3455
3443
|
}
|
|
3456
3444
|
}
|
|
3457
3445
|
const Dn = A(
|
|
3458
|
-
|
|
3446
|
+
En,
|
|
3459
3447
|
{},
|
|
3460
3448
|
(r, e) => {
|
|
3461
3449
|
const t = e.explorerModel.selectedFixtures.read(r), n = e.explorerModel.selectedNodeId.read(r), s = e.layout.read(r), { start: o, end: i } = e.visibleRowRange.read(r);
|
|
3462
3450
|
if (e.updateForSelection(n), t.length === 0) {
|
|
3463
|
-
const
|
|
3464
|
-
if (
|
|
3465
|
-
const
|
|
3466
|
-
if (
|
|
3467
|
-
return /* @__PURE__ */ a("div", { style:
|
|
3468
|
-
if (
|
|
3469
|
-
return /* @__PURE__ */ a("div", { style:
|
|
3451
|
+
const c = e.explorerModel.reportModel;
|
|
3452
|
+
if (c) {
|
|
3453
|
+
const u = c.state.read(r);
|
|
3454
|
+
if (u.status === "loading")
|
|
3455
|
+
return /* @__PURE__ */ a("div", { style: E.emptyState, children: /* @__PURE__ */ a("span", { style: E.emptyText, children: "Loading report..." }) });
|
|
3456
|
+
if (u.status === "error")
|
|
3457
|
+
return /* @__PURE__ */ a("div", { style: E.emptyState, children: /* @__PURE__ */ g("span", { style: { ...E.emptyText, color: "var(--vscode-errorForeground)" }, children: [
|
|
3470
3458
|
"Failed to load report: ",
|
|
3471
|
-
|
|
3459
|
+
u.message
|
|
3472
3460
|
] }) });
|
|
3473
3461
|
}
|
|
3474
|
-
return /* @__PURE__ */ a("div", { style:
|
|
3462
|
+
return /* @__PURE__ */ a("div", { style: E.emptyState, children: /* @__PURE__ */ a("span", { style: E.emptyText, children: "Select a component or folder to preview" }) });
|
|
3475
3463
|
}
|
|
3476
|
-
const d =
|
|
3477
|
-
return /* @__PURE__ */ a("div", { ref: e.setScrollContainerRef, style:
|
|
3478
|
-
const
|
|
3479
|
-
return /* @__PURE__ */
|
|
3464
|
+
const d = fe(s);
|
|
3465
|
+
return /* @__PURE__ */ a("div", { ref: e.setScrollContainerRef, style: E.scrollContainer, children: /* @__PURE__ */ a("div", { style: { position: "relative", height: d }, children: t.slice(o, i).map((c, u) => {
|
|
3466
|
+
const h = o + u, { top: p } = s[h], m = It(c), b = Qe(Je(c)), S = h > 0 ? Qe(Je(t[h - 1])) : void 0, C = Vn(b, S, m);
|
|
3467
|
+
return /* @__PURE__ */ g(
|
|
3480
3468
|
"div",
|
|
3481
3469
|
{
|
|
3482
|
-
ref: (
|
|
3483
|
-
style: { position: "absolute", top:
|
|
3470
|
+
ref: (_) => e.observeRowElement(_, m),
|
|
3471
|
+
style: { position: "absolute", top: p, left: ne, right: ne },
|
|
3484
3472
|
children: [
|
|
3485
|
-
|
|
3486
|
-
const
|
|
3487
|
-
return /* @__PURE__ */ a(
|
|
3473
|
+
C.map((_) => {
|
|
3474
|
+
const M = Mn(_.depth);
|
|
3475
|
+
return /* @__PURE__ */ a(M, { style: Fn(_.depth), children: /* @__PURE__ */ a(
|
|
3488
3476
|
"a",
|
|
3489
3477
|
{
|
|
3490
|
-
href: vt("component",
|
|
3491
|
-
style:
|
|
3492
|
-
onClick: (
|
|
3493
|
-
|
|
3478
|
+
href: vt("component", _.nodeId),
|
|
3479
|
+
style: E.headingLink,
|
|
3480
|
+
onClick: (F) => {
|
|
3481
|
+
F.preventDefault(), e.explorerModel.selectNode(_.nodeId);
|
|
3494
3482
|
},
|
|
3495
|
-
children:
|
|
3483
|
+
children: _.name
|
|
3496
3484
|
}
|
|
3497
|
-
) },
|
|
3485
|
+
) }, _.depth);
|
|
3498
3486
|
}),
|
|
3499
|
-
|
|
3500
|
-
|
|
3487
|
+
c.type === "single" ? /* @__PURE__ */ a(yt, { fixture: c.fixture, compact: !1 }) : c.type === "variants" ? /* @__PURE__ */ a(Bn, { row: c, onSelect: e.explorerModel.selectNode }) : c.type === "screenshot-comparison" && e.explorerModel.daemon ? /* @__PURE__ */ a(
|
|
3488
|
+
gn,
|
|
3501
3489
|
{
|
|
3502
|
-
name:
|
|
3503
|
-
path:
|
|
3504
|
-
items:
|
|
3490
|
+
name: c.name,
|
|
3491
|
+
path: c.path,
|
|
3492
|
+
items: c.items,
|
|
3505
3493
|
daemon: e.explorerModel.daemon,
|
|
3506
3494
|
baselineSession: e.baselineSessionName,
|
|
3507
3495
|
currentSession: e.currentSessionName
|
|
3508
3496
|
}
|
|
3509
|
-
) :
|
|
3510
|
-
|
|
3497
|
+
) : c.type === "report-comparison" && e.explorerModel.reportModel ? /* @__PURE__ */ a(
|
|
3498
|
+
xn,
|
|
3511
3499
|
{
|
|
3512
|
-
name:
|
|
3513
|
-
path:
|
|
3514
|
-
items:
|
|
3500
|
+
name: c.name,
|
|
3501
|
+
path: c.path,
|
|
3502
|
+
items: c.items,
|
|
3515
3503
|
reportModel: e.explorerModel.reportModel
|
|
3516
3504
|
}
|
|
3517
3505
|
) : null
|
|
3518
3506
|
]
|
|
3519
3507
|
},
|
|
3520
|
-
|
|
3508
|
+
m
|
|
3521
3509
|
);
|
|
3522
3510
|
}) }) });
|
|
3523
3511
|
}
|
|
3524
|
-
),
|
|
3512
|
+
), Bn = k(
|
|
3525
3513
|
{
|
|
3526
3514
|
row: f.const(),
|
|
3527
3515
|
onSelect: f.const()
|
|
3528
3516
|
},
|
|
3529
3517
|
(r, e) => {
|
|
3530
3518
|
const t = e.row;
|
|
3531
|
-
return /* @__PURE__ */ a("div", { style:
|
|
3519
|
+
return /* @__PURE__ */ a("div", { style: E.variantsContent, children: t.fixtures.map((n) => /* @__PURE__ */ a(yt, { fixture: n, compact: !0, onSelect: e.onSelect }, n.id)) });
|
|
3532
3520
|
}
|
|
3533
|
-
),
|
|
3521
|
+
), E = {
|
|
3534
3522
|
scrollContainer: {
|
|
3535
3523
|
flex: 1,
|
|
3536
3524
|
overflow: "auto",
|
|
@@ -3557,41 +3545,41 @@ const Dn = A(
|
|
|
3557
3545
|
textDecoration: "none",
|
|
3558
3546
|
color: "inherit"
|
|
3559
3547
|
}
|
|
3560
|
-
},
|
|
3561
|
-
|
|
3548
|
+
}, An = A(
|
|
3549
|
+
Fr,
|
|
3562
3550
|
{ daemonModel: f.const(), reportModel: f.const() },
|
|
3563
3551
|
(r, e) => {
|
|
3564
3552
|
const t = e.leftSidebarVisible.read(r), n = e.rightSidebarVisible.read(r), s = e.isDarkTheme.read(r), o = e.selectedNode.read(r);
|
|
3565
|
-
return /* @__PURE__ */
|
|
3566
|
-
t && /* @__PURE__ */ a(
|
|
3567
|
-
/* @__PURE__ */
|
|
3568
|
-
/* @__PURE__ */ a(
|
|
3553
|
+
return /* @__PURE__ */ g("div", { className: s ? "vscode-theme default-dark-plus" : "vscode-theme default-light-plus", style: v.container, children: [
|
|
3554
|
+
t && /* @__PURE__ */ a(en, { model: e }),
|
|
3555
|
+
/* @__PURE__ */ g("div", { style: v.centerArea, children: [
|
|
3556
|
+
/* @__PURE__ */ a(Pr, { model: e }),
|
|
3569
3557
|
/* @__PURE__ */ a(Dn, { model: e })
|
|
3570
3558
|
] }),
|
|
3571
|
-
n && /* @__PURE__ */ a(
|
|
3559
|
+
n && /* @__PURE__ */ a(sn, { selectedNode: o })
|
|
3572
3560
|
] });
|
|
3573
3561
|
}
|
|
3574
3562
|
);
|
|
3575
|
-
var
|
|
3563
|
+
var $n = class ge {
|
|
3576
3564
|
constructor(e) {
|
|
3577
3565
|
this.iterator = e;
|
|
3578
3566
|
}
|
|
3579
3567
|
static fromIterable(e) {
|
|
3580
|
-
return new
|
|
3568
|
+
return new ge(e[Symbol.asyncIterator]());
|
|
3581
3569
|
}
|
|
3582
3570
|
static fromFn(e) {
|
|
3583
|
-
return new
|
|
3571
|
+
return new ge(e());
|
|
3584
3572
|
}
|
|
3585
3573
|
[Symbol.asyncIterator]() {
|
|
3586
3574
|
return this.iterator;
|
|
3587
3575
|
}
|
|
3588
|
-
},
|
|
3576
|
+
}, zn = class extends Error {
|
|
3589
3577
|
constructor(r, e, t) {
|
|
3590
3578
|
super(t), this.statusCode = r, this.method = e, this.name = "ApiError";
|
|
3591
3579
|
}
|
|
3592
|
-
},
|
|
3580
|
+
}, Ln = class {
|
|
3593
3581
|
constructor(r) {
|
|
3594
|
-
|
|
3582
|
+
l(this, "methods", this._createProxy(""));
|
|
3595
3583
|
this._request = r;
|
|
3596
3584
|
}
|
|
3597
3585
|
_createProxy(r) {
|
|
@@ -3605,8 +3593,8 @@ var An = class me {
|
|
|
3605
3593
|
});
|
|
3606
3594
|
}
|
|
3607
3595
|
};
|
|
3608
|
-
function
|
|
3609
|
-
return new
|
|
3596
|
+
function Hn(r, e) {
|
|
3597
|
+
return new Ln(async (t, n) => {
|
|
3610
3598
|
var d;
|
|
3611
3599
|
const s = await fetch(`${r}/${t}`, {
|
|
3612
3600
|
method: "POST",
|
|
@@ -3617,48 +3605,48 @@ function Ln(r, e) {
|
|
|
3617
3605
|
body: JSON.stringify(n)
|
|
3618
3606
|
});
|
|
3619
3607
|
if (s.status !== 200) {
|
|
3620
|
-
const
|
|
3621
|
-
let
|
|
3622
|
-
throw
|
|
3608
|
+
const c = await s.json().catch(() => null);
|
|
3609
|
+
let u;
|
|
3610
|
+
throw c && typeof c == "object" && "errorMessage" in c ? u = `${c.errorMessage}` : u = `Error calling API method ${t}: ${JSON.stringify(c)} (Status: ${s.status}, Status Text: ${s.statusText})`, new zn(s.status, t, u);
|
|
3623
3611
|
}
|
|
3624
3612
|
const o = s.headers.get("Content-Type");
|
|
3625
|
-
return o != null && o.startsWith("application/jsonl") ?
|
|
3626
|
-
var
|
|
3627
|
-
const
|
|
3628
|
-
if (!
|
|
3613
|
+
return o != null && o.startsWith("application/jsonl") ? $n.fromFn(async function* () {
|
|
3614
|
+
var m;
|
|
3615
|
+
const c = (m = s.body) == null ? void 0 : m.getReader();
|
|
3616
|
+
if (!c)
|
|
3629
3617
|
return;
|
|
3630
|
-
let
|
|
3631
|
-
const
|
|
3618
|
+
let u = "";
|
|
3619
|
+
const h = new TextDecoder("utf-8");
|
|
3632
3620
|
for (; ; ) {
|
|
3633
|
-
const { done:
|
|
3634
|
-
if (
|
|
3621
|
+
const { done: b, value: S } = await c.read();
|
|
3622
|
+
if (b)
|
|
3635
3623
|
break;
|
|
3636
|
-
|
|
3637
|
-
let
|
|
3638
|
-
for (; (
|
|
3624
|
+
u += h.decode(S, { stream: !0 });
|
|
3625
|
+
let C;
|
|
3626
|
+
for (; (C = u.indexOf(`
|
|
3639
3627
|
`)) >= 0; ) {
|
|
3640
|
-
const
|
|
3641
|
-
|
|
3628
|
+
const _ = u.slice(0, C).trim();
|
|
3629
|
+
u = u.slice(C + 1), _.length > 0 && (yield JSON.parse(_));
|
|
3642
3630
|
}
|
|
3643
3631
|
}
|
|
3644
|
-
const
|
|
3645
|
-
|
|
3632
|
+
const p = u.trim();
|
|
3633
|
+
p.length > 0 && (yield JSON.parse(p));
|
|
3646
3634
|
}) : await s.json();
|
|
3647
3635
|
});
|
|
3648
3636
|
}
|
|
3649
|
-
class
|
|
3637
|
+
class jn {
|
|
3650
3638
|
constructor(e) {
|
|
3651
|
-
|
|
3652
|
-
|
|
3653
|
-
|
|
3654
|
-
|
|
3655
|
-
|
|
3656
|
-
|
|
3639
|
+
l(this, "_sourceTreeIds", x(this, /* @__PURE__ */ new Map()));
|
|
3640
|
+
l(this, "_sessions", x(this, []));
|
|
3641
|
+
l(this, "_screenshotCache", /* @__PURE__ */ new Map());
|
|
3642
|
+
l(this, "_client");
|
|
3643
|
+
l(this, "_eventStreamAbort", null);
|
|
3644
|
+
l(this, "sessionName");
|
|
3657
3645
|
/** Observable map of sessionName → current sourceTreeId */
|
|
3658
|
-
|
|
3646
|
+
l(this, "sourceTreeIds", this._sourceTreeIds);
|
|
3659
3647
|
/** Observable list of sessions from the daemon */
|
|
3660
|
-
|
|
3661
|
-
this.config = e, this.sessionName = e.sessionName, this._client =
|
|
3648
|
+
l(this, "sessions", this._sessions);
|
|
3649
|
+
this.config = e, this.sessionName = e.sessionName, this._client = Hn("/__explorer/daemon-api");
|
|
3662
3650
|
}
|
|
3663
3651
|
/**
|
|
3664
3652
|
* Initializes the model: fetches initial session info and starts listening to events.
|
|
@@ -3756,13 +3744,13 @@ class Hn {
|
|
|
3756
3744
|
}
|
|
3757
3745
|
}
|
|
3758
3746
|
}
|
|
3759
|
-
function
|
|
3747
|
+
function Un() {
|
|
3760
3748
|
return window.__EXPLORER_DAEMON__;
|
|
3761
3749
|
}
|
|
3762
|
-
class
|
|
3750
|
+
class Pn {
|
|
3763
3751
|
constructor(e) {
|
|
3764
|
-
|
|
3765
|
-
|
|
3752
|
+
l(this, "state", x(this, { status: "loading" }));
|
|
3753
|
+
l(this, "_baseUrl");
|
|
3766
3754
|
this.reportUrl = e;
|
|
3767
3755
|
const t = e.lastIndexOf("/");
|
|
3768
3756
|
this._baseUrl = t >= 0 ? e.slice(0, t + 1) : "", this._fetch();
|
|
@@ -3772,7 +3760,7 @@ class jn {
|
|
|
3772
3760
|
}
|
|
3773
3761
|
buildTree(e) {
|
|
3774
3762
|
const t = this.state.read(e);
|
|
3775
|
-
return t.status !== "ready" ? { id: "", name: "Report", type: "folder", children: [], labels: [] } :
|
|
3763
|
+
return t.status !== "ready" ? { id: "", name: "Report", type: "folder", children: [], labels: [] } : Wn(t.report.fixtures);
|
|
3776
3764
|
}
|
|
3777
3765
|
async _fetch() {
|
|
3778
3766
|
this.state.set({ status: "loading" }, void 0);
|
|
@@ -3787,36 +3775,36 @@ class jn {
|
|
|
3787
3775
|
}
|
|
3788
3776
|
}
|
|
3789
3777
|
}
|
|
3790
|
-
function
|
|
3778
|
+
function Wn(r) {
|
|
3791
3779
|
const e = { id: "", name: "Components", type: "folder", children: [], labels: [] };
|
|
3792
3780
|
for (const [t, n] of Object.entries(r)) {
|
|
3793
3781
|
const s = t.split("/");
|
|
3794
3782
|
let o = e;
|
|
3795
3783
|
for (let i = 0; i < s.length; i++) {
|
|
3796
|
-
const d = s[i],
|
|
3797
|
-
if (
|
|
3784
|
+
const d = s[i], c = i === s.length - 1, u = s.slice(0, i + 1).join("/");
|
|
3785
|
+
if (c)
|
|
3798
3786
|
o.children.push({
|
|
3799
|
-
id:
|
|
3787
|
+
id: u,
|
|
3800
3788
|
name: d,
|
|
3801
3789
|
type: "component",
|
|
3802
3790
|
reportEntry: n,
|
|
3803
3791
|
labels: []
|
|
3804
3792
|
});
|
|
3805
3793
|
else {
|
|
3806
|
-
let
|
|
3807
|
-
|
|
3794
|
+
let h = o.children.find((p) => p.type === "folder" && p.name === d);
|
|
3795
|
+
h || (h = { id: u, name: d, type: "folder", children: [], labels: [] }, o.children.push(h)), o = h;
|
|
3808
3796
|
}
|
|
3809
3797
|
}
|
|
3810
3798
|
}
|
|
3811
3799
|
return e;
|
|
3812
3800
|
}
|
|
3813
|
-
class
|
|
3801
|
+
class ss {
|
|
3814
3802
|
constructor(e, t) {
|
|
3815
|
-
|
|
3816
|
-
|
|
3817
|
-
|
|
3818
|
-
|
|
3819
|
-
this._populateRegistry(t), this._reportModel = this._initializeReportModel(), this._daemonModel = this._reportModel ? void 0 : this._initializeDaemonModel(), this._root =
|
|
3803
|
+
l(this, "_root");
|
|
3804
|
+
l(this, "_registry", new yr());
|
|
3805
|
+
l(this, "_daemonModel");
|
|
3806
|
+
l(this, "_reportModel");
|
|
3807
|
+
this._populateRegistry(t), this._reportModel = this._initializeReportModel(), this._daemonModel = this._reportModel ? void 0 : this._initializeDaemonModel(), this._root = Ft(e), this._root.render(At(An, {
|
|
3820
3808
|
registry: this._registry,
|
|
3821
3809
|
daemonModel: this._daemonModel,
|
|
3822
3810
|
reportModel: this._reportModel
|
|
@@ -3825,13 +3813,13 @@ class ns {
|
|
|
3825
3813
|
_initializeReportModel() {
|
|
3826
3814
|
const t = new URLSearchParams(location.search).get("report");
|
|
3827
3815
|
if (t)
|
|
3828
|
-
return new
|
|
3816
|
+
return new Pn(t);
|
|
3829
3817
|
}
|
|
3830
3818
|
_initializeDaemonModel() {
|
|
3831
|
-
const e =
|
|
3819
|
+
const e = Un();
|
|
3832
3820
|
if (!e)
|
|
3833
3821
|
return;
|
|
3834
|
-
const t = new
|
|
3822
|
+
const t = new jn(e);
|
|
3835
3823
|
return t.initialize().catch((n) => {
|
|
3836
3824
|
console.error("[ExplorerApp] Failed to initialize DaemonModel:", n);
|
|
3837
3825
|
}), t;
|
|
@@ -3864,52 +3852,52 @@ class ns {
|
|
|
3864
3852
|
}
|
|
3865
3853
|
}
|
|
3866
3854
|
export {
|
|
3867
|
-
|
|
3855
|
+
Br as ChevronDownIcon,
|
|
3868
3856
|
Dr as ChevronRightIcon,
|
|
3869
|
-
|
|
3870
|
-
|
|
3871
|
-
|
|
3872
|
-
|
|
3873
|
-
|
|
3874
|
-
|
|
3875
|
-
|
|
3876
|
-
|
|
3877
|
-
|
|
3878
|
-
|
|
3879
|
-
|
|
3880
|
-
|
|
3881
|
-
|
|
3882
|
-
|
|
3883
|
-
|
|
3884
|
-
|
|
3885
|
-
|
|
3886
|
-
|
|
3857
|
+
ns as CliRuntime,
|
|
3858
|
+
Ar as ComponentIcon,
|
|
3859
|
+
jn as DaemonModel,
|
|
3860
|
+
An as Explorer,
|
|
3861
|
+
ss as ExplorerApp,
|
|
3862
|
+
Fr as ExplorerModel,
|
|
3863
|
+
yr as FixtureRegistry,
|
|
3864
|
+
$r as FolderIcon,
|
|
3865
|
+
en as LeftSidebar,
|
|
3866
|
+
jr as MoonIcon,
|
|
3867
|
+
zr as PanelLeftIcon,
|
|
3868
|
+
Lr as PanelRightIcon,
|
|
3869
|
+
Pn as ReportModel,
|
|
3870
|
+
sn as RightSidebar,
|
|
3871
|
+
Hr as SunIcon,
|
|
3872
|
+
Pr as TitleBar,
|
|
3873
|
+
oe as TitleBarButton,
|
|
3874
|
+
Kr as TreeItem,
|
|
3887
3875
|
bt as TreeView,
|
|
3888
|
-
|
|
3889
|
-
|
|
3890
|
-
|
|
3891
|
-
|
|
3892
|
-
|
|
3893
|
-
|
|
3894
|
-
|
|
3876
|
+
$t as VIEWPORT_SIZES,
|
|
3877
|
+
as as asyncRender,
|
|
3878
|
+
Ut as collectComponents,
|
|
3879
|
+
Oe as createComponentDefinition,
|
|
3880
|
+
ie as createFixtureTree,
|
|
3881
|
+
ds as defineFixture,
|
|
3882
|
+
cs as defineFixtureGroup,
|
|
3895
3883
|
ls as defineFixtureVariants,
|
|
3896
|
-
|
|
3897
|
-
|
|
3898
|
-
|
|
3899
|
-
|
|
3900
|
-
|
|
3901
|
-
|
|
3902
|
-
|
|
3903
|
-
|
|
3904
|
-
|
|
3905
|
-
|
|
3906
|
-
|
|
3907
|
-
|
|
3908
|
-
|
|
3909
|
-
|
|
3910
|
-
|
|
3884
|
+
Ve as findNodeByPath,
|
|
3885
|
+
Re as fixtureGroupBrand,
|
|
3886
|
+
Te as fixtureVariantsBrand,
|
|
3887
|
+
Lt as getDefaultPropertyValues,
|
|
3888
|
+
rs as isComponentDefinition,
|
|
3889
|
+
be as isFixtureGroup,
|
|
3890
|
+
_e as isFixtureVariants,
|
|
3891
|
+
ve as isSingleFixture,
|
|
3892
|
+
Ce as mergeStyles,
|
|
3893
|
+
Xn as parseFixtureExport,
|
|
3894
|
+
es as parseFixtureGroup,
|
|
3895
|
+
ts as parseFixtureVariants,
|
|
3896
|
+
Yn as parseSingleFixture,
|
|
3897
|
+
zt as resolveViewport,
|
|
3898
|
+
ke as singleFixtureBrand,
|
|
3911
3899
|
v as styles,
|
|
3912
|
-
|
|
3900
|
+
hs as syncRender,
|
|
3913
3901
|
gt as toExplorerTree
|
|
3914
3902
|
};
|
|
3915
3903
|
//# sourceMappingURL=viewer.js.map
|