sketchmark 1.3.6 → 1.3.7
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/README.md +10 -10
- package/dist/animation/index.d.ts +1 -1
- package/dist/animation/index.d.ts.map +1 -1
- package/dist/index.cjs +48 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +48 -7
- package/dist/index.js.map +1 -1
- package/dist/renderer/svg/index.d.ts.map +1 -1
- package/dist/sketchmark.iife.js +48 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -938,19 +938,19 @@ The pointer only appears during annotation steps — it follows the guide path a
|
|
|
938
938
|
|
|
939
939
|
Any element targeted by a `step draw` action starts **hidden** and only appears when that step fires. Elements NOT targeted by `draw` are always visible.
|
|
940
940
|
|
|
941
|
-
For groups, this applies to the whole subtree:
|
|
942
|
-
|
|
943
|
-
- `step draw group1` pre-hides the group and all descendant nodes, nested groups, tables, charts, notes, and
|
|
944
|
-
- When the group step fires, descendants without their own later `draw` step are revealed immediately.
|
|
945
|
-
- Descendants with an explicit later `draw` step stay hidden until that later step.
|
|
946
|
-
-
|
|
941
|
+
For groups, this applies to the whole subtree:
|
|
942
|
+
|
|
943
|
+
- `step draw group1` pre-hides the group and all descendant nodes, nested groups, tables, charts, notes, markdown blocks, and any edge whose endpoints stay inside that group subtree.
|
|
944
|
+
- When the group step fires, descendants without their own later `draw` step are revealed immediately.
|
|
945
|
+
- Descendants with an explicit later `draw` step stay hidden until that later step.
|
|
946
|
+
- Boundary-crossing edges are still independent; a group draw only cascades to edges whose endpoints share that group subtree.
|
|
947
947
|
|
|
948
948
|
For group targets, these actions also apply recursively to the same subtree:
|
|
949
949
|
|
|
950
|
-
- `fade` / `unfade`
|
|
951
|
-
- `show` / `hide`
|
|
952
|
-
- `erase`
|
|
953
|
-
-
|
|
950
|
+
- `fade` / `unfade`
|
|
951
|
+
- `show` / `hide`
|
|
952
|
+
- `erase`
|
|
953
|
+
- The same internal-edge rule applies here too; boundary-crossing edges remain explicit.
|
|
954
954
|
|
|
955
955
|
---
|
|
956
956
|
|
|
@@ -126,5 +126,5 @@ export declare class AnimationController {
|
|
|
126
126
|
private _doAnnotationBracket;
|
|
127
127
|
private _initPointer;
|
|
128
128
|
}
|
|
129
|
-
export declare const ANIMATION_CSS = "\n.ng, .gg, .tg, .ntg, .cg, .eg, .mdg {\n transform-box: fill-box;\n transform-origin: center;\n transition: filter 0.3s, opacity 0.35s;\n}\n\n/* highlight */\n.ng.hl path, .ng.hl rect, .ng.hl ellipse, .ng.hl polygon,\n.tg.hl path, .tg.hl rect,\n.ntg.hl path, .ntg.hl polygon,\n.cg.hl path, .cg.hl rect,\n.mdg.hl text,\n.eg.hl path, .eg.hl line, .eg.hl polygon { stroke-width: 2.8 !important; }\n\n.ng.hl, .tg.hl, .ntg.hl, .cg.hl, .mdg.hl, .eg.hl {\n animation: ng-pulse 1.4s ease-in-out infinite;\n}\n@keyframes ng-pulse {\n 0%, 100% { filter: drop-shadow(0 0 7px rgba(200,84,40,.6)); }\n 50% { filter: drop-shadow(0 0 14px rgba(200,84,40,.9)); }\n}\n\n/* fade */\n.ng.faded, .gg.faded, .tg.faded, .ntg.faded,\n.cg.faded, .eg.faded, .mdg.faded { opacity: 0.22; }\n\n.ng.hidden { opacity: 0; pointer-events: none; }\n.gg.gg-hidden { opacity: 0; }\n.tg.gg-hidden { opacity: 0; }\n.ntg.gg-hidden { opacity: 0; }\n.cg.gg-hidden { opacity: 0; }\n.mdg.gg-hidden { opacity: 0; }\n\n/* narration caption */\n.skm-caption { pointer-events: none; user-select: none; }\n";
|
|
129
|
+
export declare const ANIMATION_CSS = "\n.ng, .gg, .tg, .ntg, .cg, .eg, .mdg {\n transform-box: fill-box;\n transform-origin: center;\n transition: filter 0.3s, opacity 0.35s;\n}\n\n/* highlight */\n.ng.hl path, .ng.hl rect, .ng.hl ellipse, .ng.hl polygon,\n.tg.hl path, .tg.hl rect,\n.ntg.hl path, .ntg.hl polygon,\n.cg.hl path, .cg.hl rect,\n.mdg.hl text,\n.eg.hl path, .eg.hl line, .eg.hl polygon { stroke-width: 2.8 !important; }\n\n.ng.hl, .tg.hl, .ntg.hl, .cg.hl, .mdg.hl, .eg.hl {\n animation: ng-pulse 1.4s ease-in-out infinite;\n}\n@keyframes ng-pulse {\n 0%, 100% { filter: drop-shadow(0 0 7px rgba(200,84,40,.6)); }\n 50% { filter: drop-shadow(0 0 14px rgba(200,84,40,.9)); }\n}\n\n/* fade */\n.ng.faded, .gg.faded, .tg.faded, .ntg.faded,\n.cg.faded, .eg.faded, .mdg.faded { opacity: 0.22; }\n\n.ng.hidden { opacity: 0; pointer-events: none; }\n.gg.gg-hidden { opacity: 0; }\n.tg.gg-hidden { opacity: 0; }\n.ntg.gg-hidden { opacity: 0; }\n.cg.gg-hidden { opacity: 0; }\n.eg.gg-hidden { opacity: 0; }\n.mdg.gg-hidden { opacity: 0; }\n\n/* narration caption */\n.skm-caption { pointer-events: none; user-select: none; }\n";
|
|
130
130
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/animation/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAoB,WAAW,EAAE,MAAM,cAAc,CAAC;AAGlE,MAAM,MAAM,kBAAkB,GAC1B,aAAa,GACb,eAAe,GACf,iBAAiB,GACjB,iBAAiB,GACjB,eAAe,CAAC;AACpB,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,kBAAkB,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;CACf;AACD,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,EAAE,cAAc,KAAK,IAAI,CAAC;AA+a5D,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,WAAW,EAAE,GAAG,GAAG,CAAC,MAAM,CAAC,CAQtE;AAC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OAAO,CAAC,WAAW;IASnB,OAAO,CAAC,QAAQ;IAchB,OAAO,CAAC,QAAQ;IA+ChB,OAAO,CAAC,YAAY;IA0BpB,OAAO,CAAC,UAAU;IAgClB,OAAO,CAAC,MAAM;IA0Bd,OAAO,CAAC,aAAa;IAOrB,uFAAuF;IACvF,OAAO,CAAC,aAAa;IAQrB,OAAO,CAAC,YAAY;IASpB;;;;;;OAMG;IACH,OAAO,CAAC,kBAAkB;IA0E1B,OAAO,CAAC,mBAAmB;IAmB3B,OAAO,CAAC,sBAAsB;IAiB9B,OAAO,CAAC,qBAAqB;IAyB7B,OAAO,CAAC,iBAAiB;IAwCzB,OAAO,CAAC,sBAAsB;IAiB9B,OAAO,CAAC,oBAAoB;IA+B5B,OAAO,CAAC,YAAY;CAkCrB;AAED,eAAO,MAAM,aAAa,wlCAqCzB,CAAC"}
|
package/dist/index.cjs
CHANGED
|
@@ -8280,6 +8280,36 @@ function setParentGroupData(el, groupId) {
|
|
|
8280
8280
|
if (groupId)
|
|
8281
8281
|
el.dataset.parentGroup = groupId;
|
|
8282
8282
|
}
|
|
8283
|
+
function resolveEdgeEndpointKind(id, nm, tm, gm, cm) {
|
|
8284
|
+
if (nm.has(id))
|
|
8285
|
+
return "node";
|
|
8286
|
+
if (gm.has(id))
|
|
8287
|
+
return "group";
|
|
8288
|
+
if (tm.has(id))
|
|
8289
|
+
return "table";
|
|
8290
|
+
if (cm.has(id))
|
|
8291
|
+
return "chart";
|
|
8292
|
+
return null;
|
|
8293
|
+
}
|
|
8294
|
+
function collectEdgeGroupLineage(endpointId, endpointKind, parentGroups) {
|
|
8295
|
+
const lineage = [];
|
|
8296
|
+
let groupId = endpointKind === "group"
|
|
8297
|
+
? endpointId
|
|
8298
|
+
: parentGroups.get(`${endpointKind}:${endpointId}`);
|
|
8299
|
+
while (groupId) {
|
|
8300
|
+
lineage.push(groupId);
|
|
8301
|
+
groupId = parentGroups.get(`group:${groupId}`);
|
|
8302
|
+
}
|
|
8303
|
+
return lineage;
|
|
8304
|
+
}
|
|
8305
|
+
function resolveEdgeParentGroupId(fromId, toId, nm, tm, gm, cm, parentGroups) {
|
|
8306
|
+
const fromKind = resolveEdgeEndpointKind(fromId, nm, tm, gm, cm);
|
|
8307
|
+
const toKind = resolveEdgeEndpointKind(toId, nm, tm, gm, cm);
|
|
8308
|
+
if (!fromKind || !toKind)
|
|
8309
|
+
return undefined;
|
|
8310
|
+
const toLineage = new Set(collectEdgeGroupLineage(toId, toKind, parentGroups));
|
|
8311
|
+
return collectEdgeGroupLineage(fromId, fromKind, parentGroups).find((groupId) => toLineage.has(groupId));
|
|
8312
|
+
}
|
|
8283
8313
|
// ── Node shapes ───────────────────────────────────────────────────────────
|
|
8284
8314
|
function renderShape$1(rc, n, palette) {
|
|
8285
8315
|
const s = n.style ?? {};
|
|
@@ -8437,6 +8467,7 @@ function renderToSVG(sg, container, options = {}) {
|
|
|
8437
8467
|
const [x1, y1] = getConnPoint(src, dstCX, dstCY, e.fromAnchor);
|
|
8438
8468
|
const [x2, y2] = getConnPoint(dst, srcCX, srcCY, e.toAnchor);
|
|
8439
8469
|
const eg = mkGroup(`edge-${e.from}-${e.to}`, "eg");
|
|
8470
|
+
setParentGroupData(eg, resolveEdgeParentGroupId(e.from, e.to, nm, tm, gmMap, cm, parentGroups));
|
|
8440
8471
|
if (e.style?.opacity != null)
|
|
8441
8472
|
eg.setAttribute("opacity", String(e.style.opacity));
|
|
8442
8473
|
const len = Math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2) || 1;
|
|
@@ -9483,7 +9514,7 @@ const getTableEl = (svg, id) => getEl(svg, `table-${id}`);
|
|
|
9483
9514
|
const getNoteEl = (svg, id) => getEl(svg, `note-${id}`);
|
|
9484
9515
|
const getChartEl = (svg, id) => getEl(svg, `chart-${id}`);
|
|
9485
9516
|
const getMarkdownEl = (svg, id) => getEl(svg, `markdown-${id}`);
|
|
9486
|
-
const POSITIONABLE_SELECTOR = ".ng, .gg, .tg, .ntg, .cg, .mdg";
|
|
9517
|
+
const POSITIONABLE_SELECTOR = ".ng, .gg, .tg, .ntg, .cg, .eg, .mdg";
|
|
9487
9518
|
function resolveNonEdgeDrawEl(svg, target) {
|
|
9488
9519
|
return (getGroupEl(svg, target) ??
|
|
9489
9520
|
getTableEl(svg, target) ??
|
|
@@ -10077,8 +10108,16 @@ class AnimationController {
|
|
|
10077
10108
|
_buildDrawStepIndex() {
|
|
10078
10109
|
const drawStepIndexByElementId = new Map();
|
|
10079
10110
|
forEachPlaybackStep(this.steps, (step, stepIndex) => {
|
|
10080
|
-
if (step.action !== "draw"
|
|
10111
|
+
if (step.action !== "draw")
|
|
10081
10112
|
return;
|
|
10113
|
+
const edge = parseEdgeTarget(step.target);
|
|
10114
|
+
if (edge) {
|
|
10115
|
+
const edgeEl = getEdgeEl(this.svg, edge.from, edge.to);
|
|
10116
|
+
if (edgeEl && !drawStepIndexByElementId.has(edgeEl.id)) {
|
|
10117
|
+
drawStepIndexByElementId.set(edgeEl.id, stepIndex);
|
|
10118
|
+
}
|
|
10119
|
+
return;
|
|
10120
|
+
}
|
|
10082
10121
|
const el = resolveNonEdgeDrawEl(this.svg, step.target);
|
|
10083
10122
|
if (el && !drawStepIndexByElementId.has(el.id)) {
|
|
10084
10123
|
drawStepIndexByElementId.set(el.id, stepIndex);
|
|
@@ -10778,6 +10817,7 @@ class AnimationController {
|
|
|
10778
10817
|
const el = getEdgeEl(this.svg, edge.from, edge.to);
|
|
10779
10818
|
if (!el)
|
|
10780
10819
|
return;
|
|
10820
|
+
showDrawEl(el);
|
|
10781
10821
|
if (silent) {
|
|
10782
10822
|
revealEdgeInstant(el);
|
|
10783
10823
|
requestAnimationFrame(() => requestAnimationFrame(() => {
|
|
@@ -11391,11 +11431,12 @@ const ANIMATION_CSS = `
|
|
|
11391
11431
|
.cg.faded, .eg.faded, .mdg.faded { opacity: 0.22; }
|
|
11392
11432
|
|
|
11393
11433
|
.ng.hidden { opacity: 0; pointer-events: none; }
|
|
11394
|
-
.gg.gg-hidden { opacity: 0; }
|
|
11395
|
-
.tg.gg-hidden { opacity: 0; }
|
|
11396
|
-
.ntg.gg-hidden { opacity: 0; }
|
|
11397
|
-
.cg.gg-hidden { opacity: 0; }
|
|
11398
|
-
.
|
|
11434
|
+
.gg.gg-hidden { opacity: 0; }
|
|
11435
|
+
.tg.gg-hidden { opacity: 0; }
|
|
11436
|
+
.ntg.gg-hidden { opacity: 0; }
|
|
11437
|
+
.cg.gg-hidden { opacity: 0; }
|
|
11438
|
+
.eg.gg-hidden { opacity: 0; }
|
|
11439
|
+
.mdg.gg-hidden { opacity: 0; }
|
|
11399
11440
|
|
|
11400
11441
|
/* narration caption */
|
|
11401
11442
|
.skm-caption { pointer-events: none; user-select: none; }
|