sketchmark 0.1.9 → 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
@@ -836,6 +836,7 @@ function parse(src) {
836
836
  v === "config" || // ← ADD
837
837
  v === "theme" || // ← ADD
838
838
  v === "style" ||
839
+ v === "markdown" ||
839
840
  CHART_TYPES.includes(v)) {
840
841
  break;
841
842
  }
@@ -6398,6 +6399,7 @@ const getEdgeEl = (svg, f, t) => getEl(svg, `edge-${f}-${t}`);
6398
6399
  const getTableEl = (svg, id) => getEl(svg, `table-${id}`);
6399
6400
  const getNoteEl = (svg, id) => getEl(svg, `note-${id}`);
6400
6401
  const getChartEl = (svg, id) => getEl(svg, `chart-${id}`);
6402
+ const getMarkdownEl = (svg, id) => getEl(svg, `markdown-${id}`);
6401
6403
  function resolveEl(svg, target) {
6402
6404
  // check edge first — target contains connector like "a-->b"
6403
6405
  const edge = parseEdgeTarget(target);
@@ -6409,6 +6411,7 @@ function resolveEl(svg, target) {
6409
6411
  getTableEl(svg, target) ??
6410
6412
  getNoteEl(svg, target) ??
6411
6413
  getChartEl(svg, target) ??
6414
+ getMarkdownEl(svg, target) ??
6412
6415
  null);
6413
6416
  }
6414
6417
  function pathLength(p) {
@@ -6419,6 +6422,15 @@ function pathLength(p) {
6419
6422
  return 200;
6420
6423
  }
6421
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
+ }
6422
6434
  // ── Arrow connector parser ────────────────────────────────
6423
6435
  const ARROW_CONNECTORS = ["<-->", "<->", "-->", "<--", "->", "<-", "---", "--"];
6424
6436
  function parseEdgeTarget(target) {
@@ -6526,32 +6538,39 @@ function clearEdgeDrawStyles(el) {
6526
6538
  });
6527
6539
  }
6528
6540
  function animateEdgeDraw(el, conn) {
6529
- const paths = Array.from(el.querySelectorAll("path"));
6541
+ const paths = Array.from(el.querySelectorAll('path'));
6530
6542
  if (!paths.length)
6531
6543
  return;
6532
6544
  const linePath = paths[0];
6533
6545
  const headPaths = paths.slice(1);
6534
6546
  const STROKE_DUR = 360;
6535
6547
  const len = pathLength(linePath);
6536
- const reversed = conn.startsWith("<") && !conn.includes(">");
6548
+ const reversed = conn.startsWith('<') && !conn.includes('>');
6537
6549
  linePath.style.strokeDasharray = `${len}`;
6538
6550
  linePath.style.strokeDashoffset = reversed ? `${-len}` : `${len}`;
6539
- linePath.style.transition = "none";
6540
- headPaths.forEach((p) => {
6541
- p.style.opacity = "0";
6542
- p.style.transition = "none";
6551
+ linePath.style.transition = 'none';
6552
+ headPaths.forEach(p => {
6553
+ p.style.opacity = '0';
6554
+ p.style.transition = 'none';
6543
6555
  });
6544
- el.classList.remove("draw-hidden");
6545
- el.classList.add("draw-reveal");
6546
- el.style.opacity = "1";
6556
+ el.classList.remove('draw-hidden');
6557
+ el.classList.add('draw-reveal');
6558
+ el.style.opacity = '1';
6547
6559
  requestAnimationFrame(() => requestAnimationFrame(() => {
6548
6560
  linePath.style.transition = `stroke-dashoffset ${STROKE_DUR}ms cubic-bezier(.4,0,.2,1)`;
6549
- linePath.style.strokeDashoffset = "0";
6561
+ linePath.style.strokeDashoffset = '0';
6550
6562
  setTimeout(() => {
6551
- headPaths.forEach((p) => {
6552
- p.style.transition = "opacity 120ms ease";
6553
- p.style.opacity = "1";
6563
+ headPaths.forEach(p => {
6564
+ p.style.transition = 'opacity 120ms ease';
6565
+ p.style.opacity = '1';
6554
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);
6555
6574
  }, STROKE_DUR - 40);
6556
6575
  }));
6557
6576
  }
@@ -6575,6 +6594,7 @@ class AnimationController {
6575
6594
  this.drawTargetTables = new Set();
6576
6595
  this.drawTargetNotes = new Set();
6577
6596
  this.drawTargetCharts = new Set();
6597
+ this.drawTargetMarkdowns = new Set();
6578
6598
  for (const s of steps) {
6579
6599
  if (s.action !== "draw" || parseEdgeTarget(s.target))
6580
6600
  continue;
@@ -6595,6 +6615,10 @@ class AnimationController {
6595
6615
  this.drawTargetCharts.add(`chart-${s.target}`);
6596
6616
  this.drawTargetNodes.delete(`node-${s.target}`);
6597
6617
  }
6618
+ if (svg.querySelector(`#markdown-${s.target}`)) {
6619
+ this.drawTargetMarkdowns.add(`markdown-${s.target}`);
6620
+ this.drawTargetNodes.delete(`node-${s.target}`);
6621
+ }
6598
6622
  }
6599
6623
  this._clearAll();
6600
6624
  }
@@ -6766,7 +6790,24 @@ class AnimationController {
6766
6790
  });
6767
6791
  }
6768
6792
  });
6769
- 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) => {
6770
6811
  el.style.transform = "";
6771
6812
  el.style.transition = "";
6772
6813
  el.style.opacity = "";
@@ -6944,6 +6985,9 @@ class AnimationController {
6944
6985
  if (!firstPath?.style.strokeDasharray)
6945
6986
  prepareForDraw(groupEl);
6946
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);
6947
6991
  }
