sketchmark 0.2.0 → 0.2.1

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.
@@ -24,6 +24,7 @@ export declare class AnimationController {
24
24
  readonly drawTargetTables: Set<string>;
25
25
  readonly drawTargetNotes: Set<string>;
26
26
  readonly drawTargetCharts: Set<string>;
27
+ readonly drawTargetMarkdowns: Set<string>;
27
28
  get drawTargets(): Set<string>;
28
29
  constructor(svg: SVGSVGElement, steps: ASTStep[]);
29
30
  get currentStep(): number;
@@ -52,5 +53,5 @@ export declare class AnimationController {
52
53
  private _doPulse;
53
54
  private _doColor;
54
55
  }
55
- export declare const ANIMATION_CSS = "\n.ng, .gg, .tg, .ntg, .cg, .eg {\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.eg.hl path, .eg.hl line, .eg.hl polygon { stroke-width: 2.8 !important; }\n\n.ng.hl, .tg.hl, .ntg.hl, .cg.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, .cg.faded, .eg.faded { opacity: 0.22; }\n\n.ng.hidden { opacity: 0; pointer-events: none; }\n.eg.draw-hidden { opacity: 0; }\n.eg.draw-reveal { opacity: 1; }\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";
56
+ 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.eg.draw-hidden { opacity: 0; }\n.eg.draw-reveal { opacity: 1; }\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";
56
57
  //# 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,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAE5C,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,OAAO,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACf;AACD,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAA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B;IACD,IAAI,OAAO,IAAI,OAAO,CAErB;IACD,IAAI,KAAK,IAAI,OAAO,CAEnB;IAED,EAAE,CAAC,QAAQ,EAAE,iBAAiB,GAAG,MAAM,IAAI;IAM3C,OAAO,CAAC,IAAI;IAUZ,KAAK,IAAI,IAAI;IAMb,IAAI,IAAI,OAAO;IASf,IAAI,IAAI,OAAO;IAST,IAAI,CAAC,SAAS,SAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAQ1C,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAczB,OAAO,CAAC,SAAS;IAmHjB,OAAO,CAAC,UAAU;IA4ClB,OAAO,CAAC,YAAY;IAQpB,OAAO,CAAC,OAAO;IAIf,OAAO,CAAC,eAAe;IAiCvB,OAAO,CAAC,OAAO;IAkBf,OAAO,CAAC,QAAQ;IAchB,OAAO,CAAC,SAAS;IAejB,OAAO,CAAC,OAAO;IA6Kf,OAAO,CAAC,QAAQ;IAShB,OAAO,CAAC,WAAW;IAQnB,OAAO,CAAC,QAAQ;IAYhB,OAAO,CAAC,QAAQ;CAkCjB;AAED,eAAO,MAAM,aAAa,oiCAmCzB,CAAC"}
package/dist/index.cjs CHANGED
@@ -6399,6 +6399,7 @@ const getEdgeEl = (svg, f, t) => getEl(svg, `edge-${f}-${t}`);
6399
6399
  const getTableEl = (svg, id) => getEl(svg, `table-${id}`);
6400
6400
  const getNoteEl = (svg, id) => getEl(svg, `note-${id}`);
6401
6401
  const getChartEl = (svg, id) => getEl(svg, `chart-${id}`);
6402
+ const getMarkdownEl = (svg, id) => getEl(svg, `markdown-${id}`);
6402
6403
  function resolveEl(svg, target) {
6403
6404
  // check edge first — target contains connector like "a-->b"
6404
6405
  const edge = parseEdgeTarget(target);
@@ -6410,6 +6411,7 @@ function resolveEl(svg, target) {
6410
6411
  getTableEl(svg, target) ??
6411
6412
  getNoteEl(svg, target) ??
6412
6413
  getChartEl(svg, target) ??
6414
+ getMarkdownEl(svg, target) ??
6413
6415
  null);
6414
6416
  }
6415
6417
  function pathLength(p) {
@@ -6420,6 +6422,15 @@ function pathLength(p) {
6420
6422
  return 200;
6421
6423
  }
6422
6424
  }
6425
+ function clearDashOverridesAfter(el, delayMs) {
6426
+ setTimeout(() => {
6427
+ el.querySelectorAll('path').forEach(p => {
6428
+ p.style.strokeDasharray = '';
6429
+ p.style.strokeDashoffset = '';
6430
+ p.style.transition = '';
6431
+ });
6432
+ }, delayMs);
6433
+ }
6423
6434
  // ── Arrow connector parser ────────────────────────────────
6424
6435
  const ARROW_CONNECTORS = ["<-->", "<->", "-->", "<--", "->", "<-", "---", "--"];
6425
6436
  function parseEdgeTarget(target) {
@@ -6527,32 +6538,39 @@ function clearEdgeDrawStyles(el) {
6527
6538
  });
6528
6539
  }
