@pygmalionjs/pygmalion 0.5.29 → 0.5.30
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-lib/pygmalion.js
CHANGED
|
@@ -11985,34 +11985,36 @@ function iv(e, t) {
|
|
|
11985
11985
|
const o = e.slice(r + n.length);
|
|
11986
11986
|
return o.startsWith(" · ") ? o.slice(3) : t;
|
|
11987
11987
|
}
|
|
11988
|
-
function sv(e, t, n = () => !0) {
|
|
11989
|
-
const
|
|
11990
|
-
for (const
|
|
11991
|
-
const
|
|
11992
|
-
|
|
11988
|
+
function sv(e, t, n = () => !0, r = () => !0) {
|
|
11989
|
+
const o = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Set();
|
|
11990
|
+
for (const p of e) {
|
|
11991
|
+
const m = p.canvas ?? "default";
|
|
11992
|
+
c.add(m), p.section && !o.has(m) && o.set(m, p.section), r(p) && (a.set(m, (a.get(m) ?? 0) + 1), n(p) && i.set(m, (i.get(m) ?? 0) + 1));
|
|
11993
11993
|
}
|
|
11994
|
-
const
|
|
11995
|
-
for (const
|
|
11996
|
-
const
|
|
11997
|
-
if (
|
|
11998
|
-
|
|
11994
|
+
const l = [], d = [], u = /* @__PURE__ */ new Map();
|
|
11995
|
+
for (const p of t) {
|
|
11996
|
+
const m = i.get(p) ?? 0, b = a.get(p) ?? 0;
|
|
11997
|
+
if (b === 0 && c.has(p)) continue;
|
|
11998
|
+
const x = o.get(p);
|
|
11999
|
+
if (!x || !p.includes(` · ${x}`)) {
|
|
12000
|
+
l.push({ canvas: p, label: p, frames: m, declared: b });
|
|
11999
12001
|
continue;
|
|
12000
12002
|
}
|
|
12001
|
-
const
|
|
12002
|
-
if (
|
|
12003
|
-
|
|
12003
|
+
const w = { canvas: p, label: iv(p, x), frames: m, declared: b }, v = u.get(x);
|
|
12004
|
+
if (v === void 0) {
|
|
12005
|
+
u.set(x, d.length), d.push({ section: x, canvases: [w], frames: m, declared: b, single: !0 });
|
|
12004
12006
|
continue;
|
|
12005
12007
|
}
|
|
12006
|
-
const
|
|
12007
|
-
|
|
12008
|
-
section:
|
|
12009
|
-
canvases: [...
|
|
12010
|
-
frames:
|
|
12011
|
-
declared:
|
|
12008
|
+
const E = d[v];
|
|
12009
|
+
d[v] = {
|
|
12010
|
+
section: x,
|
|
12011
|
+
canvases: [...E.canvases, w],
|
|
12012
|
+
frames: E.frames + m,
|
|
12013
|
+
declared: E.declared + b,
|
|
12012
12014
|
single: !1
|
|
12013
12015
|
};
|
|
12014
12016
|
}
|
|
12015
|
-
return { loose:
|
|
12017
|
+
return { loose: l, groups: d };
|
|
12016
12018
|
}
|
|
12017
12019
|
let wa = null;
|
|
12018
12020
|
const Sa = /* @__PURE__ */ new Set();
|
|
@@ -13078,9 +13080,10 @@ const ys = Be(function({
|
|
|
13078
13080
|
ii
|
|
13079
13081
|
);
|
|
13080
13082
|
const [o, i] = Ev("frames", 176), [a, c] = Q({}), l = sv(
|
|
13081
|
-
f.pages
|
|
13083
|
+
f.pages,
|
|
13082
13084
|
f.canvasNames,
|
|
13083
|
-
(I) => f.isScreenStateShown(I)
|
|
13085
|
+
(I) => f.isScreenStateShown(I),
|
|
13086
|
+
(I) => f.isInSelectedRuntime(I)
|
|
13084
13087
|
), d = (I) => I.canvases.some((N) => N.canvas === f.activeCanvas), u = Xe(
|
|
13085
13088
|
Mf,
|
|
13086
13089
|
ho,
|
|
@@ -54,5 +54,5 @@ export type CanvasTreeVisibility = (page: never) => boolean;
|
|
|
54
54
|
* canvas list already resolved — that order carries the host's declared
|
|
55
55
|
* section ranking, which a regrouping here would quietly discard.
|
|
56
56
|
*/
|
|
57
|
-
export declare function buildCanvasTree<TPage extends CanvasTreePage>(pages: readonly TPage[], canvasNames: readonly string[], isShown?: (page: TPage) => boolean): CanvasTree;
|
|
57
|
+
export declare function buildCanvasTree<TPage extends CanvasTreePage>(pages: readonly TPage[], canvasNames: readonly string[], isShown?: (page: TPage) => boolean, exists?: (page: TPage) => boolean): CanvasTree;
|
|
58
58
|
export {};
|