6948
6992
  return;
6949
6993
  }
@@ -6964,6 +7008,8 @@ class AnimationController {
6964
7008
  tableEl.classList.remove("gg-hidden");
6965
7009
  prepareForDraw(tableEl);
6966
7010
  animateShapeDraw(tableEl, 500, 40);
7011
+ const tablePathCount = tableEl.querySelectorAll('path').length;
7012
+ clearDashOverridesAfter(tableEl, tablePathCount * 40 + 500 + 120);
6967
7013
  }
6968
7014
  return;
6969
7015
  }
@@ -6984,6 +7030,8 @@ class AnimationController {
6984
7030
  noteEl.classList.remove("gg-hidden");
6985
7031
  prepareForDraw(noteEl);
6986
7032
  animateShapeDraw(noteEl, 420, 55);
7033
+ const notePathCount = noteEl.querySelectorAll('path').length;
7034
+ clearDashOverridesAfter(noteEl, notePathCount * 55 + 420 + 120);
6987
7035
  }
6988
7036
  return;
6989
7037
  }
@@ -7011,6 +7059,28 @@ class AnimationController {
7011
7059
  }
7012
7060
  return;
7013
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
+ }
7014
7084
  // ── Node draw ──────────────────────────────────────
7015
7085
  const nodeEl = getNodeEl(this.svg, target);
7016
7086
  if (!nodeEl)
@@ -7024,14 +7094,16 @@ class AnimationController {
7024
7094
  if (!firstPath?.style.strokeDasharray)
7025
7095
  prepareForDraw(nodeEl);
7026
7096
  animateShapeDraw(nodeEl, 420, 55);
7097
+ const nodePathCount = nodeEl.querySelectorAll('path').length;
7098
+ clearDashOverridesAfter(nodeEl, nodePathCount * 55 + 420 + 120);
7027
7099
  }
7028
7100
  }
7029
7101
  // ── erase ─────────────────────────────────────────────────
7030
7102
  _doErase(target) {
7031
7103
  const el = resolveEl(this.svg, target); // handles edges too now
7032
7104
  if (el) {
7033
- el.style.transition = 'opacity 0.4s';
7034
- el.style.opacity = '0';
7105
+ el.style.transition = "opacity 0.4s";
7106
+ el.style.opacity = "0";
7035
7107
  }
7036
7108
  }