6529
6540
  function animateEdgeDraw(el, conn) {
6530
- const paths = Array.from(el.querySelectorAll("path"));
6541
+ const paths = Array.from(el.querySelectorAll('path'));
6531
6542
  if (!paths.length)
6532
6543
  return;
6533
6544
  const linePath = paths[0];
6534
6545
  const headPaths = paths.slice(1);
6535
6546
  const STROKE_DUR = 360;
6536
6547
  const len = pathLength(linePath);
6537
- const reversed = conn.startsWith("<") && !conn.includes(">");
6548
+ const reversed = conn.startsWith('<') && !conn.includes('>');
6538
6549
  linePath.style.strokeDasharray = `${len}`;
6539
6550
  linePath.style.strokeDashoffset = reversed ? `${-len}` : `${len}`;
6540
- linePath.style.transition = "none";
6541
- headPaths.forEach((p) => {
6542
- p.style.opacity = "0";
6543
- p.style.transition = "none";
6551
+ linePath.style.transition = 'none';
6552
+ headPaths.forEach(p => {
6553
+ p.style.opacity = '0';
6554
+ p.style.transition = 'none';
6544
6555
  });
6545
- el.classList.remove("draw-hidden");
6546
- el.classList.add("draw-reveal");
6547
- el.style.opacity = "1";
6556
+ el.classList.remove('draw-hidden');
6557
+ el.classList.add('draw-reveal');
6558
+ el.style.opacity = '1';
6548
6559
  requestAnimationFrame(() => requestAnimationFrame(() => {
6549
6560
  linePath.style.transition = `stroke-dashoffset ${STROKE_DUR}ms cubic-bezier(.4,0,.2,1)`;
6550
- linePath.style.strokeDashoffset = "0";
6561
+ linePath.style.strokeDashoffset = '0';
6551
6562
  setTimeout(() => {
6552
- headPaths.forEach((p) => {
6553
- p.style.transition = "opacity 120ms ease";
6554
- p.style.opacity = "1";
6563
+ headPaths.forEach(p => {
6564
+ p.style.transition = 'opacity 120ms ease';
6565
+ p.style.opacity = '1';
6555
6566
  });
6567
+ // ── ADD: clear inline dash overrides so SVG attribute
6568
+ // (stroke-dasharray="6,5" for dashed arrows) takes over again
6569
+ setTimeout(() => {
6570
+ linePath.style.strokeDasharray = '';
6571
+ linePath.style.strokeDashoffset = '';
6572
+ linePath.style.transition = '';
6573
+ }, 160);
6556
6574
  }, STROKE_DUR - 40);
6557
6575
  }));
6558
6576
  }
@@ -6576,6 +6594,7 @@ class AnimationController {
6576
6594
  this.drawTargetTables = new Set();
6577
6595
  this.drawTargetNotes = new Set();
6578
6596
  this.drawTargetCharts = new Set();
6597
+ this.drawTargetMarkdowns = new Set();
6579
6598
  for (const s of steps) {
6580
6599
  if (s.action !== "draw" || parseEdgeTarget(s.target))
6581
6600
  continue;
@@ -6596,6 +6615,10 @@ class AnimationController {
6596
6615
  this.drawTargetCharts.add(`chart-${s.target}`);
6597
6616
  this.drawTargetNodes.delete(`node-${s.target}`);
6598
6617
  }
6618
+ if (svg.querySelector(`#markdown-${s.target}`)) {
6619
+ this.drawTargetMarkdowns.add(`markdown-${s.target}`);
6620
+ this.drawTargetNodes.delete(`node-${s.target}`);
6621
+ }
6599
6622
  }
6600
6623
  this._clearAll();
6601
6624
  }
@@ -6767,7 +6790,24 @@ class AnimationController {
6767
6790
  });
6768
6791
  }
6769
6792
  });
