@markdy/cli 0.8.26 → 0.8.27
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/index.js +38 -6
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -452,12 +452,12 @@ async function docsCommand(parsed, io, runtime) {
|
|
|
452
452
|
const docsUrl = "https://markdy.com";
|
|
453
453
|
const links = [
|
|
454
454
|
"Markdy docs",
|
|
455
|
-
" Website:
|
|
456
|
-
" Docs:
|
|
457
|
-
"
|
|
458
|
-
"
|
|
459
|
-
"
|
|
460
|
-
"
|
|
455
|
+
" Website: https://markdy.com",
|
|
456
|
+
" Docs: https://markdy.com/docs/",
|
|
457
|
+
" Agent: https://markdy.com/AGENT.md",
|
|
458
|
+
" LLMs: https://markdy.com/llms.txt",
|
|
459
|
+
" Playground: https://markdy.com/playground/",
|
|
460
|
+
" GitHub: https://github.com/HoangYell/markdy-com"
|
|
461
461
|
];
|
|
462
462
|
io.stdout(links.join("\n"));
|
|
463
463
|
if (hasFlag(parsed, "open")) {
|
|
@@ -723,6 +723,8 @@ function buildPlaygroundHtml(code, sourcePath) {
|
|
|
723
723
|
<textarea id="code">${escapeHtml(code)}</textarea>
|
|
724
724
|
<div class="actions">
|
|
725
725
|
<button id="run" type="button">Run</button>
|
|
726
|
+
<button id="paste" type="button">Paste</button>
|
|
727
|
+
<button id="copy" type="button">Copy</button>
|
|
726
728
|
<button id="pause" type="button">Pause</button>
|
|
727
729
|
<button id="play" type="button">Play</button>
|
|
728
730
|
</div>
|
|
@@ -739,6 +741,8 @@ function buildPlaygroundHtml(code, sourcePath) {
|
|
|
739
741
|
const viewport = document.getElementById("viewport");
|
|
740
742
|
const warnings = document.getElementById("warnings");
|
|
741
743
|
const runButton = document.getElementById("run");
|
|
744
|
+
const pasteButton = document.getElementById("paste");
|
|
745
|
+
const copyButton = document.getElementById("copy");
|
|
742
746
|
const pauseButton = document.getElementById("pause");
|
|
743
747
|
const playButton = document.getElementById("play");
|
|
744
748
|
let diagram;
|
|
@@ -765,6 +769,34 @@ function buildPlaygroundHtml(code, sourcePath) {
|
|
|
765
769
|
}
|
|
766
770
|
|
|
767
771
|
runButton.addEventListener("click", render);
|
|
772
|
+
pasteButton?.addEventListener("click", async () => {
|
|
773
|
+
let text = "";
|
|
774
|
+
try {
|
|
775
|
+
if (navigator.clipboard && navigator.clipboard.readText) {
|
|
776
|
+
text = await navigator.clipboard.readText();
|
|
777
|
+
} else {
|
|
778
|
+
text = prompt("Paste MarkdyScript code here:") || "";
|
|
779
|
+
}
|
|
780
|
+
} catch {
|
|
781
|
+
const fallback = prompt("Paste MarkdyScript code here:");
|
|
782
|
+
if (fallback !== null) text = fallback;
|
|
783
|
+
}
|
|
784
|
+
if (text && text.trim()) {
|
|
785
|
+
textarea.value = text;
|
|
786
|
+
render();
|
|
787
|
+
const orig = pasteButton.textContent;
|
|
788
|
+
pasteButton.textContent = "Pasted!";
|
|
789
|
+
setTimeout(() => { pasteButton.textContent = orig; }, 1800);
|
|
790
|
+
}
|
|
791
|
+
});
|
|
792
|
+
copyButton?.addEventListener("click", async () => {
|
|
793
|
+
try {
|
|
794
|
+
await navigator.clipboard.writeText(textarea.value);
|
|
795
|
+
const orig = copyButton.textContent;
|
|
796
|
+
copyButton.textContent = "Copied!";
|
|
797
|
+
setTimeout(() => { copyButton.textContent = orig; }, 1800);
|
|
798
|
+
} catch {}
|
|
799
|
+
});
|
|
768
800
|
pauseButton.addEventListener("click", () => diagram?.pause?.());
|
|
769
801
|
playButton.addEventListener("click", () => diagram?.play?.());
|
|
770
802
|
render();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@markdy/cli",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.27",
|
|
4
4
|
"description": "First-party CLI for diagram-native MarkdyScript diagrams: lint, format, explain, render, and preview.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -42,10 +42,10 @@
|
|
|
42
42
|
"access": "public"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@markdy/compat": "0.8.
|
|
46
|
-
"@markdy/
|
|
47
|
-
"@markdy/renderer-dom": "0.8.
|
|
48
|
-
"@markdy/
|
|
45
|
+
"@markdy/compat": "0.8.27",
|
|
46
|
+
"@markdy/core": "0.8.27",
|
|
47
|
+
"@markdy/renderer-dom": "0.8.27",
|
|
48
|
+
"@markdy/stdlib-systems": "0.8.27"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@types/node": "^25.9.5",
|