7037
7109
  // ── show / hide ───────────────────────────────────────────
@@ -7059,10 +7131,10 @@ class AnimationController {
7059
7131
  return;
7060
7132
  // edge — color stroke
7061
7133
  if (parseEdgeTarget(target)) {
7062
- el.querySelectorAll('path, line, polyline').forEach(p => {
7134
+ el.querySelectorAll("path, line, polyline").forEach((p) => {
7063
7135
  p.style.stroke = color;
7064
7136
  });
7065
- el.querySelectorAll('polygon').forEach(p => {
7137
+ el.querySelectorAll("polygon").forEach((p) => {
7066
7138
  p.style.fill = color;
7067
7139
  p.style.stroke = color;
7068
7140
  });
@@ -7070,22 +7142,24 @@ class AnimationController {
7070
7142
  }
7071
7143
  // everything else — color fill
7072
7144
  let hit = false;
7073
- el.querySelectorAll('path, rect, ellipse, polygon').forEach(c => {
7074
- const attrFill = c.getAttribute('fill');
7075
- if (attrFill === 'none')
7145
+ el.querySelectorAll("path, rect, ellipse, polygon").forEach((c) => {
7146
+ const attrFill = c.getAttribute("fill");
7147
+ if (attrFill === "none")
7076
7148
  return;
7077
- if (attrFill === null && c.tagName === 'path')
7149
+ if (attrFill === null && c.tagName === "path")
7078
7150
  return;
7079
7151
  c.style.fill = color;
7080
7152
  hit = true;
7081
7153
  });
7082
7154
  if (!hit) {
7083
- el.querySelectorAll('text').forEach(t => { t.style.fill = color; });
7155
+ el.querySelectorAll("text").forEach((t) => {
7156
+ t.style.fill = color;
7157
+ });
7084
7158
  }
7085
7159
  }
7086
7160
  }
7087
7161
  const ANIMATION_CSS = `
7088
- .ng, .gg, .tg, .ntg, .cg, .eg {
7162
+ .ng, .gg, .tg, .ntg, .cg, .eg, .mdg {
7089
7163
  transform-box: fill-box;
7090
7164
  transform-origin: center;
7091
7165
  transition: filter 0.3s, opacity 0.35s;
@@ -7096,9 +7170,10 @@ const ANIMATION_CSS = `
7096
7170
  .tg.hl path, .tg.hl rect,
7097
7171
  .ntg.hl path, .ntg.hl polygon,
7098
7172
  .cg.hl path, .cg.hl rect,
7173
+ .mdg.hl text,
7099
7174
  .eg.hl path, .eg.hl line, .eg.hl polygon { stroke-width: 2.8 !important; }
7100
7175
 
7101
- .ng.hl, .tg.hl, .ntg.hl, .cg.hl, .eg.hl {
7176
+ .ng.hl, .tg.hl, .ntg.hl, .cg.hl, .mdg.hl, .eg.hl {
7102
7177
  animation: ng-pulse 1.4s ease-in-out infinite;
7103
7178
  }
7104
7179
  @keyframes ng-pulse {
@@ -7107,7 +7182,8 @@ const ANIMATION_CSS = `
7107
7182
  }
7108
7183
 
7109
7184
  /* fade */
7110
- .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; }
7111
7187
 
7112
7188
  .ng.hidden { opacity: 0; pointer-events: none; }
7113
7189
  .eg.draw-hidden { opacity: 0; }
@@ -7116,6 +7192,7 @@ const ANIMATION_CSS = `
7116
7192
  .tg.gg-hidden { opacity: 0; }
7117
7193
  .ntg.gg-hidden { opacity: 0; }
7118
7194
  .cg.gg-hidden { opacity: 0; }
7195
+ .mdg.gg-hidden { opacity: 0; }
7119
7196
  `;
7120
7197
 
7121
7198
  // ============================================================