@vscode/component-explorer 0.1.1-11 → 0.1.1-12
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/components/ExplorerModel.d.ts.map +1 -1
- package/dist/components/FixturePreviewItem.d.ts.map +1 -1
- package/dist/components/TitleBar.d.ts.map +1 -1
- package/dist/core/CliRuntime.d.ts +3 -3
- package/dist/core/CliRuntime.d.ts.map +1 -1
- package/dist/core/ErrorInfo.d.ts +1 -1
- package/dist/core/fixtureApi.d.ts +98 -6
- package/dist/core/fixtureApi.d.ts.map +1 -1
- package/dist/core/fixtureApiConsumer.d.ts +3 -3
- package/dist/core/fixtureApiConsumer.d.ts.map +1 -1
- package/dist/core/index.d.ts +3 -3
- package/dist/core/index.d.ts.map +1 -1
- package/dist/index-DnRcKk60.js +61 -0
- package/dist/index-DnRcKk60.js.map +1 -0
- package/dist/index.js +4 -22
- package/dist/index.js.map +1 -1
- package/dist/viewer.js +1056 -1417
- package/dist/viewer.js.map +1 -1
- package/package.json +1 -1
package/dist/viewer.js
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var l = (
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { createRoot as
|
|
7
|
-
import { createContext as
|
|
8
|
-
import { jsx as a, jsxs as f, Fragment as
|
|
9
|
-
import { unstable_batchedUpdates as
|
|
10
|
-
function
|
|
11
|
-
return typeof
|
|
12
|
-
}
|
|
13
|
-
function
|
|
14
|
-
return typeof
|
|
15
|
-
}
|
|
16
|
-
function
|
|
17
|
-
return typeof
|
|
18
|
-
}
|
|
19
|
-
function
|
|
20
|
-
return
|
|
21
|
-
}
|
|
22
|
-
function
|
|
23
|
-
return
|
|
24
|
-
}
|
|
25
|
-
function
|
|
26
|
-
return
|
|
27
|
-
}
|
|
28
|
-
function
|
|
29
|
-
return
|
|
30
|
-
}
|
|
31
|
-
function
|
|
32
|
-
const n =
|
|
1
|
+
var mt = Object.defineProperty;
|
|
2
|
+
var vt = (r, e, t) => e in r ? mt(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
|
|
3
|
+
var l = (r, e, t) => vt(r, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { f as Se, a as we, s as Re } from "./index-DnRcKk60.js";
|
|
5
|
+
import { b as Mn, d as Fn, c as En, e as Bn, g as An } from "./index-DnRcKk60.js";
|
|
6
|
+
import { createRoot as _t } from "react-dom/client";
|
|
7
|
+
import { createContext as Ue, useReducer as bt, useState as yt, useContext as xt, useEffect as Te, createElement as Ct } from "react";
|
|
8
|
+
import { jsx as a, jsxs as f, Fragment as pe } from "react/jsx-runtime";
|
|
9
|
+
import { unstable_batchedUpdates as Pe } from "react-dom";
|
|
10
|
+
function ge(r) {
|
|
11
|
+
return typeof r == "object" && r !== null && Re in r && r[Re] === !0 && "_options" in r && typeof r._options == "object";
|
|
12
|
+
}
|
|
13
|
+
function me(r) {
|
|
14
|
+
return typeof r == "object" && r !== null && Se in r && r[Se] === !0 && "_entries" in r && typeof r._entries == "object";
|
|
15
|
+
}
|
|
16
|
+
function ve(r) {
|
|
17
|
+
return typeof r == "object" && r !== null && we in r && r[we] === !0 && "_variants" in r && typeof r._variants == "object";
|
|
18
|
+
}
|
|
19
|
+
function wn(r) {
|
|
20
|
+
return ge(r) ? { success: !0, data: r } : me(r) ? { success: !0, data: r } : ve(r) ? { success: !0, data: r } : { success: !1, error: "Value is not a valid fixture export (missing brand symbol or _options/_entries/_variants)" };
|
|
21
|
+
}
|
|
22
|
+
function Rn(r) {
|
|
23
|
+
return ge(r) ? { success: !0, data: r } : { success: !1, error: "Value is not a SingleFixtureExport" };
|
|
24
|
+
}
|
|
25
|
+
function Tn(r) {
|
|
26
|
+
return me(r) ? { success: !0, data: r } : { success: !1, error: "Value is not a FixtureGroupExport" };
|
|
27
|
+
}
|
|
28
|
+
function In(r) {
|
|
29
|
+
return ve(r) ? { success: !0, data: r } : { success: !1, error: "Value is not a FixtureVariantsExport" };
|
|
30
|
+
}
|
|
31
|
+
function Ie(r, e, t) {
|
|
32
|
+
const n = r._options;
|
|
33
33
|
return {
|
|
34
34
|
id: e,
|
|
35
35
|
name: t,
|
|
@@ -42,115 +42,115 @@ function Me(s, e, t) {
|
|
|
42
42
|
render: n.render
|
|
43
43
|
};
|
|
44
44
|
}
|
|
45
|
-
function
|
|
46
|
-
return typeof
|
|
45
|
+
function On(r) {
|
|
46
|
+
return typeof r == "object" && r !== null && "render" in r && typeof r.render == "function" && "id" in r && "name" in r;
|
|
47
47
|
}
|
|
48
|
-
const
|
|
48
|
+
const St = {
|
|
49
49
|
mobile: { width: 390, height: 844 },
|
|
50
50
|
tablet: { width: 768, height: 1024 },
|
|
51
51
|
desktop: { width: 1440, height: 900 }
|
|
52
52
|
};
|
|
53
|
-
function
|
|
54
|
-
return typeof
|
|
53
|
+
function wt(r) {
|
|
54
|
+
return typeof r == "string" ? { name: r, ...St[r] } : r;
|
|
55
55
|
}
|
|
56
|
-
function
|
|
56
|
+
function Rt(r) {
|
|
57
57
|
const e = {};
|
|
58
|
-
for (const t of
|
|
58
|
+
for (const t of r)
|
|
59
59
|
e[t.name] = t.defaultValue;
|
|
60
60
|
return e;
|
|
61
61
|
}
|
|
62
|
-
function
|
|
62
|
+
function oe(r) {
|
|
63
63
|
const e = {
|
|
64
64
|
id: "",
|
|
65
65
|
name: "Components",
|
|
66
66
|
type: "folder",
|
|
67
67
|
children: []
|
|
68
68
|
};
|
|
69
|
-
for (const [t, n] of
|
|
70
|
-
const
|
|
71
|
-
|
|
69
|
+
for (const [t, n] of r) {
|
|
70
|
+
const s = Tt(t);
|
|
71
|
+
We(e, [s], n);
|
|
72
72
|
}
|
|
73
73
|
return e;
|
|
74
74
|
}
|
|
75
|
-
function
|
|
76
|
-
return (
|
|
75
|
+
function Tt(r) {
|
|
76
|
+
return (r.split("/").pop() ?? r).replace(/\.fixture\.(tsx?|jsx?)$/, "");
|
|
77
77
|
}
|
|
78
|
-
function
|
|
78
|
+
function We(r, e, t) {
|
|
79
79
|
var n;
|
|
80
|
-
if (
|
|
81
|
-
const
|
|
82
|
-
id:
|
|
83
|
-
name:
|
|
80
|
+
if (ge(t)) {
|
|
81
|
+
const s = e.join("/"), o = e[e.length - 1], i = {
|
|
82
|
+
id: s,
|
|
83
|
+
name: o,
|
|
84
84
|
type: "component",
|
|
85
|
-
component:
|
|
85
|
+
component: Ie(t, s, o)
|
|
86
86
|
};
|
|
87
|
-
|
|
88
|
-
} else if (
|
|
89
|
-
const
|
|
90
|
-
let
|
|
91
|
-
(d) => d.type === "folder" && d.name ===
|
|
87
|
+
r.children || (r.children = []), r.children.push(i);
|
|
88
|
+
} else if (me(t)) {
|
|
89
|
+
const s = e[e.length - 1], o = e.join("/");
|
|
90
|
+
let i = (n = r.children) == null ? void 0 : n.find(
|
|
91
|
+
(d) => d.type === "folder" && d.name === s
|
|
92
92
|
);
|
|
93
|
-
|
|
94
|
-
id:
|
|
95
|
-
name:
|
|
93
|
+
i || (i = {
|
|
94
|
+
id: o,
|
|
95
|
+
name: s,
|
|
96
96
|
type: "folder",
|
|
97
97
|
children: []
|
|
98
|
-
},
|
|
98
|
+
}, r.children || (r.children = []), r.children.push(i));
|
|
99
99
|
for (const [d, c] of Object.entries(t._entries))
|
|
100
|
-
|
|
101
|
-
} else if (
|
|
102
|
-
const
|
|
100
|
+
We(i, [...e, d], c);
|
|
101
|
+
} else if (ve(t)) {
|
|
102
|
+
const s = e[e.length - 1], i = {
|
|
103
103
|
id: e.join("/"),
|
|
104
|
-
name:
|
|
104
|
+
name: s,
|
|
105
105
|
type: "variants",
|
|
106
106
|
children: []
|
|
107
107
|
};
|
|
108
|
-
|
|
108
|
+
r.children || (r.children = []), r.children.push(i);
|
|
109
109
|
for (const [d, c] of Object.entries(t._variants)) {
|
|
110
|
-
const
|
|
111
|
-
id:
|
|
110
|
+
const g = [...e, d].join("/"), _ = {
|
|
111
|
+
id: g,
|
|
112
112
|
name: d,
|
|
113
113
|
type: "component",
|
|
114
|
-
component:
|
|
114
|
+
component: Ie(c, g, d)
|
|
115
115
|
};
|
|
116
|
-
|
|
116
|
+
i.children.push(_);
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
|
-
function
|
|
120
|
+
function Oe(r, e) {
|
|
121
121
|
if (e.length === 0)
|
|
122
|
-
return
|
|
123
|
-
let t =
|
|
122
|
+
return r;
|
|
123
|
+
let t = r;
|
|
124
124
|
for (const n of e) {
|
|
125
125
|
if (!t || !t.children)
|
|
126
126
|
return;
|
|
127
|
-
t = t.children.find((
|
|
127
|
+
t = t.children.find((s) => s.name === n);
|
|
128
128
|
}
|
|
129
129
|
return t;
|
|
130
130
|
}
|
|
131
|
-
function
|
|
132
|
-
if (
|
|
133
|
-
return [
|
|
131
|
+
function It(r) {
|
|
132
|
+
if (r.type === "component" && r.component)
|
|
133
|
+
return [r.component];
|
|
134
134
|
const e = [];
|
|
135
|
-
for (const t of
|
|
136
|
-
e.push(...
|
|
135
|
+
for (const t of r.children ?? [])
|
|
136
|
+
e.push(...It(t));
|
|
137
137
|
return e;
|
|
138
138
|
}
|
|
139
|
-
let
|
|
140
|
-
function
|
|
141
|
-
|
|
139
|
+
let $;
|
|
140
|
+
function Ot(r) {
|
|
141
|
+
$ ? $ instanceof ke ? $.loggers.push(r) : $ = new ke([$, r]) : $ = r;
|
|
142
142
|
}
|
|
143
143
|
function b() {
|
|
144
|
-
return
|
|
144
|
+
return $;
|
|
145
145
|
}
|
|
146
|
-
let
|
|
147
|
-
function
|
|
148
|
-
|
|
146
|
+
let ie;
|
|
147
|
+
function kt(r) {
|
|
148
|
+
ie = r;
|
|
149
149
|
}
|
|
150
|
-
function
|
|
151
|
-
|
|
150
|
+
function Vt(r) {
|
|
151
|
+
ie && ie(r);
|
|
152
152
|
}
|
|
153
|
-
class
|
|
153
|
+
class ke {
|
|
154
154
|
constructor(e) {
|
|
155
155
|
this.loggers = e;
|
|
156
156
|
}
|
|
@@ -175,8 +175,8 @@ class Ee {
|
|
|
175
175
|
t.handleAutorunDisposed(e);
|
|
176
176
|
}
|
|
177
177
|
handleAutorunDependencyChanged(e, t, n) {
|
|
178
|
-
for (const
|
|
179
|
-
|
|
178
|
+
for (const s of this.loggers)
|
|
179
|
+
s.handleAutorunDependencyChanged(e, t, n);
|
|
180
180
|
}
|
|
181
181
|
handleAutorunStarted(e) {
|
|
182
182
|
for (const t of this.loggers)
|
|
@@ -187,8 +187,8 @@ class Ee {
|
|
|
187
187
|
t.handleAutorunFinished(e);
|
|
188
188
|
}
|
|
189
189
|
handleDerivedDependencyChanged(e, t, n) {
|
|
190
|
-
for (const
|
|
191
|
-
|
|
190
|
+
for (const s of this.loggers)
|
|
191
|
+
s.handleDerivedDependencyChanged(e, t, n);
|
|
192
192
|
}
|
|
193
193
|
handleDerivedCleared(e) {
|
|
194
194
|
for (const t of this.loggers)
|
|
@@ -203,143 +203,143 @@ class Ee {
|
|
|
203
203
|
t.handleEndTransaction(e);
|
|
204
204
|
}
|
|
205
205
|
}
|
|
206
|
-
var
|
|
207
|
-
(function(
|
|
206
|
+
var D;
|
|
207
|
+
(function(r) {
|
|
208
208
|
let e = !1;
|
|
209
209
|
function t() {
|
|
210
210
|
e = !0;
|
|
211
211
|
}
|
|
212
|
-
|
|
212
|
+
r.enable = t;
|
|
213
213
|
function n() {
|
|
214
|
-
return
|
|
214
|
+
return s(1);
|
|
215
215
|
}
|
|
216
|
-
|
|
217
|
-
function
|
|
216
|
+
r.ofCaller = n;
|
|
217
|
+
function s(o) {
|
|
218
218
|
if (!e)
|
|
219
219
|
return;
|
|
220
|
-
const
|
|
221
|
-
|
|
220
|
+
const i = Error, d = i.stackTraceLimit;
|
|
221
|
+
i.stackTraceLimit = 3;
|
|
222
222
|
const c = new Error().stack;
|
|
223
|
-
return
|
|
223
|
+
return i.stackTraceLimit = d, _e.fromStack(c, o + 1);
|
|
224
224
|
}
|
|
225
|
-
|
|
226
|
-
})(
|
|
227
|
-
class
|
|
225
|
+
r.ofNthCaller = s;
|
|
226
|
+
})(D || (D = {}));
|
|
227
|
+
class _e {
|
|
228
228
|
static fromStack(e, t) {
|
|
229
229
|
const n = e.split(`
|
|
230
|
-
`),
|
|
231
|
-
if (
|
|
232
|
-
return new
|
|
230
|
+
`), s = Nt(n[t + 1]);
|
|
231
|
+
if (s)
|
|
232
|
+
return new _e(s.fileName, s.line, s.column, s.id);
|
|
233
233
|
}
|
|
234
|
-
constructor(e, t, n,
|
|
235
|
-
this.fileName = e, this.line = t, this.column = n, this.id =
|
|
234
|
+
constructor(e, t, n, s) {
|
|
235
|
+
this.fileName = e, this.line = t, this.column = n, this.id = s;
|
|
236
236
|
}
|
|
237
237
|
}
|
|
238
|
-
function
|
|
239
|
-
if (!
|
|
238
|
+
function Nt(r) {
|
|
239
|
+
if (!r)
|
|
240
240
|
return;
|
|
241
|
-
const e =
|
|
241
|
+
const e = r.match(/\((.*):(\d+):(\d+)\)/);
|
|
242
242
|
if (e)
|
|
243
243
|
return {
|
|
244
244
|
fileName: e[1],
|
|
245
245
|
line: parseInt(e[2]),
|
|
246
246
|
column: parseInt(e[3]),
|
|
247
|
-
id:
|
|
247
|
+
id: r
|
|
248
248
|
};
|
|
249
|
-
const t =
|
|
249
|
+
const t = r.match(/at ([^\(\)]*):(\d+):(\d+)/);
|
|
250
250
|
if (t)
|
|
251
251
|
return {
|
|
252
252
|
fileName: t[1],
|
|
253
253
|
line: parseInt(t[2]),
|
|
254
254
|
column: parseInt(t[3]),
|
|
255
|
-
id:
|
|
255
|
+
id: r
|
|
256
256
|
};
|
|
257
257
|
}
|
|
258
|
-
class
|
|
258
|
+
class M {
|
|
259
259
|
constructor(e, t, n) {
|
|
260
260
|
this.owner = e, this.debugNameSource = t, this.referenceFn = n;
|
|
261
261
|
}
|
|
262
262
|
getDebugName(e) {
|
|
263
|
-
return
|
|
263
|
+
return Dt(e, this);
|
|
264
264
|
}
|
|
265
265
|
}
|
|
266
|
-
const
|
|
267
|
-
function
|
|
268
|
-
const t =
|
|
266
|
+
const Ve = /* @__PURE__ */ new Map(), ae = /* @__PURE__ */ new WeakMap();
|
|
267
|
+
function Dt(r, e) {
|
|
268
|
+
const t = ae.get(r);
|
|
269
269
|
if (t)
|
|
270
270
|
return t;
|
|
271
|
-
const n =
|
|
271
|
+
const n = Mt(r, e);
|
|
272
272
|
if (n) {
|
|
273
|
-
let
|
|
274
|
-
|
|
275
|
-
const
|
|
276
|
-
return
|
|
273
|
+
let s = Ve.get(n) ?? 0;
|
|
274
|
+
s++, Ve.set(n, s);
|
|
275
|
+
const o = s === 1 ? n : `${n}#${s}`;
|
|
276
|
+
return ae.set(r, o), o;
|
|
277
277
|
}
|
|
278
278
|
}
|
|
279
|
-
function
|
|
280
|
-
const t =
|
|
279
|
+
function Mt(r, e) {
|
|
280
|
+
const t = ae.get(r);
|
|
281
281
|
if (t)
|
|
282
282
|
return t;
|
|
283
|
-
const n = e.owner ?
|
|
284
|
-
let
|
|
285
|
-
const
|
|
286
|
-
if (
|
|
287
|
-
if (typeof
|
|
288
|
-
if (
|
|
289
|
-
return n +
|
|
283
|
+
const n = e.owner ? Et(e.owner) + "." : "";
|
|
284
|
+
let s;
|
|
285
|
+
const o = e.debugNameSource;
|
|
286
|
+
if (o !== void 0)
|
|
287
|
+
if (typeof o == "function") {
|
|
288
|
+
if (s = o(), s !== void 0)
|
|
289
|
+
return n + s;
|
|
290
290
|
} else
|
|
291
|
-
return n +
|
|
292
|
-
const
|
|
293
|
-
if (
|
|
294
|
-
return n +
|
|
291
|
+
return n + o;
|
|
292
|
+
const i = e.referenceFn;
|
|
293
|
+
if (i !== void 0 && (s = be(i), s !== void 0))
|
|
294
|
+
return n + s;
|
|
295
295
|
if (e.owner !== void 0) {
|
|
296
|
-
const d =
|
|
296
|
+
const d = Ft(e.owner, r);
|
|
297
297
|
if (d !== void 0)
|
|
298
298
|
return n + d;
|
|
299
299
|
}
|
|
300
300
|
}
|
|
301
|
-
function
|
|
302
|
-
for (const t in
|
|
303
|
-
if (
|
|
301
|
+
function Ft(r, e) {
|
|
302
|
+
for (const t in r)
|
|
303
|
+
if (r[t] === e)
|
|
304
304
|
return t;
|
|
305
305
|
}
|
|
306
|
-
const
|
|
307
|
-
function
|
|
308
|
-
const e =
|
|
306
|
+
const Ne = /* @__PURE__ */ new Map(), De = /* @__PURE__ */ new WeakMap();
|
|
307
|
+
function Et(r) {
|
|
308
|
+
const e = De.get(r);
|
|
309
309
|
if (e)
|
|
310
310
|
return e;
|
|
311
|
-
const t =
|
|
312
|
-
let n =
|
|
313
|
-
n++,
|
|
314
|
-
const
|
|
315
|
-
return
|
|
316
|
-
}
|
|
317
|
-
function
|
|
318
|
-
const e =
|
|
311
|
+
const t = Ge(r) ?? "Object";
|
|
312
|
+
let n = Ne.get(t) ?? 0;
|
|
313
|
+
n++, Ne.set(t, n);
|
|
314
|
+
const s = n === 1 ? t : `${t}#${n}`;
|
|
315
|
+
return De.set(r, s), s;
|
|
316
|
+
}
|
|
317
|
+
function Ge(r) {
|
|
318
|
+
const e = r.constructor;
|
|
319
319
|
if (e)
|
|
320
320
|
return e.name === "Object" ? void 0 : e.name;
|
|
321
321
|
}
|
|
322
|
-
function
|
|
323
|
-
const e =
|
|
324
|
-
return
|
|
322
|
+
function be(r) {
|
|
323
|
+
const e = r.toString(), n = /\/\*\*\s*@description\s*([^*]*)\*\//.exec(e), s = n ? n[1] : void 0;
|
|
324
|
+
return s == null ? void 0 : s.trim();
|
|
325
325
|
}
|
|
326
|
-
let
|
|
327
|
-
function
|
|
328
|
-
|
|
326
|
+
let de;
|
|
327
|
+
function Bt(r) {
|
|
328
|
+
de = r;
|
|
329
329
|
}
|
|
330
|
-
let
|
|
331
|
-
function
|
|
332
|
-
|
|
330
|
+
let qe;
|
|
331
|
+
function At(r) {
|
|
332
|
+
qe = r;
|
|
333
333
|
}
|
|
334
|
-
let
|
|
335
|
-
function
|
|
336
|
-
|
|
334
|
+
let Ke;
|
|
335
|
+
function zt(r) {
|
|
336
|
+
Ke = r;
|
|
337
337
|
}
|
|
338
|
-
let
|
|
339
|
-
function
|
|
340
|
-
|
|
338
|
+
let Je;
|
|
339
|
+
function $t(r) {
|
|
340
|
+
Je = r;
|
|
341
341
|
}
|
|
342
|
-
class
|
|
342
|
+
class Lt {
|
|
343
343
|
get TChange() {
|
|
344
344
|
return null;
|
|
345
345
|
}
|
|
@@ -350,35 +350,35 @@ class Wt {
|
|
|
350
350
|
read(e) {
|
|
351
351
|
return e ? e.readObservable(this) : this.get();
|
|
352
352
|
}
|
|
353
|
-
map(e, t, n =
|
|
354
|
-
const
|
|
355
|
-
return
|
|
356
|
-
owner:
|
|
353
|
+
map(e, t, n = D.ofCaller()) {
|
|
354
|
+
const s = t === void 0 ? void 0 : e, o = t === void 0 ? e : t;
|
|
355
|
+
return de({
|
|
356
|
+
owner: s,
|
|
357
357
|
debugName: () => {
|
|
358
|
-
const
|
|
359
|
-
if (
|
|
360
|
-
return
|
|
361
|
-
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(
|
|
358
|
+
const i = be(o);
|
|
359
|
+
if (i !== void 0)
|
|
360
|
+
return i;
|
|
361
|
+
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());
|
|
362
362
|
if (c)
|
|
363
363
|
return `${this.debugName}.${c[2]}`;
|
|
364
|
-
if (!
|
|
364
|
+
if (!s)
|
|
365
365
|
return `${this.debugName} (mapped)`;
|
|
366
366
|
},
|
|
367
|
-
debugReferenceFn:
|
|
368
|
-
}, (
|
|
367
|
+
debugReferenceFn: o
|
|
368
|
+
}, (i) => o(this.read(i), i), n);
|
|
369
369
|
}
|
|
370
370
|
/**
|
|
371
371
|
* @sealed
|
|
372
372
|
* Converts an observable of an observable value into a direct observable of the value.
|
|
373
373
|
*/
|
|
374
374
|
flatten() {
|
|
375
|
-
return
|
|
375
|
+
return de({
|
|
376
376
|
owner: void 0,
|
|
377
377
|
debugName: () => `${this.debugName} (flattened)`
|
|
378
378
|
}, (e) => this.read(e).read(e));
|
|
379
379
|
}
|
|
380
380
|
recomputeInitiallyAndOnChange(e, t) {
|
|
381
|
-
return e.add(
|
|
381
|
+
return e.add(qe(this, t)), this;
|
|
382
382
|
}
|
|
383
383
|
/**
|
|
384
384
|
* Ensures that this observable is observed. This keeps the cache alive.
|
|
@@ -386,16 +386,16 @@ class Wt {
|
|
|
386
386
|
* Use `recomputeInitiallyAndOnChange` for eager evaluation.
|
|
387
387
|
*/
|
|
388
388
|
keepObserved(e) {
|
|
389
|
-
return e.add(
|
|
389
|
+
return e.add(Ke(this)), this;
|
|
390
390
|
}
|
|
391
391
|
get debugValue() {
|
|
392
392
|
return this.get();
|
|
393
393
|
}
|
|
394
394
|
debugGetDependencyGraph() {
|
|
395
|
-
return
|
|
395
|
+
return Je(this);
|
|
396
396
|
}
|
|
397
397
|
}
|
|
398
|
-
class
|
|
398
|
+
class ye extends Lt {
|
|
399
399
|
constructor(e) {
|
|
400
400
|
var t;
|
|
401
401
|
super(), this._observers = /* @__PURE__ */ new Set(), (t = b()) == null || t.handleObservableCreated(this, e);
|
|
@@ -417,32 +417,29 @@ class Oe extends Wt {
|
|
|
417
417
|
log() {
|
|
418
418
|
var t;
|
|
419
419
|
const e = !!b();
|
|
420
|
-
return
|
|
420
|
+
return Vt(this), e || (t = b()) == null || t.handleObservableCreated(this, D.ofCaller()), this;
|
|
421
421
|
}
|
|
422
422
|
debugGetObservers() {
|
|
423
423
|
return this._observers;
|
|
424
424
|
}
|
|
425
425
|
}
|
|
426
|
-
function
|
|
426
|
+
function Ze(r) {
|
|
427
427
|
return {
|
|
428
|
-
dispose:
|
|
428
|
+
dispose: r
|
|
429
429
|
};
|
|
430
430
|
}
|
|
431
|
-
class
|
|
431
|
+
class H extends Error {
|
|
432
432
|
constructor(e) {
|
|
433
|
-
super(e || "An unexpected bug occurred."), Object.setPrototypeOf(this,
|
|
433
|
+
super(e || "An unexpected bug occurred."), Object.setPrototypeOf(this, H.prototype);
|
|
434
434
|
}
|
|
435
435
|
}
|
|
436
|
-
function
|
|
437
|
-
throw
|
|
438
|
-
}
|
|
439
|
-
function pe(s) {
|
|
440
|
-
console.error("Unexpected error:", s);
|
|
436
|
+
function te(r) {
|
|
437
|
+
throw r;
|
|
441
438
|
}
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
return s != null;
|
|
439
|
+
function Ht(r) {
|
|
440
|
+
console.error("Unexpected error:", r);
|
|
445
441
|
}
|
|
442
|
+
const X = (r, e) => r === e;
|
|
446
443
|
class Y {
|
|
447
444
|
constructor() {
|
|
448
445
|
this.disposables = [], this._isDisposed = !1;
|
|
@@ -471,8 +468,8 @@ class Y {
|
|
|
471
468
|
this.disposables = [];
|
|
472
469
|
}
|
|
473
470
|
}
|
|
474
|
-
function
|
|
475
|
-
switch (
|
|
471
|
+
function jt(r) {
|
|
472
|
+
switch (r) {
|
|
476
473
|
case 0:
|
|
477
474
|
return "initial";
|
|
478
475
|
case 1:
|
|
@@ -485,13 +482,13 @@ function qt(s) {
|
|
|
485
482
|
return "<unknown>";
|
|
486
483
|
}
|
|
487
484
|
}
|
|
488
|
-
class
|
|
485
|
+
class j extends ye {
|
|
489
486
|
get debugName() {
|
|
490
487
|
return this._debugNameData.getDebugName(this) ?? "(anonymous)";
|
|
491
488
|
}
|
|
492
|
-
constructor(e, t, n,
|
|
489
|
+
constructor(e, t, n, s = void 0, o, i) {
|
|
493
490
|
var d;
|
|
494
|
-
super(
|
|
491
|
+
super(i), this._debugNameData = e, this._computeFn = t, this._changeTracker = n, this._handleLastObserverRemoved = s, this._equalityComparator = o, this._state = 0, this._value = void 0, this._updateCount = 0, this._dependencies = /* @__PURE__ */ new Set(), this._dependenciesToBeRemoved = /* @__PURE__ */ new Set(), this._changeSummary = void 0, this._isUpdating = !1, this._isComputing = !1, this._didReportChange = !1, this._isInBeforeUpdate = !1, this._isReaderValid = !1, this._store = void 0, this._delayedStore = void 0, this._removedObserverToCallEndUpdateOn = null, this._changeSummary = (d = this._changeTracker) == null ? void 0 : d.createChangeSummary(void 0);
|
|
495
492
|
}
|
|
496
493
|
onLastObserverRemoved() {
|
|
497
494
|
var e, t;
|
|
@@ -503,20 +500,20 @@ class w extends Oe {
|
|
|
503
500
|
get() {
|
|
504
501
|
var t, n;
|
|
505
502
|
if (this._isComputing, this._observers.size === 0) {
|
|
506
|
-
let
|
|
503
|
+
let s;
|
|
507
504
|
try {
|
|
508
505
|
this._isReaderValid = !0;
|
|
509
|
-
let
|
|
510
|
-
this._changeTracker && (
|
|
506
|
+
let o;
|
|
507
|
+
this._changeTracker && (o = this._changeTracker.createChangeSummary(void 0), (n = (t = this._changeTracker).beforeUpdate) == null || n.call(t, this, o)), s = this._computeFn(this, o);
|
|
511
508
|
} finally {
|
|
512
509
|
this._isReaderValid = !1;
|
|
513
510
|
}
|
|
514
|
-
return this.onLastObserverRemoved(),
|
|
511
|
+
return this.onLastObserverRemoved(), s;
|
|
515
512
|
} else {
|
|
516
513
|
do {
|
|
517
514
|
if (this._state === 1) {
|
|
518
|
-
for (const
|
|
519
|
-
if (
|
|
515
|
+
for (const s of this._dependencies)
|
|
516
|
+
if (s.reportChanges(), this._state === 2)
|
|
520
517
|
break;
|
|
521
518
|
}
|
|
522
519
|
this._state === 1 && (this._state = 3), this._state !== 3 && this._recompute();
|
|
@@ -525,27 +522,27 @@ class w extends Oe {
|
|
|
525
522
|
}
|
|
526
523
|
}
|
|
527
524
|
_recompute() {
|
|
528
|
-
var n,
|
|
525
|
+
var n, s, o, i;
|
|
529
526
|
let e = !1;
|
|
530
527
|
this._isComputing = !0, this._didReportChange = !1;
|
|
531
528
|
const t = this._dependenciesToBeRemoved;
|
|
532
529
|
this._dependenciesToBeRemoved = this._dependencies, this._dependencies = t;
|
|
533
530
|
try {
|
|
534
531
|
const d = this._changeSummary;
|
|
535
|
-
this._isReaderValid = !0, this._changeTracker && (this._isInBeforeUpdate = !0, (
|
|
532
|
+
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));
|
|
536
533
|
const c = this._state !== 0, h = this._value;
|
|
537
534
|
this._state = 3;
|
|
538
|
-
const
|
|
539
|
-
|
|
535
|
+
const g = this._delayedStore;
|
|
536
|
+
g !== void 0 && (this._delayedStore = void 0);
|
|
540
537
|
try {
|
|
541
538
|
this._store !== void 0 && (this._store.dispose(), this._store = void 0), this._value = this._computeFn(this, d);
|
|
542
539
|
} finally {
|
|
543
540
|
this._isReaderValid = !1;
|
|
544
541
|
for (const _ of this._dependenciesToBeRemoved)
|
|
545
542
|
_.removeObserver(this);
|
|
546
|
-
this._dependenciesToBeRemoved.clear(),
|
|
543
|
+
this._dependenciesToBeRemoved.clear(), g !== void 0 && g.dispose();
|
|
547
544
|
}
|
|
548
|
-
e = this._didReportChange || c && !this._equalityComparator(h, this._value), (
|
|
545
|
+
e = this._didReportChange || c && !this._equalityComparator(h, this._value), (i = b()) == null || i.handleObservableUpdated(this, {
|
|
549
546
|
oldValue: h,
|
|
550
547
|
newValue: this._value,
|
|
551
548
|
change: void 0,
|
|
@@ -553,7 +550,7 @@ class w extends Oe {
|
|
|
553
550
|
hadValue: c
|
|
554
551
|
});
|
|
555
552
|
} catch (d) {
|
|
556
|
-
|
|
553
|
+
te(d);
|
|
557
554
|
}
|
|
558
555
|
if (this._isComputing = !1, !this._didReportChange && e)
|
|
559
556
|
for (const d of this._observers)
|
|
@@ -567,7 +564,7 @@ class w extends Oe {
|
|
|
567
564
|
// IObserver Implementation
|
|
568
565
|
beginUpdate(e) {
|
|
569
566
|
if (this._isUpdating)
|
|
570
|
-
throw new
|
|
567
|
+
throw new H("Cyclic deriveds are not supported yet!");
|
|
571
568
|
this._updateCount++, this._isUpdating = !0;
|
|
572
569
|
try {
|
|
573
570
|
const t = this._updateCount === 1;
|
|
@@ -589,8 +586,8 @@ class w extends Oe {
|
|
|
589
586
|
if (this._removedObserverToCallEndUpdateOn) {
|
|
590
587
|
const n = [...this._removedObserverToCallEndUpdateOn];
|
|
591
588
|
this._removedObserverToCallEndUpdateOn = null;
|
|
592
|
-
for (const
|
|
593
|
-
|
|
589
|
+
for (const s of n)
|
|
590
|
+
s.endUpdate(this);
|
|
594
591
|
}
|
|
595
592
|
}
|
|
596
593
|
}
|
|
@@ -605,26 +602,26 @@ class w extends Oe {
|
|
|
605
602
|
var n;
|
|
606
603
|
if (this._dependencies.has(e) && !this._dependenciesToBeRemoved.has(e) || this._isInBeforeUpdate) {
|
|
607
604
|
(n = b()) == null || n.handleDerivedDependencyChanged(this, e, t);
|
|
608
|
-
let
|
|
605
|
+
let s = !1;
|
|
609
606
|
try {
|
|
610
|
-
|
|
607
|
+
s = this._changeTracker ? this._changeTracker.handleChange({
|
|
611
608
|
changedObservable: e,
|
|
612
609
|
change: t,
|
|
613
|
-
didChange: (
|
|
610
|
+
didChange: (i) => i === e
|
|
614
611
|
}, this._changeSummary) : !0;
|
|
615
|
-
} catch (
|
|
616
|
-
|
|
612
|
+
} catch (i) {
|
|
613
|
+
te(i);
|
|
617
614
|
}
|
|
618
|
-
const
|
|
619
|
-
if (
|
|
620
|
-
for (const
|
|
621
|
-
|
|
615
|
+
const o = this._state === 3;
|
|
616
|
+
if (s && (this._state === 1 || o) && (this._state = 2, o))
|
|
617
|
+
for (const i of this._observers)
|
|
618
|
+
i.handlePossibleChange(this);
|
|
622
619
|
}
|
|
623
620
|
}
|
|
624
621
|
// IReader Implementation
|
|
625
622
|
_ensureReaderValid() {
|
|
626
623
|
if (!this._isReaderValid)
|
|
627
|
-
throw new
|
|
624
|
+
throw new H("The reader object cannot be used outside its compute function!");
|
|
628
625
|
}
|
|
629
626
|
readObservable(e) {
|
|
630
627
|
this._ensureReaderValid(), e.addObserver(this);
|
|
@@ -652,7 +649,7 @@ class w extends Oe {
|
|
|
652
649
|
debugGetState() {
|
|
653
650
|
return {
|
|
654
651
|
state: this._state,
|
|
655
|
-
stateStr:
|
|
652
|
+
stateStr: jt(this._state),
|
|
656
653
|
updateCount: this._updateCount,
|
|
657
654
|
isComputing: this._isComputing,
|
|
658
655
|
dependencies: this._dependencies,
|
|
@@ -667,33 +664,33 @@ class w extends Oe {
|
|
|
667
664
|
}
|
|
668
665
|
setValue(e, t, n) {
|
|
669
666
|
this._value = e;
|
|
670
|
-
const
|
|
667
|
+
const s = this._observers;
|
|
671
668
|
t.updateObserver(this, this);
|
|
672
|
-
for (const
|
|
673
|
-
|
|
669
|
+
for (const o of s)
|
|
670
|
+
o.handleChange(this, n);
|
|
674
671
|
}
|
|
675
672
|
}
|
|
676
|
-
function
|
|
677
|
-
return e !== void 0 ? new
|
|
673
|
+
function N(r, e, t = D.ofCaller()) {
|
|
674
|
+
return e !== void 0 ? new j(new M(r, void 0, e), e, void 0, void 0, X, t) : new j(new M(void 0, void 0, r), r, void 0, void 0, X, t);
|
|
678
675
|
}
|
|
679
|
-
function
|
|
680
|
-
return new
|
|
676
|
+
function Ut(r, e, t = D.ofCaller()) {
|
|
677
|
+
return new j(new M(r.owner, r.debugName, r.debugReferenceFn), e, void 0, r.onLastObserverRemoved, r.equalsFn ?? X, t);
|
|
681
678
|
}
|
|
682
|
-
Ut
|
|
683
|
-
function
|
|
684
|
-
let n,
|
|
685
|
-
n =
|
|
686
|
-
let
|
|
687
|
-
return new
|
|
688
|
-
|
|
689
|
-
const d = n(
|
|
690
|
-
return d &&
|
|
679
|
+
Bt(Ut);
|
|
680
|
+
function Pt(r, e, t = D.ofCaller()) {
|
|
681
|
+
let n, s;
|
|
682
|
+
n = r, s = void 0;
|
|
683
|
+
let o;
|
|
684
|
+
return new j(new M(s, void 0, n), (i) => {
|
|
685
|
+
o ? o.clear() : o = new Y();
|
|
686
|
+
const d = n(i);
|
|
687
|
+
return d && o.add(d), d;
|
|
691
688
|
}, void 0, () => {
|
|
692
|
-
|
|
693
|
-
},
|
|
689
|
+
o && (o.dispose(), o = void 0);
|
|
690
|
+
}, X, t);
|
|
694
691
|
}
|
|
695
|
-
function
|
|
696
|
-
switch (
|
|
692
|
+
function Wt(r) {
|
|
693
|
+
switch (r) {
|
|
697
694
|
case 1:
|
|
698
695
|
return "dependenciesMightHaveChanged";
|
|
699
696
|
case 2:
|
|
@@ -704,13 +701,13 @@ function Zt(s) {
|
|
|
704
701
|
return "<unknown>";
|
|
705
702
|
}
|
|
706
703
|
}
|
|
707
|
-
class
|
|
704
|
+
class Xe {
|
|
708
705
|
get debugName() {
|
|
709
706
|
return this._debugNameData.getDebugName(this) ?? "(anonymous)";
|
|
710
707
|
}
|
|
711
|
-
constructor(e, t, n,
|
|
712
|
-
var
|
|
713
|
-
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 = (
|
|
708
|
+
constructor(e, t, n, s) {
|
|
709
|
+
var o, i;
|
|
710
|
+
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 = b()) == null || i.handleAutorunCreated(this, s), this._run();
|
|
714
711
|
}
|
|
715
712
|
dispose() {
|
|
716
713
|
var e;
|
|
@@ -722,26 +719,26 @@ class re {
|
|
|
722
719
|
}
|
|
723
720
|
}
|
|
724
721
|
_run() {
|
|
725
|
-
var t, n,
|
|
722
|
+
var t, n, s, o;
|
|
726
723
|
const e = this._dependenciesToBeRemoved;
|
|
727
724
|
this._dependenciesToBeRemoved = this._dependencies, this._dependencies = e, this._state = 3;
|
|
728
725
|
try {
|
|
729
726
|
if (!this._disposed) {
|
|
730
727
|
(t = b()) == null || t.handleAutorunStarted(this);
|
|
731
|
-
const
|
|
728
|
+
const i = this._changeSummary, d = this._delayedStore;
|
|
732
729
|
d !== void 0 && (this._delayedStore = void 0);
|
|
733
730
|
try {
|
|
734
|
-
this._isRunning = !0, this._changeTracker && ((
|
|
731
|
+
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);
|
|
735
732
|
} catch (c) {
|
|
736
|
-
|
|
733
|
+
te(c);
|
|
737
734
|
} finally {
|
|
738
735
|
this._isRunning = !1, d !== void 0 && d.dispose();
|
|
739
736
|
}
|
|
740
737
|
}
|
|
741
738
|
} finally {
|
|
742
|
-
this._disposed || (
|
|
743
|
-
for (const
|
|
744
|
-
|
|
739
|
+
this._disposed || (o = b()) == null || o.handleAutorunFinished(this);
|
|
740
|
+
for (const i of this._dependenciesToBeRemoved)
|
|
741
|
+
i.removeObserver(this);
|
|
745
742
|
this._dependenciesToBeRemoved.clear();
|
|
746
743
|
}
|
|
747
744
|
}
|
|
@@ -779,10 +776,10 @@ class re {
|
|
|
779
776
|
(this._changeTracker ? this._changeTracker.handleChange({
|
|
780
777
|
changedObservable: e,
|
|
781
778
|
change: t,
|
|
782
|
-
didChange: (
|
|
779
|
+
didChange: (o) => o === e
|
|
783
780
|
}, this._changeSummary) : !0) && (this._state = 2);
|
|
784
|
-
} catch (
|
|
785
|
-
|
|
781
|
+
} catch (s) {
|
|
782
|
+
te(s);
|
|
786
783
|
}
|
|
787
784
|
}
|
|
788
785
|
}
|
|
@@ -792,7 +789,7 @@ class re {
|
|
|
792
789
|
// IReader implementation
|
|
793
790
|
_ensureNoRunning() {
|
|
794
791
|
if (!this._isRunning)
|
|
795
|
-
throw new
|
|
792
|
+
throw new H("The reader object cannot be used outside its compute function!");
|
|
796
793
|
}
|
|
797
794
|
readObservable(e) {
|
|
798
795
|
if (this._ensureNoRunning(), this._disposed)
|
|
@@ -803,12 +800,12 @@ class re {
|
|
|
803
800
|
}
|
|
804
801
|
get store() {
|
|
805
802
|
if (this._ensureNoRunning(), this._disposed)
|
|
806
|
-
throw new
|
|
803
|
+
throw new H("Cannot access store after dispose");
|
|
807
804
|
return this._store === void 0 && (this._store = new Y()), this._store;
|
|
808
805
|
}
|
|
809
806
|
get delayedStore() {
|
|
810
807
|
if (this._ensureNoRunning(), this._disposed)
|
|
811
|
-
throw new
|
|
808
|
+
throw new H("Cannot access store after dispose");
|
|
812
809
|
return this._delayedStore === void 0 && (this._delayedStore = new Y()), this._delayedStore;
|
|
813
810
|
}
|
|
814
811
|
debugGetState() {
|
|
@@ -817,42 +814,42 @@ class re {
|
|
|
817
814
|
updateCount: this._updateCount,
|
|
818
815
|
dependencies: this._dependencies,
|
|
819
816
|
state: this._state,
|
|
820
|
-
stateStr:
|
|
817
|
+
stateStr: Wt(this._state)
|
|
821
818
|
};
|
|
822
819
|
}
|
|
823
820
|
debugRerun() {
|
|
824
821
|
this._isRunning ? this._state = 2 : this._run();
|
|
825
822
|
}
|
|
826
823
|
}
|
|
827
|
-
function
|
|
828
|
-
return new
|
|
824
|
+
function Ye(r, e = D.ofCaller()) {
|
|
825
|
+
return new Xe(new M(void 0, void 0, r), r, void 0, e);
|
|
829
826
|
}
|
|
830
|
-
function
|
|
831
|
-
const e = new Error("BugIndicatingErrorRecovery: " +
|
|
832
|
-
|
|
827
|
+
function Me(r) {
|
|
828
|
+
const e = new Error("BugIndicatingErrorRecovery: " + r);
|
|
829
|
+
Ht(e), console.error("recovered from an error that indicates a bug", e);
|
|
833
830
|
}
|
|
834
|
-
function
|
|
835
|
-
const t = new
|
|
831
|
+
function Qe(r, e) {
|
|
832
|
+
const t = new et(r, e);
|
|
836
833
|
try {
|
|
837
|
-
|
|
834
|
+
r(t);
|
|
838
835
|
} finally {
|
|
839
836
|
t.finish();
|
|
840
837
|
}
|
|
841
838
|
}
|
|
842
|
-
function
|
|
843
|
-
|
|
839
|
+
function Gt(r, e, t) {
|
|
840
|
+
r ? e(r) : Qe(e, t);
|
|
844
841
|
}
|
|
845
|
-
class
|
|
842
|
+
class et {
|
|
846
843
|
constructor(e, t) {
|
|
847
844
|
var n;
|
|
848
845
|
this._fn = e, this._getDebugName = t, this._updatingObservers = [], (n = b()) == null || n.handleBeginTransaction(this);
|
|
849
846
|
}
|
|
850
847
|
getDebugName() {
|
|
851
|
-
return this._getDebugName ? this._getDebugName() :
|
|
848
|
+
return this._getDebugName ? this._getDebugName() : be(this._fn);
|
|
852
849
|
}
|
|
853
850
|
updateObserver(e, t) {
|
|
854
851
|
if (!this._updatingObservers) {
|
|
855
|
-
|
|
852
|
+
Me("Transaction already finished!"), Qe((n) => {
|
|
856
853
|
n.updateObserver(e, t);
|
|
857
854
|
});
|
|
858
855
|
return;
|
|
@@ -863,12 +860,12 @@ class ot {
|
|
|
863
860
|
var t;
|
|
864
861
|
const e = this._updatingObservers;
|
|
865
862
|
if (!e) {
|
|
866
|
-
|
|
863
|
+
Me("transaction.finish() has already been called!");
|
|
867
864
|
return;
|
|
868
865
|
}
|
|
869
866
|
for (let n = 0; n < e.length; n++) {
|
|
870
|
-
const { observer:
|
|
871
|
-
|
|
867
|
+
const { observer: s, observable: o } = e[n];
|
|
868
|
+
s.endUpdate(o);
|
|
872
869
|
}
|
|
873
870
|
this._updatingObservers = null, (t = b()) == null || t.handleEndTransaction(this);
|
|
874
871
|
}
|
|
@@ -876,35 +873,35 @@ class ot {
|
|
|
876
873
|
return this._updatingObservers;
|
|
877
874
|
}
|
|
878
875
|
}
|
|
879
|
-
function x(
|
|
876
|
+
function x(r, e, t = D.ofCaller()) {
|
|
880
877
|
let n;
|
|
881
|
-
return typeof
|
|
878
|
+
return typeof r == "string" ? n = new M(void 0, r, void 0) : n = new M(r, void 0, void 0), new tt(n, e, X, t);
|
|
882
879
|
}
|
|
883
|
-
class
|
|
880
|
+
class tt extends ye {
|
|
884
881
|
get debugName() {
|
|
885
882
|
return this._debugNameData.getDebugName(this) ?? "ObservableValue";
|
|
886
883
|
}
|
|
887
|
-
constructor(e, t, n,
|
|
888
|
-
var
|
|
889
|
-
super(
|
|
884
|
+
constructor(e, t, n, s) {
|
|
885
|
+
var o;
|
|
886
|
+
super(s), this._debugNameData = e, this._equalityComparator = n, this._value = t, (o = b()) == null || o.handleObservableUpdated(this, { hadValue: !1, newValue: t, change: void 0, didChange: !0, oldValue: void 0 });
|
|
890
887
|
}
|
|
891
888
|
get() {
|
|
892
889
|
return this._value;
|
|
893
890
|
}
|
|
894
891
|
set(e, t, n) {
|
|
895
|
-
var
|
|
892
|
+
var o;
|
|
896
893
|
if (n === void 0 && this._equalityComparator(this._value, e))
|
|
897
894
|
return;
|
|
898
|
-
let
|
|
899
|
-
t || (t =
|
|
895
|
+
let s;
|
|
896
|
+
t || (t = s = new et(() => {
|
|
900
897
|
}, () => `Setting ${this.debugName}`));
|
|
901
898
|
try {
|
|
902
|
-
const
|
|
903
|
-
this._setValue(e), (
|
|
899
|
+
const i = this._value;
|
|
900
|
+
this._setValue(e), (o = b()) == null || o.handleObservableUpdated(this, { oldValue: i, newValue: e, change: n, didChange: !0, hadValue: !0 });
|
|
904
901
|
for (const d of this._observers)
|
|
905
902
|
t.updateObserver(d, this), d.handleChange(this, n);
|
|
906
903
|
} finally {
|
|
907
|
-
|
|
904
|
+
s && s.finish();
|
|
908
905
|
}
|
|
909
906
|
}
|
|
910
907
|
toString() {
|
|
@@ -922,25 +919,25 @@ class ie extends Oe {
|
|
|
922
919
|
this._value = e;
|
|
923
920
|
}
|
|
924
921
|
}
|
|
925
|
-
function
|
|
926
|
-
let e, t, n,
|
|
927
|
-
return
|
|
922
|
+
function Fe(...r) {
|
|
923
|
+
let e, t, n, s;
|
|
924
|
+
return r.length === 2 ? [t, n] = r : [e, t, n, s] = r, new L(new M(e, void 0, n), t, n, () => L.globalTransaction, X, s ?? D.ofCaller());
|
|
928
925
|
}
|
|
929
|
-
class
|
|
930
|
-
constructor(e, t, n,
|
|
931
|
-
super(
|
|
932
|
-
var
|
|
933
|
-
const c = this._getValue(d), h = this._value,
|
|
926
|
+
class L extends ye {
|
|
927
|
+
constructor(e, t, n, s, o, i) {
|
|
928
|
+
super(i), this._debugNameData = e, this.event = t, this._getValue = n, this._getTransaction = s, this._equalityComparator = o, this._hasValue = !1, this.handleEvent = (d) => {
|
|
929
|
+
var C;
|
|
930
|
+
const c = this._getValue(d), h = this._value, g = !this._hasValue || !this._equalityComparator(h, c);
|
|
934
931
|
let _ = !1;
|
|
935
|
-
|
|
936
|
-
var
|
|
937
|
-
(
|
|
938
|
-
for (const
|
|
939
|
-
|
|
932
|
+
g && (this._value = c, this._hasValue && (_ = !0, Gt(this._getTransaction(), (m) => {
|
|
933
|
+
var v;
|
|
934
|
+
(v = b()) == null || v.handleObservableUpdated(this, { oldValue: h, newValue: c, change: void 0, didChange: g, hadValue: this._hasValue });
|
|
935
|
+
for (const O of this._observers)
|
|
936
|
+
m.updateObserver(O, this), O.handleChange(this, void 0);
|
|
940
937
|
}, () => {
|
|
941
|
-
const
|
|
942
|
-
return "Event fired" + (
|
|
943
|
-
})), this._hasValue = !0), _ || (
|
|
938
|
+
const m = this.getDebugName();
|
|
939
|
+
return "Event fired" + (m ? `: ${m}` : "");
|
|
940
|
+
})), this._hasValue = !0), _ || (C = b()) == null || C.handleObservableUpdated(this, { oldValue: h, newValue: c, change: void 0, didChange: g, hadValue: this._hasValue });
|
|
944
941
|
};
|
|
945
942
|
}
|
|
946
943
|
getDebugName() {
|
|
@@ -966,40 +963,40 @@ class A extends Oe {
|
|
|
966
963
|
return { value: this._value, hasValue: this._hasValue };
|
|
967
964
|
}
|
|
968
965
|
}
|
|
969
|
-
(function(
|
|
970
|
-
|
|
966
|
+
(function(r) {
|
|
967
|
+
r.Observer = L;
|
|
971
968
|
function e(t, n) {
|
|
972
|
-
let
|
|
973
|
-
|
|
969
|
+
let s = !1;
|
|
970
|
+
L.globalTransaction === void 0 && (L.globalTransaction = t, s = !0);
|
|
974
971
|
try {
|
|
975
972
|
n();
|
|
976
973
|
} finally {
|
|
977
|
-
|
|
974
|
+
s && (L.globalTransaction = void 0);
|
|
978
975
|
}
|
|
979
976
|
}
|
|
980
|
-
|
|
981
|
-
})(
|
|
982
|
-
function
|
|
983
|
-
const e = new
|
|
984
|
-
return
|
|
985
|
-
|
|
977
|
+
r.batchEventsGlobally = e;
|
|
978
|
+
})(Fe || (Fe = {}));
|
|
979
|
+
function qt(r) {
|
|
980
|
+
const e = new rt(!1, void 0);
|
|
981
|
+
return r.addObserver(e), Ze(() => {
|
|
982
|
+
r.removeObserver(e);
|
|
986
983
|
});
|
|
987
984
|
}
|
|
988
|
-
|
|
989
|
-
function
|
|
990
|
-
const t = new
|
|
991
|
-
|
|
985
|
+
zt(qt);
|
|
986
|
+
function Kt(r, e) {
|
|
987
|
+
const t = new rt(!0, e);
|
|
988
|
+
r.addObserver(t);
|
|
992
989
|
try {
|
|
993
|
-
t.beginUpdate(
|
|
990
|
+
t.beginUpdate(r);
|
|
994
991
|
} finally {
|
|
995
|
-
t.endUpdate(
|
|
992
|
+
t.endUpdate(r);
|
|
996
993
|
}
|
|
997
|
-
return
|
|
998
|
-
|
|
994
|
+
return Ze(() => {
|
|
995
|
+
r.removeObserver(t);
|
|
999
996
|
});
|
|
1000
997
|
}
|
|
1001
|
-
|
|
1002
|
-
class
|
|
998
|
+
At(Kt);
|
|
999
|
+
class rt {
|
|
1003
1000
|
constructor(e, t) {
|
|
1004
1001
|
this._forceRecompute = e, this._handleValue = t, this._counter = 0;
|
|
1005
1002
|
}
|
|
@@ -1014,11 +1011,11 @@ class at {
|
|
|
1014
1011
|
handleChange(e, t) {
|
|
1015
1012
|
}
|
|
1016
1013
|
}
|
|
1017
|
-
let
|
|
1018
|
-
function
|
|
1019
|
-
|
|
1014
|
+
let ee;
|
|
1015
|
+
function Jt(r) {
|
|
1016
|
+
ee || (ee = new Zt(), Ot(ee)), ee.addFilteredObj(r);
|
|
1020
1017
|
}
|
|
1021
|
-
class
|
|
1018
|
+
class Zt {
|
|
1022
1019
|
constructor() {
|
|
1023
1020
|
this.indentation = 0, this.changedObservablesSets = /* @__PURE__ */ new WeakMap();
|
|
1024
1021
|
}
|
|
@@ -1030,32 +1027,32 @@ class tn {
|
|
|
1030
1027
|
return ((t = this._filteredObjects) == null ? void 0 : t.has(e)) ?? !0;
|
|
1031
1028
|
}
|
|
1032
1029
|
textToConsoleArgs(e) {
|
|
1033
|
-
return
|
|
1034
|
-
|
|
1030
|
+
return Xt([
|
|
1031
|
+
U(tr("| ", this.indentation)),
|
|
1035
1032
|
e
|
|
1036
1033
|
]);
|
|
1037
1034
|
}
|
|
1038
1035
|
formatInfo(e) {
|
|
1039
1036
|
return e.hadValue ? e.didChange ? [
|
|
1040
|
-
|
|
1041
|
-
|
|
1037
|
+
U(" "),
|
|
1038
|
+
R(Z(e.oldValue, 70), {
|
|
1042
1039
|
color: "red",
|
|
1043
1040
|
strikeThrough: !0
|
|
1044
1041
|
}),
|
|
1045
|
-
|
|
1046
|
-
|
|
1042
|
+
U(" "),
|
|
1043
|
+
R(Z(e.newValue, 60), {
|
|
1047
1044
|
color: "green"
|
|
1048
1045
|
})
|
|
1049
|
-
] : [
|
|
1050
|
-
|
|
1051
|
-
|
|
1046
|
+
] : [U(" (unchanged)")] : [
|
|
1047
|
+
U(" "),
|
|
1048
|
+
R(Z(e.newValue, 60), {
|
|
1052
1049
|
color: "green"
|
|
1053
1050
|
}),
|
|
1054
|
-
|
|
1051
|
+
U(" (initial)")
|
|
1055
1052
|
];
|
|
1056
1053
|
}
|
|
1057
1054
|
handleObservableCreated(e) {
|
|
1058
|
-
if (e instanceof
|
|
1055
|
+
if (e instanceof j) {
|
|
1059
1056
|
const t = e;
|
|
1060
1057
|
this.changedObservablesSets.set(t, /* @__PURE__ */ new Set());
|
|
1061
1058
|
}
|
|
@@ -1064,32 +1061,32 @@ class tn {
|
|
|
1064
1061
|
}
|
|
1065
1062
|
handleObservableUpdated(e, t) {
|
|
1066
1063
|
if (this._isIncluded(e)) {
|
|
1067
|
-
if (e instanceof
|
|
1064
|
+
if (e instanceof j) {
|
|
1068
1065
|
this._handleDerivedRecomputed(e, t);
|
|
1069
1066
|
return;
|
|
1070
1067
|
}
|
|
1071
1068
|
console.log(...this.textToConsoleArgs([
|
|
1072
|
-
|
|
1073
|
-
|
|
1069
|
+
P("observable value changed"),
|
|
1070
|
+
R(e.debugName, { color: "BlueViolet" }),
|
|
1074
1071
|
...this.formatInfo(t)
|
|
1075
1072
|
]));
|
|
1076
1073
|
}
|
|
1077
1074
|
}
|
|
1078
1075
|
formatChanges(e) {
|
|
1079
1076
|
if (e.size !== 0)
|
|
1080
|
-
return
|
|
1077
|
+
return R(" (changed deps: " + [...e].map((t) => t.debugName).join(", ") + ")", { color: "gray" });
|
|
1081
1078
|
}
|
|
1082
1079
|
handleDerivedDependencyChanged(e, t, n) {
|
|
1083
|
-
var
|
|
1084
|
-
this._isIncluded(e) && ((
|
|
1080
|
+
var s;
|
|
1081
|
+
this._isIncluded(e) && ((s = this.changedObservablesSets.get(e)) == null || s.add(t));
|
|
1085
1082
|
}
|
|
1086
1083
|
_handleDerivedRecomputed(e, t) {
|
|
1087
1084
|
if (!this._isIncluded(e))
|
|
1088
1085
|
return;
|
|
1089
1086
|
const n = this.changedObservablesSets.get(e);
|
|
1090
1087
|
n && (console.log(...this.textToConsoleArgs([
|
|
1091
|
-
|
|
1092
|
-
|
|
1088
|
+
P("derived recomputed"),
|
|
1089
|
+
R(e.debugName, { color: "BlueViolet" }),
|
|
1093
1090
|
...this.formatInfo(t),
|
|
1094
1091
|
this.formatChanges(n),
|
|
1095
1092
|
{ data: [{ fn: e._debugNameData.referenceFn ?? e._computeFn }] }
|
|
@@ -1097,14 +1094,14 @@ class tn {
|
|
|
1097
1094
|
}
|
|
1098
1095
|
handleDerivedCleared(e) {
|
|
1099
1096
|
this._isIncluded(e) && console.log(...this.textToConsoleArgs([
|
|
1100
|
-
|
|
1101
|
-
|
|
1097
|
+
P("derived cleared"),
|
|
1098
|
+
R(e.debugName, { color: "BlueViolet" })
|
|
1102
1099
|
]));
|
|
1103
1100
|
}
|
|
1104
1101
|
handleFromEventObservableTriggered(e, t) {
|
|
1105
1102
|
this._isIncluded(e) && console.log(...this.textToConsoleArgs([
|
|
1106
|
-
|
|
1107
|
-
|
|
1103
|
+
P("observable from event triggered"),
|
|
1104
|
+
R(e.debugName, { color: "BlueViolet" }),
|
|
1108
1105
|
...this.formatInfo(t),
|
|
1109
1106
|
{ data: [{ fn: e._getValue }] }
|
|
1110
1107
|
]));
|
|
@@ -1120,8 +1117,8 @@ class tn {
|
|
|
1120
1117
|
handleAutorunStarted(e) {
|
|
1121
1118
|
const t = this.changedObservablesSets.get(e);
|
|
1122
1119
|
t && (this._isIncluded(e) && console.log(...this.textToConsoleArgs([
|
|
1123
|
-
|
|
1124
|
-
|
|
1120
|
+
P("autorun"),
|
|
1121
|
+
R(e.debugName, { color: "BlueViolet" }),
|
|
1125
1122
|
this.formatChanges(t),
|
|
1126
1123
|
{ data: [{ fn: e._debugNameData.referenceFn ?? e._runFn }] }
|
|
1127
1124
|
])), t.clear(), this.indentation++);
|
|
@@ -1132,8 +1129,8 @@ class tn {
|
|
|
1132
1129
|
handleBeginTransaction(e) {
|
|
1133
1130
|
let t = e.getDebugName();
|
|
1134
1131
|
t === void 0 && (t = ""), this._isIncluded(e) && console.log(...this.textToConsoleArgs([
|
|
1135
|
-
|
|
1136
|
-
|
|
1132
|
+
P("transaction"),
|
|
1133
|
+
R(t, { color: "BlueViolet" }),
|
|
1137
1134
|
{ data: [{ fn: e._fn }] }
|
|
1138
1135
|
])), this.indentation++;
|
|
1139
1136
|
}
|
|
@@ -1141,543 +1138,162 @@ class tn {
|
|
|
1141
1138
|
this.indentation--;
|
|
1142
1139
|
}
|
|
1143
1140
|
}
|
|
1144
|
-
function
|
|
1141
|
+
function Xt(r) {
|
|
1145
1142
|
const e = new Array(), t = [];
|
|
1146
1143
|
let n = "";
|
|
1147
|
-
function
|
|
1148
|
-
if ("length" in
|
|
1149
|
-
for (const d of
|
|
1150
|
-
d &&
|
|
1151
|
-
else "text" in
|
|
1144
|
+
function s(i) {
|
|
1145
|
+
if ("length" in i)
|
|
1146
|
+
for (const d of i)
|
|
1147
|
+
d && s(d);
|
|
1148
|
+
else "text" in i ? (n += `%c${i.text}`, e.push(i.style), i.data && t.push(...i.data)) : "data" in i && t.push(...i.data);
|
|
1152
1149
|
}
|
|
1153
|
-
r
|
|
1154
|
-
const
|
|
1155
|
-
return
|
|
1150
|
+
s(r);
|
|
1151
|
+
const o = [n, ...e];
|
|
1152
|
+
return o.push(...t), o;
|
|
1156
1153
|
}
|
|
1157
|
-
function
|
|
1158
|
-
return
|
|
1154
|
+
function U(r) {
|
|
1155
|
+
return R(r, { color: "black" });
|
|
1159
1156
|
}
|
|
1160
|
-
function
|
|
1161
|
-
return
|
|
1157
|
+
function P(r) {
|
|
1158
|
+
return R(rr(`${r}: `, 10), { color: "black", bold: !0 });
|
|
1162
1159
|
}
|
|
1163
|
-
function
|
|
1160
|
+
function R(r, e = {
|
|
1164
1161
|
color: "black"
|
|
1165
1162
|
}) {
|
|
1166
|
-
function t(
|
|
1167
|
-
return Object.entries(
|
|
1163
|
+
function t(s) {
|
|
1164
|
+
return Object.entries(s).reduce((o, [i, d]) => `${o}${i}:${d};`, "");
|
|
1168
1165
|
}
|
|
1169
1166
|
const n = {
|
|
1170
1167
|
color: e.color
|
|
1171
1168
|
};
|
|
1172
1169
|
return e.strikeThrough && (n["text-decoration"] = "line-through"), e.bold && (n["font-weight"] = "bold"), {
|
|
1173
|
-
text:
|
|
1170
|
+
text: r,
|
|
1174
1171
|
style: t(n)
|
|
1175
1172
|
};
|
|
1176
1173
|
}
|
|
1177
|
-
function
|
|
1178
|
-
|
|
1174
|
+
function Z(r, e) {
|
|
1175
|
+
try {
|
|
1176
|
+
return Yt(r, e);
|
|
1177
|
+
} catch {
|
|
1178
|
+
return "[[???]]";
|
|
1179
|
+
}
|
|
1180
|
+
}
|
|
1181
|
+
function Yt(r, e) {
|
|
1182
|
+
switch (typeof r) {
|
|
1179
1183
|
case "number":
|
|
1180
|
-
return "" +
|
|
1184
|
+
return "" + r;
|
|
1181
1185
|
case "string":
|
|
1182
|
-
return
|
|
1186
|
+
return r.length + 2 <= e ? `"${r}"` : `"${r.substr(0, e - 7)}"+...`;
|
|
1183
1187
|
case "boolean":
|
|
1184
|
-
return
|
|
1188
|
+
return r ? "true" : "false";
|
|
1185
1189
|
case "undefined":
|
|
1186
1190
|
return "undefined";
|
|
1187
1191
|
case "object":
|
|
1188
|
-
return
|
|
1192
|
+
return r === null ? "null" : Array.isArray(r) ? Qt(r, e) : er(r, e);
|
|
1189
1193
|
case "symbol":
|
|
1190
|
-
return
|
|
1194
|
+
return r.toString();
|
|
1191
1195
|
case "function":
|
|
1192
|
-
return `[[Function${
|
|
1196
|
+
return `[[Function${r.name ? " " + r.name : ""}]]`;
|
|
1193
1197
|
default:
|
|
1194
|
-
return "" +
|
|
1198
|
+
return "" + r;
|
|
1195
1199
|
}
|
|
1196
1200
|
}
|
|
1197
|
-
function
|
|
1201
|
+
function Qt(r, e) {
|
|
1198
1202
|
let t = "[ ", n = !0;
|
|
1199
|
-
for (const
|
|
1203
|
+
for (const s of r) {
|
|
1200
1204
|
if (n || (t += ", "), t.length - 5 > e) {
|
|
1201
1205
|
t += "...";
|
|
1202
1206
|
break;
|
|
1203
1207
|
}
|
|
1204
|
-
n = !1, t += `${
|
|
1208
|
+
n = !1, t += `${Z(s, e - t.length)}`;
|
|
1205
1209
|
}
|
|
1206
1210
|
return t += " ]", t;
|
|
1207
1211
|
}
|
|
1208
|
-
function
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
+
function er(r, e) {
|
|
1213
|
+
try {
|
|
1214
|
+
if (typeof r.toString == "function" && r.toString !== Object.prototype.toString) {
|
|
1215
|
+
const i = r.toString();
|
|
1216
|
+
return i.length <= e ? i : i.substring(0, e - 3) + "...";
|
|
1217
|
+
}
|
|
1218
|
+
} catch {
|
|
1219
|
+
return "[[Object]]";
|
|
1220
|
+
}
|
|
1221
|
+
const t = Ge(r);
|
|
1222
|
+
let n = t ? t + "(" : "{ ", s = !0, o;
|
|
1223
|
+
try {
|
|
1224
|
+
o = Object.entries(r);
|
|
1225
|
+
} catch {
|
|
1226
|
+
return t ? `${t}(...)` : "[[Object]]";
|
|
1212
1227
|
}
|
|
1213
|
-
const
|
|
1214
|
-
|
|
1215
|
-
for (const [i, o] of Object.entries(s)) {
|
|
1216
|
-
if (r || (n += ", "), n.length - 5 > e) {
|
|
1228
|
+
for (const [i, d] of o) {
|
|
1229
|
+
if (s || (n += ", "), n.length - 5 > e) {
|
|
1217
1230
|
n += "...";
|
|
1218
1231
|
break;
|
|
1219
1232
|
}
|
|
1220
|
-
|
|
1233
|
+
s = !1, n += `${i}: ${Z(d, e - n.length)}`;
|
|
1221
1234
|
}
|
|
1222
1235
|
return n += t ? ")" : " }", n;
|
|
1223
1236
|
}
|
|
1224
|
-
function
|
|
1237
|
+
function tr(r, e) {
|
|
1225
1238
|
let t = "";
|
|
1226
1239
|
for (let n = 1; n <= e; n++)
|
|
1227
|
-
t +=
|
|
1240
|
+
t += r;
|
|
1228
1241
|
return t;
|
|
1229
1242
|
}
|
|
1230
|
-
function
|
|
1231
|
-
for (;
|
|
1232
|
-
|
|
1233
|
-
return
|
|
1234
|
-
}
|
|
1235
|
-
class oe {
|
|
1236
|
-
static createHost(e, t) {
|
|
1237
|
-
return new oe(e, t);
|
|
1238
|
-
}
|
|
1239
|
-
static createClient(e, t) {
|
|
1240
|
-
return new oe(e, t);
|
|
1241
|
-
}
|
|
1242
|
-
constructor(e, t) {
|
|
1243
|
-
this._channelFactory = e, this._getHandler = t, this._channel = this._channelFactory({
|
|
1244
|
-
handleNotification: (i) => {
|
|
1245
|
-
const o = i, d = this._getHandler().notifications[o[0]];
|
|
1246
|
-
if (!d)
|
|
1247
|
-
throw new Error(`Unknown notification "${o[0]}"!`);
|
|
1248
|
-
d(...o[1]);
|
|
1249
|
-
},
|
|
1250
|
-
handleRequest: (i) => {
|
|
1251
|
-
const o = i;
|
|
1252
|
-
try {
|
|
1253
|
-
return { type: "result", value: this._getHandler().requests[o[0]](...o[1]) };
|
|
1254
|
-
} catch (d) {
|
|
1255
|
-
return { type: "error", value: d };
|
|
1256
|
-
}
|
|
1257
|
-
}
|
|
1258
|
-
});
|
|
1259
|
-
const n = new Proxy({}, {
|
|
1260
|
-
get: (i, o) => async (...d) => {
|
|
1261
|
-
const c = await this._channel.sendRequest([o, d]);
|
|
1262
|
-
if (c.type === "error")
|
|
1263
|
-
throw c.value;
|
|
1264
|
-
return c.value;
|
|
1265
|
-
}
|
|
1266
|
-
}), r = new Proxy({}, {
|
|
1267
|
-
get: (i, o) => (...d) => {
|
|
1268
|
-
this._channel.sendNotification([o, d]);
|
|
1269
|
-
}
|
|
1270
|
-
});
|
|
1271
|
-
this.api = { notifications: r, requests: n };
|
|
1272
|
-
}
|
|
1273
|
-
}
|
|
1274
|
-
function dn(s, e) {
|
|
1275
|
-
const t = globalThis;
|
|
1276
|
-
let n = [], r;
|
|
1277
|
-
const { channel: i, handler: o } = cn({
|
|
1278
|
-
sendNotification: (c) => {
|
|
1279
|
-
r ? r.sendNotification(c) : n.push(c);
|
|
1280
|
-
}
|
|
1281
|
-
});
|
|
1282
|
-
let d;
|
|
1283
|
-
return (t.$$debugValueEditor_debugChannels ?? (t.$$debugValueEditor_debugChannels = {}))[s] = (c) => {
|
|
1284
|
-
d = e(), r = c;
|
|
1285
|
-
for (const h of n)
|
|
1286
|
-
c.sendNotification(h);
|
|
1287
|
-
return n = [], o;
|
|
1288
|
-
}, oe.createClient(i, () => {
|
|
1289
|
-
if (!d)
|
|
1290
|
-
throw new Error("Not supported");
|
|
1291
|
-
return d;
|
|
1292
|
-
});
|
|
1293
|
-
}
|
|
1294
|
-
function cn(s) {
|
|
1295
|
-
let e;
|
|
1296
|
-
return {
|
|
1297
|
-
channel: (n) => (e = n, {
|
|
1298
|
-
sendNotification: (r) => {
|
|
1299
|
-
s.sendNotification(r);
|
|
1300
|
-
},
|
|
1301
|
-
sendRequest: (r) => {
|
|
1302
|
-
throw new Error("not supported");
|
|
1303
|
-
}
|
|
1304
|
-
}),
|
|
1305
|
-
handler: {
|
|
1306
|
-
handleRequest: (n) => n.type === "notification" ? e == null ? void 0 : e.handleNotification(n.data) : e == null ? void 0 : e.handleRequest(n.data)
|
|
1307
|
-
}
|
|
1308
|
-
};
|
|
1309
|
-
}
|
|
1310
|
-
class ln {
|
|
1311
|
-
constructor() {
|
|
1312
|
-
this._timeout = void 0;
|
|
1313
|
-
}
|
|
1314
|
-
throttle(e, t) {
|
|
1315
|
-
this._timeout === void 0 && (this._timeout = setTimeout(() => {
|
|
1316
|
-
this._timeout = void 0, e();
|
|
1317
|
-
}, t));
|
|
1318
|
-
}
|
|
1319
|
-
dispose() {
|
|
1320
|
-
this._timeout !== void 0 && clearTimeout(this._timeout);
|
|
1321
|
-
}
|
|
1322
|
-
}
|
|
1323
|
-
function dt(s, e) {
|
|
1324
|
-
for (const t in e)
|
|
1325
|
-
s[t] && typeof s[t] == "object" && e[t] && typeof e[t] == "object" ? dt(s[t], e[t]) : s[t] = e[t];
|
|
1326
|
-
}
|
|
1327
|
-
function ct(s, e) {
|
|
1328
|
-
for (const t in e)
|
|
1329
|
-
e[t] === null ? delete s[t] : s[t] && typeof s[t] == "object" && e[t] && typeof e[t] == "object" ? ct(s[t], e[t]) : s[t] = e[t];
|
|
1330
|
-
}
|
|
1331
|
-
class P {
|
|
1332
|
-
static getInstance() {
|
|
1333
|
-
return P._instance === void 0 && (P._instance = new P()), P._instance;
|
|
1334
|
-
}
|
|
1335
|
-
getTransactionState() {
|
|
1336
|
-
const e = [], t = [...this._activeTransactions];
|
|
1337
|
-
if (t.length === 0)
|
|
1338
|
-
return;
|
|
1339
|
-
const n = t.flatMap((i) => i.debugGetUpdatingObservers() ?? []).map((i) => i.observer), r = /* @__PURE__ */ new Set();
|
|
1340
|
-
for (; n.length > 0; ) {
|
|
1341
|
-
const i = n.shift();
|
|
1342
|
-
if (r.has(i))
|
|
1343
|
-
continue;
|
|
1344
|
-
r.add(i);
|
|
1345
|
-
const o = this._getInfo(i, (d) => {
|
|
1346
|
-
r.has(d) || n.push(d);
|
|
1347
|
-
});
|
|
1348
|
-
o && e.push(o);
|
|
1349
|
-
}
|
|
1350
|
-
return { names: t.map((i) => i.getDebugName() ?? "tx"), affected: e };
|
|
1351
|
-
}
|
|
1352
|
-
_getObservableInfo(e) {
|
|
1353
|
-
const t = this._instanceInfos.get(e);
|
|
1354
|
-
if (!t) {
|
|
1355
|
-
pe(new O("No info found"));
|
|
1356
|
-
return;
|
|
1357
|
-
}
|
|
1358
|
-
return t;
|
|
1359
|
-
}
|
|
1360
|
-
_getAutorunInfo(e) {
|
|
1361
|
-
const t = this._instanceInfos.get(e);
|
|
1362
|
-
if (!t) {
|
|
1363
|
-
pe(new O("No info found"));
|
|
1364
|
-
return;
|
|
1365
|
-
}
|
|
1366
|
-
return t;
|
|
1367
|
-
}
|
|
1368
|
-
_getInfo(e, t) {
|
|
1369
|
-
if (e instanceof w) {
|
|
1370
|
-
const n = [...e.debugGetObservers()];
|
|
1371
|
-
for (const c of n)
|
|
1372
|
-
t(c);
|
|
1373
|
-
const r = this._getObservableInfo(e);
|
|
1374
|
-
if (!r)
|
|
1375
|
-
return;
|
|
1376
|
-
const i = e.debugGetState(), o = { name: e.debugName, instanceId: r.instanceId, updateCount: i.updateCount }, d = [...r.changedObservables].map((c) => {
|
|
1377
|
-
var h;
|
|
1378
|
-
return (h = this._instanceInfos.get(c)) == null ? void 0 : h.instanceId;
|
|
1379
|
-
}).filter(ee);
|
|
1380
|
-
if (i.isComputing)
|
|
1381
|
-
return { ...o, type: "observable/derived", state: "updating", changedDependencies: d, initialComputation: !1 };
|
|
1382
|
-
switch (i.state) {
|
|
1383
|
-
case 0:
|
|
1384
|
-
return { ...o, type: "observable/derived", state: "noValue" };
|
|
1385
|
-
case 3:
|
|
1386
|
-
return { ...o, type: "observable/derived", state: "upToDate" };
|
|
1387
|
-
case 2:
|
|
1388
|
-
return { ...o, type: "observable/derived", state: "stale", changedDependencies: d };
|
|
1389
|
-
case 1:
|
|
1390
|
-
return { ...o, type: "observable/derived", state: "possiblyStale" };
|
|
1391
|
-
}
|
|
1392
|
-
} else if (e instanceof re) {
|
|
1393
|
-
const n = this._getAutorunInfo(e);
|
|
1394
|
-
if (!n)
|
|
1395
|
-
return;
|
|
1396
|
-
const r = { name: e.debugName, instanceId: n.instanceId, updateCount: n.updateCount }, i = [...n.changedObservables].map((o) => this._instanceInfos.get(o).instanceId);
|
|
1397
|
-
if (e.debugGetState().isRunning)
|
|
1398
|
-
return { ...r, type: "autorun", state: "updating", changedDependencies: i };
|
|
1399
|
-
switch (e.debugGetState().state) {
|
|
1400
|
-
case 3:
|
|
1401
|
-
return { ...r, type: "autorun", state: "upToDate" };
|
|
1402
|
-
case 2:
|
|
1403
|
-
return { ...r, type: "autorun", state: "stale", changedDependencies: i };
|
|
1404
|
-
case 1:
|
|
1405
|
-
return { ...r, type: "autorun", state: "possiblyStale" };
|
|
1406
|
-
}
|
|
1407
|
-
}
|
|
1408
|
-
}
|
|
1409
|
-
_formatObservable(e) {
|
|
1410
|
-
const t = this._getObservableInfo(e);
|
|
1411
|
-
if (t)
|
|
1412
|
-
return { name: e.debugName, instanceId: t.instanceId };
|
|
1413
|
-
}
|
|
1414
|
-
_formatObserver(e) {
|
|
1415
|
-
var n;
|
|
1416
|
-
if (e instanceof w)
|
|
1417
|
-
return { name: e.toString(), instanceId: (n = this._getObservableInfo(e)) == null ? void 0 : n.instanceId };
|
|
1418
|
-
const t = this._getAutorunInfo(e);
|
|
1419
|
-
if (t)
|
|
1420
|
-
return { name: e.toString(), instanceId: t.instanceId };
|
|
1421
|
-
}
|
|
1422
|
-
constructor() {
|
|
1423
|
-
this._declarationId = 0, this._instanceId = 0, this._declarations = /* @__PURE__ */ new Map(), this._instanceInfos = /* @__PURE__ */ new WeakMap(), this._aliveInstances = /* @__PURE__ */ new Map(), this._activeTransactions = /* @__PURE__ */ new Set(), this._channel = dn("observableDevTools", () => ({
|
|
1424
|
-
notifications: {
|
|
1425
|
-
setDeclarationIdFilter: (e) => {
|
|
1426
|
-
},
|
|
1427
|
-
logObservableValue: (e) => {
|
|
1428
|
-
console.log("logObservableValue", e);
|
|
1429
|
-
},
|
|
1430
|
-
flushUpdates: () => {
|
|
1431
|
-
this._flushUpdates();
|
|
1432
|
-
},
|
|
1433
|
-
resetUpdates: () => {
|
|
1434
|
-
this._pendingChanges = null, this._channel.api.notifications.handleChange(this._fullState, !0);
|
|
1435
|
-
}
|
|
1436
|
-
},
|
|
1437
|
-
requests: {
|
|
1438
|
-
getDeclarations: () => {
|
|
1439
|
-
const e = {};
|
|
1440
|
-
for (const t of this._declarations.values())
|
|
1441
|
-
e[t.id] = t;
|
|
1442
|
-
return { decls: e };
|
|
1443
|
-
},
|
|
1444
|
-
getSummarizedInstances: () => null,
|
|
1445
|
-
getObservableValueInfo: (e) => ({
|
|
1446
|
-
observers: [...this._aliveInstances.get(e).debugGetObservers()].map((n) => this._formatObserver(n)).filter(ee)
|
|
1447
|
-
}),
|
|
1448
|
-
getDerivedInfo: (e) => {
|
|
1449
|
-
const t = this._aliveInstances.get(e);
|
|
1450
|
-
return {
|
|
1451
|
-
dependencies: [...t.debugGetState().dependencies].map((n) => this._formatObservable(n)).filter(ee),
|
|
1452
|
-
observers: [...t.debugGetObservers()].map((n) => this._formatObserver(n)).filter(ee)
|
|
1453
|
-
};
|
|
1454
|
-
},
|
|
1455
|
-
getAutorunInfo: (e) => ({
|
|
1456
|
-
dependencies: [...this._aliveInstances.get(e).debugGetState().dependencies].map((n) => this._formatObservable(n)).filter(ee)
|
|
1457
|
-
}),
|
|
1458
|
-
getTransactionState: () => this.getTransactionState(),
|
|
1459
|
-
setValue: (e, t) => {
|
|
1460
|
-
const n = this._aliveInstances.get(e);
|
|
1461
|
-
if (n instanceof w)
|
|
1462
|
-
n.debugSetValue(t);
|
|
1463
|
-
else if (n instanceof ie)
|
|
1464
|
-
n.debugSetValue(t);
|
|
1465
|
-
else if (n instanceof A)
|
|
1466
|
-
n.debugSetValue(t);
|
|
1467
|
-
else
|
|
1468
|
-
throw new O("Observable is not supported");
|
|
1469
|
-
const r = [...n.debugGetObservers()];
|
|
1470
|
-
for (const i of r)
|
|
1471
|
-
i.beginUpdate(n);
|
|
1472
|
-
for (const i of r)
|
|
1473
|
-
i.handleChange(n, void 0);
|
|
1474
|
-
for (const i of r)
|
|
1475
|
-
i.endUpdate(n);
|
|
1476
|
-
},
|
|
1477
|
-
getValue: (e) => {
|
|
1478
|
-
const t = this._aliveInstances.get(e);
|
|
1479
|
-
if (t instanceof w)
|
|
1480
|
-
return M(t.debugGetState().value, 200);
|
|
1481
|
-
if (t instanceof ie)
|
|
1482
|
-
return M(t.debugGetState().value, 200);
|
|
1483
|
-
},
|
|
1484
|
-
logValue: (e) => {
|
|
1485
|
-
const t = this._aliveInstances.get(e);
|
|
1486
|
-
if (t && "get" in t)
|
|
1487
|
-
console.log("Logged Value:", t.get());
|
|
1488
|
-
else
|
|
1489
|
-
throw new O("Observable is not supported");
|
|
1490
|
-
},
|
|
1491
|
-
rerun: (e) => {
|
|
1492
|
-
const t = this._aliveInstances.get(e);
|
|
1493
|
-
if (t instanceof w)
|
|
1494
|
-
t.debugRecompute();
|
|
1495
|
-
else if (t instanceof re)
|
|
1496
|
-
t.debugRerun();
|
|
1497
|
-
else
|
|
1498
|
-
throw new O("Observable is not supported");
|
|
1499
|
-
}
|
|
1500
|
-
}
|
|
1501
|
-
})), this._pendingChanges = null, this._changeThrottler = new ln(), this._fullState = {}, this._flushUpdates = () => {
|
|
1502
|
-
this._pendingChanges !== null && (this._channel.api.notifications.handleChange(this._pendingChanges, !1), this._pendingChanges = null);
|
|
1503
|
-
}, T.enable();
|
|
1504
|
-
}
|
|
1505
|
-
_handleChange(e) {
|
|
1506
|
-
ct(this._fullState, e), this._pendingChanges === null ? this._pendingChanges = e : dt(this._pendingChanges, e), this._changeThrottler.throttle(this._flushUpdates, 10);
|
|
1507
|
-
}
|
|
1508
|
-
_getDeclarationId(e, t) {
|
|
1509
|
-
if (!t)
|
|
1510
|
-
return -1;
|
|
1511
|
-
let n = this._declarations.get(t.id);
|
|
1512
|
-
return n === void 0 && (n = {
|
|
1513
|
-
id: this._declarationId++,
|
|
1514
|
-
type: e,
|
|
1515
|
-
url: t.fileName,
|
|
1516
|
-
line: t.line,
|
|
1517
|
-
column: t.column
|
|
1518
|
-
}, this._declarations.set(t.id, n), this._handleChange({ decls: { [n.id]: n } })), n.id;
|
|
1519
|
-
}
|
|
1520
|
-
handleObservableCreated(e, t) {
|
|
1521
|
-
const r = {
|
|
1522
|
-
declarationId: this._getDeclarationId("observable/value", t),
|
|
1523
|
-
instanceId: this._instanceId++,
|
|
1524
|
-
listenerCount: 0,
|
|
1525
|
-
lastValue: void 0,
|
|
1526
|
-
updateCount: 0,
|
|
1527
|
-
changedObservables: /* @__PURE__ */ new Set()
|
|
1528
|
-
};
|
|
1529
|
-
this._instanceInfos.set(e, r);
|
|
1530
|
-
}
|
|
1531
|
-
handleOnListenerCountChanged(e, t) {
|
|
1532
|
-
const n = this._getObservableInfo(e);
|
|
1533
|
-
if (n) {
|
|
1534
|
-
if (n.listenerCount === 0 && t > 0) {
|
|
1535
|
-
const r = e instanceof w ? "observable/derived" : "observable/value";
|
|
1536
|
-
this._aliveInstances.set(n.instanceId, e), this._handleChange({
|
|
1537
|
-
instances: {
|
|
1538
|
-
[n.instanceId]: {
|
|
1539
|
-
instanceId: n.instanceId,
|
|
1540
|
-
declarationId: n.declarationId,
|
|
1541
|
-
formattedValue: n.lastValue,
|
|
1542
|
-
type: r,
|
|
1543
|
-
name: e.debugName
|
|
1544
|
-
}
|
|
1545
|
-
}
|
|
1546
|
-
});
|
|
1547
|
-
} else n.listenerCount > 0 && t === 0 && (this._handleChange({
|
|
1548
|
-
instances: { [n.instanceId]: null }
|
|
1549
|
-
}), this._aliveInstances.delete(n.instanceId));
|
|
1550
|
-
n.listenerCount = t;
|
|
1551
|
-
}
|
|
1552
|
-
}
|
|
1553
|
-
handleObservableUpdated(e, t) {
|
|
1554
|
-
if (e instanceof w) {
|
|
1555
|
-
this._handleDerivedRecomputed(e, t);
|
|
1556
|
-
return;
|
|
1557
|
-
}
|
|
1558
|
-
const n = this._getObservableInfo(e);
|
|
1559
|
-
n && t.didChange && (n.lastValue = M(t.newValue, 30), n.listenerCount > 0 && this._handleChange({
|
|
1560
|
-
instances: { [n.instanceId]: { formattedValue: n.lastValue } }
|
|
1561
|
-
}));
|
|
1562
|
-
}
|
|
1563
|
-
handleAutorunCreated(e, t) {
|
|
1564
|
-
const r = {
|
|
1565
|
-
declarationId: this._getDeclarationId("autorun", t),
|
|
1566
|
-
instanceId: this._instanceId++,
|
|
1567
|
-
updateCount: 0,
|
|
1568
|
-
changedObservables: /* @__PURE__ */ new Set()
|
|
1569
|
-
};
|
|
1570
|
-
this._instanceInfos.set(e, r), this._aliveInstances.set(r.instanceId, e), r && this._handleChange({
|
|
1571
|
-
instances: {
|
|
1572
|
-
[r.instanceId]: {
|
|
1573
|
-
instanceId: r.instanceId,
|
|
1574
|
-
declarationId: r.declarationId,
|
|
1575
|
-
runCount: 0,
|
|
1576
|
-
type: "autorun",
|
|
1577
|
-
name: e.debugName
|
|
1578
|
-
}
|
|
1579
|
-
}
|
|
1580
|
-
});
|
|
1581
|
-
}
|
|
1582
|
-
handleAutorunDisposed(e) {
|
|
1583
|
-
const t = this._getAutorunInfo(e);
|
|
1584
|
-
t && (this._handleChange({
|
|
1585
|
-
instances: { [t.instanceId]: null }
|
|
1586
|
-
}), this._instanceInfos.delete(e), this._aliveInstances.delete(t.instanceId));
|
|
1587
|
-
}
|
|
1588
|
-
handleAutorunDependencyChanged(e, t, n) {
|
|
1589
|
-
const r = this._getAutorunInfo(e);
|
|
1590
|
-
r && r.changedObservables.add(t);
|
|
1591
|
-
}
|
|
1592
|
-
handleAutorunStarted(e) {
|
|
1593
|
-
}
|
|
1594
|
-
handleAutorunFinished(e) {
|
|
1595
|
-
const t = this._getAutorunInfo(e);
|
|
1596
|
-
t && (t.changedObservables.clear(), t.updateCount++, this._handleChange({
|
|
1597
|
-
instances: { [t.instanceId]: { runCount: t.updateCount } }
|
|
1598
|
-
}));
|
|
1599
|
-
}
|
|
1600
|
-
handleDerivedDependencyChanged(e, t, n) {
|
|
1601
|
-
const r = this._getObservableInfo(e);
|
|
1602
|
-
r && r.changedObservables.add(t);
|
|
1603
|
-
}
|
|
1604
|
-
_handleDerivedRecomputed(e, t) {
|
|
1605
|
-
const n = this._getObservableInfo(e);
|
|
1606
|
-
if (!n)
|
|
1607
|
-
return;
|
|
1608
|
-
const r = M(t.newValue, 30);
|
|
1609
|
-
n.updateCount++, n.changedObservables.clear(), n.lastValue = r, n.listenerCount > 0 && this._handleChange({
|
|
1610
|
-
instances: { [n.instanceId]: { formattedValue: r, recomputationCount: n.updateCount } }
|
|
1611
|
-
});
|
|
1612
|
-
}
|
|
1613
|
-
handleDerivedCleared(e) {
|
|
1614
|
-
const t = this._getObservableInfo(e);
|
|
1615
|
-
t && (t.lastValue = void 0, t.changedObservables.clear(), t.listenerCount > 0 && this._handleChange({
|
|
1616
|
-
instances: {
|
|
1617
|
-
[t.instanceId]: {
|
|
1618
|
-
formattedValue: void 0
|
|
1619
|
-
}
|
|
1620
|
-
}
|
|
1621
|
-
}));
|
|
1622
|
-
}
|
|
1623
|
-
handleBeginTransaction(e) {
|
|
1624
|
-
this._activeTransactions.add(e);
|
|
1625
|
-
}
|
|
1626
|
-
handleEndTransaction(e) {
|
|
1627
|
-
this._activeTransactions.delete(e);
|
|
1628
|
-
}
|
|
1243
|
+
function rr(r, e) {
|
|
1244
|
+
for (; r.length < e; )
|
|
1245
|
+
r += " ";
|
|
1246
|
+
return r;
|
|
1629
1247
|
}
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
return n ? lt(n, 0, /* @__PURE__ */ new Set()).trim() : "";
|
|
1248
|
+
function nr(r, e) {
|
|
1249
|
+
const t = (e == null ? void 0 : e.debugNamePostProcessor) ?? ((o) => o), n = T.from(r, t);
|
|
1250
|
+
return n ? nt(n, 0, /* @__PURE__ */ new Set()).trim() : "";
|
|
1634
1251
|
}
|
|
1635
|
-
function
|
|
1636
|
-
const n = " ".repeat(e),
|
|
1637
|
-
if (t.has(
|
|
1638
|
-
return
|
|
1252
|
+
function nt(r, e, t) {
|
|
1253
|
+
const n = " ".repeat(e), s = [];
|
|
1254
|
+
if (t.has(r.sourceObj))
|
|
1255
|
+
return s.push(`${n}* ${r.type} ${r.name} (already listed)`), s.join(`
|
|
1639
1256
|
`);
|
|
1640
|
-
if (t.add(
|
|
1641
|
-
|
|
1642
|
-
for (const
|
|
1643
|
-
|
|
1257
|
+
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) {
|
|
1258
|
+
s.push(`${n} dependencies:`);
|
|
1259
|
+
for (const i of r.dependencies)
|
|
1260
|
+
s.push(nt(i, e + 1, t));
|
|
1644
1261
|
}
|
|
1645
|
-
return
|
|
1262
|
+
return s.join(`
|
|
1646
1263
|
`);
|
|
1647
1264
|
}
|
|
1648
|
-
class
|
|
1265
|
+
class T {
|
|
1649
1266
|
static from(e, t) {
|
|
1650
|
-
if (e instanceof
|
|
1267
|
+
if (e instanceof Xe) {
|
|
1651
1268
|
const n = e.debugGetState();
|
|
1652
|
-
return new
|
|
1653
|
-
} else if (e instanceof
|
|
1269
|
+
return new T(e, t(e.debugName), "autorun", void 0, n.stateStr, Array.from(n.dependencies).map((s) => T.from(s, t) || T.unknown(s)));
|
|
1270
|
+
} else if (e instanceof j) {
|
|
1654
1271
|
const n = e.debugGetState();
|
|
1655
|
-
return new
|
|
1656
|
-
} else if (e instanceof
|
|
1272
|
+
return new T(e, t(e.debugName), "derived", n.value, n.stateStr, Array.from(n.dependencies).map((s) => T.from(s, t) || T.unknown(s)));
|
|
1273
|
+
} else if (e instanceof tt) {
|
|
1657
1274
|
const n = e.debugGetState();
|
|
1658
|
-
return new
|
|
1659
|
-
} else if (e instanceof
|
|
1275
|
+
return new T(e, t(e.debugName), "observableValue", n.value, "upToDate", []);
|
|
1276
|
+
} else if (e instanceof L) {
|
|
1660
1277
|
const n = e.debugGetState();
|
|
1661
|
-
return new
|
|
1278
|
+
return new T(e, t(e.debugName), "fromEvent", n.value, n.hasValue ? "upToDate" : "initial", []);
|
|
1662
1279
|
}
|
|
1663
1280
|
}
|
|
1664
1281
|
static unknown(e) {
|
|
1665
|
-
return new
|
|
1282
|
+
return new T(e, "(unknown)", "unknown", void 0, "unknown", []);
|
|
1666
1283
|
}
|
|
1667
|
-
constructor(e, t, n,
|
|
1668
|
-
this.sourceObj = e, this.name = t, this.type = n, this.value =
|
|
1284
|
+
constructor(e, t, n, s, o, i) {
|
|
1285
|
+
this.sourceObj = e, this.name = t, this.type = n, this.value = s, this.state = o, this.dependencies = i;
|
|
1669
1286
|
}
|
|
1670
1287
|
}
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
class un {
|
|
1288
|
+
$t(nr);
|
|
1289
|
+
kt(Jt);
|
|
1290
|
+
class sr {
|
|
1675
1291
|
constructor() {
|
|
1676
1292
|
l(this, "_fixtures", x(this, /* @__PURE__ */ new Map()));
|
|
1677
1293
|
/** Observable root of the fixture tree */
|
|
1678
|
-
l(this, "root",
|
|
1294
|
+
l(this, "root", N(this, (e) => {
|
|
1679
1295
|
const t = this._fixtures.read(e);
|
|
1680
|
-
return
|
|
1296
|
+
return oe(t);
|
|
1681
1297
|
}));
|
|
1682
1298
|
}
|
|
1683
1299
|
/**
|
|
@@ -1708,18 +1324,18 @@ class un {
|
|
|
1708
1324
|
*/
|
|
1709
1325
|
getNode(e, t) {
|
|
1710
1326
|
const n = this.root.read(e);
|
|
1711
|
-
return
|
|
1327
|
+
return Oe(n, t);
|
|
1712
1328
|
}
|
|
1713
1329
|
/**
|
|
1714
1330
|
* Gets a component by path (non-reactive, for use in preview iframe).
|
|
1715
1331
|
* @param path Array of path segments (e.g., ['Button', 'Primary'])
|
|
1716
1332
|
*/
|
|
1717
1333
|
getComponentByPath(e) {
|
|
1718
|
-
const t = this._fixtures.get(), n =
|
|
1719
|
-
return
|
|
1334
|
+
const t = this._fixtures.get(), n = oe(t), s = Oe(n, e);
|
|
1335
|
+
return s == null ? void 0 : s.component;
|
|
1720
1336
|
}
|
|
1721
1337
|
}
|
|
1722
|
-
class
|
|
1338
|
+
class kn {
|
|
1723
1339
|
constructor(e, t) {
|
|
1724
1340
|
l(this, "sessionId", Math.random().toString(36).slice(2));
|
|
1725
1341
|
l(this, "_updateVersion", 0);
|
|
@@ -1746,66 +1362,71 @@ class As {
|
|
|
1746
1362
|
return this._flattenFixtures(this._root);
|
|
1747
1363
|
}
|
|
1748
1364
|
async renderFixture(e) {
|
|
1365
|
+
var C;
|
|
1749
1366
|
const t = this._findFixtureNode(this._root, e);
|
|
1750
1367
|
if (!t || !t.component)
|
|
1751
1368
|
throw new Error("Fixture not found: " + e);
|
|
1752
|
-
this._currentDisposable &&
|
|
1369
|
+
(C = this._currentDisposable) != null && C.dispose && this._currentDisposable.dispose(), this._currentDisposable = void 0, this._currentContainer && (this._currentContainer.remove(), this._currentContainer = void 0);
|
|
1753
1370
|
const n = document.createElement("div");
|
|
1754
1371
|
n.style.display = "inline-block", this._containerElement.appendChild(n), this._currentContainer = n;
|
|
1755
|
-
const
|
|
1756
|
-
let
|
|
1757
|
-
if (
|
|
1758
|
-
const
|
|
1759
|
-
|
|
1372
|
+
const s = t.component, o = Rt(s.properties);
|
|
1373
|
+
let i = n;
|
|
1374
|
+
if (s.isolation === "shadow-dom") {
|
|
1375
|
+
const m = n.attachShadow({ mode: "open" });
|
|
1376
|
+
i = document.createElement("div"), m.appendChild(i);
|
|
1760
1377
|
}
|
|
1761
1378
|
const d = [], c = console.error, h = console.warn;
|
|
1762
|
-
console.error = (...
|
|
1763
|
-
d.push({ kind: "console", level: "error", message:
|
|
1764
|
-
}, console.warn = (...
|
|
1765
|
-
d.push({ kind: "console", level: "warn", message:
|
|
1379
|
+
console.error = (...m) => {
|
|
1380
|
+
d.push({ kind: "console", level: "error", message: m.map(String).join(" ") }), c.apply(console, m);
|
|
1381
|
+
}, console.warn = (...m) => {
|
|
1382
|
+
d.push({ kind: "console", level: "warn", message: m.map(String).join(" ") }), h.apply(console, m);
|
|
1766
1383
|
};
|
|
1767
|
-
const
|
|
1384
|
+
const g = (m) => {
|
|
1768
1385
|
var v;
|
|
1769
|
-
d.push({ kind: "exception", message:
|
|
1770
|
-
}, _ = (
|
|
1771
|
-
const v =
|
|
1772
|
-
d.push({ kind: "exception", message:
|
|
1386
|
+
d.push({ kind: "exception", message: m.message, stack: (v = m.error) == null ? void 0 : v.stack });
|
|
1387
|
+
}, _ = (m) => {
|
|
1388
|
+
const v = m.reason, O = v instanceof Error ? v.message : String(v), S = v instanceof Error ? v.stack : void 0;
|
|
1389
|
+
d.push({ kind: "exception", message: O, stack: S });
|
|
1773
1390
|
};
|
|
1774
|
-
window.addEventListener("error",
|
|
1391
|
+
window.addEventListener("error", g), window.addEventListener("unhandledrejection", _);
|
|
1775
1392
|
try {
|
|
1776
|
-
const
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1393
|
+
const m = new AbortController();
|
|
1394
|
+
let v = s.render(i, {
|
|
1395
|
+
props: o,
|
|
1396
|
+
signal: m.signal
|
|
1397
|
+
});
|
|
1398
|
+
v instanceof Promise && (v = await v), this._currentDisposable = v ?? void 0, v != null && v.ready && await v.ready;
|
|
1399
|
+
} catch (m) {
|
|
1400
|
+
const v = m instanceof Error ? m : new Error(String(m));
|
|
1780
1401
|
d.push({ kind: "exception", message: v.message, stack: v.stack });
|
|
1781
1402
|
} finally {
|
|
1782
1403
|
console.error = c, console.warn = h;
|
|
1783
1404
|
}
|
|
1784
|
-
return await new Promise((
|
|
1405
|
+
return await new Promise((m) => requestAnimationFrame(() => requestAnimationFrame(() => m()))), window.removeEventListener("error", g), window.removeEventListener("unhandledrejection", _), { errors: d };
|
|
1785
1406
|
}
|
|
1786
1407
|
_buildRegistry() {
|
|
1787
1408
|
const e = /* @__PURE__ */ new Map();
|
|
1788
1409
|
for (const [t, n] of Object.entries(this._fixtureModules)) {
|
|
1789
|
-
const
|
|
1790
|
-
|
|
1410
|
+
const s = n.default;
|
|
1411
|
+
s && typeof s == "object" && e.set(t, s);
|
|
1791
1412
|
}
|
|
1792
|
-
return
|
|
1413
|
+
return oe(e);
|
|
1793
1414
|
}
|
|
1794
1415
|
_flattenFixtures(e, t = []) {
|
|
1795
|
-
var
|
|
1416
|
+
var s;
|
|
1796
1417
|
const n = [];
|
|
1797
|
-
e.type === "component" && n.push({ fixtureId: e.id, fixtureName: e.name, groupPath: t, background: ((
|
|
1798
|
-
for (const
|
|
1799
|
-
const
|
|
1800
|
-
n.push(...this._flattenFixtures(
|
|
1418
|
+
e.type === "component" && n.push({ fixtureId: e.id, fixtureName: e.name, groupPath: t, background: ((s = e.component) == null ? void 0 : s.background) ?? "light" });
|
|
1419
|
+
for (const o of e.children ?? []) {
|
|
1420
|
+
const i = e.id ? [...t, e.name] : t;
|
|
1421
|
+
n.push(...this._flattenFixtures(o, i));
|
|
1801
1422
|
}
|
|
1802
1423
|
return n;
|
|
1803
1424
|
}
|
|
1804
1425
|
_findFixtureNode(e, t) {
|
|
1805
1426
|
if (e.id === t) return e;
|
|
1806
1427
|
for (const n of e.children ?? []) {
|
|
1807
|
-
const
|
|
1808
|
-
if (
|
|
1428
|
+
const s = this._findFixtureNode(n, t);
|
|
1429
|
+
if (s) return s;
|
|
1809
1430
|
}
|
|
1810
1431
|
}
|
|
1811
1432
|
_installGlobalApi() {
|
|
@@ -1821,7 +1442,7 @@ class As {
|
|
|
1821
1442
|
});
|
|
1822
1443
|
}
|
|
1823
1444
|
}
|
|
1824
|
-
class
|
|
1445
|
+
class or {
|
|
1825
1446
|
constructor(e) {
|
|
1826
1447
|
this._run = e, this._changes = [], this._map = /* @__PURE__ */ new Map(), this._updateCounter = 0;
|
|
1827
1448
|
}
|
|
@@ -1848,48 +1469,48 @@ class fn {
|
|
|
1848
1469
|
}
|
|
1849
1470
|
}
|
|
1850
1471
|
function u() {
|
|
1851
|
-
return
|
|
1472
|
+
return ce.instance;
|
|
1852
1473
|
}
|
|
1853
|
-
function
|
|
1854
|
-
return
|
|
1474
|
+
function ir() {
|
|
1475
|
+
return le.instance;
|
|
1855
1476
|
}
|
|
1856
|
-
function
|
|
1857
|
-
return
|
|
1477
|
+
function ar() {
|
|
1478
|
+
return he.instance;
|
|
1858
1479
|
}
|
|
1859
|
-
u.const =
|
|
1860
|
-
u.obs =
|
|
1861
|
-
class
|
|
1480
|
+
u.const = ir;
|
|
1481
|
+
u.obs = ar;
|
|
1482
|
+
class ce {
|
|
1862
1483
|
create(e) {
|
|
1863
|
-
const t =
|
|
1484
|
+
const t = N((n) => e(n));
|
|
1864
1485
|
return { read: (n) => t };
|
|
1865
1486
|
}
|
|
1866
1487
|
}
|
|
1867
|
-
|
|
1868
|
-
class
|
|
1488
|
+
ce.instance = new ce();
|
|
1489
|
+
class le {
|
|
1869
1490
|
create(e) {
|
|
1870
|
-
const t =
|
|
1491
|
+
const t = N((n) => e(n));
|
|
1871
1492
|
return { read: (n) => t.read(n) };
|
|
1872
1493
|
}
|
|
1873
1494
|
}
|
|
1874
|
-
|
|
1875
|
-
class
|
|
1495
|
+
le.instance = new le();
|
|
1496
|
+
class he {
|
|
1876
1497
|
create(e) {
|
|
1877
|
-
const t =
|
|
1878
|
-
const
|
|
1879
|
-
return
|
|
1498
|
+
const t = N((n) => {
|
|
1499
|
+
const s = e(n);
|
|
1500
|
+
return dr(s) ? s.read(n) : s;
|
|
1880
1501
|
});
|
|
1881
1502
|
return { read: (n) => t };
|
|
1882
1503
|
}
|
|
1883
1504
|
}
|
|
1884
|
-
|
|
1885
|
-
function
|
|
1886
|
-
return typeof
|
|
1505
|
+
he.instance = new he();
|
|
1506
|
+
function dr(r) {
|
|
1507
|
+
return typeof r == "object" && r !== null && "read" in r;
|
|
1887
1508
|
}
|
|
1888
|
-
function
|
|
1889
|
-
return Object.fromEntries(Object.entries(
|
|
1509
|
+
function K(r, e) {
|
|
1510
|
+
return Object.fromEntries(Object.entries(r).map(([t, n]) => [t, e(n, t)]));
|
|
1890
1511
|
}
|
|
1891
|
-
const
|
|
1892
|
-
class
|
|
1512
|
+
const ne = Symbol("ViewModelContext");
|
|
1513
|
+
class cr {
|
|
1893
1514
|
constructor(e) {
|
|
1894
1515
|
this._store = new Y(), this.props = e;
|
|
1895
1516
|
}
|
|
@@ -1897,35 +1518,35 @@ class vn {
|
|
|
1897
1518
|
this._store.dispose();
|
|
1898
1519
|
}
|
|
1899
1520
|
}
|
|
1900
|
-
function
|
|
1901
|
-
return
|
|
1521
|
+
function lr(r) {
|
|
1522
|
+
return r[ne] || (r[ne] = Ue(void 0)), r[ne];
|
|
1902
1523
|
}
|
|
1903
|
-
function
|
|
1524
|
+
function F(r = {}) {
|
|
1904
1525
|
var e;
|
|
1905
|
-
return e = class extends
|
|
1906
|
-
}, e._props =
|
|
1526
|
+
return e = class extends cr {
|
|
1527
|
+
}, e._props = r, e;
|
|
1907
1528
|
}
|
|
1908
|
-
let
|
|
1909
|
-
const
|
|
1910
|
-
for (const e of
|
|
1529
|
+
let ue = 0;
|
|
1530
|
+
const hr = new or((r) => {
|
|
1531
|
+
for (const e of r)
|
|
1911
1532
|
e.rendered = !1;
|
|
1912
|
-
if (
|
|
1913
|
-
const e =
|
|
1914
|
-
e.itemsToRender =
|
|
1533
|
+
if (ue > 0) {
|
|
1534
|
+
const e = r.find((t) => t.isRendering);
|
|
1535
|
+
e.itemsToRender = r;
|
|
1915
1536
|
} else
|
|
1916
|
-
|
|
1917
|
-
for (const e of
|
|
1537
|
+
Pe(() => {
|
|
1538
|
+
for (const e of r)
|
|
1918
1539
|
e.rendered || e.forceUpdate();
|
|
1919
1540
|
});
|
|
1920
1541
|
});
|
|
1921
|
-
let
|
|
1922
|
-
class
|
|
1542
|
+
let ur = 0;
|
|
1543
|
+
class fr {
|
|
1923
1544
|
constructor(e, t) {
|
|
1924
1545
|
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 = () => () => {
|
|
1925
1546
|
var n;
|
|
1926
1547
|
(n = this._disposable) == null || n.dispose();
|
|
1927
1548
|
}, this.itemsToRender = [], this.handleAfterRender = () => {
|
|
1928
|
-
|
|
1549
|
+
Pe(() => {
|
|
1929
1550
|
for (const n of this.itemsToRender)
|
|
1930
1551
|
n.rendered || n.forceUpdate();
|
|
1931
1552
|
}), this.itemsToRender = [];
|
|
@@ -1935,139 +1556,139 @@ class xn {
|
|
|
1935
1556
|
return this.debugName;
|
|
1936
1557
|
}
|
|
1937
1558
|
updateProps(e) {
|
|
1938
|
-
this._obsProps ? this._obsProps.set(e, void 0) : (this._obsProps = x(this, e), this._render = this.renderFactory(this._obsProps, () => this.contextValues), this.rendering =
|
|
1559
|
+
this._obsProps ? this._obsProps.set(e, void 0) : (this._obsProps = x(this, e), this._render = this.renderFactory(this._obsProps, () => this.contextValues), this.rendering = N(this, this._render), this._disposable = hr.addDependency(this.rendering, this));
|
|
1939
1560
|
}
|
|
1940
1561
|
}
|
|
1941
|
-
function
|
|
1942
|
-
const n = (
|
|
1943
|
-
const d =
|
|
1562
|
+
function xe(r, e, t) {
|
|
1563
|
+
const n = (i) => i + 1, s = () => new fr(r + ++ur, e), o = function(i) {
|
|
1564
|
+
const d = bt(n, 0)[1], c = yt(s)[0];
|
|
1944
1565
|
for (const h of t ?? [])
|
|
1945
|
-
c.contextValues.set(h,
|
|
1946
|
-
if (
|
|
1566
|
+
c.contextValues.set(h, xt(h));
|
|
1567
|
+
if (Te(c.cleanupEffect, []), Te(c.handleAfterRender), c.isRendering)
|
|
1947
1568
|
throw new Error("Component is already rendering");
|
|
1948
|
-
c.isRendering = !0,
|
|
1569
|
+
c.isRendering = !0, ue++;
|
|
1949
1570
|
try {
|
|
1950
|
-
c.forceUpdate = d, c.updateProps(
|
|
1571
|
+
c.forceUpdate = d, c.updateProps(i);
|
|
1951
1572
|
const h = c.rendering.get();
|
|
1952
1573
|
return c.rendered = !0, h;
|
|
1953
1574
|
} finally {
|
|
1954
|
-
c.isRendering = !1,
|
|
1575
|
+
c.isRendering = !1, ue--;
|
|
1955
1576
|
}
|
|
1956
1577
|
};
|
|
1957
|
-
return
|
|
1958
|
-
}
|
|
1959
|
-
|
|
1960
|
-
function
|
|
1961
|
-
return
|
|
1962
|
-
const n =
|
|
1963
|
-
return (
|
|
1964
|
-
const
|
|
1965
|
-
return e(
|
|
1578
|
+
return o.displayName = r, o;
|
|
1579
|
+
}
|
|
1580
|
+
xe("ObsView", (r) => (e) => r.read(e).children(e));
|
|
1581
|
+
function I(r, e) {
|
|
1582
|
+
return xe("view", (t) => {
|
|
1583
|
+
const n = K(r, (s, o) => s.create((i) => t.read(i)[o], void 0));
|
|
1584
|
+
return (s) => {
|
|
1585
|
+
const o = K(n, (i) => i.read(s));
|
|
1586
|
+
return e(s, o);
|
|
1966
1587
|
};
|
|
1967
1588
|
});
|
|
1968
1589
|
}
|
|
1969
|
-
function
|
|
1590
|
+
function pr(r) {
|
|
1970
1591
|
const e = [];
|
|
1971
|
-
for (const t of Object.values(
|
|
1592
|
+
for (const t of Object.values(r)) {
|
|
1972
1593
|
const n = t._requiredContext;
|
|
1973
1594
|
n && !e.includes(n) && e.push(n);
|
|
1974
1595
|
}
|
|
1975
1596
|
return e;
|
|
1976
1597
|
}
|
|
1977
|
-
function
|
|
1978
|
-
const n = typeof e == "function" ? {} : e,
|
|
1979
|
-
return
|
|
1980
|
-
const _ =
|
|
1981
|
-
} } :
|
|
1982
|
-
const
|
|
1983
|
-
return new
|
|
1984
|
-
}),
|
|
1598
|
+
function E(r, e, t) {
|
|
1599
|
+
const n = typeof e == "function" ? {} : e, s = typeof e == "function" ? e : t, o = "_props" in r ? r._props : {}, i = pr({ ...o, ...n }), d = lr(r), c = [...i, d];
|
|
1600
|
+
return xe("viewWithModel", (h, g) => {
|
|
1601
|
+
const _ = g(), C = _.get(d), m = "_props" in r ? K(r._props, (S, B) => S.create((A) => h.read(A)[B], _.get(S._requiredContext))) : {}, v = C ? { read: () => C, dispose: () => {
|
|
1602
|
+
} } : Pt((S) => {
|
|
1603
|
+
const B = K(m, (A) => A.read(S));
|
|
1604
|
+
return new r(B);
|
|
1605
|
+
}), O = K(n, (S, B) => S.create((A) => h.read(A)[B], _.get(S._requiredContext)));
|
|
1985
1606
|
return (S) => {
|
|
1986
|
-
const
|
|
1987
|
-
return
|
|
1607
|
+
const B = v.read(S), A = K(O, (gt) => gt.read(S));
|
|
1608
|
+
return s(S, B, A);
|
|
1988
1609
|
};
|
|
1989
1610
|
}, c.length > 0 ? c : void 0);
|
|
1990
1611
|
}
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
function
|
|
1612
|
+
I({ value: u.obs() }, (r, e) => e.value.read(r));
|
|
1613
|
+
Ue(null);
|
|
1614
|
+
function st(r) {
|
|
1994
1615
|
var e;
|
|
1995
1616
|
return {
|
|
1996
|
-
id:
|
|
1997
|
-
name:
|
|
1998
|
-
type:
|
|
1999
|
-
children: (e =
|
|
2000
|
-
component:
|
|
1617
|
+
id: r.id,
|
|
1618
|
+
name: r.name,
|
|
1619
|
+
type: r.type,
|
|
1620
|
+
children: (e = r.children) == null ? void 0 : e.map(st),
|
|
1621
|
+
component: r.component
|
|
2001
1622
|
};
|
|
2002
1623
|
}
|
|
2003
|
-
function
|
|
1624
|
+
function Q(r, e) {
|
|
2004
1625
|
const {
|
|
2005
1626
|
storageKey: t,
|
|
2006
1627
|
defaultValue: n,
|
|
2007
|
-
serialize:
|
|
2008
|
-
deserialize:
|
|
1628
|
+
serialize: s = JSON.stringify,
|
|
1629
|
+
deserialize: o = JSON.parse
|
|
2009
1630
|
} = e;
|
|
2010
|
-
let
|
|
1631
|
+
let i = n;
|
|
2011
1632
|
try {
|
|
2012
1633
|
const h = localStorage.getItem(t);
|
|
2013
|
-
h !== null && (
|
|
1634
|
+
h !== null && (i = o(h));
|
|
2014
1635
|
} catch {
|
|
2015
1636
|
}
|
|
2016
|
-
const d = x(
|
|
2017
|
-
return d.set = (h,
|
|
1637
|
+
const d = x(r, i), c = d.set.bind(d);
|
|
1638
|
+
return d.set = (h, g) => {
|
|
2018
1639
|
try {
|
|
2019
|
-
localStorage.setItem(t,
|
|
1640
|
+
localStorage.setItem(t, s(h));
|
|
2020
1641
|
} catch {
|
|
2021
1642
|
}
|
|
2022
|
-
c(h,
|
|
1643
|
+
c(h, g);
|
|
2023
1644
|
}, d;
|
|
2024
1645
|
}
|
|
2025
|
-
class
|
|
1646
|
+
class gr extends F({
|
|
2026
1647
|
registry: u.const(),
|
|
2027
1648
|
daemonModel: u.const(),
|
|
2028
1649
|
reportModel: u.const()
|
|
2029
1650
|
}) {
|
|
2030
1651
|
constructor() {
|
|
2031
1652
|
super(...arguments);
|
|
2032
|
-
l(this, "leftSidebarVisible",
|
|
1653
|
+
l(this, "leftSidebarVisible", Q(this, {
|
|
2033
1654
|
storageKey: "component-explorer:leftSidebarVisible",
|
|
2034
1655
|
defaultValue: !0
|
|
2035
1656
|
}));
|
|
2036
|
-
l(this, "rightSidebarVisible",
|
|
1657
|
+
l(this, "rightSidebarVisible", Q(this, {
|
|
2037
1658
|
storageKey: "component-explorer:rightSidebarVisible",
|
|
2038
1659
|
defaultValue: !1
|
|
2039
1660
|
}));
|
|
2040
|
-
l(this, "isDarkTheme",
|
|
1661
|
+
l(this, "isDarkTheme", Q(this, {
|
|
2041
1662
|
storageKey: "component-explorer:isDarkTheme",
|
|
2042
1663
|
defaultValue: !0
|
|
2043
1664
|
}));
|
|
2044
|
-
l(this, "selectedNodeId",
|
|
1665
|
+
l(this, "selectedNodeId", Q(this, {
|
|
2045
1666
|
storageKey: "component-explorer:selectedNodeId",
|
|
2046
1667
|
defaultValue: void 0
|
|
2047
1668
|
}));
|
|
2048
1669
|
l(this, "expandedNodeIds", x(this, /* @__PURE__ */ new Set([""])));
|
|
2049
|
-
l(this, "viewMode",
|
|
1670
|
+
l(this, "viewMode", Q(this, {
|
|
2050
1671
|
storageKey: "component-explorer:viewMode",
|
|
2051
1672
|
defaultValue: "session"
|
|
2052
1673
|
}));
|
|
2053
1674
|
/** The explorer's tree derived from the registry or report */
|
|
2054
|
-
l(this, "tree",
|
|
1675
|
+
l(this, "tree", N(this, (t) => {
|
|
2055
1676
|
const n = this.props.reportModel;
|
|
2056
1677
|
if (n)
|
|
2057
1678
|
return n.buildTree(t);
|
|
2058
|
-
const
|
|
2059
|
-
return
|
|
1679
|
+
const s = this.props.registry.root.read(t);
|
|
1680
|
+
return st(s);
|
|
2060
1681
|
}));
|
|
2061
|
-
l(this, "selectedNode",
|
|
1682
|
+
l(this, "selectedNode", N(this, (t) => {
|
|
2062
1683
|
const n = this.selectedNodeId.read(t);
|
|
2063
1684
|
if (n === void 0) return;
|
|
2064
|
-
const
|
|
2065
|
-
return
|
|
1685
|
+
const s = this.tree.read(t);
|
|
1686
|
+
return s.id === n ? s : this._findNode(s.children ?? [], n);
|
|
2066
1687
|
}));
|
|
2067
1688
|
/** List of preview rows to render based on current selection and view mode */
|
|
2068
|
-
l(this, "selectedFixtures",
|
|
1689
|
+
l(this, "selectedFixtures", N(this, (t) => {
|
|
2069
1690
|
const n = this.selectedNode.read(t);
|
|
2070
|
-
return n ? this.isReportMode ? (this.props.reportModel.state.read(t), this._collectReportRows(n, n.name)) : this.viewMode.read(t) === "diff" && this.daemonAvailable ? this._collectDiffRows(n, n.name) : this._collectPreviewRows(n, n.name) : [];
|
|
1691
|
+
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) : [];
|
|
2071
1692
|
}));
|
|
2072
1693
|
l(this, "setViewMode", (t) => {
|
|
2073
1694
|
this.viewMode.set(t, void 0);
|
|
@@ -2075,8 +1696,8 @@ class Sn extends z({
|
|
|
2075
1696
|
l(this, "navigateToSession", (t) => {
|
|
2076
1697
|
const n = this.props.daemonModel;
|
|
2077
1698
|
if (!n) return;
|
|
2078
|
-
const
|
|
2079
|
-
|
|
1699
|
+
const s = n.getSessionExplorerUrl(t);
|
|
1700
|
+
s && (window.location.href = s);
|
|
2080
1701
|
});
|
|
2081
1702
|
l(this, "toggleLeftSidebar", () => {
|
|
2082
1703
|
this.leftSidebarVisible.set(!this.leftSidebarVisible.get(), void 0);
|
|
@@ -2091,8 +1712,8 @@ class Sn extends z({
|
|
|
2091
1712
|
this.selectedNodeId.set(t, void 0);
|
|
2092
1713
|
});
|
|
2093
1714
|
l(this, "toggleNodeExpanded", (t) => {
|
|
2094
|
-
const n = this.expandedNodeIds.get(),
|
|
2095
|
-
|
|
1715
|
+
const n = this.expandedNodeIds.get(), s = new Set(n);
|
|
1716
|
+
s.has(t) ? s.delete(t) : s.add(t), this.expandedNodeIds.set(s, void 0);
|
|
2096
1717
|
});
|
|
2097
1718
|
}
|
|
2098
1719
|
get daemonAvailable() {
|
|
@@ -2111,11 +1732,11 @@ class Sn extends z({
|
|
|
2111
1732
|
return this.expandedNodeIds.read(n).has(t);
|
|
2112
1733
|
}
|
|
2113
1734
|
_findNode(t, n) {
|
|
2114
|
-
for (const
|
|
2115
|
-
if (
|
|
2116
|
-
if (
|
|
2117
|
-
const
|
|
2118
|
-
if (
|
|
1735
|
+
for (const s of t) {
|
|
1736
|
+
if (s.id === n) return s;
|
|
1737
|
+
if (s.children) {
|
|
1738
|
+
const o = this._findNode(s.children, n);
|
|
1739
|
+
if (o) return o;
|
|
2119
1740
|
}
|
|
2120
1741
|
}
|
|
2121
1742
|
}
|
|
@@ -2131,28 +1752,28 @@ class Sn extends z({
|
|
|
2131
1752
|
}
|
|
2132
1753
|
}];
|
|
2133
1754
|
if (t.type === "variants") {
|
|
2134
|
-
const
|
|
2135
|
-
for (const
|
|
2136
|
-
|
|
2137
|
-
id:
|
|
2138
|
-
name:
|
|
2139
|
-
path: `${n} / ${
|
|
2140
|
-
component:
|
|
1755
|
+
const o = [];
|
|
1756
|
+
for (const i of t.children ?? [])
|
|
1757
|
+
i.type === "component" && i.component && o.push({
|
|
1758
|
+
id: i.id,
|
|
1759
|
+
name: i.name,
|
|
1760
|
+
path: `${n} / ${i.name}`,
|
|
1761
|
+
component: i.component
|
|
2141
1762
|
});
|
|
2142
|
-
return
|
|
1763
|
+
return o.length > 0 ? [{
|
|
2143
1764
|
type: "variants",
|
|
2144
1765
|
id: t.id,
|
|
2145
1766
|
name: t.name,
|
|
2146
1767
|
path: n,
|
|
2147
|
-
fixtures:
|
|
1768
|
+
fixtures: o
|
|
2148
1769
|
}] : [];
|
|
2149
1770
|
}
|
|
2150
|
-
const
|
|
2151
|
-
for (const
|
|
2152
|
-
const
|
|
2153
|
-
|
|
1771
|
+
const s = [];
|
|
1772
|
+
for (const o of t.children ?? []) {
|
|
1773
|
+
const i = n ? `${n} / ${o.name}` : o.name;
|
|
1774
|
+
s.push(...this._collectPreviewRows(o, i));
|
|
2154
1775
|
}
|
|
2155
|
-
return
|
|
1776
|
+
return s;
|
|
2156
1777
|
}
|
|
2157
1778
|
/**
|
|
2158
1779
|
* In diff mode: fixtures become screenshot comparison items showing current vs baseline.
|
|
@@ -2172,34 +1793,34 @@ class Sn extends z({
|
|
|
2172
1793
|
}]
|
|
2173
1794
|
}];
|
|
2174
1795
|
if (t.type === "variants") {
|
|
2175
|
-
const
|
|
2176
|
-
for (const
|
|
2177
|
-
|
|
2178
|
-
fixtureId:
|
|
2179
|
-
name:
|
|
2180
|
-
path: `${n} / ${
|
|
1796
|
+
const o = [];
|
|
1797
|
+
for (const i of t.children ?? [])
|
|
1798
|
+
i.type === "component" && o.push({
|
|
1799
|
+
fixtureId: i.id,
|
|
1800
|
+
name: i.name,
|
|
1801
|
+
path: `${n} / ${i.name}`
|
|
2181
1802
|
});
|
|
2182
|
-
return
|
|
1803
|
+
return o.length > 0 ? [{
|
|
2183
1804
|
type: "screenshot-comparison",
|
|
2184
1805
|
id: t.id,
|
|
2185
1806
|
name: t.name,
|
|
2186
1807
|
path: n,
|
|
2187
|
-
items:
|
|
1808
|
+
items: o
|
|
2188
1809
|
}] : [];
|
|
2189
1810
|
}
|
|
2190
|
-
const
|
|
2191
|
-
for (const
|
|
2192
|
-
const
|
|
2193
|
-
|
|
1811
|
+
const s = [];
|
|
1812
|
+
for (const o of t.children ?? []) {
|
|
1813
|
+
const i = n ? `${n} / ${o.name}` : o.name;
|
|
1814
|
+
s.push(...this._collectDiffRows(o, i));
|
|
2194
1815
|
}
|
|
2195
|
-
return
|
|
1816
|
+
return s;
|
|
2196
1817
|
}
|
|
2197
1818
|
_collectReportRows(t, n) {
|
|
2198
|
-
const
|
|
2199
|
-
if (
|
|
2200
|
-
const
|
|
1819
|
+
const s = this.props.reportModel.state.get();
|
|
1820
|
+
if (s.status !== "ready") return [];
|
|
1821
|
+
const o = s.report.fixtures;
|
|
2201
1822
|
if (t.type === "component") {
|
|
2202
|
-
const d =
|
|
1823
|
+
const d = o[t.id];
|
|
2203
1824
|
return d ? [{
|
|
2204
1825
|
type: "report-comparison",
|
|
2205
1826
|
id: t.id,
|
|
@@ -2213,12 +1834,12 @@ class Sn extends z({
|
|
|
2213
1834
|
}]
|
|
2214
1835
|
}] : [];
|
|
2215
1836
|
}
|
|
2216
|
-
const
|
|
1837
|
+
const i = [];
|
|
2217
1838
|
for (const d of t.children ?? []) {
|
|
2218
1839
|
const c = n ? `${n} / ${d.name}` : d.name;
|
|
2219
|
-
|
|
1840
|
+
i.push(...this._collectReportRows(d, c));
|
|
2220
1841
|
}
|
|
2221
|
-
return
|
|
1842
|
+
return i;
|
|
2222
1843
|
}
|
|
2223
1844
|
}
|
|
2224
1845
|
const p = {
|
|
@@ -2410,10 +2031,10 @@ const p = {
|
|
|
2410
2031
|
cursor: "pointer"
|
|
2411
2032
|
}
|
|
2412
2033
|
};
|
|
2413
|
-
function
|
|
2414
|
-
return Object.assign({}, ...
|
|
2034
|
+
function Ce(...r) {
|
|
2035
|
+
return Object.assign({}, ...r.filter(Boolean));
|
|
2415
2036
|
}
|
|
2416
|
-
class
|
|
2037
|
+
class mr extends F({
|
|
2417
2038
|
active: u()
|
|
2418
2039
|
}) {
|
|
2419
2040
|
constructor() {
|
|
@@ -2427,23 +2048,23 @@ class wn extends z({
|
|
|
2427
2048
|
return this.props.active;
|
|
2428
2049
|
}
|
|
2429
2050
|
}
|
|
2430
|
-
const
|
|
2431
|
-
|
|
2051
|
+
const se = E(
|
|
2052
|
+
mr,
|
|
2432
2053
|
{
|
|
2433
2054
|
onClick: u.const(),
|
|
2434
2055
|
title: u.const(),
|
|
2435
2056
|
children: u.const()
|
|
2436
2057
|
},
|
|
2437
|
-
(
|
|
2438
|
-
const n = e.isHovered.read(
|
|
2058
|
+
(r, e, t) => {
|
|
2059
|
+
const n = e.isHovered.read(r), s = e.active.read(r), o = Ce(
|
|
2439
2060
|
p.titleBarButton,
|
|
2440
|
-
n && !
|
|
2441
|
-
|
|
2061
|
+
n && !s && p.titleBarButtonHover,
|
|
2062
|
+
s && p.titleBarButtonActive
|
|
2442
2063
|
);
|
|
2443
2064
|
return /* @__PURE__ */ a(
|
|
2444
2065
|
"button",
|
|
2445
2066
|
{
|
|
2446
|
-
style:
|
|
2067
|
+
style: o,
|
|
2447
2068
|
onClick: t.onClick,
|
|
2448
2069
|
title: t.title,
|
|
2449
2070
|
onMouseEnter: () => e.setHovered(!0),
|
|
@@ -2452,20 +2073,20 @@ const ce = $(
|
|
|
2452
2073
|
}
|
|
2453
2074
|
);
|
|
2454
2075
|
}
|
|
2455
|
-
),
|
|
2076
|
+
), vr = ({ 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" }) }), _r = ({ 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)" }) }), br = ({ 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" }) }), yr = ({ 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" }) }), xr = () => /* @__PURE__ */ a("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "currentColor", children: /* @__PURE__ */ a("path", { d: "M2 2v12h12V2H2zm11 11H6V3h7v10zM3 3h2v10H3V3z" }) }), Cr = () => /* @__PURE__ */ a("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "currentColor", children: /* @__PURE__ */ a("path", { d: "M2 2v12h12V2H2zm6 11V3h5v10H8zM3 3h4v10H3V3z" }) }), Sr = () => /* @__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" }) }), wr = () => /* @__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" }) }), Rr = I(
|
|
2456
2077
|
{ model: u.const() },
|
|
2457
|
-
(
|
|
2078
|
+
(r, e) => {
|
|
2458
2079
|
var d, c;
|
|
2459
|
-
const t = e.model, n = t.viewMode.read(
|
|
2460
|
-
return /* @__PURE__ */ f("div", { style:
|
|
2461
|
-
/* @__PURE__ */ f("div", { style:
|
|
2462
|
-
/* @__PURE__ */ a(
|
|
2463
|
-
/* @__PURE__ */ a(
|
|
2080
|
+
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((h) => h.name !== o);
|
|
2081
|
+
return s.length <= 1 ? null : /* @__PURE__ */ f("div", { style: J.container, children: [
|
|
2082
|
+
/* @__PURE__ */ f("div", { style: J.segmentedControl, children: [
|
|
2083
|
+
/* @__PURE__ */ a(Ee, { label: "Live", mode: "session", active: n === "session", onClick: () => t.setViewMode("session") }),
|
|
2084
|
+
/* @__PURE__ */ a(Ee, { label: "Diff", mode: "diff", active: n === "diff", onClick: () => t.setViewMode("diff") })
|
|
2464
2085
|
] }),
|
|
2465
|
-
|
|
2086
|
+
i.length > 0 && /* @__PURE__ */ a("div", { style: J.sessionLinks, children: i.map((h) => /* @__PURE__ */ f(
|
|
2466
2087
|
"button",
|
|
2467
2088
|
{
|
|
2468
|
-
style:
|
|
2089
|
+
style: J.sessionLink,
|
|
2469
2090
|
onClick: () => t.navigateToSession(h.name),
|
|
2470
2091
|
title: `Switch to ${h.name} session`,
|
|
2471
2092
|
children: [
|
|
@@ -2478,63 +2099,63 @@ const ce = $(
|
|
|
2478
2099
|
] });
|
|
2479
2100
|
}
|
|
2480
2101
|
);
|
|
2481
|
-
function
|
|
2102
|
+
function Ee({ label: r, mode: e, active: t, onClick: n }) {
|
|
2482
2103
|
return /* @__PURE__ */ a(
|
|
2483
2104
|
"button",
|
|
2484
2105
|
{
|
|
2485
|
-
style: t ?
|
|
2106
|
+
style: t ? J.segmentActive : J.segment,
|
|
2486
2107
|
onClick: n,
|
|
2487
|
-
children:
|
|
2108
|
+
children: r
|
|
2488
2109
|
}
|
|
2489
2110
|
);
|
|
2490
2111
|
}
|
|
2491
|
-
const
|
|
2112
|
+
const Tr = I(
|
|
2492
2113
|
{
|
|
2493
2114
|
model: u.const()
|
|
2494
2115
|
},
|
|
2495
|
-
(
|
|
2496
|
-
const t = e.model, n = t.leftSidebarVisible.read(
|
|
2116
|
+
(r, e) => {
|
|
2117
|
+
const t = e.model, n = t.leftSidebarVisible.read(r), s = t.rightSidebarVisible.read(r), o = t.isDarkTheme.read(r), i = t.selectedNode.read(r);
|
|
2497
2118
|
return /* @__PURE__ */ f("div", { style: p.titleBar, children: [
|
|
2498
2119
|
/* @__PURE__ */ a("div", { style: p.titleBarSection, children: /* @__PURE__ */ a(
|
|
2499
|
-
|
|
2120
|
+
se,
|
|
2500
2121
|
{
|
|
2501
2122
|
active: n,
|
|
2502
2123
|
onClick: t.toggleLeftSidebar,
|
|
2503
2124
|
title: "Toggle left sidebar",
|
|
2504
|
-
children: /* @__PURE__ */ a(
|
|
2125
|
+
children: /* @__PURE__ */ a(xr, {})
|
|
2505
2126
|
}
|
|
2506
2127
|
) }),
|
|
2507
2128
|
/* @__PURE__ */ f("div", { style: p.titleBarCenter, children: [
|
|
2508
|
-
t.isReportMode ? /* @__PURE__ */ a("span", { style: { fontSize: 12, color: "var(--vscode-descriptionForeground)" }, children: "Screenshot Report" }) : t.daemonAvailable ? /* @__PURE__ */ a(
|
|
2509
|
-
|
|
2129
|
+
t.isReportMode ? /* @__PURE__ */ a("span", { style: { fontSize: 12, color: "var(--vscode-descriptionForeground)" }, children: "Screenshot Report" }) : t.daemonAvailable ? /* @__PURE__ */ a(Rr, { model: t }) : null,
|
|
2130
|
+
i ? /* @__PURE__ */ f(pe, { children: [
|
|
2510
2131
|
/* @__PURE__ */ a("span", { style: { color: "var(--vscode-textLink-foreground)" }, children: "<" }),
|
|
2511
|
-
/* @__PURE__ */ a("span", { children:
|
|
2132
|
+
/* @__PURE__ */ a("span", { children: i.name }),
|
|
2512
2133
|
/* @__PURE__ */ a("span", { style: { color: "var(--vscode-textLink-foreground)" }, children: "/>" })
|
|
2513
2134
|
] }) : /* @__PURE__ */ a("span", { style: { color: "var(--vscode-descriptionForeground)" }, children: "No component selected" })
|
|
2514
2135
|
] }),
|
|
2515
2136
|
/* @__PURE__ */ f("div", { style: p.titleBarSection, children: [
|
|
2516
2137
|
/* @__PURE__ */ a(
|
|
2517
|
-
|
|
2138
|
+
se,
|
|
2518
2139
|
{
|
|
2519
2140
|
active: !1,
|
|
2520
2141
|
onClick: t.toggleTheme,
|
|
2521
|
-
title:
|
|
2522
|
-
children:
|
|
2142
|
+
title: o ? "Switch to light theme" : "Switch to dark theme",
|
|
2143
|
+
children: o ? /* @__PURE__ */ a(Sr, {}) : /* @__PURE__ */ a(wr, {})
|
|
2523
2144
|
}
|
|
2524
2145
|
),
|
|
2525
2146
|
/* @__PURE__ */ a(
|
|
2526
|
-
|
|
2147
|
+
se,
|
|
2527
2148
|
{
|
|
2528
|
-
active:
|
|
2149
|
+
active: s,
|
|
2529
2150
|
onClick: t.toggleRightSidebar,
|
|
2530
2151
|
title: "Toggle right sidebar",
|
|
2531
|
-
children: /* @__PURE__ */ a(
|
|
2152
|
+
children: /* @__PURE__ */ a(Cr, {})
|
|
2532
2153
|
}
|
|
2533
2154
|
)
|
|
2534
2155
|
] })
|
|
2535
2156
|
] });
|
|
2536
2157
|
}
|
|
2537
|
-
),
|
|
2158
|
+
), J = {
|
|
2538
2159
|
container: {
|
|
2539
2160
|
display: "flex",
|
|
2540
2161
|
alignItems: "center",
|
|
@@ -2578,15 +2199,15 @@ const Fn = k(
|
|
|
2578
2199
|
color: "var(--vscode-textLink-foreground)",
|
|
2579
2200
|
cursor: "pointer"
|
|
2580
2201
|
}
|
|
2581
|
-
},
|
|
2202
|
+
}, ot = I(
|
|
2582
2203
|
{
|
|
2583
2204
|
model: u.const(),
|
|
2584
2205
|
nodes: u.const(),
|
|
2585
2206
|
depth: u.const()
|
|
2586
2207
|
},
|
|
2587
|
-
(
|
|
2208
|
+
(r, e) => /* @__PURE__ */ a(pe, { children: e.nodes.map((t) => /* @__PURE__ */ a(Or, { model: e.model, node: t, depth: e.depth }, t.id)) })
|
|
2588
2209
|
);
|
|
2589
|
-
class
|
|
2210
|
+
class Ir extends F({
|
|
2590
2211
|
model: u.const(),
|
|
2591
2212
|
node: u.const(),
|
|
2592
2213
|
depth: u.const()
|
|
@@ -2621,45 +2242,45 @@ class En extends z({
|
|
|
2621
2242
|
return !!(this.props.node.children && this.props.node.children.length > 0);
|
|
2622
2243
|
}
|
|
2623
2244
|
}
|
|
2624
|
-
const
|
|
2625
|
-
const t = e.explorerModel, n = e.treeNode,
|
|
2245
|
+
const Or = E(Ir, {}, (r, e) => {
|
|
2246
|
+
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, h = e.isHovered.read(r), g = Ce(
|
|
2626
2247
|
p.treeItem,
|
|
2627
|
-
{ paddingLeft: `${8 +
|
|
2248
|
+
{ paddingLeft: `${8 + s * 12}px` },
|
|
2628
2249
|
c && p.treeItemSelected,
|
|
2629
2250
|
!c && h && p.treeItemHover
|
|
2630
2251
|
);
|
|
2631
|
-
return /* @__PURE__ */ f(
|
|
2252
|
+
return /* @__PURE__ */ f(pe, { children: [
|
|
2632
2253
|
/* @__PURE__ */ f(
|
|
2633
2254
|
"div",
|
|
2634
2255
|
{
|
|
2635
|
-
style:
|
|
2256
|
+
style: g,
|
|
2636
2257
|
onClick: e.handleClick,
|
|
2637
2258
|
onDoubleClick: e.handleDoubleClick,
|
|
2638
2259
|
onMouseEnter: () => e.setHovered(!0),
|
|
2639
2260
|
onMouseLeave: () => e.setHovered(!1),
|
|
2640
2261
|
children: [
|
|
2641
|
-
|
|
2642
|
-
/* @__PURE__ */ a("div", { style: p.treeItemIcon, children: n.type === "folder" ? /* @__PURE__ */ a(
|
|
2262
|
+
o ? /* @__PURE__ */ a("div", { style: p.treeItemChevron, onClick: e.handleChevronClick, children: i ? /* @__PURE__ */ a(_r, {}) : /* @__PURE__ */ a(vr, {}) }) : /* @__PURE__ */ a("div", { style: p.treeItemChevronPlaceholder }),
|
|
2263
|
+
/* @__PURE__ */ a("div", { style: p.treeItemIcon, children: n.type === "folder" ? /* @__PURE__ */ a(yr, { style: { color: "var(--vscode-symbolIcon-folderForeground)" } }) : /* @__PURE__ */ a(br, { style: { color: "#deb45b" } }) }),
|
|
2643
2264
|
/* @__PURE__ */ a("span", { style: p.treeItemLabel, children: n.name }),
|
|
2644
|
-
|
|
2265
|
+
o && /* @__PURE__ */ a("span", { style: p.treeItemCount, children: n.children.length })
|
|
2645
2266
|
]
|
|
2646
2267
|
}
|
|
2647
2268
|
),
|
|
2648
|
-
|
|
2269
|
+
o && i && /* @__PURE__ */ a(ot, { model: t, nodes: n.children, depth: s + 1 })
|
|
2649
2270
|
] });
|
|
2650
|
-
}),
|
|
2271
|
+
}), kr = I(
|
|
2651
2272
|
{
|
|
2652
2273
|
model: u.const()
|
|
2653
2274
|
},
|
|
2654
|
-
(
|
|
2655
|
-
const t = e.model.tree.read(
|
|
2275
|
+
(r, e) => {
|
|
2276
|
+
const t = e.model.tree.read(r);
|
|
2656
2277
|
return /* @__PURE__ */ f("div", { style: p.sidebar, children: [
|
|
2657
2278
|
/* @__PURE__ */ a("div", { style: p.sidebarHeader, children: "Explorer" }),
|
|
2658
|
-
/* @__PURE__ */ a("div", { style: p.sidebarContent, children: /* @__PURE__ */ a(
|
|
2279
|
+
/* @__PURE__ */ a("div", { style: p.sidebarContent, children: /* @__PURE__ */ a(ot, { model: e.model, nodes: [t], depth: 0 }) })
|
|
2659
2280
|
] });
|
|
2660
2281
|
}
|
|
2661
2282
|
);
|
|
2662
|
-
class
|
|
2283
|
+
class Vr extends F({}) {
|
|
2663
2284
|
constructor() {
|
|
2664
2285
|
super(...arguments);
|
|
2665
2286
|
l(this, "checked", x(this, !1));
|
|
@@ -2668,8 +2289,8 @@ class zn extends z({}) {
|
|
|
2668
2289
|
});
|
|
2669
2290
|
}
|
|
2670
2291
|
}
|
|
2671
|
-
const
|
|
2672
|
-
const t = e.checked.read(
|
|
2292
|
+
const Nr = E(Vr, {}, (r, e) => {
|
|
2293
|
+
const t = e.checked.read(r), n = {
|
|
2673
2294
|
position: "relative",
|
|
2674
2295
|
width: "36px",
|
|
2675
2296
|
height: "18px",
|
|
@@ -2678,7 +2299,7 @@ const $n = $(zn, {}, (s, e) => {
|
|
|
2678
2299
|
cursor: "pointer",
|
|
2679
2300
|
transition: "background-color 0.2s",
|
|
2680
2301
|
border: "1px solid var(--vscode-input-border, transparent)"
|
|
2681
|
-
},
|
|
2302
|
+
}, s = {
|
|
2682
2303
|
position: "absolute",
|
|
2683
2304
|
top: "2px",
|
|
2684
2305
|
left: t ? "18px" : "2px",
|
|
@@ -2688,12 +2309,12 @@ const $n = $(zn, {}, (s, e) => {
|
|
|
2688
2309
|
borderRadius: "50%",
|
|
2689
2310
|
transition: "left 0.2s"
|
|
2690
2311
|
};
|
|
2691
|
-
return /* @__PURE__ */ a("div", { style: n, onClick: e.toggle, children: /* @__PURE__ */ a("div", { style:
|
|
2692
|
-
}),
|
|
2312
|
+
return /* @__PURE__ */ a("div", { style: n, onClick: e.toggle, children: /* @__PURE__ */ a("div", { style: s }) });
|
|
2313
|
+
}), Dr = I(
|
|
2693
2314
|
{
|
|
2694
2315
|
node: u.const()
|
|
2695
2316
|
},
|
|
2696
|
-
(
|
|
2317
|
+
(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__ */ f("div", { style: p.propertiesPanel, children: [
|
|
2697
2318
|
/* @__PURE__ */ f("div", { style: p.propertyRow, children: [
|
|
2698
2319
|
/* @__PURE__ */ f("div", { style: p.propertyLabel, children: [
|
|
2699
2320
|
"children",
|
|
@@ -2740,23 +2361,23 @@ const $n = $(zn, {}, (s, e) => {
|
|
|
2740
2361
|
"disabled",
|
|
2741
2362
|
/* @__PURE__ */ a("span", { style: { color: "var(--vscode-descriptionForeground)" }, children: " : boolean" })
|
|
2742
2363
|
] }),
|
|
2743
|
-
/* @__PURE__ */ a(
|
|
2364
|
+
/* @__PURE__ */ a(Nr, {}),
|
|
2744
2365
|
/* @__PURE__ */ a("div", { style: p.propertyDescription, children: "Disable the button" })
|
|
2745
2366
|
] })
|
|
2746
2367
|
] })
|
|
2747
|
-
),
|
|
2368
|
+
), Mr = I(
|
|
2748
2369
|
{
|
|
2749
2370
|
selectedNode: u.const()
|
|
2750
2371
|
},
|
|
2751
|
-
(
|
|
2372
|
+
(r, e) => /* @__PURE__ */ f("div", { style: Ce(p.sidebar, p.sidebarRight), children: [
|
|
2752
2373
|
/* @__PURE__ */ f("div", { style: p.sidebarHeader, children: [
|
|
2753
2374
|
/* @__PURE__ */ a("span", { style: { marginRight: "6px", color: "var(--vscode-textLink-foreground)" }, children: "</>" }),
|
|
2754
2375
|
"Props"
|
|
2755
2376
|
] }),
|
|
2756
|
-
/* @__PURE__ */ a("div", { style: p.sidebarContent, children: e.selectedNode ? /* @__PURE__ */ a(
|
|
2377
|
+
/* @__PURE__ */ a("div", { style: p.sidebarContent, children: e.selectedNode ? /* @__PURE__ */ a(Dr, { node: e.selectedNode }) : /* @__PURE__ */ a("div", { style: { padding: "12px", color: "var(--vscode-descriptionForeground)", fontSize: "12px" }, children: "Select a component to view its properties" }) })
|
|
2757
2378
|
] })
|
|
2758
2379
|
);
|
|
2759
|
-
class
|
|
2380
|
+
class Fr extends F({
|
|
2760
2381
|
fixture: u.const(),
|
|
2761
2382
|
compact: u.const()
|
|
2762
2383
|
}) {
|
|
@@ -2765,7 +2386,8 @@ class Un extends z({
|
|
|
2765
2386
|
l(this, "_containerRef", null);
|
|
2766
2387
|
l(this, "_shadowRoot", null);
|
|
2767
2388
|
l(this, "_renderContainer", null);
|
|
2768
|
-
l(this, "
|
|
2389
|
+
l(this, "_renderResult", null);
|
|
2390
|
+
l(this, "_abortController", null);
|
|
2769
2391
|
l(this, "_resizeObserver", null);
|
|
2770
2392
|
l(this, "measuredWidth", x(this, void 0));
|
|
2771
2393
|
l(this, "measuredHeight", x(this, void 0));
|
|
@@ -2773,13 +2395,13 @@ class Un extends z({
|
|
|
2773
2395
|
if (t === this._containerRef || (this._cleanup(), this._containerRef = t, !t)) return;
|
|
2774
2396
|
const n = this.fixture.component;
|
|
2775
2397
|
n.isolation === "shadow-dom" ? this._renderInShadowDom(t, n) : this._renderDirect(t, n);
|
|
2776
|
-
const
|
|
2777
|
-
this._resizeObserver = new ResizeObserver((
|
|
2778
|
-
for (const
|
|
2779
|
-
const { width: d, height: c } =
|
|
2398
|
+
const s = this._renderContainer ?? t;
|
|
2399
|
+
this._resizeObserver = new ResizeObserver((o) => {
|
|
2400
|
+
for (const i of o) {
|
|
2401
|
+
const { width: d, height: c } = i.contentRect;
|
|
2780
2402
|
c > 0 && (this.measuredWidth.set(Math.round(d), void 0), this.measuredHeight.set(Math.round(c), void 0));
|
|
2781
2403
|
}
|
|
2782
|
-
}), this._resizeObserver.observe(
|
|
2404
|
+
}), this._resizeObserver.observe(s);
|
|
2783
2405
|
});
|
|
2784
2406
|
}
|
|
2785
2407
|
get fixture() {
|
|
@@ -2796,69 +2418,81 @@ class Un extends z({
|
|
|
2796
2418
|
} else
|
|
2797
2419
|
this._shadowRoot = t.attachShadow({ mode: "open" });
|
|
2798
2420
|
if (n.styles)
|
|
2799
|
-
for (const
|
|
2800
|
-
if (
|
|
2421
|
+
for (const i of n.styles)
|
|
2422
|
+
if (i.type === "css") {
|
|
2801
2423
|
const d = document.createElement("style");
|
|
2802
|
-
d.textContent =
|
|
2803
|
-
} else if (
|
|
2424
|
+
d.textContent = i.content, this._shadowRoot.appendChild(d);
|
|
2425
|
+
} else if (i.type === "url") {
|
|
2804
2426
|
const d = document.createElement("link");
|
|
2805
|
-
d.rel = "stylesheet", d.href =
|
|
2806
|
-
} else
|
|
2427
|
+
d.rel = "stylesheet", d.href = i.href, this._shadowRoot.appendChild(d);
|
|
2428
|
+
} else i.type === "adopted" && (this._shadowRoot.adoptedStyleSheets = [
|
|
2807
2429
|
...this._shadowRoot.adoptedStyleSheets,
|
|
2808
|
-
|
|
2430
|
+
i.sheet
|
|
2809
2431
|
]);
|
|
2810
|
-
const
|
|
2811
|
-
|
|
2812
|
-
const
|
|
2813
|
-
this.
|
|
2432
|
+
const s = document.createElement("div");
|
|
2433
|
+
s.style.display = "inline-block", this._renderContainer = s, this._shadowRoot.appendChild(s);
|
|
2434
|
+
const o = this._getDefaultProps(n);
|
|
2435
|
+
this._abortController = new AbortController(), this._handleRenderReturn(n.render(s, {
|
|
2436
|
+
props: o,
|
|
2437
|
+
signal: this._abortController.signal
|
|
2438
|
+
}));
|
|
2814
2439
|
}
|
|
2815
2440
|
_renderDirect(t, n) {
|
|
2816
2441
|
this._renderContainer = t;
|
|
2817
|
-
const
|
|
2818
|
-
this.
|
|
2442
|
+
const s = this._getDefaultProps(n);
|
|
2443
|
+
this._abortController = new AbortController(), this._handleRenderReturn(n.render(t, {
|
|
2444
|
+
props: s,
|
|
2445
|
+
signal: this._abortController.signal
|
|
2446
|
+
}));
|
|
2447
|
+
}
|
|
2448
|
+
_handleRenderReturn(t) {
|
|
2449
|
+
t instanceof Promise ? t.then((n) => {
|
|
2450
|
+
this._abortController && !this._abortController.signal.aborted && (this._renderResult = n ?? void 0);
|
|
2451
|
+
}).catch(() => {
|
|
2452
|
+
}) : this._renderResult = t ?? void 0;
|
|
2819
2453
|
}
|
|
2820
2454
|
_getDefaultProps(t) {
|
|
2821
2455
|
const n = {};
|
|
2822
|
-
for (const
|
|
2823
|
-
n[
|
|
2456
|
+
for (const s of t.properties)
|
|
2457
|
+
n[s.name] = s.defaultValue;
|
|
2824
2458
|
return n;
|
|
2825
2459
|
}
|
|
2826
2460
|
_cleanup() {
|
|
2827
|
-
var t;
|
|
2828
|
-
this.
|
|
2461
|
+
var t, n;
|
|
2462
|
+
this._abortController && (this._abortController.abort(), this._abortController = null), (t = this._renderResult) != null && t.dispose && this._renderResult.dispose(), this._renderResult = null, (n = this._resizeObserver) == null || n.disconnect(), this._resizeObserver = null, this._shadowRoot = null, this._renderContainer = null;
|
|
2829
2463
|
}
|
|
2830
2464
|
dispose() {
|
|
2831
2465
|
this._cleanup();
|
|
2832
2466
|
}
|
|
2833
2467
|
}
|
|
2834
|
-
const
|
|
2835
|
-
|
|
2468
|
+
const it = E(
|
|
2469
|
+
Fr,
|
|
2836
2470
|
{},
|
|
2837
|
-
(
|
|
2838
|
-
const t = e.fixture, n = t.component,
|
|
2471
|
+
(r, e) => {
|
|
2472
|
+
const t = e.fixture, n = t.component, s = n.displayMode, o = e.measuredWidth.read(r), i = e.measuredHeight.read(r), d = e.compact;
|
|
2839
2473
|
let c;
|
|
2840
|
-
if (
|
|
2841
|
-
const
|
|
2474
|
+
if (s.type === "page") {
|
|
2475
|
+
const C = s.viewports[0], m = wt(C);
|
|
2842
2476
|
c = {
|
|
2843
|
-
width:
|
|
2844
|
-
height:
|
|
2477
|
+
width: m.width,
|
|
2478
|
+
height: m.height,
|
|
2845
2479
|
overflow: "auto"
|
|
2846
2480
|
};
|
|
2847
2481
|
} else
|
|
2848
2482
|
c = {
|
|
2849
2483
|
display: "inline-block"
|
|
2850
2484
|
};
|
|
2851
|
-
const h =
|
|
2852
|
-
return /* @__PURE__ */ f("div", { style:
|
|
2853
|
-
/* @__PURE__ */ f("div", { style:
|
|
2485
|
+
const h = o && i ? `${o} × ${i}` : "", g = d ? G.wrapperCompact : G.wrapper, _ = d ? G.nameCompact : G.name;
|
|
2486
|
+
return /* @__PURE__ */ f("div", { style: g, children: [
|
|
2487
|
+
/* @__PURE__ */ f("div", { style: G.labelRow, children: [
|
|
2854
2488
|
/* @__PURE__ */ a("span", { style: _, children: t.name }),
|
|
2855
|
-
!d && h && /* @__PURE__ */ a("span", { style:
|
|
2489
|
+
!d && h && /* @__PURE__ */ a("span", { style: G.dimensions, children: h })
|
|
2856
2490
|
] }),
|
|
2857
|
-
/* @__PURE__ */ a("div", { style:
|
|
2491
|
+
/* @__PURE__ */ a("div", { style: zr(n.background), children: /* @__PURE__ */ a("div", { ref: e.setContainerRef, style: c }) })
|
|
2858
2492
|
] });
|
|
2859
2493
|
}
|
|
2860
|
-
),
|
|
2861
|
-
function
|
|
2494
|
+
), W = 8;
|
|
2495
|
+
function at(r, e) {
|
|
2862
2496
|
return `
|
|
2863
2497
|
linear-gradient(45deg, ${e} 25%, transparent 25%),
|
|
2864
2498
|
linear-gradient(-45deg, ${e} 25%, transparent 25%),
|
|
@@ -2866,29 +2500,29 @@ function pt(s, e) {
|
|
|
2866
2500
|
linear-gradient(-45deg, transparent 75%, ${e} 75%)
|
|
2867
2501
|
`;
|
|
2868
2502
|
}
|
|
2869
|
-
const
|
|
2503
|
+
const Er = {
|
|
2870
2504
|
backgroundColor: "#ffffff",
|
|
2871
|
-
backgroundImage:
|
|
2872
|
-
},
|
|
2505
|
+
backgroundImage: at("#ffffff", "#e5e5e5")
|
|
2506
|
+
}, Br = {
|
|
2873
2507
|
backgroundColor: "#1e1e1e",
|
|
2874
|
-
backgroundImage:
|
|
2875
|
-
},
|
|
2508
|
+
backgroundImage: at("#1e1e1e", "#2d2d2d")
|
|
2509
|
+
}, Ar = {
|
|
2876
2510
|
display: "inline-block",
|
|
2877
2511
|
padding: "12px",
|
|
2878
2512
|
borderRadius: "4px",
|
|
2879
|
-
backgroundSize: `${
|
|
2880
|
-
backgroundPosition: `0 0, 0 ${
|
|
2513
|
+
backgroundSize: `${W * 2}px ${W * 2}px`,
|
|
2514
|
+
backgroundPosition: `0 0, 0 ${W}px, ${W}px -${W}px, -${W}px 0`,
|
|
2881
2515
|
boxShadow: "0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.08)"
|
|
2882
2516
|
};
|
|
2883
|
-
function
|
|
2884
|
-
const e =
|
|
2517
|
+
function zr(r) {
|
|
2518
|
+
const e = r === "dark" ? Br : Er;
|
|
2885
2519
|
return {
|
|
2886
|
-
...
|
|
2520
|
+
...Ar,
|
|
2887
2521
|
backgroundColor: e.backgroundColor,
|
|
2888
2522
|
backgroundImage: e.backgroundImage
|
|
2889
2523
|
};
|
|
2890
2524
|
}
|
|
2891
|
-
const
|
|
2525
|
+
const G = {
|
|
2892
2526
|
wrapper: {
|
|
2893
2527
|
marginBottom: "32px"
|
|
2894
2528
|
},
|
|
@@ -2917,7 +2551,7 @@ const K = {
|
|
|
2917
2551
|
fontFamily: "var(--vscode-editor-font-family, monospace)"
|
|
2918
2552
|
}
|
|
2919
2553
|
};
|
|
2920
|
-
class
|
|
2554
|
+
class $r extends F({
|
|
2921
2555
|
fixtureId: u.const(),
|
|
2922
2556
|
sessionName: u.const(),
|
|
2923
2557
|
daemon: u.const()
|
|
@@ -2926,7 +2560,7 @@ class qn extends z({
|
|
|
2926
2560
|
super(t);
|
|
2927
2561
|
l(this, "screenshot", x(this, { status: "idle" }));
|
|
2928
2562
|
l(this, "_fetchVersion", 0);
|
|
2929
|
-
this._store.add(
|
|
2563
|
+
this._store.add(Ye((n) => {
|
|
2930
2564
|
this.props.daemon.sourceTreeIds.read(n).get(this.props.sessionName) && this._fetchScreenshot();
|
|
2931
2565
|
}));
|
|
2932
2566
|
}
|
|
@@ -2944,26 +2578,26 @@ class qn extends z({
|
|
|
2944
2578
|
}
|
|
2945
2579
|
}
|
|
2946
2580
|
}
|
|
2947
|
-
const
|
|
2948
|
-
|
|
2581
|
+
const Be = E(
|
|
2582
|
+
$r,
|
|
2949
2583
|
{},
|
|
2950
|
-
(
|
|
2951
|
-
const t = e.screenshot.read(
|
|
2584
|
+
(r, e) => {
|
|
2585
|
+
const t = e.screenshot.read(r);
|
|
2952
2586
|
if (t.status === "idle" || t.status === "loading")
|
|
2953
|
-
return /* @__PURE__ */ a("div", { style:
|
|
2587
|
+
return /* @__PURE__ */ a("div", { style: z.placeholder, children: /* @__PURE__ */ a("div", { style: z.shimmer }) });
|
|
2954
2588
|
if (t.status === "error")
|
|
2955
|
-
return /* @__PURE__ */ a("div", { style:
|
|
2589
|
+
return /* @__PURE__ */ a("div", { style: z.error, children: /* @__PURE__ */ a("span", { style: z.errorText, children: "Screenshot failed" }) });
|
|
2956
2590
|
const { data: n } = t;
|
|
2957
2591
|
return n.image ? /* @__PURE__ */ a(
|
|
2958
2592
|
"img",
|
|
2959
2593
|
{
|
|
2960
2594
|
src: `data:image/png;base64,${n.image}`,
|
|
2961
|
-
style:
|
|
2595
|
+
style: z.image,
|
|
2962
2596
|
alt: `Screenshot of ${e.fixtureId}`
|
|
2963
2597
|
}
|
|
2964
|
-
) : /* @__PURE__ */ a("div", { style:
|
|
2598
|
+
) : /* @__PURE__ */ a("div", { style: z.placeholder, children: /* @__PURE__ */ a("span", { style: z.hashText, children: n.hash.slice(0, 12) }) });
|
|
2965
2599
|
}
|
|
2966
|
-
),
|
|
2600
|
+
), z = {
|
|
2967
2601
|
placeholder: {
|
|
2968
2602
|
minHeight: 80,
|
|
2969
2603
|
display: "flex",
|
|
@@ -3006,7 +2640,7 @@ const Ue = $(
|
|
|
3006
2640
|
border: "1px solid var(--vscode-panel-border)"
|
|
3007
2641
|
}
|
|
3008
2642
|
};
|
|
3009
|
-
class
|
|
2643
|
+
class Lr extends F({
|
|
3010
2644
|
fixtureId: u.const(),
|
|
3011
2645
|
daemon: u.const(),
|
|
3012
2646
|
baselineSession: u.const(),
|
|
@@ -3015,9 +2649,9 @@ class Kn extends z({
|
|
|
3015
2649
|
constructor(t) {
|
|
3016
2650
|
super(t);
|
|
3017
2651
|
l(this, "comparisonStatus", x(this, { status: "loading" }));
|
|
3018
|
-
this._store.add(
|
|
3019
|
-
const
|
|
3020
|
-
|
|
2652
|
+
this._store.add(Ye((n) => {
|
|
2653
|
+
const s = this.props.daemon.sourceTreeIds.read(n), o = s.get(this.props.baselineSession), i = s.get(this.props.currentSession);
|
|
2654
|
+
o && i && this._fetchComparison();
|
|
3021
2655
|
}));
|
|
3022
2656
|
}
|
|
3023
2657
|
get fixtureId() {
|
|
@@ -3046,21 +2680,21 @@ class Kn extends z({
|
|
|
3046
2680
|
}
|
|
3047
2681
|
}
|
|
3048
2682
|
}
|
|
3049
|
-
const
|
|
3050
|
-
|
|
2683
|
+
const Hr = E(
|
|
2684
|
+
Lr,
|
|
3051
2685
|
{},
|
|
3052
|
-
(
|
|
3053
|
-
const t = e.comparisonStatus.read(
|
|
3054
|
-
return /* @__PURE__ */ f("div", { style:
|
|
3055
|
-
/* @__PURE__ */ f("div", { style:
|
|
3056
|
-
/* @__PURE__ */ a("span", { style:
|
|
2686
|
+
(r, e) => {
|
|
2687
|
+
const t = e.comparisonStatus.read(r), n = t.status === "loading" ? /* @__PURE__ */ a("span", { style: w.badgeLoading, children: "comparing..." }) : t.status === "error" ? /* @__PURE__ */ a("span", { style: w.badgeError, children: "error" }) : t.match ? /* @__PURE__ */ a("span", { style: w.badgeMatch, children: "✓ match" }) : /* @__PURE__ */ a("span", { style: w.badgeChanged, children: "● changed" });
|
|
2688
|
+
return /* @__PURE__ */ f("div", { style: w.fixtureRow, children: [
|
|
2689
|
+
/* @__PURE__ */ f("div", { style: w.fixtureLabel, children: [
|
|
2690
|
+
/* @__PURE__ */ a("span", { style: w.fixtureName, children: e.fixtureId }),
|
|
3057
2691
|
n
|
|
3058
2692
|
] }),
|
|
3059
|
-
/* @__PURE__ */ f("div", { style:
|
|
3060
|
-
/* @__PURE__ */ f("div", { style:
|
|
3061
|
-
/* @__PURE__ */ a("span", { style:
|
|
2693
|
+
/* @__PURE__ */ f("div", { style: w.sideBySide, children: [
|
|
2694
|
+
/* @__PURE__ */ f("div", { style: w.screenshotColumn, children: [
|
|
2695
|
+
/* @__PURE__ */ a("span", { style: w.columnLabel, children: "Current" }),
|
|
3062
2696
|
/* @__PURE__ */ a(
|
|
3063
|
-
|
|
2697
|
+
Be,
|
|
3064
2698
|
{
|
|
3065
2699
|
fixtureId: e.fixtureId,
|
|
3066
2700
|
sessionName: e.currentSession,
|
|
@@ -3068,10 +2702,10 @@ const Jn = $(
|
|
|
3068
2702
|
}
|
|
3069
2703
|
)
|
|
3070
2704
|
] }),
|
|
3071
|
-
/* @__PURE__ */ f("div", { style:
|
|
3072
|
-
/* @__PURE__ */ a("span", { style:
|
|
2705
|
+
/* @__PURE__ */ f("div", { style: w.screenshotColumn, children: [
|
|
2706
|
+
/* @__PURE__ */ a("span", { style: w.columnLabel, children: "Baseline" }),
|
|
3073
2707
|
/* @__PURE__ */ a(
|
|
3074
|
-
|
|
2708
|
+
Be,
|
|
3075
2709
|
{
|
|
3076
2710
|
fixtureId: e.fixtureId,
|
|
3077
2711
|
sessionName: e.baselineSession,
|
|
@@ -3082,7 +2716,7 @@ const Jn = $(
|
|
|
3082
2716
|
] })
|
|
3083
2717
|
] });
|
|
3084
2718
|
}
|
|
3085
|
-
),
|
|
2719
|
+
), jr = I(
|
|
3086
2720
|
{
|
|
3087
2721
|
name: u.const(),
|
|
3088
2722
|
path: u.const(),
|
|
@@ -3091,10 +2725,10 @@ const Jn = $(
|
|
|
3091
2725
|
baselineSession: u.const(),
|
|
3092
2726
|
currentSession: u.const()
|
|
3093
2727
|
},
|
|
3094
|
-
(
|
|
3095
|
-
/* @__PURE__ */ a("div", { style:
|
|
3096
|
-
/* @__PURE__ */ a("div", { style:
|
|
3097
|
-
|
|
2728
|
+
(r, e) => /* @__PURE__ */ f("div", { children: [
|
|
2729
|
+
/* @__PURE__ */ a("div", { style: w.groupHeader, children: /* @__PURE__ */ a("span", { style: w.groupTitle, children: e.path }) }),
|
|
2730
|
+
/* @__PURE__ */ a("div", { style: w.groupContent, children: e.items.map((t) => /* @__PURE__ */ a(
|
|
2731
|
+
Hr,
|
|
3098
2732
|
{
|
|
3099
2733
|
fixtureId: t.fixtureId,
|
|
3100
2734
|
daemon: e.daemon,
|
|
@@ -3104,7 +2738,7 @@ const Jn = $(
|
|
|
3104
2738
|
t.fixtureId
|
|
3105
2739
|
)) })
|
|
3106
2740
|
] })
|
|
3107
|
-
),
|
|
2741
|
+
), w = {
|
|
3108
2742
|
groupHeader: {
|
|
3109
2743
|
marginBottom: 12
|
|
3110
2744
|
},
|
|
@@ -3172,8 +2806,8 @@ const Jn = $(
|
|
|
3172
2806
|
color: "var(--vscode-errorForeground)",
|
|
3173
2807
|
fontWeight: 500
|
|
3174
2808
|
}
|
|
3175
|
-
},
|
|
3176
|
-
function
|
|
2809
|
+
}, q = 8;
|
|
2810
|
+
function dt(r, e) {
|
|
3177
2811
|
return `
|
|
3178
2812
|
linear-gradient(45deg, ${e} 25%, transparent 25%),
|
|
3179
2813
|
linear-gradient(-45deg, ${e} 25%, transparent 25%),
|
|
@@ -3181,84 +2815,84 @@ function gt(s, e) {
|
|
|
3181
2815
|
linear-gradient(-45deg, transparent 75%, ${e} 75%)
|
|
3182
2816
|
`;
|
|
3183
2817
|
}
|
|
3184
|
-
const
|
|
2818
|
+
const Ur = {
|
|
3185
2819
|
backgroundColor: "#ffffff",
|
|
3186
|
-
backgroundImage:
|
|
3187
|
-
},
|
|
2820
|
+
backgroundImage: dt("#ffffff", "#e5e5e5")
|
|
2821
|
+
}, Pr = {
|
|
3188
2822
|
backgroundColor: "#1e1e1e",
|
|
3189
|
-
backgroundImage:
|
|
3190
|
-
},
|
|
2823
|
+
backgroundImage: dt("#1e1e1e", "#2d2d2d")
|
|
2824
|
+
}, Wr = {
|
|
3191
2825
|
display: "inline-block",
|
|
3192
2826
|
padding: "12px",
|
|
3193
2827
|
borderRadius: "4px",
|
|
3194
|
-
backgroundSize: `${
|
|
3195
|
-
backgroundPosition: `0 0, 0 ${
|
|
2828
|
+
backgroundSize: `${q * 2}px ${q * 2}px`,
|
|
2829
|
+
backgroundPosition: `0 0, 0 ${q}px, ${q}px -${q}px, -${q}px 0`,
|
|
3196
2830
|
boxShadow: "0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.08)"
|
|
3197
2831
|
};
|
|
3198
|
-
function
|
|
3199
|
-
const e =
|
|
2832
|
+
function Gr(r) {
|
|
2833
|
+
const e = r === "dark" ? Pr : Ur;
|
|
3200
2834
|
return {
|
|
3201
|
-
...
|
|
2835
|
+
...Wr,
|
|
3202
2836
|
backgroundColor: e.backgroundColor,
|
|
3203
2837
|
backgroundImage: e.backgroundImage
|
|
3204
2838
|
};
|
|
3205
2839
|
}
|
|
3206
|
-
function
|
|
3207
|
-
return /* @__PURE__ */ a("div", { style:
|
|
2840
|
+
function Ae({ src: r, alt: e, background: t }) {
|
|
2841
|
+
return /* @__PURE__ */ a("div", { style: Gr(t), children: /* @__PURE__ */ a("img", { src: r, alt: e, style: y.image }) });
|
|
3208
2842
|
}
|
|
3209
|
-
const
|
|
2843
|
+
const qr = I(
|
|
3210
2844
|
{
|
|
3211
2845
|
item: u.const(),
|
|
3212
2846
|
reportModel: u.const()
|
|
3213
2847
|
},
|
|
3214
|
-
(
|
|
3215
|
-
const { item: t, reportModel: n } = e, { entry:
|
|
2848
|
+
(r, e) => {
|
|
2849
|
+
const { item: t, reportModel: n } = e, { entry: s } = t, o = s.background ?? "light", i = s.status === "unchanged" ? /* @__PURE__ */ a("span", { style: y.badgeMatch, children: "✓ match" }) : s.status === "changed" ? /* @__PURE__ */ a("span", { style: y.badgeChanged, children: "● changed" }) : /* @__PURE__ */ a("span", { style: y.badgeAdded, children: "+ added" }), d = s.baselineScreenshot || s.currentScreenshot;
|
|
3216
2850
|
return /* @__PURE__ */ f("div", { style: y.fixtureRow, children: [
|
|
3217
2851
|
/* @__PURE__ */ f("div", { style: y.fixtureLabel, children: [
|
|
3218
2852
|
/* @__PURE__ */ a("span", { style: y.fixtureName, children: t.fixtureId }),
|
|
3219
|
-
|
|
2853
|
+
i
|
|
3220
2854
|
] }),
|
|
3221
2855
|
d && /* @__PURE__ */ f("div", { style: y.sideBySide, children: [
|
|
3222
|
-
|
|
2856
|
+
s.baselineScreenshot && /* @__PURE__ */ f("div", { style: y.screenshotColumn, children: [
|
|
3223
2857
|
/* @__PURE__ */ a("span", { style: y.columnLabel, children: "Baseline" }),
|
|
3224
2858
|
/* @__PURE__ */ a(
|
|
3225
|
-
|
|
2859
|
+
Ae,
|
|
3226
2860
|
{
|
|
3227
|
-
src: n.resolveScreenshotUrl(
|
|
2861
|
+
src: n.resolveScreenshotUrl(s.baselineScreenshot),
|
|
3228
2862
|
alt: `Baseline screenshot of ${t.fixtureId}`,
|
|
3229
|
-
background:
|
|
2863
|
+
background: o
|
|
3230
2864
|
}
|
|
3231
2865
|
)
|
|
3232
2866
|
] }),
|
|
3233
|
-
|
|
2867
|
+
s.currentScreenshot && /* @__PURE__ */ f("div", { style: y.screenshotColumn, children: [
|
|
3234
2868
|
/* @__PURE__ */ a("span", { style: y.columnLabel, children: "Current" }),
|
|
3235
2869
|
/* @__PURE__ */ a(
|
|
3236
|
-
|
|
2870
|
+
Ae,
|
|
3237
2871
|
{
|
|
3238
|
-
src: n.resolveScreenshotUrl(
|
|
2872
|
+
src: n.resolveScreenshotUrl(s.currentScreenshot),
|
|
3239
2873
|
alt: `Current screenshot of ${t.fixtureId}`,
|
|
3240
|
-
background:
|
|
2874
|
+
background: o
|
|
3241
2875
|
}
|
|
3242
2876
|
)
|
|
3243
2877
|
] })
|
|
3244
2878
|
] }),
|
|
3245
|
-
!d &&
|
|
2879
|
+
!d && s.status === "unchanged" && /* @__PURE__ */ a("div", { style: y.hashRow, children: /* @__PURE__ */ f("span", { style: y.hashText, children: [
|
|
3246
2880
|
"hash: ",
|
|
3247
|
-
|
|
2881
|
+
s.targetHash
|
|
3248
2882
|
] }) })
|
|
3249
2883
|
] });
|
|
3250
2884
|
}
|
|
3251
|
-
),
|
|
2885
|
+
), Kr = I(
|
|
3252
2886
|
{
|
|
3253
2887
|
name: u.const(),
|
|
3254
2888
|
path: u.const(),
|
|
3255
2889
|
items: u.const(),
|
|
3256
2890
|
reportModel: u.const()
|
|
3257
2891
|
},
|
|
3258
|
-
(
|
|
2892
|
+
(r, e) => /* @__PURE__ */ f("div", { children: [
|
|
3259
2893
|
/* @__PURE__ */ a("div", { style: y.groupHeader, children: /* @__PURE__ */ a("span", { style: y.groupTitle, children: e.path }) }),
|
|
3260
2894
|
/* @__PURE__ */ a("div", { style: y.groupContent, children: e.items.map((t) => /* @__PURE__ */ a(
|
|
3261
|
-
|
|
2895
|
+
qr,
|
|
3262
2896
|
{
|
|
3263
2897
|
item: t,
|
|
3264
2898
|
reportModel: e.reportModel
|
|
@@ -3338,105 +2972,105 @@ const ts = k(
|
|
|
3338
2972
|
color: "var(--vscode-testing-iconQueued)",
|
|
3339
2973
|
fontWeight: 500
|
|
3340
2974
|
}
|
|
3341
|
-
},
|
|
3342
|
-
let
|
|
3343
|
-
function
|
|
3344
|
-
if (
|
|
2975
|
+
}, ct = "component-explorer:fixtureHeights", ze = 500;
|
|
2976
|
+
let V = null;
|
|
2977
|
+
function lt() {
|
|
2978
|
+
if (V !== null) return V;
|
|
3345
2979
|
try {
|
|
3346
|
-
const
|
|
3347
|
-
if (
|
|
3348
|
-
return
|
|
2980
|
+
const r = localStorage.getItem(ct);
|
|
2981
|
+
if (r)
|
|
2982
|
+
return V = JSON.parse(r), V;
|
|
3349
2983
|
} catch {
|
|
3350
2984
|
}
|
|
3351
|
-
return
|
|
2985
|
+
return V = {}, V;
|
|
3352
2986
|
}
|
|
3353
|
-
function
|
|
3354
|
-
if (
|
|
2987
|
+
function Jr() {
|
|
2988
|
+
if (V !== null)
|
|
3355
2989
|
try {
|
|
3356
|
-
const
|
|
3357
|
-
|
|
2990
|
+
const r = Object.entries(V);
|
|
2991
|
+
r.length > ze && (V = Object.fromEntries(r.slice(-ze))), localStorage.setItem(ct, JSON.stringify(V));
|
|
3358
2992
|
} catch {
|
|
3359
2993
|
}
|
|
3360
2994
|
}
|
|
3361
|
-
function
|
|
3362
|
-
const t =
|
|
3363
|
-
t[
|
|
2995
|
+
function Zr(r, e) {
|
|
2996
|
+
const t = lt();
|
|
2997
|
+
t[r] = e, Jr();
|
|
3364
2998
|
}
|
|
3365
|
-
function
|
|
3366
|
-
return new Map(Object.entries(
|
|
2999
|
+
function Xr() {
|
|
3000
|
+
return new Map(Object.entries(lt()));
|
|
3367
3001
|
}
|
|
3368
|
-
const
|
|
3369
|
-
function
|
|
3002
|
+
const Yr = 280, Qr = 32, re = 32, $e = 400, ht = "component-explorer:scrollAnchors", Le = 100;
|
|
3003
|
+
function ut() {
|
|
3370
3004
|
try {
|
|
3371
|
-
const
|
|
3372
|
-
if (
|
|
3005
|
+
const r = localStorage.getItem(ht);
|
|
3006
|
+
if (r) return JSON.parse(r);
|
|
3373
3007
|
} catch {
|
|
3374
3008
|
}
|
|
3375
3009
|
return {};
|
|
3376
3010
|
}
|
|
3377
|
-
function
|
|
3011
|
+
function en(r, e) {
|
|
3378
3012
|
try {
|
|
3379
|
-
const t =
|
|
3380
|
-
t[
|
|
3381
|
-
const n = Object.entries(t),
|
|
3382
|
-
localStorage.setItem(
|
|
3013
|
+
const t = ut();
|
|
3014
|
+
t[r] = e;
|
|
3015
|
+
const n = Object.entries(t), s = n.length > Le ? Object.fromEntries(n.slice(-Le)) : t;
|
|
3016
|
+
localStorage.setItem(ht, JSON.stringify(s));
|
|
3383
3017
|
} catch {
|
|
3384
3018
|
}
|
|
3385
3019
|
}
|
|
3386
|
-
function
|
|
3387
|
-
return
|
|
3020
|
+
function tn(r) {
|
|
3021
|
+
return ut()[r];
|
|
3388
3022
|
}
|
|
3389
|
-
function
|
|
3390
|
-
return
|
|
3023
|
+
function ft(r) {
|
|
3024
|
+
return r.type === "single" ? r.fixture.id : r.id;
|
|
3391
3025
|
}
|
|
3392
|
-
function
|
|
3393
|
-
const t = new Array(
|
|
3394
|
-
let n =
|
|
3395
|
-
for (let
|
|
3396
|
-
const
|
|
3397
|
-
t[
|
|
3026
|
+
function rn(r, e) {
|
|
3027
|
+
const t = new Array(r.length);
|
|
3028
|
+
let n = re;
|
|
3029
|
+
for (let s = 0; s < r.length; s++) {
|
|
3030
|
+
const o = e.get(ft(r[s])) ?? Yr;
|
|
3031
|
+
t[s] = { top: n, height: o }, n += o + Qr;
|
|
3398
3032
|
}
|
|
3399
3033
|
return t;
|
|
3400
3034
|
}
|
|
3401
|
-
function
|
|
3402
|
-
if (
|
|
3403
|
-
const e =
|
|
3404
|
-
return e.top + e.height +
|
|
3035
|
+
function nn(r) {
|
|
3036
|
+
if (r.length === 0) return 0;
|
|
3037
|
+
const e = r[r.length - 1];
|
|
3038
|
+
return e.top + e.height + re;
|
|
3405
3039
|
}
|
|
3406
|
-
function
|
|
3407
|
-
let t = 0, n =
|
|
3040
|
+
function pt(r, e) {
|
|
3041
|
+
let t = 0, n = r.length;
|
|
3408
3042
|
for (; t < n; ) {
|
|
3409
|
-
const
|
|
3410
|
-
s
|
|
3043
|
+
const s = t + n >> 1;
|
|
3044
|
+
r[s].top + r[s].height < e ? t = s + 1 : n = s;
|
|
3411
3045
|
}
|
|
3412
3046
|
return t;
|
|
3413
3047
|
}
|
|
3414
|
-
function
|
|
3415
|
-
if (
|
|
3416
|
-
const n =
|
|
3417
|
-
let
|
|
3418
|
-
const
|
|
3419
|
-
for (;
|
|
3420
|
-
|
|
3421
|
-
return { start: n, end:
|
|
3422
|
-
}
|
|
3423
|
-
function
|
|
3424
|
-
if (
|
|
3425
|
-
const t =
|
|
3048
|
+
function sn(r, e, t) {
|
|
3049
|
+
if (r.length === 0) return { start: 0, end: 0 };
|
|
3050
|
+
const n = pt(r, e - $e);
|
|
3051
|
+
let s = n;
|
|
3052
|
+
const o = e + t + $e;
|
|
3053
|
+
for (; s < r.length && r[s].top < o; )
|
|
3054
|
+
s++;
|
|
3055
|
+
return { start: n, end: s };
|
|
3056
|
+
}
|
|
3057
|
+
function He(r, e) {
|
|
3058
|
+
if (r.length === 0) return;
|
|
3059
|
+
const t = pt(r, e), n = Math.min(t, r.length - 1);
|
|
3426
3060
|
return {
|
|
3427
3061
|
rowIndex: n,
|
|
3428
|
-
offsetFromViewport:
|
|
3062
|
+
offsetFromViewport: r[n].top - e
|
|
3429
3063
|
};
|
|
3430
3064
|
}
|
|
3431
|
-
function
|
|
3432
|
-
return e.rowIndex >=
|
|
3065
|
+
function je(r, e) {
|
|
3066
|
+
return e.rowIndex >= r.length ? 0 : r[e.rowIndex].top - e.offsetFromViewport;
|
|
3433
3067
|
}
|
|
3434
|
-
class
|
|
3068
|
+
class on extends F({
|
|
3435
3069
|
model: u.const()
|
|
3436
3070
|
}) {
|
|
3437
3071
|
constructor() {
|
|
3438
3072
|
super(...arguments);
|
|
3439
|
-
l(this, "_rowHeights", x(this,
|
|
3073
|
+
l(this, "_rowHeights", x(this, Xr()));
|
|
3440
3074
|
l(this, "_scrollTop", x(this, 0));
|
|
3441
3075
|
l(this, "_viewportHeight", x(this, 0));
|
|
3442
3076
|
l(this, "_scrollContainerRef", null);
|
|
@@ -3445,42 +3079,42 @@ class fs extends z({
|
|
|
3445
3079
|
l(this, "_currentNodeId");
|
|
3446
3080
|
l(this, "_scrollSaveTimeout", null);
|
|
3447
3081
|
l(this, "_suppressScrollHandler", !1);
|
|
3448
|
-
l(this, "layout",
|
|
3449
|
-
const n = this.explorerModel.selectedFixtures.read(t),
|
|
3450
|
-
return
|
|
3082
|
+
l(this, "layout", N(this, (t) => {
|
|
3083
|
+
const n = this.explorerModel.selectedFixtures.read(t), s = this._rowHeights.read(t);
|
|
3084
|
+
return rn(n, s);
|
|
3451
3085
|
}));
|
|
3452
|
-
l(this, "visibleRowRange",
|
|
3453
|
-
const n = this.layout.read(t),
|
|
3454
|
-
return
|
|
3086
|
+
l(this, "visibleRowRange", N(this, (t) => {
|
|
3087
|
+
const n = this.layout.read(t), s = this._scrollTop.read(t), o = this._viewportHeight.read(t);
|
|
3088
|
+
return sn(n, s, o);
|
|
3455
3089
|
}));
|
|
3456
3090
|
l(this, "setScrollContainerRef", (t) => {
|
|
3457
3091
|
var n;
|
|
3458
|
-
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), this._viewportResizeObserver = new ResizeObserver(([
|
|
3459
|
-
this._viewportHeight.set(Math.round(
|
|
3092
|
+
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), this._viewportResizeObserver = new ResizeObserver(([s]) => {
|
|
3093
|
+
this._viewportHeight.set(Math.round(s.contentRect.height), void 0);
|
|
3460
3094
|
}), this._viewportResizeObserver.observe(t), this._restoreScrollPosition());
|
|
3461
3095
|
});
|
|
3462
3096
|
l(this, "_handleScroll", () => {
|
|
3463
3097
|
this._scrollContainerRef && (this._scrollTop.set(this._scrollContainerRef.scrollTop, void 0), !(this._suppressScrollHandler || !this._currentNodeId) && (this._scrollSaveTimeout && clearTimeout(this._scrollSaveTimeout), this._scrollSaveTimeout = setTimeout(() => {
|
|
3464
3098
|
if (!this._currentNodeId) return;
|
|
3465
|
-
const t = this.layout.get(), n =
|
|
3466
|
-
n &&
|
|
3099
|
+
const t = this.layout.get(), n = He(t, this._scrollTop.get());
|
|
3100
|
+
n && en(this._currentNodeId, n);
|
|
3467
3101
|
}, 150)));
|
|
3468
3102
|
});
|
|
3469
3103
|
l(this, "observeRowElement", (t, n) => {
|
|
3470
|
-
t && (this._resizeObserver || (this._resizeObserver = new ResizeObserver((
|
|
3471
|
-
const
|
|
3472
|
-
let
|
|
3473
|
-
for (const d of
|
|
3104
|
+
t && (this._resizeObserver || (this._resizeObserver = new ResizeObserver((s) => {
|
|
3105
|
+
const o = this._rowHeights.get();
|
|
3106
|
+
let i;
|
|
3107
|
+
for (const d of s) {
|
|
3474
3108
|
const c = d.target.getAttribute("data-row-id");
|
|
3475
3109
|
if (!c) continue;
|
|
3476
3110
|
const h = Math.round(d.contentRect.height);
|
|
3477
|
-
h > 0 &&
|
|
3111
|
+
h > 0 && o.get(c) !== h && (i || (i = new Map(o)), i.set(c, h), Zr(c, h));
|
|
3478
3112
|
}
|
|
3479
|
-
if (
|
|
3480
|
-
const d = this.layout.get(), c =
|
|
3481
|
-
if (this._rowHeights.set(
|
|
3482
|
-
const h = this.layout.get(),
|
|
3483
|
-
this._suppressScrollHandler = !0, this._scrollContainerRef.scrollTop =
|
|
3113
|
+
if (i) {
|
|
3114
|
+
const d = this.layout.get(), c = He(d, this._scrollTop.get());
|
|
3115
|
+
if (this._rowHeights.set(i, void 0), c && this._scrollContainerRef) {
|
|
3116
|
+
const h = this.layout.get(), g = je(h, c);
|
|
3117
|
+
this._suppressScrollHandler = !0, this._scrollContainerRef.scrollTop = g, this._scrollTop.set(g, void 0), requestAnimationFrame(() => {
|
|
3484
3118
|
this._suppressScrollHandler = !1;
|
|
3485
3119
|
});
|
|
3486
3120
|
}
|
|
@@ -3496,10 +3130,10 @@ class fs extends z({
|
|
|
3496
3130
|
}
|
|
3497
3131
|
_restoreScrollPosition() {
|
|
3498
3132
|
if (!this._scrollContainerRef || !this._currentNodeId) return;
|
|
3499
|
-
const t =
|
|
3133
|
+
const t = tn(this._currentNodeId);
|
|
3500
3134
|
if (!t) return;
|
|
3501
|
-
const n = this.layout.get(),
|
|
3502
|
-
this._suppressScrollHandler = !0, this._scrollContainerRef.scrollTop =
|
|
3135
|
+
const n = this.layout.get(), s = je(n, t);
|
|
3136
|
+
this._suppressScrollHandler = !0, this._scrollContainerRef.scrollTop = s, this._scrollTop.set(s, void 0), requestAnimationFrame(() => {
|
|
3503
3137
|
this._suppressScrollHandler = !1;
|
|
3504
3138
|
});
|
|
3505
3139
|
}
|
|
@@ -3508,35 +3142,35 @@ class fs extends z({
|
|
|
3508
3142
|
(t = this._resizeObserver) == null || t.disconnect(), (n = this._viewportResizeObserver) == null || n.disconnect(), this._scrollContainerRef && this._scrollContainerRef.removeEventListener("scroll", this._handleScroll), this._scrollSaveTimeout && clearTimeout(this._scrollSaveTimeout);
|
|
3509
3143
|
}
|
|
3510
3144
|
}
|
|
3511
|
-
const
|
|
3512
|
-
|
|
3145
|
+
const an = E(
|
|
3146
|
+
on,
|
|
3513
3147
|
{},
|
|
3514
|
-
(
|
|
3515
|
-
const t = e.explorerModel.selectedFixtures.read(
|
|
3148
|
+
(r, e) => {
|
|
3149
|
+
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);
|
|
3516
3150
|
if (e.updateForSelection(n), t.length === 0) {
|
|
3517
3151
|
const c = e.explorerModel.reportModel;
|
|
3518
3152
|
if (c) {
|
|
3519
|
-
const h = c.state.read(
|
|
3153
|
+
const h = c.state.read(r);
|
|
3520
3154
|
if (h.status === "loading")
|
|
3521
|
-
return /* @__PURE__ */ a("div", { style:
|
|
3155
|
+
return /* @__PURE__ */ a("div", { style: k.emptyState, children: /* @__PURE__ */ a("span", { style: k.emptyText, children: "Loading report..." }) });
|
|
3522
3156
|
if (h.status === "error")
|
|
3523
|
-
return /* @__PURE__ */ a("div", { style:
|
|
3157
|
+
return /* @__PURE__ */ a("div", { style: k.emptyState, children: /* @__PURE__ */ f("span", { style: { ...k.emptyText, color: "var(--vscode-errorForeground)" }, children: [
|
|
3524
3158
|
"Failed to load report: ",
|
|
3525
3159
|
h.message
|
|
3526
3160
|
] }) });
|
|
3527
3161
|
}
|
|
3528
|
-
return /* @__PURE__ */ a("div", { style:
|
|
3162
|
+
return /* @__PURE__ */ a("div", { style: k.emptyState, children: /* @__PURE__ */ a("span", { style: k.emptyText, children: "Select a component or folder to preview" }) });
|
|
3529
3163
|
}
|
|
3530
|
-
const d =
|
|
3531
|
-
return /* @__PURE__ */ a("div", { ref: e.setScrollContainerRef, style:
|
|
3532
|
-
const
|
|
3164
|
+
const d = nn(s);
|
|
3165
|
+
return /* @__PURE__ */ a("div", { ref: e.setScrollContainerRef, style: k.scrollContainer, children: /* @__PURE__ */ a("div", { style: { position: "relative", height: d }, children: t.slice(o, i).map((c, h) => {
|
|
3166
|
+
const g = o + h, { top: _ } = s[g], C = ft(c);
|
|
3533
3167
|
return /* @__PURE__ */ a(
|
|
3534
3168
|
"div",
|
|
3535
3169
|
{
|
|
3536
|
-
ref: (
|
|
3537
|
-
style: { position: "absolute", top: _, left:
|
|
3538
|
-
children: c.type === "single" ? /* @__PURE__ */ a(
|
|
3539
|
-
|
|
3170
|
+
ref: (m) => e.observeRowElement(m, C),
|
|
3171
|
+
style: { position: "absolute", top: _, left: re, right: re },
|
|
3172
|
+
children: c.type === "single" ? /* @__PURE__ */ a(it, { fixture: c.fixture, compact: !1 }) : c.type === "variants" ? /* @__PURE__ */ a(dn, { row: c }) : c.type === "screenshot-comparison" && e.explorerModel.daemon ? /* @__PURE__ */ a(
|
|
3173
|
+
jr,
|
|
3540
3174
|
{
|
|
3541
3175
|
name: c.name,
|
|
3542
3176
|
path: c.path,
|
|
@@ -3546,7 +3180,7 @@ const ps = $(
|
|
|
3546
3180
|
currentSession: "current"
|
|
3547
3181
|
}
|
|
3548
3182
|
) : c.type === "report-comparison" && e.explorerModel.reportModel ? /* @__PURE__ */ a(
|
|
3549
|
-
|
|
3183
|
+
Kr,
|
|
3550
3184
|
{
|
|
3551
3185
|
name: c.name,
|
|
3552
3186
|
path: c.path,
|
|
@@ -3555,20 +3189,20 @@ const ps = $(
|
|
|
3555
3189
|
}
|
|
3556
3190
|
) : null
|
|
3557
3191
|
},
|
|
3558
|
-
|
|
3192
|
+
C
|
|
3559
3193
|
);
|
|
3560
3194
|
}) }) });
|
|
3561
3195
|
}
|
|
3562
|
-
),
|
|
3196
|
+
), dn = I(
|
|
3563
3197
|
{ row: u.const() },
|
|
3564
|
-
(
|
|
3198
|
+
(r, e) => {
|
|
3565
3199
|
const t = e.row;
|
|
3566
3200
|
return /* @__PURE__ */ f("div", { children: [
|
|
3567
|
-
/* @__PURE__ */ a("div", { style:
|
|
3568
|
-
/* @__PURE__ */ a("div", { style:
|
|
3201
|
+
/* @__PURE__ */ a("div", { style: k.variantsHeader, children: /* @__PURE__ */ a("span", { style: k.variantsTitle, children: t.path }) }),
|
|
3202
|
+
/* @__PURE__ */ a("div", { style: k.variantsContent, children: t.fixtures.map((n) => /* @__PURE__ */ a(it, { fixture: n, compact: !0 }, n.id)) })
|
|
3569
3203
|
] });
|
|
3570
3204
|
}
|
|
3571
|
-
),
|
|
3205
|
+
), k = {
|
|
3572
3206
|
scrollContainer: {
|
|
3573
3207
|
flex: 1,
|
|
3574
3208
|
overflow: "auto",
|
|
@@ -3599,55 +3233,58 @@ const ps = $(
|
|
|
3599
3233
|
flexWrap: "wrap",
|
|
3600
3234
|
gap: "16px"
|
|
3601
3235
|
}
|
|
3602
|
-
},
|
|
3603
|
-
|
|
3236
|
+
}, cn = E(
|
|
3237
|
+
gr,
|
|
3604
3238
|
{ daemonModel: u.const(), reportModel: u.const() },
|
|
3605
|
-
(
|
|
3606
|
-
const t = e.leftSidebarVisible.read(
|
|
3607
|
-
return /* @__PURE__ */ f("div", { className:
|
|
3608
|
-
t && /* @__PURE__ */ a(
|
|
3239
|
+
(r, e) => {
|
|
3240
|
+
const t = e.leftSidebarVisible.read(r), n = e.rightSidebarVisible.read(r), s = e.isDarkTheme.read(r), o = e.selectedNode.read(r);
|
|
3241
|
+
return /* @__PURE__ */ f("div", { className: s ? "vscode-theme default-dark-plus" : "vscode-theme default-light-plus", style: p.container, children: [
|
|
3242
|
+
t && /* @__PURE__ */ a(kr, { model: e }),
|
|
3609
3243
|
/* @__PURE__ */ f("div", { style: p.centerArea, children: [
|
|
3610
|
-
/* @__PURE__ */ a(
|
|
3611
|
-
/* @__PURE__ */ a(
|
|
3244
|
+
/* @__PURE__ */ a(Tr, { model: e }),
|
|
3245
|
+
/* @__PURE__ */ a(an, { model: e })
|
|
3612
3246
|
] }),
|
|
3613
|
-
n && /* @__PURE__ */ a(
|
|
3247
|
+
n && /* @__PURE__ */ a(Mr, { selectedNode: o })
|
|
3614
3248
|
] });
|
|
3615
3249
|
}
|
|
3616
3250
|
);
|
|
3617
|
-
var
|
|
3251
|
+
var ln = class fe {
|
|
3618
3252
|
constructor(e) {
|
|
3619
3253
|
this.iterator = e;
|
|
3620
3254
|
}
|
|
3621
3255
|
static fromIterable(e) {
|
|
3622
|
-
return new
|
|
3256
|
+
return new fe(e[Symbol.asyncIterator]());
|
|
3623
3257
|
}
|
|
3624
3258
|
static fromFn(e) {
|
|
3625
|
-
return new
|
|
3259
|
+
return new fe(e());
|
|
3626
3260
|
}
|
|
3627
3261
|
[Symbol.asyncIterator]() {
|
|
3628
3262
|
return this.iterator;
|
|
3629
3263
|
}
|
|
3630
|
-
},
|
|
3631
|
-
constructor(
|
|
3632
|
-
super(t), this.statusCode =
|
|
3264
|
+
}, hn = class extends Error {
|
|
3265
|
+
constructor(r, e, t) {
|
|
3266
|
+
super(t), this.statusCode = r, this.method = e, this.name = "ApiError";
|
|
3633
3267
|
}
|
|
3634
|
-
},
|
|
3635
|
-
constructor(
|
|
3268
|
+
}, un = class {
|
|
3269
|
+
constructor(r) {
|
|
3636
3270
|
l(this, "methods", this._createProxy(""));
|
|
3637
|
-
this._request =
|
|
3271
|
+
this._request = r;
|
|
3638
3272
|
}
|
|
3639
|
-
_createProxy(
|
|
3273
|
+
_createProxy(r) {
|
|
3640
3274
|
return new Proxy(() => {
|
|
3641
3275
|
}, {
|
|
3642
|
-
apply: async (e, t, n) => await this._request(
|
|
3643
|
-
get: (e, t) =>
|
|
3276
|
+
apply: async (e, t, n) => await this._request(r, n[0]),
|
|
3277
|
+
get: (e, t) => {
|
|
3278
|
+
if (typeof t != "symbol" && !(t === "then" || t === "catch" || t === "finally" || t === "toString" || t === "valueOf" || t === "toJSON" || t === "name" || t === "length" || t === "prototype" || t === "constructor" || t === "caller" || t === "arguments"))
|
|
3279
|
+
return this._createProxy(`${r}${r ? "/" : ""}${t}`);
|
|
3280
|
+
}
|
|
3644
3281
|
});
|
|
3645
3282
|
}
|
|
3646
3283
|
};
|
|
3647
|
-
function
|
|
3648
|
-
return new
|
|
3284
|
+
function fn(r, e) {
|
|
3285
|
+
return new un(async (t, n) => {
|
|
3649
3286
|
var d;
|
|
3650
|
-
const
|
|
3287
|
+
const s = await fetch(`${r}/${t}`, {
|
|
3651
3288
|
method: "POST",
|
|
3652
3289
|
headers: {
|
|
3653
3290
|
"Content-Type": "application/json",
|
|
@@ -3655,37 +3292,37 @@ function ys(s, e) {
|
|
|
3655
3292
|
},
|
|
3656
3293
|
body: JSON.stringify(n)
|
|
3657
3294
|
});
|
|
3658
|
-
if (
|
|
3659
|
-
const c = await
|
|
3295
|
+
if (s.status !== 200) {
|
|
3296
|
+
const c = await s.json().catch(() => null);
|
|
3660
3297
|
let h;
|
|
3661
|
-
throw c && typeof c == "object" && "errorMessage" in c ? h = `${c.errorMessage}` : h = `Error calling API method ${t}: ${JSON.stringify(c)} (Status: ${
|
|
3298
|
+
throw c && typeof c == "object" && "errorMessage" in c ? h = `${c.errorMessage}` : h = `Error calling API method ${t}: ${JSON.stringify(c)} (Status: ${s.status}, Status Text: ${s.statusText})`, new hn(s.status, t, h);
|
|
3662
3299
|
}
|
|
3663
|
-
const
|
|
3664
|
-
return
|
|
3665
|
-
var
|
|
3666
|
-
const c = (
|
|
3300
|
+
const o = s.headers.get("Content-Type");
|
|
3301
|
+
return o != null && o.startsWith("application/jsonl") ? ln.fromFn(async function* () {
|
|
3302
|
+
var C;
|
|
3303
|
+
const c = (C = s.body) == null ? void 0 : C.getReader();
|
|
3667
3304
|
if (!c)
|
|
3668
3305
|
return;
|
|
3669
3306
|
let h = "";
|
|
3670
|
-
const
|
|
3307
|
+
const g = new TextDecoder("utf-8");
|
|
3671
3308
|
for (; ; ) {
|
|
3672
|
-
const { done:
|
|
3673
|
-
if (
|
|
3309
|
+
const { done: m, value: v } = await c.read();
|
|
3310
|
+
if (m)
|
|
3674
3311
|
break;
|
|
3675
|
-
h +=
|
|
3676
|
-
let
|
|
3677
|
-
for (; (
|
|
3312
|
+
h += g.decode(v, { stream: !0 });
|
|
3313
|
+
let O;
|
|
3314
|
+
for (; (O = h.indexOf(`
|
|
3678
3315
|
`)) >= 0; ) {
|
|
3679
|
-
const S = h.slice(0,
|
|
3680
|
-
h = h.slice(
|
|
3316
|
+
const S = h.slice(0, O).trim();
|
|
3317
|
+
h = h.slice(O + 1), S.length > 0 && (yield JSON.parse(S));
|
|
3681
3318
|
}
|
|
3682
3319
|
}
|
|
3683
3320
|
const _ = h.trim();
|
|
3684
3321
|
_.length > 0 && (yield JSON.parse(_));
|
|
3685
|
-
}) : await
|
|
3322
|
+
}) : await s.json();
|
|
3686
3323
|
});
|
|
3687
3324
|
}
|
|
3688
|
-
class
|
|
3325
|
+
class pn {
|
|
3689
3326
|
constructor(e) {
|
|
3690
3327
|
l(this, "_sourceTreeIds", x(this, /* @__PURE__ */ new Map()));
|
|
3691
3328
|
l(this, "_sessions", x(this, []));
|
|
@@ -3697,7 +3334,7 @@ class xs {
|
|
|
3697
3334
|
l(this, "sourceTreeIds", this._sourceTreeIds);
|
|
3698
3335
|
/** Observable list of sessions from the daemon */
|
|
3699
3336
|
l(this, "sessions", this._sessions);
|
|
3700
|
-
this.config = e, this.sessionName = e.sessionName, this._client =
|
|
3337
|
+
this.config = e, this.sessionName = e.sessionName, this._client = fn("/__explorer/daemon-api");
|
|
3701
3338
|
}
|
|
3702
3339
|
/**
|
|
3703
3340
|
* Initializes the model: fetches initial session info and starts listening to events.
|
|
@@ -3714,30 +3351,30 @@ class xs {
|
|
|
3714
3351
|
const n = this._sourceTreeIds.get().get(e);
|
|
3715
3352
|
if (!n)
|
|
3716
3353
|
throw new Error(`No sourceTreeId known for session '${e}'`);
|
|
3717
|
-
const
|
|
3718
|
-
if (
|
|
3719
|
-
return
|
|
3720
|
-
const
|
|
3354
|
+
const s = `${e}:${t}`, o = this._screenshotCache.get(s);
|
|
3355
|
+
if (o && o.sourceTreeId === n)
|
|
3356
|
+
return o.data;
|
|
3357
|
+
const i = await this._client.methods.screenshots.take({
|
|
3721
3358
|
fixtureId: t,
|
|
3722
3359
|
sessionName: e,
|
|
3723
3360
|
sourceTreeId: n,
|
|
3724
3361
|
includeImage: !0
|
|
3725
3362
|
});
|
|
3726
|
-
return this._screenshotCache.set(
|
|
3363
|
+
return this._screenshotCache.set(s, { sourceTreeId: n, data: i }), i;
|
|
3727
3364
|
}
|
|
3728
3365
|
/**
|
|
3729
3366
|
* Compare a fixture across two sessions. Returns match status and hashes (no images).
|
|
3730
3367
|
*/
|
|
3731
3368
|
async compare(e, t, n) {
|
|
3732
|
-
const
|
|
3733
|
-
if (!
|
|
3369
|
+
const s = this._sourceTreeIds.get().get(t), o = this._sourceTreeIds.get().get(n);
|
|
3370
|
+
if (!s || !o)
|
|
3734
3371
|
throw new Error("Missing sourceTreeId for sessions");
|
|
3735
3372
|
return this._client.methods.screenshots.compare({
|
|
3736
3373
|
fixtureId: e,
|
|
3737
3374
|
baselineSessionName: t,
|
|
3738
|
-
baselineSourceTreeId:
|
|
3375
|
+
baselineSourceTreeId: s,
|
|
3739
3376
|
currentSessionName: n,
|
|
3740
|
-
currentSourceTreeId:
|
|
3377
|
+
currentSourceTreeId: o,
|
|
3741
3378
|
includeImages: !1
|
|
3742
3379
|
});
|
|
3743
3380
|
}
|
|
@@ -3767,8 +3404,8 @@ class xs {
|
|
|
3767
3404
|
// ---------------------------------------------------------------------------
|
|
3768
3405
|
async _fetchSessionInfos() {
|
|
3769
3406
|
const e = await this._client.methods.sessions(), t = /* @__PURE__ */ new Map(), n = [];
|
|
3770
|
-
for (const
|
|
3771
|
-
t.set(
|
|
3407
|
+
for (const s of e)
|
|
3408
|
+
t.set(s.name, s.sourceTreeId), n.push({ name: s.name, serverUrl: s.serverUrl });
|
|
3772
3409
|
this._sourceTreeIds.set(t, void 0), this._sessions.set(n, void 0);
|
|
3773
3410
|
}
|
|
3774
3411
|
async _startEventStream() {
|
|
@@ -3795,10 +3432,10 @@ class xs {
|
|
|
3795
3432
|
}
|
|
3796
3433
|
}
|
|
3797
3434
|
}
|
|
3798
|
-
function
|
|
3435
|
+
function gn() {
|
|
3799
3436
|
return window.__EXPLORER_DAEMON__;
|
|
3800
3437
|
}
|
|
3801
|
-
class
|
|
3438
|
+
class mn {
|
|
3802
3439
|
constructor(e) {
|
|
3803
3440
|
l(this, "state", x(this, { status: "loading" }));
|
|
3804
3441
|
l(this, "_baseUrl");
|
|
@@ -3811,7 +3448,7 @@ class Ss {
|
|
|
3811
3448
|
}
|
|
3812
3449
|
buildTree(e) {
|
|
3813
3450
|
const t = this.state.read(e);
|
|
3814
|
-
return t.status !== "ready" ? { id: "", name: "Report", type: "folder", children: [] } :
|
|
3451
|
+
return t.status !== "ready" ? { id: "", name: "Report", type: "folder", children: [] } : vn(t.report.fixtures);
|
|
3815
3452
|
}
|
|
3816
3453
|
async _fetch() {
|
|
3817
3454
|
this.state.set({ status: "loading" }, void 0);
|
|
@@ -3826,35 +3463,35 @@ class Ss {
|
|
|
3826
3463
|
}
|
|
3827
3464
|
}
|
|
3828
3465
|
}
|
|
3829
|
-
function
|
|
3466
|
+
function vn(r) {
|
|
3830
3467
|
const e = { id: "", name: "Components", type: "folder", children: [] };
|
|
3831
|
-
for (const [t, n] of Object.entries(
|
|
3832
|
-
const
|
|
3833
|
-
let
|
|
3834
|
-
for (let
|
|
3835
|
-
const d =
|
|
3468
|
+
for (const [t, n] of Object.entries(r)) {
|
|
3469
|
+
const s = t.split("/");
|
|
3470
|
+
let o = e;
|
|
3471
|
+
for (let i = 0; i < s.length; i++) {
|
|
3472
|
+
const d = s[i], c = i === s.length - 1, h = s.slice(0, i + 1).join("/");
|
|
3836
3473
|
if (c)
|
|
3837
|
-
|
|
3474
|
+
o.children.push({
|
|
3838
3475
|
id: h,
|
|
3839
3476
|
name: d,
|
|
3840
3477
|
type: "component",
|
|
3841
3478
|
reportEntry: n
|
|
3842
3479
|
});
|
|
3843
3480
|
else {
|
|
3844
|
-
let
|
|
3845
|
-
|
|
3481
|
+
let g = o.children.find((_) => _.type === "folder" && _.name === d);
|
|
3482
|
+
g || (g = { id: h, name: d, type: "folder", children: [] }, o.children.push(g)), o = g;
|
|
3846
3483
|
}
|
|
3847
3484
|
}
|
|
3848
3485
|
}
|
|
3849
3486
|
return e;
|
|
3850
3487
|
}
|
|
3851
|
-
class
|
|
3488
|
+
class Vn {
|
|
3852
3489
|
constructor(e, t) {
|
|
3853
3490
|
l(this, "_root");
|
|
3854
|
-
l(this, "_registry", new
|
|
3491
|
+
l(this, "_registry", new sr());
|
|
3855
3492
|
l(this, "_daemonModel");
|
|
3856
3493
|
l(this, "_reportModel");
|
|
3857
|
-
this._populateRegistry(t), this._reportModel = this._initializeReportModel(), this._daemonModel = this._reportModel ? void 0 : this._initializeDaemonModel(), this._root =
|
|
3494
|
+
this._populateRegistry(t), this._reportModel = this._initializeReportModel(), this._daemonModel = this._reportModel ? void 0 : this._initializeDaemonModel(), this._root = _t(e), this._root.render(Ct(cn, {
|
|
3858
3495
|
registry: this._registry,
|
|
3859
3496
|
daemonModel: this._daemonModel,
|
|
3860
3497
|
reportModel: this._reportModel
|
|
@@ -3863,13 +3500,13 @@ class Bs {
|
|
|
3863
3500
|
_initializeReportModel() {
|
|
3864
3501
|
const t = new URLSearchParams(location.search).get("report");
|
|
3865
3502
|
if (t)
|
|
3866
|
-
return new
|
|
3503
|
+
return new mn(t);
|
|
3867
3504
|
}
|
|
3868
3505
|
_initializeDaemonModel() {
|
|
3869
|
-
const e =
|
|
3506
|
+
const e = gn();
|
|
3870
3507
|
if (!e)
|
|
3871
3508
|
return;
|
|
3872
|
-
const t = new
|
|
3509
|
+
const t = new pn(e);
|
|
3873
3510
|
return t.initialize().catch((n) => {
|
|
3874
3511
|
console.error("[ExplorerApp] Failed to initialize DaemonModel:", n);
|
|
3875
3512
|
}), t;
|
|
@@ -3877,8 +3514,8 @@ class Bs {
|
|
|
3877
3514
|
_populateRegistry(e) {
|
|
3878
3515
|
this._registry.clear();
|
|
3879
3516
|
for (const [t, n] of Object.entries(e)) {
|
|
3880
|
-
const
|
|
3881
|
-
|
|
3517
|
+
const s = n.default;
|
|
3518
|
+
s && typeof s == "object" && this._registry.register(t, s);
|
|
3882
3519
|
}
|
|
3883
3520
|
}
|
|
3884
3521
|
/**
|
|
@@ -3902,50 +3539,52 @@ class Bs {
|
|
|
3902
3539
|
}
|
|
3903
3540
|
}
|
|
3904
3541
|
export {
|
|
3905
|
-
|
|
3906
|
-
|
|
3907
|
-
|
|
3908
|
-
|
|
3909
|
-
|
|
3910
|
-
|
|
3911
|
-
|
|
3912
|
-
|
|
3913
|
-
|
|
3914
|
-
|
|
3915
|
-
|
|
3916
|
-
|
|
3917
|
-
|
|
3918
|
-
|
|
3919
|
-
|
|
3920
|
-
|
|
3921
|
-
|
|
3922
|
-
|
|
3923
|
-
|
|
3924
|
-
|
|
3925
|
-
|
|
3926
|
-
|
|
3927
|
-
|
|
3928
|
-
|
|
3929
|
-
|
|
3930
|
-
|
|
3931
|
-
|
|
3932
|
-
|
|
3933
|
-
|
|
3934
|
-
|
|
3935
|
-
|
|
3936
|
-
|
|
3937
|
-
|
|
3938
|
-
|
|
3939
|
-
|
|
3940
|
-
|
|
3941
|
-
|
|
3942
|
-
|
|
3943
|
-
|
|
3944
|
-
|
|
3945
|
-
|
|
3946
|
-
|
|
3947
|
-
|
|
3542
|
+
_r as ChevronDownIcon,
|
|
3543
|
+
vr as ChevronRightIcon,
|
|
3544
|
+
kn as CliRuntime,
|
|
3545
|
+
br as ComponentIcon,
|
|
3546
|
+
pn as DaemonModel,
|
|
3547
|
+
cn as Explorer,
|
|
3548
|
+
Vn as ExplorerApp,
|
|
3549
|
+
gr as ExplorerModel,
|
|
3550
|
+
sr as FixtureRegistry,
|
|
3551
|
+
yr as FolderIcon,
|
|
3552
|
+
kr as LeftSidebar,
|
|
3553
|
+
wr as MoonIcon,
|
|
3554
|
+
xr as PanelLeftIcon,
|
|
3555
|
+
Cr as PanelRightIcon,
|
|
3556
|
+
mn as ReportModel,
|
|
3557
|
+
Mr as RightSidebar,
|
|
3558
|
+
Sr as SunIcon,
|
|
3559
|
+
Tr as TitleBar,
|
|
3560
|
+
se as TitleBarButton,
|
|
3561
|
+
Or as TreeItem,
|
|
3562
|
+
ot as TreeView,
|
|
3563
|
+
St as VIEWPORT_SIZES,
|
|
3564
|
+
Mn as asyncRender,
|
|
3565
|
+
It as collectComponents,
|
|
3566
|
+
Ie as createComponentDefinition,
|
|
3567
|
+
oe as createFixtureTree,
|
|
3568
|
+
Fn as defineFixture,
|
|
3569
|
+
En as defineFixtureGroup,
|
|
3570
|
+
Bn as defineFixtureVariants,
|
|
3571
|
+
Oe as findNodeByPath,
|
|
3572
|
+
Se as fixtureGroupBrand,
|
|
3573
|
+
we as fixtureVariantsBrand,
|
|
3574
|
+
Rt as getDefaultPropertyValues,
|
|
3575
|
+
On as isComponentDefinition,
|
|
3576
|
+
me as isFixtureGroup,
|
|
3577
|
+
ve as isFixtureVariants,
|
|
3578
|
+
ge as isSingleFixture,
|
|
3579
|
+
Ce as mergeStyles,
|
|
3580
|
+
wn as parseFixtureExport,
|
|
3581
|
+
Tn as parseFixtureGroup,
|
|
3582
|
+
In as parseFixtureVariants,
|
|
3583
|
+
Rn as parseSingleFixture,
|
|
3584
|
+
wt as resolveViewport,
|
|
3585
|
+
Re as singleFixtureBrand,
|
|
3948
3586
|
p as styles,
|
|
3949
|
-
|
|
3587
|
+
An as syncRender,
|
|
3588
|
+
st as toExplorerTree
|
|
3950
3589
|
};
|
|
3951
3590
|
//# sourceMappingURL=viewer.js.map
|