6770
- this.svg.querySelectorAll(".tg, .ntg, .cg").forEach((el) => {
6793
+ // Markdown
6794
+ this.svg.querySelectorAll(".mdg").forEach((el) => {
6795
+ clearDrawStyles(el);
6796
+ el.style.transition = "none";
6797
+ el.style.opacity = "";
6798
+ if (this.drawTargetMarkdowns.has(el.id)) {
6799
+ el.classList.add("gg-hidden");
6800
+ }
6801
+ else {
6802
+ el.classList.remove("gg-hidden");
6803
+ requestAnimationFrame(() => {
6804
+ el.style.transition = "";
6805
+ });
6806
+ }
6807
+ });
6808
+ this.svg
6809
+ .querySelectorAll(".tg, .ntg, .cg, .mdg")
6810
+ .forEach((el) => {
6771
6811
  el.style.transform = "";
6772
6812
  el.style.transition = "";
6773
6813
  el.style.opacity = "";
@@ -6945,6 +6985,9 @@ class AnimationController {
6945
6985
  if (!firstPath?.style.strokeDasharray)
6946
6986
  prepareForDraw(groupEl);
6947
6987
  animateShapeDraw(groupEl, 550, 40);
6988
+ const pathCount = groupEl.querySelectorAll('path').length;
6989
+ const totalMs = pathCount * 40 + 550 + 120; // stagger + duration + buffer
6990
+ clearDashOverridesAfter(groupEl, totalMs);
6948
6991
  }
6949
6992
  return;
6950
6993
  }
@@ -6965,6 +7008,8 @@ class AnimationController {
6965
7008
  tableEl.classList.remove("gg-hidden");
6966
7009
  prepareForDraw(tableEl);
6967
7010
  animateShapeDraw(tableEl, 500, 40);
7011
+ const tablePathCount = tableEl.querySelectorAll('path').length;
7012
+ clearDashOverridesAfter(tableEl, tablePathCount * 40 + 500 + 120);
6968
7013
  }
6969
7014
  return;
6970
7015
  }
@@ -6985,6 +7030,8 @@ class AnimationController {
6985
7030
  noteEl.classList.remove("gg-hidden");
6986
7031
  prepareForDraw(noteEl);
6987
7032
  animateShapeDraw(noteEl, 420, 55);
7033
+ const notePathCount = noteEl.querySelectorAll('path').length;
7034
+ clearDashOverridesAfter(noteEl, notePathCount * 55 + 420 + 120);
6988
7035
  }
6989
7036
  return;
6990
7037
  }
@@ -7012,6 +7059,28 @@ class AnimationController {
7012
7059
  }
7013
7060
  return;
7014
7061
  }
7062
+ // ── Markdown ──────────────────────────────────────────
7063
+ const markdownEl = getMarkdownEl(this.svg, target);
7064
+ if (markdownEl) {
7065
+ if (silent) {
7066
+ markdownEl.style.transition = "none";
7067
+ markdownEl.style.opacity = "";
7068
+ markdownEl.classList.remove("gg-hidden");
7069
+ markdownEl.style.opacity = "1";
7070
+ requestAnimationFrame(() => requestAnimationFrame(() => {
7071
+ markdownEl.style.transition = "";
7072
+ }));
7073
+ }
7074
+ else {
7075
+ markdownEl.style.opacity = "0";
7076
+ markdownEl.classList.remove("gg-hidden");
7077
+ requestAnimationFrame(() => requestAnimationFrame(() => {
7078
+ markdownEl.style.transition = "opacity 500ms ease";
7079
+ markdownEl.style.opacity = "1";
7080
+ }));
7081
+ }
7082
+ return;
7083
+ }
7015
7084
  // ── Node draw ──────────────────────────────────────
7016
7085
  const nodeEl = getNodeEl(this.svg, target);
7017
7086
  if (!nodeEl)
@@ -7025,14 +7094,16 @@ class AnimationController {
7025
7094
  if (!firstPath?.style.strokeDasharray)
7026
7095
  prepareForDraw(nodeEl);
7027
7096
  animateShapeDraw(nodeEl, 420, 55);
7097
+ const nodePathCount = nodeEl.querySelectorAll('path').length;
7098
+ clearDashOverridesAfter(nodeEl, nodePathCount * 55 + 420 + 120);
7028
7099
  }
7029
7100
  }
7030
7101
  // ── erase ─────────────────────────────────────────────────
