@markdy/cli 0.8.2 → 0.8.4
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 +9 -9
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -583,7 +583,7 @@ function buildPlaygroundHtml(code, sourcePath) {
|
|
|
583
583
|
</section>
|
|
584
584
|
</main>
|
|
585
585
|
<script type="module">
|
|
586
|
-
import {
|
|
586
|
+
import { createDiagram } from "@markdy/renderer-dom";
|
|
587
587
|
|
|
588
588
|
const textarea = document.getElementById("code");
|
|
589
589
|
const viewport = document.getElementById("viewport");
|
|
@@ -591,14 +591,14 @@ function buildPlaygroundHtml(code, sourcePath) {
|
|
|
591
591
|
const runButton = document.getElementById("run");
|
|
592
592
|
const pauseButton = document.getElementById("pause");
|
|
593
593
|
const playButton = document.getElementById("play");
|
|
594
|
-
let
|
|
594
|
+
let diagram;
|
|
595
595
|
|
|
596
596
|
function render() {
|
|
597
597
|
warnings.innerHTML = "";
|
|
598
598
|
viewport.innerHTML = "";
|
|
599
|
-
|
|
599
|
+
diagram?.destroy?.();
|
|
600
600
|
try {
|
|
601
|
-
|
|
601
|
+
diagram = createDiagram({
|
|
602
602
|
container: viewport,
|
|
603
603
|
code: textarea.value,
|
|
604
604
|
onWarning(warning) {
|
|
@@ -615,8 +615,8 @@ function buildPlaygroundHtml(code, sourcePath) {
|
|
|
615
615
|
}
|
|
616
616
|
|
|
617
617
|
runButton.addEventListener("click", render);
|
|
618
|
-
pauseButton.addEventListener("click", () =>
|
|
619
|
-
playButton.addEventListener("click", () =>
|
|
618
|
+
pauseButton.addEventListener("click", () => diagram?.pause?.());
|
|
619
|
+
playButton.addEventListener("click", () => diagram?.play?.());
|
|
620
620
|
render();
|
|
621
621
|
</script>
|
|
622
622
|
</body>
|
|
@@ -661,9 +661,9 @@ async function buildStandaloneHtml(scene) {
|
|
|
661
661
|
}
|
|
662
662
|
</script>
|
|
663
663
|
<script type="module">
|
|
664
|
-
import {
|
|
664
|
+
import { createDiagram } from "@markdy/renderer-dom";
|
|
665
665
|
|
|
666
|
-
|
|
666
|
+
createDiagram({
|
|
667
667
|
container: document.getElementById("app"),
|
|
668
668
|
code: ${JSON.stringify(scene.source)},
|
|
669
669
|
onWarning(warning) {
|
|
@@ -820,7 +820,7 @@ function describeError(error) {
|
|
|
820
820
|
}
|
|
821
821
|
function defaultSceneTemplate() {
|
|
822
822
|
return [
|
|
823
|
-
'scene "My Architecture" theme=
|
|
823
|
+
'scene "My Architecture" theme=paper',
|
|
824
824
|
"layout LR",
|
|
825
825
|
"",
|
|
826
826
|
"browser Client",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@markdy/cli",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.4",
|
|
4
4
|
"description": "First-party CLI for MarkdyScript diagrams: lint, format, explain, render, and a local playground.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -41,9 +41,9 @@
|
|
|
41
41
|
"access": "public"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@markdy/core": "0.8.
|
|
45
|
-
"@markdy/
|
|
46
|
-
"@markdy/
|
|
44
|
+
"@markdy/core": "0.8.4",
|
|
45
|
+
"@markdy/renderer-dom": "0.8.4",
|
|
46
|
+
"@markdy/stdlib-systems": "0.8.4"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@types/node": "^25.9.5",
|