sketchmark 1.1.1 → 1.1.3
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.
Potentially problematic release.
This version of sketchmark might be problematic. Click here for more details.
- package/dist/animation/index.d.ts +5 -0
- package/dist/animation/index.d.ts.map +1 -1
- package/dist/index.cjs +213 -19
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +213 -19
- package/dist/index.js.map +1 -1
- package/dist/sketchmark.iife.js +213 -19
- package/dist/ui/editor.d.ts +4 -0
- package/dist/ui/editor.d.ts.map +1 -1
- package/package.json +71 -72
package/dist/sketchmark.iife.js
CHANGED
|
@@ -9249,11 +9249,13 @@ var AIDiagram = (function (exports) {
|
|
|
9249
9249
|
this._config = _config;
|
|
9250
9250
|
this._step = -1;
|
|
9251
9251
|
this._pendingStepTimers = new Set();
|
|
9252
|
+
this._pendingNarrationTimers = new Set();
|
|
9252
9253
|
this._transforms = new Map();
|
|
9253
9254
|
this._listeners = [];
|
|
9254
9255
|
// ── Narration caption ──
|
|
9255
9256
|
this._captionEl = null;
|
|
9256
9257
|
this._captionTextEl = null;
|
|
9258
|
+
this._narrationRunId = 0;
|
|
9257
9259
|
// ── Annotations ──
|
|
9258
9260
|
this._annotationLayer = null;
|
|
9259
9261
|
this._annotations = [];
|
|
@@ -9516,20 +9518,30 @@ var AIDiagram = (function (exports) {
|
|
|
9516
9518
|
}
|
|
9517
9519
|
this.emit("step-change");
|
|
9518
9520
|
}
|
|
9521
|
+
_clearTimerBucket(bucket) {
|
|
9522
|
+
bucket.forEach((id) => window.clearTimeout(id));
|
|
9523
|
+
bucket.clear();
|
|
9524
|
+
}
|
|
9519
9525
|
_clearPendingStepTimers() {
|
|
9520
|
-
this.
|
|
9521
|
-
this._pendingStepTimers.clear();
|
|
9526
|
+
this._clearTimerBucket(this._pendingStepTimers);
|
|
9522
9527
|
}
|
|
9523
|
-
|
|
9528
|
+
_cancelNarrationTyping() {
|
|
9529
|
+
this._narrationRunId += 1;
|
|
9530
|
+
this._clearTimerBucket(this._pendingNarrationTimers);
|
|
9531
|
+
}
|
|
9532
|
+
_scheduleTimer(fn, delayMs, bucket = this._pendingStepTimers) {
|
|
9524
9533
|
if (delayMs <= 0) {
|
|
9525
9534
|
fn();
|
|
9526
9535
|
return;
|
|
9527
9536
|
}
|
|
9528
9537
|
const id = window.setTimeout(() => {
|
|
9529
|
-
|
|
9538
|
+
bucket.delete(id);
|
|
9530
9539
|
fn();
|
|
9531
9540
|
}, delayMs);
|
|
9532
|
-
|
|
9541
|
+
bucket.add(id);
|
|
9542
|
+
}
|
|
9543
|
+
_scheduleStep(fn, delayMs) {
|
|
9544
|
+
this._scheduleTimer(fn, delayMs, this._pendingStepTimers);
|
|
9533
9545
|
}
|
|
9534
9546
|
_stepWaitMs(step, fallbackMs) {
|
|
9535
9547
|
const delay = Math.max(0, step.delay ?? 0);
|
|
@@ -9573,6 +9585,7 @@ var AIDiagram = (function (exports) {
|
|
|
9573
9585
|
}
|
|
9574
9586
|
_clearAll() {
|
|
9575
9587
|
this._clearPendingStepTimers();
|
|
9588
|
+
this._cancelNarrationTyping();
|
|
9576
9589
|
this._cancelSpeech();
|
|
9577
9590
|
this._transforms.clear();
|
|
9578
9591
|
// Nodes
|
|
@@ -10127,6 +10140,7 @@ var AIDiagram = (function (exports) {
|
|
|
10127
10140
|
_doNarrate(text, silent) {
|
|
10128
10141
|
if (!this._captionEl || !this._captionTextEl)
|
|
10129
10142
|
return;
|
|
10143
|
+
this._cancelNarrationTyping();
|
|
10130
10144
|
this._captionEl.style.opacity = "1";
|
|
10131
10145
|
if (silent || !text) {
|
|
10132
10146
|
this._captionTextEl.textContent = text;
|
|
@@ -10137,12 +10151,16 @@ var AIDiagram = (function (exports) {
|
|
|
10137
10151
|
this._speak(text);
|
|
10138
10152
|
// Typing effect
|
|
10139
10153
|
this._captionTextEl.textContent = "";
|
|
10154
|
+
const narrationRunId = this._narrationRunId;
|
|
10140
10155
|
let charIdx = 0;
|
|
10141
10156
|
const typeNext = () => {
|
|
10157
|
+
if (this._narrationRunId !== narrationRunId || !this._captionTextEl)
|
|
10158
|
+
return;
|
|
10142
10159
|
if (charIdx < text.length) {
|
|
10143
10160
|
this._captionTextEl.textContent += text[charIdx++];
|
|
10144
|
-
|
|
10145
|
-
|
|
10161
|
+
if (charIdx < text.length) {
|
|
10162
|
+
this._scheduleTimer(typeNext, ANIMATION.narrationTypeMs, this._pendingNarrationTimers);
|
|
10163
|
+
}
|
|
10146
10164
|
}
|
|
10147
10165
|
};
|
|
10148
10166
|
typeNext();
|
|
@@ -10252,12 +10270,11 @@ var AIDiagram = (function (exports) {
|
|
|
10252
10270
|
requestAnimationFrame(animate);
|
|
10253
10271
|
}
|
|
10254
10272
|
// After guide finishes: reveal rough.js element, remove guide
|
|
10255
|
-
|
|
10273
|
+
this._scheduleTimer(() => {
|
|
10256
10274
|
roughEl.style.transition = `opacity 120ms ease`;
|
|
10257
10275
|
roughEl.style.opacity = "1";
|
|
10258
10276
|
guide.remove();
|
|
10259
10277
|
}, dur + 30);
|
|
10260
|
-
this._pendingStepTimers.add(id);
|
|
10261
10278
|
}));
|
|
10262
10279
|
}
|
|
10263
10280
|
_doAnnotationCircle(target, silent) {
|
|
@@ -10568,13 +10585,13 @@ var AIDiagram = (function (exports) {
|
|
|
10568
10585
|
</head>
|
|
10569
10586
|
<body>
|
|
10570
10587
|
<div class="diagram">${svgStr}</div>
|
|
10571
|
-
<details class="dsl"><summary style="cursor:pointer;color:#f0c96a">DSL source</summary><pre>${escapeHtml(dslSource)}</pre></details>
|
|
10588
|
+
<details class="dsl"><summary style="cursor:pointer;color:#f0c96a">DSL source</summary><pre>${escapeHtml$1(dslSource)}</pre></details>
|
|
10572
10589
|
</body>
|
|
10573
10590
|
</html>`;
|
|
10574
10591
|
const blob = new Blob([html], { type: 'text/html;charset=utf-8' });
|
|
10575
10592
|
download(blob, opts.filename ?? 'diagram.html');
|
|
10576
10593
|
}
|
|
10577
|
-
function escapeHtml(s) {
|
|
10594
|
+
function escapeHtml$1(s) {
|
|
10578
10595
|
return s.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>');
|
|
10579
10596
|
}
|
|
10580
10597
|
// ── GIF stub (requires gifshot or gif.js at runtime) ──────
|
|
@@ -10800,7 +10817,7 @@ var AIDiagram = (function (exports) {
|
|
|
10800
10817
|
.skm-canvas__viewport.is-panning{cursor:grabbing}
|
|
10801
10818
|
.skm-canvas--dark .skm-canvas__viewport{background:#12100a}
|
|
10802
10819
|
.skm-canvas__grid{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
|
|
10803
|
-
.skm-canvas__world{position:absolute;top:0;left:0;transform-origin:0 0;
|
|
10820
|
+
.skm-canvas__world{position:absolute;top:0;left:0;transform-origin:0 0;}
|
|
10804
10821
|
.skm-canvas__controls{position:absolute;right:14px;bottom:14px;display:flex;flex-direction:column;align-items:center;gap:4px;z-index:2}
|
|
10805
10822
|
.skm-canvas__zoom{min-width:40px;text-align:center;color:#8a6040;font-size:10px}
|
|
10806
10823
|
.skm-canvas__minimap{position:absolute;left:14px;bottom:14px;width:120px;height:80px;background:rgba(255,248,234,.94);border:1px solid #caba98;border-radius:6px;overflow:hidden;z-index:2}
|
|
@@ -11450,20 +11467,44 @@ var AIDiagram = (function (exports) {
|
|
|
11450
11467
|
color: #fff;
|
|
11451
11468
|
}
|
|
11452
11469
|
|
|
11453
|
-
.skm-
|
|
11470
|
+
.skm-editor__surface {
|
|
11471
|
+
position: relative;
|
|
11454
11472
|
flex: 1;
|
|
11455
|
-
width: 100%;
|
|
11456
11473
|
min-height: 0;
|
|
11457
|
-
border: 0;
|
|
11458
|
-
outline: 0;
|
|
11459
|
-
resize: none;
|
|
11460
11474
|
background: #1c1608;
|
|
11461
|
-
|
|
11475
|
+
overflow: hidden;
|
|
11476
|
+
}
|
|
11477
|
+
|
|
11478
|
+
.skm-editor__highlight,
|
|
11479
|
+
.skm-editor__input {
|
|
11480
|
+
position: absolute;
|
|
11481
|
+
inset: 0;
|
|
11482
|
+
width: 100%;
|
|
11483
|
+
height: 100%;
|
|
11462
11484
|
padding: 12px 14px;
|
|
11463
11485
|
font: inherit;
|
|
11464
11486
|
font-size: 12px;
|
|
11465
11487
|
line-height: 1.7;
|
|
11466
11488
|
tab-size: 2;
|
|
11489
|
+
white-space: pre-wrap;
|
|
11490
|
+
overflow: auto;
|
|
11491
|
+
}
|
|
11492
|
+
|
|
11493
|
+
.skm-editor__highlight {
|
|
11494
|
+
margin: 0;
|
|
11495
|
+
border: 0;
|
|
11496
|
+
background: #1c1608;
|
|
11497
|
+
color: #e0c898;
|
|
11498
|
+
pointer-events: none;
|
|
11499
|
+
word-break: break-word;
|
|
11500
|
+
}
|
|
11501
|
+
|
|
11502
|
+
.skm-editor__input {
|
|
11503
|
+
border: 0;
|
|
11504
|
+
outline: 0;
|
|
11505
|
+
resize: none;
|
|
11506
|
+
background: transparent;
|
|
11507
|
+
color: transparent;
|
|
11467
11508
|
caret-color: #f0c96a;
|
|
11468
11509
|
}
|
|
11469
11510
|
|
|
@@ -11471,6 +11512,40 @@ var AIDiagram = (function (exports) {
|
|
|
11471
11512
|
color: #80633b;
|
|
11472
11513
|
}
|
|
11473
11514
|
|
|
11515
|
+
.skm-editor__input::selection {
|
|
11516
|
+
background: rgba(240, 201, 106, 0.22);
|
|
11517
|
+
}
|
|
11518
|
+
|
|
11519
|
+
.skm-editor__token--keyword {
|
|
11520
|
+
color: #e07040;
|
|
11521
|
+
}
|
|
11522
|
+
|
|
11523
|
+
.skm-editor__token--property {
|
|
11524
|
+
color: #70a8d0;
|
|
11525
|
+
}
|
|
11526
|
+
|
|
11527
|
+
.skm-editor__token--string {
|
|
11528
|
+
color: #8db870;
|
|
11529
|
+
}
|
|
11530
|
+
|
|
11531
|
+
.skm-editor__token--number {
|
|
11532
|
+
color: #d4a020;
|
|
11533
|
+
}
|
|
11534
|
+
|
|
11535
|
+
.skm-editor__token--comment {
|
|
11536
|
+
color: #6a5a3a;
|
|
11537
|
+
}
|
|
11538
|
+
|
|
11539
|
+
.skm-editor__token--connector {
|
|
11540
|
+
color: #c8b070;
|
|
11541
|
+
}
|
|
11542
|
+
|
|
11543
|
+
.skm-editor__token--color {
|
|
11544
|
+
color: var(--skm-editor-color, #f0c96a);
|
|
11545
|
+
box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.08);
|
|
11546
|
+
font-weight: 600;
|
|
11547
|
+
}
|
|
11548
|
+
|
|
11474
11549
|
.skm-editor__error {
|
|
11475
11550
|
display: none;
|
|
11476
11551
|
flex-shrink: 0;
|
|
@@ -11487,12 +11562,112 @@ var AIDiagram = (function (exports) {
|
|
|
11487
11562
|
display: block;
|
|
11488
11563
|
}
|
|
11489
11564
|
`;
|
|
11565
|
+
const CONNECTORS = ["<-->", "<->", "-->", "<--", "---", "--", "->", "<-"];
|
|
11566
|
+
const HEX_COLOR_RE = /#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})\b/g;
|
|
11490
11567
|
function defaultFormatter(value) {
|
|
11491
11568
|
return normalizeNewlines(value)
|
|
11492
11569
|
.split("\n")
|
|
11493
11570
|
.map((line) => line.replace(/[ \t]+$/g, ""))
|
|
11494
11571
|
.join("\n");
|
|
11495
11572
|
}
|
|
11573
|
+
function escapeHtml(value) {
|
|
11574
|
+
return value
|
|
11575
|
+
.replace(/&/g, "&")
|
|
11576
|
+
.replace(/</g, "<")
|
|
11577
|
+
.replace(/>/g, ">")
|
|
11578
|
+
.replace(/"/g, """);
|
|
11579
|
+
}
|
|
11580
|
+
function wrapToken(kind, value) {
|
|
11581
|
+
return `<span class="skm-editor__token skm-editor__token--${kind}">${escapeHtml(value)}</span>`;
|
|
11582
|
+
}
|
|
11583
|
+
function renderColorLiteral(value) {
|
|
11584
|
+
return `<span class="skm-editor__token skm-editor__token--color" style="--skm-editor-color:${value}">${escapeHtml(value)}</span>`;
|
|
11585
|
+
}
|
|
11586
|
+
function renderStringToken(value) {
|
|
11587
|
+
HEX_COLOR_RE.lastIndex = 0;
|
|
11588
|
+
if (!HEX_COLOR_RE.test(value)) {
|
|
11589
|
+
return wrapToken("string", value);
|
|
11590
|
+
}
|
|
11591
|
+
HEX_COLOR_RE.lastIndex = 0;
|
|
11592
|
+
let html = "";
|
|
11593
|
+
let lastIndex = 0;
|
|
11594
|
+
let match = null;
|
|
11595
|
+
while ((match = HEX_COLOR_RE.exec(value))) {
|
|
11596
|
+
if (match.index > lastIndex) {
|
|
11597
|
+
html += wrapToken("string", value.slice(lastIndex, match.index));
|
|
11598
|
+
}
|
|
11599
|
+
html += renderColorLiteral(match[0]);
|
|
11600
|
+
lastIndex = match.index + match[0].length;
|
|
11601
|
+
}
|
|
11602
|
+
if (lastIndex < value.length) {
|
|
11603
|
+
html += wrapToken("string", value.slice(lastIndex));
|
|
11604
|
+
}
|
|
11605
|
+
return html;
|
|
11606
|
+
}
|
|
11607
|
+
function renderPlainToken(value, nextChar) {
|
|
11608
|
+
if (/^-?\d/.test(value)) {
|
|
11609
|
+
return wrapToken("number", value);
|
|
11610
|
+
}
|
|
11611
|
+
if (nextChar === "=") {
|
|
11612
|
+
return wrapToken("property", value);
|
|
11613
|
+
}
|
|
11614
|
+
if (KEYWORDS.has(value)) {
|
|
11615
|
+
return wrapToken("keyword", value);
|
|
11616
|
+
}
|
|
11617
|
+
return escapeHtml(value);
|
|
11618
|
+
}
|
|
11619
|
+
function highlightLine(line) {
|
|
11620
|
+
let html = "";
|
|
11621
|
+
let index = 0;
|
|
11622
|
+
while (index < line.length) {
|
|
11623
|
+
const rest = line.slice(index);
|
|
11624
|
+
if (rest.startsWith("//") || rest.startsWith("#")) {
|
|
11625
|
+
html += wrapToken("comment", rest);
|
|
11626
|
+
break;
|
|
11627
|
+
}
|
|
11628
|
+
if (line[index] === "\"") {
|
|
11629
|
+
let end = index + 1;
|
|
11630
|
+
while (end < line.length) {
|
|
11631
|
+
if (line[end] === "\"" && line[end - 1] !== "\\") {
|
|
11632
|
+
end += 1;
|
|
11633
|
+
break;
|
|
11634
|
+
}
|
|
11635
|
+
end += 1;
|
|
11636
|
+
}
|
|
11637
|
+
html += renderStringToken(line.slice(index, end));
|
|
11638
|
+
index = end;
|
|
11639
|
+
continue;
|
|
11640
|
+
}
|
|
11641
|
+
const connector = CONNECTORS.find((candidate) => line.startsWith(candidate, index));
|
|
11642
|
+
if (connector) {
|
|
11643
|
+
html += wrapToken("connector", connector);
|
|
11644
|
+
index += connector.length;
|
|
11645
|
+
continue;
|
|
11646
|
+
}
|
|
11647
|
+
const wordMatch = /^[A-Za-z_][A-Za-z0-9_-]*/.exec(rest);
|
|
11648
|
+
if (wordMatch) {
|
|
11649
|
+
const word = wordMatch[0];
|
|
11650
|
+
const nextChar = line[index + word.length] ?? "";
|
|
11651
|
+
html += renderPlainToken(word, nextChar);
|
|
11652
|
+
index += word.length;
|
|
11653
|
+
continue;
|
|
11654
|
+
}
|
|
11655
|
+
const numberMatch = /^-?\d+(?:\.\d+)?/.exec(rest);
|
|
11656
|
+
if (numberMatch) {
|
|
11657
|
+
html += wrapToken("number", numberMatch[0]);
|
|
11658
|
+
index += numberMatch[0].length;
|
|
11659
|
+
continue;
|
|
11660
|
+
}
|
|
11661
|
+
html += escapeHtml(line[index]);
|
|
11662
|
+
index += 1;
|
|
11663
|
+
}
|
|
11664
|
+
return html;
|
|
11665
|
+
}
|
|
11666
|
+
function renderHighlightedValue(value) {
|
|
11667
|
+
const normalized = normalizeNewlines(value);
|
|
11668
|
+
const html = normalized.split("\n").map(highlightLine).join("\n");
|
|
11669
|
+
return html || " ";
|
|
11670
|
+
}
|
|
11496
11671
|
class SketchmarkEditor {
|
|
11497
11672
|
constructor(options) {
|
|
11498
11673
|
this.emitter = new EventEmitter();
|
|
@@ -11529,16 +11704,23 @@ var AIDiagram = (function (exports) {
|
|
|
11529
11704
|
if (options.showClearButton !== false)
|
|
11530
11705
|
this.toolbar.appendChild(clearButton);
|
|
11531
11706
|
this.toolbar.appendChild(hint);
|
|
11707
|
+
this.surface = document.createElement("div");
|
|
11708
|
+
this.surface.className = "skm-editor__surface";
|
|
11709
|
+
this.highlightElement = document.createElement("pre");
|
|
11710
|
+
this.highlightElement.className = "skm-editor__highlight";
|
|
11711
|
+
this.highlightElement.setAttribute("aria-hidden", "true");
|
|
11532
11712
|
this.textarea = document.createElement("textarea");
|
|
11533
11713
|
this.textarea.className = "skm-editor__input";
|
|
11534
11714
|
this.textarea.spellcheck = false;
|
|
11535
11715
|
this.textarea.placeholder = options.placeholder ?? "diagram\nbox a label=\"Hello\"\nend";
|
|
11536
11716
|
this.textarea.value = normalizeNewlines(options.value ?? DEFAULT_CLEAR_VALUE);
|
|
11537
11717
|
this.textarea.addEventListener("input", () => {
|
|
11718
|
+
this.syncHighlight();
|
|
11538
11719
|
const payload = { value: this.getValue(), editor: this };
|
|
11539
11720
|
options.onChange?.(payload.value, this);
|
|
11540
11721
|
this.emitter.emit("change", payload);
|
|
11541
11722
|
});
|
|
11723
|
+
this.textarea.addEventListener("scroll", () => this.syncScroll());
|
|
11542
11724
|
this.textarea.addEventListener("keydown", (event) => {
|
|
11543
11725
|
if ((event.ctrlKey || event.metaKey) && event.key === "Enter") {
|
|
11544
11726
|
event.preventDefault();
|
|
@@ -11550,9 +11732,12 @@ var AIDiagram = (function (exports) {
|
|
|
11550
11732
|
if (options.showToolbar !== false) {
|
|
11551
11733
|
this.root.appendChild(this.toolbar);
|
|
11552
11734
|
}
|
|
11553
|
-
this.
|
|
11735
|
+
this.surface.appendChild(this.highlightElement);
|
|
11736
|
+
this.surface.appendChild(this.textarea);
|
|
11737
|
+
this.root.appendChild(this.surface);
|
|
11554
11738
|
this.root.appendChild(this.errorElement);
|
|
11555
11739
|
host.appendChild(this.root);
|
|
11740
|
+
this.syncHighlight();
|
|
11556
11741
|
if (options.autoFocus) {
|
|
11557
11742
|
this.focus();
|
|
11558
11743
|
}
|
|
@@ -11562,6 +11747,7 @@ var AIDiagram = (function (exports) {
|
|
|
11562
11747
|
}
|
|
11563
11748
|
setValue(value, emitChange = false) {
|
|
11564
11749
|
this.textarea.value = normalizeNewlines(value);
|
|
11750
|
+
this.syncHighlight();
|
|
11565
11751
|
if (emitChange) {
|
|
11566
11752
|
const payload = { value: this.getValue(), editor: this };
|
|
11567
11753
|
this.options.onChange?.(payload.value, this);
|
|
@@ -11603,6 +11789,14 @@ var AIDiagram = (function (exports) {
|
|
|
11603
11789
|
destroy() {
|
|
11604
11790
|
this.root.remove();
|
|
11605
11791
|
}
|
|
11792
|
+
syncHighlight() {
|
|
11793
|
+
this.highlightElement.innerHTML = renderHighlightedValue(this.textarea.value);
|
|
11794
|
+
this.syncScroll();
|
|
11795
|
+
}
|
|
11796
|
+
syncScroll() {
|
|
11797
|
+
this.highlightElement.scrollTop = this.textarea.scrollTop;
|
|
11798
|
+
this.highlightElement.scrollLeft = this.textarea.scrollLeft;
|
|
11799
|
+
}
|
|
11606
11800
|
}
|
|
11607
11801
|
|
|
11608
11802
|
const EMBED_STYLE_ID = "sketchmark-embed-ui";
|
package/dist/ui/editor.d.ts
CHANGED
|
@@ -29,6 +29,8 @@ export interface SketchmarkEditorEvents extends Record<string, unknown> {
|
|
|
29
29
|
export declare class SketchmarkEditor {
|
|
30
30
|
readonly root: HTMLDivElement;
|
|
31
31
|
readonly toolbar: HTMLDivElement;
|
|
32
|
+
readonly surface: HTMLDivElement;
|
|
33
|
+
readonly highlightElement: HTMLPreElement;
|
|
32
34
|
readonly textarea: HTMLTextAreaElement;
|
|
33
35
|
readonly errorElement: HTMLDivElement;
|
|
34
36
|
private readonly emitter;
|
|
@@ -44,5 +46,7 @@ export declare class SketchmarkEditor {
|
|
|
44
46
|
clearError(): void;
|
|
45
47
|
on<K extends keyof SketchmarkEditorEvents>(event: K, listener: (payload: SketchmarkEditorEvents[K]) => void): () => void;
|
|
46
48
|
destroy(): void;
|
|
49
|
+
private syncHighlight;
|
|
50
|
+
private syncScroll;
|
|
47
51
|
}
|
|
48
52
|
//# sourceMappingURL=editor.d.ts.map
|
package/dist/ui/editor.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editor.d.ts","sourceRoot":"","sources":["../../src/ui/editor.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"editor.d.ts","sourceRoot":"","sources":["../../src/ui/editor.ts"],"names":[],"mappings":"AAEA,OAAO,EAIL,KAAK,eAAe,EACrB,MAAM,UAAU,CAAC;AAiKlB,MAAM,WAAW,uBAAuB;IACtC,SAAS,EAAE,eAAe,CAAC;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IACtC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAC7D,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,gBAAgB,KAAK,IAAI,CAAC;CAC3D;AAED,MAAM,WAAW,4BAA4B;IAC3C,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,gBAAgB,CAAC;CAC1B;AAED,MAAM,WAAW,sBAAuB,SAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IACrE,MAAM,EAAE,4BAA4B,CAAC;IACrC,GAAG,EAAE,4BAA4B,CAAC;IAClC,KAAK,EAAE,4BAA4B,CAAC;IACpC,MAAM,EAAE,4BAA4B,CAAC;CACtC;AAiID,qBAAa,gBAAgB;IAC3B,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAC;IAC9B,QAAQ,CAAC,OAAO,EAAE,cAAc,CAAC;IACjC,QAAQ,CAAC,OAAO,EAAE,cAAc,CAAC;IACjC,QAAQ,CAAC,gBAAgB,EAAE,cAAc,CAAC;IAC1C,QAAQ,CAAC,QAAQ,EAAE,mBAAmB,CAAC;IACvC,QAAQ,CAAC,YAAY,EAAE,cAAc,CAAC;IAEtC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAA8C;IACtE,OAAO,CAAC,QAAQ,CAAC,OAAO,CAA0B;gBAEtC,OAAO,EAAE,uBAAuB;IAsF5C,QAAQ,IAAI,MAAM;IAIlB,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,UAAU,UAAQ,GAAG,IAAI;IAUjD,KAAK,IAAI,IAAI;IAIb,MAAM,IAAI,IAAI;IAOd,KAAK,IAAI,IAAI;IAOb,GAAG,IAAI,IAAI;IAMX,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAKhC,UAAU,IAAI,IAAI;IAKlB,EAAE,CAAC,CAAC,SAAS,MAAM,sBAAsB,EACvC,KAAK,EAAE,CAAC,EACR,QAAQ,EAAE,CAAC,OAAO,EAAE,sBAAsB,CAAC,CAAC,CAAC,KAAK,IAAI,GACrD,MAAM,IAAI;IAKb,OAAO,IAAI,IAAI;IAIf,OAAO,CAAC,aAAa;IAKrB,OAAO,CAAC,UAAU;CAInB"}
|
package/package.json
CHANGED
|
@@ -1,72 +1,71 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "sketchmark",
|
|
3
|
-
"version": "1.1.
|
|
4
|
-
"description": "A plain-text DSL for hand-drawn diagrams. Write boxes, edges, and groups as code — renders sketchy SVG/Canvas via rough.js with a built-in step-by-step animation system.",
|
|
5
|
-
"keywords": [
|
|
6
|
-
"diagram",
|
|
7
|
-
"dsl",
|
|
8
|
-
"rough.js",
|
|
9
|
-
"hand-drawn",
|
|
10
|
-
"ai",
|
|
11
|
-
"llm",
|
|
12
|
-
"visualization",
|
|
13
|
-
"animation",
|
|
14
|
-
"svg"
|
|
15
|
-
],
|
|
16
|
-
"author": "sketchmark contributors",
|
|
17
|
-
"license": "MIT",
|
|
18
|
-
"type": "module",
|
|
19
|
-
"main": "./dist/index.cjs",
|
|
20
|
-
"module": "./dist/index.js",
|
|
21
|
-
"types": "./dist/index.d.ts",
|
|
22
|
-
"exports": {
|
|
23
|
-
".": {
|
|
24
|
-
"import": "./dist/index.js",
|
|
25
|
-
"require": "./dist/index.cjs",
|
|
26
|
-
"types": "./dist/index.d.ts"
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
"files": [
|
|
30
|
-
"dist",
|
|
31
|
-
"README.md",
|
|
32
|
-
"LICENSE"
|
|
33
|
-
],
|
|
34
|
-
"scripts": {
|
|
35
|
-
"build": "rollup -c rollup.config.js",
|
|
36
|
-
"build:watch": "rollup -c rollup.config.js --watch",
|
|
37
|
-
"typecheck": "tsc --noEmit",
|
|
38
|
-
"lint": "eslint src --ext .ts",
|
|
39
|
-
"prepublishOnly": "npm run typecheck && npm run build",
|
|
40
|
-
"deploy": "wrangler deploy",
|
|
41
|
-
"preview": "wrangler dev"
|
|
42
|
-
},
|
|
43
|
-
"dependencies": {
|
|
44
|
-
"@chenglou/pretext": "^0.0.4"
|
|
45
|
-
},
|
|
46
|
-
"peerDependencies": {
|
|
47
|
-
"roughjs": "^4.6.0"
|
|
48
|
-
},
|
|
49
|
-
"devDependencies": {
|
|
50
|
-
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
51
|
-
"@rollup/plugin-typescript": "^11.1.6",
|
|
52
|
-
"@types/node": "^20.0.0",
|
|
53
|
-
"@typescript-eslint/eslint-plugin": "^7.0.0",
|
|
54
|
-
"@typescript-eslint/parser": "^7.0.0",
|
|
55
|
-
"eslint": "^8.56.0",
|
|
56
|
-
"happy-dom": "^13.6.0",
|
|
57
|
-
"rollup": "^4.9.0",
|
|
58
|
-
"tslib": "^2.6.2",
|
|
59
|
-
"typescript": "^5.3.3",
|
|
60
|
-
"vitest": "^1.2.0"
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
"
|
|
64
|
-
|
|
65
|
-
"
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "sketchmark",
|
|
3
|
+
"version": "1.1.3",
|
|
4
|
+
"description": "A plain-text DSL for hand-drawn diagrams. Write boxes, edges, and groups as code — renders sketchy SVG/Canvas via rough.js with a built-in step-by-step animation system.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"diagram",
|
|
7
|
+
"dsl",
|
|
8
|
+
"rough.js",
|
|
9
|
+
"hand-drawn",
|
|
10
|
+
"ai",
|
|
11
|
+
"llm",
|
|
12
|
+
"visualization",
|
|
13
|
+
"animation",
|
|
14
|
+
"svg"
|
|
15
|
+
],
|
|
16
|
+
"author": "sketchmark contributors",
|
|
17
|
+
"license": "MIT",
|
|
18
|
+
"type": "module",
|
|
19
|
+
"main": "./dist/index.cjs",
|
|
20
|
+
"module": "./dist/index.js",
|
|
21
|
+
"types": "./dist/index.d.ts",
|
|
22
|
+
"exports": {
|
|
23
|
+
".": {
|
|
24
|
+
"import": "./dist/index.js",
|
|
25
|
+
"require": "./dist/index.cjs",
|
|
26
|
+
"types": "./dist/index.d.ts"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"files": [
|
|
30
|
+
"dist",
|
|
31
|
+
"README.md",
|
|
32
|
+
"LICENSE"
|
|
33
|
+
],
|
|
34
|
+
"scripts": {
|
|
35
|
+
"build": "rollup -c rollup.config.js",
|
|
36
|
+
"build:watch": "rollup -c rollup.config.js --watch",
|
|
37
|
+
"typecheck": "tsc --noEmit",
|
|
38
|
+
"lint": "eslint src --ext .ts",
|
|
39
|
+
"prepublishOnly": "npm run typecheck && npm run build",
|
|
40
|
+
"deploy": "wrangler deploy",
|
|
41
|
+
"preview": "wrangler dev"
|
|
42
|
+
},
|
|
43
|
+
"dependencies": {
|
|
44
|
+
"@chenglou/pretext": "^0.0.4"
|
|
45
|
+
},
|
|
46
|
+
"peerDependencies": {
|
|
47
|
+
"roughjs": "^4.6.0"
|
|
48
|
+
},
|
|
49
|
+
"devDependencies": {
|
|
50
|
+
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
51
|
+
"@rollup/plugin-typescript": "^11.1.6",
|
|
52
|
+
"@types/node": "^20.0.0",
|
|
53
|
+
"@typescript-eslint/eslint-plugin": "^7.0.0",
|
|
54
|
+
"@typescript-eslint/parser": "^7.0.0",
|
|
55
|
+
"eslint": "^8.56.0",
|
|
56
|
+
"happy-dom": "^13.6.0",
|
|
57
|
+
"rollup": "^4.9.0",
|
|
58
|
+
"tslib": "^2.6.2",
|
|
59
|
+
"typescript": "^5.3.3",
|
|
60
|
+
"vitest": "^1.2.0"
|
|
61
|
+
},
|
|
62
|
+
"sideEffects": false,
|
|
63
|
+
"repository": {
|
|
64
|
+
"type": "git",
|
|
65
|
+
"url": "https://github.com/anmism/sketchmark"
|
|
66
|
+
},
|
|
67
|
+
"bugs": {
|
|
68
|
+
"url": "https://github.com/anmism/sketchmark/issues"
|
|
69
|
+
},
|
|
70
|
+
"homepage": "https://github.com/anmism/sketchmark#readme"
|
|
71
|
+
}
|