7031
7102
  _doErase(target) {
7032
7103
  const el = resolveEl(this.svg, target); // handles edges too now
7033
7104
  if (el) {
7034
- el.style.transition = 'opacity 0.4s';
7035
- el.style.opacity = '0';
7105
+ el.style.transition = "opacity 0.4s";
7106
+ el.style.opacity = "0";
7036
7107
  }
7037
7108
  }
7038
7109
  // ── show / hide ───────────────────────────────────────────
@@ -7060,10 +7131,10 @@ class AnimationController {
7060
7131
  return;
7061
7132
  // edge — color stroke
7062
7133
  if (parseEdgeTarget(target)) {
7063
- el.querySelectorAll('path, line, polyline').forEach(p => {
7134
+ el.querySelectorAll("path, line, polyline").forEach((p) => {
7064
7135
  p.style.stroke = color;
7065
7136
  });
7066
- el.querySelectorAll('polygon').forEach(p => {
7137
+ el.querySelectorAll("polygon").forEach((p) => {
7067
7138
  p.style.fill = color;
7068
7139
  p.style.stroke = color;
7069
7140
  });
@@ -7071,22 +7142,24 @@ class AnimationController {
7071
7142
  }
7072
7143
  // everything else — color fill
7073
7144
  let hit = false;
7074
- el.querySelectorAll('path, rect, ellipse, polygon').forEach(c => {
7075
- const attrFill = c.getAttribute('fill');
7076
- if (attrFill === 'none')
7145
+ el.querySelectorAll("path, rect, ellipse, polygon").forEach((c) => {
7146
+ const attrFill = c.getAttribute("fill");
7147
+ if (attrFill === "none")
7077
7148
  return;
7078
- if (attrFill === null && c.tagName === 'path')
7149
+ if (attrFill === null && c.tagName === "path")
7079
7150
  return;
7080
7151
  c.style.fill = color;
7081
7152
  hit = true;
7082
7153
  });
7083
7154
  if (!hit) {
7084
- el.querySelectorAll('text').forEach(t => { t.style.fill = color; });
7155
+ el.querySelectorAll("text").forEach((t) => {
7156
+ t.style.fill = color;
7157
+ });
7085
7158
  }
7086
7159
  }
7087
7160
  }
7088
7161
  const ANIMATION_CSS = `
7089
- .ng, .gg, .tg, .ntg, .cg, .eg {
7162
+ .ng, .gg, .tg, .ntg, .cg, .eg, .mdg {
7090
7163
  transform-box: fill-box;
7091
7164
  transform-origin: center;
7092
7165
  transition: filter 0.3s, opacity 0.35s;
@@ -7097,9 +7170,10 @@ const ANIMATION_CSS = `
7097
7170
  .tg.hl path, .tg.hl rect,
7098
7171
  .ntg.hl path, .ntg.hl polygon,
7099
7172
  .cg.hl path, .cg.hl rect,
7173
+ .mdg.hl text,
7100
7174
  .eg.hl path, .eg.hl line, .eg.hl polygon { stroke-width: 2.8 !important; }
7101
7175
 
7102
- .ng.hl, .tg.hl, .ntg.hl, .cg.hl, .eg.hl {
7176
+ .ng.hl, .tg.hl, .ntg.hl, .cg.hl, .mdg.hl, .eg.hl {
7103
7177
  animation: ng-pulse 1.4s ease-in-out infinite;
7104
7178
  }
7105
7179
  @keyframes ng-pulse {
@@ -7108,7 +7182,8 @@ const ANIMATION_CSS = `
7108
7182
  }
7109
7183
 
7110
7184
  /* fade */
7111
- .ng.faded, .gg.faded, .tg.faded, .ntg.faded, .cg.faded, .eg.faded { opacity: 0.22; }
7185
+ .ng.faded, .gg.faded, .tg.faded, .ntg.faded,
7186
+ .cg.faded, .eg.faded, .mdg.faded { opacity: 0.22; }
7112
7187
 
7113
7188
  .ng.hidden { opacity: 0; pointer-events: none; }
7114
7189
  .eg.draw-hidden { opacity: 0; }
@@ -7117,6 +7192,7 @@ const ANIMATION_CSS = `
7117
7192
  .tg.gg-hidden { opacity: 0; }
7118
7193
  .ntg.gg-hidden { opacity: 0; }
7119
7194
  .cg.gg-hidden { opacity: 0; }
7195
+ .mdg.gg-hidden { opacity: 0; }
7120
7196
  `;
7121
7197
 
7122
7198
  // ============================================================