@cardenelabs/dragon 0.45.2 → 0.45.5
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/cli.cjs +10 -8
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +10 -8
- package/dist/cli.js.map +1 -1
- package/dist/export.cjs +10 -8
- package/dist/export.cjs.map +1 -1
- package/dist/export.js +10 -8
- package/dist/export.js.map +1 -1
- package/dist/index.cjs +10 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +10 -8
- package/dist/index.js.map +1 -1
- package/dist/light/chunk-5OQV42W3.cjs.map +1 -1
- package/dist/light/chunk-CLS6JVKK.cjs.map +1 -1
- package/dist/light/chunk-JCEKXALJ.cjs.map +1 -1
- package/dist/light/git-K3KAAAWW.cjs.map +1 -1
- package/dist/light/index.cjs +4 -4
- package/dist/light/index.cjs.map +1 -1
- package/dist/light/index.js +4 -4
- package/dist/light/index.js.map +1 -1
- package/dist/light/lineup-623J25LU.cjs.map +1 -1
- package/dist/light/state-OZVCHX7H.cjs.map +1 -1
- package/dist/light/{time-PQCPVQOE.cjs → time-KVMZIKYF.cjs} +8 -6
- package/dist/light/time-KVMZIKYF.cjs.map +1 -0
- package/dist/light/{time-6WEMD4FQ.js → time-O4CMTUV5.js} +8 -6
- package/dist/light/{time-6WEMD4FQ.js.map → time-O4CMTUV5.js.map} +1 -1
- package/dist/light/tree-6D7KI57H.cjs.map +1 -1
- package/dist/player.global.js +3 -3
- package/package.json +1 -1
- package/src/render/draw.ts +7 -5
- package/src/render/time.ts +13 -6
- package/dist/light/time-PQCPVQOE.cjs.map +0 -1
package/dist/cli.js
CHANGED
|
@@ -9417,9 +9417,9 @@ function followView(layout, timeline, diagram, m, id, content, follow, heads, dr
|
|
|
9417
9417
|
return { vh: vh2, mw: mw2, k: k2, mh: mh2, bw: bw2, bgW: bw2 + M.pad * 2, bgH: mh2 + M.pad * 2 + M.title, beside: mh2 > mw2 };
|
|
9418
9418
|
};
|
|
9419
9419
|
const natural = sized(Math.min(worldH, Math.max(F.minH, full * F.aspect)));
|
|
9420
|
-
const bare = natural.beside
|
|
9420
|
+
const bare = frameWidth < F.narrow && (natural.beside || layout.strip !== void 0);
|
|
9421
9421
|
const tableH = layout.strip ? rewrapStrip(layout.strip, 0, 0, full).h + M.inset : 0;
|
|
9422
|
-
const room = follow.height === void 0 ? Number.POSITIVE_INFINITY : (natural.beside ? follow.height : follow.height - natural.bgH - M.inset) - tableH;
|
|
9422
|
+
const room = follow.height === void 0 ? Number.POSITIVE_INFINITY : (natural.beside || bare ? follow.height : follow.height - natural.bgH - M.inset) - tableH;
|
|
9423
9423
|
const { vh, mw, k, mh, bw, bgW, bgH, beside } = room < natural.vh ? sized(Math.max(F.fitMinH, room)) : { ...natural, vh: Number.isFinite(room) ? Math.min(worldH, room) : natural.vh };
|
|
9424
9424
|
const vw = beside && !bare ? Math.min(layout.width, frameWidth - bgW - M.inset) : full;
|
|
9425
9425
|
const clampX = (x) => Math.min(layout.width - vw / 2, Math.max(vw / 2, x));
|
|
@@ -9480,7 +9480,7 @@ function followView(layout, timeline, diagram, m, id, content, follow, heads, dr
|
|
|
9480
9480
|
const head = strip2 === 0 ? "" : `<g class="dg-hd"><rect class="dg-hd-bg" width="${vw}" height="${strip2}"/><line class="dg-sep" x1="0" y1="${strip2}" x2="${vw}" y2="${strip2}"/><g class="dg-a" style="${m.move(cam.map(([t, cx, , s, e]) => [t, vw / 2 - cx, 0, s, e]))}">${heads}</g></g>`;
|
|
9481
9481
|
const body = `<defs><clipPath id="dg-vp-${id}"><rect width="${vw}" height="${vh}" rx="${LOOK.region.radius}"/></clipPath>${mini.clip}</defs><g clip-path="url(#dg-vp-${id})"><rect class="dg-vp-bg" width="${vw}" height="${vh}"/><g class="dg-a" style="${camKf}">${content}</g>${head}</g><rect class="dg-vp-frame" x="0.5" y="0.5" width="${vw - 1}" height="${vh - 1}" rx="${LOOK.region.radius}"/>${mini.body}`;
|
|
9482
9482
|
const w = beside && !bare ? vw + M.inset + bgW : full;
|
|
9483
|
-
const bottom = beside ? vh : bgY + bgH;
|
|
9483
|
+
const bottom = beside || bare ? vh : bgY + bgH;
|
|
9484
9484
|
if (!layout.strip) return { body, w, h: bottom };
|
|
9485
9485
|
const table = rewrapStrip(layout.strip, 0, bottom + M.inset, full);
|
|
9486
9486
|
return { body: body + drawTable(table, layout.strip), w, h: table.y + table.h };
|
|
@@ -11379,13 +11379,15 @@ function meterField(field, keys2, ctx) {
|
|
|
11379
11379
|
function timeFocus(layout, timeline, step, parts, vw, vh) {
|
|
11380
11380
|
const span = timeline.steps[step];
|
|
11381
11381
|
const position = valueAt(timeline.needle ?? [], span.end - MOTION.still);
|
|
11382
|
-
const
|
|
11382
|
+
const badge2 = layout.badges.find((b) => b.step === step);
|
|
11383
|
+
const anchored = badge2 && valueAt(timeline.needle ?? [], span.start) === position && !(layout.strip && badge2.y >= layout.strip.y);
|
|
11384
|
+
const ax = anchored ? badge2.x : layout.axis.x + position * layout.axis.unit;
|
|
11383
11385
|
const top = Math.min(...layout.rows.map((r) => r.y));
|
|
11384
11386
|
const bottom = Math.max(...layout.rows.map((r) => r.y + r.h));
|
|
11385
|
-
let held = { x:
|
|
11386
|
-
const
|
|
11387
|
-
const
|
|
11388
|
-
const extra = [...badge2 ? [{ x: badge2.x - LOOK.badge.r, y: badge2.y - LOOK.badge.r, w: LOOK.badge.r * 2, h: LOOK.badge.r * 2 }] : [], ...[...parts].sort((a, b) => near(a) - near(b))];
|
|
11387
|
+
let held = { x: ax - 1, y: top, w: 2, h: bottom - top };
|
|
11388
|
+
const near = (p) => Math.hypot(Math.max(0, p.x - ax, ax - p.x - p.w), Math.max(0, p.y - top, top - p.y - p.h));
|
|
11389
|
+
const changed = layout.points.filter((point) => point.changes.some((change) => change.step === step)).map((point) => ({ x: point.cx - point.r, y: point.cy - point.r, w: point.text.x + point.text.w - point.cx + point.r, h: point.r * 2 }));
|
|
11390
|
+
const extra = [...badge2 ? [{ x: badge2.x - LOOK.badge.r, y: badge2.y - LOOK.badge.r, w: LOOK.badge.r * 2, h: LOOK.badge.r * 2 }] : [], ...[...parts, ...changed].sort((a, b) => near(a) - near(b))];
|
|
11389
11391
|
for (const p of extra) {
|
|
11390
11392
|
const x = Math.min(held.x, p.x);
|
|
11391
11393
|
const y = Math.min(held.y, p.y);
|