@vscode/component-explorer 0.1.1-8 → 0.1.1-9
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/index.js +851 -670
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { createRoot as
|
|
5
|
-
import { createElement as
|
|
6
|
-
import { jsx as a, jsxs as p, Fragment as
|
|
7
|
-
import {
|
|
8
|
-
const
|
|
1
|
+
var vt = Object.defineProperty;
|
|
2
|
+
var bt = (s, e, t) => e in s ? vt(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
|
|
3
|
+
var l = (s, e, t) => bt(s, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { createRoot as yt } from "react-dom/client";
|
|
5
|
+
import { createContext as Le, useReducer as Ct, useState as xt, useContext as wt, useEffect as Ie, createElement as St } from "react";
|
|
6
|
+
import { jsx as a, jsxs as p, Fragment as be } from "react/jsx-runtime";
|
|
7
|
+
import { unstable_batchedUpdates as $e } from "react-dom";
|
|
8
|
+
const It = {
|
|
9
9
|
mobile: { width: 390, height: 844 },
|
|
10
10
|
tablet: { width: 768, height: 1024 },
|
|
11
11
|
desktop: { width: 1440, height: 900 }
|
|
12
12
|
};
|
|
13
|
-
function
|
|
14
|
-
return typeof s == "string" ? { name: s, ...
|
|
13
|
+
function Ot(s) {
|
|
14
|
+
return typeof s == "string" ? { name: s, ...It[s] } : s;
|
|
15
15
|
}
|
|
16
|
-
function
|
|
16
|
+
function Tt(s) {
|
|
17
17
|
const e = {};
|
|
18
18
|
for (const t of s)
|
|
19
19
|
e[t.name] = t.defaultValue;
|
|
20
20
|
return e;
|
|
21
21
|
}
|
|
22
|
-
function
|
|
22
|
+
function ys(s) {
|
|
23
23
|
return typeof s == "object" && s !== null && "render" in s && typeof s.render == "function" && "id" in s && "name" in s;
|
|
24
24
|
}
|
|
25
|
-
const
|
|
26
|
-
function
|
|
27
|
-
return typeof s == "object" && s !== null &&
|
|
25
|
+
const Ue = Symbol("singleFixture"), je = Symbol("fixtureGroup"), Pe = Symbol("fixtureVariants");
|
|
26
|
+
function Rt(s) {
|
|
27
|
+
return typeof s == "object" && s !== null && Ue in s;
|
|
28
28
|
}
|
|
29
|
-
function
|
|
30
|
-
return typeof s == "object" && s !== null &&
|
|
29
|
+
function Vt(s) {
|
|
30
|
+
return typeof s == "object" && s !== null && je in s;
|
|
31
31
|
}
|
|
32
|
-
function
|
|
33
|
-
return typeof s == "object" && s !== null &&
|
|
32
|
+
function Nt(s) {
|
|
33
|
+
return typeof s == "object" && s !== null && Pe in s;
|
|
34
34
|
}
|
|
35
|
-
function
|
|
35
|
+
function kt(s, e, t) {
|
|
36
36
|
return {
|
|
37
37
|
id: e,
|
|
38
38
|
name: t,
|
|
@@ -45,26 +45,26 @@ function gt(s, e, t) {
|
|
|
45
45
|
render: s.render
|
|
46
46
|
};
|
|
47
47
|
}
|
|
48
|
-
function
|
|
48
|
+
function ee(s) {
|
|
49
49
|
return {
|
|
50
|
-
[
|
|
50
|
+
[Ue]: !0,
|
|
51
51
|
_options: s,
|
|
52
|
-
_createDefinition: (e, t) =>
|
|
52
|
+
_createDefinition: (e, t) => kt(s, e, t)
|
|
53
53
|
};
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function Cs(s) {
|
|
56
56
|
return {
|
|
57
|
-
[
|
|
57
|
+
[je]: !0,
|
|
58
58
|
_entries: s
|
|
59
59
|
};
|
|
60
60
|
}
|
|
61
|
-
function
|
|
61
|
+
function xs(s) {
|
|
62
62
|
return {
|
|
63
|
-
[
|
|
63
|
+
[Pe]: !0,
|
|
64
64
|
_variants: s
|
|
65
65
|
};
|
|
66
66
|
}
|
|
67
|
-
function
|
|
67
|
+
function ce(s) {
|
|
68
68
|
const e = {
|
|
69
69
|
id: "",
|
|
70
70
|
name: "Components",
|
|
@@ -72,17 +72,17 @@ function re(s) {
|
|
|
72
72
|
children: []
|
|
73
73
|
};
|
|
74
74
|
for (const [t, n] of s) {
|
|
75
|
-
const r =
|
|
76
|
-
|
|
75
|
+
const r = Dt(t);
|
|
76
|
+
Ge(e, [r], n);
|
|
77
77
|
}
|
|
78
78
|
return e;
|
|
79
79
|
}
|
|
80
|
-
function
|
|
80
|
+
function Dt(s) {
|
|
81
81
|
return (s.split("/").pop() ?? s).replace(/\.fixture\.(tsx?|jsx?)$/, "");
|
|
82
82
|
}
|
|
83
|
-
function
|
|
83
|
+
function Ge(s, e, t) {
|
|
84
84
|
var n;
|
|
85
|
-
if (
|
|
85
|
+
if (Rt(t)) {
|
|
86
86
|
const r = e.join("/"), i = e[e.length - 1], o = {
|
|
87
87
|
id: r,
|
|
88
88
|
name: i,
|
|
@@ -90,7 +90,7 @@ function Ae(s, e, t) {
|
|
|
90
90
|
component: t._createDefinition(r, i)
|
|
91
91
|
};
|
|
92
92
|
s.children || (s.children = []), s.children.push(o);
|
|
93
|
-
} else if (
|
|
93
|
+
} else if (Vt(t)) {
|
|
94
94
|
const r = e[e.length - 1], i = e.join("/");
|
|
95
95
|
let o = (n = s.children) == null ? void 0 : n.find(
|
|
96
96
|
(d) => d.type === "folder" && d.name === r
|
|
@@ -101,9 +101,9 @@ function Ae(s, e, t) {
|
|
|
101
101
|
type: "folder",
|
|
102
102
|
children: []
|
|
103
103
|
}, s.children || (s.children = []), s.children.push(o));
|
|
104
|
-
for (const [d,
|
|
105
|
-
|
|
106
|
-
} else if (
|
|
104
|
+
for (const [d, c] of Object.entries(t._entries))
|
|
105
|
+
Ge(o, [...e, d], c);
|
|
106
|
+
} else if (Nt(t)) {
|
|
107
107
|
const r = e[e.length - 1], o = {
|
|
108
108
|
id: e.join("/"),
|
|
109
109
|
name: r,
|
|
@@ -111,18 +111,18 @@ function Ae(s, e, t) {
|
|
|
111
111
|
children: []
|
|
112
112
|
};
|
|
113
113
|
s.children || (s.children = []), s.children.push(o);
|
|
114
|
-
for (const [d,
|
|
115
|
-
const g = [...e, d].join("/"),
|
|
114
|
+
for (const [d, c] of Object.entries(t._variants)) {
|
|
115
|
+
const g = [...e, d].join("/"), _ = {
|
|
116
116
|
id: g,
|
|
117
117
|
name: d,
|
|
118
118
|
type: "component",
|
|
119
|
-
component:
|
|
119
|
+
component: c._createDefinition(g, d)
|
|
120
120
|
};
|
|
121
|
-
o.children.push(
|
|
121
|
+
o.children.push(_);
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
|
-
function
|
|
125
|
+
function Oe(s, e) {
|
|
126
126
|
if (e.length === 0)
|
|
127
127
|
return s;
|
|
128
128
|
let t = s;
|
|
@@ -133,29 +133,29 @@ function ve(s, e) {
|
|
|
133
133
|
}
|
|
134
134
|
return t;
|
|
135
135
|
}
|
|
136
|
-
function
|
|
136
|
+
function At(s) {
|
|
137
137
|
if (s.type === "component" && s.component)
|
|
138
138
|
return [s.component];
|
|
139
139
|
const e = [];
|
|
140
140
|
for (const t of s.children ?? [])
|
|
141
|
-
e.push(...
|
|
141
|
+
e.push(...At(t));
|
|
142
142
|
return e;
|
|
143
143
|
}
|
|
144
|
-
let
|
|
145
|
-
function
|
|
146
|
-
|
|
144
|
+
let L;
|
|
145
|
+
function We(s) {
|
|
146
|
+
L ? L instanceof Te ? L.loggers.push(s) : L = new Te([L, s]) : L = s;
|
|
147
147
|
}
|
|
148
|
-
function
|
|
149
|
-
return
|
|
148
|
+
function m() {
|
|
149
|
+
return L;
|
|
150
150
|
}
|
|
151
|
-
let
|
|
152
|
-
function
|
|
153
|
-
|
|
151
|
+
let le;
|
|
152
|
+
function Mt(s) {
|
|
153
|
+
le = s;
|
|
154
154
|
}
|
|
155
|
-
function
|
|
156
|
-
|
|
155
|
+
function Ft(s) {
|
|
156
|
+
le && le(s);
|
|
157
157
|
}
|
|
158
|
-
class
|
|
158
|
+
class Te {
|
|
159
159
|
constructor(e) {
|
|
160
160
|
this.loggers = e;
|
|
161
161
|
}
|
|
@@ -208,7 +208,7 @@ class me {
|
|
|
208
208
|
t.handleEndTransaction(e);
|
|
209
209
|
}
|
|
210
210
|
}
|
|
211
|
-
var
|
|
211
|
+
var T;
|
|
212
212
|
(function(s) {
|
|
213
213
|
let e = !1;
|
|
214
214
|
function t() {
|
|
@@ -224,23 +224,23 @@ var R;
|
|
|
224
224
|
return;
|
|
225
225
|
const o = Error, d = o.stackTraceLimit;
|
|
226
226
|
o.stackTraceLimit = 3;
|
|
227
|
-
const
|
|
228
|
-
return o.stackTraceLimit = d,
|
|
227
|
+
const c = new Error().stack;
|
|
228
|
+
return o.stackTraceLimit = d, ye.fromStack(c, i + 1);
|
|
229
229
|
}
|
|
230
230
|
s.ofNthCaller = r;
|
|
231
|
-
})(
|
|
232
|
-
class
|
|
231
|
+
})(T || (T = {}));
|
|
232
|
+
class ye {
|
|
233
233
|
static fromStack(e, t) {
|
|
234
234
|
const n = e.split(`
|
|
235
|
-
`), r =
|
|
235
|
+
`), r = Bt(n[t + 1]);
|
|
236
236
|
if (r)
|
|
237
|
-
return new
|
|
237
|
+
return new ye(r.fileName, r.line, r.column, r.id);
|
|
238
238
|
}
|
|
239
239
|
constructor(e, t, n, r) {
|
|
240
240
|
this.fileName = e, this.line = t, this.column = n, this.id = r;
|
|
241
241
|
}
|
|
242
242
|
}
|
|
243
|
-
function
|
|
243
|
+
function Bt(s) {
|
|
244
244
|
if (!s)
|
|
245
245
|
return;
|
|
246
246
|
const e = s.match(/\((.*):(\d+):(\d+)\)/);
|
|
@@ -260,32 +260,32 @@ function yt(s) {
|
|
|
260
260
|
id: s
|
|
261
261
|
};
|
|
262
262
|
}
|
|
263
|
-
class
|
|
263
|
+
class M {
|
|
264
264
|
constructor(e, t, n) {
|
|
265
265
|
this.owner = e, this.debugNameSource = t, this.referenceFn = n;
|
|
266
266
|
}
|
|
267
267
|
getDebugName(e) {
|
|
268
|
-
return
|
|
268
|
+
return Et(e, this);
|
|
269
269
|
}
|
|
270
270
|
}
|
|
271
|
-
const
|
|
272
|
-
function
|
|
273
|
-
const t =
|
|
271
|
+
const Re = /* @__PURE__ */ new Map(), he = /* @__PURE__ */ new WeakMap();
|
|
272
|
+
function Et(s, e) {
|
|
273
|
+
const t = he.get(s);
|
|
274
274
|
if (t)
|
|
275
275
|
return t;
|
|
276
|
-
const n =
|
|
276
|
+
const n = zt(s, e);
|
|
277
277
|
if (n) {
|
|
278
|
-
let r =
|
|
279
|
-
r++,
|
|
278
|
+
let r = Re.get(n) ?? 0;
|
|
279
|
+
r++, Re.set(n, r);
|
|
280
280
|
const i = r === 1 ? n : `${n}#${r}`;
|
|
281
|
-
return
|
|
281
|
+
return he.set(s, i), i;
|
|
282
282
|
}
|
|
283
283
|
}
|
|
284
|
-
function
|
|
285
|
-
const t =
|
|
284
|
+
function zt(s, e) {
|
|
285
|
+
const t = he.get(s);
|
|
286
286
|
if (t)
|
|
287
287
|
return t;
|
|
288
|
-
const n = e.owner ?
|
|
288
|
+
const n = e.owner ? Lt(e.owner) + "." : "";
|
|
289
289
|
let r;
|
|
290
290
|
const i = e.debugNameSource;
|
|
291
291
|
if (i !== void 0)
|
|
@@ -295,56 +295,56 @@ function xt(s, e) {
|
|
|
295
295
|
} else
|
|
296
296
|
return n + i;
|
|
297
297
|
const o = e.referenceFn;
|
|
298
|
-
if (o !== void 0 && (r =
|
|
298
|
+
if (o !== void 0 && (r = Ce(o), r !== void 0))
|
|
299
299
|
return n + r;
|
|
300
300
|
if (e.owner !== void 0) {
|
|
301
|
-
const d =
|
|
301
|
+
const d = Ht(e.owner, s);
|
|
302
302
|
if (d !== void 0)
|
|
303
303
|
return n + d;
|
|
304
304
|
}
|
|
305
305
|
}
|
|
306
|
-
function
|
|
306
|
+
function Ht(s, e) {
|
|
307
307
|
for (const t in s)
|
|
308
308
|
if (s[t] === e)
|
|
309
309
|
return t;
|
|
310
310
|
}
|
|
311
|
-
const
|
|
312
|
-
function
|
|
313
|
-
const e =
|
|
311
|
+
const Ve = /* @__PURE__ */ new Map(), Ne = /* @__PURE__ */ new WeakMap();
|
|
312
|
+
function Lt(s) {
|
|
313
|
+
const e = Ne.get(s);
|
|
314
314
|
if (e)
|
|
315
315
|
return e;
|
|
316
|
-
const t =
|
|
317
|
-
let n =
|
|
318
|
-
n++,
|
|
316
|
+
const t = qe(s) ?? "Object";
|
|
317
|
+
let n = Ve.get(t) ?? 0;
|
|
318
|
+
n++, Ve.set(t, n);
|
|
319
319
|
const r = n === 1 ? t : `${t}#${n}`;
|
|
320
|
-
return
|
|
320
|
+
return Ne.set(s, r), r;
|
|
321
321
|
}
|
|
322
|
-
function
|
|
322
|
+
function qe(s) {
|
|
323
323
|
const e = s.constructor;
|
|
324
324
|
if (e)
|
|
325
325
|
return e.name === "Object" ? void 0 : e.name;
|
|
326
326
|
}
|
|
327
|
-
function
|
|
327
|
+
function Ce(s) {
|
|
328
328
|
const e = s.toString(), n = /\/\*\*\s*@description\s*([^*]*)\*\//.exec(e), r = n ? n[1] : void 0;
|
|
329
329
|
return r == null ? void 0 : r.trim();
|
|
330
330
|
}
|
|
331
|
-
let
|
|
332
|
-
function
|
|
333
|
-
|
|
331
|
+
let ue;
|
|
332
|
+
function $t(s) {
|
|
333
|
+
ue = s;
|
|
334
334
|
}
|
|
335
|
-
let
|
|
336
|
-
function
|
|
337
|
-
|
|
335
|
+
let Ke;
|
|
336
|
+
function Ut(s) {
|
|
337
|
+
Ke = s;
|
|
338
338
|
}
|
|
339
|
-
let
|
|
340
|
-
function
|
|
341
|
-
|
|
339
|
+
let Je;
|
|
340
|
+
function jt(s) {
|
|
341
|
+
Je = s;
|
|
342
342
|
}
|
|
343
|
-
let
|
|
344
|
-
function
|
|
345
|
-
|
|
343
|
+
let Ze;
|
|
344
|
+
function Pt(s) {
|
|
345
|
+
Ze = s;
|
|
346
346
|
}
|
|
347
|
-
class
|
|
347
|
+
class Gt {
|
|
348
348
|
get TChange() {
|
|
349
349
|
return null;
|
|
350
350
|
}
|
|
@@ -355,17 +355,17 @@ class kt {
|
|
|
355
355
|
read(e) {
|
|
356
356
|
return e ? e.readObservable(this) : this.get();
|
|
357
357
|
}
|
|
358
|
-
map(e, t, n =
|
|
358
|
+
map(e, t, n = T.ofCaller()) {
|
|
359
359
|
const r = t === void 0 ? void 0 : e, i = t === void 0 ? e : t;
|
|
360
|
-
return
|
|
360
|
+
return ue({
|
|
361
361
|
owner: r,
|
|
362
362
|
debugName: () => {
|
|
363
|
-
const o =
|
|
363
|
+
const o = Ce(i);
|
|
364
364
|
if (o !== void 0)
|
|
365
365
|
return o;
|
|
366
|
-
const
|
|
367
|
-
if (
|
|
368
|
-
return `${this.debugName}.${
|
|
366
|
+
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(i.toString());
|
|
367
|
+
if (c)
|
|
368
|
+
return `${this.debugName}.${c[2]}`;
|
|
369
369
|
if (!r)
|
|
370
370
|
return `${this.debugName} (mapped)`;
|
|
371
371
|
},
|
|
@@ -377,13 +377,13 @@ class kt {
|
|
|
377
377
|
* Converts an observable of an observable value into a direct observable of the value.
|
|
378
378
|
*/
|
|
379
379
|
flatten() {
|
|
380
|
-
return
|
|
380
|
+
return ue({
|
|
381
381
|
owner: void 0,
|
|
382
382
|
debugName: () => `${this.debugName} (flattened)`
|
|
383
383
|
}, (e) => this.read(e).read(e));
|
|
384
384
|
}
|
|
385
385
|
recomputeInitiallyAndOnChange(e, t) {
|
|
386
|
-
return e.add(
|
|
386
|
+
return e.add(Ke(this, t)), this;
|
|
387
387
|
}
|
|
388
388
|
/**
|
|
389
389
|
* Ensures that this observable is observed. This keeps the cache alive.
|
|
@@ -391,29 +391,29 @@ class kt {
|
|
|
391
391
|
* Use `recomputeInitiallyAndOnChange` for eager evaluation.
|
|
392
392
|
*/
|
|
393
393
|
keepObserved(e) {
|
|
394
|
-
return e.add(
|
|
394
|
+
return e.add(Je(this)), this;
|
|
395
395
|
}
|
|
396
396
|
get debugValue() {
|
|
397
397
|
return this.get();
|
|
398
398
|
}
|
|
399
399
|
debugGetDependencyGraph() {
|
|
400
|
-
return
|
|
400
|
+
return Ze(this);
|
|
401
401
|
}
|
|
402
402
|
}
|
|
403
|
-
class
|
|
403
|
+
class xe extends Gt {
|
|
404
404
|
constructor(e) {
|
|
405
405
|
var t;
|
|
406
|
-
super(), this._observers = /* @__PURE__ */ new Set(), (t =
|
|
406
|
+
super(), this._observers = /* @__PURE__ */ new Set(), (t = m()) == null || t.handleObservableCreated(this, e);
|
|
407
407
|
}
|
|
408
408
|
addObserver(e) {
|
|
409
409
|
var n;
|
|
410
410
|
const t = this._observers.size;
|
|
411
|
-
this._observers.add(e), t === 0 && this.onFirstObserverAdded(), t !== this._observers.size && ((n =
|
|
411
|
+
this._observers.add(e), t === 0 && this.onFirstObserverAdded(), t !== this._observers.size && ((n = m()) == null || n.handleOnListenerCountChanged(this, this._observers.size));
|
|
412
412
|
}
|
|
413
413
|
removeObserver(e) {
|
|
414
414
|
var n;
|
|
415
415
|
const t = this._observers.delete(e);
|
|
416
|
-
t && this._observers.size === 0 && this.onLastObserverRemoved(), t && ((n =
|
|
416
|
+
t && this._observers.size === 0 && this.onLastObserverRemoved(), t && ((n = m()) == null || n.handleOnListenerCountChanged(this, this._observers.size));
|
|
417
417
|
}
|
|
418
418
|
onFirstObserverAdded() {
|
|
419
419
|
}
|
|
@@ -421,34 +421,34 @@ class fe extends kt {
|
|
|
421
421
|
}
|
|
422
422
|
log() {
|
|
423
423
|
var t;
|
|
424
|
-
const e = !!
|
|
425
|
-
return
|
|
424
|
+
const e = !!m();
|
|
425
|
+
return Ft(this), e || (t = m()) == null || t.handleObservableCreated(this, T.ofCaller()), this;
|
|
426
426
|
}
|
|
427
427
|
debugGetObservers() {
|
|
428
428
|
return this._observers;
|
|
429
429
|
}
|
|
430
430
|
}
|
|
431
|
-
function
|
|
431
|
+
function Xe(s) {
|
|
432
432
|
return {
|
|
433
433
|
dispose: s
|
|
434
434
|
};
|
|
435
435
|
}
|
|
436
|
-
class
|
|
436
|
+
class I extends Error {
|
|
437
437
|
constructor(e) {
|
|
438
|
-
super(e || "An unexpected bug occurred."), Object.setPrototypeOf(this,
|
|
438
|
+
super(e || "An unexpected bug occurred."), Object.setPrototypeOf(this, I.prototype);
|
|
439
439
|
}
|
|
440
440
|
}
|
|
441
|
-
function
|
|
441
|
+
function ne(s) {
|
|
442
442
|
throw s;
|
|
443
443
|
}
|
|
444
|
-
function
|
|
444
|
+
function fe(s) {
|
|
445
445
|
console.error("Unexpected error:", s);
|
|
446
446
|
}
|
|
447
|
-
const
|
|
448
|
-
function
|
|
447
|
+
const Z = (s, e) => s === e;
|
|
448
|
+
function Y(s) {
|
|
449
449
|
return s != null;
|
|
450
450
|
}
|
|
451
|
-
class
|
|
451
|
+
class X {
|
|
452
452
|
constructor() {
|
|
453
453
|
this.disposables = [], this._isDisposed = !1;
|
|
454
454
|
}
|
|
@@ -476,7 +476,7 @@ class Y {
|
|
|
476
476
|
this.disposables = [];
|
|
477
477
|
}
|
|
478
478
|
}
|
|
479
|
-
function
|
|
479
|
+
function Wt(s) {
|
|
480
480
|
switch (s) {
|
|
481
481
|
case 0:
|
|
482
482
|
return "initial";
|
|
@@ -490,7 +490,7 @@ function Nt(s) {
|
|
|
490
490
|
return "<unknown>";
|
|
491
491
|
}
|
|
492
492
|
}
|
|
493
|
-
class
|
|
493
|
+
class C extends xe {
|
|
494
494
|
get debugName() {
|
|
495
495
|
return this._debugNameData.getDebugName(this) ?? "(anonymous)";
|
|
496
496
|
}
|
|
@@ -500,7 +500,7 @@ class y extends fe {
|
|
|
500
500
|
}
|
|
501
501
|
onLastObserverRemoved() {
|
|
502
502
|
var e, t;
|
|
503
|
-
this._state = 0, this._value = void 0, (e =
|
|
503
|
+
this._state = 0, this._value = void 0, (e = m()) == null || e.handleDerivedCleared(this);
|
|
504
504
|
for (const n of this._dependencies)
|
|
505
505
|
n.removeObserver(this);
|
|
506
506
|
this._dependencies.clear(), this._store !== void 0 && (this._store.dispose(), this._store = void 0), this._delayedStore !== void 0 && (this._delayedStore.dispose(), this._delayedStore = void 0), (t = this._handleLastObserverRemoved) == null || t.call(this);
|
|
@@ -538,7 +538,7 @@ class y extends fe {
|
|
|
538
538
|
try {
|
|
539
539
|
const d = this._changeSummary;
|
|
540
540
|
this._isReaderValid = !0, this._changeTracker && (this._isInBeforeUpdate = !0, (r = (n = this._changeTracker).beforeUpdate) == null || r.call(n, this, d), this._isInBeforeUpdate = !1, this._changeSummary = (i = this._changeTracker) == null ? void 0 : i.createChangeSummary(d));
|
|
541
|
-
const
|
|
541
|
+
const c = this._state !== 0, h = this._value;
|
|
542
542
|
this._state = 3;
|
|
543
543
|
const g = this._delayedStore;
|
|
544
544
|
g !== void 0 && (this._delayedStore = void 0);
|
|
@@ -546,19 +546,19 @@ class y extends fe {
|
|
|
546
546
|
this._store !== void 0 && (this._store.dispose(), this._store = void 0), this._value = this._computeFn(this, d);
|
|
547
547
|
} finally {
|
|
548
548
|
this._isReaderValid = !1;
|
|
549
|
-
for (const
|
|
550
|
-
|
|
549
|
+
for (const _ of this._dependenciesToBeRemoved)
|
|
550
|
+
_.removeObserver(this);
|
|
551
551
|
this._dependenciesToBeRemoved.clear(), g !== void 0 && g.dispose();
|
|
552
552
|
}
|
|
553
|
-
e = this._didReportChange ||
|
|
553
|
+
e = this._didReportChange || c && !this._equalityComparator(h, this._value), (o = m()) == null || o.handleObservableUpdated(this, {
|
|
554
554
|
oldValue: h,
|
|
555
555
|
newValue: this._value,
|
|
556
556
|
change: void 0,
|
|
557
557
|
didChange: e,
|
|
558
|
-
hadValue:
|
|
558
|
+
hadValue: c
|
|
559
559
|
});
|
|
560
560
|
} catch (d) {
|
|
561
|
-
|
|
561
|
+
ne(d);
|
|
562
562
|
}
|
|
563
563
|
if (this._isComputing = !1, !this._didReportChange && e)
|
|
564
564
|
for (const d of this._observers)
|
|
@@ -572,7 +572,7 @@ class y extends fe {
|
|
|
572
572
|
// IObserver Implementation
|
|
573
573
|
beginUpdate(e) {
|
|
574
574
|
if (this._isUpdating)
|
|
575
|
-
throw new
|
|
575
|
+
throw new I("Cyclic deriveds are not supported yet!");
|
|
576
576
|
this._updateCount++, this._isUpdating = !0;
|
|
577
577
|
try {
|
|
578
578
|
const t = this._updateCount === 1;
|
|
@@ -609,7 +609,7 @@ class y extends fe {
|
|
|
609
609
|
handleChange(e, t) {
|
|
610
610
|
var n;
|
|
611
611
|
if (this._dependencies.has(e) && !this._dependenciesToBeRemoved.has(e) || this._isInBeforeUpdate) {
|
|
612
|
-
(n =
|
|
612
|
+
(n = m()) == null || n.handleDerivedDependencyChanged(this, e, t);
|
|
613
613
|
let r = !1;
|
|
614
614
|
try {
|
|
615
615
|
r = this._changeTracker ? this._changeTracker.handleChange({
|
|
@@ -618,7 +618,7 @@ class y extends fe {
|
|
|
618
618
|
didChange: (o) => o === e
|
|
619
619
|
}, this._changeSummary) : !0;
|
|
620
620
|
} catch (o) {
|
|
621
|
-
|
|
621
|
+
ne(o);
|
|
622
622
|
}
|
|
623
623
|
const i = this._state === 3;
|
|
624
624
|
if (r && (this._state === 1 || i) && (this._state = 2, i))
|
|
@@ -629,7 +629,7 @@ class y extends fe {
|
|
|
629
629
|
// IReader Implementation
|
|
630
630
|
_ensureReaderValid() {
|
|
631
631
|
if (!this._isReaderValid)
|
|
632
|
-
throw new
|
|
632
|
+
throw new I("The reader object cannot be used outside its compute function!");
|
|
633
633
|
}
|
|
634
634
|
readObservable(e) {
|
|
635
635
|
this._ensureReaderValid(), e.addObserver(this);
|
|
@@ -642,10 +642,10 @@ class y extends fe {
|
|
|
642
642
|
t.handleChange(this, e);
|
|
643
643
|
}
|
|
644
644
|
get store() {
|
|
645
|
-
return this._ensureReaderValid(), this._store === void 0 && (this._store = new
|
|
645
|
+
return this._ensureReaderValid(), this._store === void 0 && (this._store = new X()), this._store;
|
|
646
646
|
}
|
|
647
647
|
get delayedStore() {
|
|
648
|
-
return this._ensureReaderValid(), this._delayedStore === void 0 && (this._delayedStore = new
|
|
648
|
+
return this._ensureReaderValid(), this._delayedStore === void 0 && (this._delayedStore = new X()), this._delayedStore;
|
|
649
649
|
}
|
|
650
650
|
addObserver(e) {
|
|
651
651
|
const t = !this._observers.has(e) && this._updateCount > 0;
|
|
@@ -657,7 +657,7 @@ class y extends fe {
|
|
|
657
657
|
debugGetState() {
|
|
658
658
|
return {
|
|
659
659
|
state: this._state,
|
|
660
|
-
stateStr:
|
|
660
|
+
stateStr: Wt(this._state),
|
|
661
661
|
updateCount: this._updateCount,
|
|
662
662
|
isComputing: this._isComputing,
|
|
663
663
|
dependencies: this._dependencies,
|
|
@@ -678,14 +678,26 @@ class y extends fe {
|
|
|
678
678
|
i.handleChange(this, n);
|
|
679
679
|
}
|
|
680
680
|
}
|
|
681
|
-
function
|
|
682
|
-
return e !== void 0 ? new
|
|
681
|
+
function N(s, e, t = T.ofCaller()) {
|
|
682
|
+
return e !== void 0 ? new C(new M(s, void 0, e), e, void 0, void 0, Z, t) : new C(new M(void 0, void 0, s), s, void 0, void 0, Z, t);
|
|
683
683
|
}
|
|
684
|
-
function
|
|
685
|
-
return new
|
|
684
|
+
function qt(s, e, t = T.ofCaller()) {
|
|
685
|
+
return new C(new M(s.owner, s.debugName, s.debugReferenceFn), e, void 0, s.onLastObserverRemoved, s.equalsFn ?? Z, t);
|
|
686
686
|
}
|
|
687
|
-
|
|
688
|
-
function
|
|
687
|
+
$t(qt);
|
|
688
|
+
function Kt(s, e, t = T.ofCaller()) {
|
|
689
|
+
let n, r;
|
|
690
|
+
n = s, r = void 0;
|
|
691
|
+
let i;
|
|
692
|
+
return new C(new M(r, void 0, n), (o) => {
|
|
693
|
+
i ? i.clear() : i = new X();
|
|
694
|
+
const d = n(o);
|
|
695
|
+
return d && i.add(d), d;
|
|
696
|
+
}, void 0, () => {
|
|
697
|
+
i && (i.dispose(), i = void 0);
|
|
698
|
+
}, Z, t);
|
|
699
|
+
}
|
|
700
|
+
function Jt(s) {
|
|
689
701
|
switch (s) {
|
|
690
702
|
case 1:
|
|
691
703
|
return "dependenciesMightHaveChanged";
|
|
@@ -697,13 +709,13 @@ function Dt(s) {
|
|
|
697
709
|
return "<unknown>";
|
|
698
710
|
}
|
|
699
711
|
}
|
|
700
|
-
class
|
|
712
|
+
class se {
|
|
701
713
|
get debugName() {
|
|
702
714
|
return this._debugNameData.getDebugName(this) ?? "(anonymous)";
|
|
703
715
|
}
|
|
704
716
|
constructor(e, t, n, r) {
|
|
705
717
|
var i, o;
|
|
706
|
-
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 = (i = this._changeTracker) == null ? void 0 : i.createChangeSummary(void 0), (o =
|
|
718
|
+
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 = (i = this._changeTracker) == null ? void 0 : i.createChangeSummary(void 0), (o = m()) == null || o.handleAutorunCreated(this, r), this._run();
|
|
707
719
|
}
|
|
708
720
|
dispose() {
|
|
709
721
|
var e;
|
|
@@ -711,7 +723,7 @@ class Q {
|
|
|
711
723
|
this._disposed = !0;
|
|
712
724
|
for (const t of this._dependencies)
|
|
713
725
|
t.removeObserver(this);
|
|
714
|
-
this._dependencies.clear(), this._store !== void 0 && this._store.dispose(), this._delayedStore !== void 0 && this._delayedStore.dispose(), (e =
|
|
726
|
+
this._dependencies.clear(), this._store !== void 0 && this._store.dispose(), this._delayedStore !== void 0 && this._delayedStore.dispose(), (e = m()) == null || e.handleAutorunDisposed(this);
|
|
715
727
|
}
|
|
716
728
|
}
|
|
717
729
|
_run() {
|
|
@@ -720,19 +732,19 @@ class Q {
|
|
|
720
732
|
this._dependenciesToBeRemoved = this._dependencies, this._dependencies = e, this._state = 3;
|
|
721
733
|
try {
|
|
722
734
|
if (!this._disposed) {
|
|
723
|
-
(t =
|
|
735
|
+
(t = m()) == null || t.handleAutorunStarted(this);
|
|
724
736
|
const o = this._changeSummary, d = this._delayedStore;
|
|
725
737
|
d !== void 0 && (this._delayedStore = void 0);
|
|
726
738
|
try {
|
|
727
739
|
this._isRunning = !0, this._changeTracker && ((r = (n = this._changeTracker).beforeUpdate) == null || r.call(n, this, o), this._changeSummary = this._changeTracker.createChangeSummary(o)), this._store !== void 0 && (this._store.dispose(), this._store = void 0), this._runFn(this, o);
|
|
728
|
-
} catch (
|
|
729
|
-
|
|
740
|
+
} catch (c) {
|
|
741
|
+
ne(c);
|
|
730
742
|
} finally {
|
|
731
743
|
this._isRunning = !1, d !== void 0 && d.dispose();
|
|
732
744
|
}
|
|
733
745
|
}
|
|
734
746
|
} finally {
|
|
735
|
-
this._disposed || (i =
|
|
747
|
+
this._disposed || (i = m()) == null || i.handleAutorunFinished(this);
|
|
736
748
|
for (const o of this._dependenciesToBeRemoved)
|
|
737
749
|
o.removeObserver(this);
|
|
738
750
|
this._dependenciesToBeRemoved.clear();
|
|
@@ -767,7 +779,7 @@ class Q {
|
|
|
767
779
|
handleChange(e, t) {
|
|
768
780
|
var n;
|
|
769
781
|
if (this._isDependency(e)) {
|
|
770
|
-
(n =
|
|
782
|
+
(n = m()) == null || n.handleAutorunDependencyChanged(this, e, t);
|
|
771
783
|
try {
|
|
772
784
|
(this._changeTracker ? this._changeTracker.handleChange({
|
|
773
785
|
changedObservable: e,
|
|
@@ -775,7 +787,7 @@ class Q {
|
|
|
775
787
|
didChange: (i) => i === e
|
|
776
788
|
}, this._changeSummary) : !0) && (this._state = 2);
|
|
777
789
|
} catch (r) {
|
|
778
|
-
|
|
790
|
+
ne(r);
|
|
779
791
|
}
|
|
780
792
|
}
|
|
781
793
|
}
|
|
@@ -785,7 +797,7 @@ class Q {
|
|
|
785
797
|
// IReader implementation
|
|
786
798
|
_ensureNoRunning() {
|
|
787
799
|
if (!this._isRunning)
|
|
788
|
-
throw new
|
|
800
|
+
throw new I("The reader object cannot be used outside its compute function!");
|
|
789
801
|
}
|
|
790
802
|
readObservable(e) {
|
|
791
803
|
if (this._ensureNoRunning(), this._disposed)
|
|
@@ -796,13 +808,13 @@ class Q {
|
|
|
796
808
|
}
|
|
797
809
|
get store() {
|
|
798
810
|
if (this._ensureNoRunning(), this._disposed)
|
|
799
|
-
throw new
|
|
800
|
-
return this._store === void 0 && (this._store = new
|
|
811
|
+
throw new I("Cannot access store after dispose");
|
|
812
|
+
return this._store === void 0 && (this._store = new X()), this._store;
|
|
801
813
|
}
|
|
802
814
|
get delayedStore() {
|
|
803
815
|
if (this._ensureNoRunning(), this._disposed)
|
|
804
|
-
throw new
|
|
805
|
-
return this._delayedStore === void 0 && (this._delayedStore = new
|
|
816
|
+
throw new I("Cannot access store after dispose");
|
|
817
|
+
return this._delayedStore === void 0 && (this._delayedStore = new X()), this._delayedStore;
|
|
806
818
|
}
|
|
807
819
|
debugGetState() {
|
|
808
820
|
return {
|
|
@@ -810,42 +822,42 @@ class Q {
|
|
|
810
822
|
updateCount: this._updateCount,
|
|
811
823
|
dependencies: this._dependencies,
|
|
812
824
|
state: this._state,
|
|
813
|
-
stateStr:
|
|
825
|
+
stateStr: Jt(this._state)
|
|
814
826
|
};
|
|
815
827
|
}
|
|
816
828
|
debugRerun() {
|
|
817
829
|
this._isRunning ? this._state = 2 : this._run();
|
|
818
830
|
}
|
|
819
831
|
}
|
|
820
|
-
function
|
|
821
|
-
return new
|
|
832
|
+
function Ye(s, e = T.ofCaller()) {
|
|
833
|
+
return new se(new M(void 0, void 0, s), s, void 0, e);
|
|
822
834
|
}
|
|
823
|
-
function
|
|
835
|
+
function ke(s) {
|
|
824
836
|
const e = new Error("BugIndicatingErrorRecovery: " + s);
|
|
825
|
-
|
|
837
|
+
fe(e), console.error("recovered from an error that indicates a bug", e);
|
|
826
838
|
}
|
|
827
|
-
function
|
|
828
|
-
const t = new
|
|
839
|
+
function Qe(s, e) {
|
|
840
|
+
const t = new et(s, e);
|
|
829
841
|
try {
|
|
830
842
|
s(t);
|
|
831
843
|
} finally {
|
|
832
844
|
t.finish();
|
|
833
845
|
}
|
|
834
846
|
}
|
|
835
|
-
function
|
|
836
|
-
s ? e(s) :
|
|
847
|
+
function Zt(s, e, t) {
|
|
848
|
+
s ? e(s) : Qe(e, t);
|
|
837
849
|
}
|
|
838
|
-
class
|
|
850
|
+
class et {
|
|
839
851
|
constructor(e, t) {
|
|
840
852
|
var n;
|
|
841
|
-
this._fn = e, this._getDebugName = t, this._updatingObservers = [], (n =
|
|
853
|
+
this._fn = e, this._getDebugName = t, this._updatingObservers = [], (n = m()) == null || n.handleBeginTransaction(this);
|
|
842
854
|
}
|
|
843
855
|
getDebugName() {
|
|
844
|
-
return this._getDebugName ? this._getDebugName() :
|
|
856
|
+
return this._getDebugName ? this._getDebugName() : Ce(this._fn);
|
|
845
857
|
}
|
|
846
858
|
updateObserver(e, t) {
|
|
847
859
|
if (!this._updatingObservers) {
|
|
848
|
-
|
|
860
|
+
ke("Transaction already finished!"), Qe((n) => {
|
|
849
861
|
n.updateObserver(e, t);
|
|
850
862
|
});
|
|
851
863
|
return;
|
|
@@ -856,30 +868,30 @@ class Ue {
|
|
|
856
868
|
var t;
|
|
857
869
|
const e = this._updatingObservers;
|
|
858
870
|
if (!e) {
|
|
859
|
-
|
|
871
|
+
ke("transaction.finish() has already been called!");
|
|
860
872
|
return;
|
|
861
873
|
}
|
|
862
874
|
for (let n = 0; n < e.length; n++) {
|
|
863
875
|
const { observer: r, observable: i } = e[n];
|
|
864
876
|
r.endUpdate(i);
|
|
865
877
|
}
|
|
866
|
-
this._updatingObservers = null, (t =
|
|
878
|
+
this._updatingObservers = null, (t = m()) == null || t.handleEndTransaction(this);
|
|
867
879
|
}
|
|
868
880
|
debugGetUpdatingObservers() {
|
|
869
881
|
return this._updatingObservers;
|
|
870
882
|
}
|
|
871
883
|
}
|
|
872
|
-
function
|
|
884
|
+
function v(s, e, t = T.ofCaller()) {
|
|
873
885
|
let n;
|
|
874
|
-
return typeof s == "string" ? n = new
|
|
886
|
+
return typeof s == "string" ? n = new M(void 0, s, void 0) : n = new M(s, void 0, void 0), new re(n, e, Z, t);
|
|
875
887
|
}
|
|
876
|
-
class
|
|
888
|
+
class re extends xe {
|
|
877
889
|
get debugName() {
|
|
878
890
|
return this._debugNameData.getDebugName(this) ?? "ObservableValue";
|
|
879
891
|
}
|
|
880
892
|
constructor(e, t, n, r) {
|
|
881
893
|
var i;
|
|
882
|
-
super(r), this._debugNameData = e, this._equalityComparator = n, this._value = t, (i =
|
|
894
|
+
super(r), this._debugNameData = e, this._equalityComparator = n, this._value = t, (i = m()) == null || i.handleObservableUpdated(this, { hadValue: !1, newValue: t, change: void 0, didChange: !0, oldValue: void 0 });
|
|
883
895
|
}
|
|
884
896
|
get() {
|
|
885
897
|
return this._value;
|
|
@@ -889,11 +901,11 @@ class ee extends fe {
|
|
|
889
901
|
if (n === void 0 && this._equalityComparator(this._value, e))
|
|
890
902
|
return;
|
|
891
903
|
let r;
|
|
892
|
-
t || (t = r = new
|
|
904
|
+
t || (t = r = new et(() => {
|
|
893
905
|
}, () => `Setting ${this.debugName}`));
|
|
894
906
|
try {
|
|
895
907
|
const o = this._value;
|
|
896
|
-
this._setValue(e), (i =
|
|
908
|
+
this._setValue(e), (i = m()) == null || i.handleObservableUpdated(this, { oldValue: o, newValue: e, change: n, didChange: !0, hadValue: !0 });
|
|
897
909
|
for (const d of this._observers)
|
|
898
910
|
t.updateObserver(d, this), d.handleChange(this, n);
|
|
899
911
|
} finally {
|
|
@@ -915,25 +927,25 @@ class ee extends fe {
|
|
|
915
927
|
this._value = e;
|
|
916
928
|
}
|
|
917
929
|
}
|
|
918
|
-
function
|
|
930
|
+
function De(...s) {
|
|
919
931
|
let e, t, n, r;
|
|
920
|
-
return s.length === 2 ? [t, n] = s : [e, t, n, r] = s, new
|
|
932
|
+
return s.length === 2 ? [t, n] = s : [e, t, n, r] = s, new A(new M(e, void 0, n), t, n, () => A.globalTransaction, Z, r ?? T.ofCaller());
|
|
921
933
|
}
|
|
922
|
-
class
|
|
934
|
+
class A extends xe {
|
|
923
935
|
constructor(e, t, n, r, i, o) {
|
|
924
936
|
super(o), this._debugNameData = e, this.event = t, this._getValue = n, this._getTransaction = r, this._equalityComparator = i, this._hasValue = !1, this.handleEvent = (d) => {
|
|
925
|
-
var
|
|
926
|
-
const
|
|
927
|
-
let
|
|
928
|
-
g && (this._value =
|
|
929
|
-
var
|
|
930
|
-
(
|
|
931
|
-
for (const
|
|
932
|
-
|
|
937
|
+
var x;
|
|
938
|
+
const c = this._getValue(d), h = this._value, g = !this._hasValue || !this._equalityComparator(h, c);
|
|
939
|
+
let _ = !1;
|
|
940
|
+
g && (this._value = c, this._hasValue && (_ = !0, Zt(this._getTransaction(), (w) => {
|
|
941
|
+
var U;
|
|
942
|
+
(U = m()) == null || U.handleObservableUpdated(this, { oldValue: h, newValue: c, change: void 0, didChange: g, hadValue: this._hasValue });
|
|
943
|
+
for (const D of this._observers)
|
|
944
|
+
w.updateObserver(D, this), D.handleChange(this, void 0);
|
|
933
945
|
}, () => {
|
|
934
|
-
const
|
|
935
|
-
return "Event fired" + (
|
|
936
|
-
})), this._hasValue = !0),
|
|
946
|
+
const w = this.getDebugName();
|
|
947
|
+
return "Event fired" + (w ? `: ${w}` : "");
|
|
948
|
+
})), this._hasValue = !0), _ || (x = m()) == null || x.handleObservableUpdated(this, { oldValue: h, newValue: c, change: void 0, didChange: g, hadValue: this._hasValue });
|
|
937
949
|
};
|
|
938
950
|
}
|
|
939
951
|
getDebugName() {
|
|
@@ -960,39 +972,39 @@ class k extends fe {
|
|
|
960
972
|
}
|
|
961
973
|
}
|
|
962
974
|
(function(s) {
|
|
963
|
-
s.Observer =
|
|
975
|
+
s.Observer = A;
|
|
964
976
|
function e(t, n) {
|
|
965
977
|
let r = !1;
|
|
966
|
-
|
|
978
|
+
A.globalTransaction === void 0 && (A.globalTransaction = t, r = !0);
|
|
967
979
|
try {
|
|
968
980
|
n();
|
|
969
981
|
} finally {
|
|
970
|
-
r && (
|
|
982
|
+
r && (A.globalTransaction = void 0);
|
|
971
983
|
}
|
|
972
984
|
}
|
|
973
985
|
s.batchEventsGlobally = e;
|
|
974
|
-
})(
|
|
975
|
-
function
|
|
976
|
-
const e = new
|
|
977
|
-
return s.addObserver(e),
|
|
986
|
+
})(De || (De = {}));
|
|
987
|
+
function Xt(s) {
|
|
988
|
+
const e = new tt(!1, void 0);
|
|
989
|
+
return s.addObserver(e), Xe(() => {
|
|
978
990
|
s.removeObserver(e);
|
|
979
991
|
});
|
|
980
992
|
}
|
|
981
|
-
|
|
982
|
-
function
|
|
983
|
-
const t = new
|
|
993
|
+
jt(Xt);
|
|
994
|
+
function Yt(s, e) {
|
|
995
|
+
const t = new tt(!0, e);
|
|
984
996
|
s.addObserver(t);
|
|
985
997
|
try {
|
|
986
998
|
t.beginUpdate(s);
|
|
987
999
|
} finally {
|
|
988
1000
|
t.endUpdate(s);
|
|
989
1001
|
}
|
|
990
|
-
return
|
|
1002
|
+
return Xe(() => {
|
|
991
1003
|
s.removeObserver(t);
|
|
992
1004
|
});
|
|
993
1005
|
}
|
|
994
|
-
|
|
995
|
-
class
|
|
1006
|
+
Ut(Yt);
|
|
1007
|
+
class tt {
|
|
996
1008
|
constructor(e, t) {
|
|
997
1009
|
this._forceRecompute = e, this._handleValue = t, this._counter = 0;
|
|
998
1010
|
}
|
|
@@ -1007,11 +1019,11 @@ class je {
|
|
|
1007
1019
|
handleChange(e, t) {
|
|
1008
1020
|
}
|
|
1009
1021
|
}
|
|
1010
|
-
let
|
|
1011
|
-
function
|
|
1012
|
-
|
|
1022
|
+
let te;
|
|
1023
|
+
function Qt(s) {
|
|
1024
|
+
te || (te = new en(), We(te)), te.addFilteredObj(s);
|
|
1013
1025
|
}
|
|
1014
|
-
class
|
|
1026
|
+
class en {
|
|
1015
1027
|
constructor() {
|
|
1016
1028
|
this.indentation = 0, this.changedObservablesSets = /* @__PURE__ */ new WeakMap();
|
|
1017
1029
|
}
|
|
@@ -1023,32 +1035,32 @@ class Et {
|
|
|
1023
1035
|
return ((t = this._filteredObjects) == null ? void 0 : t.has(e)) ?? !0;
|
|
1024
1036
|
}
|
|
1025
1037
|
textToConsoleArgs(e) {
|
|
1026
|
-
return
|
|
1027
|
-
|
|
1038
|
+
return tn([
|
|
1039
|
+
j(rn("| ", this.indentation)),
|
|
1028
1040
|
e
|
|
1029
1041
|
]);
|
|
1030
1042
|
}
|
|
1031
1043
|
formatInfo(e) {
|
|
1032
1044
|
return e.hadValue ? e.didChange ? [
|
|
1033
|
-
|
|
1034
|
-
|
|
1045
|
+
j(" "),
|
|
1046
|
+
S(V(e.oldValue, 70), {
|
|
1035
1047
|
color: "red",
|
|
1036
1048
|
strikeThrough: !0
|
|
1037
1049
|
}),
|
|
1038
|
-
|
|
1039
|
-
|
|
1050
|
+
j(" "),
|
|
1051
|
+
S(V(e.newValue, 60), {
|
|
1040
1052
|
color: "green"
|
|
1041
1053
|
})
|
|
1042
|
-
] : [
|
|
1043
|
-
|
|
1044
|
-
|
|
1054
|
+
] : [j(" (unchanged)")] : [
|
|
1055
|
+
j(" "),
|
|
1056
|
+
S(V(e.newValue, 60), {
|
|
1045
1057
|
color: "green"
|
|
1046
1058
|
}),
|
|
1047
|
-
|
|
1059
|
+
j(" (initial)")
|
|
1048
1060
|
];
|
|
1049
1061
|
}
|
|
1050
1062
|
handleObservableCreated(e) {
|
|
1051
|
-
if (e instanceof
|
|
1063
|
+
if (e instanceof C) {
|
|
1052
1064
|
const t = e;
|
|
1053
1065
|
this.changedObservablesSets.set(t, /* @__PURE__ */ new Set());
|
|
1054
1066
|
}
|
|
@@ -1057,20 +1069,20 @@ class Et {
|
|
|
1057
1069
|
}
|
|
1058
1070
|
handleObservableUpdated(e, t) {
|
|
1059
1071
|
if (this._isIncluded(e)) {
|
|
1060
|
-
if (e instanceof
|
|
1072
|
+
if (e instanceof C) {
|
|
1061
1073
|
this._handleDerivedRecomputed(e, t);
|
|
1062
1074
|
return;
|
|
1063
1075
|
}
|
|
1064
1076
|
console.log(...this.textToConsoleArgs([
|
|
1065
|
-
|
|
1066
|
-
|
|
1077
|
+
P("observable value changed"),
|
|
1078
|
+
S(e.debugName, { color: "BlueViolet" }),
|
|
1067
1079
|
...this.formatInfo(t)
|
|
1068
1080
|
]));
|
|
1069
1081
|
}
|
|
1070
1082
|
}
|
|
1071
1083
|
formatChanges(e) {
|
|
1072
1084
|
if (e.size !== 0)
|
|
1073
|
-
return
|
|
1085
|
+
return S(" (changed deps: " + [...e].map((t) => t.debugName).join(", ") + ")", { color: "gray" });
|
|
1074
1086
|
}
|
|
1075
1087
|
handleDerivedDependencyChanged(e, t, n) {
|
|
1076
1088
|
var r;
|
|
@@ -1081,8 +1093,8 @@ class Et {
|
|
|
1081
1093
|
return;
|
|
1082
1094
|
const n = this.changedObservablesSets.get(e);
|
|
1083
1095
|
n && (console.log(...this.textToConsoleArgs([
|
|
1084
|
-
|
|
1085
|
-
|
|
1096
|
+
P("derived recomputed"),
|
|
1097
|
+
S(e.debugName, { color: "BlueViolet" }),
|
|
1086
1098
|
...this.formatInfo(t),
|
|
1087
1099
|
this.formatChanges(n),
|
|
1088
1100
|
{ data: [{ fn: e._debugNameData.referenceFn ?? e._computeFn }] }
|
|
@@ -1090,14 +1102,14 @@ class Et {
|
|
|
1090
1102
|
}
|
|
1091
1103
|
handleDerivedCleared(e) {
|
|
1092
1104
|
this._isIncluded(e) && console.log(...this.textToConsoleArgs([
|
|
1093
|
-
|
|
1094
|
-
|
|
1105
|
+
P("derived cleared"),
|
|
1106
|
+
S(e.debugName, { color: "BlueViolet" })
|
|
1095
1107
|
]));
|
|
1096
1108
|
}
|
|
1097
1109
|
handleFromEventObservableTriggered(e, t) {
|
|
1098
1110
|
this._isIncluded(e) && console.log(...this.textToConsoleArgs([
|
|
1099
|
-
|
|
1100
|
-
|
|
1111
|
+
P("observable from event triggered"),
|
|
1112
|
+
S(e.debugName, { color: "BlueViolet" }),
|
|
1101
1113
|
...this.formatInfo(t),
|
|
1102
1114
|
{ data: [{ fn: e._getValue }] }
|
|
1103
1115
|
]));
|
|
@@ -1113,8 +1125,8 @@ class Et {
|
|
|
1113
1125
|
handleAutorunStarted(e) {
|
|
1114
1126
|
const t = this.changedObservablesSets.get(e);
|
|
1115
1127
|
t && (this._isIncluded(e) && console.log(...this.textToConsoleArgs([
|
|
1116
|
-
|
|
1117
|
-
|
|
1128
|
+
P("autorun"),
|
|
1129
|
+
S(e.debugName, { color: "BlueViolet" }),
|
|
1118
1130
|
this.formatChanges(t),
|
|
1119
1131
|
{ data: [{ fn: e._debugNameData.referenceFn ?? e._runFn }] }
|
|
1120
1132
|
])), t.clear(), this.indentation++);
|
|
@@ -1125,8 +1137,8 @@ class Et {
|
|
|
1125
1137
|
handleBeginTransaction(e) {
|
|
1126
1138
|
let t = e.getDebugName();
|
|
1127
1139
|
t === void 0 && (t = ""), this._isIncluded(e) && console.log(...this.textToConsoleArgs([
|
|
1128
|
-
|
|
1129
|
-
|
|
1140
|
+
P("transaction"),
|
|
1141
|
+
S(t, { color: "BlueViolet" }),
|
|
1130
1142
|
{ data: [{ fn: e._fn }] }
|
|
1131
1143
|
])), this.indentation++;
|
|
1132
1144
|
}
|
|
@@ -1134,7 +1146,7 @@ class Et {
|
|
|
1134
1146
|
this.indentation--;
|
|
1135
1147
|
}
|
|
1136
1148
|
}
|
|
1137
|
-
function
|
|
1149
|
+
function tn(s) {
|
|
1138
1150
|
const e = new Array(), t = [];
|
|
1139
1151
|
let n = "";
|
|
1140
1152
|
function r(o) {
|
|
@@ -1147,13 +1159,13 @@ function zt(s) {
|
|
|
1147
1159
|
const i = [n, ...e];
|
|
1148
1160
|
return i.push(...t), i;
|
|
1149
1161
|
}
|
|
1150
|
-
function
|
|
1151
|
-
return
|
|
1162
|
+
function j(s) {
|
|
1163
|
+
return S(s, { color: "black" });
|
|
1152
1164
|
}
|
|
1153
|
-
function
|
|
1154
|
-
return
|
|
1165
|
+
function P(s) {
|
|
1166
|
+
return S(on(`${s}: `, 10), { color: "black", bold: !0 });
|
|
1155
1167
|
}
|
|
1156
|
-
function
|
|
1168
|
+
function S(s, e = {
|
|
1157
1169
|
color: "black"
|
|
1158
1170
|
}) {
|
|
1159
1171
|
function t(r) {
|
|
@@ -1167,7 +1179,7 @@ function C(s, e = {
|
|
|
1167
1179
|
style: t(n)
|
|
1168
1180
|
};
|
|
1169
1181
|
}
|
|
1170
|
-
function
|
|
1182
|
+
function V(s, e) {
|
|
1171
1183
|
switch (typeof s) {
|
|
1172
1184
|
case "number":
|
|
1173
1185
|
return "" + s;
|
|
@@ -1178,7 +1190,7 @@ function T(s, e) {
|
|
|
1178
1190
|
case "undefined":
|
|
1179
1191
|
return "undefined";
|
|
1180
1192
|
case "object":
|
|
1181
|
-
return s === null ? "null" : Array.isArray(s) ?
|
|
1193
|
+
return s === null ? "null" : Array.isArray(s) ? nn(s, e) : sn(s, e);
|
|
1182
1194
|
case "symbol":
|
|
1183
1195
|
return s.toString();
|
|
1184
1196
|
case "function":
|
|
@@ -1187,50 +1199,50 @@ function T(s, e) {
|
|
|
1187
1199
|
return "" + s;
|
|
1188
1200
|
}
|
|
1189
1201
|
}
|
|
1190
|
-
function
|
|
1202
|
+
function nn(s, e) {
|
|
1191
1203
|
let t = "[ ", n = !0;
|
|
1192
1204
|
for (const r of s) {
|
|
1193
1205
|
if (n || (t += ", "), t.length - 5 > e) {
|
|
1194
1206
|
t += "...";
|
|
1195
1207
|
break;
|
|
1196
1208
|
}
|
|
1197
|
-
n = !1, t += `${
|
|
1209
|
+
n = !1, t += `${V(r, e - t.length)}`;
|
|
1198
1210
|
}
|
|
1199
1211
|
return t += " ]", t;
|
|
1200
1212
|
}
|
|
1201
|
-
function
|
|
1213
|
+
function sn(s, e) {
|
|
1202
1214
|
if (typeof s.toString == "function" && s.toString !== Object.prototype.toString) {
|
|
1203
1215
|
const i = s.toString();
|
|
1204
1216
|
return i.length <= e ? i : i.substring(0, e - 3) + "...";
|
|
1205
1217
|
}
|
|
1206
|
-
const t =
|
|
1218
|
+
const t = qe(s);
|
|
1207
1219
|
let n = t ? t + "(" : "{ ", r = !0;
|
|
1208
1220
|
for (const [i, o] of Object.entries(s)) {
|
|
1209
1221
|
if (r || (n += ", "), n.length - 5 > e) {
|
|
1210
1222
|
n += "...";
|
|
1211
1223
|
break;
|
|
1212
1224
|
}
|
|
1213
|
-
r = !1, n += `${i}: ${
|
|
1225
|
+
r = !1, n += `${i}: ${V(o, e - n.length)}`;
|
|
1214
1226
|
}
|
|
1215
1227
|
return n += t ? ")" : " }", n;
|
|
1216
1228
|
}
|
|
1217
|
-
function
|
|
1229
|
+
function rn(s, e) {
|
|
1218
1230
|
let t = "";
|
|
1219
1231
|
for (let n = 1; n <= e; n++)
|
|
1220
1232
|
t += s;
|
|
1221
1233
|
return t;
|
|
1222
1234
|
}
|
|
1223
|
-
function
|
|
1235
|
+
function on(s, e) {
|
|
1224
1236
|
for (; s.length < e; )
|
|
1225
1237
|
s += " ";
|
|
1226
1238
|
return s;
|
|
1227
1239
|
}
|
|
1228
|
-
class
|
|
1240
|
+
class ie {
|
|
1229
1241
|
static createHost(e, t) {
|
|
1230
|
-
return new
|
|
1242
|
+
return new ie(e, t);
|
|
1231
1243
|
}
|
|
1232
1244
|
static createClient(e, t) {
|
|
1233
|
-
return new
|
|
1245
|
+
return new ie(e, t);
|
|
1234
1246
|
}
|
|
1235
1247
|
constructor(e, t) {
|
|
1236
1248
|
this._channelFactory = e, this._getHandler = t, this._channel = this._channelFactory({
|
|
@@ -1251,10 +1263,10 @@ class te {
|
|
|
1251
1263
|
});
|
|
1252
1264
|
const n = new Proxy({}, {
|
|
1253
1265
|
get: (i, o) => async (...d) => {
|
|
1254
|
-
const
|
|
1255
|
-
if (
|
|
1256
|
-
throw
|
|
1257
|
-
return
|
|
1266
|
+
const c = await this._channel.sendRequest([o, d]);
|
|
1267
|
+
if (c.type === "error")
|
|
1268
|
+
throw c.value;
|
|
1269
|
+
return c.value;
|
|
1258
1270
|
}
|
|
1259
1271
|
}), r = new Proxy({}, {
|
|
1260
1272
|
get: (i, o) => (...d) => {
|
|
@@ -1264,27 +1276,27 @@ class te {
|
|
|
1264
1276
|
this.api = { notifications: r, requests: n };
|
|
1265
1277
|
}
|
|
1266
1278
|
}
|
|
1267
|
-
function
|
|
1279
|
+
function an(s, e) {
|
|
1268
1280
|
const t = globalThis;
|
|
1269
1281
|
let n = [], r;
|
|
1270
|
-
const { channel: i, handler: o } =
|
|
1271
|
-
sendNotification: (
|
|
1272
|
-
r ? r.sendNotification(
|
|
1282
|
+
const { channel: i, handler: o } = dn({
|
|
1283
|
+
sendNotification: (c) => {
|
|
1284
|
+
r ? r.sendNotification(c) : n.push(c);
|
|
1273
1285
|
}
|
|
1274
1286
|
});
|
|
1275
1287
|
let d;
|
|
1276
|
-
return (t.$$debugValueEditor_debugChannels ?? (t.$$debugValueEditor_debugChannels = {}))[s] = (
|
|
1277
|
-
d = e(), r =
|
|
1288
|
+
return (t.$$debugValueEditor_debugChannels ?? (t.$$debugValueEditor_debugChannels = {}))[s] = (c) => {
|
|
1289
|
+
d = e(), r = c;
|
|
1278
1290
|
for (const h of n)
|
|
1279
|
-
|
|
1291
|
+
c.sendNotification(h);
|
|
1280
1292
|
return n = [], o;
|
|
1281
|
-
},
|
|
1293
|
+
}, ie.createClient(i, () => {
|
|
1282
1294
|
if (!d)
|
|
1283
1295
|
throw new Error("Not supported");
|
|
1284
1296
|
return d;
|
|
1285
1297
|
});
|
|
1286
1298
|
}
|
|
1287
|
-
function
|
|
1299
|
+
function dn(s) {
|
|
1288
1300
|
let e;
|
|
1289
1301
|
return {
|
|
1290
1302
|
channel: (n) => (e = n, {
|
|
@@ -1300,7 +1312,7 @@ function Pt(s) {
|
|
|
1300
1312
|
}
|
|
1301
1313
|
};
|
|
1302
1314
|
}
|
|
1303
|
-
class
|
|
1315
|
+
class cn {
|
|
1304
1316
|
constructor() {
|
|
1305
1317
|
this._timeout = void 0;
|
|
1306
1318
|
}
|
|
@@ -1313,17 +1325,17 @@ class Gt {
|
|
|
1313
1325
|
this._timeout !== void 0 && clearTimeout(this._timeout);
|
|
1314
1326
|
}
|
|
1315
1327
|
}
|
|
1316
|
-
function
|
|
1328
|
+
function nt(s, e) {
|
|
1317
1329
|
for (const t in e)
|
|
1318
|
-
s[t] && typeof s[t] == "object" && e[t] && typeof e[t] == "object" ?
|
|
1330
|
+
s[t] && typeof s[t] == "object" && e[t] && typeof e[t] == "object" ? nt(s[t], e[t]) : s[t] = e[t];
|
|
1319
1331
|
}
|
|
1320
|
-
function
|
|
1332
|
+
function st(s, e) {
|
|
1321
1333
|
for (const t in e)
|
|
1322
|
-
e[t] === null ? delete s[t] : s[t] && typeof s[t] == "object" && e[t] && typeof e[t] == "object" ?
|
|
1334
|
+
e[t] === null ? delete s[t] : s[t] && typeof s[t] == "object" && e[t] && typeof e[t] == "object" ? st(s[t], e[t]) : s[t] = e[t];
|
|
1323
1335
|
}
|
|
1324
|
-
class
|
|
1336
|
+
class $ {
|
|
1325
1337
|
static getInstance() {
|
|
1326
|
-
return
|
|
1338
|
+
return $._instance === void 0 && ($._instance = new $()), $._instance;
|
|
1327
1339
|
}
|
|
1328
1340
|
getTransactionState() {
|
|
1329
1341
|
const e = [], t = [...this._activeTransactions];
|
|
@@ -1345,7 +1357,7 @@ class M {
|
|
|
1345
1357
|
_getObservableInfo(e) {
|
|
1346
1358
|
const t = this._instanceInfos.get(e);
|
|
1347
1359
|
if (!t) {
|
|
1348
|
-
|
|
1360
|
+
fe(new I("No info found"));
|
|
1349
1361
|
return;
|
|
1350
1362
|
}
|
|
1351
1363
|
return t;
|
|
@@ -1353,23 +1365,23 @@ class M {
|
|
|
1353
1365
|
_getAutorunInfo(e) {
|
|
1354
1366
|
const t = this._instanceInfos.get(e);
|
|
1355
1367
|
if (!t) {
|
|
1356
|
-
|
|
1368
|
+
fe(new I("No info found"));
|
|
1357
1369
|
return;
|
|
1358
1370
|
}
|
|
1359
1371
|
return t;
|
|
1360
1372
|
}
|
|
1361
1373
|
_getInfo(e, t) {
|
|
1362
|
-
if (e instanceof
|
|
1374
|
+
if (e instanceof C) {
|
|
1363
1375
|
const n = [...e.debugGetObservers()];
|
|
1364
|
-
for (const
|
|
1365
|
-
t(
|
|
1376
|
+
for (const c of n)
|
|
1377
|
+
t(c);
|
|
1366
1378
|
const r = this._getObservableInfo(e);
|
|
1367
1379
|
if (!r)
|
|
1368
1380
|
return;
|
|
1369
|
-
const i = e.debugGetState(), o = { name: e.debugName, instanceId: r.instanceId, updateCount: i.updateCount }, d = [...r.changedObservables].map((
|
|
1381
|
+
const i = e.debugGetState(), o = { name: e.debugName, instanceId: r.instanceId, updateCount: i.updateCount }, d = [...r.changedObservables].map((c) => {
|
|
1370
1382
|
var h;
|
|
1371
|
-
return (h = this._instanceInfos.get(
|
|
1372
|
-
}).filter(
|
|
1383
|
+
return (h = this._instanceInfos.get(c)) == null ? void 0 : h.instanceId;
|
|
1384
|
+
}).filter(Y);
|
|
1373
1385
|
if (i.isComputing)
|
|
1374
1386
|
return { ...o, type: "observable/derived", state: "updating", changedDependencies: d, initialComputation: !1 };
|
|
1375
1387
|
switch (i.state) {
|
|
@@ -1382,7 +1394,7 @@ class M {
|
|
|
1382
1394
|
case 1:
|
|
1383
1395
|
return { ...o, type: "observable/derived", state: "possiblyStale" };
|
|
1384
1396
|
}
|
|
1385
|
-
} else if (e instanceof
|
|
1397
|
+
} else if (e instanceof se) {
|
|
1386
1398
|
const n = this._getAutorunInfo(e);
|
|
1387
1399
|
if (!n)
|
|
1388
1400
|
return;
|
|
@@ -1406,14 +1418,14 @@ class M {
|
|
|
1406
1418
|
}
|
|
1407
1419
|
_formatObserver(e) {
|
|
1408
1420
|
var n;
|
|
1409
|
-
if (e instanceof
|
|
1421
|
+
if (e instanceof C)
|
|
1410
1422
|
return { name: e.toString(), instanceId: (n = this._getObservableInfo(e)) == null ? void 0 : n.instanceId };
|
|
1411
1423
|
const t = this._getAutorunInfo(e);
|
|
1412
1424
|
if (t)
|
|
1413
1425
|
return { name: e.toString(), instanceId: t.instanceId };
|
|
1414
1426
|
}
|
|
1415
1427
|
constructor() {
|
|
1416
|
-
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 =
|
|
1428
|
+
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 = an("observableDevTools", () => ({
|
|
1417
1429
|
notifications: {
|
|
1418
1430
|
setDeclarationIdFilter: (e) => {
|
|
1419
1431
|
},
|
|
@@ -1436,29 +1448,29 @@ class M {
|
|
|
1436
1448
|
},
|
|
1437
1449
|
getSummarizedInstances: () => null,
|
|
1438
1450
|
getObservableValueInfo: (e) => ({
|
|
1439
|
-
observers: [...this._aliveInstances.get(e).debugGetObservers()].map((n) => this._formatObserver(n)).filter(
|
|
1451
|
+
observers: [...this._aliveInstances.get(e).debugGetObservers()].map((n) => this._formatObserver(n)).filter(Y)
|
|
1440
1452
|
}),
|
|
1441
1453
|
getDerivedInfo: (e) => {
|
|
1442
1454
|
const t = this._aliveInstances.get(e);
|
|
1443
1455
|
return {
|
|
1444
|
-
dependencies: [...t.debugGetState().dependencies].map((n) => this._formatObservable(n)).filter(
|
|
1445
|
-
observers: [...t.debugGetObservers()].map((n) => this._formatObserver(n)).filter(
|
|
1456
|
+
dependencies: [...t.debugGetState().dependencies].map((n) => this._formatObservable(n)).filter(Y),
|
|
1457
|
+
observers: [...t.debugGetObservers()].map((n) => this._formatObserver(n)).filter(Y)
|
|
1446
1458
|
};
|
|
1447
1459
|
},
|
|
1448
1460
|
getAutorunInfo: (e) => ({
|
|
1449
|
-
dependencies: [...this._aliveInstances.get(e).debugGetState().dependencies].map((n) => this._formatObservable(n)).filter(
|
|
1461
|
+
dependencies: [...this._aliveInstances.get(e).debugGetState().dependencies].map((n) => this._formatObservable(n)).filter(Y)
|
|
1450
1462
|
}),
|
|
1451
1463
|
getTransactionState: () => this.getTransactionState(),
|
|
1452
1464
|
setValue: (e, t) => {
|
|
1453
1465
|
const n = this._aliveInstances.get(e);
|
|
1454
|
-
if (n instanceof
|
|
1466
|
+
if (n instanceof C)
|
|
1455
1467
|
n.debugSetValue(t);
|
|
1456
|
-
else if (n instanceof
|
|
1468
|
+
else if (n instanceof re)
|
|
1457
1469
|
n.debugSetValue(t);
|
|
1458
|
-
else if (n instanceof
|
|
1470
|
+
else if (n instanceof A)
|
|
1459
1471
|
n.debugSetValue(t);
|
|
1460
1472
|
else
|
|
1461
|
-
throw new
|
|
1473
|
+
throw new I("Observable is not supported");
|
|
1462
1474
|
const r = [...n.debugGetObservers()];
|
|
1463
1475
|
for (const i of r)
|
|
1464
1476
|
i.beginUpdate(n);
|
|
@@ -1469,34 +1481,34 @@ class M {
|
|
|
1469
1481
|
},
|
|
1470
1482
|
getValue: (e) => {
|
|
1471
1483
|
const t = this._aliveInstances.get(e);
|
|
1472
|
-
if (t instanceof
|
|
1473
|
-
return
|
|
1474
|
-
if (t instanceof
|
|
1475
|
-
return
|
|
1484
|
+
if (t instanceof C)
|
|
1485
|
+
return V(t.debugGetState().value, 200);
|
|
1486
|
+
if (t instanceof re)
|
|
1487
|
+
return V(t.debugGetState().value, 200);
|
|
1476
1488
|
},
|
|
1477
1489
|
logValue: (e) => {
|
|
1478
1490
|
const t = this._aliveInstances.get(e);
|
|
1479
1491
|
if (t && "get" in t)
|
|
1480
1492
|
console.log("Logged Value:", t.get());
|
|
1481
1493
|
else
|
|
1482
|
-
throw new
|
|
1494
|
+
throw new I("Observable is not supported");
|
|
1483
1495
|
},
|
|
1484
1496
|
rerun: (e) => {
|
|
1485
1497
|
const t = this._aliveInstances.get(e);
|
|
1486
|
-
if (t instanceof
|
|
1498
|
+
if (t instanceof C)
|
|
1487
1499
|
t.debugRecompute();
|
|
1488
|
-
else if (t instanceof
|
|
1500
|
+
else if (t instanceof se)
|
|
1489
1501
|
t.debugRerun();
|
|
1490
1502
|
else
|
|
1491
|
-
throw new
|
|
1503
|
+
throw new I("Observable is not supported");
|
|
1492
1504
|
}
|
|
1493
1505
|
}
|
|
1494
|
-
})), this._pendingChanges = null, this._changeThrottler = new
|
|
1506
|
+
})), this._pendingChanges = null, this._changeThrottler = new cn(), this._fullState = {}, this._flushUpdates = () => {
|
|
1495
1507
|
this._pendingChanges !== null && (this._channel.api.notifications.handleChange(this._pendingChanges, !1), this._pendingChanges = null);
|
|
1496
|
-
},
|
|
1508
|
+
}, T.enable();
|
|
1497
1509
|
}
|
|
1498
1510
|
_handleChange(e) {
|
|
1499
|
-
|
|
1511
|
+
st(this._fullState, e), this._pendingChanges === null ? this._pendingChanges = e : nt(this._pendingChanges, e), this._changeThrottler.throttle(this._flushUpdates, 10);
|
|
1500
1512
|
}
|
|
1501
1513
|
_getDeclarationId(e, t) {
|
|
1502
1514
|
if (!t)
|
|
@@ -1525,7 +1537,7 @@ class M {
|
|
|
1525
1537
|
const n = this._getObservableInfo(e);
|
|
1526
1538
|
if (n) {
|
|
1527
1539
|
if (n.listenerCount === 0 && t > 0) {
|
|
1528
|
-
const r = e instanceof
|
|
1540
|
+
const r = e instanceof C ? "observable/derived" : "observable/value";
|
|
1529
1541
|
this._aliveInstances.set(n.instanceId, e), this._handleChange({
|
|
1530
1542
|
instances: {
|
|
1531
1543
|
[n.instanceId]: {
|
|
@@ -1544,12 +1556,12 @@ class M {
|
|
|
1544
1556
|
}
|
|
1545
1557
|
}
|
|
1546
1558
|
handleObservableUpdated(e, t) {
|
|
1547
|
-
if (e instanceof
|
|
1559
|
+
if (e instanceof C) {
|
|
1548
1560
|
this._handleDerivedRecomputed(e, t);
|
|
1549
1561
|
return;
|
|
1550
1562
|
}
|
|
1551
1563
|
const n = this._getObservableInfo(e);
|
|
1552
|
-
n && t.didChange && (n.lastValue =
|
|
1564
|
+
n && t.didChange && (n.lastValue = V(t.newValue, 30), n.listenerCount > 0 && this._handleChange({
|
|
1553
1565
|
instances: { [n.instanceId]: { formattedValue: n.lastValue } }
|
|
1554
1566
|
}));
|
|
1555
1567
|
}
|
|
@@ -1598,7 +1610,7 @@ class M {
|
|
|
1598
1610
|
const n = this._getObservableInfo(e);
|
|
1599
1611
|
if (!n)
|
|
1600
1612
|
return;
|
|
1601
|
-
const r =
|
|
1613
|
+
const r = V(t.newValue, 30);
|
|
1602
1614
|
n.updateCount++, n.changedObservables.clear(), n.lastValue = r, n.listenerCount > 0 && this._handleChange({
|
|
1603
1615
|
instances: { [n.instanceId]: { formattedValue: r, recomputationCount: n.updateCount } }
|
|
1604
1616
|
});
|
|
@@ -1620,57 +1632,57 @@ class M {
|
|
|
1620
1632
|
this._activeTransactions.delete(e);
|
|
1621
1633
|
}
|
|
1622
1634
|
}
|
|
1623
|
-
|
|
1624
|
-
function
|
|
1625
|
-
const t = (e == null ? void 0 : e.debugNamePostProcessor) ?? ((i) => i), n =
|
|
1626
|
-
return n ?
|
|
1635
|
+
$._instance = void 0;
|
|
1636
|
+
function ln(s, e) {
|
|
1637
|
+
const t = (e == null ? void 0 : e.debugNamePostProcessor) ?? ((i) => i), n = O.from(s, t);
|
|
1638
|
+
return n ? rt(n, 0, /* @__PURE__ */ new Set()).trim() : "";
|
|
1627
1639
|
}
|
|
1628
|
-
function
|
|
1640
|
+
function rt(s, e, t) {
|
|
1629
1641
|
const n = " ".repeat(e), r = [];
|
|
1630
1642
|
if (t.has(s.sourceObj))
|
|
1631
1643
|
return r.push(`${n}* ${s.type} ${s.name} (already listed)`), r.join(`
|
|
1632
1644
|
`);
|
|
1633
|
-
if (t.add(s.sourceObj), r.push(`${n}* ${s.type} ${s.name}:`), r.push(`${n} value: ${
|
|
1645
|
+
if (t.add(s.sourceObj), r.push(`${n}* ${s.type} ${s.name}:`), r.push(`${n} value: ${V(s.value, 50)}`), r.push(`${n} state: ${s.state}`), s.dependencies.length > 0) {
|
|
1634
1646
|
r.push(`${n} dependencies:`);
|
|
1635
1647
|
for (const o of s.dependencies)
|
|
1636
|
-
r.push(
|
|
1648
|
+
r.push(rt(o, e + 1, t));
|
|
1637
1649
|
}
|
|
1638
1650
|
return r.join(`
|
|
1639
1651
|
`);
|
|
1640
1652
|
}
|
|
1641
|
-
class
|
|
1653
|
+
class O {
|
|
1642
1654
|
static from(e, t) {
|
|
1643
|
-
if (e instanceof
|
|
1655
|
+
if (e instanceof se) {
|
|
1644
1656
|
const n = e.debugGetState();
|
|
1645
|
-
return new
|
|
1646
|
-
} else if (e instanceof
|
|
1657
|
+
return new O(e, t(e.debugName), "autorun", void 0, n.stateStr, Array.from(n.dependencies).map((r) => O.from(r, t) || O.unknown(r)));
|
|
1658
|
+
} else if (e instanceof C) {
|
|
1647
1659
|
const n = e.debugGetState();
|
|
1648
|
-
return new
|
|
1649
|
-
} else if (e instanceof
|
|
1660
|
+
return new O(e, t(e.debugName), "derived", n.value, n.stateStr, Array.from(n.dependencies).map((r) => O.from(r, t) || O.unknown(r)));
|
|
1661
|
+
} else if (e instanceof re) {
|
|
1650
1662
|
const n = e.debugGetState();
|
|
1651
|
-
return new
|
|
1652
|
-
} else if (e instanceof
|
|
1663
|
+
return new O(e, t(e.debugName), "observableValue", n.value, "upToDate", []);
|
|
1664
|
+
} else if (e instanceof A) {
|
|
1653
1665
|
const n = e.debugGetState();
|
|
1654
|
-
return new
|
|
1666
|
+
return new O(e, t(e.debugName), "fromEvent", n.value, n.hasValue ? "upToDate" : "initial", []);
|
|
1655
1667
|
}
|
|
1656
1668
|
}
|
|
1657
1669
|
static unknown(e) {
|
|
1658
|
-
return new
|
|
1670
|
+
return new O(e, "(unknown)", "unknown", void 0, "unknown", []);
|
|
1659
1671
|
}
|
|
1660
1672
|
constructor(e, t, n, r, i, o) {
|
|
1661
1673
|
this.sourceObj = e, this.name = t, this.type = n, this.value = r, this.state = i, this.dependencies = o;
|
|
1662
1674
|
}
|
|
1663
1675
|
}
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
class
|
|
1676
|
+
Pt(ln);
|
|
1677
|
+
Mt(Qt);
|
|
1678
|
+
We($.getInstance());
|
|
1679
|
+
class it {
|
|
1668
1680
|
constructor() {
|
|
1669
|
-
|
|
1681
|
+
l(this, "_fixtures", v(this, /* @__PURE__ */ new Map()));
|
|
1670
1682
|
/** Observable root of the fixture tree */
|
|
1671
|
-
|
|
1683
|
+
l(this, "root", N(this, (e) => {
|
|
1672
1684
|
const t = this._fixtures.read(e);
|
|
1673
|
-
return
|
|
1685
|
+
return ce(t);
|
|
1674
1686
|
}));
|
|
1675
1687
|
}
|
|
1676
1688
|
/**
|
|
@@ -1701,25 +1713,25 @@ class qe {
|
|
|
1701
1713
|
*/
|
|
1702
1714
|
getNode(e, t) {
|
|
1703
1715
|
const n = this.root.read(e);
|
|
1704
|
-
return
|
|
1716
|
+
return Oe(n, t);
|
|
1705
1717
|
}
|
|
1706
1718
|
/**
|
|
1707
1719
|
* Gets a component by path (non-reactive, for use in preview iframe).
|
|
1708
1720
|
* @param path Array of path segments (e.g., ['Button', 'Primary'])
|
|
1709
1721
|
*/
|
|
1710
1722
|
getComponentByPath(e) {
|
|
1711
|
-
const t = this._fixtures.get(), n =
|
|
1723
|
+
const t = this._fixtures.get(), n = ce(t), r = Oe(n, e);
|
|
1712
1724
|
return r == null ? void 0 : r.component;
|
|
1713
1725
|
}
|
|
1714
1726
|
}
|
|
1715
|
-
class
|
|
1727
|
+
class ws {
|
|
1716
1728
|
constructor(e, t) {
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1729
|
+
l(this, "sessionId", Math.random().toString(36).slice(2));
|
|
1730
|
+
l(this, "_updateVersion", 0);
|
|
1731
|
+
l(this, "_root");
|
|
1732
|
+
l(this, "_fixtureModules");
|
|
1733
|
+
l(this, "_currentDisposable");
|
|
1734
|
+
l(this, "_currentContainer");
|
|
1723
1735
|
this._containerElement = e, this._fixtureModules = t, this._root = this._buildRegistry(), this._installGlobalApi();
|
|
1724
1736
|
const n = this._flattenFixtures(this._root).length;
|
|
1725
1737
|
console.log("[cli] CLI entry initialized, sessionId:", this.sessionId, "version:", this._updateVersion, "fixtures:", n);
|
|
@@ -1745,14 +1757,14 @@ class Zn {
|
|
|
1745
1757
|
this._currentDisposable && (this._currentDisposable.dispose(), this._currentDisposable = void 0), this._currentContainer && (this._currentContainer.remove(), this._currentContainer = void 0);
|
|
1746
1758
|
const n = document.createElement("div");
|
|
1747
1759
|
n.style.display = "inline-block", this._containerElement.appendChild(n), this._currentContainer = n;
|
|
1748
|
-
const r = t.component, i =
|
|
1760
|
+
const r = t.component, i = Tt(r.properties);
|
|
1749
1761
|
let o = n;
|
|
1750
1762
|
if (r.isolation === "shadow-dom") {
|
|
1751
|
-
const
|
|
1752
|
-
o = document.createElement("div"),
|
|
1763
|
+
const c = n.attachShadow({ mode: "open" });
|
|
1764
|
+
o = document.createElement("div"), c.appendChild(o);
|
|
1753
1765
|
}
|
|
1754
1766
|
const d = r.render(o, i);
|
|
1755
|
-
this._currentDisposable = d && typeof d == "object" && "dispose" in d ? d : void 0, await new Promise((
|
|
1767
|
+
this._currentDisposable = d && typeof d == "object" && "dispose" in d ? d : void 0, await new Promise((c) => requestAnimationFrame(() => requestAnimationFrame(() => c())));
|
|
1756
1768
|
}
|
|
1757
1769
|
_buildRegistry() {
|
|
1758
1770
|
const e = /* @__PURE__ */ new Map();
|
|
@@ -1760,7 +1772,7 @@ class Zn {
|
|
|
1760
1772
|
const r = n.default;
|
|
1761
1773
|
r && typeof r == "object" && e.set(t, r);
|
|
1762
1774
|
}
|
|
1763
|
-
return
|
|
1775
|
+
return ce(e);
|
|
1764
1776
|
}
|
|
1765
1777
|
_flattenFixtures(e, t = []) {
|
|
1766
1778
|
const n = [];
|
|
@@ -1791,17 +1803,186 @@ class Zn {
|
|
|
1791
1803
|
});
|
|
1792
1804
|
}
|
|
1793
1805
|
}
|
|
1794
|
-
|
|
1806
|
+
class hn {
|
|
1807
|
+
constructor(e) {
|
|
1808
|
+
this._run = e, this._changes = [], this._map = /* @__PURE__ */ new Map(), this._updateCounter = 0;
|
|
1809
|
+
}
|
|
1810
|
+
addDependency(e, t) {
|
|
1811
|
+
return this._map.set(e, t), e.addObserver(this), {
|
|
1812
|
+
dispose: () => {
|
|
1813
|
+
this._map.delete(e), e.removeObserver(this);
|
|
1814
|
+
}
|
|
1815
|
+
};
|
|
1816
|
+
}
|
|
1817
|
+
beginUpdate(e) {
|
|
1818
|
+
this._updateCounter++, this._changes.push(this._map.get(e));
|
|
1819
|
+
}
|
|
1820
|
+
endUpdate(e) {
|
|
1821
|
+
if (this._updateCounter--, this._updateCounter === 0 && this._changes.length > 0) {
|
|
1822
|
+
const t = this._changes;
|
|
1823
|
+
this._changes = [], this._run(t);
|
|
1824
|
+
}
|
|
1825
|
+
}
|
|
1826
|
+
handlePossibleChange(e) {
|
|
1827
|
+
this._changes.push(this._map.get(e));
|
|
1828
|
+
}
|
|
1829
|
+
handleChange(e, t) {
|
|
1830
|
+
}
|
|
1831
|
+
}
|
|
1832
|
+
function f() {
|
|
1833
|
+
return pe.instance;
|
|
1834
|
+
}
|
|
1835
|
+
function un() {
|
|
1836
|
+
return ge.instance;
|
|
1837
|
+
}
|
|
1838
|
+
function fn() {
|
|
1839
|
+
return me.instance;
|
|
1840
|
+
}
|
|
1841
|
+
f.const = un;
|
|
1842
|
+
f.obs = fn;
|
|
1843
|
+
class pe {
|
|
1844
|
+
create(e) {
|
|
1845
|
+
const t = N((n) => e(n));
|
|
1846
|
+
return { read: (n) => t };
|
|
1847
|
+
}
|
|
1848
|
+
}
|
|
1849
|
+
pe.instance = new pe();
|
|
1850
|
+
class ge {
|
|
1851
|
+
create(e) {
|
|
1852
|
+
const t = N((n) => e(n));
|
|
1853
|
+
return { read: (n) => t.read(n) };
|
|
1854
|
+
}
|
|
1855
|
+
}
|
|
1856
|
+
ge.instance = new ge();
|
|
1857
|
+
class me {
|
|
1858
|
+
create(e) {
|
|
1859
|
+
const t = N((n) => {
|
|
1860
|
+
const r = e(n);
|
|
1861
|
+
return pn(r) ? r.read(n) : r;
|
|
1862
|
+
});
|
|
1863
|
+
return { read: (n) => t };
|
|
1864
|
+
}
|
|
1865
|
+
}
|
|
1866
|
+
me.instance = new me();
|
|
1867
|
+
function pn(s) {
|
|
1868
|
+
return typeof s == "object" && s !== null && "read" in s;
|
|
1869
|
+
}
|
|
1870
|
+
function q(s, e) {
|
|
1871
|
+
return Object.fromEntries(Object.entries(s).map(([t, n]) => [t, e(n, t)]));
|
|
1872
|
+
}
|
|
1873
|
+
const ae = Symbol("ViewModelContext");
|
|
1874
|
+
class gn {
|
|
1875
|
+
constructor(e) {
|
|
1876
|
+
this._store = new X(), this.props = e;
|
|
1877
|
+
}
|
|
1878
|
+
dispose() {
|
|
1879
|
+
this._store.dispose();
|
|
1880
|
+
}
|
|
1881
|
+
}
|
|
1882
|
+
function mn(s) {
|
|
1883
|
+
return s[ae] || (s[ae] = Le(void 0)), s[ae];
|
|
1884
|
+
}
|
|
1885
|
+
function F(s = {}) {
|
|
1886
|
+
var e;
|
|
1887
|
+
return e = class extends gn {
|
|
1888
|
+
}, e._props = s, e;
|
|
1889
|
+
}
|
|
1890
|
+
let _e = 0;
|
|
1891
|
+
const _n = new hn((s) => {
|
|
1892
|
+
for (const e of s)
|
|
1893
|
+
e.rendered = !1;
|
|
1894
|
+
if (_e > 0) {
|
|
1895
|
+
const e = s.find((t) => t.isRendering);
|
|
1896
|
+
e.itemsToRender = s;
|
|
1897
|
+
} else
|
|
1898
|
+
$e(() => {
|
|
1899
|
+
for (const e of s)
|
|
1900
|
+
e.rendered || e.forceUpdate();
|
|
1901
|
+
});
|
|
1902
|
+
});
|
|
1903
|
+
let vn = 0;
|
|
1904
|
+
class bn {
|
|
1905
|
+
constructor(e, t) {
|
|
1906
|
+
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 = () => () => {
|
|
1907
|
+
var n;
|
|
1908
|
+
(n = this._disposable) == null || n.dispose();
|
|
1909
|
+
}, this.itemsToRender = [], this.handleAfterRender = () => {
|
|
1910
|
+
$e(() => {
|
|
1911
|
+
for (const n of this.itemsToRender)
|
|
1912
|
+
n.rendered || n.forceUpdate();
|
|
1913
|
+
}), this.itemsToRender = [];
|
|
1914
|
+
}, this.rendering = void 0, this.isRendering = !1, this.rendered = !1;
|
|
1915
|
+
}
|
|
1916
|
+
toString() {
|
|
1917
|
+
return this.debugName;
|
|
1918
|
+
}
|
|
1919
|
+
updateProps(e) {
|
|
1920
|
+
this._obsProps ? this._obsProps.set(e, void 0) : (this._obsProps = v(this, e), this._render = this.renderFactory(this._obsProps, () => this.contextValues), this.rendering = N(this, this._render), this._disposable = _n.addDependency(this.rendering, this));
|
|
1921
|
+
}
|
|
1922
|
+
}
|
|
1923
|
+
function we(s, e, t) {
|
|
1924
|
+
const n = (o) => o + 1, r = () => new bn(s + ++vn, e), i = function(o) {
|
|
1925
|
+
const d = Ct(n, 0)[1], c = xt(r)[0];
|
|
1926
|
+
for (const h of t ?? [])
|
|
1927
|
+
c.contextValues.set(h, wt(h));
|
|
1928
|
+
if (Ie(c.cleanupEffect, []), Ie(c.handleAfterRender), c.isRendering)
|
|
1929
|
+
throw new Error("Component is already rendering");
|
|
1930
|
+
c.isRendering = !0, _e++;
|
|
1931
|
+
try {
|
|
1932
|
+
c.forceUpdate = d, c.updateProps(o);
|
|
1933
|
+
const h = c.rendering.get();
|
|
1934
|
+
return c.rendered = !0, h;
|
|
1935
|
+
} finally {
|
|
1936
|
+
c.isRendering = !1, _e--;
|
|
1937
|
+
}
|
|
1938
|
+
};
|
|
1939
|
+
return i.displayName = s, i;
|
|
1940
|
+
}
|
|
1941
|
+
we("ObsView", (s) => (e) => s.read(e).children(e));
|
|
1942
|
+
function k(s, e) {
|
|
1943
|
+
return we("view", (t) => {
|
|
1944
|
+
const n = q(s, (r, i) => r.create((o) => t.read(o)[i], void 0));
|
|
1945
|
+
return (r) => {
|
|
1946
|
+
const i = q(n, (o) => o.read(r));
|
|
1947
|
+
return e(r, i);
|
|
1948
|
+
};
|
|
1949
|
+
});
|
|
1950
|
+
}
|
|
1951
|
+
function yn(s) {
|
|
1952
|
+
const e = [];
|
|
1953
|
+
for (const t of Object.values(s)) {
|
|
1954
|
+
const n = t._requiredContext;
|
|
1955
|
+
n && !e.includes(n) && e.push(n);
|
|
1956
|
+
}
|
|
1957
|
+
return e;
|
|
1958
|
+
}
|
|
1959
|
+
function B(s, e, t) {
|
|
1960
|
+
const n = typeof e == "function" ? {} : e, r = typeof e == "function" ? e : t, i = "_props" in s ? s._props : {}, o = yn({ ...i, ...n }), d = mn(s), c = [...o, d];
|
|
1961
|
+
return we("viewWithModel", (h, g) => {
|
|
1962
|
+
const _ = g(), x = _.get(d), w = "_props" in s ? q(s._props, (y, E) => y.create((z) => h.read(z)[E], _.get(y._requiredContext))) : {}, U = x ? { read: () => x, dispose: () => {
|
|
1963
|
+
} } : Kt((y) => {
|
|
1964
|
+
const E = q(w, (z) => z.read(y));
|
|
1965
|
+
return new s(E);
|
|
1966
|
+
}), D = q(n, (y, E) => y.create((z) => h.read(z)[E], _.get(y._requiredContext)));
|
|
1967
|
+
return (y) => {
|
|
1968
|
+
const E = U.read(y), z = q(D, (_t) => _t.read(y));
|
|
1969
|
+
return r(y, E, z);
|
|
1970
|
+
};
|
|
1971
|
+
}, c.length > 0 ? c : void 0);
|
|
1972
|
+
}
|
|
1973
|
+
k({ value: f.obs() }, (s, e) => e.value.read(s));
|
|
1974
|
+
Le(null);
|
|
1975
|
+
function ot(s) {
|
|
1795
1976
|
var e;
|
|
1796
1977
|
return {
|
|
1797
1978
|
id: s.id,
|
|
1798
1979
|
name: s.name,
|
|
1799
1980
|
type: s.type,
|
|
1800
|
-
children: (e = s.children) == null ? void 0 : e.map(
|
|
1981
|
+
children: (e = s.children) == null ? void 0 : e.map(ot),
|
|
1801
1982
|
component: s.component
|
|
1802
1983
|
};
|
|
1803
1984
|
}
|
|
1804
|
-
function
|
|
1985
|
+
function Q(s, e) {
|
|
1805
1986
|
const {
|
|
1806
1987
|
storageKey: t,
|
|
1807
1988
|
defaultValue: n,
|
|
@@ -1814,80 +1995,80 @@ function W(s, e) {
|
|
|
1814
1995
|
h !== null && (o = i(h));
|
|
1815
1996
|
} catch {
|
|
1816
1997
|
}
|
|
1817
|
-
const d =
|
|
1998
|
+
const d = v(s, o), c = d.set.bind(d);
|
|
1818
1999
|
return d.set = (h, g) => {
|
|
1819
2000
|
try {
|
|
1820
2001
|
localStorage.setItem(t, r(h));
|
|
1821
2002
|
} catch {
|
|
1822
2003
|
}
|
|
1823
|
-
|
|
2004
|
+
c(h, g);
|
|
1824
2005
|
}, d;
|
|
1825
2006
|
}
|
|
1826
|
-
class
|
|
2007
|
+
class Cn extends F({
|
|
1827
2008
|
registry: f.const(),
|
|
1828
2009
|
daemonModel: f.const()
|
|
1829
2010
|
}) {
|
|
1830
2011
|
constructor() {
|
|
1831
2012
|
super(...arguments);
|
|
1832
|
-
|
|
2013
|
+
l(this, "leftSidebarVisible", Q(this, {
|
|
1833
2014
|
storageKey: "component-explorer:leftSidebarVisible",
|
|
1834
2015
|
defaultValue: !0
|
|
1835
2016
|
}));
|
|
1836
|
-
|
|
2017
|
+
l(this, "rightSidebarVisible", Q(this, {
|
|
1837
2018
|
storageKey: "component-explorer:rightSidebarVisible",
|
|
1838
2019
|
defaultValue: !0
|
|
1839
2020
|
}));
|
|
1840
|
-
|
|
2021
|
+
l(this, "isDarkTheme", Q(this, {
|
|
1841
2022
|
storageKey: "component-explorer:isDarkTheme",
|
|
1842
2023
|
defaultValue: !0
|
|
1843
2024
|
}));
|
|
1844
|
-
|
|
2025
|
+
l(this, "selectedNodeId", Q(this, {
|
|
1845
2026
|
storageKey: "component-explorer:selectedNodeId",
|
|
1846
2027
|
defaultValue: void 0
|
|
1847
2028
|
}));
|
|
1848
|
-
|
|
1849
|
-
|
|
2029
|
+
l(this, "expandedNodeIds", v(this, /* @__PURE__ */ new Set()));
|
|
2030
|
+
l(this, "viewMode", Q(this, {
|
|
1850
2031
|
storageKey: "component-explorer:viewMode",
|
|
1851
2032
|
defaultValue: "session"
|
|
1852
2033
|
}));
|
|
1853
2034
|
/** The explorer's tree derived from the registry */
|
|
1854
|
-
|
|
2035
|
+
l(this, "tree", N(this, (t) => {
|
|
1855
2036
|
const n = this.props.registry.root.read(t);
|
|
1856
|
-
return
|
|
2037
|
+
return ot(n);
|
|
1857
2038
|
}));
|
|
1858
|
-
|
|
2039
|
+
l(this, "selectedNode", N(this, (t) => {
|
|
1859
2040
|
const n = this.selectedNodeId.read(t);
|
|
1860
2041
|
if (!n) return;
|
|
1861
2042
|
const r = this.tree.read(t);
|
|
1862
2043
|
return this._findNode(r.children ?? [], n);
|
|
1863
2044
|
}));
|
|
1864
2045
|
/** List of preview rows to render based on current selection and view mode */
|
|
1865
|
-
|
|
2046
|
+
l(this, "selectedFixtures", N(this, (t) => {
|
|
1866
2047
|
const n = this.selectedNode.read(t);
|
|
1867
2048
|
return n ? this.viewMode.read(t) === "diff" && this.daemonAvailable ? this._collectDiffRows(n, n.name) : this._collectPreviewRows(n, n.name) : [];
|
|
1868
2049
|
}));
|
|
1869
|
-
|
|
2050
|
+
l(this, "setViewMode", (t) => {
|
|
1870
2051
|
this.viewMode.set(t, void 0);
|
|
1871
2052
|
});
|
|
1872
|
-
|
|
2053
|
+
l(this, "navigateToSession", (t) => {
|
|
1873
2054
|
const n = this.props.daemonModel;
|
|
1874
2055
|
if (!n) return;
|
|
1875
2056
|
const r = n.getSessionExplorerUrl(t);
|
|
1876
2057
|
r && (window.location.href = r);
|
|
1877
2058
|
});
|
|
1878
|
-
|
|
2059
|
+
l(this, "toggleLeftSidebar", () => {
|
|
1879
2060
|
this.leftSidebarVisible.set(!this.leftSidebarVisible.get(), void 0);
|
|
1880
2061
|
});
|
|
1881
|
-
|
|
2062
|
+
l(this, "toggleRightSidebar", () => {
|
|
1882
2063
|
this.rightSidebarVisible.set(!this.rightSidebarVisible.get(), void 0);
|
|
1883
2064
|
});
|
|
1884
|
-
|
|
2065
|
+
l(this, "toggleTheme", () => {
|
|
1885
2066
|
this.isDarkTheme.set(!this.isDarkTheme.get(), void 0);
|
|
1886
2067
|
});
|
|
1887
|
-
|
|
2068
|
+
l(this, "selectNode", (t) => {
|
|
1888
2069
|
this.selectedNodeId.set(t, void 0);
|
|
1889
2070
|
});
|
|
1890
|
-
|
|
2071
|
+
l(this, "toggleNodeExpanded", (t) => {
|
|
1891
2072
|
const n = this.expandedNodeIds.get(), r = new Set(n);
|
|
1892
2073
|
r.has(t) ? r.delete(t) : r.add(t), this.expandedNodeIds.set(r, void 0);
|
|
1893
2074
|
});
|
|
@@ -2175,16 +2356,16 @@ const u = {
|
|
|
2175
2356
|
cursor: "pointer"
|
|
2176
2357
|
}
|
|
2177
2358
|
};
|
|
2178
|
-
function
|
|
2359
|
+
function Se(...s) {
|
|
2179
2360
|
return Object.assign({}, ...s.filter(Boolean));
|
|
2180
2361
|
}
|
|
2181
|
-
class
|
|
2362
|
+
class xn extends F({
|
|
2182
2363
|
active: f()
|
|
2183
2364
|
}) {
|
|
2184
2365
|
constructor() {
|
|
2185
2366
|
super(...arguments);
|
|
2186
|
-
|
|
2187
|
-
|
|
2367
|
+
l(this, "isHovered", v(this, !1));
|
|
2368
|
+
l(this, "setHovered", (t) => {
|
|
2188
2369
|
this.isHovered.set(t, void 0);
|
|
2189
2370
|
});
|
|
2190
2371
|
}
|
|
@@ -2192,15 +2373,15 @@ class Kt extends N({
|
|
|
2192
2373
|
return this.props.active;
|
|
2193
2374
|
}
|
|
2194
2375
|
}
|
|
2195
|
-
const
|
|
2196
|
-
|
|
2376
|
+
const de = B(
|
|
2377
|
+
xn,
|
|
2197
2378
|
{
|
|
2198
2379
|
onClick: f.const(),
|
|
2199
2380
|
title: f.const(),
|
|
2200
2381
|
children: f.const()
|
|
2201
2382
|
},
|
|
2202
2383
|
(s, e, t) => {
|
|
2203
|
-
const n = e.isHovered.read(s), r = e.active.read(s), i =
|
|
2384
|
+
const n = e.isHovered.read(s), r = e.active.read(s), i = Se(
|
|
2204
2385
|
u.titleBarButton,
|
|
2205
2386
|
n && !r && u.titleBarButtonHover,
|
|
2206
2387
|
r && u.titleBarButtonActive
|
|
@@ -2217,20 +2398,20 @@ const se = V(
|
|
|
2217
2398
|
}
|
|
2218
2399
|
);
|
|
2219
2400
|
}
|
|
2220
|
-
),
|
|
2401
|
+
), wn = ({ style: s }) => /* @__PURE__ */ a("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "currentColor", style: s, 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" }) }), Sn = ({ style: s }) => /* @__PURE__ */ a("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "currentColor", style: s, 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)" }) }), In = ({ style: s }) => /* @__PURE__ */ a("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "currentColor", style: s, 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" }) }), On = ({ style: s }) => /* @__PURE__ */ a("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "currentColor", style: s, 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" }) }), Tn = () => /* @__PURE__ */ a("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "currentColor", children: /* @__PURE__ */ a("path", { d: "M2 2v12h12V2H2zm11 11H6V3h7v10zM3 3h2v10H3V3z" }) }), Rn = () => /* @__PURE__ */ a("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "currentColor", children: /* @__PURE__ */ a("path", { d: "M2 2v12h12V2H2zm6 11V3h5v10H8zM3 3h4v10H3V3z" }) }), Vn = () => /* @__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" }) }), Nn = () => /* @__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" }) }), kn = k(
|
|
2221
2402
|
{ model: f.const() },
|
|
2222
2403
|
(s, e) => {
|
|
2223
|
-
var d,
|
|
2224
|
-
const t = e.model, n = t.viewMode.read(s), r = ((d = t.daemon) == null ? void 0 : d.sessions.read(s)) ?? [], i = (
|
|
2225
|
-
return /* @__PURE__ */ p("div", { style:
|
|
2226
|
-
/* @__PURE__ */ p("div", { style:
|
|
2227
|
-
/* @__PURE__ */ a(
|
|
2228
|
-
/* @__PURE__ */ a(
|
|
2404
|
+
var d, c;
|
|
2405
|
+
const t = e.model, n = t.viewMode.read(s), r = ((d = t.daemon) == null ? void 0 : d.sessions.read(s)) ?? [], i = (c = t.daemon) == null ? void 0 : c.sessionName, o = r.filter((h) => h.name !== i);
|
|
2406
|
+
return /* @__PURE__ */ p("div", { style: K.container, children: [
|
|
2407
|
+
/* @__PURE__ */ p("div", { style: K.segmentedControl, children: [
|
|
2408
|
+
/* @__PURE__ */ a(Ae, { label: "Live", mode: "session", active: n === "session", onClick: () => t.setViewMode("session") }),
|
|
2409
|
+
/* @__PURE__ */ a(Ae, { label: "Diff", mode: "diff", active: n === "diff", onClick: () => t.setViewMode("diff") })
|
|
2229
2410
|
] }),
|
|
2230
|
-
o.length > 0 && /* @__PURE__ */ a("div", { style:
|
|
2411
|
+
o.length > 0 && /* @__PURE__ */ a("div", { style: K.sessionLinks, children: o.map((h) => /* @__PURE__ */ p(
|
|
2231
2412
|
"button",
|
|
2232
2413
|
{
|
|
2233
|
-
style:
|
|
2414
|
+
style: K.sessionLink,
|
|
2234
2415
|
onClick: () => t.navigateToSession(h.name),
|
|
2235
2416
|
title: `Switch to ${h.name} session`,
|
|
2236
2417
|
children: [
|
|
@@ -2243,17 +2424,17 @@ const se = V(
|
|
|
2243
2424
|
] });
|
|
2244
2425
|
}
|
|
2245
2426
|
);
|
|
2246
|
-
function
|
|
2427
|
+
function Ae({ label: s, mode: e, active: t, onClick: n }) {
|
|
2247
2428
|
return /* @__PURE__ */ a(
|
|
2248
2429
|
"button",
|
|
2249
2430
|
{
|
|
2250
|
-
style: t ?
|
|
2431
|
+
style: t ? K.segmentActive : K.segment,
|
|
2251
2432
|
onClick: n,
|
|
2252
2433
|
children: s
|
|
2253
2434
|
}
|
|
2254
2435
|
);
|
|
2255
2436
|
}
|
|
2256
|
-
const
|
|
2437
|
+
const Dn = k(
|
|
2257
2438
|
{
|
|
2258
2439
|
model: f.const()
|
|
2259
2440
|
},
|
|
@@ -2261,17 +2442,17 @@ const rn = D(
|
|
|
2261
2442
|
const t = e.model, n = t.leftSidebarVisible.read(s), r = t.rightSidebarVisible.read(s), i = t.isDarkTheme.read(s), o = t.selectedNode.read(s);
|
|
2262
2443
|
return /* @__PURE__ */ p("div", { style: u.titleBar, children: [
|
|
2263
2444
|
/* @__PURE__ */ a("div", { style: u.titleBarSection, children: /* @__PURE__ */ a(
|
|
2264
|
-
|
|
2445
|
+
de,
|
|
2265
2446
|
{
|
|
2266
2447
|
active: n,
|
|
2267
2448
|
onClick: t.toggleLeftSidebar,
|
|
2268
2449
|
title: "Toggle left sidebar",
|
|
2269
|
-
children: /* @__PURE__ */ a(
|
|
2450
|
+
children: /* @__PURE__ */ a(Tn, {})
|
|
2270
2451
|
}
|
|
2271
2452
|
) }),
|
|
2272
2453
|
/* @__PURE__ */ p("div", { style: u.titleBarCenter, children: [
|
|
2273
|
-
t.daemonAvailable && /* @__PURE__ */ a(
|
|
2274
|
-
o ? /* @__PURE__ */ p(
|
|
2454
|
+
t.daemonAvailable && /* @__PURE__ */ a(kn, { model: t }),
|
|
2455
|
+
o ? /* @__PURE__ */ p(be, { children: [
|
|
2275
2456
|
/* @__PURE__ */ a("span", { style: { color: "var(--vscode-textLink-foreground)" }, children: "<" }),
|
|
2276
2457
|
/* @__PURE__ */ a("span", { children: o.name }),
|
|
2277
2458
|
/* @__PURE__ */ a("span", { style: { color: "var(--vscode-textLink-foreground)" }, children: "/>" })
|
|
@@ -2279,27 +2460,27 @@ const rn = D(
|
|
|
2279
2460
|
] }),
|
|
2280
2461
|
/* @__PURE__ */ p("div", { style: u.titleBarSection, children: [
|
|
2281
2462
|
/* @__PURE__ */ a(
|
|
2282
|
-
|
|
2463
|
+
de,
|
|
2283
2464
|
{
|
|
2284
2465
|
active: !1,
|
|
2285
2466
|
onClick: t.toggleTheme,
|
|
2286
2467
|
title: i ? "Switch to light theme" : "Switch to dark theme",
|
|
2287
|
-
children: i ? /* @__PURE__ */ a(
|
|
2468
|
+
children: i ? /* @__PURE__ */ a(Vn, {}) : /* @__PURE__ */ a(Nn, {})
|
|
2288
2469
|
}
|
|
2289
2470
|
),
|
|
2290
2471
|
/* @__PURE__ */ a(
|
|
2291
|
-
|
|
2472
|
+
de,
|
|
2292
2473
|
{
|
|
2293
2474
|
active: r,
|
|
2294
2475
|
onClick: t.toggleRightSidebar,
|
|
2295
2476
|
title: "Toggle right sidebar",
|
|
2296
|
-
children: /* @__PURE__ */ a(
|
|
2477
|
+
children: /* @__PURE__ */ a(Rn, {})
|
|
2297
2478
|
}
|
|
2298
2479
|
)
|
|
2299
2480
|
] })
|
|
2300
2481
|
] });
|
|
2301
2482
|
}
|
|
2302
|
-
),
|
|
2483
|
+
), K = {
|
|
2303
2484
|
container: {
|
|
2304
2485
|
display: "flex",
|
|
2305
2486
|
alignItems: "center",
|
|
@@ -2343,32 +2524,32 @@ const rn = D(
|
|
|
2343
2524
|
color: "var(--vscode-textLink-foreground)",
|
|
2344
2525
|
cursor: "pointer"
|
|
2345
2526
|
}
|
|
2346
|
-
},
|
|
2527
|
+
}, at = k(
|
|
2347
2528
|
{
|
|
2348
2529
|
model: f.const(),
|
|
2349
2530
|
nodes: f.const(),
|
|
2350
2531
|
depth: f.const()
|
|
2351
2532
|
},
|
|
2352
|
-
(s, e) => /* @__PURE__ */ a(
|
|
2533
|
+
(s, e) => /* @__PURE__ */ a(be, { children: e.nodes.map((t) => /* @__PURE__ */ a(Mn, { model: e.model, node: t, depth: e.depth }, t.id)) })
|
|
2353
2534
|
);
|
|
2354
|
-
class
|
|
2535
|
+
class An extends F({
|
|
2355
2536
|
model: f.const(),
|
|
2356
2537
|
node: f.const(),
|
|
2357
2538
|
depth: f.const()
|
|
2358
2539
|
}) {
|
|
2359
2540
|
constructor() {
|
|
2360
2541
|
super(...arguments);
|
|
2361
|
-
|
|
2362
|
-
|
|
2542
|
+
l(this, "isHovered", v(this, !1));
|
|
2543
|
+
l(this, "setHovered", (t) => {
|
|
2363
2544
|
this.isHovered.set(t, void 0);
|
|
2364
2545
|
});
|
|
2365
|
-
|
|
2546
|
+
l(this, "handleClick", () => {
|
|
2366
2547
|
this.props.model.selectNode(this.props.node.id);
|
|
2367
2548
|
});
|
|
2368
|
-
|
|
2549
|
+
l(this, "handleDoubleClick", () => {
|
|
2369
2550
|
this._hasChildren && this.props.model.toggleNodeExpanded(this.props.node.id);
|
|
2370
2551
|
});
|
|
2371
|
-
|
|
2552
|
+
l(this, "handleChevronClick", (t) => {
|
|
2372
2553
|
t.stopPropagation(), this.props.model.toggleNodeExpanded(this.props.node.id);
|
|
2373
2554
|
});
|
|
2374
2555
|
}
|
|
@@ -2386,14 +2567,14 @@ class on extends N({
|
|
|
2386
2567
|
return !!(this.props.node.children && this.props.node.children.length > 0);
|
|
2387
2568
|
}
|
|
2388
2569
|
}
|
|
2389
|
-
const
|
|
2390
|
-
const t = e.explorerModel, n = e.treeNode, r = e.treeDepth, i = !!(n.children && n.children.length > 0), o = i ? t.isNodeExpanded(n.id, s) : !1,
|
|
2570
|
+
const Mn = B(An, {}, (s, e) => {
|
|
2571
|
+
const t = e.explorerModel, n = e.treeNode, r = e.treeDepth, i = !!(n.children && n.children.length > 0), o = i ? t.isNodeExpanded(n.id, s) : !1, c = t.selectedNodeId.read(s) === n.id, h = e.isHovered.read(s), g = Se(
|
|
2391
2572
|
u.treeItem,
|
|
2392
2573
|
{ paddingLeft: `${8 + r * 12}px` },
|
|
2393
|
-
|
|
2394
|
-
!
|
|
2574
|
+
c && u.treeItemSelected,
|
|
2575
|
+
!c && h && u.treeItemHover
|
|
2395
2576
|
);
|
|
2396
|
-
return /* @__PURE__ */ p(
|
|
2577
|
+
return /* @__PURE__ */ p(be, { children: [
|
|
2397
2578
|
/* @__PURE__ */ p(
|
|
2398
2579
|
"div",
|
|
2399
2580
|
{
|
|
@@ -2403,16 +2584,16 @@ const an = V(on, {}, (s, e) => {
|
|
|
2403
2584
|
onMouseEnter: () => e.setHovered(!0),
|
|
2404
2585
|
onMouseLeave: () => e.setHovered(!1),
|
|
2405
2586
|
children: [
|
|
2406
|
-
i ? /* @__PURE__ */ a("div", { style: u.treeItemChevron, onClick: e.handleChevronClick, children: o ? /* @__PURE__ */ a(
|
|
2407
|
-
/* @__PURE__ */ a("div", { style: u.treeItemIcon, children: n.type === "folder" ? /* @__PURE__ */ a(
|
|
2587
|
+
i ? /* @__PURE__ */ a("div", { style: u.treeItemChevron, onClick: e.handleChevronClick, children: o ? /* @__PURE__ */ a(Sn, {}) : /* @__PURE__ */ a(wn, {}) }) : /* @__PURE__ */ a("div", { style: u.treeItemChevronPlaceholder }),
|
|
2588
|
+
/* @__PURE__ */ a("div", { style: u.treeItemIcon, children: n.type === "folder" ? /* @__PURE__ */ a(On, { style: { color: "var(--vscode-symbolIcon-folderForeground)" } }) : /* @__PURE__ */ a(In, { style: { color: "#deb45b" } }) }),
|
|
2408
2589
|
/* @__PURE__ */ a("span", { style: u.treeItemLabel, children: n.name }),
|
|
2409
2590
|
i && /* @__PURE__ */ a("span", { style: u.treeItemCount, children: n.children.length })
|
|
2410
2591
|
]
|
|
2411
2592
|
}
|
|
2412
2593
|
),
|
|
2413
|
-
i && o && /* @__PURE__ */ a(
|
|
2594
|
+
i && o && /* @__PURE__ */ a(at, { model: t, nodes: n.children, depth: r + 1 })
|
|
2414
2595
|
] });
|
|
2415
|
-
}),
|
|
2596
|
+
}), Fn = k(
|
|
2416
2597
|
{
|
|
2417
2598
|
model: f.const()
|
|
2418
2599
|
},
|
|
@@ -2420,20 +2601,20 @@ const an = V(on, {}, (s, e) => {
|
|
|
2420
2601
|
const t = e.model.tree.read(s);
|
|
2421
2602
|
return /* @__PURE__ */ p("div", { style: u.sidebar, children: [
|
|
2422
2603
|
/* @__PURE__ */ a("div", { style: u.sidebarHeader, children: "Explorer" }),
|
|
2423
|
-
/* @__PURE__ */ a("div", { style: u.sidebarContent, children: /* @__PURE__ */ a(
|
|
2604
|
+
/* @__PURE__ */ a("div", { style: u.sidebarContent, children: /* @__PURE__ */ a(at, { model: e.model, nodes: t.children ?? [], depth: 0 }) })
|
|
2424
2605
|
] });
|
|
2425
2606
|
}
|
|
2426
2607
|
);
|
|
2427
|
-
class
|
|
2608
|
+
class Bn extends F({}) {
|
|
2428
2609
|
constructor() {
|
|
2429
2610
|
super(...arguments);
|
|
2430
|
-
|
|
2431
|
-
|
|
2611
|
+
l(this, "checked", v(this, !1));
|
|
2612
|
+
l(this, "toggle", () => {
|
|
2432
2613
|
this.checked.set(!this.checked.get(), void 0);
|
|
2433
2614
|
});
|
|
2434
2615
|
}
|
|
2435
2616
|
}
|
|
2436
|
-
const
|
|
2617
|
+
const En = B(Bn, {}, (s, e) => {
|
|
2437
2618
|
const t = e.checked.read(s), n = {
|
|
2438
2619
|
position: "relative",
|
|
2439
2620
|
width: "36px",
|
|
@@ -2454,7 +2635,7 @@ const cn = V(ln, {}, (s, e) => {
|
|
|
2454
2635
|
transition: "left 0.2s"
|
|
2455
2636
|
};
|
|
2456
2637
|
return /* @__PURE__ */ a("div", { style: n, onClick: e.toggle, children: /* @__PURE__ */ a("div", { style: r }) });
|
|
2457
|
-
}),
|
|
2638
|
+
}), zn = k(
|
|
2458
2639
|
{
|
|
2459
2640
|
node: f.const()
|
|
2460
2641
|
},
|
|
@@ -2505,44 +2686,44 @@ const cn = V(ln, {}, (s, e) => {
|
|
|
2505
2686
|
"disabled",
|
|
2506
2687
|
/* @__PURE__ */ a("span", { style: { color: "var(--vscode-descriptionForeground)" }, children: " : boolean" })
|
|
2507
2688
|
] }),
|
|
2508
|
-
/* @__PURE__ */ a(
|
|
2689
|
+
/* @__PURE__ */ a(En, {}),
|
|
2509
2690
|
/* @__PURE__ */ a("div", { style: u.propertyDescription, children: "Disable the button" })
|
|
2510
2691
|
] })
|
|
2511
2692
|
] })
|
|
2512
|
-
),
|
|
2693
|
+
), Hn = k(
|
|
2513
2694
|
{
|
|
2514
2695
|
selectedNode: f.const()
|
|
2515
2696
|
},
|
|
2516
|
-
(s, e) => /* @__PURE__ */ p("div", { style:
|
|
2697
|
+
(s, e) => /* @__PURE__ */ p("div", { style: Se(u.sidebar, u.sidebarRight), children: [
|
|
2517
2698
|
/* @__PURE__ */ p("div", { style: u.sidebarHeader, children: [
|
|
2518
2699
|
/* @__PURE__ */ a("span", { style: { marginRight: "6px", color: "var(--vscode-textLink-foreground)" }, children: "</>" }),
|
|
2519
2700
|
"Props"
|
|
2520
2701
|
] }),
|
|
2521
|
-
/* @__PURE__ */ a("div", { style: u.sidebarContent, children: e.selectedNode ? /* @__PURE__ */ a(
|
|
2702
|
+
/* @__PURE__ */ a("div", { style: u.sidebarContent, children: e.selectedNode ? /* @__PURE__ */ a(zn, { node: e.selectedNode }) : /* @__PURE__ */ a("div", { style: { padding: "12px", color: "var(--vscode-descriptionForeground)", fontSize: "12px" }, children: "Select a component to view its properties" }) })
|
|
2522
2703
|
] })
|
|
2523
2704
|
);
|
|
2524
|
-
class
|
|
2705
|
+
class Ln extends F({
|
|
2525
2706
|
fixture: f.const(),
|
|
2526
2707
|
compact: f.const()
|
|
2527
2708
|
}) {
|
|
2528
2709
|
constructor() {
|
|
2529
2710
|
super(...arguments);
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2711
|
+
l(this, "_containerRef", null);
|
|
2712
|
+
l(this, "_shadowRoot", null);
|
|
2713
|
+
l(this, "_renderContainer", null);
|
|
2714
|
+
l(this, "_disposable", null);
|
|
2715
|
+
l(this, "_resizeObserver", null);
|
|
2716
|
+
l(this, "measuredWidth", v(this, void 0));
|
|
2717
|
+
l(this, "measuredHeight", v(this, void 0));
|
|
2718
|
+
l(this, "setContainerRef", (t) => {
|
|
2538
2719
|
if (t === this._containerRef || (this._cleanup(), this._containerRef = t, !t)) return;
|
|
2539
2720
|
const n = this.fixture.component;
|
|
2540
2721
|
n.isolation === "shadow-dom" ? this._renderInShadowDom(t, n) : this._renderDirect(t, n);
|
|
2541
2722
|
const r = this._renderContainer ?? t;
|
|
2542
2723
|
this._resizeObserver = new ResizeObserver((i) => {
|
|
2543
2724
|
for (const o of i) {
|
|
2544
|
-
const { width: d, height:
|
|
2545
|
-
|
|
2725
|
+
const { width: d, height: c } = o.contentRect;
|
|
2726
|
+
c > 0 && (this.measuredWidth.set(Math.round(d), void 0), this.measuredHeight.set(Math.round(c), void 0));
|
|
2546
2727
|
}
|
|
2547
2728
|
}), this._resizeObserver.observe(r);
|
|
2548
2729
|
});
|
|
@@ -2596,34 +2777,34 @@ class fn extends N({
|
|
|
2596
2777
|
this._cleanup();
|
|
2597
2778
|
}
|
|
2598
2779
|
}
|
|
2599
|
-
const
|
|
2600
|
-
|
|
2780
|
+
const dt = B(
|
|
2781
|
+
Ln,
|
|
2601
2782
|
{},
|
|
2602
2783
|
(s, e) => {
|
|
2603
2784
|
const t = e.fixture, n = t.component, r = n.displayMode, i = e.measuredWidth.read(s), o = e.measuredHeight.read(s), d = e.compact;
|
|
2604
|
-
let
|
|
2785
|
+
let c;
|
|
2605
2786
|
if (r.type === "page") {
|
|
2606
|
-
const
|
|
2607
|
-
|
|
2608
|
-
width:
|
|
2609
|
-
height:
|
|
2787
|
+
const x = r.viewports[0], w = Ot(x);
|
|
2788
|
+
c = {
|
|
2789
|
+
width: w.width,
|
|
2790
|
+
height: w.height,
|
|
2610
2791
|
overflow: "auto"
|
|
2611
2792
|
};
|
|
2612
2793
|
} else
|
|
2613
|
-
|
|
2794
|
+
c = {
|
|
2614
2795
|
display: "inline-block"
|
|
2615
2796
|
};
|
|
2616
|
-
const h = i && o ? `${i} × ${o}` : "", g = d ?
|
|
2797
|
+
const h = i && o ? `${i} × ${o}` : "", g = d ? W.wrapperCompact : W.wrapper, _ = d ? W.nameCompact : W.name;
|
|
2617
2798
|
return /* @__PURE__ */ p("div", { style: g, children: [
|
|
2618
|
-
/* @__PURE__ */ p("div", { style:
|
|
2619
|
-
/* @__PURE__ */ a("span", { style:
|
|
2620
|
-
!d && h && /* @__PURE__ */ a("span", { style:
|
|
2799
|
+
/* @__PURE__ */ p("div", { style: W.labelRow, children: [
|
|
2800
|
+
/* @__PURE__ */ a("span", { style: _, children: t.name }),
|
|
2801
|
+
!d && h && /* @__PURE__ */ a("span", { style: W.dimensions, children: h })
|
|
2621
2802
|
] }),
|
|
2622
|
-
/* @__PURE__ */ a("div", { style:
|
|
2803
|
+
/* @__PURE__ */ a("div", { style: Pn(n.background), children: /* @__PURE__ */ a("div", { ref: e.setContainerRef, style: c }) })
|
|
2623
2804
|
] });
|
|
2624
2805
|
}
|
|
2625
|
-
),
|
|
2626
|
-
function
|
|
2806
|
+
), G = 8;
|
|
2807
|
+
function ct(s, e) {
|
|
2627
2808
|
return `
|
|
2628
2809
|
linear-gradient(45deg, ${e} 25%, transparent 25%),
|
|
2629
2810
|
linear-gradient(-45deg, ${e} 25%, transparent 25%),
|
|
@@ -2631,29 +2812,29 @@ function Xe(s, e) {
|
|
|
2631
2812
|
linear-gradient(-45deg, transparent 75%, ${e} 75%)
|
|
2632
2813
|
`;
|
|
2633
2814
|
}
|
|
2634
|
-
const
|
|
2815
|
+
const $n = {
|
|
2635
2816
|
backgroundColor: "#ffffff",
|
|
2636
|
-
backgroundImage:
|
|
2637
|
-
},
|
|
2817
|
+
backgroundImage: ct("#ffffff", "#e5e5e5")
|
|
2818
|
+
}, Un = {
|
|
2638
2819
|
backgroundColor: "#1e1e1e",
|
|
2639
|
-
backgroundImage:
|
|
2640
|
-
},
|
|
2820
|
+
backgroundImage: ct("#1e1e1e", "#2d2d2d")
|
|
2821
|
+
}, jn = {
|
|
2641
2822
|
display: "inline-block",
|
|
2642
2823
|
padding: "12px",
|
|
2643
2824
|
borderRadius: "4px",
|
|
2644
|
-
backgroundSize: `${
|
|
2645
|
-
backgroundPosition: `0 0, 0 ${
|
|
2825
|
+
backgroundSize: `${G * 2}px ${G * 2}px`,
|
|
2826
|
+
backgroundPosition: `0 0, 0 ${G}px, ${G}px -${G}px, -${G}px 0`,
|
|
2646
2827
|
boxShadow: "0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.08)"
|
|
2647
2828
|
};
|
|
2648
|
-
function
|
|
2649
|
-
const e = s === "dark" ?
|
|
2829
|
+
function Pn(s) {
|
|
2830
|
+
const e = s === "dark" ? Un : $n;
|
|
2650
2831
|
return {
|
|
2651
|
-
...
|
|
2832
|
+
...jn,
|
|
2652
2833
|
backgroundColor: e.backgroundColor,
|
|
2653
2834
|
backgroundImage: e.backgroundImage
|
|
2654
2835
|
};
|
|
2655
2836
|
}
|
|
2656
|
-
const
|
|
2837
|
+
const W = {
|
|
2657
2838
|
wrapper: {
|
|
2658
2839
|
marginBottom: "32px"
|
|
2659
2840
|
},
|
|
@@ -2682,16 +2863,16 @@ const $ = {
|
|
|
2682
2863
|
fontFamily: "var(--vscode-editor-font-family, monospace)"
|
|
2683
2864
|
}
|
|
2684
2865
|
};
|
|
2685
|
-
class
|
|
2866
|
+
class Gn extends F({
|
|
2686
2867
|
fixtureId: f.const(),
|
|
2687
2868
|
sessionName: f.const(),
|
|
2688
2869
|
daemon: f.const()
|
|
2689
2870
|
}) {
|
|
2690
2871
|
constructor(t) {
|
|
2691
2872
|
super(t);
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
this._store.add(
|
|
2873
|
+
l(this, "screenshot", v(this, { status: "idle" }));
|
|
2874
|
+
l(this, "_fetchVersion", 0);
|
|
2875
|
+
this._store.add(Ye((n) => {
|
|
2695
2876
|
this.props.daemon.sourceTreeIds.read(n).get(this.props.sessionName) && this._fetchScreenshot();
|
|
2696
2877
|
}));
|
|
2697
2878
|
}
|
|
@@ -2709,26 +2890,26 @@ class _n extends N({
|
|
|
2709
2890
|
}
|
|
2710
2891
|
}
|
|
2711
2892
|
}
|
|
2712
|
-
const
|
|
2713
|
-
|
|
2893
|
+
const Me = B(
|
|
2894
|
+
Gn,
|
|
2714
2895
|
{},
|
|
2715
2896
|
(s, e) => {
|
|
2716
2897
|
const t = e.screenshot.read(s);
|
|
2717
2898
|
if (t.status === "idle" || t.status === "loading")
|
|
2718
|
-
return /* @__PURE__ */ a("div", { style:
|
|
2899
|
+
return /* @__PURE__ */ a("div", { style: H.placeholder, children: /* @__PURE__ */ a("div", { style: H.shimmer }) });
|
|
2719
2900
|
if (t.status === "error")
|
|
2720
|
-
return /* @__PURE__ */ a("div", { style:
|
|
2901
|
+
return /* @__PURE__ */ a("div", { style: H.error, children: /* @__PURE__ */ a("span", { style: H.errorText, children: "Screenshot failed" }) });
|
|
2721
2902
|
const { data: n } = t;
|
|
2722
2903
|
return n.image ? /* @__PURE__ */ a(
|
|
2723
2904
|
"img",
|
|
2724
2905
|
{
|
|
2725
2906
|
src: `data:image/png;base64,${n.image}`,
|
|
2726
|
-
style:
|
|
2907
|
+
style: H.image,
|
|
2727
2908
|
alt: `Screenshot of ${e.fixtureId}`
|
|
2728
2909
|
}
|
|
2729
|
-
) : /* @__PURE__ */ a("div", { style:
|
|
2910
|
+
) : /* @__PURE__ */ a("div", { style: H.placeholder, children: /* @__PURE__ */ a("span", { style: H.hashText, children: n.hash.slice(0, 12) }) });
|
|
2730
2911
|
}
|
|
2731
|
-
),
|
|
2912
|
+
), H = {
|
|
2732
2913
|
placeholder: {
|
|
2733
2914
|
minHeight: 80,
|
|
2734
2915
|
display: "flex",
|
|
@@ -2771,7 +2952,7 @@ const we = V(
|
|
|
2771
2952
|
border: "1px solid var(--vscode-panel-border)"
|
|
2772
2953
|
}
|
|
2773
2954
|
};
|
|
2774
|
-
class
|
|
2955
|
+
class Wn extends F({
|
|
2775
2956
|
fixtureId: f.const(),
|
|
2776
2957
|
daemon: f.const(),
|
|
2777
2958
|
baselineSession: f.const(),
|
|
@@ -2779,8 +2960,8 @@ class bn extends N({
|
|
|
2779
2960
|
}) {
|
|
2780
2961
|
constructor(t) {
|
|
2781
2962
|
super(t);
|
|
2782
|
-
|
|
2783
|
-
this._store.add(
|
|
2963
|
+
l(this, "comparisonStatus", v(this, { status: "loading" }));
|
|
2964
|
+
this._store.add(Ye((n) => {
|
|
2784
2965
|
const r = this.props.daemon.sourceTreeIds.read(n), i = r.get(this.props.baselineSession), o = r.get(this.props.currentSession);
|
|
2785
2966
|
i && o && this._fetchComparison();
|
|
2786
2967
|
}));
|
|
@@ -2811,21 +2992,21 @@ class bn extends N({
|
|
|
2811
2992
|
}
|
|
2812
2993
|
}
|
|
2813
2994
|
}
|
|
2814
|
-
const
|
|
2815
|
-
|
|
2995
|
+
const qn = B(
|
|
2996
|
+
Wn,
|
|
2816
2997
|
{},
|
|
2817
2998
|
(s, e) => {
|
|
2818
|
-
const t = e.comparisonStatus.read(s), n = t.status === "loading" ? /* @__PURE__ */ a("span", { style:
|
|
2819
|
-
return /* @__PURE__ */ p("div", { style:
|
|
2820
|
-
/* @__PURE__ */ p("div", { style:
|
|
2821
|
-
/* @__PURE__ */ a("span", { style:
|
|
2999
|
+
const t = e.comparisonStatus.read(s), n = t.status === "loading" ? /* @__PURE__ */ a("span", { style: b.badgeLoading, children: "comparing..." }) : t.status === "error" ? /* @__PURE__ */ a("span", { style: b.badgeError, children: "error" }) : t.match ? /* @__PURE__ */ a("span", { style: b.badgeMatch, children: "✓ match" }) : /* @__PURE__ */ a("span", { style: b.badgeChanged, children: "● changed" });
|
|
3000
|
+
return /* @__PURE__ */ p("div", { style: b.fixtureRow, children: [
|
|
3001
|
+
/* @__PURE__ */ p("div", { style: b.fixtureLabel, children: [
|
|
3002
|
+
/* @__PURE__ */ a("span", { style: b.fixtureName, children: e.fixtureId }),
|
|
2822
3003
|
n
|
|
2823
3004
|
] }),
|
|
2824
|
-
/* @__PURE__ */ p("div", { style:
|
|
2825
|
-
/* @__PURE__ */ p("div", { style:
|
|
2826
|
-
/* @__PURE__ */ a("span", { style:
|
|
3005
|
+
/* @__PURE__ */ p("div", { style: b.sideBySide, children: [
|
|
3006
|
+
/* @__PURE__ */ p("div", { style: b.screenshotColumn, children: [
|
|
3007
|
+
/* @__PURE__ */ a("span", { style: b.columnLabel, children: "Current" }),
|
|
2827
3008
|
/* @__PURE__ */ a(
|
|
2828
|
-
|
|
3009
|
+
Me,
|
|
2829
3010
|
{
|
|
2830
3011
|
fixtureId: e.fixtureId,
|
|
2831
3012
|
sessionName: e.currentSession,
|
|
@@ -2833,10 +3014,10 @@ const yn = V(
|
|
|
2833
3014
|
}
|
|
2834
3015
|
)
|
|
2835
3016
|
] }),
|
|
2836
|
-
/* @__PURE__ */ p("div", { style:
|
|
2837
|
-
/* @__PURE__ */ a("span", { style:
|
|
3017
|
+
/* @__PURE__ */ p("div", { style: b.screenshotColumn, children: [
|
|
3018
|
+
/* @__PURE__ */ a("span", { style: b.columnLabel, children: "Baseline" }),
|
|
2838
3019
|
/* @__PURE__ */ a(
|
|
2839
|
-
|
|
3020
|
+
Me,
|
|
2840
3021
|
{
|
|
2841
3022
|
fixtureId: e.fixtureId,
|
|
2842
3023
|
sessionName: e.baselineSession,
|
|
@@ -2847,7 +3028,7 @@ const yn = V(
|
|
|
2847
3028
|
] })
|
|
2848
3029
|
] });
|
|
2849
3030
|
}
|
|
2850
|
-
),
|
|
3031
|
+
), Kn = k(
|
|
2851
3032
|
{
|
|
2852
3033
|
name: f.const(),
|
|
2853
3034
|
path: f.const(),
|
|
@@ -2857,9 +3038,9 @@ const yn = V(
|
|
|
2857
3038
|
currentSession: f.const()
|
|
2858
3039
|
},
|
|
2859
3040
|
(s, e) => /* @__PURE__ */ p("div", { children: [
|
|
2860
|
-
/* @__PURE__ */ a("div", { style:
|
|
2861
|
-
/* @__PURE__ */ a("div", { style:
|
|
2862
|
-
|
|
3041
|
+
/* @__PURE__ */ a("div", { style: b.groupHeader, children: /* @__PURE__ */ a("span", { style: b.groupTitle, children: e.path }) }),
|
|
3042
|
+
/* @__PURE__ */ a("div", { style: b.groupContent, children: e.items.map((t) => /* @__PURE__ */ a(
|
|
3043
|
+
qn,
|
|
2863
3044
|
{
|
|
2864
3045
|
fixtureId: t.fixtureId,
|
|
2865
3046
|
daemon: e.daemon,
|
|
@@ -2869,7 +3050,7 @@ const yn = V(
|
|
|
2869
3050
|
t.fixtureId
|
|
2870
3051
|
)) })
|
|
2871
3052
|
] })
|
|
2872
|
-
),
|
|
3053
|
+
), b = {
|
|
2873
3054
|
groupHeader: {
|
|
2874
3055
|
marginBottom: 12
|
|
2875
3056
|
},
|
|
@@ -2937,72 +3118,72 @@ const yn = V(
|
|
|
2937
3118
|
color: "var(--vscode-errorForeground)",
|
|
2938
3119
|
fontWeight: 500
|
|
2939
3120
|
}
|
|
2940
|
-
},
|
|
2941
|
-
let
|
|
2942
|
-
function
|
|
2943
|
-
if (
|
|
3121
|
+
}, lt = "component-explorer:fixtureHeights", Fe = 500;
|
|
3122
|
+
let R = null;
|
|
3123
|
+
function ht() {
|
|
3124
|
+
if (R !== null) return R;
|
|
2944
3125
|
try {
|
|
2945
|
-
const s = localStorage.getItem(
|
|
3126
|
+
const s = localStorage.getItem(lt);
|
|
2946
3127
|
if (s)
|
|
2947
|
-
return
|
|
3128
|
+
return R = JSON.parse(s), R;
|
|
2948
3129
|
} catch {
|
|
2949
3130
|
}
|
|
2950
|
-
return
|
|
3131
|
+
return R = {}, R;
|
|
2951
3132
|
}
|
|
2952
|
-
function
|
|
2953
|
-
if (
|
|
3133
|
+
function Jn() {
|
|
3134
|
+
if (R !== null)
|
|
2954
3135
|
try {
|
|
2955
|
-
const s = Object.entries(
|
|
2956
|
-
s.length >
|
|
3136
|
+
const s = Object.entries(R);
|
|
3137
|
+
s.length > Fe && (R = Object.fromEntries(s.slice(-Fe))), localStorage.setItem(lt, JSON.stringify(R));
|
|
2957
3138
|
} catch {
|
|
2958
3139
|
}
|
|
2959
3140
|
}
|
|
2960
|
-
function
|
|
2961
|
-
const t =
|
|
2962
|
-
t[s] = e,
|
|
3141
|
+
function Zn(s, e) {
|
|
3142
|
+
const t = ht();
|
|
3143
|
+
t[s] = e, Jn();
|
|
2963
3144
|
}
|
|
2964
|
-
function
|
|
2965
|
-
return new Map(Object.entries(
|
|
3145
|
+
function Xn() {
|
|
3146
|
+
return new Map(Object.entries(ht()));
|
|
2966
3147
|
}
|
|
2967
|
-
const
|
|
2968
|
-
function
|
|
3148
|
+
const Yn = 280, Qn = 32, oe = 32, Be = 400, ut = "component-explorer:scrollAnchors", Ee = 100;
|
|
3149
|
+
function ft() {
|
|
2969
3150
|
try {
|
|
2970
|
-
const s = localStorage.getItem(
|
|
3151
|
+
const s = localStorage.getItem(ut);
|
|
2971
3152
|
if (s) return JSON.parse(s);
|
|
2972
3153
|
} catch {
|
|
2973
3154
|
}
|
|
2974
3155
|
return {};
|
|
2975
3156
|
}
|
|
2976
|
-
function
|
|
3157
|
+
function es(s, e) {
|
|
2977
3158
|
try {
|
|
2978
|
-
const t =
|
|
3159
|
+
const t = ft();
|
|
2979
3160
|
t[s] = e;
|
|
2980
|
-
const n = Object.entries(t), r = n.length >
|
|
2981
|
-
localStorage.setItem(
|
|
3161
|
+
const n = Object.entries(t), r = n.length > Ee ? Object.fromEntries(n.slice(-Ee)) : t;
|
|
3162
|
+
localStorage.setItem(ut, JSON.stringify(r));
|
|
2982
3163
|
} catch {
|
|
2983
3164
|
}
|
|
2984
3165
|
}
|
|
2985
|
-
function
|
|
2986
|
-
return
|
|
3166
|
+
function ts(s) {
|
|
3167
|
+
return ft()[s];
|
|
2987
3168
|
}
|
|
2988
|
-
function
|
|
3169
|
+
function pt(s) {
|
|
2989
3170
|
return s.type === "single" ? s.fixture.id : s.id;
|
|
2990
3171
|
}
|
|
2991
|
-
function
|
|
3172
|
+
function ns(s, e) {
|
|
2992
3173
|
const t = new Array(s.length);
|
|
2993
|
-
let n =
|
|
3174
|
+
let n = oe;
|
|
2994
3175
|
for (let r = 0; r < s.length; r++) {
|
|
2995
|
-
const i = e.get(
|
|
2996
|
-
t[r] = { top: n, height: i }, n += i +
|
|
3176
|
+
const i = e.get(pt(s[r])) ?? Yn;
|
|
3177
|
+
t[r] = { top: n, height: i }, n += i + Qn;
|
|
2997
3178
|
}
|
|
2998
3179
|
return t;
|
|
2999
3180
|
}
|
|
3000
|
-
function
|
|
3181
|
+
function ss(s) {
|
|
3001
3182
|
if (s.length === 0) return 0;
|
|
3002
3183
|
const e = s[s.length - 1];
|
|
3003
|
-
return e.top + e.height +
|
|
3184
|
+
return e.top + e.height + oe;
|
|
3004
3185
|
}
|
|
3005
|
-
function
|
|
3186
|
+
function gt(s, e) {
|
|
3006
3187
|
let t = 0, n = s.length;
|
|
3007
3188
|
for (; t < n; ) {
|
|
3008
3189
|
const r = t + n >> 1;
|
|
@@ -3010,75 +3191,75 @@ function st(s, e) {
|
|
|
3010
3191
|
}
|
|
3011
3192
|
return t;
|
|
3012
3193
|
}
|
|
3013
|
-
function
|
|
3194
|
+
function rs(s, e, t) {
|
|
3014
3195
|
if (s.length === 0) return { start: 0, end: 0 };
|
|
3015
|
-
const n =
|
|
3196
|
+
const n = gt(s, e - Be);
|
|
3016
3197
|
let r = n;
|
|
3017
|
-
const i = e + t +
|
|
3198
|
+
const i = e + t + Be;
|
|
3018
3199
|
for (; r < s.length && s[r].top < i; )
|
|
3019
3200
|
r++;
|
|
3020
3201
|
return { start: n, end: r };
|
|
3021
3202
|
}
|
|
3022
|
-
function
|
|
3203
|
+
function ze(s, e) {
|
|
3023
3204
|
if (s.length === 0) return;
|
|
3024
|
-
const t =
|
|
3205
|
+
const t = gt(s, e), n = Math.min(t, s.length - 1);
|
|
3025
3206
|
return {
|
|
3026
3207
|
rowIndex: n,
|
|
3027
3208
|
offsetFromViewport: s[n].top - e
|
|
3028
3209
|
};
|
|
3029
3210
|
}
|
|
3030
|
-
function
|
|
3211
|
+
function He(s, e) {
|
|
3031
3212
|
return e.rowIndex >= s.length ? 0 : s[e.rowIndex].top - e.offsetFromViewport;
|
|
3032
3213
|
}
|
|
3033
|
-
class
|
|
3214
|
+
class is extends F({
|
|
3034
3215
|
model: f.const()
|
|
3035
3216
|
}) {
|
|
3036
3217
|
constructor() {
|
|
3037
3218
|
super(...arguments);
|
|
3038
|
-
|
|
3039
|
-
|
|
3040
|
-
|
|
3041
|
-
|
|
3042
|
-
|
|
3043
|
-
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
|
|
3219
|
+
l(this, "_rowHeights", v(this, Xn()));
|
|
3220
|
+
l(this, "_scrollTop", v(this, 0));
|
|
3221
|
+
l(this, "_viewportHeight", v(this, 0));
|
|
3222
|
+
l(this, "_scrollContainerRef", null);
|
|
3223
|
+
l(this, "_resizeObserver", null);
|
|
3224
|
+
l(this, "_viewportResizeObserver", null);
|
|
3225
|
+
l(this, "_currentNodeId");
|
|
3226
|
+
l(this, "_scrollSaveTimeout", null);
|
|
3227
|
+
l(this, "_suppressScrollHandler", !1);
|
|
3228
|
+
l(this, "layout", N(this, (t) => {
|
|
3048
3229
|
const n = this.explorerModel.selectedFixtures.read(t), r = this._rowHeights.read(t);
|
|
3049
|
-
return
|
|
3230
|
+
return ns(n, r);
|
|
3050
3231
|
}));
|
|
3051
|
-
|
|
3232
|
+
l(this, "visibleRowRange", N(this, (t) => {
|
|
3052
3233
|
const n = this.layout.read(t), r = this._scrollTop.read(t), i = this._viewportHeight.read(t);
|
|
3053
|
-
return
|
|
3234
|
+
return rs(n, r, i);
|
|
3054
3235
|
}));
|
|
3055
|
-
|
|
3236
|
+
l(this, "setScrollContainerRef", (t) => {
|
|
3056
3237
|
var n;
|
|
3057
3238
|
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(([r]) => {
|
|
3058
3239
|
this._viewportHeight.set(Math.round(r.contentRect.height), void 0);
|
|
3059
3240
|
}), this._viewportResizeObserver.observe(t), this._restoreScrollPosition());
|
|
3060
3241
|
});
|
|
3061
|
-
|
|
3242
|
+
l(this, "_handleScroll", () => {
|
|
3062
3243
|
this._scrollContainerRef && (this._scrollTop.set(this._scrollContainerRef.scrollTop, void 0), !(this._suppressScrollHandler || !this._currentNodeId) && (this._scrollSaveTimeout && clearTimeout(this._scrollSaveTimeout), this._scrollSaveTimeout = setTimeout(() => {
|
|
3063
3244
|
if (!this._currentNodeId) return;
|
|
3064
|
-
const t = this.layout.get(), n =
|
|
3065
|
-
n &&
|
|
3245
|
+
const t = this.layout.get(), n = ze(t, this._scrollTop.get());
|
|
3246
|
+
n && es(this._currentNodeId, n);
|
|
3066
3247
|
}, 150)));
|
|
3067
3248
|
});
|
|
3068
|
-
|
|
3249
|
+
l(this, "observeRowElement", (t, n) => {
|
|
3069
3250
|
t && (this._resizeObserver || (this._resizeObserver = new ResizeObserver((r) => {
|
|
3070
3251
|
const i = this._rowHeights.get();
|
|
3071
3252
|
let o;
|
|
3072
3253
|
for (const d of r) {
|
|
3073
|
-
const
|
|
3074
|
-
if (!
|
|
3254
|
+
const c = d.target.getAttribute("data-row-id");
|
|
3255
|
+
if (!c) continue;
|
|
3075
3256
|
const h = Math.round(d.contentRect.height);
|
|
3076
|
-
h > 0 && i.get(
|
|
3257
|
+
h > 0 && i.get(c) !== h && (o || (o = new Map(i)), o.set(c, h), Zn(c, h));
|
|
3077
3258
|
}
|
|
3078
3259
|
if (o) {
|
|
3079
|
-
const d = this.layout.get(),
|
|
3080
|
-
if (this._rowHeights.set(o, void 0),
|
|
3081
|
-
const h = this.layout.get(), g =
|
|
3260
|
+
const d = this.layout.get(), c = ze(d, this._scrollTop.get());
|
|
3261
|
+
if (this._rowHeights.set(o, void 0), c && this._scrollContainerRef) {
|
|
3262
|
+
const h = this.layout.get(), g = He(h, c);
|
|
3082
3263
|
this._suppressScrollHandler = !0, this._scrollContainerRef.scrollTop = g, this._scrollTop.set(g, void 0), requestAnimationFrame(() => {
|
|
3083
3264
|
this._suppressScrollHandler = !1;
|
|
3084
3265
|
});
|
|
@@ -3095,9 +3276,9 @@ class Dn extends N({
|
|
|
3095
3276
|
}
|
|
3096
3277
|
_restoreScrollPosition() {
|
|
3097
3278
|
if (!this._scrollContainerRef || !this._currentNodeId) return;
|
|
3098
|
-
const t =
|
|
3279
|
+
const t = ts(this._currentNodeId);
|
|
3099
3280
|
if (!t) return;
|
|
3100
|
-
const n = this.layout.get(), r =
|
|
3281
|
+
const n = this.layout.get(), r = He(n, t);
|
|
3101
3282
|
this._suppressScrollHandler = !0, this._scrollContainerRef.scrollTop = r, this._scrollTop.set(r, void 0), requestAnimationFrame(() => {
|
|
3102
3283
|
this._suppressScrollHandler = !1;
|
|
3103
3284
|
});
|
|
@@ -3107,47 +3288,47 @@ class Dn extends N({
|
|
|
3107
3288
|
(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);
|
|
3108
3289
|
}
|
|
3109
3290
|
}
|
|
3110
|
-
const
|
|
3111
|
-
|
|
3291
|
+
const os = B(
|
|
3292
|
+
is,
|
|
3112
3293
|
{},
|
|
3113
3294
|
(s, e) => {
|
|
3114
3295
|
const t = e.explorerModel.selectedFixtures.read(s), n = e.explorerModel.selectedNodeId.read(s), r = e.layout.read(s), { start: i, end: o } = e.visibleRowRange.read(s);
|
|
3115
3296
|
if (e.updateForSelection(n), t.length === 0)
|
|
3116
|
-
return /* @__PURE__ */ a("div", { style:
|
|
3117
|
-
const d =
|
|
3118
|
-
return /* @__PURE__ */ a("div", { ref: e.setScrollContainerRef, style:
|
|
3119
|
-
const g = i + h, { top:
|
|
3297
|
+
return /* @__PURE__ */ a("div", { style: J.emptyState, children: /* @__PURE__ */ a("span", { style: J.emptyText, children: "Select a component or folder to preview" }) });
|
|
3298
|
+
const d = ss(r);
|
|
3299
|
+
return /* @__PURE__ */ a("div", { ref: e.setScrollContainerRef, style: J.scrollContainer, children: /* @__PURE__ */ a("div", { style: { position: "relative", height: d }, children: t.slice(i, o).map((c, h) => {
|
|
3300
|
+
const g = i + h, { top: _ } = r[g], x = pt(c);
|
|
3120
3301
|
return /* @__PURE__ */ a(
|
|
3121
3302
|
"div",
|
|
3122
3303
|
{
|
|
3123
|
-
ref: (
|
|
3124
|
-
style: { position: "absolute", top:
|
|
3125
|
-
children:
|
|
3126
|
-
|
|
3304
|
+
ref: (w) => e.observeRowElement(w, x),
|
|
3305
|
+
style: { position: "absolute", top: _, left: oe, right: oe },
|
|
3306
|
+
children: c.type === "single" ? /* @__PURE__ */ a(dt, { fixture: c.fixture, compact: !1 }) : c.type === "variants" ? /* @__PURE__ */ a(as, { row: c }) : c.type === "screenshot-comparison" && e.explorerModel.daemon ? /* @__PURE__ */ a(
|
|
3307
|
+
Kn,
|
|
3127
3308
|
{
|
|
3128
|
-
name:
|
|
3129
|
-
path:
|
|
3130
|
-
items:
|
|
3309
|
+
name: c.name,
|
|
3310
|
+
path: c.path,
|
|
3311
|
+
items: c.items,
|
|
3131
3312
|
daemon: e.explorerModel.daemon,
|
|
3132
3313
|
baselineSession: "baseline",
|
|
3133
3314
|
currentSession: "current"
|
|
3134
3315
|
}
|
|
3135
3316
|
) : null
|
|
3136
3317
|
},
|
|
3137
|
-
|
|
3318
|
+
x
|
|
3138
3319
|
);
|
|
3139
3320
|
}) }) });
|
|
3140
3321
|
}
|
|
3141
|
-
),
|
|
3322
|
+
), as = k(
|
|
3142
3323
|
{ row: f.const() },
|
|
3143
3324
|
(s, e) => {
|
|
3144
3325
|
const t = e.row;
|
|
3145
3326
|
return /* @__PURE__ */ p("div", { children: [
|
|
3146
|
-
/* @__PURE__ */ a("div", { style:
|
|
3147
|
-
/* @__PURE__ */ a("div", { style:
|
|
3327
|
+
/* @__PURE__ */ a("div", { style: J.variantsHeader, children: /* @__PURE__ */ a("span", { style: J.variantsTitle, children: t.path }) }),
|
|
3328
|
+
/* @__PURE__ */ a("div", { style: J.variantsContent, children: t.fixtures.map((n) => /* @__PURE__ */ a(dt, { fixture: n, compact: !0 }, n.id)) })
|
|
3148
3329
|
] });
|
|
3149
3330
|
}
|
|
3150
|
-
),
|
|
3331
|
+
), J = {
|
|
3151
3332
|
scrollContainer: {
|
|
3152
3333
|
flex: 1,
|
|
3153
3334
|
overflow: "auto",
|
|
@@ -3178,24 +3359,24 @@ const An = V(
|
|
|
3178
3359
|
flexWrap: "wrap",
|
|
3179
3360
|
gap: "16px"
|
|
3180
3361
|
}
|
|
3181
|
-
},
|
|
3182
|
-
|
|
3362
|
+
}, mt = B(
|
|
3363
|
+
Cn,
|
|
3183
3364
|
{ daemonModel: f.const() },
|
|
3184
3365
|
(s, e) => {
|
|
3185
3366
|
const t = e.leftSidebarVisible.read(s), n = e.rightSidebarVisible.read(s), r = e.isDarkTheme.read(s), i = e.selectedNode.read(s);
|
|
3186
3367
|
return /* @__PURE__ */ p("div", { className: r ? "vscode-theme default-dark-plus" : "vscode-theme default-light-plus", style: u.container, children: [
|
|
3187
|
-
t && /* @__PURE__ */ a(
|
|
3368
|
+
t && /* @__PURE__ */ a(Fn, { model: e }),
|
|
3188
3369
|
/* @__PURE__ */ p("div", { style: u.centerArea, children: [
|
|
3189
|
-
/* @__PURE__ */ a(
|
|
3190
|
-
/* @__PURE__ */ a(
|
|
3370
|
+
/* @__PURE__ */ a(Dn, { model: e }),
|
|
3371
|
+
/* @__PURE__ */ a(os, { model: e })
|
|
3191
3372
|
] }),
|
|
3192
|
-
n && /* @__PURE__ */ a(
|
|
3373
|
+
n && /* @__PURE__ */ a(Hn, { selectedNode: i })
|
|
3193
3374
|
] });
|
|
3194
3375
|
}
|
|
3195
3376
|
);
|
|
3196
|
-
function
|
|
3197
|
-
const s = new
|
|
3198
|
-
return s.register("components/Button.fixture.tsx",
|
|
3377
|
+
function ds() {
|
|
3378
|
+
const s = new it();
|
|
3379
|
+
return s.register("components/Button.fixture.tsx", ee({
|
|
3199
3380
|
Primary: {
|
|
3200
3381
|
render: (e) => (e.innerHTML = "<button>Primary Button</button>", { dispose: () => {
|
|
3201
3382
|
e.innerHTML = "";
|
|
@@ -3206,7 +3387,7 @@ function Mn() {
|
|
|
3206
3387
|
e.innerHTML = "";
|
|
3207
3388
|
} })
|
|
3208
3389
|
}
|
|
3209
|
-
})), s.register("components/Input.fixture.tsx",
|
|
3390
|
+
})), s.register("components/Input.fixture.tsx", ee({
|
|
3210
3391
|
Text: {
|
|
3211
3392
|
render: (e) => (e.innerHTML = '<input type="text" placeholder="Text Input" />', { dispose: () => {
|
|
3212
3393
|
e.innerHTML = "";
|
|
@@ -3217,13 +3398,13 @@ function Mn() {
|
|
|
3217
3398
|
e.innerHTML = "";
|
|
3218
3399
|
} })
|
|
3219
3400
|
}
|
|
3220
|
-
})), s.register("components/Card.fixture.tsx",
|
|
3401
|
+
})), s.register("components/Card.fixture.tsx", ee({
|
|
3221
3402
|
Basic: {
|
|
3222
3403
|
render: (e) => (e.innerHTML = '<div style="border: 1px solid #ccc; padding: 16px;">Basic Card</div>', { dispose: () => {
|
|
3223
3404
|
e.innerHTML = "";
|
|
3224
3405
|
} })
|
|
3225
3406
|
}
|
|
3226
|
-
})), s.register("components/Feedback.fixture.tsx",
|
|
3407
|
+
})), s.register("components/Feedback.fixture.tsx", ee({
|
|
3227
3408
|
Badge: {
|
|
3228
3409
|
render: (e) => (e.innerHTML = '<span style="background: blue; color: white; padding: 2px 8px; border-radius: 4px;">Badge</span>', { dispose: () => {
|
|
3229
3410
|
e.innerHTML = "";
|
|
@@ -3236,30 +3417,30 @@ function Mn() {
|
|
|
3236
3417
|
}
|
|
3237
3418
|
})), s;
|
|
3238
3419
|
}
|
|
3239
|
-
function
|
|
3240
|
-
const s =
|
|
3241
|
-
return /* @__PURE__ */ a(
|
|
3420
|
+
function Ss() {
|
|
3421
|
+
const s = ds();
|
|
3422
|
+
return /* @__PURE__ */ a(mt, { registry: s });
|
|
3242
3423
|
}
|
|
3243
|
-
var
|
|
3424
|
+
var cs = class ve {
|
|
3244
3425
|
constructor(e) {
|
|
3245
3426
|
this.iterator = e;
|
|
3246
3427
|
}
|
|
3247
3428
|
static fromIterable(e) {
|
|
3248
|
-
return new
|
|
3429
|
+
return new ve(e[Symbol.asyncIterator]());
|
|
3249
3430
|
}
|
|
3250
3431
|
static fromFn(e) {
|
|
3251
|
-
return new
|
|
3432
|
+
return new ve(e());
|
|
3252
3433
|
}
|
|
3253
3434
|
[Symbol.asyncIterator]() {
|
|
3254
3435
|
return this.iterator;
|
|
3255
3436
|
}
|
|
3256
|
-
},
|
|
3437
|
+
}, ls = class extends Error {
|
|
3257
3438
|
constructor(s, e, t) {
|
|
3258
3439
|
super(t), this.statusCode = s, this.method = e, this.name = "ApiError";
|
|
3259
3440
|
}
|
|
3260
|
-
},
|
|
3441
|
+
}, hs = class {
|
|
3261
3442
|
constructor(s) {
|
|
3262
|
-
|
|
3443
|
+
l(this, "methods", this._createProxy(""));
|
|
3263
3444
|
this._request = s;
|
|
3264
3445
|
}
|
|
3265
3446
|
_createProxy(s) {
|
|
@@ -3270,8 +3451,8 @@ var Fn = class le {
|
|
|
3270
3451
|
});
|
|
3271
3452
|
}
|
|
3272
3453
|
};
|
|
3273
|
-
function
|
|
3274
|
-
return new
|
|
3454
|
+
function us(s, e) {
|
|
3455
|
+
return new hs(async (t, n) => {
|
|
3275
3456
|
var d;
|
|
3276
3457
|
const r = await fetch(`${s}/${t}`, {
|
|
3277
3458
|
method: "POST",
|
|
@@ -3282,48 +3463,48 @@ function Hn(s, e) {
|
|
|
3282
3463
|
body: JSON.stringify(n)
|
|
3283
3464
|
});
|
|
3284
3465
|
if (r.status !== 200) {
|
|
3285
|
-
const
|
|
3466
|
+
const c = await r.json().catch(() => null);
|
|
3286
3467
|
let h;
|
|
3287
|
-
throw
|
|
3468
|
+
throw c && typeof c == "object" && "errorMessage" in c ? h = `${c.errorMessage}` : h = `Error calling API method ${t}: ${JSON.stringify(c)} (Status: ${r.status}, Status Text: ${r.statusText})`, new ls(r.status, t, h);
|
|
3288
3469
|
}
|
|
3289
3470
|
const i = r.headers.get("Content-Type");
|
|
3290
|
-
return i != null && i.startsWith("application/jsonl") ?
|
|
3291
|
-
var
|
|
3292
|
-
const
|
|
3293
|
-
if (!
|
|
3471
|
+
return i != null && i.startsWith("application/jsonl") ? cs.fromFn(async function* () {
|
|
3472
|
+
var x;
|
|
3473
|
+
const c = (x = r.body) == null ? void 0 : x.getReader();
|
|
3474
|
+
if (!c)
|
|
3294
3475
|
return;
|
|
3295
3476
|
let h = "";
|
|
3296
3477
|
const g = new TextDecoder("utf-8");
|
|
3297
3478
|
for (; ; ) {
|
|
3298
|
-
const { done:
|
|
3299
|
-
if (
|
|
3479
|
+
const { done: w, value: U } = await c.read();
|
|
3480
|
+
if (w)
|
|
3300
3481
|
break;
|
|
3301
|
-
h += g.decode(
|
|
3302
|
-
let
|
|
3303
|
-
for (; (
|
|
3482
|
+
h += g.decode(U, { stream: !0 });
|
|
3483
|
+
let D;
|
|
3484
|
+
for (; (D = h.indexOf(`
|
|
3304
3485
|
`)) >= 0; ) {
|
|
3305
|
-
const
|
|
3306
|
-
h = h.slice(
|
|
3486
|
+
const y = h.slice(0, D).trim();
|
|
3487
|
+
h = h.slice(D + 1), y.length > 0 && (yield JSON.parse(y));
|
|
3307
3488
|
}
|
|
3308
3489
|
}
|
|
3309
|
-
const
|
|
3310
|
-
|
|
3490
|
+
const _ = h.trim();
|
|
3491
|
+
_.length > 0 && (yield JSON.parse(_));
|
|
3311
3492
|
}) : await r.json();
|
|
3312
3493
|
});
|
|
3313
3494
|
}
|
|
3314
|
-
class
|
|
3495
|
+
class fs {
|
|
3315
3496
|
constructor(e) {
|
|
3316
|
-
|
|
3317
|
-
|
|
3318
|
-
|
|
3319
|
-
|
|
3320
|
-
|
|
3321
|
-
|
|
3497
|
+
l(this, "_sourceTreeIds", v(this, /* @__PURE__ */ new Map()));
|
|
3498
|
+
l(this, "_sessions", v(this, []));
|
|
3499
|
+
l(this, "_screenshotCache", /* @__PURE__ */ new Map());
|
|
3500
|
+
l(this, "_client");
|
|
3501
|
+
l(this, "_eventStreamAbort", null);
|
|
3502
|
+
l(this, "sessionName");
|
|
3322
3503
|
/** Observable map of sessionName → current sourceTreeId */
|
|
3323
|
-
|
|
3504
|
+
l(this, "sourceTreeIds", this._sourceTreeIds);
|
|
3324
3505
|
/** Observable list of sessions from the daemon */
|
|
3325
|
-
|
|
3326
|
-
this.config = e, this.sessionName = e.sessionName, this._client =
|
|
3506
|
+
l(this, "sessions", this._sessions);
|
|
3507
|
+
this.config = e, this.sessionName = e.sessionName, this._client = us("/__explorer/daemon-api");
|
|
3327
3508
|
}
|
|
3328
3509
|
/**
|
|
3329
3510
|
* Initializes the model: fetches initial session info and starts listening to events.
|
|
@@ -3421,21 +3602,21 @@ class Ln {
|
|
|
3421
3602
|
}
|
|
3422
3603
|
}
|
|
3423
3604
|
}
|
|
3424
|
-
function
|
|
3605
|
+
function ps() {
|
|
3425
3606
|
return window.__EXPLORER_DAEMON__;
|
|
3426
3607
|
}
|
|
3427
|
-
class
|
|
3608
|
+
class Is {
|
|
3428
3609
|
constructor(e, t) {
|
|
3429
|
-
|
|
3430
|
-
|
|
3431
|
-
|
|
3432
|
-
this._populateRegistry(t), this._daemonModel = this._initializeDaemonModel(), this._root =
|
|
3610
|
+
l(this, "_root");
|
|
3611
|
+
l(this, "_registry", new it());
|
|
3612
|
+
l(this, "_daemonModel");
|
|
3613
|
+
this._populateRegistry(t), this._daemonModel = this._initializeDaemonModel(), this._root = yt(e), this._root.render(St(mt, { registry: this._registry, daemonModel: this._daemonModel }));
|
|
3433
3614
|
}
|
|
3434
3615
|
_initializeDaemonModel() {
|
|
3435
|
-
const e =
|
|
3616
|
+
const e = ps();
|
|
3436
3617
|
if (!e)
|
|
3437
3618
|
return;
|
|
3438
|
-
const t = new
|
|
3619
|
+
const t = new fs(e);
|
|
3439
3620
|
return t.initialize().catch((n) => {
|
|
3440
3621
|
console.error("[ExplorerApp] Failed to initialize DaemonModel:", n);
|
|
3441
3622
|
}), t;
|
|
@@ -3468,42 +3649,42 @@ class Yn {
|
|
|
3468
3649
|
}
|
|
3469
3650
|
}
|
|
3470
3651
|
export {
|
|
3471
|
-
|
|
3472
|
-
|
|
3473
|
-
|
|
3474
|
-
|
|
3475
|
-
|
|
3476
|
-
|
|
3477
|
-
|
|
3478
|
-
|
|
3479
|
-
|
|
3480
|
-
|
|
3481
|
-
|
|
3482
|
-
|
|
3483
|
-
|
|
3484
|
-
|
|
3485
|
-
|
|
3486
|
-
|
|
3487
|
-
|
|
3488
|
-
|
|
3489
|
-
|
|
3490
|
-
|
|
3491
|
-
|
|
3492
|
-
|
|
3493
|
-
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
|
|
3497
|
-
|
|
3498
|
-
|
|
3499
|
-
|
|
3500
|
-
|
|
3501
|
-
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
|
|
3652
|
+
Sn as ChevronDownIcon,
|
|
3653
|
+
wn as ChevronRightIcon,
|
|
3654
|
+
ws as CliRuntime,
|
|
3655
|
+
In as ComponentIcon,
|
|
3656
|
+
fs as DaemonModel,
|
|
3657
|
+
mt as Explorer,
|
|
3658
|
+
Is as ExplorerApp,
|
|
3659
|
+
Cn as ExplorerModel,
|
|
3660
|
+
Ss as ExplorerWithDefaults,
|
|
3661
|
+
it as FixtureRegistry,
|
|
3662
|
+
On as FolderIcon,
|
|
3663
|
+
Fn as LeftSidebar,
|
|
3664
|
+
Nn as MoonIcon,
|
|
3665
|
+
Tn as PanelLeftIcon,
|
|
3666
|
+
Rn as PanelRightIcon,
|
|
3667
|
+
Hn as RightSidebar,
|
|
3668
|
+
Vn as SunIcon,
|
|
3669
|
+
Dn as TitleBar,
|
|
3670
|
+
de as TitleBarButton,
|
|
3671
|
+
Mn as TreeItem,
|
|
3672
|
+
at as TreeView,
|
|
3673
|
+
It as VIEWPORT_SIZES,
|
|
3674
|
+
At as collectComponents,
|
|
3675
|
+
ce as createFixtureTree,
|
|
3676
|
+
ee as defineFixture,
|
|
3677
|
+
Cs as defineFixtureGroup,
|
|
3678
|
+
xs as defineFixtureVariants,
|
|
3679
|
+
Oe as findNodeByPath,
|
|
3680
|
+
Tt as getDefaultPropertyValues,
|
|
3681
|
+
ys as isComponentDefinition,
|
|
3682
|
+
Vt as isFixtureGroup,
|
|
3683
|
+
Nt as isFixtureVariants,
|
|
3684
|
+
Rt as isSingleFixture,
|
|
3685
|
+
Se as mergeStyles,
|
|
3686
|
+
Ot as resolveViewport,
|
|
3506
3687
|
u as styles,
|
|
3507
|
-
|
|
3688
|
+
ot as toExplorerTree
|
|
3508
3689
|
};
|
|
3509
3690
|
//# sourceMappingURL=index.js.map
|